From 70d450f800efcf36191fa29b0e506341aee65262 Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Wed, 17 Jul 2024 00:00:12 +0800 Subject: [PATCH] uu --- common/api/order.js | 8 +++++++- common/api/url.js | 1 + pages/post/detail.vue | 28 +++++++++++++++++++++++++--- pages/tabBar/search/search.vue | 29 ++++++++++++++++++++++++----- 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/common/api/order.js b/common/api/order.js index c8d03b6..6ce2f5e 100644 --- a/common/api/order.js +++ b/common/api/order.js @@ -95,7 +95,13 @@ export const getOrderDetail = (data = {})=> { return coreRequest(url.getOrderDetail, data, {}, "GET") } - + +// 取消订单 +export const cancelOrder = (data = {})=> { + return coreRequest(url.cancelOrder, data, {}) +} + + // 扫描 export const scanRecord = (data = {})=> { return coreRequest(url.scanRecord, data, {}) diff --git a/common/api/url.js b/common/api/url.js index cc6d2a9..7513016 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -38,6 +38,7 @@ export default { warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表 getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 -- DONE getOrderDetail: `/oms2c/emisWaybill/getWaybillDetail`, // 订单详情 -- DONE + cancelOrder: `/emis/emisWaybill/cancelOrder`, // 取消订单 -- DONE scanRecord: `/oms2c/emisTmsScanRecord/scan`, // 扫描- 揽收 getRealGetWaybillPrintData: `/oms2c/emisWaybill/realGetPrintList`, // 运单 打印数据 queryPrintListSimple: `/oms2c/emisWaybill/queryPrintListSimple`, // 运单 打印数据-列表 diff --git a/pages/post/detail.vue b/pages/post/detail.vue index 8df9cea..a2b4105 100644 --- a/pages/post/detail.vue +++ b/pages/post/detail.vue @@ -10,10 +10,10 @@ + + + + @@ -46,6 +53,12 @@ queryOption: { billCode: '', // 运单id }, + cancelModal: { + show: false, + data: { + orderRemark: '' + } + }, } }, onShareAppMessage() { @@ -63,7 +76,16 @@ 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 + } } } diff --git a/pages/tabBar/search/search.vue b/pages/tabBar/search/search.vue index 981699a..c72ce78 100644 --- a/pages/tabBar/search/search.vue +++ b/pages/tabBar/search/search.vue @@ -87,10 +87,10 @@ 进仓确认 - 再来一单 - 取消 去付款 @@ -104,6 +104,13 @@ + + + +