From 4ff8f5c9e1084b3584f2fe17da56f96fa54540d8 Mon Sep 17 00:00:00 2001 From: liuye Date: Wed, 4 Jan 2023 11:12:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppIntegralRule/AppIntegralRule.vue | 75 +++++++++++++++++-- .../AppPointsDetails/components/Detail.vue | 10 +-- .../AppPointsDetails/components/List.vue | 8 +- 3 files changed, 78 insertions(+), 15 deletions(-) diff --git a/project/qianxinan/AppIntegralRule/AppIntegralRule.vue b/project/qianxinan/AppIntegralRule/AppIntegralRule.vue index 59e3f521..3dc4ab11 100644 --- a/project/qianxinan/AppIntegralRule/AppIntegralRule.vue +++ b/project/qianxinan/AppIntegralRule/AppIntegralRule.vue @@ -22,17 +22,43 @@ {{ row.integral > 0 ? "+" : "" }}{{ row.integral }} - + + + + + + {{item.name}} + , + + + + + + + + + + + + @@ -78,6 +104,11 @@ export default { {slot: "options", label: "操作", align: "center", width: 100}, ], tableData: [], + dialog: false, + setInfo: {}, + isSetEdit: false, + chooseUserList: [], + personList: [] }; }, created() { @@ -87,14 +118,12 @@ export default { }, methods: { getList() { - this.instance - .post(`/app/appscorerule/list`, null, { + this.instance.post(`/app/appscorerule/list`, null, { params: { ...this.search, ...this.page, }, - }) - .then((res) => { + }).then((res) => { if (res?.data) { this.tableData = res.data.records; this.page.total = res.data.total; @@ -112,6 +141,42 @@ export default { }); }); }, + set(row) { + this.chooseUserList = [] + this.instance.post(`/app/appscorerule/queryDetailById?id=${row.id}`).then((res) => { + if (res?.data) { + if(res.data.massSendingConfigs && res.data.massSendingConfigs.length) { + this.chooseUserList = res.data.massSendingConfigs + } + } + }); + this.dialog = true + this.setInfo = {...row} + }, + selectPerson(val) { + console.log(val) + if (val) { + this.personList = val + } else { + this.personList = this.chooseUserList + } + }, + setConfirm() { + if(!this.personList.length) { + return this.$message.error("请选择成员!") + } + var params = { + id: this.setInfo.id, + massSendingConfigs: this.personList, + } + this.instance.post(`/app/appscorerule/editMassSendingConfig`, params).then((res) => { + if (res.code == 0) { + this.dialog = false + this.$message.success(`配置成功!`); + this.getList(); + } + }); + } }, }; diff --git a/project/qianxinan/AppPointsDetails/components/Detail.vue b/project/qianxinan/AppPointsDetails/components/Detail.vue index 98d9ef48..d150c550 100644 --- a/project/qianxinan/AppPointsDetails/components/Detail.vue +++ b/project/qianxinan/AppPointsDetails/components/Detail.vue @@ -111,9 +111,9 @@ export default { methods: { // 详情 getDetail() { - this.instance.post(`/app/appscoredetail/queryDetailById`, null, { + this.instance.post(`/app/appscoredetail/userInfo`, null, { params: { - id: this.params.id + sysUserId: this.params.id } }).then(res => { if (res?.data) { @@ -128,10 +128,9 @@ export default { getEventSummary() { this.instance.post(`/app/appscoredetail/detailTypeStatistics`, null, { params: { - id: this.params.id, startTime: this.startTime, endTime: this.endTime, - sysUserId: this.data.sysUserId + sysUserId: this.data.id } }).then(res => { if (res?.data) { @@ -148,8 +147,7 @@ export default { params: { ...this.search, //积分类型 total: this.total, - id: this.params.id, - sysUserId: this.data.sysUserId + sysUserId: this.data.id } }).then(res => { if (res?.data) { diff --git a/project/qianxinan/AppPointsDetails/components/List.vue b/project/qianxinan/AppPointsDetails/components/List.vue index 5c08ee70..4e8259ce 100644 --- a/project/qianxinan/AppPointsDetails/components/List.vue +++ b/project/qianxinan/AppPointsDetails/components/List.vue @@ -125,9 +125,9 @@ export default { return [ { prop: "name", label: '姓名', align: "left"}, { prop: "departName", label: '所属部门' }, - { prop: "nowScore", label: '积分余额', align: "center" }, + { prop: "score", label: '积分余额', align: "center" }, // { prop: "totalIntegral", label: '累计积分', align: "center", sortable: "custom" }, - { prop: "usedIntegral", label: '已用积分', align: "center" }, + { prop: "usedScore", label: '已用积分', align: "center" }, { slot: "options" }, ] }, @@ -143,7 +143,7 @@ export default { }, methods: { getTableData() { - this.instance.post(`/app/appscoredetail/list`,null,{ + this.instance.post(`/app/appscoredetail/userList`,null,{ params: { ...this.search, current: this.current, @@ -172,7 +172,7 @@ export default { this.dialog = true } else if(type ==1) { this.chooseUserList = [{ - sysUserId: row.sysUserId, + sysUserId: row.id, name: row.name }] this.form.ids = this.chooseUserList.map(e => e.sysUserId)