From 26c601a5e0285f68041e3408ca610157a75c9cf6 Mon Sep 17 00:00:00 2001 From: yyb <995253665@qq.com> Date: 星期五, 22 八月 2025 16:11:57 +0800 Subject: [PATCH] 报工页面的投料搜索出来的批次号增加接口获取物料行 --- pages/product/report/seachPersonnelNo.vue | 58 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 32 insertions(+), 26 deletions(-) diff --git a/pages/product/report/seachPersonnelNo.vue b/pages/product/report/seachPersonnelNo.vue index 93ceea5..1508f78 100644 --- a/pages/product/report/seachPersonnelNo.vue +++ b/pages/product/report/seachPersonnelNo.vue @@ -10,11 +10,11 @@ <!-- 妯$硦鏌ヨ鎺ㄨ崘鍒楄〃 --> <view v-if="recommendations.length > 0" class="recommendation-list"> - <view class="recommendation-item" v-for="item in recommendations" :key="item.lotBatchNo" + <view class="recommendation-item" v-for="item in recommendations" :key="item.ifsBatchNo" @click="selectRecommendation(item)"> <view class="recommendation-line"> <text class="recommendation-label">鎵瑰彿:</text> - <text class="recommendation-value">{{ item.lotBatchNo }}</text> + <text class="recommendation-value">{{ item.ifsBatchNo }}</text> </view> <!-- <view class="recommendation-line"> <text class="recommendation-label">闆朵欢鎻忚堪:</text> @@ -124,6 +124,7 @@ productInputList: [], recommendations: [], // 鎺ㄨ崘鍒楄〃鏁版嵁 moOn: "", + workstationId: "", }; }, onLoad() { @@ -146,31 +147,32 @@ }, onLoad(option) { console.log(option.moOn); // 杈撳嚭: value1 - this.moOn = option.moOn; + this.moOn = option.moOn; + this.workstationId = option.workstationId; }, methods: { // 鏄剧ず鎺ㄨ崘鍒楄〃 showRecommendations() { // 褰撹緭鍏ユ鑾峰緱鐒︾偣涓斾负绌烘椂锛屾樉绀洪粯璁ゆ帹鑽� - if (!this.keywords.trim()) { - this.loadDefaultRecommendations(); - } + // if (!this.keywords.trim()) { + // this.loadDefaultRecommendations(); + // } }, - // 鍔犺浇榛樿鎺ㄨ崘 - loadDefaultRecommendations() { - // 璋冪敤API鑾峰彇榛樿鎺ㄨ崘鏁版嵁 - this.$u.api.cancelReporting - .fuzzyQuery() - .then((res) => { - console.log('榛樿鎺ㄨ崘缁撴灉:', res.data); - this.recommendations = res.data || []; - }) - .catch((err) => { - console.error('鑾峰彇榛樿鎺ㄨ崘澶辫触:', err); - this.recommendations = []; - }); - }, + // // 鍔犺浇榛樿鎺ㄨ崘 + // loadDefaultRecommendations() { + // // 璋冪敤API鑾峰彇榛樿鎺ㄨ崘鏁版嵁 + // this.$u.api.cancelReporting + // .fuzzyQuery() + // .then((res) => { + // console.log('榛樿鎺ㄨ崘缁撴灉:', res.data); + // this.recommendations = res.data || []; + // }) + // .catch((err) => { + // console.error('鑾峰彇榛樿鎺ㄨ崘澶辫触:', err); + // this.recommendations = []; + // }); + // }, // 閫夋嫨鎺ㄨ崘椤� selectRecommendation(item) { @@ -178,7 +180,7 @@ console.log('閫夋嫨鎺ㄨ崘椤�:', this.moOn); this.$u.api.cancelReporting .selInputPartInfoPDA({ - outBatchNo: item.lotBatchNo, + outBatchNo: item.ifsBatchNo, partNo: item.partNo, moOn: this.moOn, }) @@ -201,9 +203,12 @@ this.keywords = ''; this.recommendations = []; }); - // this.detailedList = item; - // this.detailedList.ifsBatchNo = item.lotBatchNo; - // this.showModal = true; + // this.detailedList = item; + // this.detailedList.suppliedQuantity = item.availableStockQuantity; + // this.showModal = true; + // // 娓呯┖杈撳叆妗嗗拰鎺ㄨ崘鍒楄〃 + // this.keywords = ''; + // this.recommendations = []; }, updateArray(arr, newObj) { @@ -232,8 +237,9 @@ search(value) { if (value) { this.$u.api.cancelReporting - .fuzzyQuery({ - lotBatchNo: value, + .getStockNoPageByWorkstationId({ + ifsBatchNo: value, + workstationId: this.workstationId, }) .then((res) => { console.log('妯$硦鏌ヨ缁撴灉:', res.data); -- Gitblit v1.9.3