积分维护
This commit is contained in:
		| @@ -34,19 +34,12 @@ | ||||
|                   @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="getFamilyByPartyId(row.idNumber)">家庭成员</el-button> --> | ||||
|               <el-button type="text" @click="showDetail(row.id)">详情</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <!-- <ai-dialog :visible.sync="dialog" title="家庭成员" :customFooter="true" width="780px" @close="familyList=[]"> | ||||
|       <ai-table :tableData="familyList" :isShowPagination="false" :col-configs="familyCols" :dict="dict"/> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="dialog=false">关 闭</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> --> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| @@ -70,18 +63,6 @@ export default { | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     }, | ||||
|     familyCols() { | ||||
|       return [ | ||||
|         { | ||||
|           label: '与户主关系', prop: 'householdRelation', align: 'center', width: 165, | ||||
|           render: (h, {row}) => h('p', this.dict.getLabel('householdRelation', row.householdRelation || "户主")) | ||||
|         }, | ||||
|         {label: '类型', prop: 'residentType', align: 'center', dict: "residentType"}, | ||||
|         {label: '姓名', prop: 'name', align: 'center'}, | ||||
|         {label: '身份证号', render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber)), width: 165}, | ||||
|         {label: '联系电话', prop: 'phone', align: 'center', width: 120} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
| @@ -90,8 +71,6 @@ export default { | ||||
|       }, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       familyList: [], | ||||
|       organizationName: '', | ||||
|       organizationTree: [], | ||||
|       defaultExpanded: [], | ||||
| @@ -148,16 +127,6 @@ export default { | ||||
|     showDetail(id) { | ||||
|       this.$router.push({query: {id}}) | ||||
|     }, | ||||
|     getFamilyByPartyId(idNumber) { | ||||
|       this.instance.post("/app/appresident/queryHomeMember", null, { | ||||
|         params: {idNumber} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.familyList = res.data?.family || [] | ||||
|           this.dialog = true | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   | ||||
| @@ -47,15 +47,13 @@ | ||||
|     </ai-list> | ||||
|     <ai-dialog title="详情" :visible.sync="dialog" :customFooter="true" :destroyOnClose="true" width="720px"> | ||||
|       <ai-wrapper> | ||||
|         <ai-info-item label="户主:" :value="dialogInfo.familyName"/> | ||||
|         <ai-info-item label="对象:" :value="dialogInfo.residentName"/> | ||||
|         <ai-info-item label="事件:" :value="dialogInfo.eventDesc" isLine/> | ||||
|         <ai-info-item label="时间:" :value="dialogInfo.doTime" isLine/> | ||||
|         <ai-info-item label="积分:"> | ||||
|           {{ dialogInfo.changeIntegral >= 0 ? '增加' : '减少' }} | ||||
|           <span style="color:#26f" v-text="Math.abs(dialogInfo.changeIntegral)"/>分 | ||||
|         <ai-info-item label="党员:" :value="dialogInfo.partyName" isLine/> | ||||
|         <ai-info-item label="事件:" :value="dict.getLabel('partyIntegralDetailType',dialogInfo.type)" dict/> | ||||
|         <ai-info-item label="类型:"> | ||||
|           {{ dialogInfo.partyIntegralDetailType == 1 ? '加分' : '减分' }} | ||||
|         </ai-info-item> | ||||
|         <ai-info-item label="积分余额:" :value="dialogInfo.nowIntegral"/> | ||||
|         <ai-info-item label="分值:" :value="dialogInfo.integral" isLine/> | ||||
|         <ai-info-item label="时间:" :value="dialogInfo.createTime" isLine/> | ||||
|       </ai-wrapper> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="dialog=false">关闭</el-button> | ||||
| @@ -100,7 +98,7 @@ export default { | ||||
|   }, | ||||
|  | ||||
|   mounted() { | ||||
|     this.$dict.load(["integralDeclareDoType","integralDetailType",]).then(() => { | ||||
|     this.$dict.load(["integralDeclareDoType","integralDetailType","partyIntegralDetailType"]).then(() => { | ||||
|       this.getList(); | ||||
|     }); | ||||
|   }, | ||||
| @@ -122,11 +120,11 @@ export default { | ||||
|  | ||||
|     timeChange() { | ||||
|       if (this.searchDotime) { | ||||
|         this.search.doTimeStart = this.searchDotime[0] | ||||
|         this.search.doTimeEnd = this.searchDotime[1] | ||||
|         this.search.startTime = this.searchDotime[0] | ||||
|         this.search.endTime = this.searchDotime[1] | ||||
|       } else { | ||||
|         this.search.doTimeStart = null | ||||
|         this.search.doTimeEnd = null | ||||
|         this.search.startTime = null | ||||
|         this.search.endTime = null | ||||
|       } | ||||
|       this.search.current = 1 | ||||
|       this.getList() | ||||
|   | ||||
| @@ -7,8 +7,6 @@ | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true" | ||||
|                        :disabled="!permissions('app_appvillagerintegraldetail_change')">添加 | ||||
|             </el-button> | ||||
|             <ai-import :instance="instance" :dict="dict" name="积分调整" type="appvillagerintegraldetail" | ||||
|                        v-if="permissions('app_appvillagerintegraldetail_change')" @success="getList"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
| @@ -47,7 +45,7 @@ | ||||
|           <ai-select v-model="form.integralCalcType" :selectList="dict.getDict('integralCalcType')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="积分" prop="changeIntegral"> | ||||
|           <el-input v-model.trim.num="form.changeIntegral" placeholder="请输入正数" size="small"></el-input> | ||||
|           <el-input v-model.trim.num ="form.changeIntegral" placeholder="请输入正数" size="small"></el-input> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   | ||||
| @@ -162,8 +162,6 @@ export default { | ||||
|       search: {status: "", eventName: ""}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       colConfigs: [ | ||||
|         // {prop: "event", label: "事件", dict: "integralRuleEvent", align: "center"}, | ||||
|         // {prop: "type", label: "类型", dict: "integralRuleEventType", align: "center"}, | ||||
|         {prop: "eventName", label: "事件名称", dict: "integralRuleEvent", align: "center"}, | ||||
|         {prop: "eventDesc", label: "简介", dict: "integralRuleEventType", align: "center"}, | ||||
|         {prop: "ruleType", label: "规则", dict: "integralRuleRuleType", align: "center"}, | ||||
| @@ -179,10 +177,10 @@ export default { | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: { | ||||
|         classify: 0, | ||||
|         classify: '0', | ||||
|         eventName: '', | ||||
|         eventDesc: '', | ||||
|         ruleType: 0, | ||||
|         ruleType: '0', | ||||
|         scoringCycle: '', | ||||
|         numberLimit: '', //奖励次数 | ||||
|         integral: '',  // 常规 | ||||
| @@ -231,25 +229,14 @@ export default { | ||||
|       this.form.ladderIntegral.push({ viewCount: null, integral: null }) | ||||
|     }, | ||||
|     toEdit(row) { | ||||
|       console.log(row); | ||||
|       this.form = { ...row } | ||||
|       this.form.ruleType = row.ruleType | ||||
|       this.dialog = true | ||||
|       // let {ladderRule, event, type} = this.form, | ||||
|           // dict = 'integralRuleEvent' + event | ||||
|       // this.dict.load(dict).then(() => { | ||||
|       //   this.form.eventType = [event, type] | ||||
|       //   this.form.ladderRule = JSON.parse(ladderRule || "[]") | ||||
|       //   this.cacheOps = this.dict.getDict('integralRuleEvent').map(e => { | ||||
|       //     if (e.dictValue == event) { | ||||
|       //       e.children = this.dict.getDict(dict).map(d => ({...d, leaf: true})) | ||||
|       //     } | ||||
|       //     return e | ||||
|       //   }) | ||||
|       //   this.$nextTick(() => { | ||||
|       //     this.dialog = true | ||||
|       //   }) | ||||
|       // }) | ||||
|       this.instance.post(`/app/apppartyintegralrule/queryDetailById?id=${row.id}`).then((res) => { | ||||
|         if(res?.data) { | ||||
|           this.form = res.data | ||||
|           this.form.ladderIntegral = JSON.parse(res.data.ladderRule) | ||||
|           this.form.ruleType = res.data.ruleType | ||||
|           this.dialog = true | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|      | ||||
|     close() { | ||||
| @@ -319,8 +306,8 @@ export default { | ||||
|     onConfirm(id) { | ||||
|       this.$refs.DialogForm.validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.form.integralMin = this.form.integralArr[0] | ||||
|           this.form.integralMax = this.form.integralArr[1] | ||||
|           this.form.integralMin = this.form.integralArr[0] || '' | ||||
|           this.form.integralMax = this.form.integralArr[1] || '' | ||||
|           this.form.ladderRule = JSON.stringify(this.form.ladderIntegral) | ||||
|            | ||||
|           this.instance.post(`/app/apppartyintegralrule/addOrUpdate`, { | ||||
|   | ||||
| @@ -122,13 +122,19 @@ export default { | ||||
|     } | ||||
|   },  | ||||
|   created() { | ||||
|     this.dict.load("integralRuleStatus", "integralRuleRuleType", 'integralRuleScoringCycle', 'integralRuleEvent', 'integralRuleEventType','partyIntegralRuleEvent','integralRuleEvent4').then(() => { | ||||
|     this.$dict.load("integralRuleStatus", "integralRuleRuleType", 'integralRuleScoringCycle', 'integralRuleEvent', 'integralRuleEventType','partyIntegralRuleEvent','integralRuleEvent4').then(() => { | ||||
|       this.getList(); | ||||
|       this.cacheOps = this.$dict.getDict('partyIntegralRuleEvent').map(e => { | ||||
|         if (e.dictValue == event) { | ||||
|           e.children = this.dict.getDict(dict).map(d => ({...d, leaf: true})) | ||||
|         } | ||||
|         return e | ||||
|  | ||||
|       // let {,event, type} = this.form, | ||||
|       let dict = 'integralRuleEvent4' + this.form.event | ||||
|       this.$dict.load(dict).then(() => { | ||||
|         // this.form.eventType = [event, type] | ||||
|         this.cacheOps = this.dict.getDict('partyIntegralRuleEvent').map(e => { | ||||
|           if (e.dictValue == this.form.event) { | ||||
|             e.children = this.$dict.getDict(dict).map(d => ({...d, leaf: true})) | ||||
|           } | ||||
|           return e | ||||
|         }) | ||||
|       }) | ||||
|     }); | ||||
|   }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user