From 9528e79a808753846c408ac4c1a66e3965dd49e3 Mon Sep 17 00:00:00 2001 From: Juj <1005539536@qq.com> Date: Sat, 30 Dec 2023 20:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BD=90=E5=A5=97=E5=BC=80?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OMAY/Views/ICSMoCreateLot/From.cshtml | 109 +++++++++--------- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/From.cshtml b/WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/From.cshtml index 5514d80..9d48186 100644 --- a/WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/From.cshtml +++ b/WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/From.cshtml @@ -829,48 +829,39 @@ } if (Type == '3') { - //var Flag = GetGetGeneratedNum(MOCode, Sequence, thisCreateQty); - //if (Flag == false) { - // $.modalAlert("该单据生成数量异常,请重新确认单据信息!"); - // return; - //} - - - var AvailQty = ''; - var AllQty = ''; - var Msg = ''; - var Qty= $("#thisCreateQty").val() - //var Header = { - // WorkPoint: WorkPoints, - // DetailID: MODetailID, - // Type: '生产订单', - // InQty: $("#CreatedQty").val(), - // Qty: $("#thisCreateQty").val(), - // Prorate: Prorate, - //} - //var keyValue = []; - //keyValue.push(Header); + var Complete = ''; $.ajax({ - url: "/OMAY/ICSMoCreateLot/GetAbsolveQty?MOCode=" + MOCode + "&Sequence=" + Sequence + "&Qty=" + Qty, - //data: { keyValue: JSON.stringify(keyValue) }, + url: "/WMS/WMSCreateItemLot/GetComplete" + "?" + Math.random(), dataType: "json", async: false, success: function (data) { - Msg = data.msg; - AvailQty = data.AvailQty; - AllQty = data.AllQty; + + if (data != null && data.length > 0) { + Complete = data[0].Enable; + } } }); - if (Msg != '') { - $.modalAlert("ERP:"+Msg); - return; - } - //if (thisCreateQty > (QiSetNum - CreatedQty)) { - // $.modalAlert("该订单未发料,请发料后生成条码!"); - // $("#thisCreateQty").val(""); - // return; - //} + if (Complete == true) { + var AvailQty = ''; + var AllQty = ''; + var Msg = ''; + var Qty= $("#thisCreateQty").val() + $.ajax({ + url: "/OMAY/ICSMoCreateLot/GetAbsolveQty?MOCode=" + MOCode + "&Sequence=" + Sequence + "&Qty=" + Qty, + dataType: "json", + async: false, + success: function (data) { + Msg = data.msg; + AvailQty = data.AvailQty; + AllQty = data.AllQty; + } + }); + if (Msg != '') { + $.modalAlert("ERP:"+Msg); + return; + } + } $.submitForm({ url: "/OMAY/ICSMoCreateLot/SubmitFormChengPing?MOCode=" + MOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints + "&AMEnable=" + AMEnable, @@ -884,33 +875,45 @@ } if (Type == '18') { - //var Flag = GetGetGeneratedNum(FCPMOCode, Sequence, thisCreateQty); - //if (Flag==false) { - // $.modalAlert("该单据生成数量异常,请重新确认单据信息!"); - // return; - //} - - var AvailQty = ''; - var AllQty = ''; - var Msg = ''; - var Qty = $("#thisCreateQty").val() + var Complete = ''; $.ajax({ - url: "/OMAY/ICSMoCreateLot/GetFCPAbsolveQty?MOCode=" + FCPMOCode + "&Sequence=" + Sequence + "&Qty=" + Qty, - // data: { keyValue: JSON.stringify(keyValue) }, + url: "/WMS/WMSCreateItemLot/GetComplete" + "?" + Math.random(), dataType: "json", async: false, success: function (data) { - Msg = data.msg; - AvailQty = data.AvailQty; - AllQty = data.AllQty; + + if (data != null && data.length > 0) { + Complete = data[0].Enable; + } } }); - if (Msg != '') { - $.modalAlert(Msg); - return; + + if (Complete == true) { + + var AvailQty = ''; + var AllQty = ''; + var Msg = ''; + var Qty = $("#thisCreateQty").val(); + $.ajax({ + url: "/OMAY/ICSMoCreateLot/GetFCPAbsolveQty?MOCode=" + FCPMOCode + "&Sequence=" + Sequence + "&Qty=" + Qty, + dataType: "json", + async: false, + success: function (data) { + Msg = data.msg; + AvailQty = data.AvailQty; + AllQty = data.AllQty; + } + }); + if (Msg != '') { + $.modalAlert("ERP:" + Msg); + return; + } + } + + $.submitForm({ url: "/OMAY/ICSMoCreateLot/SubmitFormFCP?FCPMOCode=" + FCPMOCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints + "&AMEnable=" + AMEnable, param: {