From 20a132e1bb7a0d6d1d6a116c1fb499538e35d1a7 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Fri, 25 Feb 2022 18:00:18 +0800 Subject: [PATCH] events order --- src/js/api.js | 2 + src/pages/write_off/events_order/events_order.vue | 21 +++++- src/pages/write_off/success/success.vue | 87 +++++++++++++++++++++-- 3 files changed, 101 insertions(+), 9 deletions(-) diff --git a/src/js/api.js b/src/js/api.js index b4956ca..e721007 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -111,6 +111,8 @@ API['writeOff'] = { // 20220222 新增赛事核销 // matchOrderVerify: `${ORIGIN}/admin/assistant/matchOrder/verify`, // 赛事订单确认核销 /用回之前的核销 + matchOrderGateLs: `${ORIGIN}/admin/assistant/matchOrderGate/list`, // 商家助手-赛事订单核销后获取门 + matchOrderGateOpen: `${ORIGIN}/admin/assistant/matchOrderGate/open`, // 商家助手-赛事订单核销后-开门 } diff --git a/src/pages/write_off/events_order/events_order.vue b/src/pages/write_off/events_order/events_order.vue index 96aa31b..1364e5f 100644 --- a/src/pages/write_off/events_order/events_order.vue +++ b/src/pages/write_off/events_order/events_order.vue @@ -6,7 +6,7 @@ 订单编号: - {{ orderInfo.verify_code || '-' }} + {{ orderInfo.order_no || '-' }} (赛事) @@ -64,17 +64,32 @@ export default { }, methods: { confirmWriteOff: util.debounce(function(){ + let { orderInfo, type } = this; servers.post({ url: API.writeOff.assistantVerify, - data: {}, + data: { + verify_type: type == 'verify_code'? 5 : 6, + brand_id: orderInfo.brand_id, + stadium_id: orderInfo.stadium_id, + verify_code: orderInfo.verify_code, + }, isDefaultGet: false, }) .then(res=>{ if(res.data.code == 0){ - + util.showNone(res.data.message || '操作成功!'); + let _query = { + order_no: orderInfo.order_no || '', + brand_id: orderInfo.brand_id || '', + stadium_name: orderInfo.stadium_name || '', + } + setTimeout(_=>util.routeTo(`/pages/write_off/success/success?query=${util.jsonStr(_query)}`, 'rT'), 1200); + // setTimeout(_=>util.routeTo(`/pages/write_off/success/success`, 'nT'), 1200); }else{ util.showNone(res.data.message || '操作失败!'); } + + }) }, 300, true) } diff --git a/src/pages/write_off/success/success.vue b/src/pages/write_off/success/success.vue index f92e304..ff4e916 100644 --- a/src/pages/write_off/success/success.vue +++ b/src/pages/write_off/success/success.vue @@ -1,19 +1,19 @@