From eee51e66d63951277637a956edaa8edd2582a485 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 16 Jan 2022 11:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=B4=A6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +- .../assetArticlesPurchaseList.js | 14 +-- .../js/otheroutlets/otheroutletsdetails.js | 2 +- .../js/otheroutlets/otheroutletslist.js | 2 +- .../js/otherwarehous/otherwarehousdetails.js | 2 +- .../js/otherwarehous/otherwarehouslist.js | 2 +- .../js/purchaseorder/purchaseOrderDetails.js | 2 +- .../js/purchaseorder/purchaseorderlist.js | 2 +- .../js/purchaseput/purchaseputdetails.js | 2 +- .../js/purchaseput/purchaseputlist.js | 2 +- .../purchasereturns/purchasereturnsdetails.js | 2 +- .../js/purchasereturns/purchasereturnslist.js | 2 +- .../js/retailoutlet/retailoutletdetails.js | 2 +- .../js/retailoutlet/retailoutletlist.js | 2 +- .../js/retailreturns/retailReturnsDetails.js | 2 +- .../js/retailreturns/retailreturnslist.js | 2 +- .../js/salesorder/salesorderdetails.js | 2 +- .../template/js/salesorder/salesorderlist.js | 2 +- .../js/salesoutlet/salesoutletdetails.js | 2 +- .../js/salesoutlet/salesoutletlist.js | 2 +- .../js/salesreturns/salesReturnsDetails.js | 2 +- .../js/salesreturns/salesreturnslist.js | 2 +- .../resources/template/js/income/incomeAdd.js | 88 ++++++++++++----- .../template/js/income/incomeList.js | 97 ++++++++++++++++--- .../template/tpl/income/incomeAdd.html | 6 +- .../template/tpl/income/incomeList.html | 37 ++++++- .../assets/lib/layui/customer/activitiUtil.js | 62 +++++++++++- .../assets/lib/layui/customer/erpOrderUtil.js | 30 ------ .../lib/layui/customer/voucher/voucherUtil.js | 6 +- .../template/json/activitiNameKey.json | 4 +- .../resources/template/json/sysOrderType.json | 9 +- 31 files changed, 278 insertions(+), 118 deletions(-) diff --git a/README.md b/README.md index a4fe06956..b006a907f 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 5c51ae824..3b4c7fe26 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 5f9d46b2f..46526a473 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 c9278447b..a6ab56ec6 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 b663b94fd..f68ae2f8b 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 fa389a4d6..3adac9723 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 de1f95609..7a4c6b778 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 68830345b..918d99bfb 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 09cb6de60..6cf33837d 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 91b69c190..6dbe8eb4e 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 3ee0a288e..d2bfaaf07 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 12653964c..408bf6f20 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 8902b00ca..e706c6daf 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 d610a6b0e..b7b76c369 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 8965d1ac2..b6ed22a38 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 0992a59d6..00016cdd2 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 6d9c18474..baea0c1d8 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 303ecf58e..067ff9233 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 d2e6e92d3..93151c006 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 a4ef5d2b3..ae2dc94b8 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 5b695b02d..35a038c19 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 2e17f8ec3..204ef684a 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 9827b01a8..0fe8bd53d 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 c56faef88..79fecc4cf 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 439373bec..a108049ea 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 @@