diff --git a/erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js b/erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js index 8f83f6eb5d439995b4992ab87fa69486f8803349..ed18df2fde6633122797f66c40373a4c9a665f61 100644 --- a/erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js +++ b/erp/src/main/resources/template/js/erpstatistics/incomingstatistics.js @@ -11,7 +11,6 @@ layui.config({ window: 'js/winui.window' }).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { winui.renderColor(); - var $ = layui.$, form = layui.form, laydate = layui.laydate, diff --git a/erp/src/main/resources/template/js/otherwarehous/otherwarehousadd.js b/erp/src/main/resources/template/js/otherwarehous/otherwarehousadd.js index 617611be93fd17e09079a195f8b4fef00bf2debb..7b230391a73a75d6697db2abe9946df83cb0b580 100644 --- a/erp/src/main/resources/template/js/otherwarehous/otherwarehousadd.js +++ b/erp/src/main/resources/template/js/otherwarehous/otherwarehousadd.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -121,10 +118,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if (isNull(supplierMation.id)) { - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if (rowTr.length == 0) { @@ -171,7 +164,7 @@ layui.config({ } var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -249,21 +242,8 @@ layui.config({ //供应商选择 $("body").on("click", "#supplierNameSel", function (e) { - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], { - icon: 2, - time: 2000 - }); - } - } + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); }); }); diff --git a/erp/src/main/resources/template/js/otherwarehous/otherwarehousedit.js b/erp/src/main/resources/template/js/otherwarehous/otherwarehousedit.js index 8a256fa476ad6fe021a90bfe037722112070f1d0..8d61a8bb90b81e9f19a059b9623bc2c22925917c 100644 --- a/erp/src/main/resources/template/js/otherwarehous/otherwarehousedit.js +++ b/erp/src/main/resources/template/js/otherwarehous/otherwarehousedit.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -63,7 +60,7 @@ layui.config({ submitType = json.bean.submitType; // 供应商信息赋值 - supplierMation = { + sysSupplierUtil.supplierMation = { id: json.bean.organId, supplierName: json.bean.supplierName } @@ -190,10 +187,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -240,7 +233,7 @@ layui.config({ } var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -317,20 +310,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchaseorder/purchaseorderadd.js b/erp/src/main/resources/template/js/purchaseorder/purchaseorderadd.js index d7ed3512bc29b4d657a86974dfec4ac26ef6a6d8..aae4877c3c3b1141174f1a7d31f1c77335213e2e 100644 --- a/erp/src/main/resources/template/js/purchaseorder/purchaseorderadd.js +++ b/erp/src/main/resources/template/js/purchaseorder/purchaseorderadd.js @@ -1,9 +1,6 @@ // 商品信息 var productMation = {}; -// 供应商信息 -var supplierMation = {}; - // 生产订单信息 var productionMation = {}; @@ -125,10 +122,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -174,7 +167,7 @@ layui.config({ } var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -252,20 +245,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchaseorder/purchaseorderedit.js b/erp/src/main/resources/template/js/purchaseorder/purchaseorderedit.js index 1cff361de39b086681505555bb41808d378bac56..ca789aff059119e404cf58ab82f018f6217249d8 100644 --- a/erp/src/main/resources/template/js/purchaseorder/purchaseorderedit.js +++ b/erp/src/main/resources/template/js/purchaseorder/purchaseorderedit.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //生产订单信息 var productionMation = {}; @@ -67,7 +64,7 @@ layui.config({ if(json.returnCode == 0) { submitType = json.bean.submitType; // 供应商信息赋值 - supplierMation = { + sysSupplierUtil.supplierMation = { id: json.bean.organId, supplierName: json.bean.supplierName } @@ -197,10 +194,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -246,7 +239,7 @@ layui.config({ } var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -325,20 +318,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchaseorder/purchaseorderpurchase.js b/erp/src/main/resources/template/js/purchaseorder/purchaseorderpurchase.js index 40e1c277603b93fff9e5bb13a307f51909db027c..e40de7013064b48d1a390cc3094b705a0c6b2501 100644 --- a/erp/src/main/resources/template/js/purchaseorder/purchaseorderpurchase.js +++ b/erp/src/main/resources/template/js/purchaseorder/purchaseorderpurchase.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -81,7 +78,7 @@ layui.config({ } //供应商信息赋值 - supplierMation = { + sysSupplierUtil.supplierMation = { id: json.bean.organId, supplierName: json.bean.supplierName } @@ -204,10 +201,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -272,7 +265,7 @@ layui.config({ }); var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -359,20 +352,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchaseput/purchaseputadd.js b/erp/src/main/resources/template/js/purchaseput/purchaseputadd.js index b2a7265831d48b1c988fee78e9953db746f67413..a294f5a615896c98b87fbe8682d540e6651e3135 100644 --- a/erp/src/main/resources/template/js/purchaseput/purchaseputadd.js +++ b/erp/src/main/resources/template/js/purchaseput/purchaseputadd.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -133,10 +130,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -197,7 +190,7 @@ layui.config({ }); var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -276,20 +269,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchaseput/purchaseputedit.js b/erp/src/main/resources/template/js/purchaseput/purchaseputedit.js index a7286bee98e012b54d8284297aaf6988ab6c7430..bab44956b7e6b414d235f349577143f848e2f01e 100644 --- a/erp/src/main/resources/template/js/purchaseput/purchaseputedit.js +++ b/erp/src/main/resources/template/js/purchaseput/purchaseputedit.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -72,7 +69,7 @@ layui.config({ submitType = json.bean.submitType; // 供应商信息赋值 - supplierMation = { + sysSupplierUtil.supplierMation = { id: json.bean.organId, supplierName: json.bean.supplierName } @@ -215,10 +212,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -279,7 +272,7 @@ layui.config({ }); var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -359,20 +352,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsadd.js b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsadd.js index 5aa671ecea927930c6f53cb6a25fe17afc42c8db..956cceddf5e4cdc3223a7c7be7e128db32ef9c1f 100644 --- a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsadd.js +++ b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsadd.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -135,10 +132,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -199,7 +192,7 @@ layui.config({ }); var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -280,18 +273,9 @@ layui.config({ //供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsedit.js b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsedit.js index 9e5c5f8f8bb0ed623d87767388f16d5cbe101159..852fe5c2bb697d7f4e62fb601ca15adbb3e210fe 100644 --- a/erp/src/main/resources/template/js/purchasereturns/purchasereturnsedit.js +++ b/erp/src/main/resources/template/js/purchasereturns/purchasereturnsedit.js @@ -1,9 +1,6 @@ //商品信息 var productMation = {}; -//供应商信息 -var supplierMation = {}; - //根据那一列的值进行变化,默认根据数量 var showTdByEdit = 'rkNum'; //表格的序号 @@ -74,7 +71,7 @@ layui.config({ submitType = json.bean.submitType; //供应商信息赋值 - supplierMation = { + sysSupplierUtil.supplierMation = { id: json.bean.organId, supplierName: json.bean.supplierName } @@ -210,10 +207,6 @@ layui.config({ }); function saveData(subType, approvalId){ - if(isNull(supplierMation.id)){ - winui.window.msg('请选择供应商.', {icon: 2, time: 2000}); - return false; - } //获取已选商品数据 var rowTr = $("#useTable tr"); if(rowTr.length == 0) { @@ -274,7 +267,7 @@ layui.config({ }); var params = { - supplierId: supplierMation.id, + supplierId: sysSupplierUtil.supplierMation.id, operTime: $("#operTime").val(), accountId: $("#accountId").val(), payType: $("#payType").val(), @@ -354,20 +347,11 @@ layui.config({ } } - //供应商选择 + // 供应商选择 $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择供应商", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); + sysSupplierUtil.openSysSupplierChoosePage(function (supplierMation){ + $("#supplierName").val(supplierMation.supplierName); + }); }); //商品选择 diff --git a/erp/src/main/resources/template/js/supplier/supplierChoose.js b/erp/src/main/resources/template/js/supplier/supplierChoose.js index 54a94a5c2497919a952524a3b5ef096deb48d615..c20e2a5c9a7b55384f85c508c6e1cff64e5fca78 100644 --- a/erp/src/main/resources/template/js/supplier/supplierChoose.js +++ b/erp/src/main/resources/template/js/supplier/supplierChoose.js @@ -6,10 +6,8 @@ layui.config({ }).extend({ window: 'js/winui.window' }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, form = layui.form, table = layui.table; @@ -51,7 +49,7 @@ layui.config({ form.render(); var id = JSON.stringify(dubClick.data('index')); var obj = res.rows[id]; - parent.supplierMation = obj; + parent.sysSupplierUtil.supplierMation = obj; parent.layer.close(index); parent.refreshCode = '0'; }); @@ -71,14 +69,28 @@ layui.config({ selectSupplier(data) } }); + + // 详情 + function selectSupplier(data){ + rowId = data.id; + _openNewWindows({ + url: "../../tpl/supplier/supplierinfo.html", + title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], + pageId: "supplierinfo", + area: ['90vw', '90vh'], + callBack: function(refreshCode){ + } + }); + } form.render(); - - - $("body").on("click", "#formSearch", function(){ - refreshTable(); + form.on('submit(formSearch)', function (data) { + if (winui.verifyForm(data.elem)) { + table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); + } + return false; }); - + $("body").on("click", "#reloadTable", function(){ loadTable(); }); @@ -87,23 +99,6 @@ layui.config({ table.reload("messageTable", {where: getTableParams()}); } - function refreshTable(){ - table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - //详情 - function selectSupplier(data){ - rowId = data.id; - _openNewWindows({ - url: "../../tpl/supplier/supplierinfo.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "supplierinfo", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - } - }); - } - function getTableParams(){ return { supplierName:$("#supplierName").val(), diff --git a/erp/src/main/resources/template/tpl/otherwarehous/otherwarehousadd.html b/erp/src/main/resources/template/tpl/otherwarehous/otherwarehousadd.html index 821d6fdf52a4c62a3ee92b0b96664b5df28c56f9..c93d5517dcc897f49b77b79d5a13d26a147139fd 100644 --- a/erp/src/main/resources/template/tpl/otherwarehous/otherwarehousadd.html +++ b/erp/src/main/resources/template/tpl/otherwarehous/otherwarehousadd.html @@ -12,7 +12,7 @@