From 4a605c5fff6b8bc7688cac569b8bb92a47c2cb05 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 19 十月 2022 09:23:33 +0800 Subject: [PATCH] 增加 表体网格功能,显示这个流转卡的进出站记录。列动态加载(进站单、委外接收、委外发出单) --- WebTM/views/车间管理/委外工序接收单/Cj_StationEntrustOutBill.html | 80 +++++++++++++++++++ WebTM/views/车间管理/委外工序发出单/Cj_StationEntrustInBill.html | 56 +++++++++++++ WebTM/views/车间管理/工序进站接收单/Cj_StationInBill.html | 104 +++++++++++++++++++++++-- 3 files changed, 228 insertions(+), 12 deletions(-) diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html" index ca6730b..a50c002 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html" @@ -139,6 +139,7 @@ <label class="layui-form-label">娴佽浆鍗″彿</label> <div class="layui-input-inline"> <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly> + <input type="hidden" class="layui-input" name="HProcExchHinteID" id="HProcExchHinteID"> </div> </div> <div class="layui-col-xs4 layui-inline"> @@ -162,7 +163,7 @@ <div class="layui-col-xs4 layui-inline"> <label class="layui-form-label">娴佹按鍙�</label> <div class="layui-input-inline"> - <input type="text" class="layui-input" name="HProcNo" id="HProcNo"> + <input type="text" class="layui-input" name="HProcNo" id="HProcNo" placeholder="璇烽敭鍏ュ悗鍥炶溅"> </div> </div> <div class="layui-col-xs4 layui-inline"> @@ -390,6 +391,7 @@ </div> </div> </div> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <!--闅愯棌瀛楁--> <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0"> @@ -415,6 +417,9 @@ , element = layui.element; //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ潯褰㈢爜涓� $("#HBarCode").focus(); + + //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + var titleData = []; /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/ /* 1.鏃犳簮鍗曟柊澧� @@ -598,11 +603,60 @@ "HGroup": data.鐝粍, "HDeptID": sessionStorage["HDeptID"], "HDept": sessionStorage["HDept"], + "HProcExchHinteID": data.hmainid, "HPRDOrg": data.缁勭粐 }); $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇� $("#HBarCode").css("background-color", "#efefef4d"); HProcExchBillNoFlag = true; + + var HProcExchHinteID = $('#HProcExchHinteID').val(); + //鍔ㄦ�佸垪 + $.ajax({ + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + data: { "HProcExchHinteID": HProcExchHinteID }, + success: function (data1) { + if (data1.count == 1) { + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + } + option = { + elem: '#mainTable', + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + //, cellMinWidth: 80 + toolbar: '#toolbarDemo' + , where: { HProcExchHinteID: HProcExchHinteID } + , cols: [col] + , height: 500 + } + table.render(option) + } + }) + layer.close(index); } else { diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html" index a44fc39..713e8d9 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html" @@ -145,7 +145,10 @@ <div class="layui-col-xs4 layui-inline"> <label class="layui-form-label">褰撳墠宸ュ簭</label> <div class="layui-input-inline"> - <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d;" readonly> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="CurrPro-BT" id="SerialNum-BT" style="width: 40px; padding: 0 10px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> + </button> <input type="hidden" name="HProcID" id="HProcID" value="0"> </div> </div> @@ -360,6 +363,7 @@ </div> </div> </div> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <!--闅愯棌瀛楁--> <input type="hidden" name="lngBillKey" id="lngBillKey"> <input type="hidden" name="lngBillSubKey" id="lngBillSubKey"> @@ -394,6 +398,9 @@ , element = layui.element; //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ潯褰㈢爜涓� $("#HBarCode").focus(); + + //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + var titleData = []; /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/ /* 1.鏃犳簮鍗曟柊澧� @@ -687,6 +694,7 @@ "HGroup": data.鐝粍, "HDeptID": sessionStorage["HDeptID"], "HDept": sessionStorage["HDept"], + "HProcExchHinteID": data.hmainid, "HPRDOrg": data.缁勭粐 }); if ($("#eventType").val() === "Add") { @@ -701,6 +709,54 @@ $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇� $("#HBarCode").css("background-color", "#efefef4d"); HProcExchBillNoFlag = true; + + var HProcExchHinteID = $('#HProcExchHinteID').val(); + //鍔ㄦ�佸垪 + $.ajax({ + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + data: { "HProcExchHinteID": HProcExchHinteID }, + success: function (data1) { + if (data1.count == 1) { + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + } + option = { + elem: '#mainTable', + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + //, cellMinWidth: 80 + toolbar: '#toolbarDemo' + , where: { HProcExchHinteID: HProcExchHinteID } + , cols: [col] + , height: 500 + } + table.render(option) + } + }) + layer.close(index); } else { @@ -932,6 +988,23 @@ }) }); + //閫夋嫨褰撳墠宸ュ簭寮圭獥 + form.on('submit(CurrPro-BT)', function () {//閫夋嫨褰撳墠宸ュ簭 + layer.open({ + type: 2 + , area: ['80%', '80%'] + , title: '褰撳墠宸ュ簭' + , shade: 0.6 //閬僵閫忔槑搴� + //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../Baseset/鍩虹璧勬枡/Gy_ProcList.html', 'yes'] + , resize: false + , cancel: function (index, layero) { + } + }) + //layer.msg('绂佹閫夋嫨'); + }); + //#region 鏂板鎸夐挳 form.on('submit(set_AddNew)', function () {//鎻愪氦 layer.confirm('鏂板鍚庨〉闈㈡暟鎹皢娑堝け锛�', { icon: 3, title: '鎻愮ず' }, function (index) { @@ -991,6 +1064,11 @@ $("#HSupName").val(obj[0].HName); $("#HSupID").val(obj[0].HItemID); } + //杩斿洖宸ュ簭 + function GetHProcValue(obj) { + $("#HProcName").val(obj[0].宸ュ簭); + $("#HProcID").val(obj[0].HItemID); + } </script> </body> diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" index 6c2cd9d..b01e99e 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" @@ -141,7 +141,10 @@ <div class="layui-col-xs4 layui-inline"> <label class="layui-form-label"><span style="color:red;">*</span>褰撳墠宸ュ簭</label> <div class="layui-input-inline"> - <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;" readonly> + <input type="text" class="layui-input" name="HProcName" id="HProcName" style="float: left; width: 150px; background-color: #efefef4d;" readonly> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="CurrPro-BT" id="SerialNum-BT" style="width: 40px; padding: 0 10px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> + </button> <input type="hidden" name="HProcID" id="HProcID" value="0"> </div> </div> @@ -156,7 +159,7 @@ <div class="layui-col-xs4 layui-inline"> <label class="layui-form-label"><span style="color:red;">*</span>娴佹按鍙�</label> <div class="layui-input-inline"> - <input type="text" class="layui-input" name="HProcNo" id="HProcNo"> + <input type="text" class="layui-input" name="HProcNo" id="HProcNo" placeholder="璇烽敭鍏ュ悗鍥炶溅"> </div> </div> <div class="layui-col-xs4 layui-inline"> @@ -209,12 +212,12 @@ </div> </div> <!--<div class="layui-col-xs4 layui-inline"> - <label class="layui-form-label"><span style="color:red;">*</span>宸ヤ綔涓績</label> - <div class="layui-input-inline"> - <input type="text" class="layui-input" name="HCenterName" id="HCenterName" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HCenterID" id="HCenterID" value="0"> - </div> - </div>--> + <label class="layui-form-label"><span style="color:red;">*</span>宸ヤ綔涓績</label> + <div class="layui-input-inline"> + <input type="text" class="layui-input" name="HCenterName" id="HCenterName" style="background-color:#efefef4d;" readonly> + <input type="hidden" name="HCenterID" id="HCenterID" value="0"> + </div> + </div>--> </div> <div class="layui-row"> <div class="layui-col-xs8 layui-inline"> @@ -384,6 +387,7 @@ </div> </div> </div> + <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> <!--闅愯棌瀛楁--> <input type="hidden" name="lngICMOEntryID" id="lngICMOEntryID"> <input type="hidden" name="lngBillKey" id="lngBillKey" value="0"> @@ -410,6 +414,10 @@ , upload = layui.upload , element = layui.element; var params = get_UrlVars(); + + //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + var titleData = []; + if (typeof (params[params[0]]) == "undefined") { var OperationType = 1;//鎿嶄綔绫诲瀷 var closeType = 2; //鍏抽棴绫诲瀷 @@ -478,8 +486,6 @@ //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ潯褰㈢爜涓� $("#HBarCode").focus(); - - //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� @@ -855,6 +861,61 @@ $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇� $("#HBarCode").css("background-color", "#efefef4d"); HProcExchBillNoFlag = true; + + var HProcExchHinteID = $('#HProcExchHinteID').val(); + + //鍔ㄦ�佸垪 + $.ajax({ + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + data: { "HProcExchHinteID": HProcExchHinteID }, + success: function (data1) { + if (data1.count == 1) { + var data = []; + var col = []; + //缁欑┖鐨勬暟缁勮祴鍊� + for (var key in data1.list) { + data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); + } + //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋 + col.push({ type: 'checkbox', fixed: 'left' }); + for (var i = 0; i < data.length; i++) { + // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { + if ($.inArray(data[i].name, titleData) > -1) { + col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + } + else { + switch (data[i].Type) { + //int + case 'DateTime': + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + } + option = { + elem: '#mainTable', + url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList", + type: "GET", + //, cellMinWidth: 80 + toolbar: '#toolbarDemo' + , where: { HProcExchHinteID: HProcExchHinteID } + , cols: [col] + , height: 500 + } + table.render(option) + } + }) + //layer.close(index); + //set_InitGrid(); + //table.render(option); + + //鍒锋柊琛ㄦ牸鏁版嵁 + //DisPlay_HideColumn(); + layer.close(index); } else { @@ -957,6 +1018,7 @@ //閫夋嫨鐢熶骇璧勬簮寮圭獥 form.on('submit(ProductionResources-BT)', function () {//鐢熶骇璧勬簮 + console.log($('#HProcNo').val()) layer.open({ type: 2 , area: ['80%', '80%'] @@ -1024,6 +1086,23 @@ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� , content: ['../../Baseset/鍩虹璧勬枡/Gy_WorkCenterList.html', 'yes'] + , resize: false + , cancel: function (index, layero) { + } + }) + //layer.msg('绂佹閫夋嫨'); + }); + + //閫夋嫨褰撳墠宸ュ簭寮圭獥 + form.on('submit(CurrPro-BT)', function () {//閫夋嫨褰撳墠宸ュ簭 + layer.open({ + type: 2 + , area: ['80%', '80%'] + , title: '褰撳墠宸ュ簭' + , shade: 0.6 //閬僵閫忔槑搴� + //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../Baseset/鍩虹璧勬枡/Gy_ProcList.html', 'yes'] , resize: false , cancel: function (index, layero) { } @@ -1103,6 +1182,11 @@ $("#HCenterName").val(obj[0].宸ヤ綔涓績); $("#HCenterID").val(obj[0].HItemID); } + //杩斿洖褰撳墠宸ュ簭 + function GetHProcValue(obj) { //杩斿洖褰撳墠宸ュ簭 + $("#HProcName").val(obj[0].宸ュ簭); + $("#HProcID").val(obj[0].HItemID); + } </script> </body> -- Gitblit v1.9.1