tianyi 3 months ago
parent
commit
2d76551dad
  1. 5
      src/api/app.js
  2. 69
      src/views/app/business/deposit/deposit.vue
  3. 63
      src/views/app/business/problemFeedback/problemFeedback.vue

5
src/api/app.js

@ -329,6 +329,11 @@ export const addJiangLi = (params) => {
return postBodyRequest('/mall/coupon/addWorkerReward', params) return postBodyRequest('/mall/coupon/addWorkerReward', params)
} }
//免单和排名的列表
export const JiangLiList = (params) => {
return postBodyRequest('/mall/coupon/selectRewardByRegionId', params)
}
// 关闭奖励 // 关闭奖励
export const closeJiangLi = (params) => { export const closeJiangLi = (params) => {
return postBodyRequest('/mall/coupon/closeWorkerReward', params) return postBodyRequest('/mall/coupon/closeWorkerReward', params)

69
src/views/app/business/deposit/deposit.vue

@ -30,9 +30,9 @@
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" ref="table" <Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" ref="table"
sortable="custom" ></Table> sortable="custom" ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
</div> </div>
@ -42,6 +42,7 @@
import { import {
addJiangLi, addJiangLi,
selectJiangLi, selectJiangLi,
JiangLiList,
closeJiangLi closeJiangLi
} from "@/api/app"; } from "@/api/app";
export default { export default {
@ -53,13 +54,10 @@
regionId:JSON.parse(this.getStore("user")).departmentId regionId:JSON.parse(this.getStore("user")).departmentId
}, },
searchForm: { searchForm: {
shopId:'', regionId:JSON.parse(this.getStore("user")).departmentId,
headUserId:'', pageNum: 1,
status:'',
productName:'',
isFace:'',
pageNumber: 1,
pageSize: 10, pageSize: 10,
dealingsWay:'配送排名奖励'
}, },
columns: [{ columns: [{
type: "index", type: "index",
@ -67,26 +65,58 @@
align: "center", align: "center",
}, },
{ {
title: "时间", title: "类型",
key: "creatTime", 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", align: "center",
}, },
{ {
title: "名次", title: "金额",
key: "orderNumber", key: "amount",
align: "center", align: "center",
}, },
{ {
title: "奖励金额", title: "交易时间",
key: "freeAmount", key: "dealingsTime",
align: "center", align: "center",
} }
], ],
data:[],
total: 0,
}; };
}, },
methods: { methods: {
init() { init() {
this.getDataList(); 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() { getDataList() {
selectJiangLi({ selectJiangLi({
@ -111,9 +141,18 @@
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getDataList() this.getDataList()
this.getJiangLiList();
} }
}); });
}, },
changePage(v) {
this.searchForm.pageNum = v;
this.getJiangLiList();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getJiangLiList();
},
add(){ add(){
let rules = { let rules = {
orderNum:"", orderNum:"",

63
src/views/app/business/problemFeedback/problemFeedback.vue

@ -36,6 +36,7 @@
import { import {
getMiandan, getMiandan,
addMiandan, addMiandan,
JiangLiList,
closeMiandan closeMiandan
} from "@/api/app"; } from "@/api/app";
export default { export default {
@ -49,13 +50,10 @@
}, },
isOpen:false, isOpen:false,
searchForm: { searchForm: {
shopId:'', regionId:JSON.parse(this.getStore("user")).departmentId,
headUserId:'', pageNum: 1,
status:'',
productName:'',
isFace:'',
pageNumber: 1,
pageSize: 10, pageSize: 10,
dealingsWay:'免单奖励'
}, },
columns: [{ columns: [{
type: "index", type: "index",
@ -63,26 +61,58 @@
align: "center", align: "center",
}, },
{ {
title: "时间", title: "类型",
key: "creatTime", 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", align: "center",
}, },
{ {
title: "免单人数", title: "金额",
key: "orderNumber", key: "amount",
align: "center", align: "center",
}, },
{ {
title: "免单金额", title: "交易时间",
key: "freeAmount", key: "dealingsTime",
align: "center", align: "center",
} }
], ],
data:[],
total: 0,
}; };
}, },
methods: { methods: {
init() { init() {
this.getDataList(); 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() { getDataList() {
getMiandan({ getMiandan({
@ -101,9 +131,18 @@
addMiandan(this.form).then((res) => { addMiandan(this.form).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.getJiangLiList();
} }
}); });
}, },
changePage(v) {
this.searchForm.pageNum = v;
this.getJiangLiList();
},
changePageSize(v) {
this.searchForm.pageSize = v;
this.getJiangLiList();
},
close() { close() {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认关闭", title: "确认关闭",

Loading…
Cancel
Save