审核任务
This commit is contained in:
		
							
								
								
									
										161
									
								
								project/tianfuxing/AppTaskReview/AppTaskReview.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										161
									
								
								project/tianfuxing/AppTaskReview/AppTaskReview.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,161 @@ | ||||
| <template> | ||||
|   <section class="AppTaskReview"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="任务审核" isShowBottomBorder /> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #right> | ||||
|             <el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch"> | ||||
|             </el-input> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"  | ||||
|           :dict="dict" @sort-change="sortChange"> | ||||
|           <el-table-column slot="title" label="凭证内容" align="left"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-image class="row-img" src="https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png"  | ||||
|                 :preview-src-list="['https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png']"/> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button type="text" @click="pass(row)">通过</el-button> | ||||
|               <el-button type="text" @click="refuse(row)">拒绝</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|         <ai-dialog | ||||
|           title="审核通过" | ||||
|           :visible.sync="dialog" | ||||
|           :destroyOnClose="true" | ||||
|           width="720px" | ||||
|           @onConfirm="onConfirm" | ||||
|           @closed="form={}"> | ||||
|         <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|           <el-form-item label="发放积分" prop="integral"> | ||||
|             <el-input v-model.trim="form.integral" placeholder="请输入正数" size="small"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "AppTaskReview", | ||||
|   label: "任务审核", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   data () { | ||||
|     return { | ||||
|       search: { | ||||
|         title: '', | ||||
|       }, | ||||
|       page: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total: 0, | ||||
|       }, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: { | ||||
|         integral: '', | ||||
|       }, | ||||
|     } | ||||
|   }, | ||||
|   created () { | ||||
|     this.$dict.load('integralCalcType', 'electionMethod').then(()=> { | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|   computed: { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {slot: "title", align: "left"}, | ||||
|         {prop: "organizationName", label: "上传人", align: "center"}, | ||||
|         {prop: "electionMethod", label: "任务分类", align: "center",dict:"electionMethod"}, | ||||
|         {prop: "chooseNumber", label: "上传时间", align: "center"}, | ||||
|         {prop: "chooseNumber", label: "状态", align: "center"}, | ||||
|         {prop: "chooseNumber", label: "处理人", align: "center"}, | ||||
|         {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: { | ||||
|     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 | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|  | ||||
|     }, | ||||
|     pass(row) { | ||||
|       this.dialog = true | ||||
|       this.form = {...row} | ||||
|     }, | ||||
|     refuse(row) { | ||||
|       this.$confirm('确定拒绝该任务?').then(() => { | ||||
|         // this.instance.post(`/app/appvillagepicturealbum/delete?ids=${row.id}`).then(res => { | ||||
|         //   if (res.code == 0) { | ||||
|         //     this.$message.success('审核成功') | ||||
|         //     this.getList() | ||||
|         //   } | ||||
|         // }) | ||||
|       }) | ||||
|     }, | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appgeneralelectioninfo/list`,null,{ | ||||
|         params: { | ||||
|           ...this.page, | ||||
|           ...this.search, | ||||
|         } | ||||
|       }).then(res=> { | ||||
|         if(res?.data) { | ||||
|           this.tableData = res.data.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppTaskReview { | ||||
|   height: 100%; | ||||
|   .row-img { | ||||
|     width: 80px; | ||||
|     height: 80px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user