From 7e10d92be344a9bdbf6d8aa12ad6ccf8b713e5ce Mon Sep 17 00:00:00 2001
From: cnf <3200815559@qq.com>
Date: 星期二, 02 九月 2025 16:16:13 +0800
Subject: [PATCH] 生产领料增加物料筛选

---
 H5/Js/Scll.js |   51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/H5/Js/Scll.js b/H5/Js/Scll.js
index 94a8b49..ec387f3 100644
--- a/H5/Js/Scll.js
+++ b/H5/Js/Scll.js
@@ -37,19 +37,23 @@
         getModel() {
             var that = this;
             that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/GetItemsByDaa001', {
+            that.AxiosHttp("post", 'Womdaa/GetItemsByDaa001User', {
                 daa001: that.modeInfo.daa001,
                 userName: that.userInfo.loginAccount
             }, false)
                 .then(function (res) {
                     var json = res;
+                   
                     if (json.status == 0) {
+                        console.log(json)
                         that.ItemDetail = json.data.tbBillList;
                         that.modeInfo.planNo = json.data.tbBillList.planNo;
+                        that.$playSound('success');
                         that.$refs.barcode.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.daa001.focus();
                         that.modeInfo.daa001 = "";
                         that.modeInfo.planNo = "";
@@ -60,6 +64,43 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    console.log(error);
+                    that.$refs.daa001.focus();
+                    that.modeInfo.daa001 = "";
+                });
+        },
+        getModelAll() {
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetItemsByDaa001', {
+                daa001: that.modeInfo.daa001,
+                userName: that.userInfo.loginAccount
+            }, false)
+                .then(function (res) {
+                    var json = res;
+
+                    if (json.status == 0) {
+                        console.log(json)
+                        that.ItemDetail = json.data.tbBillList;
+                        that.modeInfo.planNo = json.data.tbBillList.planNo;
+                        that.$playSound('success');
+                        that.$refs.barcode.focus();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        that.$refs.daa001.focus();
+                        that.modeInfo.daa001 = "";
+                        that.modeInfo.planNo = "";
+                        that.ItemDetail = [];
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
                     console.log(error);
                     that.$refs.daa001.focus();
                     that.modeInfo.daa001 = "";
@@ -74,10 +115,12 @@
             var that = this;
             if (that.modeInfo.daa001.length <= 0) {
                 that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
             if (that.scanInfo.barcode.length * 1 <= 0) {
                 that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$playSound('error');
                 return;
             }
 
@@ -99,6 +142,7 @@
                     }
                     else if (json.status == 2) {
                         that.$refs.splitNum.focus();
+                        that.$playSound('success');
                         that.scanInfo.splitNum = json.data.tbBillList.splitNum;
                         that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
                     }
@@ -127,14 +171,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.ip = "";
@@ -164,7 +211,7 @@
                         that.$notify({ type: 'success', message: json.message });
                         that.$playSound('success');
 
-                        that.sendMessage(json.data.tbBillList);
+                        //that.sendMessage(json.data.tbBillList);
 
                         that.$refs.barcode.focus();
                         that.getModel();

--
Gitblit v1.9.3