From 4fa639960856182387608fd53c081a38c82b0048 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 17 十月 2025 15:20:47 +0800
Subject: [PATCH] 出战汇报单添加选择工序功能

---
 manifest.json                              |   42 +++---
 components/ProcListPopup/ProcListPopup.vue |  209 ++++++++++++++++++++++++++++++++++
 pages/gongxuOut/form.vue                   |   71 ++++++++++-
 .hbuilderx/launch.json                     |    2 
 4 files changed, 291 insertions(+), 33 deletions(-)

diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index d7abf73..4dd14cd 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -25,7 +25,7 @@
             "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/ProcListPopup/ProcListPopup.vue b/components/ProcListPopup/ProcListPopup.vue
new file mode 100644
index 0000000..6084b3e
--- /dev/null
+++ b/components/ProcListPopup/ProcListPopup.vue
@@ -0,0 +1,209 @@
+<template>
+    <view>
+        <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+            <view class="content">
+                <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['宸ュ簭鍚嶇О']"
+                             @tap="clickCard(bill['娴佹按鍙�'],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>
+                            
+                        </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';
+	import {
+	    getUserInfo
+	} from "@/utils/auth.js";
+    export default {
+        name: "BillListPopup_Check",
+        data() {
+            return {
+				userInfo: getUserInfo(),
+                size: 20,
+                curPage: 1,
+                length: 0,
+                page: 0,
+                // HMater: this.HMater,
+                HCustom: '',
+                HBillList: [],
+                panelHeight: 0,
+
+            };
+        },
+        props: {
+            HProcExchHBillNo: {
+                type: [String, String],
+                required: true
+            },
+			HProcExchHInteID: {
+			    type: [String, Number],
+			    required: true
+			},
+        },
+        methods: {
+            popupChangeHandler(e) {
+                if (e.show === true) {
+                    this.getBillList()
+                }
+            },
+            async exit() {
+                this.size = 20
+                this.curPage = 1
+                this.length = 0
+                this.page = 0
+                this.HBillList = []
+                // 闇�瑕佺瓑寰呴〉闈㈠唴鐨勬暟鎹祴鍊煎畬姣�
+                await this.$nextTick()
+                this.$refs.popup.close();
+            },
+            search() {
+                this.getBillList()
+            },
+            
+            showPopup() {
+                this.$refs.popup.open();
+            },
+            clickCard(procNo,seqNumber, index) {
+				uni.$emit('HProcNoSelectComplete', {
+					HProcNo:procNo,
+					HSEQNumber:seqNumber
+				})
+                // this.exit()
+            },
+            getBillList() {
+                this.HBillList = []
+                this.length = 0
+                this.page = 0
+                this.curPage = 1
+                CommonUtils.doRequest(
+                    "/Web/GetProcNoList", {
+                        HInterID: this.HProcExchHInteID,
+                        sWhere: 0,
+                        UserID: this.userInfo["Czybm"],
+                    },
+                    (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
+                            
+                        } else {
+                            
+                            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 e01e636..6709bb4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
     "name" : "鏅轰簯LMES",
     "appid" : "__UNI__B002F49",
     "description" : "",
-    "versionName" : "1.0.99",
-    "versionCode" : 199,
+    "versionName" : "2.0.3",
+    "versionCode" : 203,
     "transformPx" : false,
     /* 5+App鐗规湁鐩稿叧 */
     "app-plus" : {
@@ -18,10 +18,10 @@
         },
         /* 妯″潡閰嶇疆 */
         "modules" : {
-            "Barcode" : {},
             "Camera" : {},
             "Contacts" : {},
-            "Bluetooth" : {}
+            "Bluetooth" : {},
+            "Barcode" : {}
         },
         /* 搴旂敤鍙戝竷淇℃伅 */
         "distribute" : {
@@ -59,33 +59,33 @@
             },
             "icons" : {
                 "android" : {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                    "hdpi" : "",
+                    "xhdpi" : "",
+                    "xxhdpi" : "",
+                    "xxxhdpi" : ""
                 },
                 "ios" : {
-                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "appstore" : "",
                     "ipad" : {
-                        "app" : "unpackage/res/icons/76x76.png",
-                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "app" : "",
+                        "app@2x" : "",
                         "notification" : "unpackage/res/icons/20x20.png",
                         "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "proapp@2x" : "",
                         "settings" : "unpackage/res/icons/29x29.png",
                         "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight" : "",
                         "spotlight@2x" : "unpackage/res/icons/80x80.png"
                     },
                     "iphone" : {
-                        "app@2x" : "unpackage/res/icons/120x120.png",
-                        "app@3x" : "unpackage/res/icons/180x180.png",
-                        "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "notification@3x" : "unpackage/res/icons/60x60.png",
-                        "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "settings@3x" : "unpackage/res/icons/87x87.png",
-                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
-                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                        "app@2x" : "",
+                        "app@3x" : "",
+                        "notification@2x" : "",
+                        "notification@3x" : "",
+                        "settings@2x" : "",
+                        "settings@3x" : "",
+                        "spotlight@2x" : "",
+                        "spotlight@3x" : ""
                     }
                 }
             }
diff --git a/pages/gongxuOut/form.vue b/pages/gongxuOut/form.vue
index 27a3014..d9cc718 100644
--- a/pages/gongxuOut/form.vue
+++ b/pages/gongxuOut/form.vue
@@ -4,7 +4,7 @@
             <view class="form-item">
                 <view class="title"><text>*</text>鏉″舰鐮�:</view>
                 <view class="right" style="width: 380rpx;">
-                    <input name="HBarCode" v-model="hform.HBarCode" placeholder="璇锋壂鎻忔潯鐮�" @confirm="toInCode(e)" />
+                    <input name="HBarCode" v-model="hform.HBarCode" placeholder="璇锋壂鎻忔潯鐮�" @confirm="toInCode" />
                 </view>
                 <uni-icons type="scan"
                     style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
@@ -23,9 +23,12 @@
                     <input v-model="hform.HProcNo" placeholder="璇疯緭鍏�(鎴栨壂鎻�)娴佹按鍙�"
                         @blur="getHProcNoData2(hform.HBarCode,hform.HProcNo,hform.HSEQNumber)" />
                 </view>
-                <uni-icons type="scan"
+                <!-- <uni-icons type="scan"
                     style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
-                    size="20" @click="toScanProcNo"></uni-icons>
+                    size="20" @click="toScanProcNo"></uni-icons> -->
+				<view class="icon-wrapper" >
+					<uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+				</view>
             </view>
 			<view class="form-item">
 			    <view class="title">宸ュ簭缂栫爜:</view>
@@ -488,11 +491,13 @@
                     @tap="check">瀹℃牳</button>
                 <button v-if="btnType != 0 && btnType == 3" class="btn-d" style="margin-left: 20rpx;" size="mini"
                     @tap="abandonCheck">鍙嶅鏍�</button>
-                <flex style="flex: 1;"></flex>
+                <!-- <flex style="flex: 1;"></flex> -->
                 <button class="btn-b" size="mini" @tap="addNew">鏂板</button>
                 <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
             </view>
         </view>
+		<ProcListPopupVue ref="billList" :HProcExchHBillNo="hform.HProcExchBillNo" :HProcExchHInteID="hform.HProcExchHinteID"
+		    ></ProcListPopupVue>
     </view>
 </template>
 <script>
@@ -501,7 +506,9 @@
         getUserInfo
     } from "@/utils/auth.js";
 import { CommonUtils } from '../../utils/common';
+import ProcListPopupVue from '../../components/ProcListPopup/ProcListPopup.vue';
     export default {
+		components: { ProcListPopupVue },
         data() {
             return {
                 userInfo: getUserInfo(),
@@ -648,10 +655,11 @@
             } else {
                 this.getNewData()
 				if(e.HBarCode){
+					console.log(e.HBarCode)
 					this.hform.HBarCode=e.HBarCode
 					setTimeout(() => {
-						this.toInCode(e);
-					}, 1000)
+						this.toInCode();
+					}, 500)
 				}
 				
             }
@@ -664,9 +672,30 @@
             this.getHCenterList()
 
             this.getDefValByUser()
-			
+			uni.$on('HProcNoSelectComplete', (e) => {
+			    console.log("鎺ユ敹鍒扮殑娑堟伅: ", e.HProcNo)
+			    this.hform.HProcNo=e.HProcNo;
+				this.hform.HSEQNumber = e.HSEQNumber;
+				this.getHProcNoData2(this.hform.HBarCode,this.hform.HProcNo,this.hform.HSEQNumber)
+				this.$refs.billList.exit()
+			})
         },
+		onUnload() {
+		    uni.$off('HProcNoSelectComplete')
+		},
         methods: {
+			//閫夋嫨宸ュ簭
+			showBillList() {
+				if(this.hform.HProcExchBillNo!=""){
+					this.$refs.billList.showPopup()
+				}else{
+					uni.showToast({
+					    title: '璇峰厛鎵弿娴佽浆鍗�',
+					    icon: 'none'
+					})
+				}
+			    
+			},
 			//閫変腑鍏ㄩ儴鏂囨湰
 			selectAllText(e) {
 			  console.log(e.target)
@@ -774,7 +803,7 @@
                 //     }
                 // });
             },
-            toInCode(e) {
+            toInCode() {
                 var str = this.hform.HBarCode
                 if (str.includes('@')) {
                     const parts = str.split('@');
@@ -1544,7 +1573,10 @@
                     },
                 });
             },
-            getHProcNoData2(HBarCode, HProcNo,HSEQNumber) {
+            getHProcNoData2(HBarCode,HProcNo,HSEQNumber) {
+				if(HProcNo==""){
+					return;
+				}
                 uni.request({
                     url: this.serverUrl + '/Cj_StationOutBill/txtHProcNo_KeyDown',
                     data: {
@@ -1922,15 +1954,19 @@
 				        console.log(1, res);
 				        if (res.data.count == 1) {
 							let processList = res.data.data
-							
+							let self = this;
+							console.log(this.hform)
+							console.log(self.hform)
 							// 1. 鍏堣繃婊ゅ嚭 HSEQNumber === 'N' 鐨勬暟鎹�
 							processList = processList.filter(item => item.HSEQNumber === this.hform.HSEQNumber);
 							
 							//褰撳墠宸ュ簭缂栧彿
-							const currentIndex = processList.findIndex(item => item["宸ュ簭鍙�"] === this.hform.HProcNo);
+							const currentIndex = processList.findIndex(item => item["宸ュ簭鍙�"] == this.hform.HProcNo);
 							// 鑾峰彇涓嬩竴涓伐搴忥紙濡傛灉瀛樺湪锛�
 							const nextProcess = currentIndex !== -1 && currentIndex < processList.length - 1 
 							  ? processList[currentIndex + 1] : null;
+							 console.log(currentIndex,nextProcess,processList);
+							 
 							if(!nextProcess){
 								uni.showToast({
 								    title: '娌℃湁涓嬩竴閬撳伐搴忓嵆灏嗚烦杞柊澧為〉闈�',
@@ -1969,6 +2005,19 @@
 </script>
 
 <style lang="scss" scoped>
+	.icon-wrapper {
+	    background-color: #3A78FF;
+	    border-radius: 100%;
+	    width: 52rpx;
+	    height: 52rpx;
+	    display: flex;
+	    justify-content: center;
+	    align-items: center;
+	
+	    .uni-icons {
+	        color: #fff !important;
+	    }
+	}
     .form {
         width: 668rpx;
         margin: 20rpx auto;

--
Gitblit v1.9.1