From 71f7476809c4a41074b9e5164751faeb1c0b47e2 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 25 五月 2024 15:05:25 +0800
Subject: [PATCH] #
---
pages/phyz/stationManage/pickAgain.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 47 insertions(+), 5 deletions(-)
diff --git a/pages/phyz/stationManage/pickAgain.vue b/pages/phyz/stationManage/pickAgain.vue
index 0b0b72c..3c22660 100644
--- a/pages/phyz/stationManage/pickAgain.vue
+++ b/pages/phyz/stationManage/pickAgain.vue
@@ -8,6 +8,7 @@
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
<view>搴撳瓨鏁伴噺锛歿{orderDetl.anfme}}</view>
<view>璁㈠崟鍙嚭鏁伴噺锛歿{orderDetl.stock}}</view>
+ <view>宸叉嫞鏁伴噺锛歿{orderDetl.pickedAnfme}}</view>
<view>鎷f枡鏁伴噺锛歿{orderDetl.count}}</view>
</view>
<view class="list-right" @click="addItem(index)">
@@ -51,7 +52,8 @@
count: 0,
maxCount: 0,
wrkNo: '',
- locNo: ''
+ locNo: '',
+ pickedAnfme: 0
}
},
onShow() {
@@ -85,10 +87,14 @@
res = res.data
console.log(res);
if (res.code === 200) {
- let enbleList = []
+ _this.chosed(_this.pickList,res.data.records)
+ return
+ let enbleList = [], isfl;
for (let k of res.data.records) {
+ isfl = false;
for (let j of _this.pickList) {
if (j.matnr == k.matnr && j.threeCode == k.threeCode) {
+ isfl = true;
break
} else {
if (k.stock == -1) {
@@ -99,8 +105,10 @@
}
k['count'] = 0
- enbleList.push(k)
}
+ }
+ if (!isfl) {
+ enbleList.push(k)
}
}
@@ -116,8 +124,31 @@
})
},
// 宸查�夋嫞鏂欏垪琛�
- orderCar() {
-
+ chosed(wrkDetls,locDetls) {
+ let isfl = false, enbleList = []
+ for (let locDetl of locDetls) {
+ locDetl['color'] = 'order-sts-start'
+ locDetl['pickedAnfme'] = 0
+ locDetl['count'] = 0
+ for (let wrkDetl of wrkDetls) {
+ if (wrkDetl.threeCode == locDetl.threeCode && wrkDetl.matnr == locDetl.matnr) {
+ locDetl['pickedAnfme'] = wrkDetl.anfme
+ if (locDetl.stock == -1) {
+ locDetl.stock = 0
+ }
+ if (wrkDetl.anfme < locDetl.anfme) {
+ locDetl['color'] = 'order-sts-working'
+ locDetl['pickedAnfme'] = wrkDetl.anfme
+ locDetl['count'] = 0
+ } else {
+ locDetl['color'] = 'order-sts-end'
+ }
+ break
+ }
+ }
+
+ }
+ this.dataList = locDetls
},
// 娣诲姞鍏ュ簱鍟嗗搧鑷� 寰呯粍鎵樺垪琛�
addItem(index) {
@@ -153,6 +184,17 @@
success(res) {
res = res.data
console.log(res);
+ if (res.code === 200) {
+ _this.getOpenerEventChannel().emit('acceptDataFromOpenedPage', {data: 1});
+ setTimeout(()=>{
+ uni.navigateBack()
+ },700)
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ setTimeout(() => { uni.reLaunch({ url: '../../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'top' })
+ }
}
})
}
--
Gitblit v1.9.1