From a40798a6290b41c4aacab2e142a23b944743bda9 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 19 八月 2025 10:48:32 +0800
Subject: [PATCH] 1.核对送检新增AGV送检和AGV呼叫 2.样式优化

---
 Images/Style.css |    3 
 H5/AgvCz.aspx.cs |   14 +
 H5/Js/Cpbdsj.js  |   41 ++++
 H5/Cpdbsj.aspx   |    2 
 Mst.master       |    2 
 H5/AgvCz.aspx    |  140 +++++++++++++++
 H5/Js/AgvCz.js   |  320 +++++++++++++++++++++++++++++++++++
 7 files changed, 514 insertions(+), 8 deletions(-)

diff --git a/H5/AgvCz.aspx b/H5/AgvCz.aspx
new file mode 100644
index 0000000..3f561b9
--- /dev/null
+++ b/H5/AgvCz.aspx
@@ -0,0 +1,140 @@
+锘�<%@ Page Title="AGV鎿嶄綔" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="AgvCz.aspx.cs" Inherits="H5_Cpdbsj" %>
+<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
+  <style>
+    .si-status-box,
+    .si-status__left
+    {
+        background-color: transparent !important; /* 閫忔槑鑳屾櫙 */
+        border: 1px solid #000 !important; /* 榛戣壊澶栨 */
+        color: #000 !important; /* 鍏ㄥ眬鏂囧瓧棰滆壊 */
+        height: 0.5rem;
+    }
+
+    .si-status__left::after {
+        content: none !important;
+    }
+
+    .si-status__label,
+    .si-status__right {
+        font-size: 0.33rem !important; /* 缁熶竴瀛椾綋澶у皬 */
+        color: inherit !important; /* 缁ф壙鐖剁骇鏂囧瓧棰滆壊 */
+    }
+
+
+    /* 灞呬腑鏍稿績鏍峰紡 */
+.centered-stepper-field {
+  .stepper-container {
+    display: flex;
+    justify-content: center; /* 姘村钩灞呬腑 */
+    width: 100%;
+  }
+
+  /* 璋冩暣姝ヨ繘鍣ㄦ寜閽棿璺� */
+  .van-stepper__minus {
+    margin-right: 12px;
+  }
+  .van-stepper__plus {
+    margin-left: 12px;
+  }
+}
+
+      /* 鏂板鏍峰紡 */
+    .button-container {
+        display: flex;
+        width: 100%;
+        gap: 12px; /* 鎸夐挳闂磋窛 */
+        padding: 0 16px; /* 宸﹀彸鐣欑櫧 */
+        box-sizing: border-box;
+    }
+
+    .action-button {
+        flex: 1; /* 绛夊垎鍓╀綑绌洪棿 */
+        min-width: 0; /* 闃叉鍐呭婧㈠嚭 */
+    }
+
+    .van-checkbox__icon--checked .van-icon 
+    {
+        color: #ffffff !important;
+    }
+
+</style>
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+    <div class="content-wrapper">
+        <van-nav-bar
+            title="AGV鎿嶄綔"
+            left-text="杩斿洖"
+            left-arrow
+            @click-left="GoBack()">
+        </van-nav-bar>
+
+        <div class="mySolid">
+            <van-cell-group>
+                <van-field 
+                    ref="KbBar"
+                    v-model="KbBar"
+                    label="鍗℃澘鏉$爜"
+                    clearable 
+                    placeholder="璇锋壂鐮�"
+                    :right-icon-size="19"
+                    v-focus.noKeyboard
+                    @keyup.enter.native="getKbBarInfo" 
+                    autofocus="true">
+                </van-field>
+
+                <van-field
+                    ref="jyz"
+                    v-model="jyz"
+                    label="妫�楠岀姸鎬�"
+                    placeholder="璇烽�夋嫨妫�楠岀姸鎬�"
+                    autofocus="true"
+                    @click.native="selectJyz">
+                </van-field>
+
+                <van-field
+                    ref="lcName"
+                    v-model="lcName"
+                    label="妤煎眰"
+                    placeholder="璇烽�夋嫨妤煎眰"
+                    autofocus="true"
+                    @click.native="selectLc">
+                </van-field>
+                <div style="height: 10px"></div>
+               <!-- 淇敼鍚庣殑鎸夐挳瀹瑰櫒 -->
+               <div class="button-container">
+                <van-button 
+                  type="warning" 
+                  class="action-button reset-button"
+                  @click.native="handleAgvSj"
+                >AGV閫佹</van-button>
+                <van-button
+                  type="primary" 
+                  class="action-button"
+                  @click.native="handleAgvJy"
+                >AGV妫�楠�</van-button>
+                 <!-- style="background-color: #27f83f;border-color: #27f83f;color: white" -->
+                <van-button 
+                  type="info" 
+                  class="action-button submit-button"
+                  @click.native="handleAgvRk"
+                >鍏ョ珛搴�</van-button>
+              </div>
+
+            </van-cell-group>
+        </div>
+
+        <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
+        <van-action-sheet v-model="show2" :actions="actions2" @select="onSelect2" ></van-action-sheet>
+
+        
+    </div>
+</asp:Content>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
+    <comloading v-if="isLoading"></comloading>
+</asp:Content>
+
+<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
+    <script src="Js/AgvCz.js?<%=11 %>"></script>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/AgvCz.aspx.cs b/H5/AgvCz.aspx.cs
new file mode 100644
index 0000000..c84ddf3
--- /dev/null
+++ b/H5/AgvCz.aspx.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+public partial class H5_Cpdbsj : System.Web.UI.Page
+{
+    protected void Page_Load(object sender, EventArgs e)
+    {
+
+    }
+}
\ No newline at end of file
diff --git a/H5/Cpdbsj.aspx b/H5/Cpdbsj.aspx
index 91deba5..8506108 100644
--- a/H5/Cpdbsj.aspx
+++ b/H5/Cpdbsj.aspx
@@ -253,5 +253,5 @@
 </asp:Content>
 
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/Cpbdsj.js?<%=12111111421511 %>"></script>
+    <script src="Js/Cpbdsj.js?<%=12111111421512 %>"></script>
 </asp:Content>
\ No newline at end of file
diff --git a/H5/Js/AgvCz.js b/H5/Js/AgvCz.js
new file mode 100644
index 0000000..74e5e17
--- /dev/null
+++ b/H5/Js/AgvCz.js
@@ -0,0 +1,320 @@
+锘�
+var vm = new Vue({
+    el: '#app',
+    data: function () {
+        return {
+            isLoading: false,
+            userInfo: {
+                "loginGuid": '',
+                "loginAccount": '',
+            },
+            KbBar: "",//鍗℃澘鏉$爜
+            LsBar: "",//鍚庣洊娴佹按鏉$爜
+            XBar: "",//绠辨潯鐮�
+            UserName: Cookies.get('loginName'),//鐢ㄦ埛鍚嶇О
+            KbBarInfo: [],
+            KbBarMxInfo: [],
+            show: false,//鍒楄〃灞曠ず
+            actions: [{
+                name: "涓�妤�",
+                Postition: 1  // 鏂板
+            }, {
+                    name: "鍥涙ゼ",
+                    Postition: 4  // 鏂板
+                }],//鍒楄〃鐨勫��
+            show2: false,//鍒楄〃灞曠ず
+            actions2: [{
+                name: "鍚堟牸"
+            },{
+                    name: "涓嶅悎鏍�"
+                }],//鍒楄〃鐨勫��
+            lcName: "",//妤煎眰鍚嶇О
+            lcNum: "",//妤煎眰缂栧彿
+            jyz: "",//妫�楠屽��
+
+        }
+    },
+    mounted() {
+        var that = this;
+        this.userInfo = {
+            loginGuid: this.GetLoginInfor().loginGuid,
+            loginAccount: this.GetLoginInfor().loginAccount,
+        };
+    },
+    methods: {
+        getKbBarInfo() {
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/getKbBarInfo', {
+                Xt: that.GX,
+                Kbbarcode: that.KbBar
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                    }
+                    else {
+                        that.$playSound('error');
+                        that.$toast.fail(json.message);
+                        that.$refs.KbBar.focus();
+                        that.KbBar = "";
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$refs.KbBar.focus();
+                    that.KbBar = "";
+                });
+        },
+
+        
+
+        handleClear() {
+            this.KbBar = "";
+            this.XBar = "";
+            this.LsBar = "";
+            this.DAA001 = [];
+            this.XbarInfo = [];
+
+        },
+
+
+        handleSubmit() {
+
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            if (!that.KbBar) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜");
+                return;
+            }
+    
+            // 璁$畻鍙鏁板拰宸茶鏁�
+            const oldqty = +(that.KbBarInfo.quantity || 0);
+            const ySum = +(that.KbBarInfo.ySum || 0);
+            
+            if (oldqty !== ySum) {
+                that.$playSound('error');
+                that.$toast.fail(`瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`);
+                return;
+            }
+    
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/submitInspection', {
+                KbBar: that.KbBar,
+                userAccount: that.userInfo.loginAccount
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.$playSound('success');
+                        that.$notify({ type: 'success', message: json.message });
+                        // 娓呯┖鏁版嵁
+                        //that.KbBar = "";
+                        //that.XbarInfo = [];
+                        //that.KbBarInfo = [];
+                        //that.$refs.KbBar.focus();
+                    } else {
+                        that.$playSound('error');
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("鎻愪氦澶辫触锛岃閲嶈瘯锛�");
+                    that.$refs.KbBar.focus();
+                });
+        },
+
+        onSelect(action) {
+            this.lcNum = action.Postition;  // 缁戝畾line_no鍒皒tNum瀛楁
+            //console.log("閫夋嫨鐨勭嚎浣撶紪鍙凤細", this.xtNum);
+            this.lcName = action.name;  // 缁戝畾name鍒皒tName瀛楁
+            this.show = false;
+        },
+
+        onSelect2(action) {
+            this.jyz = action.name;  // 缁戝畾name鍒皒tName瀛楁
+            this.show2 = false;
+        },
+
+        //鑾峰彇鍙懠鍙獳GV鐨勭嚎浣�
+        selectLc() {
+            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  // 鏂板
+            //                    };
+            //                });
+            //            }
+            //        }
+            //        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);
+            //    });
+        },
+
+        selectJyz() {
+            this.show2 = true;
+        },
+
+        //AGV閫佹
+        handleAgvSj() {
+
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
+
+            if (this.isLoading) {
+                return;
+            }
+            var that = this;
+
+            if (!that.KbBar) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜");
+                return;
+            }
+    
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAGVInspection', {
+                KbBar: that.KbBar,
+                userAccount: that.userInfo.loginAccount
+            }, 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.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("AGV閫佹澶辫触锛岃閲嶈瘯锛�");
+                    that.$refs.KbBar.focus();
+                });
+        },
+
+        //AGV妫�楠�
+        handleAgvJy() {
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
+
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            if (!that.jyz) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛閫夋嫨妫�楠屽��");
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAgvJy', {
+                jyz: that.jyz,
+                KbBar: that.KbBar,
+                userAccount: that.userInfo.loginAccount
+            }, 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.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("AGV妫�楠屽け璐ワ紝璇烽噸璇曪紒");
+                    that.$refs.KbBar.focus();
+                });
+        },
+
+
+        handleAgvRk() {
+
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
+
+            if (this.isLoading) {
+                return;
+            }
+            var that = this;
+
+            if (!that.KbBar) {
+                that.$playSound('error');
+                that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜");
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAgvRk', {
+                KbBar: that.KbBar,
+                userAccount: that.userInfo.loginAccount,
+                Postition: that.lcNum
+            }, 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.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("AGV鍏ョ珛搴撳け璐ワ紝璇烽噸璇曪紒");
+                    that.$refs.KbBar.focus();
+                });
+        },
+
+
+    }
+})
\ No newline at end of file
diff --git a/H5/Js/Cpbdsj.js b/H5/Js/Cpbdsj.js
index dd9009b..5aa7ed7 100644
--- a/H5/Js/Cpbdsj.js
+++ b/H5/Js/Cpbdsj.js
@@ -412,14 +412,22 @@
         //AGV閫佹
         handleAGVInspection() {
 
-            this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
-            return;
+            //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("璇峰厛鎵弿鍗℃澘鏉$爜");
@@ -455,15 +463,15 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$playSound('error');
-                    that.$toast.fail("閫佹澶辫触锛岃閲嶈瘯锛�");
+                    that.$toast.fail("AGV閫佹澶辫触锛岃閲嶈瘯锛�");
                     that.$refs.KbBar.focus();
                 });
         },
 
         //AGV鍛煎彨
         handleAGVCall() {
-            this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
-            return;
+            //this.$toast.fail("鍔熻兘寮�鍙戞祴璇曚腑锛�");
+            //return;
 
             if (this.isLoading) {
                 return;
@@ -475,6 +483,29 @@
                 that.$toast.fail("璇峰厛閫夋嫨绾夸綋");
                 return;
             }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/handleAGVCall', {
+                XtNum: that.xtNum,
+                userAccount: that.userInfo.loginAccount
+            }, 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.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$playSound('error');
+                    that.$toast.fail("AGV鍛煎彨澶辫触锛岃閲嶈瘯锛�");
+                    that.$refs.KbBar.focus();
+                });
         }
 
 
diff --git a/Images/Style.css b/Images/Style.css
index ba53a0b..2958094 100644
--- a/Images/Style.css
+++ b/Images/Style.css
@@ -586,7 +586,8 @@
 
 /*鍏ㄥ眬鎸夐挳缂╁皬*/
 .van-nav-bar__left, .van-nav-bar__right {
-    font-size: .30rem;
+    font-size: .40rem;
+    padding: 0px .1rem;
 }
 
 /*璋冩暣鎼滅储妗嗗瓧浣撶殑楂樺害鍜屽ぇ灏�*/
diff --git a/Mst.master b/Mst.master
index 4de648e..01bca9b 100644
--- a/Mst.master
+++ b/Mst.master
@@ -14,7 +14,7 @@
     <script src="/scripts/config.js?<%=123611118 %>"></script>
     <link href="/scripts/vant/vant.css" rel="stylesheet" />
     <script src="/scripts/vant/vant.js"></script>
-    <link href="/Images/Style.css?<%=169951 %>" rel="stylesheet" />
+    <link href="/Images/Style.css?<%=169952 %>" rel="stylesheet" />
     <script src="/Scripts/uni.webview.1.5.2.js"></script>
     <asp:ContentPlaceHolder ID="head" runat="server">
     </asp:ContentPlaceHolder>

--
Gitblit v1.9.3