From 6ca56f54ea1683d191964bf9ed39334f2eb03561 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 20 十一月 2024 14:33:05 +0800
Subject: [PATCH] #
---
pages/order/orderPickConfirm.vue | 70 ++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/pages/order/orderPickConfirm.vue b/pages/order/orderPickConfirm.vue
index 87bb66b..d650c57 100644
--- a/pages/order/orderPickConfirm.vue
+++ b/pages/order/orderPickConfirm.vue
@@ -66,14 +66,14 @@
<uni-tag :text="item.batch" type="warning"></uni-tag>
</view>
</view>
- <view class="list-left-item">
+ <view class="list-left-item" v-if="!showChecked">
<view class="desc">鍙敤鏁伴噺锛�</view>
<view class="left-item">
{{item.count}}
</view>
</view>
- <view class="list-left-item">
- <view class="desc">浣跨敤鏁伴噺锛�</view>
+ <view class="list-left-item" v-else>
+ <view class="desc">鏁伴噺锛�</view>
<view class="left-item">{{item.useCount}}</view>
</view>
</view>
@@ -170,7 +170,7 @@
store: '',
locNo: '',
locNoList: [],
- sta: '',
+ sta: '106',
staList: [],
dataList: [],
checkedDataList: [],
@@ -217,12 +217,8 @@
let that = this
uni.request({
url: that.baseUrl + '/mobile/loc/f/list',
- header: {
- 'token': uni.getStorageSync('token')
- },
- data: {
- locNo: that.locNo
- },
+ header: { 'token': uni.getStorageSync('token') },
+ data: { locNo: that.locNo },
method: 'GET',
success(res) {
res = res.data;
@@ -233,6 +229,11 @@
list.push(item.locNo)
})
that.locNoList = list;
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
+ setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
}
}
})
@@ -254,6 +255,11 @@
list.push(item.stnNo)
})
that.staList = list;
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
+ setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
}
}
})
@@ -277,19 +283,27 @@
for (var i = 0; i < that.dataList.length; i++) {
that.$set(that.dataList[i], 'checked', false)
}
+ } else if (res.code == 403) {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
+ setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
+ } else {
+ uni.showToast({ title: res.msg, icon: "error", position: 'center' })
}
}
})
+
},
getChecked() {
let checkedList = this.checkedDataList;
for (var i = 0; i < this.dataList.length; i++) {
var t = !this.dataList[i].checked
if (this.dataList[i].checked) {
- checkedList.push(this.dataList[i])
+ let data = this.dataList[i]
+ data.useCount = data.count
+ checkedList.push(data)
}
}
-
+ this.matnr = ""
this.checkedDataList = checkedList;
this.switchCheckedList()
},
@@ -297,8 +311,6 @@
this.dataList = this.checkedDataList;
this.showChecked = true;
},
-
-
checkboxChange: function(e) {},
messageToggle(type) {
this.msgType1 = type
@@ -314,24 +326,20 @@
uni.vibrateShort();
let that = this;
if (that.checkedDataList.length === 0) {
- this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�"
- this.messageToggle('error')
+ uni.showToast({ title: "璇烽�夋嫨骞舵澘鍟嗗搧", icon: "error", position: 'center' })
return;
}
if (that.locNo == '') {
- this.messageText = "搴撲綅鍙蜂笉鑳戒负绌�"
- this.messageToggle('error')
+ uni.showToast({ title: "搴撲綅鍙蜂笉鑳戒负绌�", icon: "error", position: 'center' })
return;
}
if (that.sta == '') {
- this.messageText = "绔欑偣涓嶈兘涓虹┖"
- this.messageToggle('error')
+ uni.showToast({ title: "绔欑偣涓嶈兘涓虹┖", icon: "error", position: 'center' })
return;
}
for (var i = 0; i < that.checkedDataList.length; i++) {
if (that.checkedDataList[i].useCount == 0 || that.checkedDataList[i].useCount == '') {
- this.messageText = that.checkedDataList[i].matnr + '骞舵澘鏁伴噺涓嶈兘涓�0'
- this.messageToggle('error')
+ uni.showToast({ title: "骞舵澘鏁伴噺涓嶈兘涓�0", icon: "error", position: 'center' })
return;
}
}
@@ -341,7 +349,6 @@
staNo: that.sta,
list: that.checkedDataList
}
- console.log(param);
uni.request({
url: that.baseUrl + '/mobile/pick/in',
data: JSON.stringify(param),
@@ -353,19 +360,12 @@
var res = result.data
if (res.code === 200) {
that.resst();
- that.messageText = "骞舵澘鎴愬姛"
- that.messageToggle('success')
+ uni.showToast({ title: "骞舵澘鎴愬姛", icon: "success", position: 'center' })
} else if (res.code == 403) {
- that.messageText = res.msg
- that.messageToggle('error')
- setTimeout(() => {
- uni.reLaunch({
- url: '../login/login'
- });
- }, 1000);
+ uni.showToast({ title: res.msg, icon: "success", position: 'center' })
+ setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
} else {
- that.messageText = res.msg
- that.messageToggle('error')
+ uni.showToast({ title: res.msg, icon: "success", position: 'center' })
}
}
});
@@ -434,6 +434,8 @@
resst() {
this.dataList = []
this.checkedDataList = []
+ this.locNo = ''
+ this.sta = ''
},
combClose() {
this.$refs.combConfirm.close()
--
Gitblit v1.9.1