From c6576d875f3f55813b2812d6dc37d87a045f8a6b Mon Sep 17 00:00:00 2001 From: pzy <2829717936@qq.com> Date: 星期一, 30 九月 2024 10:35:58 +0800 Subject: [PATCH] 1 --- WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html | 452 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 386 insertions(+), 66 deletions(-) diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html index 9f112df..1ac3614 100644 --- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html @@ -102,6 +102,8 @@ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-normal">鏅�氭潯鐮�</button>--> <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-box">鍐呭绠辨潯鐮�</button>--> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-add"><i class="layui-icon layui-icon-addition"></i>鎷嗗垎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_HideColumn"><i class="layui-icon layui-icon-addition"></i>鍒楄缃�</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-del"><i class="layui-icon layui-icon-subtraction"></i>鍒犺</button> </div> </script> </div> @@ -122,6 +124,7 @@ <script src="../../layuiadmin/Scripts/general.js"></script> <!--<script src="../../../../Scripts/jquery-1.8.2.js"></script>--> <script> + var HModName = "SRM_BarCodeBill"; function f_alert(sMsg) { layer.alert(sMsg, { icon: 5 }); //layer.open({ @@ -135,6 +138,60 @@ // } //}); } + + var option = { + cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true } + , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 } + , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true } + , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 } + , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 } + , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 } + , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true } + , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true } + , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 } + , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true } + , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" } + , { field: 'HMinQty', title: '鍐呯瑁呯鏁�', width: 100, edit: 'text', event: "inputHMinQty" } + , { field: 'HBQty', title: '鍐呯鏁�', width: 100 } + , { field: 'HWXQty', title: '澶栫瑁呯鏁�', width: 100, edit: 'text', event: "inputHWXQty" } + , { field: 'HWBQty', title: '澶栫鏁�', width: 100 } + , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true } + , { field: 'HMoney', title: '閲戦', width: 100, hide: true } + , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true } + , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' } + , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true } + , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true } + , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true } + , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate" + , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }// + , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate" + , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' } + , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' } + //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } + //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } + //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 } + , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 } + , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderDetaiLID ', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true } + , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true } + , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 } + , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 } + , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true } + , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true } + , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄� + ]] + }; function isPositiveIntegerTimes(x, y) { if (x > y) { var flag = x; @@ -234,6 +291,7 @@ var linterid = params[params[0]]; var lentryid = params[params[1]]; var type = params[params[2]]; + var mergeTags = params[params[3]]; //鍘熺敓鎴愭潯鐮佹柟娉�(閫佽揣鍗曢粯璁�) var mainUrl = "GetHBarCodeShowBillMain"; //琛ㄥご鏁版嵁鍔犺浇ajax var subUrl = "GetHBarCodeShowBillSub";//琛ㄤ綋鏁版嵁鍔犺浇ajax h_v_SRM_POInStockBillSub_ForWeb2 @@ -290,6 +348,68 @@ , laydate = layui.laydate , element = layui.element; //Tab鐨勫垏鎹㈠姛鑳斤紝鍒囨崲浜嬩欢鐩戝惉绛夛紝闇�瑕佷緷璧杄lement妯″潡 + var option; + + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , limit: 500 + , height: 500 + , loading: false + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true } + , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 } + , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true } + , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 } + , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 } + , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 } + , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true } + , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true } + , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 } + , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true } + , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" } + , { field: 'HMinQty', title: '鍐呯鍖呰鏁�', width: 100, edit: 'text', event: "inputHMinQty" } + , { field: 'HBQty', title: '鍐呯鏁�', width: 100 } + , { field: 'HWXQty', title: '澶栫鍖呰鏁�', width: 100, edit: 'text', event: "inputHWXQty" } + , { field: 'HWBQty', title: '澶栫鏁�', width: 100 } + , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true } + , { field: 'HMoney', title: '閲戦', width: 100, hide: true } + , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true } + , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' } + , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true } + , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true } + , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true } + , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate" + , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }// + , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate" + , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' } + , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' } + //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } + //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } + //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 } + , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 } + , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderDetaiLID ', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true } + , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true } + , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 } + , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 } + , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true } + , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true } + , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄� + + ]] + } + //鐢熸垚鍝佺鐮� form.on('submit(HBarcodeSaverPZ)', function (data) {//淇濆瓨 //debugger; @@ -322,7 +442,7 @@ , where: { sMsg: linterid } , cols: [[ // , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, sort: true, fixed: true edit: 'text', hide: true } - , { field: 'HItemID', title: 'HItemID', width: 100, hide: true } + { field: 'HItemID', title: 'HItemID', width: 100, hide: true } , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true } , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 200 } , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 200 } @@ -879,70 +999,123 @@ //} } }); - //杩涘叆椤甸潰鏌ヨ琛ㄤ綋鐗╂枡淇℃伅 - layer.load(3) - table.render({ - elem: '#mainTable' - , url: GetWEBURL() + subUrl - , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘 - , defaultToolbar: ['filter', 'exports'] - , where: { sMsg: linterid, sMsg2: lentryid } - , cols: [[ - { type: 'checkbox', fixed: 'left' } - , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true } - , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 } - , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true } - , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true } - , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 } - , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 } - , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 } - , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true } - , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true } - , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 } - , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true } - , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 } - , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 } - , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" } - , { field: 'HMinQty', title: '鍐呯鍖呰鏁�', width: 100, edit: 'text', event: "inputHMinQty" } - , { field: 'HBQty', title: '鍐呯鏁�', width: 100 } - , { field: 'HWXQty', title: '澶栫鍖呰鏁�', width: 100, edit: 'text', event: "inputHWXQty" } - , { field: 'HWBQty', title: '澶栫鏁�', width: 100 } - , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true } - , { field: 'HMoney', title: '閲戦', width: 100, hide: true } - , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true } - , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' } - , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true } - , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true } - , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true } - , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate" - , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }// - , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate" - , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' } - , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' } - //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } - //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } - //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 } - , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true } - , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true } - , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 } - , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true } - , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true } - , { field: 'HWWOrderDetaiLID ', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true } - , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true } - , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 } - , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 } - , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true } - , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true } - , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true } - , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true } - , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄� - ]] - , done: function (res, curr, count) { - layer.closeAll("loading"); - } - }); + //杩涘叆椤甸潰鏌ヨ琛ㄤ綋鐗╂枡淇℃伅 + if (mergeTags != 1) { + layer.load(3) + table.render({ + elem: '#mainTable' + , url: GetWEBURL() + subUrl + , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘 + , defaultToolbar: ['filter', 'exports'] + , where: { sMsg: linterid, sMsg2: lentryid } + , cols: [[ + { type: 'checkbox', fixed: 'left' } + , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true } + , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 } + , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true } + , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true } + , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 } + , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 } + , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 } + , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true } + , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true } + , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 } + , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true } + , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 } + , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" } + , { field: 'HMinQty', title: '鍐呯鍖呰鏁�', width: 100, edit: 'text', event: "inputHMinQty" } + , { field: 'HBQty', title: '鍐呯鏁�', width: 100 } + , { field: 'HWXQty', title: '澶栫鍖呰鏁�', width: 100, edit: 'text', event: "inputHWXQty" } + , { field: 'HWBQty', title: '澶栫鏁�', width: 100 } + , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true } + , { field: 'HMoney', title: '閲戦', width: 100, hide: true } + , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true } + , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' } + , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true } + , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true } + , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true } + , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate" + , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }// + , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate" + , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' } + , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' } + //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } + //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } + //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 } + , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 } + , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HWWOrderDetaiLID ', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true } + , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true } + , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 } + , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 } + , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true } + , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true } + , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true } + , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true } + , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄� + + ]] + , done: function (res, curr, count) { + layer.closeAll("loading"); + } + }); + } + else + { + layer.load(3) + $.ajax({ + type: "GET", + url: GetWEBURL() + "/GetHBarCodeShowBillSub_Merge", + async: true, + data: { HInterID: linterid }, + dataType: "json", + success: function (data) { + if (data.count == 10000) { + var data = data.data; + var rowdata = []; + + for (var i = 0; i < data.length; i++) { + rowdata.push({ + "HMaterID": data[i].HMaterID, "HMaterNumber": data[i].HMaterNumber, "HOldMaterNumber": "" + , "HMaterShortNumber": "", "HSubjoin": "", "HMaterName": data[i].HMaterName + , "HMaterModel": data[i].HMaterModel, "HUnitName": data[i].HUnitName, "HUnitNumber": data[i].HUnitNumber + , "HUnitID": data[i].HUnitID, "HDDQty": data[i].HDDQty, "HMrbQty": 0, "HBarcodeCount": data[i].HBarcodeCount + , "HNotBarcodeCount": data[i].HNotBarcodeCount, "HQty": data[i].HQty, "HMinQty": data[i].HMinQty, "HBQty": data[i].HBQty + , "HWXQty": data[i].HWXQty, "HWBQty": data[i].HWBQty, "HPrice": data[i].HPrice, "HMoney": data[i].HMoney, "HMTONO": "" + , "HBatchNo": data[i].HBatchNo, "HBatchManager": data[i].HBatchManager, "HISKFPERIOD": data[i].HISKFPERIOD + , "HEXPUNIT": data[i].HEXPUNIT, "HKFDate": data[i].HKFDate, "HKFPeriod": data[i].HKFPeriod, "HKFDQDate": data[i].HKFDQDate + , "HSupMaterNumber": data[i].HSupMaterNumber, "HSupBatchNo": data[i].HSupBatchNo, "HPOOrderInterID": data[i].HPOOrderInterID + , "HPOOrderEntryID": data[i].HPOOrderEntryID, "HPOOrderBillNo": data[i].HPOOrderBillNo, "HWWOrderInterID": data[i].HWWOrderInterID + , "HWWOrderEntryID": data[i].HWWOrderEntryID, "HWWOrderDetaiLID": data[i].HWWOrderDetaiLID, "HWWOrderBillNo": data[i].HWWOrderBillNo + , "HSourceBillType": data[i].HSourceBillType, "HSourceBillNo": data[i].HSourceBillNo, "HSourceEntryID": data[i].HSourceEntryID + , "HSourceInterID": data[i].HSourceInterID, "HSupID": data[i].HSupID, "HSupName": "", "HIsSplit": data[i].HIsSplit + }); + } + + option.data = rowdata; + + table.render(option); + + } + else { + // $("#verifycode").click(); + f_alert(data.Message); + } + layer.closeAll("loading"); + }, + error: function (err) { + f_alert("閿欒:" + err); + layer.closeAll("loading"); + } + }); + } + //澶村伐鍏锋爮浜嬩欢 table.on('toolbar(mainTable)', function (obj) { var checkStatus = table.checkStatus(obj.config.id); @@ -1047,6 +1220,43 @@ }); } break; + case "btn-del": + var oldData = table.cache["mainTable"]; + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + + + var rows = ''; + for (var i = 0; i < data.length; i++) { + rows += data[i].HMaterID.toString() + ','; + } + rows = rows.substring(rows.length - 1, 0); + if (rows == "") { + layer.msg("鑷冲皯閫夋嫨涓�琛岃褰曪紒") + + } + else { + layer.confirm('鏄惁纭?', { icon: 3, title: '鎻愮ず' }, function (index) { + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j < oldData.length; j++) { + if (data[i].sorderid == oldData[j].sorderid) { + oldData.splice(j, 1); + break; + } + } + } + table.reload('mainTable', { + data: oldData + }); + layer.close(index); + }); + } + break; + case 'btn_HideColumn': + //闅愯棌鍒楄缃� + get_HideColumn(); + break; //鑷畾涔夊ご宸ュ叿鏍� case 'btn-normal': table.render({ @@ -1140,8 +1350,6 @@ } }); break; - - }; }); //鐩戝惉琛屽伐鍏蜂簨浠� @@ -1247,6 +1455,118 @@ }); } }); + + //鏄剧ず鍒楁暟鎹� + //闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + for (var i = 1; i < option.cols[0].length - 1; i++) { + colName += option.cols[0][i]["title"] + ","; + } + + colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜 + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ['../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn(){ + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + dataCol = data1.data[0].HGridString.split(','); + for (var i = 0; i < dataCol.length; i++) { + var dataCols = dataCol[i].split('|'); + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //闅愯棌id + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + if (option.cols[0][i + 1]["field"] == '渚涘簲鍟嗕氦鏈熷洖澶�') { + option.cols[0][i + 1]["width"] = 120; + } else { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + table.on('edit(mainTable)', function (obj) { //娉細edit鏄浐瀹氫簨浠跺悕锛宼est鏄痶able鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��" var value = obj.value //寰楀埌淇敼鍚庣殑鍊� , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊� -- Gitblit v1.9.1