四邻联动记录完成
This commit is contained in:
		| @@ -31,7 +31,7 @@ export default { | ||||
|     permissions: Function | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load('yesOrNo') | ||||
|     this.dict.load('yesOrNo', "partyFourLinkageStatus") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|   | ||||
| @@ -16,18 +16,18 @@ | ||||
|                   @getList="getTableData" :col-configs="colConfigs" :dict="dict"> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="handleAudit(row.id)">审批</el-button> | ||||
|               <el-button v-if="row.status==0" type="text" @click="handleAudit(row)">审批</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-card> | ||||
|     <ai-dialog title="联动记录审核" :visible.sync="dialog" @closed="form={}" @onConfirm="submit" width="600px"> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="是否通过审核" prop="auditStatus"> | ||||
|           <ai-select v-model="form.auditStatus" placeholder="请选择党员" :selectList="dict.getDict('yesOrNo')"/> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="120px"> | ||||
|         <el-form-item label="是否通过审核" prop="status"> | ||||
|           <ai-select v-model="form.status" placeholder="请选择党员" :selectList="dict.getDict('yesOrNo')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="审批意见" prop="remark" v-if="form.auditStatus==0"> | ||||
|         <el-form-item label="审批意见" prop="remark" v-if="form.status==0"> | ||||
|           <el-input type="textarea" v-model="form.remark" placeholder="请输入审批意见" maxlength="200" show-word-limit | ||||
|                     rows="5"/> | ||||
|         </el-form-item> | ||||
| @@ -50,11 +50,11 @@ export default { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "党员", prop: "productName"}, | ||||
|         {label: "四邻信息", prop: "productName"}, | ||||
|         {label: "描述", prop: "productName"}, | ||||
|         {label: "日期", prop: "productName"}, | ||||
|         {label: "状态", prop: "status"}, | ||||
|         {label: "党员", prop: "partyName"}, | ||||
|         {label: "四邻信息", prop: "residentName"}, | ||||
|         {label: "描述", prop: "description"}, | ||||
|         {label: "日期", prop: "linksageDate"}, | ||||
|         {label: "状态", prop: "status", dict: "partyFourLinkageStatus"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
| @@ -66,12 +66,15 @@ export default { | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: {} | ||||
|       rules: { | ||||
|         status: {required: true, message: "请选择是否通过审核"}, | ||||
|         remark: {required: true, message: "请输入审批意见"}, | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appfinancialloanapply/list", null, { | ||||
|       this.instance.post("/app/apppartyfourlinkage/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
| @@ -83,7 +86,7 @@ export default { | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/appfinancialloanapply/addOrUpdate", this.form).then(res => { | ||||
|           this.instance.post("/app/apppartyfourlinkage/auditById", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|   | ||||
| @@ -4,7 +4,9 @@ | ||||
|       <template #content> | ||||
|         <ai-search-bar class="mar-t8"> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" | ||||
|                        @click="form.linksageDate=$moment().format('YYYY-MM-DD'),dialog=true">添加 | ||||
|             </el-button> | ||||
|             <el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除 | ||||
|             </el-button> | ||||
|             <el-date-picker v-model="search.createTime" type="date" placeholder="日期" size="small" clearable | ||||
| @@ -30,13 +32,14 @@ | ||||
|     <ai-dialog title="四邻联动信息" :visible.sync="dialog" @closed="form={}" @onConfirm="submit" width="600px"> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="党员" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" placeholder="请选择党员"/> | ||||
|           <ai-select v-model="form.partyId" action="/app/appparty/list" :instance="instance" | ||||
|                      :prop="{label:'name'}" @change="form.residentId=null,getResidents()"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="四邻信息" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" placeholder="请选择四邻信息"/> | ||||
|         <el-form-item label="四邻信息" prop="residentId"> | ||||
|           <ai-select v-model="form.residentId" :selectList="residents" placeholder="请选择四邻信息"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="日期" prop="time"> | ||||
|           <el-date-picker v-model="form.time" clearable placeholder="日期"/> | ||||
|         <el-form-item label="日期" prop="linksageDate"> | ||||
|           <el-date-picker v-model="form.linksageDate" clearable placeholder="日期"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="描述" prop="description"> | ||||
|           <el-input type="textarea" v-model="form.description" rows="5" maxlength="200" show-word-limit/> | ||||
| @@ -61,10 +64,10 @@ export default { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {type: 'selection'}, | ||||
|         {label: "党员", prop: "productName"}, | ||||
|         {label: "四邻信息", prop: "productName"}, | ||||
|         {label: "描述", prop: "productName"}, | ||||
|         {label: "日期", prop: "productName"}, | ||||
|         {label: "党员", prop: "partyName"}, | ||||
|         {label: "四邻信息", prop: "residentName"}, | ||||
|         {label: "描述", prop: "description"}, | ||||
|         {label: "日期", prop: "linksageDate"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
| @@ -75,13 +78,19 @@ export default { | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: {} | ||||
|       form: {residentId: ""}, | ||||
|       rules: { | ||||
|         partyId: {required: true, message: "请选择党员"}, | ||||
|         residentId: {required: true, message: "请选择四邻信息"}, | ||||
|         linksageDate: {required: true, message: "请选择日期"}, | ||||
|         description: {required: true, message: "请输入描述"}, | ||||
|       }, | ||||
|       residents: [] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appfinancialloanapply/list", null, { | ||||
|       this.instance.post("/app/apppartyfourlinkage/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
| @@ -92,7 +101,7 @@ export default { | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要删除联动记录?").then(() => { | ||||
|         this.instance.post("/app/appfinancialloanapply/delete", null, { | ||||
|         this.instance.post("/app/apppartyfourlinkage/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
| @@ -105,7 +114,7 @@ export default { | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/appfinancialloanapply/addOrUpdate", this.form).then(res => { | ||||
|           this.instance.post("/app/apppartyfourlinkage/addOrUpdate", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
| @@ -117,7 +126,19 @@ export default { | ||||
|     }, | ||||
|     handleEdit(row) { | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.dialog = true | ||||
|       this.getResidents().then(() => this.dialog = true) | ||||
|  | ||||
|     }, | ||||
|     getResidents() { | ||||
|       let {partyId} = this.form | ||||
|       return this.instance.post("/app/apppartyfourresident/listFourResident", null, { | ||||
|         params: {partyId, size: 999} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.residents = res.data.records.map(e => ({dictValue: e.id, dictName: e.name})) | ||||
|           this.$forceUpdate() | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user