From 8eb2c4ed20d41667129a5888df0f7bbafe743c4a Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 13 八月 2025 11:28:56 +0800
Subject: [PATCH] 修改 工序流转卡列表组件 调整请求接口

---
 components/ProcExchListPopup/ProcExchListPopup.vue |  123 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 110 insertions(+), 13 deletions(-)

diff --git a/components/ProcExchListPopup/ProcExchListPopup.vue b/components/ProcExchListPopup/ProcExchListPopup.vue
index af96dd7..39b7d0b 100644
--- a/components/ProcExchListPopup/ProcExchListPopup.vue
+++ b/components/ProcExchListPopup/ProcExchListPopup.vue
@@ -18,6 +18,18 @@
 					<view class="title"><text>鐢熶骇璁㈠崟: </text></view>
 					<view class="right"><input type="text" v-model="HICMOBillNo" /></view>
 				</view>
+				<view class="search-condition">
+					<view class="title"><text>宸ュ簭: </text></view>
+					<view class="right">
+						<uni-combox placeholder="璇烽�夋嫨宸ュ簭" @input="onProcChangeHandler" v-model="HProcName" :candidates="HProcListName"></uni-combox>
+					</view>
+				</view>
+				<view class="search-condition">
+					<view class="title"><text>閮ㄩ棬: </text></view>
+					<view class="right">
+						<uni-combox placeholder="璇烽�夋嫨閮ㄩ棬" @input="onDeptChangeHandler" v-model="HDepartName" :candidates="HDepartListName"></uni-combox>
+					</view>
+				</view>
 				<view class="buttons">
 					<view style="flex: 1;"></view>
 					<button size="mini" type="primary" @click="search">鎼滅储</button>
@@ -26,7 +38,7 @@
 				<scroll-view id="#BillListPanel" scroll-y="true" style="height: 45vh;">
 					<view class="options-wrapper" v-show="HBillList.length != 0">
 						<uni-card v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['鐗╂枡鍚嶇О']"
-							:extra="`鏁伴噺: ${bill['鏁伴噺']}`" @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'])">
+							:extra="`鏁伴噺: ${bill['鏁伴噺']}`" @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'], bill['宸ュ簭鍙�'])">
 							<view class="item">
 								<view class="left">鍗曟嵁鍙�: </view>
 								<view class="right">{{bill['鍗曟嵁鍙�']}}</view>
@@ -35,17 +47,21 @@
 								<view class="left">鐗╂枡浠g爜: </view>
 								<view class="right">{{bill['鐗╂枡缂栫爜']}}</view>
 							</view>
-							<!-- <view class="item">
-								<view class="left">鐗╂枡鍚嶇О: </view>
-								<view class="right">{{bill['鐗╂枡鍚嶇О']}}</view>
-							</view> -->
+							<view class="item">
+								<view class="left">宸ュ簭: </view>
+								<view class="right">{{bill['宸ュ簭']}}</view>
+							</view>
 							<view class="item">
 								<view class="left">瑙勬牸鍨嬪彿: </view>
 								<view class="right">{{bill['瑙勬牸鍨嬪彿']}}</view>
-							</view>		
+							</view>
 							<view class="item">
 								<view class="left">杞﹂棿: </view>
 								<view class="right">{{bill['杞﹂棿']}}</view>
+							</view>
+							<view class="item">
+								<view class="left">娴佹按鍙�: </view>
+								<view class="right">{{bill['宸ュ簭鍙�']}}</view>
 							</view>
 						</uni-card>
 					</view>
@@ -81,19 +97,97 @@
 				HICMOBillNo: '',
 				HBillList: [],
 				panelHeight: 0,
+				
+				HProcListName: [],
+				HProcListValue: [],
+				HProcID: '',
+				HProcName: '',
+				
+				HDepartListName: [],
+				HDepartListValue: [],
+				HDepartID: getUserInfo()['HDeptID'],
+				HDepartName: getUserInfo()['HDept'],
 			};
 		},
 		props: {
-			
+
 		},
 		model: {
 			prop: "HSourceBill",
 			event: 'change'
 		},
+		mounted() {
+			
+		},
 		methods: {
+			onProcChangeHandler(e) {
+				let index = this.HProcListName.findIndex(eName => e == eName)
+				if(index != -1){
+					this.HProcID = this.HProcListValue[index]
+				}else {
+					this.HProcName = ''
+					this.HProcID = ''
+				}
+			},
+			onDeptChangeHandler(e) {
+				let index = this.HDepartListName.findIndex(eName => e == eName)
+				if(index != -1){
+					this.HDepartID = this.HDepartListValue[index]
+				}else {
+					this.HDepartName = ''
+					this.HDepartID = ''
+				}
+			},
+			getHDeptList() { // 鑾峰緱閮ㄩ棬
+				CommonUtils.doRequest2({
+					url: "/Gy_Department/list",
+					data: {
+						sWhere: ` and HUSEORGID=${uni.getStorageSync('OrganizationID')}`,
+						user: this.userInfo['Czymc'],
+						Organization: uni.getStorageSync('Organization')
+					},
+					resFunction: (res) => {
+						let {data, count, Message} = res.data
+						
+						this.HDepartListName = []
+						this.HDepartListValue = []
+						
+						Array.from(data).forEach(item => {
+							this.HDepartListName.push(item['閮ㄩ棬鍚嶇О'])
+							this.HDepartListValue.push(item['HItemID'])
+						})
+						
+						
+					}
+				})
+			},
+			getHProcList() { // 鑾峰緱宸ュ簭
+				CommonUtils.doRequest2({
+					url: "/Web/GetProcList_Json",
+					data: {
+						sWhere: '',
+					},
+					resFunction: (res) => {
+						let {data, count, Message} = res.data
+						console.log('HProc data: ',data);
+						this.HProcListName = []
+						this.HProcListValue = []
+						
+						Array.from(data).forEach(item => {
+							this.HProcListName.push(item['宸ュ簭'])
+							this.HProcListValue.push(item['HItemID'])
+						})
+					}
+				})
+			},
 			popupChangeHandler(e) {
 				if (e.show === true) {
+					// 鍒濆鍖栧崟鎹俊鎭�
 					this.getBillList()
+					// 鍒濆鍖栭儴闂�
+					this.getHDeptList()
+					// 鍒濆鍖栧伐搴�
+					this.getHProcList()
 				} else {
 					// 娓呯悊璧勬簮
 					this.size = 20
@@ -115,21 +209,24 @@
 			showPopup() {
 				this.$refs.popup.open();
 			},
-			clickCard(interid, billno) {
-				uni.$emit('BillSelectComplete', {
+			clickCard(interid, billno, procNumber) {
+				uni.$emit('BillSelectComplete2', {
 					HInterID: interid,
-					HBillNo: billno
+					HBillNo: billno,
+					HProcNo: procNumber
 				})
 				// this.exit()
 			},
 			getBillList() {
 				CommonUtils.doRequest(
-					"/WEBSController/GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json", {
+					"/WEBSController/GetMES_ProcessExchangeBillList_APP_HaiCheng", {
 						HBillNo: this.HBillNo || '',
 						HNumber: this.HNumber || '',
 						HName: this.HName || '',
 						HICMOBillNo: this.HICMOBillNo || "",
-						user: this.userInfo['Czymc']
+						user: this.userInfo['Czymc'],
+						HProcID: this.HProcID,
+						HDeptID: this.HDepartID
 					},
 					(res) => {
 						let {
@@ -138,7 +235,7 @@
 							Message
 						} = res.data
 						if (count == 1) {
-							console.log(data)
+							console.log("ProcessExchangeBill: ", data)
 							this.length = Array.from(data).length
 							const result = [];
 							for (let i = 0; i < data.length; i += this.size) {

--
Gitblit v1.9.1