From cbef45dac9b58580fac4b67c9c940d6818197730 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期五, 10 二月 2023 16:28:46 +0800 Subject: [PATCH] 工序流转卡 保存工艺路线内码 生产订单完善 工艺路线添加字段 仓库 --- WebTM/views/生产管理/生产任务单/Sc_ICMOBillEdit_NoTable.html | 289 ++++++++++++++++++++++++++++++++++- WebTM/views/计划管理/工艺路线/Gy_RoutingBill.html | 137 ++++++++++++++++ WebTM/views/计划管理/工艺路线/Gy_RoutingBillimport.html | 3 WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill.html | 2 WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html | 5 5 files changed, 418 insertions(+), 18 deletions(-) diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html" index 3536b0f..18b7df5 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillEdit_NoTable.html" @@ -55,6 +55,12 @@ <div style="padding: 10px; "> <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button> <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">鍏抽棴</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">鍙嶅叧闂�</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelltionBill" id="set_CancelltionBill">浣滃簾</button> + <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCancelltion" id="set_AbandonCancelltion">鍙嶄綔搴�</button> </div> <div class="layui-tab" lay-filter="tab-POStockInBill"> <ul class="layui-tab-title" lay-filter="tab-all"> @@ -288,9 +294,11 @@ var params = getUrlVars(); var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫 var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜 + var HEntryID = params[params[2]]; //鑾峰彇鍗曟嵁瀛恑d if (linterid == null || linterid == 0) { OperationType = 1; + HEntryID = 1; $.ajax({ url: GetWEBURL() + "/Web/GetMAXNum", type: "GET", @@ -307,6 +315,7 @@ $("#HDate").attr("disabled", true); RoadBillMain(linterid); } + HfBtn(); //#endregion @@ -368,10 +377,40 @@ //淇濆瓨鎻愪氦 form.on('submit(btnSave)', function (data) {//鎻愪氦 - //if (AllowLoadData(data)) { - // set_AddNew(data); - //} - set_AddNew(data); + if (AllowLoadData(data)) { + set_AddNew(data); + } + //set_AddNew(data); + }); + + //瀹℃牳 + form.on('submit(set_CheckBill)', function (data) { + set_CheckBill(data); + }); + + //鍙嶅鏍� + form.on('submit(set_AbandonCheck)', function (data) { + set_AbandonCheck(data); + }); + + //鍏抽棴 + form.on('submit(set_CloseBill)', function (data) { + set_CloseBill(data); + }); + + //鍙嶅叧闂� + form.on('submit(set_CancelCloseBill)', function (data) { + set_CancelCloseBill(data); + }); + + //浣滃簾 + form.on('submit(set_CancelltionBill)', function (data) { + set_CancelltionBill(data); + }); + + //鍙嶄綔搴� + form.on('submit(set_AbandonCancelltion)', function (data) { + set_AbandonCancelltion(data); }); //#endregion @@ -380,12 +419,13 @@ // 鍒濆鍖栫晫闈� function set_ClearBill() { + var time = new Date().getTime() + 86400000; //鍒濆鍖栨棩鏈� $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd")); - $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd")); + $("#HPlanEndDate").val(Format(new Date(time), "yyyy-MM-dd")); $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd")); - $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); + $("#HEndDate").val(Format(new Date(time), "yyyy-MM-dd")); //鍒濆鍖� 缁勭粐 Organ(); } @@ -653,7 +693,7 @@ function set_AddNew(data) { var sMainStr = JSON.stringify(data.field); - var sMainSub = sMainStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; + var sMainSub = sMainStr + ';' + OperationType + ";" + sessionStorage["HUserName"] + ";" + HEntryID; var index = layer.load(); $.ajax({ @@ -667,6 +707,13 @@ $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); layer.close(index); layer.msg("鎻愪氦鎴愬姛"); + //鎭㈠鎸夐挳 + $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CloseBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CancelCloseBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CancelltionBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_AbandonCancelltion').removeClass("layui-btn-disabled").attr("disabled", false); } else { layer.close(index); @@ -683,7 +730,7 @@ //缂栬緫 椤甸潰璧嬪�� function RoadBillMain(linterid)//鍔犺浇琛ㄥご { - var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "'"; + var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; $.ajax({ url: GetWEBURL() + "/LEMS/MES_IF_ICMOBillList_Json", type: "GET", @@ -753,8 +800,226 @@ , "HRemark": d.data[0].琛ㄥご澶囨敞 }); form.render('select'); + } }) + } + + //瀹℃牳 + function set_CheckBill() { + layer.confirm("纭瑕佸鏍稿悧?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CheckSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 1, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //鍙嶅鏍� + function set_AbandonCheck() { + layer.confirm("纭瑕佸弽瀹℃牳鍚�?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CheckSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 2, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + HfBtn(); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //鍏抽棴 + function set_CloseBill() { + layer.confirm("纭瑕佸叧闂悧?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CloseSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 1, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelCloseBill').removeClass("layui-btn-disabled").attr("disabled", false); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //鍙嶅叧闂� + function set_CancelCloseBill() { + layer.confirm("纭瑕佸弽鍏抽棴鍚�?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CloseSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 2, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + HfBtn(); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //浣滃簾 + function set_CancelltionBill() { + layer.confirm("纭瑕佷綔搴熷悧?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CancellSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 1, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelCloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelltionBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCancelltion').removeClass("layui-btn-disabled").attr("disabled", false); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //鍙嶄綔搴� + function set_AbandonCancelltion() { + layer.confirm("纭瑕佸弽浣滃簾鍚�?", function (index) { + var wait = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Sc_ICMOBill/CancellSc_ICMOReportBill', + type: "GET", + data: { "HInterID": $("#HInterID").val(), "Type": 2, "user": sessionStorage["HUserName"] }, + success: function (result) { + if (result.count == 1) { + HfBtn(); + layer.msg(result.Message, { icon: 1 }); + layer.close(wait); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + + //鎸夐挳鎭㈠ + function HfBtn() { + //鏂板 鏃� 绂佺敤鍏朵粬鎸夐挳 + if (OperationType == 1) { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelCloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelltionBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCancelltion').addClass("layui-btn-disabled").attr("disabled", true); + } else if (OperationType == 3) { + //鏌ヨ鏁版嵁 + var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "' and HEntryID=" + HEntryID; + $.ajax({ + url: GetWEBURL() + "/LEMS/MES_IF_ICMOBillList_Json", + type: "GET", + async: false, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, + success: function (d) { + //姣忔鎭㈠鎸夐挳 + $('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CloseBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CancelCloseBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_CancelltionBill').removeClass("layui-btn-disabled").attr("disabled", false); + $('#set_AbandonCancelltion').removeClass("layui-btn-disabled").attr("disabled", false); + + //绂佺敤鎸夐挳 + if (d.data[0]["浣滃簾浜�"] != "") { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelCloseBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CancelltionBill').addClass("layui-btn-disabled").attr("disabled", true); + } else { + $('#set_AbandonCancelltion').addClass("layui-btn-disabled").attr("disabled", true); + + if (d.data[0]["鍏抽棴浜�"] != "") { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + $('#set_CloseBill').addClass("layui-btn-disabled").attr("disabled", true); + } + else { + $('#set_CancelCloseBill').addClass("layui-btn-disabled").attr("disabled", true); + + if (d.data[0]["瀹℃牳浜�"] != "") { + $('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true); + } + else { + $('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true); + } + } + } + } + }) + } } //闈炵┖楠岃瘉 @@ -783,10 +1048,10 @@ return false; } - if ($("#BomName").val() == "") { - layer.msg("BOM娌℃湁閫夋嫨"); - return false; - } + //if ($("#BomName").val() == "") { + // layer.msg("BOM娌℃湁閫夋嫨"); + // return false; + //} return true; diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" index b6d2511..d2d9389 100644 --- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" +++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" @@ -704,7 +704,7 @@ , area: ['100%', '100%'] , title: '鐢熶骇璁㈠崟鏂板' , shift: 0//寮瑰嚭鍔ㄧ敾 - , content: '../鐢熶骇浠诲姟鍗�/Sc_ICMOBillEdit_NoTable.html?OperationType=1&linterid=' + , content: '../鐢熶骇浠诲姟鍗�/Sc_ICMOBillEdit_NoTable.html?OperationType=1&linterid=&HEntryID=1' , end: function () { //鍒锋柊椤甸潰, location.reload(); @@ -718,13 +718,14 @@ , data = checkStatus.data; if (checkStatus.data.length === 1) { var linterid = data[0].hmainid; + var HEntryID = data[0].hsubid; layer.open({ type: 2 , area: ['100%', '100%'] , title: '鐢熶骇璁㈠崟缂栬緫' , shift: 0//寮瑰嚭鍔ㄧ敾 - , content: '../鐢熶骇浠诲姟鍗�/Sc_ICMOBillEdit_NoTable.html?OperationType=3&linterid=' + linterid + '' + , content: '../鐢熶骇浠诲姟鍗�/Sc_ICMOBillEdit_NoTable.html?OperationType=3&linterid=' + linterid + '&HEntryID=' + HEntryID , end: function () { //鍒锋柊椤甸潰, location.reload(); diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" index bb3d2df..9017fd0 100644 --- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" +++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBill.html" @@ -465,7 +465,8 @@ , "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false , "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0 , "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "" - , "HProcWorkNum": "" + , "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": "" + , "HWHID": 0,"HWHName":"" }]; var HModName = "Sc_MouldDotCheckBillList"; //#endregion @@ -532,6 +533,12 @@ , { field: 'HPicNum', title: '鍥剧焊缂栧彿', edit: 'text' } , { field: 'HProcCheckNote', title: '鏈伐搴忕‘璁よ褰�', edit: 'text' } , { field: 'HProcWorkNum', title: '绋嬪簭鍙�', edit: 'text' } + , { field: 'HBadWHID', title: 'HBadWHID', hide: true }//, hide: true + , { field: 'HBadWHName', title: '涓嶈壇鍝佷粨', edit: 'text', event: "HBadWHID" }//f7 + , { field: 'HWasterWHID', title: 'HWasterWHID', hide: true }//, hide: true + , { field: 'HWasterWHName', title: '鎶ュ簾鍝佷粨', edit: 'text', event: "HWasterWHID" }//f7 + , { field: 'HWHID', title: 'HWHID', hide: true }//, hide: true + , { field: 'HWHName', title: '鑹搧浠�', edit: 'text', event: "HWHID" }//f7 , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } ]] //, done: function (res, curr, count) { @@ -761,7 +768,8 @@ , "HFixPrice": 0, "HProcPrice": 0, "HBadPrice": 0, "HWasterPrice": 0, "HStdFlag": false , "HBeginDayQty": 0, "HBeginFixQty": 0, "HFixWorkDays": 0, "HTrunWorkDays": 0, "HReadyTimes": 0 , "HICMOReadyTimes": 0, "HAutoTrunFlag": false, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "" - , "HProcWorkNum": "" + , "HProcWorkNum": "", "HBadWHID": 0, "HBadWHName": "", "HWasterWHID": 0, "HWasterWHName": "" + , "HWHID": 0, "HWHName": "" }; switch (obj.event) { case 'btn-AddLine': @@ -1390,6 +1398,99 @@ } }) } + //涓嶈壇鍝佷粨 + if (obj.event == "HBadWHID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "浠撳簱鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=0&HOtherOrgID=" + sessionStorage["OrganizationID"], "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length != 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HBadWHID": checkStatus.data[0].HItemID + , "HBadWHName": checkStatus.data[0].HName + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鑹搧浠� + if (obj.event == "HWHID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "浠撳簱鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=0&HOtherOrgID=" + sessionStorage["OrganizationID"], "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length != 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HWHID": checkStatus.data[0].HItemID + , "HWHName": checkStatus.data[0].HName + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + + //鎶ュ簾鍝佷粨 + if (obj.event == "HWasterWHID") { + //鎵撳紑浜哄憳琛� 灏忕獥浣� + layer.open({ + type: 2 + , skin: "layui-layer-rim" //鍔犱笂杈规 + , title: "浠撳簱鍒楄〃" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["90%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: ["../../Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=0&HOtherOrgID=" + sessionStorage["OrganizationID"], "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鎸夐挳涓� 鐨勫洖璋� + var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰 + var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹� + + if (checkStatus.data.length != 1) { + return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�"); + } + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + obj.update({ + "HWasterWHID": checkStatus.data[0].HItemID + , "HWasterWHName": checkStatus.data[0].HName + }) + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + obj.event = ""; return false; } @@ -1477,7 +1578,8 @@ , "HFixPrice": d.data[i].鐝骇瀹氶, "HProcPrice": d.data[i].鍔犲伐鍗曚环, "HBadPrice": d.data[i].涓嶅悎鏍煎崟浠�, "HWasterPrice": d.data[i].鎶ュ簾鍗曚环, "HStdFlag": d.data[i].鏍囧噯瀹氶 , "HBeginDayQty": d.data[i].寮�宸ヤ綑閲忓ぉ鏁�, "HBeginFixQty": d.data[i].寮�宸ヤ綑閲忓浐鏁�, "HFixWorkDays": d.data[i].涓婇亾鍥哄畾澶╂暟, "HTrunWorkDays": d.data[i].涓婇亾寰幆鍛ㄦ湡, "HReadyTimes": d.data[i].鏈亾鍑嗗鏃堕棿 , "HICMOReadyTimes": d.data[i].鎹㈠崟鍑嗗鏃堕棿, "HAutoTrunFlag": d.data[i].鑷姩绉昏浆, "HTechnologyParameter": d.data[i].宸ヨ壓鍙傛暟, "HPicNum": d.data[i].鍥剧焊缂栧彿, "HProcCheckNote": d.data[i].鏈伐搴忕‘璁よ褰� - , "HProcWorkNum": d.data[i].绋嬪簭鍙� + , "HProcWorkNum": d.data[i].绋嬪簭鍙�, "HBadWHID": d.data[i].HBadWHID, "HBadWHName": d.data[i].HBadWHName, "HWasterWHID": d.data[i].HWasterWHID, "HWasterWHName": d.data[i].HWasterWHName + , "HWHID": d.data[i].HWHID, "HWHName": d.data[i].HWHName } ) } @@ -1580,12 +1682,39 @@ //} var num = []; for (var i = 0; i < option.data.length; i++) { + //娴佹按鍙� if ($.inArray(option.data[i]["HProcNo"], num) == -1) { num.push(option.data[i]["HProcNo"]); } else { - layer.msg("娴佹按鍙�:" + option.data[i]["HProcNo"] + "閲嶅!"); + layer.msg("绗�" + (i + 1) + "琛�,娴佹按鍙�:" + option.data[i]["HProcNo"] + "閲嶅!"); return false; } + //娴佹按鍙蜂笉涓虹┖ + if (option.data[i]["HProcNo"] == "") { + layer.msg("绗�" + (i + 1) + "琛�:娴佹按鍙蜂笉鑳戒负绌�!"); + return false; + } + //浠撳簱閲嶅 + if (option.data[i]["HBadWHID"] != 0 && option.data[i]["HWasterWHID"] != 0) { + + if (option.data[i]["HBadWHID"] == option.data[i]["HWasterWHID"]) { + layer.msg("绗�" + (i + 1) + "琛�:涓嶈壇鍝佷粨鍜屾姤搴熷搧浠撻噸澶�!"); + return false; + } + } + if (option.data[i]["HBadWHID"] != 0 && option.data[i]["HWHID"] != 0) { + if (option.data[i]["HBadWHID"] == option.data[i]["HWHID"]) { + layer.msg("绗�" + (i + 1) + "琛�:涓嶈壇鍝佷粨鍜岃壇鍝佷粨閲嶅!"); + return false; + } + } + if (option.data[i]["HWasterWHID"] != 0 && option.data[i]["HWHID"] != 0) { + if (option.data[i]["HWasterWHID"] == option.data[i]["HWHID"]) { + layer.msg("绗�" + (i + 1) + "琛�:鎶ュ簾鍝佷粨鍜岃壇鍝佷粨閲嶅!"); + return false; + } + } + } return true; diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillimport.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillimport.html" index d8931a4..ceb0d56 100644 --- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillimport.html" +++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillimport.html" @@ -279,6 +279,9 @@ , { field: '鐗堟湰', title: '鐗堟湰', width: 120 } , { field: '妯″叿缂栧彿', title: '妯″叿缂栧彿', width: 120 } , { field: '绋嬪簭鍙�', title: '绋嬪簭鍙�', width: 120 } + , { field: '涓嶈壇鍝佷粨', title: '涓嶈壇鍝佷粨', width: 120 } + , { field: '鎶ュ簾鍝佷粨', title: '鎶ュ簾鍝佷粨', width: 120 } + , { field: '鑹搧浠�', title: '鑹搧浠�', width: 120 } , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' } ]] }; diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" index 2621a6f..727180a 100644 --- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" +++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\346\265\201\350\275\254\345\215\241/Sc_ProcessExchangeBill.html" @@ -224,6 +224,7 @@ <label class="layui-form-label">宸ヨ壓璺嚎</label> <div class="layui-input-inline"> <input type="text" class="layui-input" name="RoutingBill" id="RoutingBill" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> + <input type="hidden" class="layui-input" name="HRoutingBillID" id="HRoutingBillID" > <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnRoutingBill" id="btnRoutingBill" style="width: 40px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> </button> @@ -1504,6 +1505,7 @@ var Tablerow = []; $("#RoutingBill").val(data[0].鍗曟嵁鍙�) + $("#HRoutingBillID").val(data[0].hmainid) for (var i = 0; i < data.length; i++) { Tablerow.push({ -- Gitblit v1.9.1