From ec3f0591fad733f415076b1e29e300649b056bf5 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 18 九月 2025 08:58:29 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/shouliaotongzhi/table.vue                  |   20 +-
 manifest.json                                    |    1 
 components/BillListPopup/BillListPopup_Check.vue |  310 ++++++++++++++++++++++++++++++++++++++
 .hbuilderx/launch.json                           |    4 
 pages/shouliaotongzhi/table_son.vue              |   20 +-
 pages/shengchanlingliao/form.vue                 |   70 ++++++++
 6 files changed, 399 insertions(+), 26 deletions(-)

diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index a7d9080..4dd14cd 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -21,11 +21,11 @@
             "type" : "uni-app:app-ios"
         },
         {
-            "customPlaygroundType" : "local",
+            "customPlaygroundType" : "device",
             "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
             "openVueDevtools" : true,
             "packageName" : "com.shebeiguanli.www",
-            "playground" : "custom",
+            "playground" : "standard",
             "type" : "uni-app:app-android"
         }
     ]
diff --git a/components/BillListPopup/BillListPopup_Check.vue b/components/BillListPopup/BillListPopup_Check.vue
new file mode 100644
index 0000000..ee9efde
--- /dev/null
+++ b/components/BillListPopup/BillListPopup_Check.vue
@@ -0,0 +1,310 @@
+<template>
+    <view>
+        <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+            <view class="content">
+                <view class="search-condition">
+                    <view class="title"><text>鍗曟嵁鍙�: </text></view>
+                    <view class="right"><input type="text" v-model="HBillNo" @confirm="getBillList" /></view>
+                </view>
+                <view class="search-condition">
+                    <view class="title"><text>鐗╂枡: </text></view>
+                    <view class="right"><input type="text" :focus="enablefocus" v-model="HMater"
+                            @confirm="getBillList" /></view>
+                </view>
+                <view class="search-condition">
+                    <view class="title"><text>鍏宠仈椤�: </text></view>
+                    <view class="right"><input type="text" v-model="HCustom" @confirm="getBillList" /></view>
+                </view>
+                <view class="buttons">
+                    <view style="flex: 1;"></view>
+                    <button size="mini" type="primary" @click="search">鎼滅储</button>
+                    <button v-if="MultiSourceBill" size="mini" type="primary" @click="ret">杩斿洖</button>
+                    <button size="mini" type="primary" @click="exit">閫�鍑�</button>
+                </view>
+                <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;">
+                    <view class="options-wrapper" v-show="HBillList.length != 0">
+                        <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''"
+                            v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['鐗╂枡鍚嶇О']"
+                            :extra="`鏁伴噺: ${bill['鏁伴噺']}`" @tap="clickCard(bill['HInterID'], bill['鍗曟嵁鍙�'], index)">
+                            <view class="item">
+                                <view class="left">鍗曟嵁鍙�: </view>
+                                <view class="right">{{bill['鍗曟嵁鍙�']}}</view>
+                            </view>
+                            <view class="item">
+                                <view class="left">鐗╂枡浠g爜: </view>
+                                <view class="right">{{bill['鐗╂枡浠g爜']}}</view>
+                            </view>
+                            <!-- <view class="item">
+								<view class="left">鐗╂枡鍚嶇О: </view>
+								<view class="right">{{}}</view>
+							</view> -->
+                            <view class="item">
+                                <view class="left">瑙勬牸鍨嬪彿: </view>
+                                <view class="right">{{bill['瑙勬牸鍨嬪彿']}}</view>
+                            </view>
+                            <view class="item" v-if="bill['鐢熶骇浠诲姟鍗曞彿']">
+                                <view class="left">鐢熶骇璁㈠崟鍙�: </view>
+                                <view class="right">{{bill['鐢熶骇浠诲姟鍗曞彿']}}</view>
+                            </view>
+							<view class="item" v-if="bill['娆惧彿']">
+							    <view class="left">娆惧彿: </view>
+							    <view class="right">{{bill['娆惧彿']}}</view>
+							</view>
+                        </uni-card>
+                    </view>
+                    <view class="over" v-show="HBillList.length == 0">鏆傛棤鏁版嵁</view>
+                </scroll-view>
+                <uni-pagination id="#pagination" title="鏍囬鏂囧瓧" v-model="curPage" :pageSize="size"
+                    :total="length"></uni-pagination>
+            </view>
+
+        </uni-popup>
+    </view>
+</template>
+
+<script>
+    import {
+        CommonUtils
+    } from '../../utils/common';
+    export default {
+        name: "BillListPopup_Check",
+        data() {
+            return {
+                enablefocus: false,
+                size: 20,
+                curPage: 1,
+                length: 0,
+                page: 0,
+                HBillNo: '',
+                HMater: this.HMater,
+                HCustom: '',
+                HBillList: [],
+                panelHeight: 0,
+
+                multiSouceBillList: []
+            };
+        },
+        props: {
+            HBillType: {
+                type: [String, Number],
+                required: true
+            },
+            HStockOrgID: {
+                type: [String, Number],
+                required: true
+            },
+            MultiSourceBill: {
+                type: Boolean,
+                default: false,
+                required: false
+            },
+			HMater:{
+				type: [String, Number],
+				default: '',
+				required: false
+			}
+        },
+        model: {
+            prop: "HSourceBill",
+            event: 'change'
+        },
+        methods: {
+            popupChangeHandler(e) {
+                if (e.show === true) {
+                    this.getBillList()
+                }
+            },
+            async exit() {
+                this.size = 20
+                this.curPage = 1
+                this.length = 0
+                this.page = 0
+                this.HBillNo = ''
+                this.HMater = ''
+                this.HCustom = ''
+                this.HBillList = []
+                this.enablefocus = false
+                this.multiSouceBillList = []
+                // 闇�瑕佺瓑寰呴〉闈㈠唴鐨勬暟鎹祴鍊煎畬姣�
+                await this.$nextTick()
+                this.$refs.popup.close();
+            },
+            search() {
+                this.getBillList()
+            },
+            ret() {
+                console.log('this.MultiSourceBill: ', this.MultiSourceBill);
+                uni.$emit('BillSelectComplete', {
+                    HInterID: 0,
+                    HBillNo: 0,
+                    enableMultiSourceBill: this.MultiSourceBill,
+                    MultiSourceBillList: this.multiSouceBillList
+                })
+            },
+            showPopup() {
+                this.$refs.popup.open();
+            },
+            clickCard(interid, billno, index) {
+                if (this.MultiSourceBill == false) { // 闈炲婧愬崟妯″紡
+                    uni.$emit('BillSelectComplete', {
+                        HInterID: interid,
+                        HBillNo: billno,
+                        enableMultiSourceBill: this.MultiSourceBill
+                    })
+                } else {
+                    this.$set(this.HBillList[this.curPage - 1][index], 'isActive', !this.HBillList[this.curPage - 1][
+                        index
+                    ]['isActive'])
+                    console.log(this.HBillList[this.curPage - 1][index])
+                    // 璁剧疆浜嗗婧愬崟妯″紡
+                    this.setMultiSourceBillList({
+                        HInterID: interid,
+                        HBillNo: billno,
+                        HIsActive: this.HBillList[this.curPage - 1][index]['isActive']
+                    })
+                }
+
+                // this.exit()
+            },
+            setMultiSourceBillList(billInfo) {
+                let index = this.multiSouceBillList.findIndex(item => item.HInterID == billInfo.HInterID)
+                if (index == -1) {
+                    billInfo['count'] = 1
+                    this.multiSouceBillList.push(billInfo)
+                } else {
+                    if (billInfo.HIsActive) {
+                        // 濡傛灉瀵瑰簲鍗曟嵁浼犲叆鐨勬槸鍚︽縺娲绘暟鏄痶rue锛屽垯璁℃暟鍣�+1
+                        this.multiSouceBillList[index]['count']++;
+                    } else {
+                        // 濡傛灉瀵瑰簲鍗曟嵁浼犲叆鐨勬槸鍚︽縺娲绘暟鏄痜alse锛屽垯璁℃暟鍣�-1
+                        this.multiSouceBillList[index]['count']--;
+                    }
+                    if(this.multiSouceBillList[index]['count'] == 0){
+                        // 娌℃湁閫変腑鐨勫崟鎹紝鍒欑Щ闄ょ紦瀛樹腑鐨勬暟鎹�
+                        this.multiSouceBillList.splice(index, 1)
+                    }
+                }
+                console.log('this.multiSouceBillList: ', this.multiSouceBillList);
+            },
+            getBillList() {
+                this.HBillList = []
+                this.length = 0
+                this.page = 0
+                this.curPage = 1
+                CommonUtils.doRequest(
+                    "/WEBSController/GetCheckBillList_Json", {
+                        HBillType: this.HBillType,
+                        HStockOrgID: this.HStockOrgID,
+                        HBillNo: this.HBillNo || "",
+                        HMater: this.HMater || "",
+                        HCustom: this.HCustom || ""
+                    },
+                    (res) => {
+                        let {
+                            data,
+                            count,
+                            Message
+                        } = res.data
+                        if (count == 1) {
+                            this.length = Array.from(data).length
+                            const result = [];
+                            for (let i = 0; i < data.length; i += this.size) {
+                                result.push(data.slice(i, i + this.size));
+                            }
+                            this.HBillList = result
+                            this.page = result.length
+                            setTimeout(() => {
+                                this.enablefocus = true
+                            }, 500)
+                        } else {
+                            setTimeout(() => {
+                                this.enablefocus = true
+                            }, 500)
+                            uni.showToast({
+                                icon: 'none',
+                                title: Message
+                            })
+                        }
+                    }
+                )
+            },
+        },
+    }
+</script>
+
+<style lang="scss">
+    .content {
+        box-sizing: border-box;
+        border-radius: 15rpx 15rpx 0 0;
+        padding: 20rpx 20rpx 40rpx 20rpx;
+        background-color: #fff;
+        display: flex;
+        flex-direction: column;
+        gap: 10rpx;
+
+        .search-condition {
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            gap: 20rpx;
+
+            .title {
+                width: 5rem;
+                text-align: right;
+            }
+
+            .right {
+                flex: 1;
+                border-radius: 22rpx;
+                border: 1px solid #acacac;
+                height: auto;
+
+                input {
+                    width: 100%;
+                    padding: 8rpx 20rpx;
+                    font-size: 24rpx;
+                }
+            }
+        }
+
+        .buttons {
+            display: flex;
+            flex-direction: row;
+            gap: 20rpx;
+            justify-content: flex-end;
+
+            >button {
+                display: inline-flex;
+                width: 4rem;
+            }
+        }
+
+        .options-wrapper {
+            padding: 20rpx;
+            display: grid;
+            grid-template-columns: repeat(1, 1fr);
+            gap: 20rpx;
+
+            >view {
+                margin: 0 !important;
+                box-sizing: border-box;
+
+            }
+
+            .item {
+                .left {
+                    display: inline-block;
+                    width: 6rem;
+                }
+
+                .right {
+                    display: inline-block;
+                }
+            }
+        }
+
+        .uni-card--is-active {
+            background-color: rgba(0, 122, 255, 0.2);
+        }
+    }
+</style>
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index d52a847..98d8434 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,6 +2,7 @@
     "name" : "鏅轰簯LMES",
     "appid" : "__UNI__B002F49",
     "description" : "",
+
     "versionName" : "1.0.82",
     "versionCode" : 182,
     "transformPx" : false,
diff --git a/pages/shengchanlingliao/form.vue b/pages/shengchanlingliao/form.vue
index f91b57b..ffbb9c9 100644
--- a/pages/shengchanlingliao/form.vue
+++ b/pages/shengchanlingliao/form.vue
@@ -51,6 +51,16 @@
                         style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                         size="20" @click="toScanCode"></uni-icons>
                 </view>
+				<view class="form-item" v-show="showHBillNo">
+				    <view class="title">鍗曟嵁鍙�(鐗╂枡):</view>
+				    <view class="right" style="width: 380rpx;">
+				        <input name="HBillNoMater" :focus="HBillNoFocusMater" v-model="HBillNoMater" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+				            @confirm="showBillList()" />
+				    </view>
+				    <uni-icons type="scan"
+				        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+				        size="20" @click="toScanCodeMater"></uni-icons>
+				</view>
                 <view class="form-item" v-show="!showHBillNo">
                     <view class="title">鍗曟嵁鍙�:</view>
                     <view class="righton">
@@ -175,10 +185,13 @@
                 <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
             </view>
         </view>
+		<BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HMater='HBillNoMater'
+			:HStockOrgID="hform.HStockOrgID" :MultiSourceBill="false"></BillListPopupVue>
     </view>
 </template>
 <script>
     import getDateTime from '@/utils/getdateTime.js';
+	import BillListPopupVue from '../../components/BillListPopup/BillListPopup_Check.vue';
     import {
         getUserInfo
     } from "@/utils/auth.js";
@@ -193,8 +206,10 @@
                 HModName: 'Kf_MateOutBill_Check_PDA',
                 ModRightName: 'CE_MateOutCheck',
                 OperationType: 1,
-
+				
                 HBillNoFocus: false,
+				HBillNoFocusMater:false,
+				HBillNoMater:'',
                 showHBillNo: true,
                 tabs: 1,
                 linterid: '',
@@ -242,7 +257,10 @@
                 }
             }
         },
-        onLoad(e) {
+        components:{
+			BillListPopupVue
+		},
+		onLoad(e) {
             console.log(e, this.userInfo)
             this.OperationType = e.OperationType
             if (e.HBillNo) {
@@ -253,6 +271,29 @@
                 this.refreshHBillNoFocus()
             }
             this.getHBaseList()
+			uni.$on('BillSelectComplete', async (e) => {
+			    console.log("鎺ユ敹鍒扮殑娑堟伅: ", e)
+			    console.log("鏄惁搴旂敤澶氭簮鍗�: ", e.enableMultiSourceBill)
+			    if(e.enableMultiSourceBill){
+			        for(let item of e.MultiSourceBillList) {
+			            try{
+			                this.hform.HBillNo = e.HBillNo
+							await this.GetMeesageByBillNo()
+			            }catch {
+			                return
+			            }
+			        }
+			        this.$refs.billList.exit()
+			        // if(e.MultiSourceBillList.length != 0){
+			        //      this.showHSourceBillNo = false
+			        // }
+			       
+			    }else {
+			        this.hform.HBillNo = e.HBillNo
+			        this.GetMeesageByBillNo()
+			        this.$refs.billList.exit()
+			    }
+			})
         },
         methods: {
             toScanCode2() {
@@ -848,8 +889,29 @@
                         }
                     }
                 });
-            }
-        }
+            },
+			//鍗曟嵁鏌ヨ鍒楄〃鏄剧ず
+			showBillList(){
+				this.$refs.billList.showPopup()
+			},
+			toScanCode() {
+			    var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+			    mpaasScanModule.mpaasScan({
+			        'hideAlbum': true,
+			        'timeoutInterval': '10', //瓒呮椂鏃堕棿
+			        'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋            
+			    }, (ret) => {
+			        console.log(ret.resp_result)
+			        // if(this.hform.HBarCode == '*'){
+			        // 	this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+			        // }else{
+			        // 	this.hform.HBarCode = ret.resp_result
+			        // }
+			        this.HBillNoMater = ret.resp_result
+			        this.$refs.billList.showPopup()
+			    })
+			},
+		}
     }
 </script>
 
diff --git a/pages/shouliaotongzhi/table.vue b/pages/shouliaotongzhi/table.vue
index 797b67b..59d4896 100644
--- a/pages/shouliaotongzhi/table.vue
+++ b/pages/shouliaotongzhi/table.vue
@@ -368,29 +368,29 @@
                     "ENDQR\r\n",
                     `T 24 0 0 30 渚涘簲鍟�: ${HSupNameShort}\r\n`,
                     `T 55 0 0 55 (Supplier)\r\n`,
-                    `T 24 0 250 30 瀹㈡埛缂栧彿: ${HFactory || ''}\r\n`,
-                    `T 55 0 250 55 (Consumer No.)\r\n`,
+                    `T 24 0 190 30 瀹㈡埛缂栧彿: ${HFactory || ''}\r\n`,
+                    `T 55 0 190 55 (Consumer No.)\r\n`,
                     `T 24 0 0 75 鐗╂枡缂栫爜: ${HMaterNumber}\r\n`,
                     `T 55 0 0 100 (Material Number)\r\n`,
                     `T 24 0 0 120 鐗╂枡鍚嶇О: ${HMaterName}\r\n`,
                     `T 55 0 0 145 (Material Code)\r\n`,
-                    `T 24 0 0 165 娆惧彿: ${HCoilNO || ''}\r\n`,
-                    `T 55 0 0 190 (Style No.)\r\n`,
-                    `T 24 0 300 165 渚涘簲鍟嗘枡鍙�: ${HSupMaterNumber}\r\n`,
-                    `T 55 0 300 190 (Supplier Sku No.)\r\n`,
+                    `T 4 0 0 165 娆惧彿: ${HCoilNO || ''}\r\n`,
+                    `T 55 0 0 194 (Style No.)\r\n`,
+					`T 24 0 240 165 閲囪喘鍗曞彿: ${HInnerBillNo || ''}\r\n`,
+                    `T 55 0 240 190 (Purchase Order No.)\r\n`,
                     `T 24 0 0 210 鍒嗙粍: ${HFurnaceNo[1] || HFurnaceNo[0] || ''}\r\n`,
                     `T 55 0 0 235 (Group)\r\n`,
                     `T 24 0 300 210 瑙勬牸: ${HMaterModel}\r\n`,
                     `T 55 0 300 235 (SKU NO.)\r\n`,
-                    `T 24 0 0 255 鏁伴噺: ${ parseFloat(HQty || 0).toFixed(0) } ${pcsInfo}\r\n`,
-                    `T 55 0 0 280 (Quantity)\r\n`,
+                    `T 4 0 0 255 鏁伴噺: ${ parseFloat(HQty || 0).toFixed(0) } ${pcsInfo}\r\n`,
+                    `T 55 0 0 284 (Quantity)\r\n`,
                     `T 24 0 300 255 鏃ユ湡: ${HDate || ''}\r\n`,
                     `T 55 0 300 280 (Date)\r\n`,
                     `T 24 0 0 300 妫�楠屽憳: \r\n`,
                     `L 80 325 230 325 3\r\n`,
                     `T 55 0 0 325 (QC)\r\n`,
-                    `T 24 0 240 300 閲囪喘鍗曞彿: ${HInnerBillNo || ''}\r\n`,
-                    `T 55 0 240 325 (Purchase Order No.)\r\n`,
+                    `T 24 0 300 300 渚涘簲鍟嗘枡鍙�: ${HSupMaterNumber}\r\n`,
+					`T 55 0 300 325 (Supplier Sku No.)\r\n`,
                     `T 24 0 0 345 妫�楠岀粨鏋�: \r\n`,
                     `T 55 0 0 370 (Inspection status)\r\n`,
                     `BOX 240 345 260 365 4\r\n`,
diff --git a/pages/shouliaotongzhi/table_son.vue b/pages/shouliaotongzhi/table_son.vue
index 6057355..eb1276b 100644
--- a/pages/shouliaotongzhi/table_son.vue
+++ b/pages/shouliaotongzhi/table_son.vue
@@ -403,29 +403,29 @@
 ENDQR
 T 24 0 0 30 渚涘簲鍟�: ${this.baseInfo.HSupNameShort}
 T 55 0 0 55 (Supplier)
-T 24 0 250 30 瀹㈡埛缂栧彿: ${this.baseInfo.HFactory || ''}
-T 55 0 250 55 (Consumer No.)
+T 24 0 190 30 瀹㈡埛缂栧彿: ${this.baseInfo.HFactory || ''}
+T 55 0 190 55 (Consumer No.)
 T 24 0 0 75 鐗╂枡缂栫爜: ${this.baseInfo.HMaterNumber}
 T 55 0 0 100 (Material Number)
 T 24 0 0 120 鐗╂枡鍚嶇О: ${this.baseInfo.HMaterName}
 T 55 0 0 145 (Material Code)
-T 24 0 0 165 娆惧彿: ${this.baseInfo.HCoilNO || ''}
-T 55 0 0 190 (Style No.)
-T 24 0 300 165 渚涘簲鍟嗘枡鍙�: ${this.baseInfo.HSupMaterNumber}
-T 55 0 300 190 (Supplier Sku No.)
+T 4 0 0 165 娆惧彿: ${this.baseInfo.HCoilNO || ''}
+T 55 0 0 194 (Style No.)
+T 24 0 240 165 閲囪喘鍗曞彿: ${this.baseInfo.HInnerBillNo || ''}
+T 55 0 240 190 (Purchase Order No.)  
 T 24 0 0 210 鍒嗙粍: ${HFurnaceNO[1] || HFurnaceNO[0] || ''}
 T 55 0 0 235 (Group) 
 T 24 0 300 210 瑙勬牸: ${this.baseInfo.HMaterModel}
 T 55 0 300 235 (SKU NO.) 
-T 24 0 0 255 鏁伴噺: ${ parseFloat(this.baseInfo.HQty || 0).toFixed(0) } ${pcsInfo}
-T 55 0 0 280 (Quantity) 
+T 4 0 0 255 鏁伴噺: ${ parseFloat(this.baseInfo.HQty || 0).toFixed(0) } ${pcsInfo}
+T 55 0 0 284 (Quantity) 
 T 24 0 300 255 鏃ユ湡: ${this.baseInfo.HDate || ''}
 T 55 0 300 280 (Date) 
 T 24 0 0 300 妫�楠屽憳: 
 L 80 325 230 325 3
+T 24 0 300 300 渚涘簲鍟嗘枡鍙�: ${this.baseInfo.HSupMaterNumber}
+T 55 0 300 325 (Supplier Sku No.)
 T 55 0 0 325 (QC)  
-T 24 0 240 300 閲囪喘鍗曞彿: ${this.baseInfo.HInnerBillNo || ''}
-T 55 0 240 325 (Purchase Order No.)  
 T 24 0 0 345 妫�楠岀粨鏋�: 
 T 55 0 0 370 (Inspection status) 
 BOX 240 345 260 365 4

--
Gitblit v1.9.1