From 2d76551dad54a149c53ae1ab9b255c0ecd816a16 Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Sat, 9 May 2026 10:14:13 +0800 Subject: [PATCH] 1 --- src/api/app.js | 5 ++ src/views/app/business/deposit/deposit.vue | 69 +++++++++++++++---- .../problemFeedback/problemFeedback.vue | 63 +++++++++++++---- 3 files changed, 110 insertions(+), 27 deletions(-) diff --git a/src/api/app.js b/src/api/app.js index 62f3613..d93b842 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -329,6 +329,11 @@ export const addJiangLi = (params) => { return postBodyRequest('/mall/coupon/addWorkerReward', params) } +//免单和排名的列表 +export const JiangLiList = (params) => { + return postBodyRequest('/mall/coupon/selectRewardByRegionId', params) +} + // 关闭奖励 export const closeJiangLi = (params) => { return postBodyRequest('/mall/coupon/closeWorkerReward', params) diff --git a/src/views/app/business/deposit/deposit.vue b/src/views/app/business/deposit/deposit.vue index b69772b..291e68c 100644 --- a/src/views/app/business/deposit/deposit.vue +++ b/src/views/app/business/deposit/deposit.vue @@ -30,9 +30,9 @@
- + @@ -42,6 +42,7 @@ import { addJiangLi, selectJiangLi, + JiangLiList, closeJiangLi } from "@/api/app"; export default { @@ -53,13 +54,10 @@ regionId:JSON.parse(this.getStore("user")).departmentId }, searchForm: { - shopId:'', - headUserId:'', - status:'', - productName:'', - isFace:'', - pageNumber: 1, + regionId:JSON.parse(this.getStore("user")).departmentId, + pageNum: 1, pageSize: 10, + dealingsWay:'配送排名奖励' }, columns: [{ type: "index", @@ -67,26 +65,58 @@ align: "center", }, { - title: "时间", - key: "creatTime", + title: "类型", + key: "linkType", + align: "center", + render: (h, params) => { + let re = "" + if (params.row.linkType == 0) { + re = "用户"; + } else if (params.row.type == 1) { + re = "配送员"; + } + return h( + "div", + re + ); + } + }, + { + title: "交易方式/附言", + key: "dealingsWay", align: "center", }, { - title: "名次", - key: "orderNumber", + title: "金额", + key: "amount", align: "center", }, { - title: "奖励金额", - key: "freeAmount", + title: "交易时间", + key: "dealingsTime", align: "center", } ], + data:[], + total: 0, }; }, methods: { init() { this.getDataList(); + this.getJiangLiList(); + }, + getJiangLiList(){ + JiangLiList(this.searchForm).then((res) => { + if (res.success) { + this.data = res.result + this.total = res.result.total; + if (this.data.length == 0 && this.searchForm.pageNum > 1) { + this.searchForm.pageNum -= 1; + this.getJiangLiList(); + } + } + }); }, getDataList() { selectJiangLi({ @@ -111,9 +141,18 @@ if (res.success) { this.$Message.success("操作成功"); this.getDataList() + this.getJiangLiList(); } }); }, + changePage(v) { + this.searchForm.pageNum = v; + this.getJiangLiList(); + }, + changePageSize(v) { + this.searchForm.pageSize = v; + this.getJiangLiList(); + }, add(){ let rules = { orderNum:"", diff --git a/src/views/app/business/problemFeedback/problemFeedback.vue b/src/views/app/business/problemFeedback/problemFeedback.vue index 955d97d..47fd098 100644 --- a/src/views/app/business/problemFeedback/problemFeedback.vue +++ b/src/views/app/business/problemFeedback/problemFeedback.vue @@ -36,6 +36,7 @@ import { getMiandan, addMiandan, + JiangLiList, closeMiandan } from "@/api/app"; export default { @@ -49,13 +50,10 @@ }, isOpen:false, searchForm: { - shopId:'', - headUserId:'', - status:'', - productName:'', - isFace:'', - pageNumber: 1, + regionId:JSON.parse(this.getStore("user")).departmentId, + pageNum: 1, pageSize: 10, + dealingsWay:'免单奖励' }, columns: [{ type: "index", @@ -63,26 +61,58 @@ align: "center", }, { - title: "时间", - key: "creatTime", + title: "类型", + key: "linkType", + align: "center", + render: (h, params) => { + let re = "" + if (params.row.linkType == 0) { + re = "用户"; + } else if (params.row.type == 1) { + re = "配送员"; + } + return h( + "div", + re + ); + } + }, + { + title: "交易方式/附言", + key: "dealingsWay", align: "center", }, { - title: "免单人数", - key: "orderNumber", + title: "金额", + key: "amount", align: "center", }, { - title: "免单金额", - key: "freeAmount", + title: "交易时间", + key: "dealingsTime", align: "center", } ], + data:[], + total: 0, }; }, methods: { init() { this.getDataList(); + this.getJiangLiList(); + }, + getJiangLiList(){ + JiangLiList(this.searchForm).then((res) => { + if (res.success) { + this.data = res.result + this.total = res.result.total; + if (this.data.length == 0 && this.searchForm.pageNum > 1) { + this.searchForm.pageNum -= 1; + this.getJiangLiList(); + } + } + }); }, getDataList() { getMiandan({ @@ -101,9 +131,18 @@ addMiandan(this.form).then((res) => { if (res.success) { this.$Message.success("操作成功"); + this.getJiangLiList(); } }); }, + changePage(v) { + this.searchForm.pageNum = v; + this.getJiangLiList(); + }, + changePageSize(v) { + this.searchForm.pageSize = v; + this.getJiangLiList(); + }, close() { this.$Modal.confirm({ title: "确认关闭",