From 0ebc3f4e21413203608b8e63f57ea5a9cc15f413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 30 Jul 2024 14:08:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mch/bill.js | 31 +- src/api/mch/device.js | 24 ++ src/api/mch/refund.js | 0 src/api/mch/store.js | 8 + src/components/Business/Store/StoreDialog.vue | 43 +- src/components/Business/Store/StoreInput.vue | 16 +- src/router/mch.js | 16 +- src/store/getters.js | 1 + src/views/mch/bill/detail.vue | 126 ++++++ src/views/mch/bill/index.vue | 373 ++++++++++++++++++ .../mch/device/components/bindRecord.vue | 71 ---- .../device/components/meterRecordReport.vue | 153 ------- .../mch/device/components/readingRecord.vue | 75 ---- .../mch/device/components/rechargeRecord.vue | 91 ----- .../mch/device/components/resetRecord.vue | 74 ---- src/views/mch/device/components/suitList.vue | 71 ---- .../mch/device/components/tenantList.vue | 75 ---- src/views/mch/device/detail.vue | 95 +++-- src/views/mch/device/index.vue | 21 +- 19 files changed, 678 insertions(+), 686 deletions(-) create mode 100644 src/api/mch/refund.js create mode 100644 src/views/mch/bill/detail.vue create mode 100644 src/views/mch/bill/index.vue delete mode 100644 src/views/mch/device/components/bindRecord.vue delete mode 100644 src/views/mch/device/components/meterRecordReport.vue delete mode 100644 src/views/mch/device/components/readingRecord.vue delete mode 100644 src/views/mch/device/components/rechargeRecord.vue delete mode 100644 src/views/mch/device/components/resetRecord.vue delete mode 100644 src/views/mch/device/components/suitList.vue delete mode 100644 src/views/mch/device/components/tenantList.vue diff --git a/src/api/mch/bill.js b/src/api/mch/bill.js index 52fc4f8..7a1b8a6 100644 --- a/src/api/mch/bill.js +++ b/src/api/mch/bill.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 商户查询充值记录统计 +// 商户查询订单统计 export function mchCountBill(query) { return request({ url: '/mch/bill/count', @@ -8,3 +8,32 @@ export function mchCountBill(query) { params: query }) } + +// 查询本人收款订单列表 +export function incomeBillList(query) { + return request({ + url: '/app/bill/incomeList', + method: 'get', + params: query + }) +} + +// 商户订单退款 +export function mchRefundBill(billId, refundAmount) { + return request({ + url: '/app/bill/refund', + method: 'put', + data: { + billId, + refundAmount + } + }) +} + +// 商户获取订单详情 +export function mchGetBill(billId) { + return request({ + url: `/mch/bill/${billId}`, + method: 'get', + }) +} diff --git a/src/api/mch/device.js b/src/api/mch/device.js index a467773..0fdba26 100644 --- a/src/api/mch/device.js +++ b/src/api/mch/device.js @@ -41,3 +41,27 @@ export function mchRefreshIot(deviceId) { method: 'get' }) } + +// 商户增加时长 +export function mchAddTime(deviceId, amount) { + return request({ + url: `/app/device/addTime/${deviceId}?amount=${amount}`, + method: 'put' + }) +} + +// 商户时长归零 +export function mchResetDevice(deviceId) { + return request({ + url: `/app/device/${deviceId}/reset`, + method: 'put' + }) +} + +// 商户设备开关 +export function mchSwitchDevice(deviceId, status) { + return request({ + url: `/app/device/${deviceId}/changePower?status=${status}`, + method: 'put' + }) +} diff --git a/src/api/mch/refund.js b/src/api/mch/refund.js new file mode 100644 index 0000000..e69de29 diff --git a/src/api/mch/store.js b/src/api/mch/store.js index d4fdbc0..3209228 100644 --- a/src/api/mch/store.js +++ b/src/api/mch/store.js @@ -44,3 +44,11 @@ export function mchDelStore(data) { data }) } + +// 商户查询店铺列表 +export function mchListStoreByIds(ids) { + return request({ + url: `/mch/store/listByIds/${ids}`, + method: 'get', + }) +} diff --git a/src/components/Business/Store/StoreDialog.vue b/src/components/Business/Store/StoreDialog.vue index 7a431af..2e89305 100644 --- a/src/components/Business/Store/StoreDialog.vue +++ b/src/components/Business/Store/StoreDialog.vue @@ -25,13 +25,12 @@ > - - + - +