From 8871503302b7717f6f38256ef3dc3403ff62f433 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期四, 22 五月 2025 15:26:40 +0800 Subject: [PATCH] 1.采购入库优化 --- H5/PurchaseInventory.aspx | 2 +- H5/Js/PurchaseInventory.js | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/H5/Js/PurchaseInventory.js b/H5/Js/PurchaseInventory.js index 060010e..f00beb1 100644 --- a/H5/Js/PurchaseInventory.js +++ b/H5/Js/PurchaseInventory.js @@ -58,6 +58,7 @@ } else { that.$toast.fail(json.message); + that.$playSound('error'); that.depotData = []; that.sectionCode = ""; } @@ -66,6 +67,7 @@ .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); that.depotData = []; that.sectionCode = ""; that.$refs.sectionCode.focus(); @@ -73,7 +75,19 @@ }, getScan() { var that = this; - + + if (that.formData.barcode.length * 1 <= 0) { + that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); + that.$playSound('error'); + return; + } + + if (that.sectionCode.length * 1 <= 0) { + that.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖锛�"); + that.$playSound('error'); + return; + } + that.isLoading = true; that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', { sectionCode: that.sectionCode, @@ -92,18 +106,21 @@ //that.barMessage = json.data.tbBillList.message; that.$refs.barcode.focus(); that.formData.barcode = null; + that.$notify({ type: 'success', message: json.message }); + that.$playSound('success'); } else { that.$toast.fail(json.message); + that.$playSound('error'); that.$refs.barcode.focus(); that.formData.barcode = null; } - that.$notify({ type: 'success', message: json.message }); that.isLoading = false; }) .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); that.$refs.barcode.focus(); }); @@ -112,14 +129,17 @@ var that = this; if (that.modeInfo.daa001.length <= 0) { that.$toast.fail("棰嗘枡鍗曞彿涓嶈兘涓虹┖锛�"); + that.$playSound('error'); return; } if (that.scanInfo.splitNum * 1 <= 0) { that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�"); + that.$playSound('error'); return; } if (that.scanInfo.barcode.length * 1 <= 0) { that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); + that.$playSound('error'); return; } that.isLoading = true; @@ -135,12 +155,14 @@ } else { that.$toast.fail(json.message); + that.$playSound('error'); } that.isLoading = false; }) .catch(function (error) { that.isLoading = false; that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); console.log(error); }); }, diff --git a/H5/PurchaseInventory.aspx b/H5/PurchaseInventory.aspx index 440e205..ac2c31a 100644 --- a/H5/PurchaseInventory.aspx +++ b/H5/PurchaseInventory.aspx @@ -201,5 +201,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/PurchaseInventory.js?<%=1236111 %>"></script> + <script src="Js/PurchaseInventory.js?<%=123611111 %>"></script> </asp:Content> -- Gitblit v1.9.3