Browse Source

[fix] 基础资料

前端定义报销单审批流程模型
修改报销列表集合查询方法
修改报销 buildAuthority方法实现动态识别发起人和其关联角色
解决报销单前端列表展示报错问题:修改报销单的查询方法,修改部门、岗位、姓名字段单词错误
解决报销单新增报错问题:delFlag单词错误
解决报销单修改报错问题:audiStatus字段重复
解决报销单新增报错问题:audiStatus字段重复
解决报销单查询详情接口报错问题:多了字段instance_type_name
解决报销部门上级经理审核前端页面报错问题:修改姓名字段,修改保存方法,加上审批意见模块,加上activity前端接口,加上对应报销经理的权限字段
解决报销部门上级主管审核前端页面报错问题:修改姓名字段,修改保存方法,加上审批意见模块,加上activity前端接口,加上对应报销经理的权限字段
解决报销总经理审核前端页面报错问题:修改姓名字段,修改保存方法,加上审批意见模块,加上activity前端接口,加上对应报销经理的权限字段
新增副总经理审核前端页面
dev
liuxiaoxu 4 months ago
parent
commit
a37c0b9664
  1. 28
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java
  2. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java
  3. 176
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java
  4. 13
      ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml
  5. 62
      ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html
  6. 69
      ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html
  7. 210
      ruoyi-admin/src/main/resources/templates/system/baseExpense/taskFzjlVerify.html
  8. 208
      ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html
  9. 78
      ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html
  10. 126
      ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html

28
ruoyi-admin/src/main/java/com/ruoyi/system/controller/BaseExpenseAccountController.java

@ -5,6 +5,7 @@ import java.util.List;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.remind.service.RemindService;
@ -119,15 +120,19 @@ public class BaseExpenseAccountController extends BaseController
}
/**
* 新增保存报销单
* 新增保存报销单暂时改成没有子表的方法
*/
@RequiresPermissions("system:baseExpense:add")
@Log(title = "报销单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@RequestBody BaseExpenseAccount baseExpenseAccount)
public AjaxResult addSave(BaseExpenseAccount baseExpenseAccount)
{
return toAjax(baseExpenseAccountService.insertBaseExpenseAccount(baseExpenseAccount));
baseExpenseAccount.setCreateBy(ShiroUtils.getLoginName());
baseExpenseAccount.setUseStatus("0");
baseExpenseAccount.setAuditStatus("0");
baseExpenseAccountService.submitApply(baseExpenseAccount);
return AjaxResult.success();
}
/**
@ -182,9 +187,9 @@ public class BaseExpenseAccountController extends BaseController
return prefix + "/task" + verifyName;
}
@ModelAttribute("/preloadObj")
public BaseExpenseAccountVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return baseExpenseAccountService.selectBaseExpenseAccountById(id);
public BaseExpenseAccountVo getObj(@RequestParam(value = "expenseId", required = false) Long expenseId, HttpSession session) {
if (expenseId != null) {
return baseExpenseAccountService.selectBaseExpenseAccountById(expenseId);
}
return new BaseExpenseAccountVo();
}
@ -196,17 +201,18 @@ public class BaseExpenseAccountController extends BaseController
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity,
@RequestParam(value = "customerQuoteChildList", required = false) String customerQuoteChildList,
@ModelAttribute("preloadObj") BaseExpenseAccountVo baseExpenseAccountVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
baseExpenseAccountVo.setExpenseAccountChildList(JSON.parseArray(customerQuoteChildList, BaseExpenseAccountChild.class));
if (saveEntityBoolean){
baseExpenseAccountService.updateBaseExpenseAccount(baseExpenseAccountVo);
}
String instanceId = baseExpenseAccountVo.getInstanceId();
String instanceType = baseExpenseAccountVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, baseExpenseAccountVo.getApplyTitle(),
baseExpenseAccountVo.getSupplierCode(),
"customerQuote", new HashMap<String, Object>(), request);
baseExpenseAccountVo.getExpenseCode(),
"expense", new HashMap<String, Object>(), request);
if(!approvedFlag){
// 审核状态-审核拒绝
baseExpenseAccountVo.setAuditStatus("2");
@ -216,6 +222,8 @@ public class BaseExpenseAccountController extends BaseController
if (processIsFinish) {
// 审核通过
baseExpenseAccountVo.setAuditStatus("1");
baseExpenseAccountVo.setFinanceAuditStatus("1");
baseExpenseAccountVo.setManagerAuditStatus("1");
// 提交
if("submit".equals(instanceType)){
// 使用状态-是

1
ruoyi-admin/src/main/java/com/ruoyi/system/domain/BaseExpenseAccount.java

@ -351,6 +351,7 @@ public class BaseExpenseAccount extends BaseEntity
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("useStatus", getUseStatus())
.append("delFlag", getDelFlag())
.toString();
}
}

176
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/BaseExpenseAccountServiceImpl.java

@ -5,10 +5,15 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.github.pagehelper.Page;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.core.page.TableSupport;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.system.domain.BaseExpenseAccountChild;
@ -17,7 +22,9 @@ import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.IBaseExpenseAccountChildService;
import com.ruoyi.system.service.ISysRoleService;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,6 +33,7 @@ import com.ruoyi.system.domain.BaseExpenseAccount;
import com.ruoyi.system.service.IBaseExpenseAccountService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
/**
* 报销单Service业务层处理
@ -81,7 +89,57 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
@Override
public List<BaseExpenseAccountVo> selectBaseExpenseAccountList(BaseExpenseAccount baseExpenseAccount)
{
return baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount);
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
//PageHelper 仅对第一List分页有效
Page<BaseExpenseAccountVo> list = (Page<BaseExpenseAccountVo>) baseExpenseAccountMapper.selectBaseExpenseAccountList(baseExpenseAccount);
Page<BaseExpenseAccountVo> returnList = new Page<>();
for(BaseExpenseAccountVo baseExpenseAccountVo : list){
SysUser sysUser = userMapper.selectUserByLoginName(baseExpenseAccountVo.getCreateBy());
if (sysUser != null) {
baseExpenseAccountVo.setCreateBy(sysUser.getUserName());
}
SysUser sysUser2 = userMapper.selectUserByLoginName(baseExpenseAccountVo.getApplyUser());
if (sysUser2!=null){
baseExpenseAccountVo.setApplyUserName(sysUser2.getUserName());
}
String instanceId = baseExpenseAccountVo.getInstanceId();
// 当前环节
if (StringUtils.isNotBlank(instanceId)) {
List<Task> taskList = taskService.createTaskQuery()
.processInstanceId(instanceId)
// .singleResult();
.list(); // 例如请假会签,会同时拥有多个任务
if (!CollectionUtils.isEmpty(taskList)) {
TaskEntityImpl task = (TaskEntityImpl) taskList.get(0);
String taskId = task.getId();
baseExpenseAccountVo.setTaskId(taskId);
// 设置待办用户
List<String> todoUserList = todoItemMapper.selectUndealTodoUserList(taskId);
if(!CollectionUtils.isEmpty(taskList)){
baseExpenseAccountVo.setTodoUserId(String.join(",",todoUserList));
}
if (task.getSuspensionState() == 2) {
baseExpenseAccountVo.setTaskName("已挂起");
baseExpenseAccountVo.setSuspendState("2");
} else {
baseExpenseAccountVo.setTaskName(task.getName());
baseExpenseAccountVo.setSuspendState("1");
}
} else {
// 已办结或者已撤销
baseExpenseAccountVo.setTaskName("已结束");
}
} else {
baseExpenseAccountVo.setTaskName("未启动");
}
returnList.add(baseExpenseAccountVo);
}
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());
returnList.setPageNum(pageNum);
returnList.setPageSize(pageSize);
return returnList;
}
/**
@ -99,21 +157,22 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
baseExpenseAccount.setAuditStatus("0");
baseExpenseAccount.setUseStatus("0");
baseExpenseAccount.setDelFlag("0");
List<BaseExpenseAccountChild> baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList();
int baseExpaneseChildSize = baseExpenseAccountChildList.size();
if (baseExpaneseChildSize > 0) {
for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) {
baseExpenseAccountChild.setCreateBy(loginName);
baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate());
//获取父表的单号
baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode());
}
}
baseExpenseAccount.setExpenseCode(redisCache.generateBillNo("BX"));
// List<BaseExpenseAccountChild> baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList();
// int baseExpaneseChildSize = baseExpenseAccountChildList.size();
// if (baseExpaneseChildSize > 0) {
// for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) {
// baseExpenseAccountChild.setCreateBy(loginName);
// baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate());
// //获取父表的单号
// baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode());
// }
// }
return baseExpenseAccountMapper.insertBaseExpenseAccount(baseExpenseAccount);
}
/**
* 修改报销单
* 修改报销单 暂时去掉子表数据后续添加
*
* @param baseExpenseAccount 报销单
* @return 结果
@ -125,18 +184,18 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
baseExpenseAccount.setUpdateBy(loginName);
baseExpenseAccount.setUpdateTime(DateUtils.getNowDate());
baseExpenseAccount.setDelFlag("0");
List<BaseExpenseAccountChild> baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList();
baseExpenseAccountChildService.deleteBaseExpenseAccountChildById(baseExpenseAccount.getExpenseId());
int baseExpenseChildSize = baseExpenseAccountChildList.size();
if (baseExpenseChildSize > 0) {
baseExpenseAccountChildService.deleteBaseExpenseAccountChildByExpenseCode(baseExpenseAccount.getExpenseCode());
for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) {
baseExpenseAccountChild.setCreateBy(loginName);
baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate());
//获取父表的单号
baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode());
}
}
// List<BaseExpenseAccountChild> baseExpenseAccountChildList = baseExpenseAccount.getExpenseAccountChildList();
// baseExpenseAccountChildService.deleteBaseExpenseAccountChildById(baseExpenseAccount.getExpenseId());
// int baseExpenseChildSize = baseExpenseAccountChildList.size();
// if (baseExpenseChildSize > 0) {
// baseExpenseAccountChildService.deleteBaseExpenseAccountChildByExpenseCode(baseExpenseAccount.getExpenseCode());
// for (BaseExpenseAccountChild baseExpenseAccountChild :baseExpenseAccountChildList) {
// baseExpenseAccountChild.setCreateBy(loginName);
// baseExpenseAccountChild.setCreateTime(DateUtils.getNowDate());
// //获取父表的单号
// baseExpenseAccountChild.setExpenseCode(baseExpenseAccount.getExpenseCode());
// }
// }
return baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount);
}
@ -255,9 +314,11 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
SysUser user = ShiroUtils.getSysUser();
baseExpenseAccount.setApplyUser(user.getLoginName());
baseExpenseAccount.setApplyTime(DateUtils.getNowDate());
if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){
insertBaseExpenseAccount(baseExpenseAccount);
}
insertBaseExpenseAccount(baseExpenseAccount);
// if (baseExpenseAccount.getExpenseId() == null || baseExpenseAccount.getExpenseId() == 0){
// insertBaseExpenseAccount(baseExpenseAccount);
// }
// 启动流程
String applyTitle = user.getUserName()+"发起了报销单提交审批-"+DateUtils.dateTimeNow();
String instanceType = "submit";
@ -272,6 +333,12 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
baseExpenseAccount.setAuditStatus("1");
// 使用状态-是
baseExpenseAccount.setUseStatus("1");
//设置总经理审核状态
baseExpenseAccount.setManagerAuditStatus("1");
//设置财务审核状态
baseExpenseAccount.setFinanceAuditStatus("1");
}
baseExpenseAccountMapper.updateBaseExpenseAccount(baseExpenseAccount);
return processInstance;
@ -279,9 +346,9 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
private ProcessInstance startProcessInstance(String applyTitle, String instanceType, BaseExpenseAccount baseExpenseAccount, SysUser user) {
Long customerId = baseExpenseAccount.getExpenseId();
String businessKey = customerId.toString(); // 实体类 ID,作为流程的业务 key
String key = "customer";
Long expenseId = baseExpenseAccount.getExpenseId();
String businessKey = expenseId.toString(); // 实体类 ID,作为流程的业务 key
String key = "expense";
Map<String,Object> variables = new HashMap<>();
// 构造authority传参
buildAuthority(user, variables);
@ -297,15 +364,48 @@ public class BaseExpenseAccountServiceImpl implements IBaseExpenseAccountService
private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
// 角色不同审核人不同
if(roleKeys.contains("zozjRole") || roleKeys.contains("zjlRole") || roleKeys.contains("admin")){
variables.put("authority",4);
}else if(roleKeys.contains("ywzgRole")){
variables.put("authority",3);
}else if(roleKeys.contains("ywjlRole")){
variables.put("authority",1);
//判断请购人的角色,进入相应的逻辑,设置节点审批人变量
if(roleKeys.contains("ywyRole") || roleKeys.contains("ywjlRole") || roleKeys.contains("ywzgRole")){
// 业务经理
variables.put("bxjlRole","ywjlRole");
// 业务主管
variables.put("bxzgRole","ywzgRole");
}else if(roleKeys.contains("cgyRole") || roleKeys.contains("cgjlRole") || roleKeys.contains("cgzgRole")){
// 采购经理
variables.put("bxjlRole","cgjlRole");
// 采购主管
variables.put("bxzgRole","cgzgRole");
}else if (roleKeys.contains("gcwyRole") || roleKeys.contains("gcjlRole") || roleKeys.contains("gczgRole")){
// 工程经理
variables.put("bxjlRole","gcjlRole");
// 工程主管
variables.put("bxzgRole","gczgRole");
} else if (roleKeys.contains("scyRole") || roleKeys.contains("scjlRole") || roleKeys.contains("sczgRole")){
// 生产经理
variables.put("bxjlRole","scjlRoe");
// 生产主管
variables.put("bxzgRole","sczgRole");
}else if (roleKeys.contains("shgcsRole") || roleKeys.contains("shjlRole") || roleKeys.contains("shzgRole")){
// 售后经理
variables.put("bxjlRole","shjlRole");
// 售后主管
variables.put("bxzgRole","shzgRole");
}else if(roleKeys.contains("cgyyRole") || roleKeys.contains("ckzgRole")){
variables.put("bxjlRole","shzgRole");
// 售后主管
variables.put("bxzgRole","shzgRole");
}else if (roleKeys.contains("cwRole") || roleKeys.contains("cwjlRole")){
variables.put("bxjlRole","cwjlRole");
// 售后主管
variables.put("bxzgRole","cwJlRole");
}else{
variables.put("authority",2);
}
if(roleKeys.contains("admin")){
// 角色包含业务经理、采购经理、工程经理、生产经理
variables.put("authority",2);
}else if(roleKeys.contains("ywyRole")){
variables.put("authority",1);
}
}
@Override

13
ruoyi-admin/src/main/resources/mapper/system/BaseExpenseAccountMapper.xml

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BaseExpenseAccountMapper">
<resultMap type="BaseExpenseAccountVo" id="BaseExpenseAccountResult">
<resultMap type="BaseExpenseAccountVo" id="BaseExpenseAccountResult">
<result property="expenseId" column="expense_id" />
<result property="auditStatus" column="audit_status" />
<result property="managerAuditStatus" column="manager_audit_status" />
@ -35,6 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyTitle" column="apply_title" />
<result property="applyUser" column="apply_user" />
<result property="applyTime" column="apply_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectBaseExpenseAccountVo">
@ -42,14 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
expense_code, deptName, postName, fullName, expense_method, is_purchase_outsource,
supplier_code, corporate_payee, corporate_receiving_account, public_account_banks,
apply_user, create_by, create_time, update_by, update_time, remark, use_status,del_flag,
instance_id, instance_type, instance_type_name, submit_instance_id, cancel_instance_id, restore_instance_id,
instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id,
apply_title, apply_user, apply_time
from base_expense_account
</sql>
<select id="selectBaseExpenseAccountList" parameterType="BaseExpenseAccount" resultMap="BaseExpenseAccountResult">
select b.expense_id, b.audit_status, b.manager_audit_status, b.finance_audit_status,
b.expense_code, d.dept_name, e.post_name, f.full_name, b.expense_method, b.is_purchase_outsource,
b.expense_code, b.deptName, b.postName, b.fullName, b.expense_method, b.is_purchase_outsource,
b.supplier_code, b.corporate_payee, b.corporate_receiving_account, b.public_account_banks,
b.apply_user, b.create_by, b.create_time, b.update_by, b.update_time, b.remark, b.use_status,b.del_flag,
b.instance_id, b.instance_type, p.dict_value as instance_type_name, b.submit_instance_id, b.cancel_instance_id, b.restore_instance_id,
@ -104,7 +106,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="useStatus != null">use_status,</if>
<if test="instanceId != null">instance_id,</if>
<if test="instanceType != null">instance_type,</if>
@ -133,7 +134,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="instanceType != null">#{instanceType},</if>
@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="delFlag != null">#{del_flag},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
@ -166,7 +166,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="instanceType != null">instance_type = #{instanceType},</if>

62
ruoyi-admin/src/main/resources/templates/system/baseExpense/add.html

@ -79,22 +79,22 @@
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span style="color: black;font-size:17px;font-weight: bold" >报销分类信息</span>
<a class="btn btn-success" onclick="insertRow()">
<span class="fa fa-plus"></span> 添加报销
</a>
<a class="btn btn-danger" onclick="removeRow()">
<span class="fa fa-remove"></span> 删除报销
</a>
</div>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense"></table>
</div>
</div>
<!-- <div class="container">-->
<!-- <div class="form-row">-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <span style="color: black;font-size:17px;font-weight: bold" >报销分类信息</span>-->
<!-- <a class="btn btn-success" onclick="insertRow()">-->
<!-- <span class="fa fa-plus"></span> 添加报销-->
<!-- </a>-->
<!-- <a class="btn btn-danger" onclick="removeRow()">-->
<!-- <span class="fa fa-remove"></span> 删除报销-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-sm-12 select-table table-striped">-->
<!-- <table id="bootstrap-sub-table-expense"></table>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<th:block th:include="include :: footer" />
@ -245,20 +245,30 @@
})
}
/* 删除指定表格行 */
// function submitHandler() {
// if ($.validate.form()) {
// var formData = $('#form-baseExpense-add').serializeArray();
// var tableData = $table.bootstrapTable('getData');
// var rows = tableData.length;
// if(rows==0){
// $.modal.alertWarning("子表数据不能为空!");
// }else{
// formData.push({"name": "expenseAccountChildList", "value": tableData});
// var jsonData = $.common.formDataToJson(formData);
// $.operate.saveJson(prefix + "/add", jsonData);
// }
// }
// }
//暂时去掉子表数据进行提交
function submitHandler() {
if ($.validate.form()) {
var formData = $('#form-baseExpense-add').serializeArray();
var tableData = $table.bootstrapTable('getData');
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "expenseAccountChildList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
$.operate.saveJson(prefix + "/add", jsonData);
}
var formData = $('#form-baseExpense-add').serialize();
$.operate.save(prefix + "/add", formData);
}
}
// 列中获取成本类型的下拉改变数据
function onCostTypeChange(selectElement, rowIndex) {
var newSupplierId = $(selectElement).val();

69
ruoyi-admin/src/main/resources/templates/system/baseExpense/baseExpense.html

@ -100,12 +100,15 @@
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var costTypeDatas = [[${@category.getChildByCode('costType')}]];
var editFlag = [[${@permission.hasPermi('system:baseExpense:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:baseExpense:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:baseExpense:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('system:baseExpense:restore')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "system/baseExpense";
$(function() {
var costTypeDatas = [[${@category.getChildByCode('costType')}]];
@ -129,6 +132,29 @@
columns: [
{checkbox: true},
{title: '报销单索引id',field: 'expenseId',visible: false},
{title: '流程实例ID',field: 'instanceId',visible: false},
{ title: '流程提交实例ID',field: 'submitInstanceId',visible: false},
{ title:'流程作废实例ID',field: 'cancelInstanceId',visible: false},
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', visible: false},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{field: 'applyTime',title: '申请时间'
},
{title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{title: '上级审核状态',field: 'auditStatus',},
{title: '总经理审核状态',field: 'managerAuditStatus',},
{title: '财务审核状态',field: 'financeAuditStatus',},
@ -145,18 +171,41 @@
{title: '上次更新时间',field: 'updateTime',visible: false},
{title: '备注',field: 'remark',visible: false},
{title: '使用状态',field: 'useStatus',visible: false},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
{title: '操作',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.expenseId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
if(row.delFlag == '0'){
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> ');
}else{
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> ');
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.expenseId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.expenseId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
// 已作废
}
else{
actions.push('<a class="btn btn-default btn-xs" href="javascript:void(0)" disabled><i class="fa fa-edit"></i> 编辑</a> ');
}
// 有流程实例id
if(row.useStatus=="2" && !row.restoreInstanceId){
// 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.expenseId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
}
// 有流程实例id
if (row.instanceId) {
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+ row.instanceTypeName +"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.expenseId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');
}
}

210
ruoyi-admin/src/main/resources/templates/system/baseExpense/taskFzjlVerify.html

@ -0,0 +1,210 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('副总经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-fzjl" th:object="${formData}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" />
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">报销单号:</label>
<div class="col-sm-8">
<input name="expenseCode" th:field="*{expenseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="fullName" th:field="*{fullName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">报销方式:</label>
<div class="col-sm-6">
<select id="bxjl_expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" onchange="handleExpenseMethod(this)" class="form-control" th:with="dictList=${@dict.getType('sys_base_expense_method')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div id="bxjl_expenseMethodModal" class="container" style="display: none">
<div class="form-group">
<label class="col-sm-6 control-label">是否是委外/采购采销:</label>
<div class="col-sm-6">
<select name="isPurchaseOutsource" class="form-control" th:with="dictList=${@dict.getType('sys_whether')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">供应商ID:</label>
<div class="col-sm-6">
<select id="supplierCode" name="supplierCode" class="form-control">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款方:</label>
<div class="col-sm-6">
<input name="corporatePayee" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款账户:</label>
<div class="col-sm-6">
<input name="corporateReceivingAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公开户行:</label>
<div class="col-sm-6">
<input name="publicAccountBanks" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="fzjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_fzjlVerifyApproved" id="fzjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
<!-- <div class="container">-->
<!-- <div class="form-row">-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <span>选择报销分类信息</span>-->
<!-- <a class="btn btn-success" onclick="insertRow()">-->
<!-- <i class="fa fa-plus"></i> 添加报销-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12 select-table table-striped">-->
<!-- <table id="bootstrap-sub-table-expense-fzjl"></table>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseExpense";
var taskId = [[${taskId}]];
$("#form-baseExpense-fzjl").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-expense-fzjl',
url: ctx + "system/expenseChild/list",
queryParams: function(params) {
return {
expenseCode: $("#expenseCode").val()
};
},
pagination: false,
sidePagination: "client",
model: "报销单数据",
editable: true,
columns: [
{checkbox: true},
{title: '主键',field: 'index',visible: false,
formatter: function (value, row, index) {
return index;
}
},
{title: '报销单分项子表',field: 'expenseChildId',visible: false},
{title: '关联报销单号',field: 'expenseCode',visible: false},
{title: '成本类型',field: 'costType',
formatter:function (value, row, index) {
return costTypeFormatter(value,row,index);
}
},
{title: '成本小类',field: 'costSmallType',
formatter:function(value, row, index){
return getCostSmallType(value,row,index)
}
},
{title: '用途',field: 'purpose',editable:{type:'text',mode:'inline'}},
{title: '金额',field: 'amounts',editable: {type:'text',mode:'inline'}},
{title: '报销时间',field: 'expenseTime',editable:{type:'date',mode:'inline',}},
{title: '出差单号',field: 'evectionCode',editable: {type:'text',mode:'inline'}},
{title: '采购单号',field: 'purcahseCode',editable: {type:'text',mode:'inline',}},
{title: '委外单号',field: 'outsourceCode',editable: {type:'text',mode:'inline',}},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
};
$.table.init(options);
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseExpense-fzjl').serialize());
}
}
// function getSelections(){
// $.ajax({
// url: ctx + "system/requisitioning/getEmpUserName",
// type: "get",
// dataType: "json",
// success: function (data) {
// $("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
// $("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
// $("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
// }
// });
//
// }
</script>
</body>
</html>

208
ruoyi-admin/src/main/resources/templates/system/baseExpense/taskZozjVerify.html

@ -1,40 +1,210 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('总助/总经理审核')" />
<th:block th:include="include :: header('总经理/总助审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-zozj-audit" th:object="${formData}">
<form class="form-horizontal m" id="form-baseExpense-zozj" th:object="${formData}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" />
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input name="applyTime" th:value="${#dates.format(formData.applyTime, 'yyyy-MM-dd HH:mm')}" class="form-control" type="text" disabled>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input name="title" th:field="*{applyTitle}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">报销单号:</label>
<div class="col-sm-8">
<input name="expenseCode" th:field="*{expenseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptName" th:field="*{deptName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select name="postName" th:field="*{postName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="fullName" th:field="*{fullName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">报销方式:</label>
<div class="col-sm-6">
<select id="bxjl_expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" onchange="handleExpenseMethod(this)" class="form-control" th:with="dictList=${@dict.getType('sys_base_expense_method')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div id="bxjl_expenseMethodModal" class="container" style="display: none">
<div class="form-group">
<label class="col-sm-6 control-label">是否是委外/采购采销:</label>
<div class="col-sm-6">
<select name="isPurchaseOutsource" class="form-control" th:with="dictList=${@dict.getType('sys_whether')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">供应商ID:</label>
<div class="col-sm-6">
<select id="supplierCode" name="supplierCode" class="form-control">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款方:</label>
<div class="col-sm-6">
<input name="corporatePayee" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款账户:</label>
<div class="col-sm-6">
<input name="corporateReceivingAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公开户行:</label>
<div class="col-sm-6">
<input name="publicAccountBanks" class="form-control" type="text">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="zozjVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_zozjVerifyApproved" id="zozjVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</form>
<!-- <div class="container">-->
<!-- <div class="form-row">-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <span>选择报销分类信息</span>-->
<!-- <a class="btn btn-success" onclick="insertRow()">-->
<!-- <i class="fa fa-plus"></i> 添加报销-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12 select-table table-striped">-->
<!-- <table id="bootstrap-sub-table-expense-zozj"></table>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/requisitioning";
$("#form-requisitioning-zozj-audit").validate({focusCleanup: true});
var prefix = ctx + "system/baseExpense";
var taskId = [[${taskId}]];
$("#form-baseExpense-zozj").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-expense-zozj',
url: ctx + "system/expenseChild/list",
queryParams: function(params) {
return {
expenseCode: $("#expenseCode").val()
};
},
pagination: false,
sidePagination: "client",
model: "报销单数据",
editable: true,
columns: [
{checkbox: true},
{title: '主键',field: 'index',visible: false,
formatter: function (value, row, index) {
return index;
}
},
{title: '报销单分项子表',field: 'expenseChildId',visible: false},
{title: '关联报销单号',field: 'expenseCode',visible: false},
{title: '成本类型',field: 'costType',
formatter:function (value, row, index) {
return costTypeFormatter(value,row,index);
}
},
{title: '成本小类',field: 'costSmallType',
formatter:function(value, row, index){
return getCostSmallType(value,row,index)
}
},
{title: '用途',field: 'purpose',editable:{type:'text',mode:'inline'}},
{title: '金额',field: 'amounts',editable: {type:'text',mode:'inline'}},
{title: '报销时间',field: 'expenseTime',editable:{type:'date',mode:'inline',}},
{title: '出差单号',field: 'evectionCode',editable: {type:'text',mode:'inline'}},
{title: '采购单号',field: 'purcahseCode',editable: {type:'text',mode:'inline',}},
{title: '委外单号',field: 'outsourceCode',editable: {type:'text',mode:'inline',}},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
};
$.table.init(options);
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-zozj-audit').serialize());
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseExpense-zozj').serialize());
}
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
// function getSelections(){
// $.ajax({
// url: ctx + "system/requisitioning/getEmpUserName",
// type: "get",
// dataType: "json",
// success: function (data) {
// $("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
// $("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
// $("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
// }
// });
//
// }
</script>
</body>
</html>

78
ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxjlVerify.html

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('报销人上级经理审核出差单')" />
<th:block th:include="include :: header('报销人上级经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-baseExpense-bxjl-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{expenseId}" type="hidden">
<form class="form-horizontal m" id="form-baseExpense-bxjl" th:object="${formData}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
@ -56,7 +56,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
<select name="fullName" th:field="*{fullName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
@ -102,29 +102,41 @@
</div>
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报销分类信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加报销
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense-bxjl"></table>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="bxjlVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_bxjlVerifyApproved" id="bxjlVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</div>
</form>
<!-- <div class="container">-->
<!-- <div class="form-row">-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <span>选择报销分类信息</span>-->
<!-- <a class="btn btn-success" onclick="insertRow()">-->
<!-- <i class="fa fa-plus"></i> 添加报销-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12 select-table table-striped">-->
<!-- <table id="bootstrap-sub-table-expense-bxjl"></table>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/baseExpense";
var taskId = [[${taskId}]];
$("#form-baseExpense-bxjl-audit").validate({focusCleanup: true});
$("#form-baseExpense-bxjl").validate({focusCleanup: true});
$(function() {
var options = {
@ -177,22 +189,22 @@
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgjl-audit').serialize());
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseExpense-bxjl').serialize());
}
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
// function getSelections(){
// $.ajax({
// url: ctx + "system/requisitioning/getEmpUserName",
// type: "get",
// dataType: "json",
// success: function (data) {
// $("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
// $("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
// $("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
// }
// });
//
// }
</script>
</body>
</html>

126
ruoyi-admin/src/main/resources/templates/system/baseExpense/taskbxzgVerify.html

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('报销人上级经理审核出差单')" />
<th:block th:include="include :: header('报销人上级经理审核')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-requisitioning-qgjl-audit" th:object="${formData}">
<input name="requisitioningId" th:field="*{requisitioningId}" type="hidden">
<form class="form-horizontal m" id="form-baseExpense-bxzg" th:object="${formData}">
<input name="expenseId" th:field="*{expenseId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
@ -36,9 +36,9 @@
</div>
</div>
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">请购单号:</label>
<label class="col-sm-3 control-label">报销单号:</label>
<div class="col-sm-8">
<input name="code" th:field="*{requisitioningCode}" class="form-control" type="text">
<input name="expenseCode" th:field="*{expenseCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@ -56,41 +56,91 @@
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-8">
<select name="userName" th:field="*{userName}" class="form-control"></select>
<select name="fullName" th:field="*{fullName}" class="form-control"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="correlationCode" th:field="*{correlationCode}" class="form-control" type="text">
<label class="col-sm-6 control-label">报销方式:</label>
<div class="col-sm-6">
<select id="bxjl_expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" onchange="handleExpenseMethod(this)" class="form-control" th:with="dictList=${@dict.getType('sys_base_expense_method')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
<div id="bxjl_expenseMethodModal" class="container" style="display: none">
<div class="form-group">
<label class="col-sm-6 control-label">是否是委外/采购采销:</label>
<div class="col-sm-6">
<select name="isPurchaseOutsource" class="form-control" th:with="dictList=${@dict.getType('sys_whether')}">
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">供应商ID:</label>
<div class="col-sm-6">
<select id="supplierCode" name="supplierCode" class="form-control">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款方:</label>
<div class="col-sm-6">
<input name="corporatePayee" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公收款账户:</label>
<div class="col-sm-6">
<input name="corporateReceivingAccount" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label">对公开户行:</label>
<div class="col-sm-6">
<input name="publicAccountBanks" class="form-control" type="text">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-expense_bxzg"></table>
<div class="form-group">
<label class="col-sm-3 control-label is-required" for="bxzgVerifyApproved">审批意见:</label>
<div class="col-sm-6">
<select name="p_B_bxzgVerifyApproved" id="bxzgVerifyApproved" class="form-control" required>
<option value=""></option>
<option value="true">同意</option>
<option value="false">拒绝</option>
</select>
</div>
</div>
</div>
</form>
<!-- <div class="container">-->
<!-- <div class="form-row">-->
<!-- <div class="btn-group-sm" id="toolbar" role="group">-->
<!-- <span>选择报销分类信息</span>-->
<!-- <a class="btn btn-success" onclick="insertRow()">-->
<!-- <i class="fa fa-plus"></i> 添加报销-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12 select-table table-striped">-->
<!-- <table id="bootstrap-sub-table-expense-bxzg"></table>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "system/requisitioning";
var prefix = ctx + "system/baseExpense";
var taskId = [[${taskId}]];
$("#form-requisitioning-qgjl-audit").validate({focusCleanup: true});
$("#form-baseExpense-bxzg").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-expense_bxzg',
id:'bootstrap-sub-table-expense-bxzg',
url: ctx + "system/expenseChild/list",
queryParams: function(params) {
return {
@ -139,22 +189,22 @@
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/complete/"+taskId, $('#form-requisitioning-qgjl-audit').serialize());
$.operate.save(prefix + "/complete/"+taskId, $('#form-baseExpense-bxzg').serialize());
}
}
function getSelections(){
$.ajax({
url: ctx + "system/requisitioning/getEmpUserName",
type: "get",
dataType: "json",
success: function (data) {
$("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
$("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
$("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
}
});
}
// function getSelections(){
// $.ajax({
// url: ctx + "system/requisitioning/getEmpUserName",
// type: "get",
// dataType: "json",
// success: function (data) {
// $("select[name='deptName']").append($('<option></option>').val(data.deptName).html(data.deptName));
// $("select[name='evectionBy']").append($('<option></option>').val(data.userName).html(data.userName));
// $("select[name='postName']").append($('<option></option>').val(data.postName).html(data.postName));
// }
// });
//
// }
</script>
</body>
</html>
Loading…
Cancel
Save