This commit is contained in:
aihe 2024-06-20 00:29:47 +08:00
parent f9056632ec
commit b4f77c74da
2 changed files with 26 additions and 18 deletions

View File

@ -408,6 +408,7 @@
}
if(this.isEdit) {
this.pageLoading = true
this.submitParam.billCode = this.queryOption.billCode
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
let data = res.data || {}
data.goodsPics = (data.goodsPics && data.goodsPics.split(",")) || []

View File

@ -63,13 +63,21 @@
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;">
<u-row>
<u-button @click="handleDealItem(item, { type: 6 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
<u-button @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary"
<u-row v-if="!item.billCode">
<u-button @click="handleDealItem(item, { type: 1 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">接单</u-button>
<u-button @click="handleDealItem(item, { type: 2 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
<u-button @click="handleDealItem(item, { type: 3 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
<u-button @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary" :plain="true"
</u-row>
<u-row v-else="">
<u-button v-if="item.waybillStatus == 0" @click="handleDealItem(item, { type: 2 })" shape="circle" type="primary" :plain="true"
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
<u-button v-if="item.waybillStatus == 0" @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
<u-button v-if="item.waybillStatus == 40" @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">签收扫描</u-button>
</u-row>
</view>
@ -175,24 +183,23 @@
async handleDealItem(item, deal = { type: '1' }) {
let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`
switch (deal.type){
case 1: // 跳转
this.goto(`post/detail${itemQuery}`)
case 1: // 接单
// TODO
await this.confirmModal('确认要接单吗?')
break;
case 2: // 复制订单号
this.setClipboardData(item.billCode || item.orderSn)
break;
case 3: // 删除
await this.confirmModal('确认要删除吗?')
break;
case 4: // 取消
await this.confirmModal('确认要取消吗?')
break;
case 5: // 立即开单
case 2: // 立即开单
this.goto(`post/openorder${itemQuery}`)
break;
case 6: // 揽收
case 3: // 取消
// TODO
await this.confirmModal('确认要取消吗?')
break;
case 4: // 揽收
this.goto(`deliveryDeal/pickUp${itemQuery}`)
break;
case 5: // 签收扫描
this.goto(`deliveryDeal/signedScanning${itemQuery}`)
break;
default:
break;
}