From 65e595c85e7ff31252c651f05949b711209f45ec Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 09:49:31 +0800
Subject: [PATCH] 称重逻辑调整

---
 H5/Js/Cpbdsj.js |  539 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 496 insertions(+), 43 deletions(-)

diff --git a/H5/Js/Cpbdsj.js b/H5/Js/Cpbdsj.js
index d75d54c..12758c9 100644
--- a/H5/Js/Cpbdsj.js
+++ b/H5/Js/Cpbdsj.js
@@ -1,4 +1,5 @@
-锘縱ar vm = new Vue({
+锘�
+var vm = new Vue({
     el: '#app',
     data: function () {
         return {
@@ -15,8 +16,27 @@
             KbBarMxInfo: [],
             GX: "G007:鏍稿閫佹",
             Xvalue:4,
-            XbarInfo: [],
+            XbarInfo: [
+                //{
+                //    iteM_BARCODE: "",      // 鏉$爜
+                //    item_no: "",           // 鐗╂枡缂栧彿
+                //    item_name: "",         // 鐗╂枡鍚嶇О
+                //    item_model: "",        // 瑙勬牸鍨嬪彿
+                //    quantity: 0,           // 鏁伴噺
+                //    is_hedui: "0",          // 鏄惁鏍稿(1:宸叉牳瀵� 0:鏈牳瀵�),
+                //    weight: ""          // 浜у搧閲嶉噺
+                //}
+            ],
             DAA001: [],
+            DAA015: "",
+            show: false,//鍒楄〃灞曠ず
+            actions: [],//鍒楄〃鐨勫��
+            xtName: "",//绾夸綋鍚嶇О
+            xtNum: "",//绾夸綋缂栧彿
+            AgvDw: "",//AGV鐐逛綅
+            agvChecked: false,//鏄惁鍕鹃�堿GV
+            showAgvDw: false,//鐐逛綅灞曠ず
+            actionsAgvDw: [],//鍒楄〃AGV鐐逛綅
         }
     },
     mounted() {
@@ -27,6 +47,17 @@
         };
     },
     methods: {
+        handleAgvPositions(positionStr) {
+            if (!positionStr) return [];
+
+            // 妫�鏌ユ槸鍚﹀瓨鍦ㄩ�楀彿锛屽鏋滀笉瀛樺湪鍒欒繑鍥炵┖鏁扮粍
+            if (!positionStr.includes(',')) return [];
+
+            // 灏嗗瓧绗︿覆鎸夐�楀彿鍒嗗壊骞惰浆鎹负閫夐」鏁扮粍
+            return positionStr.split(',').map(pos => ({
+                name: pos.trim() // 鍘婚櫎鍙兘鐨勭┖鏍�
+            }));
+        },
         getKbBarInfo() {
             var that = this;
             that.isLoading = true;
@@ -36,16 +67,43 @@
             }, false)
                 .then(function (res) {
                     var json = res;
+
                     if (json.status == 0) {
+                        console.log(json.data.tbBillList.kbBarInfo[0].agvPostion);
                         that.KbBarInfo = json.data.tbBillList.kbBarInfo[0];
                         that.DAA001 = that.KbBarInfo.daA001;
+                        that.DAA015 = that.KbBarInfo.daA015;
+                        console.log(that.KbBarInfo)
                         that.KbBarMxInfo = json.data.tbBillList.kbBarMxInfo;
                         that.$refs.XBar.focus();
                         that.XbarInfo = [];
                         that.XBar = "";
+
+                        // 妫�鏌ユ槸鍚﹀瓨鍦ㄩ�楀彿
+                        //const agvPosition = json.data.tbBillList.kbBarInfo[0].agvPostion;
+                        //that.AgvDw = agvPosition.includes(',') ? agvPosition.split(',')[0] : '';
+                        const agvPostion = json.data && json.data.tbBillList && json.data.tbBillList.kbBarInfo &&
+                            json.data.tbBillList.kbBarInfo[0] && json.data.tbBillList.kbBarInfo[0].agvPostion;
+
+                        if (agvPostion != null) {
+                            const agvPostionStr = String(agvPostion);
+                            that.AgvDw = agvPostionStr.split(',')[0];
+                            that.actionsAgvDw = that.handleAgvPositions(agvPostionStr);
+                        } else {
+                            that.AgvDw = null;
+                            that.actionsAgvDw = null;
+                        }
+
                     }
                     else {
-                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
                         that.$refs.KbBar.focus();
                         that.KbBar = "";
                     }
@@ -53,7 +111,14 @@
                 })
                 .catch(function (error) {
                     that.isLoading = false;
-                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    //that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
                     that.$refs.KbBar.focus();
                     that.KbBar = "";
                 });
@@ -61,6 +126,7 @@
         getXBarInfo() {
             var that = this;
             if (that.KbBar.length <= 0) {
+                that.$playSound('error');
                 that.$toast.fail("鍗℃澘鏉$爜涓嶈兘涓虹┖锛�");
                 that.$refs.KbBar.focus();
                 that.XBar = "";
@@ -68,6 +134,7 @@
             }
 
             if (that.DAA001.length <= 0) {
+                that.$playSound('error');
                 that.$toast.fail("鎸囦护宸ュ崟涓嶈兘涓虹┖锛�");
                 that.$refs.KbBar.focus();
                 that.XBar = "";
@@ -76,7 +143,30 @@
 
             // 妫�鏌ユ槸鍚﹁秴杩囪绠辨暟
             if (that.XbarInfo.length >= that.Xvalue) {
-                that.$toast.fail(`宸茶揪鍒拌绠辨暟闄愬埗(${that.Xvalue})`);
+                that.$playSound('error');
+                //that.$toast.fail(`宸茶揪鍒拌绠辨暟闄愬埗(${that.Xvalue})`);
+                that.$dialog.alert({
+                    message: `宸茶揪鍒拌绠辨暟闄愬埗(${that.Xvalue})`,
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
+                that.XBar = "";
+                return;
+            }
+
+            //寰呰鏁�
+            var Dvalue = (that.KbBarInfo.quantity || 0) - +(that.KbBarInfo.ySum || 0)
+            // 妫�鏌ユ槸鍚﹁秴杩囪绠辨暟
+            if (that.Xvalue > Dvalue) {
+                that.$playSound('error');
+                //that.$toast.fail(`瑁呯鏁�(${that.Xvalue}) 涓嶈兘澶т簬 鍗℃澘寰呰鏁�(${Dvalue})`);
+                that.$dialog.alert({
+                    message: `瑁呯鏁�(${that.Xvalue}) 涓嶈兘澶т簬 鍗℃澘寰呰鏁�(${Dvalue})`,
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
                 that.XBar = "";
                 return;
             }
@@ -84,43 +174,78 @@
             // 妫�鏌ユ潯鐮佹槸鍚﹀凡瀛樺湪
             const isExist = that.XbarInfo.some(item => item.iteM_BARCODE === that.XBar);
             if (isExist) {
-                that.$toast.fail("璇ョ鏉$爜宸插瓨鍦紝璇峰嬁閲嶅鎵弿");
+                that.$playSound('error');
+                //that.$toast.fail("璇ョ鏉$爜宸插瓨鍦紝璇峰嬁閲嶅鎵弿");
+                that.$dialog.alert({
+                    message: "璇ョ鏉$爜宸插瓨鍦紝璇峰嬁閲嶅鎵弿",
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
                 that.XBar = "";
                 return;
             }
 
             that.isLoading = true;
             that.AxiosHttp("post", 'Womdaa/getXBarInfo', {
-                Kbbarcode: that.KbBar,
+                KbBar: that.KbBar,
                 DAA001: that.DAA001,
+                userName: that.userInfo.loginAccount,
                 Xbarcode: that.XBar
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
                         that.XbarInfo.push(json.data.tbBillList.xBarInfo[0]);
+                        that.$playSound('success');
                         that.$refs.XBar.focus();
                         that.XBar = "";
+
+                        // 妫�鏌ユ槸鍚﹁秴杩囪绠辨暟
+                        if (that.XbarInfo.length >= that.Xvalue) {
+                            that.$refs.LsBar.focus();
+                        }
                     }
                     else {
-                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        that.XBar = "";
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
-                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.XBar = "";
+                    that.$playSound('error');
+                    //that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
                 });
         },
-
-
         productBinding() {
+
+            if (this.isLoading) {
+                return;
+            }
+
             var that = this;
             if (that.ZsBar.length <= 0) {
+                that.$playSound('error');
                 that.$toast.fail("杩芥函鐮佷笉鑳戒负绌猴紒");
                 return;
             }
             if (that.LsBar.length <= 0) {
+                that.$playSound('error');
                 that.$toast.fail("鍚庣洊鐮佷笉鑳戒负绌猴紒");
                 return;
             }
@@ -135,13 +260,21 @@
                     var json = res;
                     if (json.status == 0) {
                         // that.scanInfo = json.data.tbBillList;
+                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                         that.$refs.ZsBar.focus();
                         that.ZsBar = null;
                         that.ZsBar = null;
                     }
                     else {
-                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
                         that.$refs.ZsBar.focus();
                         that.ZsBar = null;
                         that.ZsBar = null;
@@ -151,31 +284,24 @@
                 })
                 .catch(function (error) {
                     that.isLoading = false;
-                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    //that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
                     that.$refs.ZsBar.focus();
                     that.ZsBar = null;
                     that.ZsBar = null;
                 });
         },
-        //鎵撳嵃鏈烘敞閲�
-        //selectPrinter(printer) {
-        //    this.selectedPrinter = printer.printerId; // 鏇存柊閫変腑鐨勬墦鍗版満缂栧彿
-        //},
-        //confirmSelection() {
-        //    if (this.selectedPrinter) {
-        //        alert(`鎮ㄩ�夋嫨浜嗘墦鍗版満锛�${this.selectedPrinter}`);
-        //        // 鍦ㄨ繖閲屽鐞嗛�夋嫨缁撴灉锛屼緥濡傝皟鐢ㄦ帴鍙f垨鏇存柊鐘舵��
-        //        this.isPrinterPopupVisible = false; // 鍏抽棴寮圭獥
-        //    } else {
-        //        alert('璇烽�夋嫨涓�涓墦鍗版満锛�');
-        //    }
-        //},
-        //onPrinterSelected(value) {
-        //    console.log('褰撳墠閫変腑鐨勬墦鍗版満缂栧彿:', value);
-        //},
         checkProductBarcode() {
+
             var that = this;
             if (!that.LsBar) {
+                that.$playSound('error');
                 that.$toast.fail("璇疯緭鍏ヤ骇鍝佹潯鐮�");
                 return;
             }
@@ -189,24 +315,95 @@
                 if (matchedItem.is_hedui === "1") {
                     that.$toast("宸叉牳瀵�");
                 } else {
-                    that.$set(matchedItem, 'is_hedui', "1");
-                    that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
-                    that.LsBar = "";
-                    // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
-                    const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
-                    if (allChecked && that.XbarInfo.length > 0) {
-                        that.submitAllChecked();
+                    console.log(that.DAA015);
+                    if ((that.DAA015) === "462") {
+                        that.$set(matchedItem, 'is_hedui', "1");
+                        // 鍙牴鎹渶瑕佽缃� weight锛岃繖閲屼繚鎸佷负绌�/涓嶅彉
+                        that.$playSound('success');
+                        that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
+                        that.LsBar = "";
+                        // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
+                        const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
+                        if (allChecked && that.XbarInfo.length > 0 && that.XbarInfo.length === that.Xvalue) {
+                            that.submitAllChecked();
+                        }
+                        // 鐩存帴杩斿洖锛屼笉璋冪敤 GetWeightByXt
+                        return;
                     }
+
+                    that.AxiosHttp("post", 'Womdaa/GetWeightByXt', {
+                        LsBar: that.LsBar,
+                        userName: that.userInfo.loginAccount
+                    }, false)
+                        .then(function (res) {
+                            var json = res;
+                            if (json.status == 0) {
+                                var weigth = json.data.tbBillList.weight;
+                                that.$set(matchedItem, 'is_hedui', "1");
+                                that.$set(matchedItem, 'weight', weigth);
+                                that.$playSound('success');
+                                that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
+                                that.LsBar = "";
+                                // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
+                                const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
+                                if (allChecked && that.XbarInfo.length > 0 && that.XbarInfo.length === that.Xvalue) {
+                                    that.submitAllChecked();
+                                }
+                            }
+                            else {
+                                that.$playSound('error');
+                                //that.$toast.fail(json.message);
+                                that.$dialog.alert({
+                                    message: json.message,
+                                    theme: 'round-button',
+                                }).then(() => {
+                                    // on close
+                                });
+                            }
+                            that.isLoading = false;
+                        })
+                        .catch(function (error) {
+                            that.isLoading = false;
+                            that.$playSound('error');
+                            //that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                            that.$dialog.alert({
+                                message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                                theme: 'round-button',
+                            }).then(() => {
+                                // on close
+                            });
+                        });
                 }
             } else {
-                that.$toast.fail("鏈壘鍒板尮閰嶇殑绠辨潯鐮�");
+                that.$playSound('error');
+                //that.$toast.fail("鏈壘鍒板尮閰嶇殑绠辨潯鐮�");
+                that.$dialog.alert({
+                    message: "鏈壘鍒板尮閰嶇殑绠辨潯鐮�",
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
             }
             
             that.LsBar = ""; // 娓呯┖杈撳叆妗�
         },
 
+        handleClear() {
+            this.KbBar = "";
+            this.XBar = "";
+            this.LsBar = "";
+            this.DAA001 = [];
+            this.XbarInfo = [];
+
+        },
+
         // 鏂板鏂规硶锛氭彁浜ゆ墍鏈夊凡鏍稿鐨勬暟鎹�
         submitAllChecked() {
+
+            if (this.isLoading) {
+                return;
+            }
+
             var that = this;
             that.isLoading = true;
             
@@ -218,10 +415,18 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
+                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                         that.getKbBarInfo();
                     } else {
-                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
                         that.XbarInfo = [];
                         that.XBar = "";
                         that.LsBar = "";
@@ -231,22 +436,42 @@
                 })
                 .catch(function (error) {
                     that.isLoading = false;
-                    that.$toast.fail("缁戝畾澶辫触锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    //that.$toast.fail("缁戝畾澶辫触锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
                 });
         },
         handleSubmit() {
+
+            if (this.isLoading) {
+                return;
+            }
+
             var that = this;
             if (!that.KbBar) {
+                that.$playSound('error');
                 that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜");
                 return;
             }
     
             // 璁$畻鍙鏁板拰宸茶鏁�
-            const oldqty = +(that.KbBarInfo.oldqty || 0);
+            const oldqty = +(that.KbBarInfo.quantity || 0);
             const ySum = +(that.KbBarInfo.ySum || 0);
             
             if (oldqty !== ySum) {
-                that.$toast.fail(`瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`);
+                that.$playSound('error');
+                //that.$toast.fail(`瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`);
+                that.$dialog.alert({
+                    message: `瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`,
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
                 return;
             }
     
@@ -258,6 +483,7 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
+                        that.$playSound('success');
                         that.$notify({ type: 'success', message: json.message });
                         // 娓呯┖鏁版嵁
                         that.KbBar = "";
@@ -265,15 +491,242 @@
                         that.KbBarInfo = [];
                         that.$refs.KbBar.focus();
                     } else {
-                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
-                    that.$toast.fail("鎻愪氦澶辫触锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    //that.$toast.fail("鎻愪氦澶辫触锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
                     that.$refs.KbBar.focus();
                 });
         },
+
+        onSelect(action) {
+            this.xtNum = action.lineNo;  // 缁戝畾line_no鍒皒tNum瀛楁
+            console.log("閫夋嫨鐨勭嚎浣撶紪鍙凤細", this.xtNum);
+            this.xtName = action.name;  // 缁戝畾name鍒皒tName瀛楁
+            if (action.agvPostion != null) {
+                const agvPostionStr = String(action.agvPostion);
+                this.AgvDw = agvPostionStr.split(',')[0];
+                this.actionsAgvDw = this.handleAgvPositions(agvPostionStr);
+            }
+            this.show = false;
+        },
+
+        onSelectAgvDw(action) {
+            this.AgvDw = action.name;
+            this.showAgvDw = false;
+        },
+
+        selectDW() {
+            this.showAgvDw = true;
+        },
+
+        //鑾峰彇鍙懠鍙獳GV鐨勭嚎浣�
+        selectXt() {
+            this.show = true;
+            var that = this;
+            that.actions = [];
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetAgvXt', {
+                selectKey: that.selectKey,
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                        if (json.data.tbBillList.length <= 0) {
+                            that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
+                            that.$playSound('error');
+                        } else {
+                            that.itemInfo = json.data.tbBillList;
+                            that.actions = json.data.tbBillList.map(item => {
+                                return {
+                                    name: item.name,
+                                    lineNo: item.line_no,  // 鏂板
+                                    agvPostion: item.agvPostion
+                                };
+                            });
+                        }
+                    }
+                    else {
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
+                        that.$playSound('error');
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    //that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "缃戠粶閿欒锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
+                    that.$playSound('error');
+                    console.log(error);
+                });
+        },
+
+        //AGV閫佹
+        handleAGVInspection() {
+
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
+
+            if (this.isLoading) {
+                return;
+            }
+
+
+            var that = this;
+            if (that.agvChecked === false)
+            {
+                that.$playSound('error');
+                that.$toast.fail("AGV閫佹璇峰厛鍕鹃�� AGV");
+                return;
+            }
+
+            if (!that.KbBar) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜");
+                return;
+            }
+
+            if (!that.AgvDw) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛閫夋嫨AGV鐐逛綅");
+                return;
+            }
+    
+            // 璁$畻鍙鏁板拰宸茶鏁�
+            const oldqty = +(that.KbBarInfo.quantity || 0);
+            const ySum = +(that.KbBarInfo.ySum || 0);
+            
+            if (oldqty !== ySum) {
+                that.$playSound('error');
+                //that.$toast.fail(`瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`);
+                that.$dialog.alert({
+                    message: `瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`,
+                    theme: 'round-button',
+                }).then(() => {
+                    // on close
+                });
+                return;
+            }
+    
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAGVInspection', {
+                KbBar: that.KbBar,
+                userAccount: that.userInfo.loginAccount,
+                AgvDw: that.AgvDw
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.$playSound('success');
+                        that.$notify({ type: 'success', message: json.message });
+                    } else {
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    //that.$toast.fail("AGV閫佹澶辫触锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "AGV閫佹澶辫触锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
+                    that.$refs.KbBar.focus();
+                });
+        },
+
+        //AGV鍛煎彨
+        handleAGVCall() {
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
+
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            if (!that.xtNum) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛閫夋嫨绾夸綋");
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAGVCall', {
+                XtNum: that.xtNum,
+                userAccount: that.userInfo.loginAccount,
+                AgvDw: that.AgvDw
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.$playSound('success');
+                        that.$notify({ type: 'success', message: json.message });
+                    } else {
+                        that.$playSound('error');
+                        //that.$toast.fail(json.message);
+                        that.$dialog.alert({
+                            message: json.message,
+                            theme: 'round-button',
+                        }).then(() => {
+                            // on close
+                        });
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    //that.$toast.fail("AGV鍛煎彨澶辫触锛岃閲嶈瘯锛�");
+                    that.$dialog.alert({
+                        message: "AGV鍛煎彨澶辫触锛岃閲嶈瘯锛�",
+                        theme: 'round-button',
+                    }).then(() => {
+                        // on close
+                    });
+                    that.$refs.KbBar.focus();
+                });
+        }
+
+
     }
 })
\ No newline at end of file

--
Gitblit v1.9.3