From d62dfe4ab73e23a39753fb13a890effaa25deb51 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 26 二月 2025 13:19:56 +0800
Subject: [PATCH] 1.调拨入库(正常流程通) 2.调拨出库(正常流程通)

---
 H5/Dbck.aspx  |   31 ++++++++--
 H5/Dbrk.aspx  |   52 ++++++++++++-----
 H5/Js/Dbrk.js |   49 ++++++++++++----
 H5/Js/Dbck.js |   29 +++++++--
 4 files changed, 121 insertions(+), 40 deletions(-)

diff --git a/H5/Dbck.aspx b/H5/Dbck.aspx
index 5a9c1ba..19226ee 100644
--- a/H5/Dbck.aspx
+++ b/H5/Dbck.aspx
@@ -17,22 +17,26 @@
         <div>
         <van-cell-group>
   <van-field
+      ref="billNo"
     value=""
-    label="鍑哄簱鍗曞彿"
+    label="璋冩嫧鐢宠"
     clearable 
      placeholder="閫夋嫨/鎵嬪綍"
     :right-icon-size="19"
       v-model="billNo"
+      @keyup.enter.native ="GetMesItemBlDetailByBillNo"
      v-focus.noKeyboard
   ><template #button>
     <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
   </template></van-field>
  <van-field
+     ref="barcode"
   value=""
   label="鐗╂枡鏉$爜"
    clearable 
  placeholder="璇锋壂鐮�"
-     @change="getBarcode"
+     @keyup.enter.native ="getBarcode"
+    <%-- @change="getBarcode"--%>
   :right-icon-size="19"
      v-model="barcode"
   v-focus.noKeyboard
@@ -45,6 +49,7 @@
   :right-icon-size="19"
      v-model="itemNo"
   v-focus.noKeyboard
+     disabled
 ></van-field>
    <van-field
   value=""
@@ -59,7 +64,6 @@
     v-model="fum"
     label="鎷嗗垎鏁伴噺"
     placeholder="鎷嗗垎鏁伴噺"
-disabled
  ><template #button>
     <van-button size="small" type="info" plain @click="tmcf" >鏉$爜鎷嗗垎</van-button>
   </template></van-field>
@@ -68,14 +72,29 @@
 
     <div  class="van-tab-left">
               <van-tabs @click="onClick" color="#000" title-active-color="#0283EF" >
-  <van-tab title="寰呭嚭鐗╂枡">
+                  <van-tab title="寰呭彂鐗╂枡" class="mySolid font">
+    <van-row>
+          <van-col span="12" class="text-left padding-left">鐗╂枡</van-col>
+           <van-col span="6">寰呮壂</van-col>
+          <van-col span="6">宸叉壂</van-col>
+  </van-row>
+  <van-row  v-for="(itm,index) in ItemBlDetail" :key="index">
+        <van-col span="12"  class="text-left padding-left">
+             <div>{{itm.itemNo}}</div>
+             <div>{{itm.itemName}}</div>
+        </van-col>
+        <van-col span="6">{{itm.fQty}}</van-col>
+       <van-col span="6">{{itm.sQty ?? 0}}</van-col>
+  </van-row>
+</van-tab>
+<%--  <van-tab title="寰呭嚭鐗╂枡">
     <van-row v-for="value in ItemBlDetail" class="font">
           <van-col span="12">鐗╂枡:{{value.itemNo}}</van-col>
           <van-col span="6">璁″垝鏁皗{value.qd007}}</van-col>
           <van-col span="6">瀹屾垚鏁皗{value.qd008}}</van-col>
     </van-row>
   </van-tab>
-</van-tabs>
+</van-tabs>--%>
     </div>
     <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
 
@@ -85,5 +104,5 @@
   <%--<comback ></comback>--%>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Dbck.js?<%=11211134 %>"></script>
+ <script src="Js/Dbck.js?<%=123 %>"></script>
 </asp:Content>
diff --git a/H5/Dbrk.aspx b/H5/Dbrk.aspx
index 836e14f..49efe7c 100644
--- a/H5/Dbrk.aspx
+++ b/H5/Dbrk.aspx
@@ -17,32 +17,38 @@
         <div>
         <van-cell-group>
   <van-field
+            ref="billNo"
     value=""
-    label="鍑哄簱鍗曞彿"
+    label="璋冩嫧鐢宠"
     clearable 
      placeholder="閫夋嫨/鎵嬪綍"
+      @keyup.enter.native ="GetMesItemBlDetailByBillNo"
     :right-icon-size="19"
       v-model="billNo"
      v-focus.noKeyboard
   ><template #button>
     <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
   </template></van-field>
-  <van-field
-      value=""
-      label="搴撲綅"
-       clearable 
-     placeholder="璇锋壂鐮�"
-         @change="getDepot"
-      :right-icon-size="19"
-         v-model="sectionCode"
-      v-focus.noKeyboard
-    ></van-field>
+                        <van-field
+    ref="sectionCode"
+    value=""
+    label="搴撲綅"
+     clearable 
+   placeholder="璇锋壂鐮�"
+     @keyup.enter.native ="getDepot"
+      <%-- @change="getDepot"--%>
+    :right-icon-size="19"
+       v-model="sectionCode"
+    v-focus.noKeyboard
+  ></van-field>
  <van-field
+     ref="barcode"
   value=""
   label="鐗╂枡鏉$爜"
    clearable 
  placeholder="璇锋壂鐮�"
-     @change="getBarcode"
+     @keyup.enter.native="getBarcode"
+<%--     @change="getBarcode"--%>
   :right-icon-size="19"
      v-model="barcode"
   v-focus.noKeyboard
@@ -63,18 +69,34 @@
   placeholder="鏁伴噺"
   disabled
 ></van-field>
+
 </van-cell-group>
     </div>
 
     <div  class="van-tab-left">
               <van-tabs @click="onClick" color="#000" title-active-color="#0283EF" >
-  <van-tab title="寰呭嚭鐗╂枡">
+<van-tab title="寰呭叆鐗╂枡" class="mySolid font">
+    <van-row>
+          <van-col span="12" class="text-left padding-left">鐗╂枡</van-col>
+           <van-col span="6">璋冨嚭宸叉壂</van-col>
+          <van-col span="6">璋冨叆宸叉壂</van-col>
+  </van-row>
+  <van-row  v-for="(itm,index) in ItemBlDetail" :key="index">
+        <van-col span="12"  class="text-left padding-left">
+             <div>{{itm.itemNo}}</div>
+             <div>{{itm.itemName}}</div>
+        </van-col>
+        <van-col span="6">{{itm.sQty ?? 0}}</van-col>
+       <van-col span="6">{{itm.rQty ?? 0}}</van-col>
+  </van-row>
+</van-tab>
+<%--  <van-tab title="寰呭嚭鐗╂枡">
     <van-row v-for="value in ItemBlDetail" class="font">
           <van-col span="12">鐗╂枡:{{value.itemNo}}</van-col>
           <van-col span="6">璁″垝鏁皗{value.qd007}}</van-col>
           <van-col span="6">瀹屾垚鏁皗{value.qd008}}</van-col>
     </van-row>
-  </van-tab>
+  </van-tab>--%>
 </van-tabs>
     </div>
     <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
@@ -85,5 +107,5 @@
   <%--<comback ></comback>--%>
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Dbrk.js?<%=11211134 %>"></script>
+ <script src="Js/Dbrk.js?<%=113 %>"></script>
 </asp:Content>
diff --git a/H5/Js/Dbck.js b/H5/Js/Dbck.js
index 04b74cc..4a5a8c4 100644
--- a/H5/Js/Dbck.js
+++ b/H5/Js/Dbck.js
@@ -83,21 +83,29 @@
                     var json = res;
                     if (json.status == 0) {
                         that.ItemBlDetail = json.data.tbBillList;
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.billNo.focus();
+                        that.billNo = "";
+                        that.ItemBlDetail = null;
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    that.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.ItemBlDetail = null;
+                    //console.log(error);
                 });
         },
-        getBarcode(value) {
+        getBarcode() {
 
-            this.barcode = value;
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -130,21 +138,28 @@
                     if (json.status == 0) {
 
                         that.itemNo = json.data.form.itemNo;
-                        that.num = json.data.form.num;
-                        that.barcode = json.data.form.barcode;
-                        that.fum = json.data.form.fum;
+                        //that.num = json.data.form.num;
+                        //that.fum = json.data.form.fum;
                         that.ItemBlDetail = json.data.items
                         that.$notify({ type: 'success', message: '鎵爜鎴愬姛' });
+
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        //that.GetMesItemBlDetailByBillNo();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
                 });
         },
         tmcf() {
diff --git a/H5/Js/Dbrk.js b/H5/Js/Dbrk.js
index 68f2b12..2c56433 100644
--- a/H5/Js/Dbrk.js
+++ b/H5/Js/Dbrk.js
@@ -83,47 +83,66 @@
                     var json = res;
                     if (json.status == 0) {
                         that.ItemBlDetail = json.data.tbBillList;
+                        that.$refs.sectionCode.focus();
+                        that.sectionCode = "";
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.billNo.focus();
+                        that.billNo = "";
+                        that.ItemBlDetail = null;
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    that.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.ItemBlDetail = null;
+                    //console.log(error);
                 });
         },
-        getDepot(value) {
-            if (!value) {
-                this.$toast.fail("搴撲綅缂栫爜");
-                return;
-            }
+        getDepot() {
+
 
             var that = this;
 
+            if (that.sectionCode.length == 0) {
+                this.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖");
+                return;
+            }
+
+
+
             that.AxiosHttp("post", 'Inventory/ScanDepotNo', {
-                depotCode: that.depotNo
+                DepotCode: that.sectionCode
             }, false)
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
                         that.$notify({ type: 'success', message: json.data.tbBillList });
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.sectionCode.focus();
+                        that.sectionCode = "";
+
                     }
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    that.$refs.sectionCode.focus();
+                    that.sectionCode = "";
                 });
         },
-        getBarcode(value) {
+        getBarcode() {
 
-            this.barcode = value;
+            //this.barcode = value;
 
             var that = this;
             that.isLoading = true;
@@ -164,19 +183,25 @@
 
                         that.itemNo = json.data.form.itemNo;
                         that.num = json.data.form.num;
-                        that.barcode = json.data.form.barcode;
+                        //that.barcode = json.data.form.barcode;
                         that.ItemBlDetail = json.data.items
                         that.$notify({ type: 'success', message: '鎵爜鎴愬姛' });
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
                     }
                     that.isLoading = false;
                 })
                 .catch(function (error) {
                     that.isLoading = false;
                     that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
-                    console.log(error);
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
                 });
         },
         tmcf() {

--
Gitblit v1.9.3