30810
This commit is contained in:
		| @@ -132,7 +132,7 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 事件汇总 暂定 | ||||
|     // 事件汇总 | ||||
|     getEventSummary() { | ||||
|       this.instance.post(`/app/appintegraluser/eventSummary`,null,{ | ||||
|         params: { | ||||
|   | ||||
| @@ -52,7 +52,7 @@ | ||||
|         @onConfirm="onConfirm" | ||||
|         @closed="form={},chooseUserList=[]"> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="选择人员" prop="residentId" required> | ||||
|         <el-form-item label="选择人员" prop="ids" required> | ||||
|           <ai-person-select :instance="instance" :customClicker="true" :chooseUserList="chooseUserList" | ||||
|                             :url="'/app/appgirdmemberinfo/list?size=10'" | ||||
|                             :isMultiple="true" dialogTitle="选择" @selectPerson="selectPerson"> | ||||
| @@ -69,10 +69,10 @@ | ||||
|         <el-form-item label="上传凭证"> | ||||
|           <ai-uploader :instance="instance" fileType="file" v-model="form.file" :limit="1"></ai-uploader> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="类型" prop="integralCalcType"> | ||||
|         <el-form-item label="类型" prop="integralCalcType" required> | ||||
|           <ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="积分" prop="integral"> | ||||
|         <el-form-item label="积分" prop="integral" required> | ||||
|           <el-input v-model.trim="form.integral" placeholder="请输入正数" size="small"></el-input> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
| @@ -98,6 +98,8 @@ export default { | ||||
|         girdId: '', | ||||
|         current: 1,  | ||||
|         size: 10, | ||||
|         sortFiled: '', | ||||
|         sortRule: '', | ||||
|       }, | ||||
|       tableData: [], | ||||
|       page: {size: 10, total: 0}, | ||||
| @@ -120,14 +122,6 @@ export default { | ||||
|         checkStrictly: true, | ||||
|       }, | ||||
|       chooseUserList: [], | ||||
|       sortFiled: '', | ||||
|       sortRule: '', | ||||
|       rules: { | ||||
|         residentId: [{required: true, message: '请选择人员', trigger: 'blur'}], | ||||
|         eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'}], | ||||
|         integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}], | ||||
|         integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}], | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
| @@ -147,14 +141,14 @@ export default { | ||||
|         { slot: "options" }, | ||||
|       ] | ||||
|     }, | ||||
|     // rules() { | ||||
|     //   return { | ||||
|     //     residentId: [{required: true, message: '请选择人员', trigger: 'blur'}], | ||||
|     //     eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'}], | ||||
|     //     integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}], | ||||
|     //     integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}], | ||||
|     //   } | ||||
|     // }, | ||||
|     rules() { | ||||
|       return { | ||||
|         ids: [{required: true, message: '请选择人员', trigger: 'blur'}], | ||||
|         eventDesc: [{required: true, message: '请输入调整说明', trigger: 'blur'}], | ||||
|         integralCalcType: [{required: true, message: '请选择类型', trigger: 'change'}], | ||||
|         integral: [{required: true, validator: (r, v, cb) => v > 0 ? cb() : cb("请输入正数")}], | ||||
|       } | ||||
|     }, | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
| @@ -163,8 +157,8 @@ export default { | ||||
|           ...this.page, | ||||
|           ...this.search, | ||||
|           current: this.current, | ||||
|           sortFiled: this.sortFiled, | ||||
|           sortRule: this.sortRule | ||||
|           // sortFiled: this.sortFiled, | ||||
|           // sortRule: this.sortRule | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if(res?.data) { | ||||
| @@ -233,36 +227,36 @@ export default { | ||||
|     changeTableSort(col) { | ||||
|       if(col.prop === 'integral') { // 剩余积分 | ||||
|         if(col.order === 'ascending') { | ||||
|           this.sortFiled = 0 | ||||
|           this.sortRule = true | ||||
|           this.search.sortFiled = 0 | ||||
|           this.search.sortRule = true | ||||
|         } else if(col.order === 'descending') { | ||||
|           this.sortFiled = 0 | ||||
|           this.sortRule = false | ||||
|           this.search.sortFiled = 0 | ||||
|           this.search.sortRule = false | ||||
|         } else if(col.order === null) { | ||||
|           this.sortFiled = '' | ||||
|           this.sortRule = '' | ||||
|           this.search.sortFiled = '' | ||||
|           this.search.sortRule = '' | ||||
|         } | ||||
|       } else if(col.prop === 'totalIntegral') {  // 累计积分 | ||||
|         if(col.order === 'ascending') { | ||||
|           this.sortFiled = 1 | ||||
|           this.sortRule = true | ||||
|           this.search.sortFiled = 1 | ||||
|           this.search.sortRule = true | ||||
|         } else if(col.order === 'descending') { | ||||
|           this.sortFiled = 1 | ||||
|           this.sortRule = false | ||||
|           this.search.sortFiled = 1 | ||||
|           this.search.sortRule = false | ||||
|         } else if(col.order === null) { | ||||
|           this.sortFiled = '' | ||||
|           this.sortRule = '' | ||||
|           this.search.sortFiled = '' | ||||
|           this.search.sortRule = '' | ||||
|         } | ||||
|       } else if(col.prop === 'usedIntegral') {  // 已用积分 | ||||
|         if(col.order === 'ascending') { | ||||
|           this.sortFiled = 2 | ||||
|           this.sortRule = true | ||||
|           this.search.sortFiled = 2 | ||||
|           this.search.sortRule = true | ||||
|         } else if(col.order === 'descending') { | ||||
|           this.sortFiled = 2 | ||||
|           this.sortRule = false | ||||
|           this.search.sortFiled = 2 | ||||
|           this.search.sortRule = false | ||||
|         } else if(col.order === null) { | ||||
|           this.sortFiled = '' | ||||
|           this.sortRule = '' | ||||
|           this.search.sortFiled = '' | ||||
|           this.search.sortRule = '' | ||||
|         } | ||||
|       } | ||||
|       this.getTableData() | ||||
| @@ -272,21 +266,26 @@ export default { | ||||
|       if(this.form.file?.length) { | ||||
|         this.form.enclosure = this.form.file[0].url | ||||
|       } | ||||
|       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.getTableData() | ||||
|             this.dialog = false | ||||
|       this.$refs.form.validate((valid)=> { | ||||
|         if(valid) { | ||||
|           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.getTableData() | ||||
|                 this.dialog = false | ||||
|               }) | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|        | ||||
|     }, | ||||
|  | ||||
|     toDetail(id) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user