From 1758541a4f33c9ef269b9481d2b4322076702660 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 09 四月 2025 10:48:14 +0800
Subject: [PATCH] 1.产品绑定

---
 H5/Cpbd.aspx      |    6 
 H5/Cpbd.aspx.cs   |    2 
 H5/Js/Cpbd.js     |   82 +++-------------
 H5/Cpdbsj.aspx    |  158 +++++++++++++++++++++++++++++++
 H5/Cpdbsj.aspx.cs |   14 ++
 5 files changed, 193 insertions(+), 69 deletions(-)

diff --git a/H5/Cpbd.aspx b/H5/Cpbd.aspx
index 5a2cff8..6e1dade 100644
--- a/H5/Cpbd.aspx
+++ b/H5/Cpbd.aspx
@@ -1,4 +1,4 @@
-锘�<%@ Page Title="浜у搧缁戝畾" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Cpbd.aspx.cs" Inherits="H5_Scll" %>
+锘�<%@ Page Title="浜у搧缁戝畾" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Cpbd.aspx.cs" Inherits="H5_Cpbd" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   <style>
     .si-status-box,
@@ -69,7 +69,7 @@
                     v-model="LsBar"
                     label="鍚庣洊鏉$爜"
                     placeholder="璇锋壂鍚庣洊鐮�"
-                    @keyup.enter.native="getModel" 
+<%--                    @keyup.enter.native="getModel" --%>
                     autofocus="true">
                 </van-field>
                 
@@ -92,7 +92,7 @@
                         slot="button" 
                         type="info" 
                         size="small"  
-                        @click="getChaiFen">
+                        @click="productBinding">
                         鎻愪氦
                     </van-button>
                 </div>
diff --git a/H5/Cpbd.aspx.cs b/H5/Cpbd.aspx.cs
index f11cc1f..52e1504 100644
--- a/H5/Cpbd.aspx.cs
+++ b/H5/Cpbd.aspx.cs
@@ -5,7 +5,7 @@
 using System.Web.UI;
 using System.Web.UI.WebControls;
 
-public partial class H5_Scll : System.Web.UI.Page
+public partial class H5_Cpbd : System.Web.UI.Page
 {
     protected void Page_Load(object sender, EventArgs e)
     {
diff --git a/H5/Cpdbsj.aspx b/H5/Cpdbsj.aspx
new file mode 100644
index 0000000..f405cf3
--- /dev/null
+++ b/H5/Cpdbsj.aspx
@@ -0,0 +1,158 @@
+锘�<%@ Page Title="缁戝畾閫佹" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Cpdbsj.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; /* 缁ф壙鐖剁骇鏂囧瓧棰滆壊 */
+    }
+</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="ZsBar"
+                    v-model="ZsBar"
+                    label="杩芥函鏉$爜"
+                    clearable 
+                    placeholder="璇锋壂鐮�"
+                    :right-icon-size="19"
+                    v-focus.noKeyboard
+                    @keyup.enter.native="getZsBarInfo" 
+                    autofocus="true">
+                </van-field>
+                
+                <van-field
+                    v-model="UserName"
+                    label="浣滀笟浜哄憳"
+                    clearable 
+                    :right-icon-size="19"
+                    placeholder=""
+                    readonly >
+                </van-field>
+                
+                <van-field
+                    ref="barcode"
+                    v-model="ZsBarInfo.lineName"
+                    label="浜х嚎"
+                    clearable 
+                    placeholder="浜х嚎鍚嶇О"
+                    :right-icon-size="19"
+                    readonly >
+                </van-field>
+                
+                <van-field
+                    ref="LsBar"
+                    v-model="LsBar"
+                    label="鍚庣洊鏉$爜"
+                    placeholder="璇锋壂鍚庣洊鐮�"
+                    @keyup.enter.native="getModel" 
+                    autofocus="true">
+                </van-field>
+                
+                <div class="si-status-group">
+                  <div class="si-status-box si-status--ok">
+                    <div class="si-status__left">
+                      <span class="si-status__label">鎬绘暟</span>
+                    </div>
+                    <div  class="si-status__right">{{ZsBarInfo.sumQty}}</div>
+                  </div>
+
+                  <div class="si-status-box si-status--error">
+                    <div class="si-status__left">
+                      <span class="si-status__label">瀹屾垚鏁�</span>
+                    </div>
+                    <div class="si-status__right">{{ZsBarInfo.finQty}}</div>
+                  </div>
+
+                    <van-button 
+                        slot="button" 
+                        type="info" 
+                        size="small"  
+                        @click="getChaiFen">
+                        鎻愪氦
+                    </van-button>
+                </div>
+
+            </van-cell-group>
+        </div>
+
+        <van-tabs color="#000" title-active-color="#0283EF">
+            <van-tab title="浜у搧淇℃伅" class="mySolid font">
+                <van-cell-group >
+                  <van-field label="鎸囦护鍗曞彿" colon="true" v-model="ZsBarInfo.daa001" readonly style="background: #ffa53b"></van-field>
+                  <van-field label="鏉$爜鏁伴噺" colon="true" v-model="ZsBarInfo.barQty" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="杩芥函鐮�" colon="true" v-model="ZsBarInfo.zsBarcode" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="浜у搧缂栫爜" colon="true" v-model="ZsBarInfo.item_no" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="浜у搧鍚嶇О" colon="true" v-model="ZsBarInfo.item_name" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="浜у搧瑙勬牸" colon="true" v-model="ZsBarInfo.item_model" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="鍓嶄竴宸ュ簭" colon="true" v-model="ZsBarInfo.lastGx" readonly style="background: #ffa53b" ></van-field>
+                  <van-field label="褰撳墠宸ュ簭" colon="true" v-model="GX" readonly style="background: #ffa53b" ></van-field>
+                </van-cell-group>
+            </van-tab>
+
+            <van-tab title="鐢熶骇灞ュ巻" class="mySolid font">
+                <van-row>
+                    <van-col span="6">浜哄憳</van-col>
+                    <van-col span="6">浜х嚎</van-col>
+                    <van-col span="6">宸ュ簭</van-col>
+                    <van-col span="6">缁撴灉</van-col>
+                </van-row>
+                <van-row v-for="(itm,index) in Traceability" :key="index">
+                    <van-col span="6" >{{itm.useR_NAME}}</van-col>
+                    <van-col span="6" >{{itm.line_no}}</van-col>
+                    <van-col span="6" class="blue-text">{{itm.processNo}}</van-col>
+                    <van-col span="6" >{{itm.checkResult}}</van-col>
+                </van-row>
+            </van-tab>
+
+            <van-tab title="宸茬粦鏉$爜" class="mySolid font">
+                <van-row>
+                    <van-col span="5">浜哄憳</van-col>
+                    <van-col span="5">浜х嚎</van-col>
+                    <van-col span="5">宸ュ簭</van-col>
+                    <van-col span="4">鑹搧</van-col>
+                    <van-col span="5">涓嶈壇鍝�</van-col>
+                </van-row>
+                <van-row v-for="(itm,index) in Traceability" :key="index">
+                    <van-col span="5" >{{itm.fQty}}</van-col>
+                    <van-col span="5" >{{itm.fQty}}</van-col>
+                    <van-col span="5" class="blue-text">{{itm.fQty}}</van-col>
+                    <van-col span="4" >{{itm.fQty}}</van-col>
+                    <van-col span="5" >{{itm.sQty}}</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/Cpbd.js?<%=121112 %>"></script>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/Cpdbsj.aspx.cs b/H5/Cpdbsj.aspx.cs
new file mode 100644
index 0000000..c84ddf3
--- /dev/null
+++ b/H5/Cpdbsj.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/Js/Cpbd.js b/H5/Js/Cpbd.js
index 4880535..ece0de9 100644
--- a/H5/Js/Cpbd.js
+++ b/H5/Js/Cpbd.js
@@ -56,40 +56,37 @@
                     that.Traceability = [];
                 });
         },
-        getScan() {
+        productBinding() {
             var that = this;
-            if (that.modeInfo.daa001.length <= 0) {
-                that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
+            if (that.ZsBar.length <= 0) {
+                that.$toast.fail("杩芥函鐮佷笉鑳戒负绌猴紒");
                 return;
             }
-            if (that.scanInfo.barcode.length * 1 <= 0) {
-                that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+            if (that.LsBar.length <= 0) {
+                that.$toast.fail("鍚庣洊鐮佷笉鑳戒负绌猴紒");
                 return;
             }
 
             that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/ScanCode', {
-                daa001: that.modeInfo.daa001,
+            that.AxiosHttp("post", 'Womdaa/ProductBinding', {
+                ZsBar: that.ZsBar,
+                LsBar: that.LsBar,
                 userName: that.userInfo.loginAccount,
-                barcode: that.scanInfo.barcode,
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
                         // that.scanInfo = json.data.tbBillList;
                         that.$notify({ type: 'success', message: json.message });
-                        that.getModel();
-                        that.$refs.barcode.focus();
-                        that.scanInfo.barcode = null;
-                    }
-                    else if (json.status == 2) {
-                        that.$refs.splitNum.focus();
-                        that.scanInfo.splitNum = json.data.tbBillList.splitNum;
-                        that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum;
+                        that.$refs.ZsBar.focus();
+                        that.ZsBar = null;
+                        that.ZsBar = null;
                     }
                     else {
                         that.$toast.fail(json.message);
-                        that.$refs.barcode.focus();
+                        that.$refs.ZsBar.focus();
+                        that.ZsBar = null;
+                        that.ZsBar = null;
                     }
                     
                     that.isLoading = false;
@@ -97,56 +94,11 @@
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
-                    that.$refs.barcode.focus();
+                    that.$refs.ZsBar.focus();
+                    that.ZsBar = null;
+                    that.ZsBar = null;
                 });
         },
-        getChaiFen() {
-            //this.isPrinterPopupVisible = true; // 鏄剧ず寮圭獥
-
-            var that = this;
-            if (that.modeInfo.daa001.length <= 0) {
-                that.$toast.fail("宸ュ崟鍗曞彿涓嶈兘涓虹┖锛�");
-                return;
-            }
-            if (that.scanInfo.splitNum * 1 <= 0) {
-                that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
-                return;
-            }
-            if (that.scanInfo.barcode.length * 1 <= 0) {
-                that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
-                return;
-            }
-            that.isLoading = true;
-            that.AxiosHttp("post", 'Womdaa/ScanCodeCF', {
-                daa001: that.modeInfo.daa001,
-                userName: that.userInfo.loginAccount,
-                barcode: that.scanInfo.barcode,
-                Num: that.scanInfo.splitNum,
-            }, false)
-                .then(function (res) {
-                    var json = res;
-                    if (json.status == 0) {
-                        //  that.modeInfo = json.data.tbBillList;
-                        that.scanInfo.splitNum = null;
-                        that.scanInfo.barcodeNum = null;
-                        that.scanInfo.barcode = null;
-                        that.$notify({ type: 'success', message: json.message });
-                        that.$refs.barcode.focus();
-                        that.getModel();
-                    }
-                    else {
-                        that.$toast.fail(json.message);
-                    }
-                    that.isLoading = false;
-                })
-                .catch(function (error) {
-                    that.isLoading = false;
-                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
-                });
-        },
-
         //鎵撳嵃鏈烘敞閲�
         //selectPrinter(printer) {
         //    this.selectedPrinter = printer.printerId; // 鏇存柊閫変腑鐨勬墦鍗版満缂栧彿

--
Gitblit v1.9.3