This commit is contained in:
aihe 2024-07-17 00:00:12 +08:00
parent 225986b270
commit 70d450f800
4 changed files with 57 additions and 9 deletions

View File

@ -96,6 +96,12 @@ export const getOrderDetail = (data = {})=> {
} }
// 取消订单
export const cancelOrder = (data = {})=> {
return coreRequest(url.cancelOrder, data, {})
}
// 扫描 // 扫描
export const scanRecord = (data = {})=> { export const scanRecord = (data = {})=> {
return coreRequest(url.scanRecord, data, {}) return coreRequest(url.scanRecord, data, {})

View File

@ -38,6 +38,7 @@ export default {
warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表 warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表
getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 -- DONE getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 -- DONE
getOrderDetail: `/oms2c/emisWaybill/getWaybillDetail`, // 订单详情 -- DONE getOrderDetail: `/oms2c/emisWaybill/getWaybillDetail`, // 订单详情 -- DONE
cancelOrder: `/emis/emisWaybill/cancelOrder`, // 取消订单 -- DONE
scanRecord: `/oms2c/emisTmsScanRecord/scan`, // 扫描- 揽收 scanRecord: `/oms2c/emisTmsScanRecord/scan`, // 扫描- 揽收
getRealGetWaybillPrintData: `/oms2c/emisWaybill/realGetPrintList`, // 运单 打印数据 getRealGetWaybillPrintData: `/oms2c/emisWaybill/realGetPrintList`, // 运单 打印数据
queryPrintListSimple: `/oms2c/emisWaybill/queryPrintListSimple`, // 运单 打印数据-列表 queryPrintListSimple: `/oms2c/emisWaybill/queryPrintListSimple`, // 运单 打印数据-列表

View File

@ -10,10 +10,10 @@
<template v-slot:footer> <template v-slot:footer>
<view class="blcok-white-noradius"> <view class="blcok-white-noradius">
<u-row justify="space-around"> <u-row justify="space-around">
<u-button :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;" <u-button @click="goto(`post/post?type=edit&billCode=${queryOption.billCode}&orderSn=${queryOption.orderSn}`)" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
>修改 >修改
</u-button> </u-button>
<u-button :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;" <u-button @click="handleCancel" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
>取消 >取消
</u-button> </u-button>
<u-button @click="goto(`post/post?copyBillCode=${queryOption.billCode}`)" type="primary" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;" <u-button @click="goto(`post/post?copyBillCode=${queryOption.billCode}`)" type="primary" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
@ -23,6 +23,13 @@
</view> </view>
</template> </template>
</tpx-layout> </tpx-layout>
<tpx-com-dialog v-model:show="cancelModal.show" ref="cancelRef" title="确认取消">
<template v-slot:body>
<u-textarea v-model="cancelModal.data.orderRemark" border="surround" height="120" placeholder="请输入"
maxlength="50" count></u-textarea>
</template>
</tpx-com-dialog>
</tpx-page> </tpx-page>
</template> </template>
@ -46,6 +53,12 @@
queryOption: { queryOption: {
billCode: '', // 运单id billCode: '', // 运单id
}, },
cancelModal: {
show: false,
data: {
orderRemark: ''
}
},
} }
}, },
onShareAppMessage() { onShareAppMessage() {
@ -63,7 +76,16 @@
initData(){ initData(){
}, },
async handleCancel(){
let canBl = await this.$refs.cancelRef.getConfirmResult()
if(canBl) {
await apiService.cancelOrder({ orderSn: item.orderSn, ...this.cancelModal.data })
this.showToast('取消成功')
this.goBack()
}
this.cancelModal.data = { }
this.cancelModal.show = false
}
} }
} }
</script> </script>

View File

@ -87,10 +87,10 @@
<u-row> <u-row>
<u-button @click="goto(`warehousing/detail?id=${211}`)" shape="circle" type="primary" :plain="true" <u-button @click="goto(`warehousing/detail?id=${211}`)" 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 @click="goto(`post/post?id=${222}`)" shape="circle" type="primary" <u-button @click="goto(`post/post?copyBillCode=${item.billCode}`)" shape="circle" type="primary"
custom-style="height: 54rpx;margin-left: 12rpx;">再来一单</u-button> custom-style="height: 54rpx;margin-left: 12rpx;">再来一单</u-button>
<!-- <u-button shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 16rpx;">单据</u-button> --> <!-- <u-button shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 16rpx;">单据</u-button> -->
<u-button @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary" <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="goto(`bill/detail?id=${222}`)" shape="circle" type="primary" :plain="true" <u-button @click="goto(`bill/detail?id=${222}`)" shape="circle" type="primary" :plain="true"
custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button> custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button>
@ -104,6 +104,13 @@
</template> </template>
</tpx-layout> </tpx-layout>
<tpx-com-dialog v-model:show="cancelModal.show" ref="cancelRef" title="确认取消">
<template v-slot:body>
<u-textarea v-model="cancelModal.data.orderRemark" border="surround" height="120" placeholder="请输入"
maxlength="50" count></u-textarea>
</template>
</tpx-com-dialog>
</tpx-page> </tpx-page>
</template> </template>
<script> <script>
@ -132,6 +139,12 @@
data: {}, data: {},
show: false show: false
}, },
cancelModal: {
show: false,
data: {
orderRemark: ''
}
},
searchParam: { searchParam: {
billCode: '', billCode: '',
_date: [], _date: [],
@ -180,8 +193,14 @@
case 2: // 复制订单号 case 2: // 复制订单号
this.setClipboardData(item.billCode || item.orderSn) this.setClipboardData(item.billCode || item.orderSn)
break; break;
case 3: // 删除 case 3: // 取消
await this.confirmModal('确认要删除吗?') let canBl = await this.$refs.cancelRef.getConfirmResult()
if(canBl) {
await apiService.cancelOrder({ orderSn: item.orderSn, ...this.cancelModal.data })
this.triggerListReload()
}
this.cancelModal.data = { }
this.cancelModal.show = false
break; break;
case 4: // 取消 case 4: // 取消
await this.confirmModal('确认要取消吗?') await this.confirmModal('确认要取消吗?')
@ -228,7 +247,7 @@
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
.pgb-cont{ .pgb-cont{
padding: 30rpx; padding: 30rpx 30rpx 0 30rpx;
} }
.ord-list-item{ .ord-list-item{