子卷配送

This commit is contained in:
2022-11-11 18:05:13 +08:00
parent 51db97e8c2
commit f95a05141f
5 changed files with 26 additions and 25 deletions

View File

@@ -156,14 +156,13 @@
}
try {
let res = await casingConfirm(this.checkArr, this.val2)
this.disabled = false
this.checkArr = []
this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
this.checkArr = []
this._queryMaterialInfo()
} catch (e) {
this.disabled = false
}

View File

@@ -86,7 +86,7 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !checkArr.length || checkArr.length > 1}" :disabled="disabled1" @tap="_needVehicle">呼叫载具</button>
<button class="submit-button" :class="{'btn-disabled': checkArr.length === 0 || checkArr.length > 1}" :disabled="disabled1" @tap="_needVehicle">呼叫载具</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled4" @tap="_shippingCheck">配送校验</button>
<button class="submit-button" :class="{'btn-disabled': !checkArr.length}" :disabled="disabled2" @tap="_shippingConfirm">配送确认</button>
<button class="submit-button" :class="{'btn-disabled': !val3}" :disabled="disabled3" @tap="_returnVehicle">载具送回</button>
@@ -108,6 +108,7 @@
return {
val1: '',
val2: '',
val3: '',
options: [],
index: '',
qty: '',
@@ -151,19 +152,19 @@
/** 呼叫载具 */
async _needVehicle () {
this.disabled1 = true
if (!this.checkArr.length || this.checkArr.length > 1) {
if (this.checkArr.length === 0 || this.checkArr.length > 1) {
this.disabled1 = false
return
}
try {
let res = await needVehicle(this.checkArr[0])
this.disabled1 = false
this.checkArr = []
this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled1 = false
this.checkArr = []
this._queryMaterialInfo()
} catch (e) {
this.disabled1 = false
}
@@ -177,13 +178,13 @@
}
try {
let res = await shippingConfirm(this.checkArr, this.val3)
this.disabled2 = false
this.checkArr = []
this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled2 = false
this.checkArr = []
this._queryMaterialInfo()
} catch (e) {
this.disabled2 = false
}

View File

@@ -138,14 +138,14 @@
}
try {
let res = await inConfirm(this.index1, this.pkObj)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
this.pkId = ''
this.pkObj = {}
this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}

View File

@@ -200,14 +200,14 @@
}
try {
let res = await outConfirm(this.index1, this.checkArr, this.isV)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled1 = false
this.checkArr = []
this.isV = '0'
this._queryMaterialInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
@@ -245,14 +245,14 @@
}
try {
let res = await conveyConfirm(this.index4)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled2 = false
this.index3 = ''
this.index4 = ''
this.active = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
this.index3 = ''

View File

@@ -100,6 +100,7 @@ export const needVehicle = (code) => request({
cut_jo: code
}
})
// 1.3配送确认
export const shippingConfirm = (rows, code) => request({
url:'api/pda/shipping/confirm',
@@ -109,7 +110,7 @@ export const shippingConfirm = (rows, code) => request({
}
})
// 1.4载具送回
export const returnVehicle = (rows, code) => request({
export const returnVehicle = (code) => request({
url:'api/pda/shipping/returnVehicle',
data: {
point_code: code