diff --git a/README.md b/README.md index a4fe06956267128024397c991070fed0b05ac81a..b006a907fe0cd0203883566b9f79222b8333df6a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ 智能办公OA系统[SpringBoot2-快速开发平台],适用于医院,学校,中小型企业等机构的管理。包含文件在线操作、工作日志、多班次考勤、CRM、ERP进销存、项目管理、EHR、拖拽式生成问卷、日程、笔记、工作计划、行政办公、薪资模块、动态表单、知识库、公告模块、企业论坛、云售后模块、生产模块、系统模块化同步模块等多种复杂业务功能。 -[近期更新内容](https://mp.weixin.qq.com/s/vdh7-hTAST0IefZdxBEozA) +- [近期更新内容](https://mp.weixin.qq.com/s/MrA4tX-5wtn4-mB_RZWbxw) +- [上期更新内容](https://mp.weixin.qq.com/s/vdh7-hTAST0IefZdxBEozA) # 开源版请下载`master`分支 # 开源版请下载`master`分支 diff --git a/admin-assistant/src/main/resources/template/js/assetArticlesPurchase/assetArticlesPurchaseList.js b/admin-assistant/src/main/resources/template/js/assetArticlesPurchase/assetArticlesPurchaseList.js index 5c51ae824c0d7e97a571c950acfbdf88cb343e84..3b4c7fe260f0e0c954b3a24a057d313420f79740 100644 --- a/admin-assistant/src/main/resources/template/js/assetArticlesPurchase/assetArticlesPurchaseList.js +++ b/admin-assistant/src/main/resources/template/js/assetArticlesPurchase/assetArticlesPurchaseList.js @@ -42,19 +42,7 @@ layui.config({ return '' + d.processInstanceId + ''; }}, { field: 'stateName', title: '状态', width: 90, templet: function(d){ - if(d.state == '0'){ - return "" + d.stateName + ""; - }else if(d.state == '1'){ - return "" + d.stateName + ""; - }else if(d.state == '2'){ - return "" + d.stateName + ""; - }else if(d.state == '3'){ - return "" + d.stateName + ""; - }else if(d.state == '4'){ - return "" + d.stateName + ""; - }else if(d.state == '5'){ - return "" + d.stateName + ""; - } + return activitiUtil.showStateName2(d.state, 1); }}, { field: 'createTime', title: '创建时间', width: 150}, { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#caigouTableBar'} diff --git a/erp/src/main/resources/template/js/otheroutlets/otheroutletsdetails.js b/erp/src/main/resources/template/js/otheroutlets/otheroutletsdetails.js index 5f9d46b2fcbfe2db9b1eafcd7327c8a418c53563..46526a473f533a91dc1219ec5c6b7e0230e7b27d 100644 --- a/erp/src/main/resources/template/js/otheroutlets/otheroutletsdetails.js +++ b/erp/src/main/resources/template/js/otheroutlets/otheroutletsdetails.js @@ -25,7 +25,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/otheroutlets/otheroutletslist.js b/erp/src/main/resources/template/js/otheroutlets/otheroutletslist.js index c9278447b5f19f333b15d15847b895a1bcf4c841..a6ab56ec6423921952988264c939835f4e9ebf0f 100644 --- a/erp/src/main/resources/template/js/otheroutlets/otheroutletslist.js +++ b/erp/src/main/resources/template/js/otheroutlets/otheroutletslist.js @@ -38,7 +38,7 @@ layui.config({ { field: 'supplierName', title: '客户', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'operPersonName', title: '操作人', align: 'left', rowspan: '2', width: 100}, diff --git a/erp/src/main/resources/template/js/otherwarehous/otherwarehousdetails.js b/erp/src/main/resources/template/js/otherwarehous/otherwarehousdetails.js index b663b94fdc1b5fc3036ab5aeef48d843ad5715f9..f68ae2f8baa7bb3a1e58bd7ffe8f1318e95c9c38 100644 --- a/erp/src/main/resources/template/js/otherwarehous/otherwarehousdetails.js +++ b/erp/src/main/resources/template/js/otherwarehous/otherwarehousdetails.js @@ -25,7 +25,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/otherwarehous/otherwarehouslist.js b/erp/src/main/resources/template/js/otherwarehous/otherwarehouslist.js index fa389a4d61038d698deb040ad22450b78d0495c6..3adac9723b98aa2e82430b937de448aad75e3139 100644 --- a/erp/src/main/resources/template/js/otherwarehous/otherwarehouslist.js +++ b/erp/src/main/resources/template/js/otherwarehous/otherwarehouslist.js @@ -38,7 +38,7 @@ layui.config({ { field: 'supplierName', title: '供应商', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'operPersonName', title: '操作人', align: 'left', rowspan: '2', width: 100}, diff --git a/erp/src/main/resources/template/js/purchaseorder/purchaseOrderDetails.js b/erp/src/main/resources/template/js/purchaseorder/purchaseOrderDetails.js index de1f95609c0caf9d7c92fbf7fc9006d988e1eb9c..7a4c6b778c20ca4a31aedca91f372393378e5c3e 100644 --- a/erp/src/main/resources/template/js/purchaseorder/purchaseOrderDetails.js +++ b/erp/src/main/resources/template/js/purchaseorder/purchaseOrderDetails.js @@ -24,7 +24,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); $("#contentIframe").attr("src", "../../tpl/erpcommon/erpOrderFlowLine.html?rowId=" + json.bean.id + "&type=4"); diff --git a/erp/src/main/resources/template/js/purchaseorder/purchaseorderlist.js b/erp/src/main/resources/template/js/purchaseorder/purchaseorderlist.js index 68830345bcc5d72b96900f81a9c8b25d80ae4085..918d99bfb3af166795b6b316b7a9fccf30d7baca 100644 --- a/erp/src/main/resources/template/js/purchaseorder/purchaseorderlist.js +++ b/erp/src/main/resources/template/js/purchaseorder/purchaseorderlist.js @@ -46,7 +46,7 @@ layui.config({ { field: 'supplierName', title: '供应商', rowspan: '2', align: 'left', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', rowspan: '2', align: 'left', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'left', width: 120}, { field: 'operPersonName', title: '操作人', rowspan: '2', align: 'left', width: 100}, diff --git a/erp/src/main/resources/template/js/purchaseput/purchaseputdetails.js b/erp/src/main/resources/template/js/purchaseput/purchaseputdetails.js index 09cb6de605a99e5b250425fe91372936765d41f2..6cf33837d52071b0cec4b589072c06903a34e79d 100644 --- a/erp/src/main/resources/template/js/purchaseput/purchaseputdetails.js +++ b/erp/src/main/resources/template/js/purchaseput/purchaseputdetails.js @@ -25,7 +25,7 @@ layui.config({ } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); var str = '无'; var defaultNumber = json.bean.defaultNumber; diff --git a/erp/src/main/resources/template/js/purchaseput/purchaseputlist.js b/erp/src/main/resources/template/js/purchaseput/purchaseputlist.js index 91b69c19011d63d1fc92e24d491023beb57e7800..6dbe8eb4edb65b72487023db167a1d97f8198646 100644 --- a/erp/src/main/resources/template/js/purchaseput/purchaseputlist.js +++ b/erp/src/main/resources/template/js/purchaseput/purchaseputlist.js @@ -49,7 +49,7 @@ layui.config({ { field: 'supplierName', title: '供应商', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'taxMoney', title: '含税合计', align: 'left', rowspan: '2', width: 120 }, diff --git a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsdetails.js b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsdetails.js index 3ee0a288e60c223c837af6f68e36f98db38c2047..d2bfaaf0725921143d3fcbb590eafcf728c802f8 100644 --- a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsdetails.js +++ b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsdetails.js @@ -25,7 +25,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/purchasereturns/purchasereturnslist.js b/erp/src/main/resources/template/js/purchasereturns/purchasereturnslist.js index 12653964cfccaa1a7c213cc3bc28028f711fb7d4..408bf6f207d3226f34b612cc1fca0ee9cedec68d 100644 --- a/erp/src/main/resources/template/js/purchasereturns/purchasereturnslist.js +++ b/erp/src/main/resources/template/js/purchasereturns/purchasereturnslist.js @@ -39,7 +39,7 @@ layui.config({ { field: 'supplierName', title: '供应商', rowspan: '2', align: 'left', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'taxMoney', title: '含税合计', align: 'left', rowspan: '2', width: 120 }, diff --git a/erp/src/main/resources/template/js/retailoutlet/retailoutletdetails.js b/erp/src/main/resources/template/js/retailoutlet/retailoutletdetails.js index 8902b00ca511a44ff291bdb6e6508f5de402522f..e706c6daf7ce4b7eb6ca38feca74b5d1c3903588 100644 --- a/erp/src/main/resources/template/js/retailoutlet/retailoutletdetails.js +++ b/erp/src/main/resources/template/js/retailoutlet/retailoutletdetails.js @@ -25,7 +25,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/retailoutlet/retailoutletlist.js b/erp/src/main/resources/template/js/retailoutlet/retailoutletlist.js index d610a6b0e4cca6602243ab724a93c07014a83b0b..b7b76c3699abf3dd834482bbf65fee67d5433906 100644 --- a/erp/src/main/resources/template/js/retailoutlet/retailoutletlist.js +++ b/erp/src/main/resources/template/js/retailoutlet/retailoutletlist.js @@ -38,7 +38,7 @@ layui.config({ { field: 'supplierName', title: '会员', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'changeAmount', title: '收款', align: 'left', rowspan: '2', width: 120 }, diff --git a/erp/src/main/resources/template/js/retailreturns/retailReturnsDetails.js b/erp/src/main/resources/template/js/retailreturns/retailReturnsDetails.js index 8965d1ac2b73b92d24b1f54d33e78f4d2b5f7794..b6ed22a38ffbc36a6f612a05658cdf6633bfa8e1 100644 --- a/erp/src/main/resources/template/js/retailreturns/retailReturnsDetails.js +++ b/erp/src/main/resources/template/js/retailreturns/retailReturnsDetails.js @@ -24,7 +24,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/retailreturns/retailreturnslist.js b/erp/src/main/resources/template/js/retailreturns/retailreturnslist.js index 0992a59d6ed4db1c6b1fc15094976528ed17ede3..00016cdd26acf37496316568c5a457bc56bd7f54 100644 --- a/erp/src/main/resources/template/js/retailreturns/retailreturnslist.js +++ b/erp/src/main/resources/template/js/retailreturns/retailreturnslist.js @@ -38,7 +38,7 @@ layui.config({ { field: 'supplierName', title: '会员', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'changeAmount', title: '退款', align: 'left', rowspan: '2', width: 120 }, diff --git a/erp/src/main/resources/template/js/salesorder/salesorderdetails.js b/erp/src/main/resources/template/js/salesorder/salesorderdetails.js index 6d9c18474adcd9471188f27a590a74845ae83f5c..baea0c1d8c4cfa3506834927e6771ba1e08887ba 100644 --- a/erp/src/main/resources/template/js/salesorder/salesorderdetails.js +++ b/erp/src/main/resources/template/js/salesorder/salesorderdetails.js @@ -28,7 +28,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); $("#contentIframe").attr("src", "../../tpl/erpcommon/erpOrderFlowLine.html?rowId=" + json.bean.id + "&type=1"); diff --git a/erp/src/main/resources/template/js/salesorder/salesorderlist.js b/erp/src/main/resources/template/js/salesorder/salesorderlist.js index 303ecf58e437b181a1fdb00ed805b2a0bcd1e30d..067ff923369f462f904ab31e8bc84090336e7d1d 100644 --- a/erp/src/main/resources/template/js/salesorder/salesorderlist.js +++ b/erp/src/main/resources/template/js/salesorder/salesorderlist.js @@ -38,7 +38,7 @@ layui.config({ { field: 'supplierName', title: '客户', rowspan: '2', align: 'left', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'operPersonName', title: '操作人', align: 'left', rowspan: '2', width: 100}, diff --git a/erp/src/main/resources/template/js/salesoutlet/salesoutletdetails.js b/erp/src/main/resources/template/js/salesoutlet/salesoutletdetails.js index d2e6e92d3f48fc359ff1376fb19cd403f448b9da..93151c006200cb8d4e7a6435caf951fbbcfa6483 100644 --- a/erp/src/main/resources/template/js/salesoutlet/salesoutletdetails.js +++ b/erp/src/main/resources/template/js/salesoutlet/salesoutletdetails.js @@ -24,7 +24,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); var str = '无'; var defaultNumber = json.bean.defaultNumber; diff --git a/erp/src/main/resources/template/js/salesoutlet/salesoutletlist.js b/erp/src/main/resources/template/js/salesoutlet/salesoutletlist.js index a4ef5d2b329e092255770737afec76a5d0fe9268..ae2dc94b80edffeaf3e709829269422b28adb759 100644 --- a/erp/src/main/resources/template/js/salesoutlet/salesoutletlist.js +++ b/erp/src/main/resources/template/js/salesoutlet/salesoutletlist.js @@ -42,7 +42,7 @@ layui.config({ { field: 'supplierName', title: '客户', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'taxMoney', title: '含税合计', align: 'left', rowspan: '2', width: 120 }, diff --git a/erp/src/main/resources/template/js/salesreturns/salesReturnsDetails.js b/erp/src/main/resources/template/js/salesreturns/salesReturnsDetails.js index 5b695b02d240c2f08babf70a5a70abefc9404492..35a038c19abc77351f78da99e8ea5cc67062c40f 100644 --- a/erp/src/main/resources/template/js/salesreturns/salesReturnsDetails.js +++ b/erp/src/main/resources/template/js/salesreturns/salesReturnsDetails.js @@ -25,7 +25,7 @@ layui.config({ winui.window.msg(data.returnMessage, {icon: 2, time: 2000}); } }, async: false}); - $("#statusName").html(erpOrderUtil.showStateName(json.bean.state, json.bean.submitType)); + $("#statusName").html(activitiUtil.showStateName(json.bean.state, json.bean.submitType)); // 加载动态表单 dsFormUtil.loadPageShowDetailsByObjectId("dsFormShow", json.bean.id); diff --git a/erp/src/main/resources/template/js/salesreturns/salesreturnslist.js b/erp/src/main/resources/template/js/salesreturns/salesreturnslist.js index 2e17f8ec3e84044540c8eee8775558c336b8c2f5..204ef684a0921c1921ea99624a6b7427bd371216 100644 --- a/erp/src/main/resources/template/js/salesreturns/salesreturnslist.js +++ b/erp/src/main/resources/template/js/salesreturns/salesreturnslist.js @@ -47,7 +47,7 @@ layui.config({ { field: 'supplierName', title: '客户', align: 'left', rowspan: '2', width: 150}, { title: '审批模式', align: 'center', colspan: '2'}, { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ - return erpOrderUtil.showStateName(d.state, d.submitType); + return activitiUtil.showStateName(d.state, d.submitType); }}, { field: 'totalPrice', title: '合计金额', align: 'left', rowspan: '2', width: 120}, { field: 'taxMoney', title: '含税合计', align: 'left', rowspan: '2', width: 120 }, diff --git a/ifs/src/main/resources/template/js/income/incomeAdd.js b/ifs/src/main/resources/template/js/income/incomeAdd.js index 9827b01a8e91bdf1caffc98ac4de73499ea88296..0fe8bd53da8db13a4d9d3fd6ac4d5bedd631e42d 100644 --- a/ifs/src/main/resources/template/js/income/incomeAdd.js +++ b/ifs/src/main/resources/template/js/income/incomeAdd.js @@ -12,10 +12,12 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$, laydate = layui.laydate; - layedit = layui.layedit, form = layui.form; + // 获取单据提交类型 + var submitType = erpOrderUtil.getSubmitTypeByOrderType(systemOrderType["incomeOrder"]["orderType"]); + var selOption = getFileContent('tpl/template/select-option.tpl'); var handsPersonList = new Array();//经手人员 @@ -38,35 +40,73 @@ layui.config({ matchingLanguage(); form.render(); + // 保存为草稿 form.on('submit(formAddBean)', function(data) { if(winui.verifyForm(data.elem)) { - var result = voucherUtil.getData(); - console.log(result); - if(result.length < 2){ - return false; - } - var params = { - organId: sysCustomerUtil.customerMation.id, - handsPersonId: handsPersonList[0].id, - operTime: $("#operTime").val(), - accountId: $("#accountId").val(), - remark: $("#remark").val(), - changeAmount: $("#changeAmount").val(), - initemStr: JSON.stringify(result) - }; - AjaxPostUtil.request({url: reqBasePath + "income002", params: params, type: 'json', method: "POST", callback: function(json) { - if(json.returnCode == 0) { - dsFormUtil.savePageData("dsFormShow", json.bean.id); - parent.layer.close(index); - parent.refreshCode = '0'; - } else { - winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); - } - }}); + saveData("1", ""); } return false; }); + // 走工作流的提交审批 + form.on('submit(formSubOneBean)', function(data) { + if(winui.verifyForm(data.elem)) { + activitiUtil.startProcess(sysActivitiModel["incomeOrder"]["key"], function (approvalId) { + saveData("2", approvalId); + }); + } + return false; + }); + + // 不走工作流的提交 + form.on('submit(formSubTwoBean)', function(data) { + if(winui.verifyForm(data.elem)) { + saveData("2", ""); + } + return false; + }); + + function saveData(subType, approvalId){ + var result = voucherUtil.getData(); + if(result.length < 2){ + return false; + } + var params = { + organType: $("#correspondentUnitType").val(), + organId: getOrganId(), + type: dsFormUtil.dsFormObjectRelationChoose.id, + handsPersonId: handsPersonList[0].id, + operTime: $("#operTime").val(), + accountId: $("#accountId").val(), + remark: $("#remark").val(), + setOfBooksId: sysIfsUtil.ifsSetOfBooksMation.id, + initemStr: JSON.stringify(result), + submitType: submitType, + subType: subType, + approvalId: approvalId + }; + AjaxPostUtil.request({url: reqBasePath + "income002", params: params, type: 'json', method: "POST", callback: function(json) { + if(json.returnCode == 0) { + dsFormUtil.savePageData("dsFormShow", json.bean.id); + parent.layer.close(index); + parent.refreshCode = '0'; + } else { + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + } + + function getOrganId(){ + var correspondentUnitType = $("#correspondentUnitType").val(); + if(correspondentUnitType == 1){ + // 供应商 + return sysSupplierUtil.supplierMation.id; + } else if (correspondentUnitType == 2){ + // 客户 + return sysCustomerUtilcustomerMation; + } + } + // 往来单位变化监听 form.on('select(correspondentUnitType)', function(data){ $("#customName").val(""); diff --git a/ifs/src/main/resources/template/js/income/incomeList.js b/ifs/src/main/resources/template/js/income/incomeList.js index c56faef88b3202a2e20e1dfe4101849300e44dae..79fecc4cfc715605cdbfbd30698956b0007f4118 100644 --- a/ifs/src/main/resources/template/js/income/incomeList.js +++ b/ifs/src/main/resources/template/js/income/incomeList.js @@ -34,15 +34,29 @@ layui.config({ limits: getLimits(), limit: getLimit(), cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, - { field: 'billNo', title: '单据编号', align: 'left', width: 200, templet: function(d){ - return '' + d.billNo + ''; - }}, - { field: 'customerName', title: '往来单位', align: 'left', width: 150}, - { field: 'totalPrice', title: '合计金额', align: 'left', width: 120}, - { field: 'hansPersonName', title: '经手人', align: 'left', width: 100}, - { field: 'billTime', title: '单据日期', align: 'center', width: 140 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} + { title: systemLanguage["com.skyeye.serialNumber"][languageType], rowspan: '2', type: 'numbers'}, + { field: 'billNo', title: '单据编号', align: 'left', rowspan: '2', width: 200, templet: function(d){ + return '' + d.billNo + ''; + }}, + { title: '审批模式', align: 'center', colspan: '2'}, + { field: 'state', title: '状态', align: 'left', rowspan: '2', width: 80, templet: function(d){ + return activitiUtil.showStateName2(d.state, d.submitType); + }}, + { field: 'organTypeName', title: '往来单类型', rowspan: '2', align: 'left', width: 100}, + { field: 'supplierName', title: '往来单位', rowspan: '2', align: 'left', width: 150}, + { field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'left', width: 120}, + { field: 'handsPersonName', title: '经手人', rowspan: '2', align: 'left', width: 120}, + { field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 }, + { field: 'userName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 110 }, + { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 }, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', rowspan: '2', align: 'center', width: 200, toolbar: '#tableBar'} + ],[ + { field: 'submitType', title: '提交模式', align: 'left', width: 120, templet: function(d){ + return erpOrderUtil.getSubmitTypeName(d); + }}, + { field: 'processInstanceId', title: '流程实例id', align: 'left', width: 120, templet: function(d){ + return erpOrderUtil.getProcessInstanceIdBySubmitType(d); + }} ]], done: function(){ matchingLanguage(); @@ -59,6 +73,14 @@ layui.config({ details(data); }else if (layEvent === 'edit') { //编辑 edit(data); + }else if (layEvent === 'submitToSave') { //提交 + subExamine(data, 'submitToSave'); + }else if (layEvent === 'subExamine') { //提交审核 + subExamine(data, 'subExamine'); + }else if (layEvent === 'activitiProcessDetails') { // 工作流流程详情查看 + activitiUtil.activitiDetails(data); + }else if (layEvent === 'revoke') { //撤销 + revorke(data); } }); @@ -80,13 +102,13 @@ layui.config({ if(treeNode == undefined) { orderType = ""; } else { - if(treeNode.isParent != 0){ + if(treeNode.id != 0 && treeNode.isParent != 0){ return; } // 订单类型 - orderType = treeNode.id; + orderType = treeNode.id == 0 ? "" : treeNode.id; } - loadTable(); + refreshTable(); } /********* tree 处理 end *************/ @@ -134,6 +156,55 @@ layui.config({ }}); } + // 撤销用品采购 + function revorke(data){ + layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) { + layer.close(index); + AjaxPostUtil.request({url: reqBasePath + "", params: {processInstanceId: data.processInstanceId}, type: 'json', callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadCaigouTable(); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + }); + } + + // 提交数据 + function subExamine(data, type){ + layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) { + layer.close(index); + if(type == 'submitToSave'){ + // 直接提交 + var params = { + rowId: data.id, + approvalId: "" + }; + subToData(params); + }else{ + // 工作流提交 + activitiUtil.startProcess(sysActivitiModel["incomeOrder"]["key"], function (approvalId) { + var params = { + rowId: data.id, + approvalId: approvalId + }; + subToData(params); + }); + } + }); + } + function subToData(params){ + AjaxPostUtil.request({url: reqBasePath + "", params: params, type: 'json', callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg("提交成功", {icon: 1, time: 2000}); + loadCaigouTable(); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }}); + } + // 添加 $("body").on("click", "#addBean", function(){ _openNewWindows({ @@ -191,7 +262,7 @@ layui.config({ } return { billNo: $("#billNo").val(), - orderType: orderType, + type: orderType, startTime: startTime, endTime: endTime }; diff --git a/ifs/src/main/resources/template/tpl/income/incomeAdd.html b/ifs/src/main/resources/template/tpl/income/incomeAdd.html index 439373bec81d947a35304985ce9beef501dc8321..a108049eadadf86b23e6f609915b2feb34408f6b 100644 --- a/ifs/src/main/resources/template/tpl/income/incomeAdd.html +++ b/ifs/src/main/resources/template/tpl/income/incomeAdd.html @@ -83,8 +83,10 @@
- - + + + +
diff --git a/ifs/src/main/resources/template/tpl/income/incomeList.html b/ifs/src/main/resources/template/tpl/income/incomeList.html index 10fd5634f3f9bb92a48ac8d37c4f6800f98d8971..5748227c1dad2f392dfe15d3c97407ec53f93b1b 100644 --- a/ifs/src/main/resources/template/tpl/income/incomeList.html +++ b/ifs/src/main/resources/template/tpl/income/incomeList.html @@ -46,11 +46,38 @@ diff --git a/web/src/main/resources/template/assets/lib/layui/customer/activitiUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/activitiUtil.js index a10df0163be7da2ed421bc93dd26e1d44614dfd0..3419ed2bb61fc13b5ca85e01aa29bcf9c6d239b3 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/activitiUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/activitiUtil.js @@ -312,6 +312,66 @@ var activitiUtil = { }); }); - } + }, + + showStateName: function (state, submitType){ + if(submitType == 1){ + if(state == '0'){ + return "未审核"; + }else if(state == '1'){ + return "审核中"; + }else if(state == '2'){ + return "审核通过"; + }else if(state == '3'){ + return "拒绝通过"; + }else if(state == '4'){ + return "已完成"; + }else if(state == '5'){ + return "撤销"; + }else{ + return "参数错误"; + } + } else if(submitType == 2){ + if(state == '0'){ + return "未提交"; + }else if(state == '2'){ + return "已提交"; + }else if(state == '4'){ + return "已完成"; + }else{ + return "参数错误"; + } + } + }, + + showStateName2: function (state, submitType){ + if(submitType == 1){ + if(state == '0'){ + return "草稿"; + }else if(state == '1'){ + return "审核中"; + }else if(state == '2'){ + return "审核通过"; + }else if(state == '3'){ + return "拒绝通过"; + }else if(state == '4'){ + return "作废"; + }else if(state == '5'){ + return "撤销"; + }else{ + return "参数错误"; + } + } else if(submitType == 2){ + if(state == '0'){ + return "草稿"; + }else if(state == '2'){ + return "已提交"; + }else if(state == '4'){ + return "作废"; + }else{ + return "参数错误"; + } + } + }, }; \ No newline at end of file diff --git a/web/src/main/resources/template/assets/lib/layui/customer/erpOrderUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/erpOrderUtil.js index 17829ea5870424edd8d10c5c431664d4d7511637..21d6816b8930268e95440ca4cd057fb4321fc881 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/erpOrderUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/erpOrderUtil.js @@ -201,36 +201,6 @@ var erpOrderUtil = { return ''; }, - showStateName: function (state, submitType){ - if(submitType == 1){ - if(state == '0'){ - return "未审核"; - }else if(state == '1'){ - return "审核中"; - }else if(state == '2'){ - return "审核通过"; - }else if(state == '3'){ - return "拒绝通过"; - }else if(state == '4'){ - return "已完成"; - }else if(state == '5'){ - return "撤销"; - }else{ - return "参数错误"; - } - } else if(submitType == 2){ - if(state == '0'){ - return "未提交"; - }else if(state == '2'){ - return "已提交"; - }else if(state == '4'){ - return "已完成"; - }else{ - return "参数错误"; - } - } - }, - /** * 获取所有仓库信息 * diff --git a/web/src/main/resources/template/assets/lib/layui/customer/voucher/voucherUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/voucher/voucherUtil.js index e1363f435305197cc61153e8064930fe831cab92..e4877ba06cf7400163f45226c679710b6efcc435 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/voucher/voucherUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/voucher/voucherUtil.js @@ -194,12 +194,14 @@ var voucherUtil = { winui.window.msg("借方金额和贷方金额最少填写一项.", {icon: 2, time: 2000}); return false; } + var eachAmount = isNull(debiteMoney) ? creditMoney : debiteMoney; + var directionType = isNull(debiteMoney) ? 2 : 1; result.push({ remark: _this.find(".col_summary").find("textarea").val(), voucherId: _this.find(".col_voucher").find(".cell_val").attr("dataId"), subjectId: subjectId, - debiteMoney: debiteMoney, - creditMoney: creditMoney + eachAmount: eachAmount, + directionType: directionType }); }); return result; diff --git a/web/src/main/resources/template/json/activitiNameKey.json b/web/src/main/resources/template/json/activitiNameKey.json index 13531f719a5920e35b64223ef39f4a8207c49824..009be7132786a3a57ac95d93a2cce86245abf8a1 100644 --- a/web/src/main/resources/template/json/activitiNameKey.json +++ b/web/src/main/resources/template/json/activitiNameKey.json @@ -30,5 +30,7 @@ "assetManageReturn": {"name": "资产归还", "key": "../../tpl/assetManageReturn/assetManageReturnAdd.html", "complate": true}, "assetManagePurchase": {"name": "资产采购", "key": "../../tpl/assetManagePurchase/assetManagePurchaseAdd.html", "complate": true}, "assetArticlesUse": {"name": "用品领用", "key": "../../tpl/assetArticlesUse/assetArticlesUseAdd.html", "complate": true}, - "assetArticlesPurchase": {"name": "用品采购", "key": "../../tpl/assetArticlesPurchase/assetArticlesPurchaseAdd.html", "complate": true} + "assetArticlesPurchase": {"name": "用品采购", "key": "../../tpl/assetArticlesPurchase/assetArticlesPurchaseAdd.html", "complate": true}, + + "incomeOrder": {"name": "财务明细账", "key": "../../tpl/income/incomeAdd.html", "complate": true} } \ No newline at end of file diff --git a/web/src/main/resources/template/json/sysOrderType.json b/web/src/main/resources/template/json/sysOrderType.json index a79c0a778879bc8546af7a190d667fac899d17a4..5ed10b88cbfce49aa7e95a6f6d6e9d8a97267c09 100644 --- a/web/src/main/resources/template/json/sysOrderType.json +++ b/web/src/main/resources/template/json/sysOrderType.json @@ -20,10 +20,7 @@ "pickPicking": {"title": "领料单", "code": "LLDD", "orderType": 19}, "pickReplenishment": {"title": "补料单", "code": "BLDD", "orderType": 20}, "pickReturn": {"title": "退料单", "code": "TLDD", "orderType": 21}, - "expenditureOrder": {"title": "支出订单", "code": "CWZCDD", "orderType": 22}, - "incomeOrder": {"title": "收入订单", "code": "CWSRDD", "orderType": 23}, - "receivablesOrder": {"title": "收款订单", "code": "CWSKDD", "orderType": 24}, - "paymentOrder": {"title": "付款订单", "code": "CWFKDD", "orderType": 25}, - "transferOrder": {"title": "转账订单", "code": "CWZZDD", "orderType": 26}, - "advanceOrder": {"title": "收预付款", "code": "CWYFDD", "orderType": 27} + + "incomeOrder": {"title": "财务明细账", "code": "CWMXZ", "orderType": 22} + } \ No newline at end of file