问题修复

This commit is contained in:
donqi 2022-07-19 15:11:32 +08:00
parent 2e57cbd63e
commit 96616c94ca
2 changed files with 20 additions and 9 deletions

View File

@ -142,15 +142,21 @@
} }
}); });
if (goodsToAssign.length > 0) { if (goodsToAssign.length > 0) {
let params = { if (this.dispatchTotalPrice) {
goodsList: goodsToAssign, let params = {
workerId: member.workerId, goodsList: goodsToAssign,
totalPay: this.dispatchTotalPrice, workerId: member.workerId,
orderMasterId: this.curOrder.orderMasterId, totalPay: this.dispatchTotalPrice,
isAll: isAll orderMasterId: this.curOrder.orderMasterId,
isAll: isAll
}
this.$emit('assignWork', params);
} else {
uni.showToast({
title: '请填写派单价格',
icon: 'none'
})
} }
console.log(params)
this.$emit('assignWork', params);
} else { } else {
uni.showToast({ uni.showToast({
title: '请至少选择一种规格', title: '请至少选择一种规格',

View File

@ -752,13 +752,18 @@
}, },
async assignWork(params) { async assignWork(params) {
let res = await this.$request.assign(params); let res = await this.$request.assign(params);
if (res.code === 0) { if (res && res.code === 0) {
this.getCanAssignList(this.curOrder); this.getCanAssignList(this.curOrder);
this.reloadMasterOrderPage(); this.reloadMasterOrderPage();
uni.showToast({ uni.showToast({
title: '派单成功', title: '派单成功',
icon: 'success' icon: 'success'
}) })
} else {
uni.showToast({
title: '派单失败,请确认派单价格不高于本订单价格',
icon: 'none'
})
} }
}, },
async assignWork2MySelf(orderInfo) { async assignWork2MySelf(orderInfo) {