From eff92d4bf081c937c93ca05b3f1f2d9713c0eb61 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 11 九月 2025 15:07:13 +0800
Subject: [PATCH] 委外领料:1.显示当前组织2.添加工单查询列表3.添加库位列表4.(待发物料)和(物料总清单)更改为(待扫物料)和(已扫物料)5.查询列表与带出明细改为存储过程

---
 H5/Js/Wwll.js |  138 +++++++++++++++++++++++++++
 H5/Wwll.aspx  |  154 +++++++++++++++++++++++-------
 2 files changed, 254 insertions(+), 38 deletions(-)

diff --git a/H5/Js/Wwll.js b/H5/Js/Wwll.js
index e359115..0e89c82 100644
--- a/H5/Js/Wwll.js
+++ b/H5/Js/Wwll.js
@@ -9,6 +9,20 @@
             },
             modeInfo: { daa001: "", planNo: "" },
             scanInfo: { barcodeNum: "", splitNum: "", barcode: "" },
+            ItemDetail: [],
+            ip: "",
+            port: "",
+            oldBarInfo: [],
+            cfBarInfo: [],
+            selectKey: "",//鏌ヨ鍏抽敭瀛�
+            actions: [],//鍒楄〃鐨勫��
+            show: false,//鍒楄〃灞曠ず
+            // 褰撳墠閫変腑琛岀殑绱㈠紩
+            currentIndex: -1,
+            // 瀛樺偍閫変腑琛屾暟鎹璞�
+            selItem: {},
+            ItemBarKw: [],//褰撳ぉ琛岀浉鍏虫潯鐮佸簱浣嶄俊鎭�
+            DaaInfo: {},
         }
     },
     mounted() {
@@ -19,6 +33,61 @@
         };
     },
     methods: {
+        /**
+        * 澶勭悊琛岀偣鍑讳簨浠讹紙鍗曢�夐�昏緫锛�
+        * @param {Object} item 褰撳墠琛屾暟鎹�
+        * @param {Number} index 褰撳墠琛岀储寮�
+        */
+        handleRowClick(item, index) {
+            if (this.isLoading) {
+                return;
+            }
+
+            // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
+            this.currentIndex = -1;
+
+            // 璁剧疆褰撳墠閫変腑琛�
+            this.currentIndex = index;
+            this.selItem = {
+                itemid: item.itemId,//椹煎嘲鍛藉悕娉�
+                index: index
+            };
+
+            console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢�
+
+            this.GetBarKwByItem();
+        },
+        //鑾峰彇搴撲綅淇℃伅
+        GetBarKwByItem() {
+            //Womdaa
+            //WwGd
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', {
+                itemId: that.selItem.itemid,
+                userName: that.userInfo.loginAccount
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.ItemBarKw = json.data.tbBillList;
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$playSound('error');
+                        that.ItemBarKw = [];
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    that.$playSound('error');
+                    console.log(error);
+                    that.ItemBarKw = [];
+                });
+        },
+
         getModel() {
             var that = this;
             that.isLoading = true;
@@ -29,13 +98,20 @@
                 .then(function (res) {
                     var json = res;
                     if (json.status == 0) {
-                        that.modeInfo = json.data.tbBillList;
+                        that.ItemDetail = json.data.tbBillList;
+                        that.DaaInfo = json.data.tbBillList.daaInfo;
+                        that.modeInfo.planNo = json.data.tbBillList.planNo;
+                        that.modeInfo.startTime = json.data.tbBillList.startTime;
                         that.$refs.barcode.focus();
                     }
                     else {
                         that.$toast.fail(json.message);
+                        that.$playSound('error');
                         that.$refs.daa001.focus();
                         that.modeInfo.daa001 = "";
+                        that.modeInfo.planNo = "";
+                        that.modeInfo.startTime = "";
+                        that.ItemDetail = [];
                     }
                     that.isLoading = false;
                 })
@@ -47,6 +123,7 @@
                     that.modeInfo.daa001 = "";
                 });
         },
+        //鎵爜
         getScan() {
             var that = this;
             if (that.modeInfo.daa001.length <= 0) {
@@ -87,6 +164,7 @@
                     that.$refs.barcode.focus();
                 });
         },
+        //鎷嗗垎
         getChaiFen() {
             var that = this;
             if (that.modeInfo.daa001.length <= 0) {
@@ -132,5 +210,63 @@
                     that.$refs.splitNum.focus();
                 });
         },
+        //鑾峰彇宸ュ崟淇℃伅
+        getInfo() {
+            this.show = true;
+            var that = this;
+            that.actions = [];
+            that.isLoading = true;
+            that.AxiosHttp("post", 'WwGd/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,  // 鎷兼帴瀛楁
+                                    subname: item.startTime
+                                };
+                            });
+                        }
+                    }
+                    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.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1
+                console.log('鎻愬彇鐨凞AA001:', this.modeInfo.daa001);
+            } else {
+                this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�');
+                this.modeInfo.daa001 = '';
+            }
+            this.getModel();
+            //this.$toast(item.name);
+        },
     }
 })
\ No newline at end of file
diff --git a/H5/Wwll.aspx b/H5/Wwll.aspx
index 14a854a..ad6a420 100644
--- a/H5/Wwll.aspx
+++ b/H5/Wwll.aspx
@@ -4,18 +4,43 @@
     .bg-info {
         background-color:#fff;
     }
-      
+          .org-info {
+        height: 0.5rem;
+        line-height: 0.5rem;
+        padding: 0 0.16rem;
+    }
 </style>
 </asp:Content>
+
 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+            <van-notice-bar 
+    :scrollable="false" 
+    :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" 
+    class="org-info"
+/></van-notice-bar>
+
     <van-nav-bar
   title="濮斿棰嗘枡"
   left-text="杩斿洖"
   left-arrow
   @click-left="GoBack()"
 ></van-nav-bar>
-    <%--<div class="mySolid">--%>
+
+    <div class="mySolid">
         <van-cell-group>
+
+                <van-field
+                    ref ="selectKey"
+                value=""
+                label="宸ュ崟鏌ヨ"
+                clearable 
+                    placeholder="璇烽�夋嫨宸ュ崟鍙疯繘琛屾煡璇�"
+                :right-icon-size="19"
+                    v-model="selectKey"
+                ><template #button>
+                <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
+                </template></van-field>
+
   <van-field 
     ref="daa001"
     v-model="modeInfo.daa001"
@@ -35,6 +60,25 @@
    placeholder="浠诲姟鍗曞彿"
    disabled
 ></van-field>
+
+<%--                <van-field
+                    v-model="DaaInfo.startTime"
+                    label="寮�宸ユ椂闂�"
+                    clearable 
+                    :right-icon-size="19"
+                    placeholder="寮�宸ユ椂闂�"
+                    disabled>
+                </van-field>
+
+                <van-field
+                    v-model="DaaInfo.lineName"
+                    label="绾夸綋鍚嶇О"
+                    clearable 
+                    :right-icon-size="19"
+                    placeholder="绾夸綋鍚嶇О"
+                    disabled>
+                </van-field>--%>
+
  <van-field
    ref="barcode"
    v-model="scanInfo.barcode"
@@ -59,49 +103,85 @@
     label="鍙戞枡鏁伴噺"
     placeholder="鍙戞枡鏁伴噺" 
   >
-    <van-button slot="button" type="info" size="small"  plain @click="getChaiFen">
-      鏉$爜鎷嗗垎
-    </van-button>
+    <van-button slot="button" type="info" size="small"  plain @click="getChaiFen">鏉$爜鎷嗗垎</van-button>
   </van-field>
 </van-cell-group>
-   <%-- </div>--%>
-  <van-tabs color="#000" title-active-color="#0283EF">
-  <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 modeInfo.daisao1" :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.dab006}}</van-col>
-         <van-col span="6">{{itm.dab007}}</van-col>
-    </van-row>
-  </van-tab>
-   <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>
+    </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="8" 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 modeInfo.totals1" :key="index">
-           <van-col span="12" class="text-left padding-left">
-                <div>{{itm.itemNo}}</div>
+        <!-- 澧炲姞琛岀偣鍑讳笌閫変腑楂樹寒 -->
+            <van-row 
+            v-for="(itm,index) in ItemDetail.items"
+            :key="index"
+            :style="{ background: currentIndex === index ? '#87CEEB' : '' }"
+            @click.native="handleRowClick(itm, index)">
+            <van-col span="8" class="text-left padding-left">
+                <div class="blue-text">{{itm.itemNo}}</div>
                 <div>{{itm.itemName}}</div>
-           </van-col>
-            <van-col span="6">{{itm.dab006}}</van-col>
-           <van-col span="6">{{itm.dab007}}</van-col>
-       </van-row>
-   </van-tab>
+            </van-col>
+            <van-col span="8" class="text-left padding-left">
+                <div>{{itm.itemModel}}</div>
+            </van-col>
+            <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col>
+            <van-col span="5">{{itm.recoKw}}</van-col>
+        </van-row>
+    </van-tab>
+
+                    <van-tab title="搴撲綅鍒楄〃" class="mySolid font">
+                <van-row>
+                    <van-col span="10" class="text-left padding-left">鏉$爜缂栧彿</van-col>
+                    <van-col span="5" class="text-left padding-left">搴撲綅</van-col>
+                    <van-col span="4">鏁伴噺</van-col>
+                    <van-col span="5">浠撳簱</van-col>
+                </van-row>
+                <van-row v-for="(itm,index) in ItemBarKw" :key="index">
+                    <van-col span="10" class="text-left padding-left">
+                        <div class="blue-text">{{itm.iteM_BARCODE}}</div>
+                    </van-col>
+                    <van-col span="5" class="text-left padding-left">
+                        <div>{{itm.depoT_SECTIONS_CODE}}</div>
+                    </van-col>
+                    <van-col span="4" class="blue-text">{{itm.quantity}}</van-col>
+                    <van-col span="5" >{{itm.depot_name}}</van-col>
+                </van-row>
+            </van-tab>
+
+    <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="3">闇�棰嗘暟</van-col>
+            <van-col span="5">宸查鏁�</van-col>
+        </van-row>
+        <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index"><%--ItemBlDetail.ysitems--%>
+            <van-col span="8" class="text-left padding-left">
+                <div class="blue-text">{{itm.itemNo}}</div>
+                <div>{{itm.itemName}}</div>
+            </van-col>
+            <van-col span="8" class="text-left padding-left">
+                <div>{{itm.itemModel}}</div>
+            </van-col>
+            <van-col span="3">{{itm.fQty}}</van-col>
+            <van-col span="5" class="blue-text">{{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>
-    <%--<comback ></comback>--%>
+
 </asp:Content>
 <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
-    <script src="Js/Wwll.js?<%=12324 %>"></script>
+    <script src="Js/Wwll.js?<%=123263 %>"></script>
 </asp:Content>

--
Gitblit v1.9.3