From 70cb04a1eabdf0ffdddc017f219eb6bc9f13de66 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 28 五月 2025 15:22:31 +0800
Subject: [PATCH] 1.现场收料字段优化

---
 H5/Xcsl.aspx    |    8 
 H5/Xctl.aspx.cs |   14 ++
 H5/Js/Xctl.js   |  174 ++++++++++++++++++++++++
 H5/Xctl.aspx    |  199 ++++++++++++++++++++++++++++
 4 files changed, 391 insertions(+), 4 deletions(-)

diff --git a/H5/Js/Xctl.js b/H5/Js/Xctl.js
new file mode 100644
index 0000000..ef63bbe
--- /dev/null
+++ b/H5/Js/Xctl.js
@@ -0,0 +1,174 @@
+锘縱ar vm = new Vue({
+    el: '#app',
+    data: function () {
+        return {
+            isLoading: false,
+            userInfo: {
+                "loginGuid": '',
+                "loginAccount": '',
+            },
+            Bar: "",//绠辨潯鐮�
+            UserName: Cookies.get('loginName'),//鐢ㄦ埛鍚嶇О
+            KbBarInfo: [],
+            KbBarMxInfo: [],
+            Xvalue:4,
+            XbarInfo: [],
+            DAA001: "",
+            DAANum: "",
+            xcslItemList: [], //鏉愭枡鍒楄〃
+            xcslWjsBarList: [],//鏈帴鏀跺垪琛�
+            xcslYjsBarList: [],//宸叉帴鏀跺垪琛�
+            selectKey: "",//鏌ヨ鍏抽敭瀛�
+            actions: [],//鍒楄〃鐨勫��
+            show: false,//鍒楄〃灞曠ず
+
+        }
+    },
+    mounted() {
+        var that = this;
+        this.userInfo = {
+            loginGuid: this.GetLoginInfor().loginGuid,
+            loginAccount: this.GetLoginInfor().loginAccount,
+        };
+    },
+    methods: {
+        GetItemsXcsl() {
+            var that = this;
+
+            if (!that.DAA001 || that.DAA001.length <= 0) {
+                that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.DAA001.focus();
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetItemsXcsl', {
+                daa001: that.DAA001
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.DAANum = json.data.tbBillList.gD_Num;
+                        that.xcslItemList = json.data.tbBillList.xcslItemList;
+                        that.xcslWjsBarList = json.data.tbBillList.xcslWjsBarList;
+                        that.xcslYjsBarList = json.data.tbBillList.xcslYjsBarList;
+                        that.$refs.Bar.focus();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$refs.DAA001.focus();
+                        that.DAA001 = "";
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                });
+        },
+        ScanXcsl() {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            if (!that.Bar ||that.Bar.length <= 0) {
+                that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$refs.Bar.focus();
+                return;
+            }
+
+
+            if (!that.DAA001 ||that.DAA001.length <= 0) {
+                that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.DAA001.focus();
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/ScanXcsl', {
+                DAA001: that.DAA001,
+                Bar: that.Bar,
+                userAccount: that.userInfo.loginAccount,
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        // that.scanInfo = json.data.tbBillList;
+                        that.$notify({ type: 'success', message: json.message });
+                        that.GetItemsXcsl();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                    that.$refs.Bar.focus();
+                    that.Bar = "";
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                });
+        },
+        //鑾峰彇宸ュ崟淇℃伅
+        getInfo() {
+            this.show = true;
+            var that = this;
+            that.actions = [];
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetXcslDaa', {
+                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.daaInfo  // 鎷兼帴瀛楁
+
+                                };
+                            });
+                        }
+                    }
+                    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);
+                });
+        },
+        onSelect(item) {
+            // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+            // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
+            this.show = false;
+            console.log(item);
+            // 姝e垯鍖归厤绗竴涓柟鎷彿鍐呭
+            const regex = /\[([^\]]+)\]/;
+            const matchResult = item.name.match(regex);
+            
+            if (matchResult && matchResult[1]) {
+                this.DAA001 = matchResult[1]; // PPBOM00000088-1
+                console.log('鎻愬彇鐨凞AA001:', this.DAA001);
+            } else {
+                this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�');
+                this.DAA001 = '';
+            }
+            this.GetItemsXcsl();
+            //this.$toast(item.name);
+
+        },
+    }
+})
\ No newline at end of file
diff --git a/H5/Xcsl.aspx b/H5/Xcsl.aspx
index da23ccd..9f91119 100644
--- a/H5/Xcsl.aspx
+++ b/H5/Xcsl.aspx
@@ -113,20 +113,20 @@
             <van-tab title="鏉愭枡鍒楄〃" class="mySolid font">
                 <van-row>
                     <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="8" class="text-left padding-left">瑙勬牸鍨嬪彿</van-col>
                     <van-col span="4">澶囨枡鏁�</van-col>
                     <van-col span="4">鎺ユ敹鏁�</van-col>
-                    <van-col span="8" class="text-left padding-left">鎵�灞炲崟鎹�</van-col>
                 </van-row>
                 <van-row v-for="(itm,index) in xcslItemList" :key="index">
                     <van-col span="8" class="text-left padding-left">
                         <div class="blue-text">{{itm.item_no}}</div>
                         <div>{{itm.item_name}}</div>
                     </van-col>
-                    <van-col span="4" class="blue-text">{{itm.bL_Num}}</van-col>
-                    <van-col span="4" class="blue-text">{{itm.jS_Num}}</van-col>
                     <van-col span="8" class="text-left padding-left">
-                        <div>{{itm.item_out_no}}</div>
+                        <div>{{itm.item_model}}</div>
                     </van-col>
+                    <van-col span="4" class="blue-text">{{itm.bL_Num}}</van-col>
+                    <van-col span="4" class="blue-text">{{itm.jS_Num}}</van-col
                 </van-row>
             </van-tab>
             <van-tab title="鏈帴鏀跺垪琛�" class="mySolid font">
diff --git a/H5/Xctl.aspx b/H5/Xctl.aspx
new file mode 100644
index 0000000..24b249f
--- /dev/null
+++ b/H5/Xctl.aspx
@@ -0,0 +1,199 @@
+锘�<%@ Page Title="鐜板満鎶曟枡" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Xctl.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; /* 闃叉鍐呭婧㈠嚭 */
+    }
+</style>
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+    <div class="content-wrapper">
+        <van-nav-bar
+            title="鐜板満鎶曟枡"
+            left-text="杩斿洖"
+            left-arrow
+            @click-left="GoBack()">
+        </van-nav-bar>
+
+        <div class="mySolid">
+            <van-cell-group>
+                <van-field
+                    ref ="selectKey"
+                value=""
+                label="宸ュ崟鏌ヨ"
+                clearable 
+                    placeholder="璇疯緭鍏ュ伐鍗曞彿杩涜鏌ヨ"
+                :right-icon-size="19"
+                    v-model="selectKey"
+                    @keyup.enter.native="GetMesItemBlDetailByBillNo"
+                ><template #button>
+                <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
+                </template></van-field>
+                <van-field
+                    ref="DAA001"
+                    v-model="DAA001"
+                    label="鎸囦护宸ュ崟"
+                    placeholder="鎸囦护宸ュ崟"
+                    @keyup.enter.native="GetItemsXcsl" 
+                    autofocus="true"
+                    >
+                </van-field>
+
+                <van-field
+                    v-model="DAANum"
+                    label="宸ュ崟鏁伴噺"
+                    placeholder="宸ュ崟鏁伴噺"
+                    autofocus="true"
+                    readonly>
+                </van-field>
+
+                <van-field
+                    ref="Bar"
+                    v-model="Bar"
+                    label="鐗╂枡鏉$爜"
+                    placeholder="璇锋壂鐗╂枡鏉$爜"
+                    @keyup.enter.native="ScanXcsl" 
+                    autofocus="true">
+                </van-field>
+
+            </van-cell-group>
+        </div>
+
+            <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
+
+        <van-tabs color="#000" title-active-color="#0283EF">
+            <van-tab title="鏉愭枡鍒楄〃" class="mySolid font">
+                <van-row>
+                    <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="4">澶囨枡鏁�</van-col>
+                    <van-col span="4">鎺ユ敹鏁�</van-col>
+                    <van-col span="4">鎶曟枡鏁�</van-col>
+                    <van-col span="4" class="text-left padding-left">鎵�灞炲崟鎹�</van-col>
+                </van-row>
+                <van-row v-for="(itm,index) in xcslItemList" :key="index">
+                    <van-col span="8" class="text-left padding-left">
+                        <div class="blue-text">{{itm.item_no}}</div>
+                        <div>{{itm.item_name}}</div>
+                    </van-col>
+                    <van-col span="4" class="blue-text">{{itm.bL_Num}}</van-col>
+                    <van-col span="4" class="blue-text">{{itm.jS_Num}}</van-col>
+                    <van-col span="4" class="blue-text">{{itm.jS_Num}}</van-col>
+                    <van-col span="4" class="text-left padding-left">
+                        <div>{{itm.item_out_no}}</div>
+                    </van-col>
+                </van-row>
+            </van-tab>
+            <van-tab title="鏈姇鏂欏垪琛�" class="mySolid font">
+                <van-row>
+                    <van-col span="5" class="text-left padding-left">鏉$爜</van-col>
+                    <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="3" class="text-left padding-left">鏁伴噺</van-col>
+                    <van-col span="3" >浜哄憳</van-col>
+                    <van-col span="5" >鏃堕棿</van-col>
+                </van-row>
+                <van-row 
+                    v-for="(itm,index) in xcslWjsBarList" 
+                    :key="index">
+                    <van-col span="5" class="text-left padding-left">{{itm.iteM_BARCODE}}</van-col>
+                    <van-col span="8" class="text-left padding-left">
+                        <div class="blue-text">{{itm.item_no}}</div>
+                        <div>{{itm.item_name}}</div>
+                    </van-col>
+                    <van-col span="3" class="text-left padding-left">
+                        <div>{{itm.quantity}}</div>
+                    </van-col>
+                    <van-col span="3">
+                        <div>{{itm.useR_NAME}}</div>
+                    </van-col>
+                    <van-col span="5">
+                        <div>{{itm.create_date}}</div>
+                    </van-col>
+                </van-row>
+            </van-tab>
+
+            <van-tab title="宸叉姇鏂欏垪琛�" class="mySolid font">
+                <van-row>
+                    <van-col span="5" class="text-left padding-left">鏉$爜</van-col>
+                    <van-col span="8" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="3" class="text-left padding-left">鏁伴噺</van-col>
+                    <van-col span="3" >鎺ユ敹浜�</van-col>
+                    <van-col span="5" >鎺ユ敹鏃堕棿</van-col>
+                </van-row>
+                <van-row 
+                    v-for="(itm,index) in xcslYjsBarList" 
+                    :key="index">
+                    <van-col span="5" class="text-left padding-left">{{itm.iteM_BARCODE}}</van-col>
+                    <van-col span="8" class="text-left padding-left">
+                        <div class="blue-text">{{itm.item_no}}</div>
+                        <div>{{itm.item_name}}</div>
+                    </van-col>
+                    <van-col span="3" class="text-left padding-left">
+                        <div>{{itm.quantity}}</div>
+                    </van-col>
+                    <van-col span="3">
+                        <div>{{itm.useR_NAME}}</div>
+                    </van-col>
+                    <van-col span="5">
+                        <div>{{itm.xcsL_CREATE_DATE}}</div>
+                    </van-col>
+                </van-row>
+            </van-tab>
+        </van-tabs>
+    </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/Xctl.js?<%=1 %>"></script>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/Xctl.aspx.cs b/H5/Xctl.aspx.cs
new file mode 100644
index 0000000..c84ddf3
--- /dev/null
+++ b/H5/Xctl.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

--
Gitblit v1.9.3