From b9f7560cbe0e562a40e9515a0559a3e951f0fee6 Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期一, 07 四月 2025 09:16:01 +0800 Subject: [PATCH] 问题修改 --- HTML/views/ASNSetting/PalletBind.html | 768 ++++++++++++++++------------------------------------------ 1 files changed, 220 insertions(+), 548 deletions(-) diff --git a/HTML/views/ASNSetting/PalletBind.html b/HTML/views/ASNSetting/PalletBind.html index 0a07864..611e486 100644 --- a/HTML/views/ASNSetting/PalletBind.html +++ b/HTML/views/ASNSetting/PalletBind.html @@ -25,20 +25,20 @@ </style> <script> // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� - document.addEventListener("DOMContentLoaded", function() { + document.addEventListener("DOMContentLoaded", function () { //鑾峰彇table榛樿鏄剧ず鏁� pageCntFirst(); //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� GetIsSetColW(); }); - </script> + </script> </head> -<body> +<body id="body"> <div class="layui-fluid" style="padding-bottom: 0;"> <div class="layui-card"> - <div class="layui-form layui-card-header layuiadmin-card-header-auto"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> <div class="layui-form-item"> <div class="layui-inline"> <label class="layui-form-label" style="width: 60px;">鍏ュ簱鍗曞彿</label> @@ -64,45 +64,23 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 60px;">鎵�灞炰粨搴�</label> <div class="layui-input-inline"> - <select name="WareHouseNo" id="WareHouseNo" lay-filter="ImportExecuteFlag" lay-search> + <select name="WareHouseNo" id="WareHouseNo" lay-filter="getWareHouseNo" lay-search> <option value=""></option> - <option value="W01">鍔涜绔嬩綋搴�</option> - <option value="W02">鍔涜骞冲簱</option> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 60px;">鎵�灞炲贩閬�</label> <div class="layui-input-inline"> - <select name="RoadwayNo" id="RoadwayNo" lay-filter="ImportExecuteFlag" lay-search> + <select name="RoadwayNo" id="RoadwayNo" lay-search> <option value=""></option> - <option value="R01">01宸烽亾</option> - <option value="R02">02宸烽亾</option> - <option value="R03">03宸烽亾</option> - <option value="R04">04宸烽亾</option> - <option value="R05">05宸烽亾</option> - <option value="R06">06宸烽亾</option> - <option value="R07">07宸烽亾</option> - <option value="R08">08宸烽亾</option> - <option value="R09">09宸烽亾</option> - <option value="R10">10宸烽亾</option> - <option value="R11">11宸烽亾</option> - <option value="R12">12宸烽亾</option> - <option value="R13">13宸烽亾</option> - <option value="R14">14宸烽亾</option> - <option value="R15">15宸烽亾</option> - <option value="R16">16宸烽亾</option> - <option value="R17">17宸烽亾</option> - <option value="R18">18宸烽亾</option> - <option value="R19">19宸烽亾</option> - <option value="R20">20宸烽亾</option> </select> </div> </div> <div class="layui-inline"> <label class="layui-form-label" style="width: 60px;">鎵ц鐘舵��</label> <div class="layui-input-inline"> - <select name="Status" id="Status" lay-filter="ImportExecuteFlag" lay-search> + <select name="Status" id="Status" lay-search> <option value=""></option> <option value="0">绛夊緟鎵ц</option> <option value="1">鍏ュ簱涓�</option> @@ -125,9 +103,9 @@ </div> </div> <div class="layui-inline"> - <label class="layui-form-label" style="width: 60px;">鎵规鍙�</label> + <label class="layui-form-label" style="width: 60px;">杩涘巶缂栧彿</label> <div class="layui-input-inline"> - <input type="text" id="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off" + <input type="text" id="LotNo" name="LotNo" placeholder="杩涘巶缂栧彿" autocomplete="off" class="layui-input"> </div> </div> @@ -152,7 +130,7 @@ <label class="layui-form-label">鎾ら攢鍘熷洜</label> <div class="layui-input-inline"> <textarea id="Reason" name="Reason" placeholder="璇疯緭鍏ュ唴瀹�" class="layui-textarea"></textarea> - + </div> </div> <div class="layui-inline"> @@ -164,14 +142,17 @@ </div> </div> </div> - + <div class="layui-card-body"> <div style="position: relative;"> <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> - <ul class="layui-tab-title"> - <li class="layui-this">鎵樼洏淇℃伅</li> - <li >绠辩爜淇℃伅</li> + <ul class="layui-tab-title" id="tab"> + <li class="layui-this">鎵樼洏淇℃伅</li> + <li>绠辩爜淇℃伅</li> </ul> + + <div id="center"></div> + <div class="layui-tab-content"> <div class="layui-tab-item layui-show"> <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> @@ -183,28 +164,30 @@ </button> </div> <!-- #endregion --> - </div> + </div> </div> <div class="layui-tab-item"> <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> <table id="BoxInfo" lay-filter="BoxInfo"></table> <!-- #region 鑷畾涔夎〃澶� --> <div class="headerSetIcon"> - <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols2"> + <button class="layui-btn layui-btn-primary layui-btn-sm" + data-type="customCols2"> <i class="layui-icon"></i> </button> </div> <!-- #endregion --> </div> - + </div> </div> </div> - <button style="margin-right: 5px;position: absolute; top: 5px; right: 10px;" class="layui-btn layuiadmin-btn-list layui-btn-sm addClass" data-type="add"> + <button style="margin-right: 5px;position: absolute; top: 5px; right: 10px;" + class="layui-btn layuiadmin-btn-list layui-btn-sm addClass" data-type="add"> <i class="layui-icon"></i>娣诲姞 </button> </div> - + <script type="text/html" id="PalletBindDemoList"> {{# function GetPalletBindBtn(d){ var html = ''; @@ -246,8 +229,8 @@ {{ GetBoxInfoBtn(d) }} </script> - <!-- #region 鑷畾涔夎〃澶� --> - <script type="text/html" id="templetStatus"> + <!-- #region 鑷畾涔夎〃澶� --> + <script type="text/html" id="templetStatus"> {{# function GetBtn3(d){ switch (d.Status) { case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鍏ュ簱</button>'; @@ -366,16 +349,6 @@ case "R08": return '08宸烽亾'; case "R09": return '09宸烽亾'; case "R10": return '10宸烽亾'; - case "R11": return '11宸烽亾'; - case "R12": return '12宸烽亾'; - case "R13": return '13宸烽亾'; - case "R14": return '14宸烽亾'; - case "R15": return '15宸烽亾'; - case "R16": return '16宸烽亾'; - case "R17": return '17宸烽亾'; - case "R18": return '18宸烽亾'; - case "R19": return '19宸烽亾'; - case "R20": return '20宸烽亾'; default: return ""; } @@ -399,13 +372,14 @@ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index' //涓诲叆鍙fā鍧� - }).use(['index', 'table', 'laypage','element', 'layer', 'laydate'], function () { + }).use(['index', 'table', 'laypage', 'element', 'layer', 'laydate'], function () { var table = layui.table, form = layui.form, element = layui.element; - laypage = layui.laypage, + laypage = layui.laypage, layer = layui.layer; laydate = layui.laydate; + var h1 = GetTableTabHeight(); laydate.render({ elem: '#StartTime' , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� @@ -415,7 +389,7 @@ , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� }); //tab鍒囨崲鍒ゆ柇鍊� - var yemianid =0; + var yemianid = 0; //鎺ュ彈鍏ㄥ眬鍙橀噺 let quanSkuNo = 0; // 鑾峰彇table楂樺害 @@ -427,230 +401,94 @@ bindPalletBind(); bindBoxInfo("0"); - + + //鑾峰彇浠撳簱涓嬫媺妗嗕俊鎭� + synData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) { + if (res.code == 0) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + + $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' + + res.data[i].WareHouseName + '</option>'); + } + // $("#WareHouseNo option[value='" + res.data[0].WareHouseNo + "']").attr("selected", "selected") + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + + // 鏌ヨ浜嬩欢 + form.on('select(getWareHouseNo)', function (data) { + if ($("#WareHouseNo").val() == "W01") { + //鑾峰彇宸烽亾涓嬫媺妗嗕俊鎭� + synData(IP + "/Sys/GetRoadwayList", {}, 'get', function (res) { + if (res.code == 0) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + + $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + + res.data[i].RoadwayName + '</option>'); + } + // $("#RoadwayNo option[value='" + res.data[0].RoadwayNo + "']").attr("selected", "selected") + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + else { + $("#RoadwayNo").html(''); + $("#RoadwayNo").append('<option value=""></option>'); + form.render('select'); + } + + }); // 娓叉煋鎬昏〃 //#region 鑷畾涔夎〃澶� var TotalColsArr = [[ - {field:'',title: '搴忓彿',type: 'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true}, - {field: 'ASNNo',title: '鍏ュ簱鍗曞彿',align: 'center',width: 180, "disabled": true}, - {field: 'ASNDetailNo',title: '鍏ュ簱鏄庣粏鍙�',align: 'center'}, - {field: 'PalletNo',title: '鎵樼洏鍙�',align: 'center',width: 100}, - {field: 'PalletNo2',title: '鎵樼洏鍙稬V2',align: 'center'}, - {field: 'PalletNo3',title: '鎵樼洏鍙稬V3',align: 'center'}, - {field: 'LocatNo',title: '鍌ㄤ綅鍦板潃',align: 'center',width: 90}, - {field: 'RoadwayNo',title: '鎵�灞炲贩閬�',align: 'center',width: 90,templet: '#RoadwayButton'}, - {field: 'WareHouseNo',title: '鎵�灞炰粨搴�',align: 'center',width: 90,templet: '#WareHouseButton'}, - {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',width: 110}, - {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center'}, - {field: 'Qty',title: '鏁伴噺',align: 'center',width: 90}, - {field: 'FullQty',title: '鏁存墭鏁伴噺',align: 'center',width: 90}, - {field: 'Status',title: '鎵ц鐘舵��',align: 'center',width: 90,templet: '#templetStatus'}, - {field: 'BitPalletMark',title: '闆舵墭鏍囪',align: 'center',width: 90,templet: '#templetBitPalletMark'}, - {field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center',width: 165,templet: '#templetCompleteTime'}, - {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',width: 165,templet: '#templetCreateTime'}, - {field:'caozuo',title: '鎿嶄綔',fixed: 'right',width: 180,align: 'center',toolbar: '#PalletBindDemoList', "disabled": true} - ]]; - var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + { field: '', title: '搴忓彿', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true }, + { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center', width: 180, "disabled": true }, + { field: 'ASNDetailNo', title: '鍏ュ簱鏄庣粏鍙�', align: 'center' }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 100 }, + { field: 'PalletNo2', title: '鎵樼洏鍙稬V2', align: 'center' }, + { field: 'PalletNo3', title: '鎵樼洏鍙稬V3', align: 'center' }, + { field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center', width: 90 }, + { field: 'RoadwayNo', title: '鎵�灞炲贩閬�', align: 'center', width: 90, templet: '#RoadwayButton' }, + { field: 'WareHouseNo', title: '鎵�灞炰粨搴�', align: 'center', width: 90, templet: '#WareHouseButton' }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 110 }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' }, + { field: 'Qty', title: '鏁伴噺', align: 'center', width: 90 }, + { field: 'FullQty', title: '鏁存墭鏁伴噺', align: 'center', width: 90 }, + { field: 'Status', title: '鎵ц鐘舵��', align: 'center', width: 90, templet: '#templetStatus' }, + { field: 'BitPalletMark', title: '闆舵墭鏍囪', align: 'center', width: 90, templet: '#templetBitPalletMark' }, + { field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', width: 165, templet: '#templetCompleteTime' }, + { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 165, templet: '#templetCreateTime' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 180, align: 'center', toolbar: '#PalletBindDemoList', "disabled": true } + ]]; + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 //#endregion function bindPalletBind() { - //#region 鍘熷闈炶嚜瀹氫箟鍒� - // var param = { - // ASNNo: $("#ASNNo").val(), - // PalletNo: $("#PalletNo").val(), - // LocatNo: $("#LocatNo").val(), - // Status: $("#Status").val(), - // SkuNo: $("#SkuNo").val(), - // SkuName: $("#SkuName").val(), - // LotNo: $("#LotNo").val(), - // StartTime: $("#StartTime").val(), - // EndTime: $("#EndTime").val() - // }; - - // table.render({ - // id: 'PalletBind', - // elem: '#PalletBind', - // height: 'full-210', - // url: IP + "/BllAsn/GetPalletBindList", - // method: 'post', - // contentType: 'application/json', - // headers: { ToKen: $.cookie('token') }, - // where: param, - // page: true, - // even: true, - // limit: pageCnt, // 榛樿澶氬皯椤� - // limits: pageLimits, // 榛樿鏁扮粍[10,20,30,40,50] - // cellMinWidth: 60, // 鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - // done: function () { - // setRight() - // //bindBoxInfo(res.data[0].BindNo); - // }, - // cols: [ - // [{ - // title: '搴忓彿', - // type: 'numbers', - // width: 60, - // align: 'center', - // fixed: 'left', - // }, - // { - // field: 'ASNNo', - // title: '鍏ュ簱鍗曞彿', - // align: 'center', - // width: 180, - // }, - // { - // field: 'ASNDetailNo', - // title: '鍏ュ簱鏄庣粏鍙�', - // align: 'center', - // hide: true, - // }, - // { - // field: 'PalletNo', - // title: '鎵樼洏鍙�', - // align: 'center', - // width: 100, - // }, - // { - // field: 'PalletNo2', - // title: '鎵樼洏鍙稬V2', - // align: 'center', - // hide: true, - // }, - // { - // field: 'PalletNo3', - // title: '鎵樼洏鍙稬V3', - // align: 'center', - // hide: true, - // }, { - // field: 'LocatNo', - // title: '鍌ㄤ綅鍦板潃', - // align: 'center', - // width: 90, - // }, { - // field: 'SkuNo', - // title: '鐗╂枡缂栫爜', - // align: 'center', - // width: 110, - // }, { - // field: 'SkuName', - // title: '鐗╂枡鍚嶇О', - // align: 'center', - // }, { - // field: 'Qty', - // title: '鏁伴噺', - // align: 'center', - // width: 90, - // }, { - // field: 'FullQty', - // title: '鏁存墭鏁伴噺', - // align: 'center', - // width: 90, - // }, - // { - // field: 'Status', - // title: '鎵ц鐘舵��',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // align: 'center', - // width: 90, - // templet: function (d) { - // switch (d.Status) { - // case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鍏ュ簱</button>'; - // case "1": return '<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">鍏ュ簱涓�</button>'; - // case "2": return '<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">鍏ュ簱瀹屾垚</button>'; - // default: return ""; - // } - // } - // }, - // // { - // // field: 'InspectMark', - // // title: '鎶芥鏍囪',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // // align: 'center', - // // templet: function (d) { - // // switch (d.InspectMark) { - // // case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鏈楠�</button>'; - // // case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鎶芥鎵�</button>'; - // // default: return ""; - // // } - // // } - // // }, - // { - // field: 'BitPalletMark', - // title: '闆舵墭鏍囪',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // align: 'center', - // width: 90, - // templet: function (d) { - // switch (d.BitPalletMark) { - // case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>'; - // case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>'; - // default: return ""; - // } - // } - // }, - // // { - // // field: 'IsBale', - // // title: '鏄惁瑁瑰寘', - // // align: 'center', - // // templet: function (d) { - // // switch (d.IsBale) { - // // case "0": return "鍚�"; - // // case "1": return "鏄�"; - // // default: return ""; - // // } - // // } - // // }, - // // { - // // field: 'IsBelt', - // // title: '鏄惁鎵撳甫', - // // align: 'center', - // // templet: function (d) { - // // switch (d.IsBelt) { - // // case "0": return "鍚�"; - // // case "1": return "鏄�"; - // // default: return ""; - // // } - // // } - // // }, - // { - // field: 'CompleteTime', - // title: '瀹屾垚鏃堕棿', - // align: 'center', - // width: 165, - // templet: function (d) { - // return formatDate(d.CompleteTime); - // }, - // }, { - // field: 'CreateTime', - // title: '鍒涘缓鏃堕棿', - // align: 'center', - // width: 165, - // templet: function (d) { - // return formatDate(d.CreateTime); - // }, - // }, { - // title: '鎿嶄綔', - // fixed: 'right', - // width: 180, - // align: 'center', - // toolbar: '#PalletBindDemoList' - // }] - // ] - // }); - //#endregion - + //#region 鑷畾涔夎〃澶� var colsJson - var param1={ - Href:'BllAsn/GetPalletBindList' + var param1 = { + Href: 'BllAsn/GetPalletBindList' }; - sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { - if (res.code == 0){ - if(res.data=='' || res.data==undefined || res.data==null){ - colsJson=TotalColsArr - }else{ - colsJson= eval(res.data); + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson = TotalColsArr + } else { + colsJson = eval(res.data); } - }else{ - colsJson=TotalColsArr + } else { + colsJson = TotalColsArr } var param = { ASNNo: $("#ASNNo").val(), @@ -668,7 +506,7 @@ table.render({ id: 'PalletBind', elem: '#PalletBind', - height: 'full-210', + height: h1, url: IP + "/BllAsn/GetPalletBindList", method: 'post', contentType: 'application/json', @@ -683,7 +521,7 @@ setRight() //bindBoxInfo(res.data[0].BindNo); //鑷畾涔夊垪瀹� - SetTableColW('PalletBind','BllAsn/GetPalletBindList',TotalColsSysArr); + SetTableColW('PalletBind', 'BllAsn/GetPalletBindList', TotalColsSysArr); }, cols: colsJson }); @@ -697,242 +535,76 @@ // 娓叉煋鏄庣粏琛� //#region 鑷畾涔夎〃澶� var DetailColsArr = [[ - {field: '',title: '搴忓彿',type: 'numbers',width: 60,align: 'center',fixed: 'left', "disabled": true}, - {field: 'PalletNo',title: '鎵樼洏鍙�',align: 'center',width: 95}, - {field: 'PalletNo2',title: '鎵樼洏缂栧彿LV2',align: 'center',width: 120}, - {field: 'PalletNo3',title: '鎵樼洏缂栧彿LV3',align: 'center',width: 120}, - {field: 'BoxNo',title: '绠卞彿',align: 'center',width: 220}, - {field: 'BoxNo2',title: '鐩掑彿',align: 'center',width: 220}, - {field: 'BoxNo3',title: '鏀彿',align: 'center',width: 220}, - {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',width: 150}, - {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',align: 'center',width: 226}, - {field: 'LotNo',title: '鎵规鍙�',align: 'center',width: 150,}, - {field: 'Qty',title: '鏁伴噺',align: 'center',width: 105,}, - {field: 'FullQty',title: '鏁寸鏁伴噺',align: 'center',width: 105,}, - {field: 'ProductionTime',title: '鐢熶骇鏃ユ湡',align: 'center',width: 160,templet: '#templetProductionTime'}, - {field: 'ExpirationTime',title: '杩囨湡鏃ユ湡',align: 'center',width: 180,templet: '#templetExpirationTime'}, - {field: 'LotText',title: '鎵规鎻忚堪',align: 'center',width: 150,}, - {field: 'SupplierLot',title: '渚涜揣鎵规',align: 'center',width: 150,}, - {field: 'InspectMark',title: '鎶芥鏍囪',align: 'center',width:95,templet: '#templetInspectMark'}, - {field: 'BitBoxMark',title: '闆剁鏍囪',align: 'center',width:95,templet: '#templetBitBoxMark'}, - {field: 'InspectStatus',title: '璐ㄩ噺鐘舵��',align: 'center',width:95,templet: '#templetInspectStatus'}, - {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 155,align: 'center',toolbar: '#BoxInfoDemoList', "disabled": true} - ]]; - var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + { field: '', title: '搴忓彿', type: 'numbers', width: 60, align: 'center', fixed: 'left', "disabled": true }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 95 }, + { field: 'PalletNo2', title: '鎵樼洏缂栧彿LV2', align: 'center', width: 120 }, + { field: 'PalletNo3', title: '鎵樼洏缂栧彿LV3', align: 'center', width: 120 }, + { field: 'BoxNo', title: '绠卞彿', align: 'center', width: 220 }, + { field: 'BoxNo2', title: '鐩掑彿', align: 'center', width: 220 }, + { field: 'BoxNo3', title: '鏀彿', align: 'center', width: 220 }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 150 }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', align: 'center', width: 226 }, + { field: 'LotNo', title: '杩涘巶缂栧彿', align: 'center', width: 150, }, + { field: 'Qty', title: '鏁伴噺', align: 'center', width: 105, }, + { field: 'FullQty', title: '鏁寸鏁伴噺', align: 'center', width: 105, }, + { field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', width: 160, templet: '#templetProductionTime' }, + { field: 'ExpirationTime', title: '杩囨湡鏃ユ湡', align: 'center', width: 180, templet: '#templetExpirationTime' }, + { field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 150, }, + { field: 'SupplierLot', title: '鍘熷巶鎵瑰彿', align: 'center', width: 150, }, + { field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', width: 95, templet: '#templetInspectMark' }, + { field: 'BitBoxMark', title: '闆剁鏍囪', align: 'center', width: 95, templet: '#templetBitBoxMark' }, + { field: 'InspectStatus', title: '璐ㄩ噺鐘舵��', align: 'center', width: 95, templet: '#templetInspectStatus' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 155, align: 'center', toolbar: '#BoxInfoDemoList', "disabled": true } + ]]; + var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 //#endregion function bindBoxInfo(BindNo) { - //#region 鍘熷闈炶嚜瀹氫箟鍒� - // var param = { - // BindNo: parseInt(BindNo) - // }; - // table.render({ - // id: 'BoxInfo', - // elem: '#BoxInfo', - // height: 'full-210', - // url: IP + "/BllAsn/GetBoxInfoList", - // method: 'post', - // contentType: 'application/json', - // headers: { ToKen: $.cookie('token') }, - // where: param, - // // toolbar: '#BoxInfoDemo', - // // defaultToolbar: ['filter'], //'print', 'exports' - // page: true, - // limit: pageCnt, // 榛樿澶氬皯椤� - // limits: pageLimits, // 榛樿鏁扮粍[10,20,30,40,50] - // cellMinWidth: 60, // 鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - // even: true, - // done: function () { - // setRight() - // }, - // cols: [ - // [{ - - // title: '搴忓彿', - // type: 'numbers', - // width: 60, - // align: 'center', - // fixed: 'left', - // } - // , { - // field: 'PalletNo', - // title: '鎵樼洏鍙�', - // align: 'center', - // width: 95 - // }, { - // field: 'PalletNo2', - // title: '鎵樼洏缂栧彿LV2', - // align: 'center', - // hide: true, - // }, - // { - // field: 'PalletNo3', - // title: '鎵樼洏缂栧彿LV3', - // align: 'center', - // hide: true, - // }, - // { - // field: 'BoxNo', - // title: '绠卞彿', - // align: 'center', - // width: 220 - // }, { - // field: 'BoxNo2', - // title: '鐩掑彿', - // align: 'center', - // hide: true, - // }, - // { - // field: 'BoxNo3', - // title: '鏀彿', - // align: 'center', - // width: 220, - // hide: true, - // }, - // { - // field: 'SkuNo', - // title: '鐗╂枡缂栫爜', - // align: 'center', - // width: 150, - // }, { - // field: 'SkuName', - // title: '鐗╂枡鍚嶇О', - // align: 'center', - // align: 'center', - // width: 226, - // }, { - // field: 'LotNo', - // title: '鎵规鍙�', - // align: 'center', - // width: 150, - // }, { - // field: 'Qty', - // title: '鏁伴噺', - // align: 'center', - // width: 105, - // }, { - // field: 'FullQty', - // title: '鏁寸鏁伴噺', - // align: 'center', - // width: 105, - // }, { - // field: 'ProductionTime', - // title: '鐢熶骇鏃ユ湡', - // align: 'center', - // width: 160, - // templet: function (d) { - // return formatDate2(d.ProductionTime); - // }, - // }, { - // field: 'ExpirationTime', - // title: '杩囨湡鏃ユ湡', - // align: 'center', - // width: 180, - // templet: function (d) { - // return formatDate2(d.ExpirationTime); - // }, - // }, { - // field: 'LotText', - // title: '鎵规鎻忚堪', - // align: 'center', - // width: 150, - // }, { - // field: 'SupplierLot', - // title: '渚涜揣鎵规', - // align: 'center', - // width: 150, - // }, { - // field: 'InspectMark', - // title: '鎶芥鏍囪',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // align: 'center', - // width:95, - // templet: function (d) { - // switch (d.InspectMark) { - // case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>'; - // case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>'; - // default: return ""; - // } - // } - // }, - // { - // field: 'BitBoxMark', - // title: '闆剁鏍囪',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // align: 'center', - // width:95, - // templet: function (d) { - // switch (d.BitBoxMark) { - // case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">鍚�</button>'; - // case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">鏄�</button>'; - // default: return ""; - // } - // } - // }, - // { - // field: 'InspectStatus', - // title: '璐ㄩ噺鐘舵��',//绛夊緟鍏ュ簱/姝e湪鍏ュ簱/鍏ュ簱瀹屾垚 --0/1/2 - // align: 'center', - // width:95, - // templet: function (d) { - // switch (d.InspectStatus) { - // case "0": return '寰呮楠�'; - // case "1": return '妫�楠屽悎鏍�'; - // case "2": return '涓嶅悎鏍�'; - // case "3": return '鏀剧疆鏈�'; - // default: return ""; - // } - // } - // }, - // { - // title: '鎿嶄綔', - // fixed: 'right', - // width: 155, - // align: 'center', - // toolbar: '#BoxInfoDemoList' - // }] - // ], - - // }); - //#endregion - + //#region 鑷畾涔夎〃澶� var colsJson2 - var param1={ - Href:'BllAsn/GetBoxInfoList' + var param1 = { + Href: 'BllAsn/GetBoxInfoList' }; - sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { - if (res.code == 0){ - if(res.data=='' || res.data==undefined || res.data==null){ - colsJson2=DetailColsArr - }else{ - colsJson2= eval(res.data); + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson2 = DetailColsArr + } else { + colsJson2 = eval(res.data); + } + } else { + colsJson2 = DetailColsArr } - }else{ - colsJson2=DetailColsArr - } - var param = { - BindNo: parseInt(BindNo) - }; - table.render({ - id: 'BoxInfo', - elem: '#BoxInfo', - height: 'full-210', - url: IP + "/BllAsn/GetBoxInfoList", - method: 'post', - contentType: 'application/json', - headers: { ToKen: $.cookie('token') }, - where: param, - // toolbar: '#BoxInfoDemo', - // defaultToolbar: ['filter'], //'print', 'exports' - page: true, - limit: pageCnt, // 榛樿澶氬皯椤� - limits: pageLimits, // 榛樿鏁扮粍[10,20,30,40,50] - cellMinWidth: 60, // 鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - even: true, - done: function () { - setRight() - //鑷畾涔夊垪瀹� - SetTableColW('BoxInfo','BllAsn/GetBoxInfoList',DetailColsSysArr); - }, - cols: colsJson2 + var param = { + BindNo: parseInt(BindNo), + ASNNo: $("#ASNNo").val(), + PalletNo: $("#PalletNo").val(), + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + }; + table.render({ + id: 'BoxInfo', + elem: '#BoxInfo', + height: h1, + url: IP + "/BllAsn/GetBoxInfoList", + method: 'post', + contentType: 'application/json', + headers: { ToKen: $.cookie('token') }, + where: param, + // toolbar: '#BoxInfoDemo', + // defaultToolbar: ['filter'], //'print', 'exports' + page: true, + limit: pageCnt, // 榛樿澶氬皯椤� + limits: pageLimits, // 榛樿鏁扮粍[10,20,30,40,50] + cellMinWidth: 60, // 鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + even: true, + done: function () { + setRight() + //鑷畾涔夊垪瀹� + SetTableColW('BoxInfo', 'BllAsn/GetBoxInfoList', DetailColsSysArr); + }, + cols: colsJson2 }); }); //#endregion @@ -940,10 +612,10 @@ // 椤甸潰鐩戞帶锛岀偣鍑绘煡璇㈠姞杞藉叆搴撴�诲崟 form.on('submit(LAY-app-contlist-search)', function (data) { - - if(yemianid == 0){ + + if (yemianid == 0) { bindPalletBind(); - }else if(yemianid == 1){ + } else if (yemianid == 1) { bindBoxInfo(quanSkuNo); } }); @@ -953,20 +625,20 @@ // bindBoxInfo(parseInt(obj.data.Id)); // }); //瑙﹀彂琛屽弻鍑讳簨浠� - table.on('rowDouble(PalletBind)', function(obj) { + table.on('rowDouble(PalletBind)', function (obj) { $(".layui-tab-title>li").attr("class", ""); $('.layui-tab-title>li').eq(1).attr('class', 'layui-this'); $('.layui-tab-content .layui-tab-item').attr('class', 'layui-tab-item') $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show') - + quanSkuNo = parseInt(obj.data.Id); bindBoxInfo(parseInt(obj.data.Id)); - yemianid=1; + yemianid = 1; }); // 娣诲姞鎵樼洏缁戝畾淇℃伅 var doing = true; - //娣诲姞 + //娣诲姞 var active = { add: function () { layer.open({ @@ -978,21 +650,21 @@ }); }, //#region 鑷畾涔夎〃澶� - customCols: function(){ + customCols: function () { layer.open({ type: 2, title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetPalletBindList&ColsSysArr='+TotalColsSysArr, + content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetPalletBindList&ColsSysArr=' + TotalColsSysArr, maxmin: false, resize: false, area: ['970px', '650px'] }); }, - customCols2: function(){ + customCols2: function () { layer.open({ type: 2, title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBoxInfoList&ColsSysArr='+DetailColsSysArr, + content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetBoxInfoList&ColsSysArr=' + DetailColsSysArr, maxmin: false, resize: false, area: ['970px', '650px'] @@ -1022,8 +694,9 @@ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { bindPalletBind(); - bindBoxInfo("0"); }); + + } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, @@ -1044,57 +717,57 @@ }); break; - case "chexiao" : + case "chexiao": layer.open({ type: 1, title: '鎾ら攢鐢宠', content: $('#divReason'), maxmin: true, - area: ['300px','265px'], + area: ['300px', '265px'], btn: ['纭畾', '鍙栨秷'], - yes: function(index, layero) { + yes: function (index, layero) { var pa = $('#Reason').val(); - if (doing== true) { - doing= false; - + if (doing == true) { + doing = false; + var param = { - Id: data.Id, + Id: data.Id, Reason: pa, }; console.log(param); - sendData(IP + "/BllAsn/CancelPalletBind", param, 'get', function(res) { + sendData(IP + "/BllAsn/CancelPalletBind", param, 'get', function (res) { console.log(res); if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { icon: 1, time: 3000 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { + }, function () { bindPalletBind(); - bindBoxInfo("0"); - doing= true; + bindBoxInfo("0"); + doing = true; }); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { + }, function () { bindPalletBind(); - bindBoxInfo("0"); - doing= true; + bindBoxInfo("0"); + doing = true; }); } layer.close(index); }); - }else{ + } else { layer.msg("璇峰嬁閲嶅鐐瑰嚮", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }); } - + } - }); - + }); + break; default: break; } @@ -1118,13 +791,13 @@ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { bindPalletBind(); - bindBoxInfo("0"); + bindBoxInfo(quanSkuNo); }); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () {}); + }, function () { }); } }); }); @@ -1135,23 +808,22 @@ layer.open({ type: 2, title: '绠辨敮璇︽儏淇℃伅', - content: 'BindBoxInfo.html?BoxNo=' + BoxNo, + content: 'BindBoxInfo.html?BoxNo=' + BoxNo+'&BindNo='+data.BindNo, maxmin: true, area: ['80%', '85%'], btn: ['鍏抽棴'], - yes: function(index, layero) { + yes: function (index, layero) { var iframeWindow = window['layui-layer-iframe' + index], - submitID = 'layuiadmin-app-form-edit', - submit = layero.find('iframe').contents().find('#' + submitID); - if(doing) - { + submitID = 'layuiadmin-app-form-edit', + submit = layero.find('iframe').contents().find('#' + submitID); + if (doing) { doing = false; - + layer.close(index); //鍏抽棴寮瑰眰 // refreshTable(); doing = true; - - + + } } }); @@ -1204,14 +876,14 @@ } //鐩戝惉Tab鍒囨崲锛屼互鏀瑰彉鍦板潃hash鍊� - element.on('tab(docDemoTabBrief)', function(data){ + element.on('tab(docDemoTabBrief)', function (data) { yemianid = data.index - if(yemianid == 0){ - bindPalletBind( ); - }else if(yemianid == 1){ + if (yemianid == 0) { + bindPalletBind(); + } else if (yemianid == 1) { bindBoxInfo(quanSkuNo); } - }); + }); }); </script> -- Gitblit v1.8.0