From 7d111f90e48c4e8c99746721e932dd534144184f Mon Sep 17 00:00:00 2001 From: liuye Date: Tue, 1 Nov 2022 11:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=89=E7=BA=A7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tianfuxing/AppLevelList/AppLevelList.vue | 260 ++++++++++++++++++ .../tianfuxing/AppUserList/AppUserList.vue | 64 ++++- 2 files changed, 321 insertions(+), 3 deletions(-) create mode 100644 project/tianfuxing/AppLevelList/AppLevelList.vue diff --git a/project/tianfuxing/AppLevelList/AppLevelList.vue b/project/tianfuxing/AppLevelList/AppLevelList.vue new file mode 100644 index 00000000..121103ff --- /dev/null +++ b/project/tianfuxing/AppLevelList/AppLevelList.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/project/tianfuxing/AppUserList/AppUserList.vue b/project/tianfuxing/AppUserList/AppUserList.vue index fa67312f..2e7cdc5f 100644 --- a/project/tianfuxing/AppUserList/AppUserList.vue +++ b/project/tianfuxing/AppUserList/AppUserList.vue @@ -15,10 +15,26 @@ + + + + + + + + + + @@ -43,10 +59,15 @@ export default { total: 0, }, tableData: [], + dialog: false, + form: { + integralCalcType: "", + integral: '', + }, } }, created () { - this.$dict.load('electionStatus', 'electionMethod').then(()=> { + this.$dict.load('integralCalcType', 'electionMethod').then(()=> { this.getList() }) }, @@ -59,10 +80,18 @@ export default { {prop: "chooseNumber", label: "积分数量", align: "center", sortable: "custom"}, {slot: "options", }, ] - } + }, + rules() { + return { + integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}], + integral: [{required: true, message: '请输入积分', trigger: 'blur' }, + {pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}], + } + }, }, methods: { sortChange(col) { + console.log(col.order) if(col.prop === 'chooseNumber') { // 剩余积分 // this.search.sortFiled = 0 // if(col.order === 'ascending') { @@ -74,6 +103,35 @@ export default { // } } }, + changeIntegral(row) { + this.dialog = true + }, + onConfirm() { + this.$refs.form.validate((valid)=> { + if(valid) { + this.flag = true + this.instance.post(`/app/appintegraluser/changeIntegral`,{ + ids: this.form.ids, + eventDesc: this.form.eventDesc, + enclosure: this.form.enclosure, // 附件 + integralCalcType: this.form.integralCalcType, + integral: this.form.integral, + }).then(res => { + if(res?.code == 0) { + this.$message.success('调整积分成功') + setTimeout(() =>{ + this.dialog = false + this.getTableData() + this.flag = false + }, 600) + } else { + this.flag = false + } + }) + } + }) + + }, getList() { this.instance.post(`/app/appgeneralelectioninfo/list`,null,{ params: {