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) { if(this.isEdit) {
this.pageLoading = true this.pageLoading = true
this.submitParam.billCode = this.queryOption.billCode
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true}) let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
let data = res.data || {} let data = res.data || {}
data.goodsPics = (data.goodsPics && data.goodsPics.split(",")) || [] data.goodsPics = (data.goodsPics && data.goodsPics.split(",")) || []

View File

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