积分整合
This commit is contained in:
		| @@ -1,62 +0,0 @@ | ||||
| <template> | ||||
|   <div class="AppHealthReport"> | ||||
|     <keep-alive :include="['List']"> | ||||
|       <component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component> | ||||
|     </keep-alive> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import List from './components/List.vue' | ||||
|   import Detail from './components/Detail.vue' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppIntegralAudit', | ||||
|     label: '积分审核', | ||||
|  | ||||
|     components: { | ||||
|       List, | ||||
|       Detail | ||||
|     }, | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       permissions: Function | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         component: 'List', | ||||
|         params: {} | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         if (data.type === 'Detail') { | ||||
|           this.component = 'Detail' | ||||
|           this.isShowDetail = true | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'list') { | ||||
|           this.component = 'List' | ||||
|           this.params = data.params | ||||
|  | ||||
|           this.$nextTick(() => { | ||||
|             if (data.isRefresh) { | ||||
|               this.$refs.component.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .AppHealthReport { | ||||
|     height: 100%; | ||||
|   } | ||||
| </style> | ||||
| @@ -1,237 +0,0 @@ | ||||
|  <template> | ||||
|   <ai-detail class="audit"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)"> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-card title="基本信息"> | ||||
|         <template #content> | ||||
|           <ai-wrapper | ||||
|             label-width="120px"> | ||||
|             <ai-info-item label="申请人" :value="info.residentName"></ai-info-item> | ||||
|             <ai-info-item label="申请时间" :value="info.createTime"></ai-info-item> | ||||
|             <ai-info-item label="积分类型" :value="dict.getLabel('atWillReportType', info.applyIntegralType)"></ai-info-item> | ||||
|             <ai-info-item label="申请描述" :value="info.description" isLine></ai-info-item> | ||||
|             <ai-info-item label="联系电话" isLine :value="info.residentPhone"></ai-info-item> | ||||
|             <ai-info-item label="图片" isLine> | ||||
|               <ai-uploader v-model="info.applyFiles" disabled></ai-uploader> | ||||
|             </ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|       <ai-card title="处理结果" v-if="info.auditStatus !== '0'"> | ||||
|         <div slot="content" style="margin-top: 16px;margin-bottom:24px"> | ||||
|           <ai-wrapper | ||||
|             label-width="120px"> | ||||
|             <ai-info-item label="审核结果" :value="info.auditStatus === '1' ? '通过' : '拒绝'" isLine></ai-info-item> | ||||
|             <ai-info-item label="审核意见" v-if="info.auditStatus === '2'" isLine :value="info.auditOpinion"></ai-info-item> | ||||
|             <ai-info-item label="积分规则类别" v-if="info.auditStatus === '1'" :value="dict.getLabel('atWillReportType', info.auditIntegralType)"></ai-info-item> | ||||
|             <ai-info-item label="积分规则事项" v-if="info.auditStatus === '1'" :value="info.auditRuleName"></ai-info-item> | ||||
|             <ai-info-item label="积分调整" isLine v-if="info.auditStatus === '1'" :value="(info.auditIntegral >= 0 ? info.auditIntegral : info.auditIntegral) + '分'"></ai-info-item> | ||||
|             <ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item> | ||||
|             <ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </div> | ||||
|       </ai-card> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShow" | ||||
|         width="800px" | ||||
|         @close="onClose" | ||||
|         title="事件审核" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form class="ai-form" label-width="120px" :model="form" ref="form"> | ||||
|           <el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]"> | ||||
|             <el-radio-group v-model="form.pass" @change="onStatusChange"> | ||||
|               <el-radio label="0">否</el-radio> | ||||
|               <el-radio label="1">是</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item v-if="form.pass === '1'" label="积分规则类别" prop="auditRuleId" style="width: 100%;" :rules="[{ required: true, message: '' }]"> | ||||
|             <div class="flex-warpper"> | ||||
|                <el-form-item  label-width="0" prop="auditIntegralType" :rules="[{ required: true, message: '请选择积分规则类别' }]"> | ||||
|                 <ai-select | ||||
|                   v-model="form.auditIntegralType" | ||||
|                   clearable | ||||
|                   style="width: 180px;" | ||||
|                   placeholder="请选择积分规则类别" | ||||
|                   :selectList="dict.getDict('atWillReportType')" | ||||
|                   @change="onChange"> | ||||
|                 </ai-select> | ||||
|                </el-form-item> | ||||
|                <el-form-item style="margin: 0 10px;" prop="auditRuleId" :rules="[{ required: true, message: '请选择积分规则事项' }]"> | ||||
|                 <ai-select | ||||
|                   v-model="form.auditRuleId" | ||||
|                   clearable | ||||
|                   style="width: 180px;" | ||||
|                   placeholder="请选择积分规则事项" | ||||
|                   :selectList="ruleList"> | ||||
|                 </ai-select> | ||||
|                </el-form-item> | ||||
|               <span>{{ integralText }}</span> | ||||
|             </div> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]"> | ||||
|             <el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|     <template #footer > | ||||
|       <el-button @click="cancel">取消</el-button> | ||||
|       <el-button type="primary" @click="isShow = true" v-if="info.auditStatus === '0'">审核</el-button> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       const validatorRules = function (rule, value, callback) { | ||||
|         if (value === '') { | ||||
|           callback(new Error('请输入联系方式')) | ||||
|         } else if (!/^1\d{10}$/.test(value)) { | ||||
|           callback(new Error('手机号格式错误')) | ||||
|         } else { | ||||
|           callback() | ||||
|         } | ||||
|       } | ||||
|       return { | ||||
|         total: 0, | ||||
|         info: { | ||||
|           auditStatus: '0' | ||||
|         }, | ||||
|         id: '', | ||||
|         isShow: false, | ||||
|         form: { | ||||
|           auditIntegralType: '', | ||||
|           auditRuleId: '', | ||||
|           opinion: '', | ||||
|           pass: '' | ||||
|         }, | ||||
|         ruleList: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       integralText () { | ||||
|         if (!this.form.auditRuleId) { | ||||
|           return '' | ||||
|         } | ||||
|  | ||||
|         const integral = this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].integral | ||||
|  | ||||
|         return integral >= 0 ? `+${integral}分` : `${integral}分` | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         this.dict.load(['atWillReportType', 'auditStatus']).then(() => { | ||||
|           this.getInfo(this.params.id) | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onStatusChange () { | ||||
|         this.$refs.form.clearValidate() | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.form.auditIntegralType = '' | ||||
|         this.form.auditRuleId = '' | ||||
|         this.form.pass = '' | ||||
|         this.form.opinion = '' | ||||
|         this.id = '' | ||||
|       }, | ||||
|  | ||||
|       onConfirm() { | ||||
|         this.$refs.form.validate(v => { | ||||
|           if (v) { | ||||
|             this.instance.post('/app/appvillagerintegraldeclare/examine', null, { | ||||
|               params: { | ||||
|                 ...this.form, | ||||
|                 id: this.params.id, | ||||
|                 auditIntegral: this.form.auditRuleId ? this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].integral : '', | ||||
|                 auditRuleName: this.form.auditRuleId ? this.ruleList.filter(v => v.dictValue === this.form.auditRuleId)[0].ruleName : '' | ||||
|               } | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.isShow = false | ||||
|                 this.getInfo(this.params.id) | ||||
|                 this.$message.success('审核成功!') | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onChange (e) { | ||||
|         this.form.auditRuleId = '' | ||||
|         this.instance.post(`/app/appvillagerintegralrule/list?size=1000&classification=${e}`).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.ruleList = res.data.records.filter(v => v.ruleStatus === '1').map(v => { | ||||
|               return { | ||||
|                 dictName: v.ruleName, | ||||
|                 dictValue: v.id, | ||||
|                 ruleName: v.ruleName, | ||||
|                 integral: v.integral | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'list', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|   .audit { | ||||
|     .flex-warpper { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|  | ||||
|       ::v-deep .el-form-item .el-form-item__content { | ||||
|         margin-left: 0!important; | ||||
|       } | ||||
|  | ||||
|       ::v-deep .ai-select { | ||||
|         margin: 0!important; | ||||
|       } | ||||
|  | ||||
|       ::v-deep .el-form-item { | ||||
|         width: auto; | ||||
|         margin-bottom: 0; | ||||
|  | ||||
|         &:last-child { | ||||
|           margin-right: 10px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
| @@ -1,237 +0,0 @@ | ||||
| <template> | ||||
|   <ai-list class="list"> | ||||
|     <ai-title | ||||
|       slot="title" | ||||
|       title="积分审核" | ||||
|       v-if="search.areaId" | ||||
|       isShowBottomBorder | ||||
|       :instance="instance" | ||||
|       :disabledLevel="disabledLevel" | ||||
|       isShowArea | ||||
|       v-model="search.areaId" | ||||
|       @change="changeArea"> | ||||
|     </ai-title> | ||||
|     <template slot="content"> | ||||
|       <div class="content"> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <ai-select | ||||
|               v-model="search.applyIntegralType" | ||||
|               clearable | ||||
|               placeholder="请选择积分类型" | ||||
|               :selectList="dict.getDict('atWillReportType')" | ||||
|               @change="search.current = 1, getList()"> | ||||
|             </ai-select> | ||||
|             <ai-select | ||||
|               v-model="search.auditStatus" | ||||
|               clearable | ||||
|               placeholder="请选择审核状态" | ||||
|               :selectList="dict.getDict('auditStatus')" | ||||
|               @change="search.current = 1, getList()"> | ||||
|             </ai-select> | ||||
|             <el-date-picker | ||||
|               value-format="yyyy-MM-dd" | ||||
|               v-model="search.createTimeStart" | ||||
|               type="date" | ||||
|               size="small" | ||||
|               unlink-panels | ||||
|               placeholder="选择开始日期" | ||||
|               @change="search.current = 1, getList()" /> | ||||
|             <el-date-picker | ||||
|               value-format="yyyy-MM-dd" | ||||
|               v-model="search.createTimeEnd" | ||||
|               type="date" | ||||
|               size="small" | ||||
|               unlink-panels | ||||
|               placeholder="选择结束日期" | ||||
|               @change="search.current = 1, getList()" /> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input | ||||
|               v-model="search.residentName" | ||||
|               size="small" | ||||
|               placeholder="请输入姓名" | ||||
|               clearable | ||||
|               v-throttle="() => {search.current = 1, getList()}" | ||||
|               @clear="search.current = 1, search.residentName = '', getList()" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|             </el-input> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="total" | ||||
|           v-loading="loading" | ||||
|           style="margin-top: 8px;" | ||||
|           :current.sync="search.current" | ||||
|           :size.sync="search.size" | ||||
|           @getList="getList"> | ||||
|           <el-table-column slot="options" width="120px" fixed="right" label="操作" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </div> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
|   export default { | ||||
|     name: 'List', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           residentName: '', | ||||
|           applyIntegralType: '', | ||||
|           areaId: '', | ||||
|           auditStatus: '', | ||||
|           createTimeStart: '', | ||||
|           createTimeEnd: '' | ||||
|         }, | ||||
|         dictList: [{ | ||||
|           dictName: '否', | ||||
|           dictValue: '0' | ||||
|         }, { | ||||
|           dictName: '是', | ||||
|           dictValue: '1' | ||||
|         }], | ||||
|         info: {}, | ||||
|         colConfigs: [ | ||||
|           { prop: 'residentName', label: '申请人' }, | ||||
|           { prop: 'residentPhone', align: 'center', label: '联系电话' }, | ||||
|           { prop: 'createTime', align: 'center', label: '申请时间' }, | ||||
|           { prop: 'applyIntegralType', align: 'center', label: '积分类型', formart: v => this.dict.getLabel('atWillReportType', v) },  | ||||
|           { prop: 'auditStatus', align: 'center', label: '状态', formart: v => v ? this.dict.getLabel('auditStatus', v) : '-' },  | ||||
|           { prop: 'auditUserName', align: 'center', label: '审批人' },  | ||||
|           { prop: 'auditTime', align: 'center', label: '审批时间' } | ||||
|         ], | ||||
|         tableData: [], | ||||
|         total: 0, | ||||
|         loading: false, | ||||
|         disabledLevel: 0 | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']), | ||||
|  | ||||
|       param () { | ||||
|         return { | ||||
|  | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.disabledLevel = this.user.info.areaList.length - 1 | ||||
|       this.search.areaId = this.user.info.areaId | ||||
|       this.loading = true | ||||
|       this.dict.load(['atWillReportType', 'auditStatus']).then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appvillagerintegraldeclare/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|             this.loading = false | ||||
|           } else { | ||||
|             this.loading = false | ||||
|           } | ||||
|         }).catch(() => { | ||||
|           this.loading = false | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       changeArea () { | ||||
|         this.search.current = 1 | ||||
|  | ||||
|         this.$nextTick(() => { | ||||
|           this.getList() | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
|   .list { | ||||
|     ::v-deep .ai-list__content { | ||||
|       padding: 0!important; | ||||
|  | ||||
|       .ai-list__content--right-wrapper { | ||||
|         background: transparent!important; | ||||
|         box-shadow: none!important; | ||||
|         margin: 0!important; | ||||
|         padding: 12px 16px 12px!important; | ||||
|       } | ||||
|     } | ||||
|     .statistics-top { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       margin-bottom: 20px; | ||||
|  | ||||
|       & > div { | ||||
|         flex: 1; | ||||
|         height: 96px; | ||||
|         line-height: 1; | ||||
|         margin-right: 20px; | ||||
|         padding: 16px 24px; | ||||
|         background: #FFFFFF; | ||||
|         box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15); | ||||
|         border-radius: 4px; | ||||
|  | ||||
|         &:last-child { | ||||
|           margin-right: 0; | ||||
|         } | ||||
|  | ||||
|         h3 { | ||||
|           font-size: 24px; | ||||
|         } | ||||
|  | ||||
|         span { | ||||
|           display: block; | ||||
|           margin-bottom: 16px; | ||||
|           color: #888888; | ||||
|           font-size: 16px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .content { | ||||
|       padding: 16px; | ||||
|       background: #FFFFFF; | ||||
|       box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15); | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
| @@ -1,84 +0,0 @@ | ||||
| <template> | ||||
|   <ai-list> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="积分维护" :isShowBottomBorder="false" :instance="instance" :isShowArea="true" v-model="areaId" | ||||
|                 @change="changeArea"></ai-title> | ||||
|     </template> | ||||
|     <template slot="tabs"> | ||||
|       <el-tabs v-model="currIndex"> | ||||
|         <el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"> | ||||
|           <component :is="tab.comp" v-if="currIndex === String(i)" :bizType="tab.bizType" :ref="tab.name" | ||||
|                      :areaId="areaId" :instance="instance" :dict="dict" :permissions="permissions"/> | ||||
|         </el-tab-pane> | ||||
|       </el-tabs> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import pointsDeclaration from "./pointsDeclaration.vue" | ||||
| import pointsDetails from "./pointsDetails.vue" | ||||
| import pointsAppeal from './pointsAppeal' | ||||
| import {mapState} from 'vuex' | ||||
| import scoreChange from "./scoreChange"; | ||||
|  | ||||
| export default { | ||||
|     name: 'AppScoreManage', | ||||
|     label: "积分维护", | ||||
|     components: {pointsDeclaration, pointsDetails, pointsAppeal, scoreChange}, | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       permissions: Function | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']), | ||||
|       tabs() { | ||||
|         return [ | ||||
|           // { | ||||
|           //   label: "积分申报", | ||||
|           //   name: "pointsDeclaration", | ||||
|           //   comp: pointsDeclaration, | ||||
|           //   permission: "app_apppartyfee_record", | ||||
|           //   bizType: '0' | ||||
|           // }, | ||||
|           // { label: "积分申诉", name: "pointsAppeal", comp: pointsAppeal, permission: "app_apppartyfee_config", bizType: '1'}, | ||||
|           { | ||||
|             label: "积分明细", | ||||
|             name: "pointsDetails", | ||||
|             comp: pointsDetails, | ||||
|             permission: "app_apppartyfee_statistics", | ||||
|             bizType: '2' | ||||
|           }, | ||||
|           { | ||||
|             label: "积分调整", | ||||
|             name: "scoreChange", | ||||
|             comp: scoreChange, | ||||
|             permission: "", | ||||
|           }, | ||||
|         ] | ||||
|       } | ||||
|     }, | ||||
|     created() { | ||||
|       this.areaId = this.user.info.areaId | ||||
|     }, | ||||
|     methods: { | ||||
|       changeArea() { | ||||
|         this.$nextTick(() => { | ||||
|           this.$refs[this.tabs[Number(this.currIndex)].name][0].getList() | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|     data() { | ||||
|       return { | ||||
|         activeName: "pointsDeclaration", | ||||
|         currIndex: '0', | ||||
|         areaId: '' | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
| @@ -1,611 +0,0 @@ | ||||
| <template> | ||||
|   <section class="pointsDeclaration"> | ||||
|     <ai-list isTabs> | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template slot="left"> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="onAdd" v-if="$permissions('app_appvillagerintegraldeclare_edit')">代申诉</el-button> | ||||
|             <el-button icon="iconfont iconEdit" @click="batchAduit()" :disabled="!Boolean(selectionList.length)" v-if="$permissions('app_appvillagerintegraldeclare_edit')">批量审核</el-button> | ||||
|             <ai-select | ||||
|               v-model="search.status" | ||||
|               @change="page.current = 1, getList()" | ||||
|               placeholder="发布状态" | ||||
|               :selectList="dict.getDict('integralDeclareStatus')"> | ||||
|             </ai-select> | ||||
|             <div class="times_div"> | ||||
|               <p class="times">申诉时间</p> | ||||
|               <el-date-picker | ||||
|                 v-model="search.declareTimeStart" | ||||
|                 type="date" | ||||
|                 size="small" | ||||
|                 @change="page.current = 1,getList()" | ||||
|                 value-format="yyyy-MM-dd HH:mm:ss" | ||||
|                 placeholder="开始日期"> | ||||
|               </el-date-picker> | ||||
|               <el-date-picker | ||||
|                 v-model="search.declareTimeEnd" | ||||
|                 type="date" | ||||
|                 size="small" | ||||
|                 @change="page.current = 1,getList()" | ||||
|                 value-format="yyyy-MM-dd HH:mm:ss" | ||||
|                 placeholder="结束日期"> | ||||
|               </el-date-picker> | ||||
|             </div> | ||||
|           </template> | ||||
|           <template slot="right"> | ||||
|             <el-input | ||||
|               v-model="search.familyName" | ||||
|               class="search-input" | ||||
|               size="mini" | ||||
|               placeholder="申诉人/申诉对象/..." | ||||
|               clearable | ||||
|               v-throttle="() => {page.current = 1, getList()}" | ||||
|               @clear="page.current = 1, getList()" | ||||
|               suffix-icon="iconfont iconSearch" /> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="page.total" | ||||
|           :current.sync="page.current" | ||||
|           :size.sync="page.size" | ||||
|           @getList="getList" | ||||
|           @selection-change="handleSelectionChange" | ||||
|         > | ||||
|           <el-table-column slot="selection" type="selection" width="55" :selectable="(row, index)=>{ | ||||
|               if(row.status==0){ | ||||
|                 return true | ||||
|               }else{ | ||||
|                 return false | ||||
|               }                   | ||||
|           }"></el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <span | ||||
|                 class="iconfont iconEdit icon-color89B" | ||||
|                 v-if="row.status === '0'&&$permissions('app_appvillagerintegraldeclare_edit')" | ||||
|                 title="编辑" | ||||
|                 @click="toEdit(row)" | ||||
|               ></span> | ||||
|               <span | ||||
|                 class="iconfont iconShow icon-color89B" | ||||
|                 v-if="row.status !== '0'&&$permissions('app_appvillagerintegraldeclare_detail')" | ||||
|                 title="详情" | ||||
|                 @click="toEdit(row)" | ||||
|               ></span> | ||||
|               <!-- <span | ||||
|                 class="iconfont iconDelete icon-color89B" | ||||
|                 v-if="$permissions('app_appofficialdocumentinfo_del')" | ||||
|                 title="删除" | ||||
|                 @click="remove(row.id)" | ||||
|               ></span> --> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog | ||||
|       title="积分代申诉" | ||||
|       :visible.sync="dialog.visibleAdd" | ||||
|       :customFooter="true" | ||||
|       :destroyOnClose="true" | ||||
|       width="720px" | ||||
|       @close="init('ruleForm')" | ||||
|     > | ||||
|       <div class="form_div"> | ||||
|         <el-form | ||||
|           ref="ruleForm" | ||||
|           :model="dialogInfo" | ||||
|           :rules="formRules" | ||||
|           size="small" | ||||
|           label-suffix=":" | ||||
|           label-width="140px" | ||||
|         > | ||||
|           <el-form-item label="代申诉家庭" prop="users">             | ||||
|               <ai-person-select :customClicker="true" :isMultiple="true" :chooseUserList.sync="dialogInfo.users" :instance="instance" url="/app/appvillagerintegralfamilymember/list" > | ||||
|                     <template name="option" v-slot:option="{ item }"> | ||||
|                       <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|                       <ai-id mode="show" :show-eyes="false" :value="item.idNumber" /> | ||||
|                     </template> | ||||
|               </ai-person-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="代申诉说明" prop="declareDescription"> | ||||
|             <el-input type="textarea" :rows="3" placeholder="请输入…" maxlength="100" show-word-limit v-model="dialogInfo.declareDescription"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="照片" prop="fileList"> | ||||
|             <div class="upload"> | ||||
|               <ai-uploader :instance="instance" v-model="dialogInfo.fileList" :limit="9" ></ai-uploader> | ||||
|             </div> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </div> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="dialog.visibleAdd=false" size="medium">取消</el-button> | ||||
|         <el-button @click="declare('ruleForm')" type="primary" size="medium">提交</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|     <ai-dialog | ||||
|       title="申诉审核" | ||||
|       :visible.sync="dialog.visibleDetail" | ||||
|       :customFooter="true" | ||||
|       :destroyOnClose="true" | ||||
|       width="720px" | ||||
|       @close="init('rules')" | ||||
|     > | ||||
|       <div class="form_content" v-if="!isBatch"> | ||||
|         <div class="form_flex form_info"> | ||||
|           <div> | ||||
|             <span class="form_label">申诉人:</span> | ||||
|             <span class="form_value">{{rowInfo.declareName}}</span> | ||||
|           </div> | ||||
|           <div> | ||||
|             <span class="form_label">申诉对象:</span> | ||||
|             <span class="form_value">{{rowInfo.declareObjName}}</span> | ||||
|           </div> | ||||
|           <div> | ||||
|             <span class="form_label">户主:</span> | ||||
|             <span class="form_value">{{rowInfo.familyName}}</span> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">申诉说明:</span> | ||||
|           <span class="form_value">{{rowInfo.declareDescription}}</span> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">申诉时间:</span> | ||||
|           <span class="form_value">{{rowInfo.declareTime}}</span> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">照片:</span> | ||||
|           <span class="form_value"> | ||||
|               <ai-uploader  :disabled="true" :instance="instance" v-model="rowInfo.fileList" :limit="9" ></ai-uploader> | ||||
|           </span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="form_div"> | ||||
|         <el-form | ||||
|           ref="rules" | ||||
|           :model="dialogDetail" | ||||
|           :rules="formRules" | ||||
|           size="small" | ||||
|           label-suffix=":" | ||||
|           v-show="rowInfo.status==0" | ||||
|           label-width="90px" | ||||
|         > | ||||
|           <el-form-item label="类型" prop="doType"> | ||||
|             <el-radio-group v-model="dialogDetail.doType" @change="changeDoType"> | ||||
|               <el-radio label="1">加分</el-radio> | ||||
|               <el-radio label="0">扣分</el-radio> | ||||
|               <el-radio label="2">拒绝</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="事项" prop="ruleId" v-if='dialogDetail.doType!=2'> | ||||
|             <el-select v-model="dialogDetail.ruleId" placeholder="请选择..." @change="ruleChange"> | ||||
|                   <el-option | ||||
|                       v-for="(item,i) in rulesList" | ||||
|                       :key="i" | ||||
|                       :label="item.ruleName" | ||||
|                       :value="item.id" | ||||
|                   ></el-option> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="积分" prop="doIntegral" v-if='dialogDetail.doType!=2'> | ||||
|             <el-col :span="1.5" style="margin-right: 8px;">{{dialogDetail.doType==0? '减少' :'增加'}}</el-col> | ||||
|             <el-col :span="6" style="margin-right: 8px;width:120px;"><el-input type="number" v-model="dialogDetail.doIntegral" :placeholder="placeholder" :disabled="integralEdit"></el-input></el-col> | ||||
|             <el-col :span="1" style="margin-right: 8px;">分</el-col>             | ||||
|           </el-form-item> | ||||
|           <el-form-item label="备注说明"> | ||||
|             <el-input type="textarea" :rows="3" maxlength="100" placeholder="请输入…" show-word-limit v-model="dialogDetail.remark"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|         <ai-wrapper | ||||
|             label-width="70px" | ||||
|             v-if="rowInfo.status!=0" | ||||
|             :columnsNumber="1"> | ||||
|             <ai-info-item label="类型:"><span  :style="{color:colorList[rowInfo.status]}" >{{dict.getLabel('integralDeclareStatus', rowInfo.status)}}</span></ai-info-item> | ||||
|             <ai-info-item label="事项:" v-if='rowInfo.doType!=2'><span >{{rowInfo.ruleName}}</span></ai-info-item> | ||||
|             <ai-info-item label="积分:" v-if='rowInfo.doType!=2'>{{rowInfo.doType==0? '减少' :'增加'}}<span style="color:#2266FF">{{Math.abs(rowInfo.doIntegral)}}</span>分</ai-info-item> | ||||
|             <ai-info-item label="备注说明:"><span>{{rowInfo.remark||'-'}}</span></ai-info-item> | ||||
|         </ai-wrapper> | ||||
|       </div> | ||||
|       <div class="dialog-footer" slot="footer" v-if="rowInfo.status==0"> | ||||
|         <el-button @click="dialog.visibleDetail=false" size="medium">取消</el-button> | ||||
|         <el-button @click="onConfirm('rules')" type="primary" size="medium">提交</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex'; | ||||
| export default { | ||||
|   name: "pointsAppeal", | ||||
|  | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     bizType:String, | ||||
|     areaId:String | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|      var integral = (rule, value, callback) => { | ||||
|       if (value) { | ||||
|         if (/^[1-9]\d*$/.test(value)) { | ||||
|           if(!this.integralEdit){ | ||||
|               if(Number(value)>=this.sectionNum.min&&Number(value)<=this.sectionNum.max){ | ||||
|                   callback(); | ||||
|               }else{ | ||||
|                   callback(new Error(`请输入${this.sectionNum.min}至${this.sectionNum.max}之间的正整数积分`)); | ||||
|               } | ||||
|           }else{ | ||||
|             callback(); | ||||
|           } | ||||
|            | ||||
|         } else { | ||||
|           callback(new Error('请输入正整数')); | ||||
|         } | ||||
|       } else { | ||||
|           callback(new Error('请输入正整数')); | ||||
|       } | ||||
|     }; | ||||
|     return { | ||||
|       search: { | ||||
|           status:'', | ||||
|           familyName:'', | ||||
|           declareTimeStart:null, | ||||
|           declareTimeEnd:null | ||||
|       }, | ||||
|       page:{ | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total:0 | ||||
|       }, | ||||
|       colConfigs: [ | ||||
|         { slot: "selection", label: "", align: "center" }, | ||||
|         { prop: "declareName", label: "申诉人", align: "center" }, | ||||
|         { prop: "declareObjName", label: "申诉对象", align: "center",hide:this.bizType==1 }, | ||||
|         { | ||||
|           prop: "familyName", | ||||
|           label: "户主", | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareDescription", | ||||
|           label: "申诉说明", | ||||
|           align: "left", | ||||
|           width:300 | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareTime", | ||||
|           label: "申诉时间", | ||||
|           align: "left", | ||||
|           width:150 | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareName", | ||||
|           label: "操作人", | ||||
|           align: "center", | ||||
|         }, | ||||
|         { | ||||
|           prop: "status", | ||||
|           label: "状态", | ||||
|           align: "center", | ||||
|           render: (h, {row}) => { | ||||
|               return h('span', {style: {color: this.dict.getColor('integralDeclareStatus', row.status)}}, this.dict.getLabel('integralDeclareStatus', row.status)) | ||||
|           }, | ||||
|         }, | ||||
|         { slot: "options", label: "操作", align: "center" }, | ||||
|       ], | ||||
|       tableData: [], | ||||
|       dialog: { | ||||
|         visibleAdd: false, | ||||
|         visibleDetail: false, | ||||
|         title:'积分代申诉' | ||||
|       }, | ||||
|       dialogInfo: { | ||||
|         users: [], | ||||
|         reportIds:[], | ||||
|         declareDescription: "", | ||||
|         fileList: [], | ||||
|       }, | ||||
|       dialogDetail: { | ||||
|         doType: '1', | ||||
|         ruleId: '', | ||||
|         doIntegral: '', | ||||
|         remark: '', | ||||
|         aduitIds:[], | ||||
|         ruleName:'' | ||||
|       }, | ||||
|       isBatch:false, | ||||
|       rulesList:[], | ||||
|       rowInfo:{}, | ||||
|       formRules: { | ||||
|         users: [{ required: true, message: "请选择人员", trigger: "change" },], | ||||
|         declareDescription: [{ required: true, message: "代申诉说明", trigger: "blur" }], | ||||
|         // fileList: [{ required: true, message: "请上传照片", trigger: "blur" },], | ||||
|         ruleId: [{ required: true, message: "请选择事项", trigger: "blur" }], | ||||
|         doIntegral: [{ required: true, validator: integral, trigger: "blur" }], | ||||
|         doType:[{ required: true, message: "请选择类型", trigger: "change" }] | ||||
|       }, | ||||
|       selectionList:[], | ||||
|       integralEdit:false, | ||||
|       sectionNum:{ | ||||
|         min:null, | ||||
|         max:null | ||||
|       }, | ||||
|       placeholder:'请输入...' | ||||
|     }; | ||||
|   }, | ||||
|   computed:{ | ||||
|       colorList(){ | ||||
|           return { | ||||
|               '0':'#FF8822', | ||||
|               '1':'#2EA222', | ||||
|               '2':'#FF4466' | ||||
|           } | ||||
|       } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict | ||||
|       .load([ | ||||
|         'integralDeclareStatus', | ||||
|         'integralDeclareDoType' | ||||
|       ]).then(() => { | ||||
|         this.getList(); | ||||
|       }); | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appvillagerintegraldeclare/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             ...this.page, | ||||
|              bizType:this.bizType, | ||||
|              areaId:this.areaId | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records; | ||||
|             this.page.total = res.data.total; | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     handleSelectionChange(val){ | ||||
|       this.selectionList=val | ||||
|       this.dialogDetail.aduitIds=[]; | ||||
|         val.forEach(e=>{ | ||||
|             this.dialogDetail.aduitIds.push(e.id); | ||||
|         }) | ||||
|     }, | ||||
|     // getSelect(val){ | ||||
|     //     for(let e of val){ | ||||
|     //         this.dialogInfo.reportIds.push(e.id) | ||||
|     //     } | ||||
|     // }, | ||||
|     getColor(status){ | ||||
|         return this.dict.getColor('integralDeclareStatus', status) | ||||
|     }, | ||||
|     onChange(val){ | ||||
|  | ||||
|     }, | ||||
|     declare(formName){ | ||||
|         this.dialogInfo.reportIds=[]; | ||||
|         for(let e of this.dialogInfo.users){ | ||||
|             this.dialogInfo.reportIds.push(e.id) | ||||
|         }; | ||||
|         this.$refs[formName].validate((valid) => { | ||||
|             if (valid) { | ||||
|                   this.instance.post("/app/appvillagerintegraldeclare/addOrUpdate", { | ||||
|                         ...this.dialogInfo, | ||||
|                          bizType:this.bizType | ||||
|                     }, null).then(res => { | ||||
|                         if (res.code==0) { | ||||
|                             this.dialog.visibleAdd=false; | ||||
|                             this.getList(); | ||||
|                         } | ||||
|                     }) | ||||
|             } else { | ||||
|                 return false; | ||||
|             } | ||||
|         }); | ||||
|     }, | ||||
|     init(formName){ | ||||
|         this.$refs[formName].clearValidate(); | ||||
|         this.dialogDetail = { | ||||
|                             doType: '1', | ||||
|                             ruleId: '', | ||||
|                             doIntegral: '', | ||||
|                             remark: '', | ||||
|                             aduitIds:[], | ||||
|                             ruleName:'' | ||||
|                           } | ||||
|           this.dialogInfo=  { | ||||
|             users: [], | ||||
|             reportIds:[], | ||||
|             declareDescription: "", | ||||
|             fileList: [], | ||||
|           }; | ||||
|           this.rulesList = []; | ||||
|     }, | ||||
|     //批量审核 | ||||
|     batchAduit(){ | ||||
|         this.isBatch=true; | ||||
|         this.rowInfo.status=0; | ||||
|         this.dialog.visibleDetail = true; | ||||
|         this.getRules('1') | ||||
|     }, | ||||
|     getRowDetail(row){ | ||||
|          this.instance.post(`/app/appvillagerintegraldeclare/queryDetailById`, null, { | ||||
|           params: { | ||||
|               id:row.id | ||||
|           }, | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|               this.rowInfo = {...res.data} | ||||
|               this.dialog.visibleDetail = true; | ||||
|               this.dialogDetail.aduitIds=[]; | ||||
|               this.dialogDetail.aduitIds.push(row.id); | ||||
|  | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     toEdit(row) { | ||||
|         this.isBatch=false; | ||||
|         this.getRowDetail(row); | ||||
|         this.getRules('1') | ||||
|     }, | ||||
|     changeDoType(val){ | ||||
|         this.dialogDetail.ruleId=""; | ||||
|         this.dialogDetail.ruleName = ""; | ||||
|         this.dialogDetail.doIntegral = ""; | ||||
|         this.placeholder = '请输入...'; | ||||
|         this.$refs.rules.clearValidate(); | ||||
|         this.getRules(val) | ||||
|     }, | ||||
|     ruleChange(val){ | ||||
|         let item = this.rulesList.find(e => e.id == val); | ||||
|         this.dialogDetail.doIntegral=''; | ||||
|         this.$refs.rules.clearValidate(); | ||||
|         if(item){ | ||||
|           //固定区间 | ||||
|             this.dialogDetail.ruleName = item.ruleName; | ||||
|             if(item.integralValueType==0){ | ||||
|                 this.dialogDetail.doIntegral = Math.abs(item.integral); | ||||
|                 this.integralEdit = true; | ||||
|             }else{ | ||||
|                 this.integralEdit = false; | ||||
|                 if(Math.abs(item.integralEnd)>Math.abs(item.integralStart)){ | ||||
|                     this.sectionNum.min = Math.abs(item.integralStart); | ||||
|                     this.sectionNum.max = Math.abs(item.integralEnd); | ||||
|                 }else{ | ||||
|                     this.sectionNum.max = Math.abs(item.integralStart); | ||||
|                     this.sectionNum.min = Math.abs(item.integralEnd); | ||||
|                 } | ||||
|                 this.placeholder = `${this.sectionNum.min}~${this.sectionNum.max}` | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|     //事项查询 | ||||
|     getRules(integralType){ | ||||
|         this.instance.post(`/app/appvillagerintegralrule/list`, null, { | ||||
|           params: { | ||||
|               integralType, | ||||
|               size:10000000 | ||||
|           }, | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|               this.rulesList = res.data.records.filter(e=> e.ruleStatus == 1); | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     remove(id) { | ||||
|       this.$confirm("确定删除该公文及其相关的流转信息?").then(() => { | ||||
|         this.instance | ||||
|           .post(`/app/appofficialdocumentinfo/delete?ids=${id}`) | ||||
|           .then((res) => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success("删除成功!"); | ||||
|               this.getList(); | ||||
|             } | ||||
|           }); | ||||
|       }); | ||||
|     }, | ||||
|     onReset() { | ||||
|       Object.keys(this.search).forEach(e => { | ||||
|           this.search[e] = ""; | ||||
|       }); | ||||
|       this.search.declareTimeStart = null; | ||||
|       this.search.declareTimeEnd = null; | ||||
|       this.getList(); | ||||
|     }, | ||||
|  | ||||
|     onAdd() { | ||||
|       this.dialog.visibleAdd = true; | ||||
|     }, | ||||
|  | ||||
|     onConfirm(formName) { | ||||
|       this.$refs[formName].validate(v =>{ | ||||
|          if(v){ | ||||
|             this.instance.post("/app/appvillagerintegraldeclare/aduit", { | ||||
|                         ...this.dialogDetail, | ||||
|                 }, null).then(res => { | ||||
|                   if (res.code==0) { | ||||
|                       this.dialog.visibleDetail=false; | ||||
|                       this.$message.success("提交成功!"); | ||||
|                       this.dialogDetail.aduitIds=[]; | ||||
|                       this.getList(); | ||||
|                   } | ||||
|             }) | ||||
|          }else{ | ||||
|             return false | ||||
|          } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|  | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss"> | ||||
| .pointsDeclaration { | ||||
|   height: 100%; | ||||
|   overflow: auto; | ||||
|   background: #f3f6f9; | ||||
|   .times_div{ | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     .times{ | ||||
|       display: block; | ||||
|       width: 72px; | ||||
|       height: 30px; | ||||
|       line-height: 30px; | ||||
|       text-align: center; | ||||
|       background: #F5F5F5; | ||||
|       border-radius: 2px 0px 0px 2px; | ||||
|       border: 1px solid #D0D4DC; | ||||
|       font-size: 14px; | ||||
|       color:#666666; | ||||
|     } | ||||
|   } | ||||
|   .form_content{ | ||||
|     border-bottom:1px solid #eee; | ||||
|     .form_flex{ | ||||
|       display: flex; | ||||
|       div{ | ||||
|         flex: 1; | ||||
|       } | ||||
|     } | ||||
|     .form_info{ | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|     .form_label{ | ||||
|       display: inline-block; | ||||
|       color: #999; | ||||
|       vertical-align: top; | ||||
|     } | ||||
|     .form_value{ | ||||
|       display: inline-block; | ||||
|       color: #333; | ||||
|       width: calc(100% - 80px); | ||||
|     } | ||||
|   } | ||||
|   .form_div{ | ||||
|     padding-top:24px; | ||||
|   } | ||||
|   .status-0 { | ||||
|     color: #ff8822; | ||||
|   } | ||||
|  | ||||
|   .status-1 { | ||||
|     color: #2266ff; | ||||
|   } | ||||
|  | ||||
|   .status-2 { | ||||
|     color: #999999; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,603 +0,0 @@ | ||||
| <template> | ||||
|   <section class="pointsDeclaration"> | ||||
|     <ai-list isTabs> | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template slot="left"> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="onAdd" v-if="$permissions('app_appvillagerintegraldeclare_edit')">代申报</el-button> | ||||
|             <el-button icon="iconfont iconEdit" @click="batchAduit()" :disabled="!Boolean(selectionList.length)"v-if="$permissions('app_appvillagerintegraldeclare_edit')">批量审核</el-button> | ||||
|             <ai-select | ||||
|               v-model="search.status" | ||||
|               @change="page.current = 1, getList()" | ||||
|               placeholder="发布状态" | ||||
|               :selectList="dict.getDict('integralDeclareStatus')"> | ||||
|             </ai-select> | ||||
|             <div class="times_div"> | ||||
|               <p class="times">申报时间</p> | ||||
|               <el-date-picker | ||||
|                 v-model="search.declareTimeStart" | ||||
|                 type="date" | ||||
|                 size="small" | ||||
|                 @change="page.current = 1,getList()" | ||||
|                 value-format="yyyy-MM-dd HH:mm:ss" | ||||
|                 placeholder="开始日期"> | ||||
|               </el-date-picker> | ||||
|               <el-date-picker | ||||
|                 v-model="search.declareTimeEnd" | ||||
|                 type="date" | ||||
|                 size="small" | ||||
|                 @change="page.current = 1,getList()" | ||||
|                 value-format="yyyy-MM-dd HH:mm:ss" | ||||
|                 placeholder="结束日期"> | ||||
|               </el-date-picker> | ||||
|             </div> | ||||
|           </template> | ||||
|           <template slot="right"> | ||||
|             <el-input | ||||
|               v-model="search.familyName" | ||||
|               class="search-input" | ||||
|               size="mini" | ||||
|               placeholder="申诉人/申诉对象/..." | ||||
|               clearable | ||||
|               v-throttle="() => {page.current = 1, getList()}" | ||||
|               @clear="page.current = 1, getList()" | ||||
|               suffix-icon="iconfont iconSearch" /> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="page.total" | ||||
|           :current.sync="page.current" | ||||
|           :size.sync="page.size" | ||||
|           @getList="getList" | ||||
|           @selection-change="handleSelectionChange"> | ||||
|           <el-table-column slot="selection" type="selection" width="55" :selectable="(row, index)=>{ | ||||
|               if(row.status==0){ | ||||
|                 return true | ||||
|               }else{ | ||||
|                 return false | ||||
|               }                   | ||||
|           }"></el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button | ||||
|                   type="text" | ||||
|                   :disabled="row.status === '0' || $permissions('app_appvillagerintegraldeclare_edit')" | ||||
|                   title="编辑" | ||||
|                   @click="toEdit(row)"> | ||||
|                   编辑 | ||||
|                 </el-button> | ||||
|                 <el-button | ||||
|                   type="text" | ||||
|                   :disabled="$permissions('app_appvillagerintegraldeclare_detail')" | ||||
|                   title="详情" | ||||
|                   @click="toEdit(row)"> | ||||
|                   详情 | ||||
|                 </el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog | ||||
|       title="积分代申报" | ||||
|       :visible.sync="dialog.visibleAdd" | ||||
|       :customFooter="true" | ||||
|       :destroyOnClose="true" | ||||
|       width="720px" | ||||
|       @close="init('ruleForm')"> | ||||
|       <div class="form_div"> | ||||
|         <el-form | ||||
|           ref="ruleForm" | ||||
|           :model="dialogInfo" | ||||
|           :rules="formRules" | ||||
|           size="small" | ||||
|           label-suffix=":" | ||||
|           label-width="140px"> | ||||
|           <el-form-item label="代申报家庭" prop="users">             | ||||
|             <ai-person-select :customClicker="true" :isMultiple="true" :chooseUserList.sync="dialogInfo.users" :instance="instance" url="/app/appvillagerintegralfamilymember/list" > | ||||
|               <template name="option" v-slot:option="{ item }"> | ||||
|                 <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|                 <ai-id mode="show" :show-eyes="false" :value="item.idNumber" /> | ||||
|               </template> | ||||
|             </ai-person-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="代申报说明" prop="declareDescription"> | ||||
|             <el-input type="textarea" :rows="3" placeholder="请输入…" maxlength="100" show-word-limit v-model="dialogInfo.declareDescription"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="照片" prop="fileList"> | ||||
|             <div class="upload"> | ||||
|               <ai-uploader :instance="instance" v-model="dialogInfo.fileList" :limit="9" ></ai-uploader> | ||||
|             </div> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </div> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="dialog.visibleAdd=false" size="medium">取消</el-button> | ||||
|         <el-button @click="declare('ruleForm')" type="primary" size="medium">提交</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|     <ai-dialog | ||||
|       title="申报审核" | ||||
|       :visible.sync="dialog.visibleDetail" | ||||
|       :customFooter="true" | ||||
|       :destroyOnClose="true" | ||||
|       width="720px" | ||||
|       @close="init('rules')"> | ||||
|       <div class="form_content" v-if="!isBatch"> | ||||
|         <div class="form_flex form_info"> | ||||
|           <div> | ||||
|             <span class="form_label">申报人:</span> | ||||
|             <span class="form_value">{{rowInfo.declareName}}</span> | ||||
|           </div> | ||||
|           <div> | ||||
|             <span class="form_label">申报对象:</span> | ||||
|             <span class="form_value">{{rowInfo.declareObjName}}</span> | ||||
|           </div> | ||||
|           <div> | ||||
|             <span class="form_label">户主:</span> | ||||
|             <span class="form_value">{{rowInfo.familyName}}</span> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">申报说明:</span> | ||||
|           <span class="form_value">{{rowInfo.declareDescription}}</span> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">申报时间:</span> | ||||
|           <span class="form_value">{{rowInfo.declareTime}}</span> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">照片:</span> | ||||
|           <span class="form_value"> | ||||
|               <ai-uploader  :disabled="true" :instance="instance" v-model="rowInfo.fileList" :limit="9" ></ai-uploader> | ||||
|           </span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="form_div"> | ||||
|         <el-form | ||||
|           ref="rules" | ||||
|           :model="dialogDetail" | ||||
|           :rules="formRules" | ||||
|           size="small" | ||||
|           label-suffix=":" | ||||
|           v-show="rowInfo.status==0" | ||||
|           label-width="90px" | ||||
|         > | ||||
|           <el-form-item label="类型" prop="doType"> | ||||
|             <el-radio-group v-model="dialogDetail.doType" @change="changeDoType"> | ||||
|               <el-radio label="1">加分</el-radio> | ||||
|               <el-radio label="0">扣分</el-radio> | ||||
|               <el-radio label="2">拒绝</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="事项" prop="ruleId" v-if='dialogDetail.doType!=2'> | ||||
|             <el-select v-model="dialogDetail.ruleId" placeholder="请选择..." @change="ruleChange"> | ||||
|                   <el-option | ||||
|                       v-for="(item,i) in rulesList" | ||||
|                       :key="i" | ||||
|                       :label="item.ruleName" | ||||
|                       :value="item.id" | ||||
|                   ></el-option> | ||||
|             </el-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="积分" prop="doIntegral" v-if='dialogDetail.doType!=2'> | ||||
|             <el-col :span="1.5" style="margin-right: 8px;">{{dialogDetail.doType==0? '减少' :'增加'}}</el-col> | ||||
|             <el-col :span="6" style="margin-right: 8px;width:120px;"><el-input type="number" v-model="dialogDetail.doIntegral" :placeholder="placeholder" :disabled="integralEdit"></el-input></el-col> | ||||
|             <el-col :span="1" style="margin-right: 8px;">分</el-col>             | ||||
|           </el-form-item> | ||||
|           <el-form-item label="备注说明"> | ||||
|             <el-input type="textarea" :rows="3" maxlength="100" placeholder="请输入…" show-word-limit v-model="dialogDetail.remark"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|         <ai-wrapper | ||||
|             label-width="70px" | ||||
|             v-if="rowInfo.status!=0" | ||||
|             :columnsNumber="1"> | ||||
|             <ai-info-item label="类型:"><span  :style="{color:colorList[rowInfo.status]}" >{{dict.getLabel('integralDeclareStatus', rowInfo.status)}}</span></ai-info-item> | ||||
|             <ai-info-item label="事项:" v-if='rowInfo.doType!=2'><span >{{rowInfo.ruleName}}</span></ai-info-item> | ||||
|             <ai-info-item label="积分:" v-if='rowInfo.doType!=2'>{{rowInfo.doType==0? '减少' :'增加'}}<span style="color:#2266FF">{{Math.abs(rowInfo.doIntegral)}}</span>分</ai-info-item> | ||||
|             <ai-info-item label="备注说明:"><span>{{rowInfo.remark||'-'}}</span></ai-info-item> | ||||
|         </ai-wrapper> | ||||
|       </div> | ||||
|       <div class="dialog-footer" slot="footer" v-if="rowInfo.status==0"> | ||||
|         <el-button @click="dialog.visibleDetail=false" size="medium">取消</el-button> | ||||
|         <el-button @click="onConfirm('rules')" type="primary" size="medium">提交</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex'; | ||||
| export default { | ||||
|   name: "pointsDeclaration", | ||||
|  | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     bizType:String, | ||||
|     areaId:String | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|      var integral = (rule, value, callback) => { | ||||
|       if (value) { | ||||
|         if (/^[1-9]\d*$/.test(value)) { | ||||
|           if(!this.integralEdit){ | ||||
|               if(Number(value)>=this.sectionNum.min&&Number(value)<=this.sectionNum.max){ | ||||
|                   callback(); | ||||
|               }else{ | ||||
|                   callback(new Error(`请输入${this.sectionNum.min}至${this.sectionNum.max}之间的正整数积分`)); | ||||
|               } | ||||
|           }else{ | ||||
|             callback(); | ||||
|           } | ||||
|            | ||||
|         } else { | ||||
|           callback(new Error('请输入正整数')); | ||||
|         } | ||||
|       } else { | ||||
|           callback(new Error('请输入正整数')); | ||||
|       } | ||||
|     }; | ||||
|     return { | ||||
|       search: { | ||||
|           status:'', | ||||
|           familyName:'', | ||||
|           declareTimeStart:null, | ||||
|           declareTimeEnd:null | ||||
|       }, | ||||
|       page:{ | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total:0 | ||||
|       }, | ||||
|       colConfigs: [ | ||||
|         { slot: "selection", label: "" }, | ||||
|         { prop: "declareName", label: "申报人", align: "center" }, | ||||
|         { prop: "declareObjName", label: "申报对象", align: "center",hide:this.bizType==1 }, | ||||
|         { | ||||
|           prop: "familyName", | ||||
|           label: "户主", | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareDescription", | ||||
|           label: "申诉说明", | ||||
|           align: "left", | ||||
|           width:300 | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareTime", | ||||
|           label: "申报时间", | ||||
|           align: "left", | ||||
|           width:150 | ||||
|         }, | ||||
|         { | ||||
|           prop: "declareName", | ||||
|           label: "操作人", | ||||
|           align: "center", | ||||
|         }, | ||||
|         { | ||||
|           prop: "status", | ||||
|           label: "状态", | ||||
|           align: "center", | ||||
|           render: (h, {row}) => { | ||||
|               return h('span', {style: {color: this.dict.getColor('integralDeclareStatus', row.status)}}, this.dict.getLabel('integralDeclareStatus', row.status)) | ||||
|           }, | ||||
|         }, | ||||
|         { slot: "options", label: "操作", align: "center" }, | ||||
|       ], | ||||
|       tableData: [], | ||||
|       dialog: { | ||||
|         visibleAdd: false, | ||||
|         visibleDetail: false, | ||||
|         title:'积分代申报' | ||||
|       }, | ||||
|       dialogInfo: { | ||||
|         users: [], | ||||
|         reportIds:[], | ||||
|         declareDescription: "", | ||||
|         fileList: [], | ||||
|       }, | ||||
|       dialogDetail: { | ||||
|         doType: '1', | ||||
|         ruleId: '', | ||||
|         doIntegral: '', | ||||
|         remark: '', | ||||
|         aduitIds:[], | ||||
|         ruleName:'' | ||||
|       }, | ||||
|       isBatch:false, | ||||
|       rulesList:[], | ||||
|       rowInfo:{}, | ||||
|       formRules: { | ||||
|         users: [{ required: true, message: "请选择人员", trigger: "change" },], | ||||
|         declareDescription: [{ required: true, message: "代申报说明", trigger: "blur" }], | ||||
|         // fileList: [{ required: true, message: "请上传照片", trigger: "blur" },], | ||||
|         ruleId: [{ required: true, message: "请选择事项", trigger: "blur" }], | ||||
|         doIntegral: [{ required: true, validator: integral, trigger: "blur" }], | ||||
|         doType:[{ required: true, message: "请选择类型", trigger: "change" }] | ||||
|       }, | ||||
|       selectionList:[], | ||||
|       integralEdit:false, | ||||
|       sectionNum:{ | ||||
|         min:null, | ||||
|         max:null | ||||
|       }, | ||||
|       placeholder:'请输入...' | ||||
|     }; | ||||
|   }, | ||||
|   computed:{ | ||||
|       colorList(){ | ||||
|           return { | ||||
|               '0':'#FF8822', | ||||
|               '1':'#2EA222', | ||||
|               '2':'#FF4466' | ||||
|           } | ||||
|       } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict | ||||
|       .load([ | ||||
|         'integralDeclareStatus', | ||||
|         'integralDeclareDoType' | ||||
|       ]).then(() => { | ||||
|         this.getList(); | ||||
|       }); | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appvillagerintegraldeclare/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             ...this.page, | ||||
|              bizType:this.bizType, | ||||
|              areaId:this.areaId | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records; | ||||
|             this.page.total = res.data.total; | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     handleSelectionChange(val){ | ||||
|       this.selectionList=val | ||||
|       this.dialogDetail.aduitIds=[]; | ||||
|         val.forEach(e=>{ | ||||
|             this.dialogDetail.aduitIds.push(e.id); | ||||
|         }) | ||||
|     }, | ||||
|     // getSelect(val){ | ||||
|     //     for(let e of val){ | ||||
|     //         this.dialogInfo.reportIds.push(e.id) | ||||
|     //     } | ||||
|     // }, | ||||
|     getColor(status){ | ||||
|         return this.dict.getColor('integralDeclareStatus', status) | ||||
|     }, | ||||
|     onChange(val){ | ||||
|  | ||||
|     }, | ||||
|     declare(formName){ | ||||
|         this.dialogInfo.reportIds=[]; | ||||
|         for(let e of this.dialogInfo.users){ | ||||
|             this.dialogInfo.reportIds.push(e.id) | ||||
|         }; | ||||
|         this.$refs[formName].validate((valid) => { | ||||
|             if (valid) { | ||||
|                   this.instance.post("/app/appvillagerintegraldeclare/addOrUpdate", { | ||||
|                         ...this.dialogInfo, | ||||
|                          bizType:this.bizType | ||||
|                     }, null).then(res => { | ||||
|                         if (res.code==0) { | ||||
|                             this.dialog.visibleAdd=false; | ||||
|                             this.getList(); | ||||
|                         } | ||||
|                     }) | ||||
|             } else { | ||||
|                 return false; | ||||
|             } | ||||
|         }); | ||||
|     }, | ||||
|     init(formName){ | ||||
|         this.$refs[formName].clearValidate(); | ||||
|         this.dialogDetail = { | ||||
|                             doType: '1', | ||||
|                             ruleId: '', | ||||
|                             doIntegral: '', | ||||
|                             remark: '', | ||||
|                             aduitIds:[], | ||||
|                             ruleName:'' | ||||
|                           } | ||||
|           this.dialogInfo=  { | ||||
|             users: [], | ||||
|             reportIds:[], | ||||
|             declareDescription: "", | ||||
|             fileList: [], | ||||
|           }; | ||||
|           this.rulesList = []; | ||||
|     }, | ||||
|     //批量审核 | ||||
|     batchAduit(){ | ||||
|         this.isBatch=true; | ||||
|         this.rowInfo.status=0; | ||||
|         this.dialog.visibleDetail = true; | ||||
|         this.getRules('1') | ||||
|     }, | ||||
|     getRowDetail(row){ | ||||
|          this.instance.post(`/app/appvillagerintegraldeclare/queryDetailById`, null, { | ||||
|           params: { | ||||
|               id:row.id | ||||
|           }, | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|               this.rowInfo = {...res.data} | ||||
|               this.dialog.visibleDetail = true; | ||||
|               this.dialogDetail.aduitIds=[]; | ||||
|               this.dialogDetail.aduitIds.push(row.id); | ||||
|  | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     toEdit(row) { | ||||
|         this.isBatch=false; | ||||
|         this.getRowDetail(row); | ||||
|         this.getRules('1') | ||||
|     }, | ||||
|     changeDoType(val){ | ||||
|         this.dialogDetail.ruleId=""; | ||||
|         this.dialogDetail.ruleName = ""; | ||||
|         this.dialogDetail.doIntegral = ""; | ||||
|         this.placeholder = '请输入...'; | ||||
|         this.$refs.rules.clearValidate(); | ||||
|         this.getRules(val) | ||||
|     }, | ||||
|     ruleChange(val){ | ||||
|         let item = this.rulesList.find(e => e.id == val); | ||||
|         this.dialogDetail.doIntegral=''; | ||||
|         this.$refs.rules.clearValidate(); | ||||
|         if(item){ | ||||
|           //固定区间 | ||||
|             this.dialogDetail.ruleName = item.ruleName; | ||||
|             if(item.integralValueType==0){ | ||||
|                 this.dialogDetail.doIntegral = Math.abs(item.integral); | ||||
|                 this.integralEdit = true; | ||||
|             }else{ | ||||
|                 this.integralEdit = false; | ||||
|                 if(Math.abs(item.integralEnd)>Math.abs(item.integralStart)){ | ||||
|                     this.sectionNum.min = Math.abs(item.integralStart); | ||||
|                     this.sectionNum.max = Math.abs(item.integralEnd); | ||||
|                 }else{ | ||||
|                     this.sectionNum.max = Math.abs(item.integralStart); | ||||
|                     this.sectionNum.min = Math.abs(item.integralEnd); | ||||
|                 } | ||||
|                 this.placeholder = `${this.sectionNum.min}~${this.sectionNum.max}` | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|     //事项查询 | ||||
|     getRules(integralType){ | ||||
|         this.instance.post(`/app/appvillagerintegralrule/list`, null, { | ||||
|           params: { | ||||
|               integralType, | ||||
|               size:10000000 | ||||
|           }, | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|               this.rulesList = res.data.records.filter(e=> e.ruleStatus == 1); | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|     remove(id) { | ||||
|       this.$confirm("确定删除该公文及其相关的流转信息?").then(() => { | ||||
|         this.instance | ||||
|           .post(`/app/appofficialdocumentinfo/delete?ids=${id}`) | ||||
|           .then((res) => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success("删除成功!"); | ||||
|               this.getList(); | ||||
|             } | ||||
|           }); | ||||
|       }); | ||||
|     }, | ||||
|     onReset() { | ||||
|       Object.keys(this.search).forEach(e => { | ||||
|           this.search[e] = ""; | ||||
|       }); | ||||
|       this.search.declareTimeStart = null; | ||||
|       this.search.declareTimeEnd = null; | ||||
|       this.getList(); | ||||
|     }, | ||||
|  | ||||
|     onAdd() { | ||||
|       this.dialog.visibleAdd = true; | ||||
|     }, | ||||
|  | ||||
|     onConfirm(formName) { | ||||
|       this.$refs[formName].validate(v =>{ | ||||
|          if(v){ | ||||
|             this.instance.post("/app/appvillagerintegraldeclare/aduit", { | ||||
|                         ...this.dialogDetail, | ||||
|                 }, null).then(res => { | ||||
|                   if (res.code==0) { | ||||
|                       this.dialog.visibleDetail=false; | ||||
|                       this.$message.success("提交成功!"); | ||||
|                       this.dialogDetail.aduitIds=[]; | ||||
|                       this.getList(); | ||||
|                   } | ||||
|             }) | ||||
|          }else{ | ||||
|             return false | ||||
|          } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|  | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss"> | ||||
| .pointsDeclaration { | ||||
|   height: 100%; | ||||
|   overflow: auto; | ||||
|   background: #f3f6f9; | ||||
|   .times_div{ | ||||
|         .times{ | ||||
|             display: block; | ||||
|             width: 72px; | ||||
|             height: 30px; | ||||
|             line-height: 30px; | ||||
|             text-align: center; | ||||
|             background: #F5F5F5; | ||||
|             border-radius: 2px 0px 0px 2px; | ||||
|             border: 1px solid #D0D4DC; | ||||
|             font-size: 14px; | ||||
|             color:#666666; | ||||
|         } | ||||
|     } | ||||
|   .form_content{ | ||||
|     border-bottom:1px solid #eee; | ||||
|     .form_flex{ | ||||
|       display: flex; | ||||
|       div{ | ||||
|         flex: 1; | ||||
|       } | ||||
|     } | ||||
|     .form_info{ | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|     .form_label{ | ||||
|       display: inline-block; | ||||
|       color: #999; | ||||
|       vertical-align: top; | ||||
|     } | ||||
|     .form_value{ | ||||
|       display: inline-block; | ||||
|       color: #333; | ||||
|       width: calc(100% - 80px); | ||||
|     } | ||||
|   } | ||||
|   .form_div{ | ||||
|     padding-top:24px; | ||||
|   } | ||||
|   .status-0 { | ||||
|     color: #ff8822; | ||||
|   } | ||||
|  | ||||
|   .status-1 { | ||||
|     color: #2266ff; | ||||
|   } | ||||
|  | ||||
|   .status-2 { | ||||
|     color: #999999; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,265 +0,0 @@ | ||||
| <template> | ||||
|   <section class="pointsDetails"> | ||||
|     <ai-list isTabs> | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template slot="left"> | ||||
|             <el-date-picker size="small" v-model="searchDotime" type="daterange"  range-separator="至" @change="timeChange" | ||||
|               start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd"></el-date-picker> | ||||
|           </template> | ||||
|           <template slot="right"> | ||||
|             <el-input | ||||
|               v-model="search.familyName" | ||||
|               class="search-input" | ||||
|               size="small" | ||||
|               placeholder="对象、户主、事件类型" | ||||
|               clearable | ||||
|               v-throttle="() => {search.current = 1, getList()}" | ||||
|               @clear="search.current = 1, getList()" | ||||
|               suffix-icon="iconfont iconSearch" /> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="total" | ||||
|           ref="aitableex" | ||||
|           :current.sync="search.current" | ||||
|           :size.sync="search.size" | ||||
|           @getList="getList"> | ||||
|           <el-table-column slot="changeIntegral" label="积分" align= "center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <span>{{row.changeIntegral > 0 ? '+' : ''}}{{row.changeIntegral}}</span> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="doType" label="类型" align= "center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <span>{{ dict.getLabel('integralDetailType', row.bizType) }}</span> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" align="center" fixed="right" width="120"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button | ||||
|                 type="text" | ||||
|                 title="详情" | ||||
|                 :disabled="!$permissions('app_appvillagerintegraldetail_detail')" | ||||
|                 @click="viewItem(row)"> | ||||
|                 详情 | ||||
|               </el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog | ||||
|       title="详情" | ||||
|       :visible.sync="dialog.visible" | ||||
|       :customFooter="true" | ||||
|       :destroyOnClose="true" | ||||
|       width="720px" | ||||
|     > | ||||
|       <div class="form_content"> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">户主:</span> | ||||
|           <span class="form_value">{{dialogInfo.familyName}}</span> | ||||
|         </div> | ||||
|         <div class="form_info"> | ||||
|           <span class="form_label">事项:</span> | ||||
|           <span class="form_value">{{dialogInfo.ruleName}}</span> | ||||
|         </div> | ||||
|         <div class="form_flex form_info"> | ||||
|           <div> | ||||
|             <span class="form_label">积分:</span> | ||||
|             <span class="form_value">{{dialogInfo.changeIntegral >= 0 ? '增加' : '减少'}}<span style="color:#2266FF">{{Math.abs(dialogInfo.changeIntegral)}}</span>分</span> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="dialog-footer" slot="footer"> | ||||
|         <el-button @click="dialog.visible=false" size="medium">关闭</el-button> | ||||
|       </div> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "pointsDeclaration", | ||||
|  | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     areaId:String | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       searchDotime: [], | ||||
|       search: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         familyName: '', | ||||
|         doTimeStart: null, | ||||
|         doTimeEnd: null | ||||
|       }, | ||||
|       total: 10, | ||||
|       colConfigs: [ | ||||
|         { prop: "residentName", label: "对象", width:160 }, | ||||
|         { prop: "familyName", label: "户主", align: "center", width:160 }, | ||||
|         { | ||||
|           prop: "ruleName", | ||||
|           label: "事件类型", | ||||
|           "show-overflow-tooltip": true, | ||||
|           width:420 | ||||
|         }, | ||||
|         { | ||||
|           prop: "doTime", | ||||
|           label: "时间", | ||||
|           width:200 | ||||
|         }, | ||||
|         // { | ||||
|         //   prop: "doType", | ||||
|         //   label: "类型", | ||||
|         //   align: "center", | ||||
|         //   width: 100, | ||||
|         //   render: (h, params) => { | ||||
|         //     return h( | ||||
|         //       "span", | ||||
|         //       { | ||||
|         //         class: "status-" + params.row.doType, | ||||
|         //       }, | ||||
|         //       this.$dict.getLabel("integralIntegralType", params.row.doType) | ||||
|         //     ); | ||||
|         //   }, | ||||
|         // }, | ||||
|         { slot: "doType", label: "类型", width: 100}, | ||||
|         { slot: "changeIntegral", label: "积分", width: 100}, | ||||
|         // { | ||||
|         //   prop: "bizType", | ||||
|         //   label: "途径", | ||||
|         //   align: "center", | ||||
|         //   width: 100, | ||||
|         //   formart: (bizType) => | ||||
|         //   this.$dict.getLabel("integralDetailBizType", bizType) || '-', | ||||
|         // }, | ||||
|         { slot: "options", label: "操作", align: "center" }, | ||||
|       ], | ||||
|       tableData: [], | ||||
|       dialog: { | ||||
|         visible: false, | ||||
|       }, | ||||
|       dialogInfo: {}, | ||||
|     }; | ||||
|   }, | ||||
|  | ||||
|   mounted() { | ||||
|     this.$dict | ||||
|       .load([ | ||||
|         "integralDeclareDoType", | ||||
|         "integralDetailType", | ||||
|       ]) | ||||
|       .then(() => { | ||||
|         this.getList(); | ||||
|       }); | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance | ||||
|         .post(`/app/appvillagerintegraldetail/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             areaId: this.areaId, | ||||
|           }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records; | ||||
|             this.total = res.data.total; | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|  | ||||
|     timeChange() { | ||||
|       if(this.searchDotime) { | ||||
|         this.search.doTimeStart =  this.searchDotime[0] | ||||
|         this.search.doTimeEnd = this.searchDotime[1] | ||||
|       }else { | ||||
|         this.search.doTimeStart =  null | ||||
|         this.search.doTimeEnd = null | ||||
|       } | ||||
|       this.search.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     viewItem(row) { | ||||
|       this.dialog.visible = true | ||||
|       this.instance.post(`/app/appvillagerintegraldetail/queryDetailById?id=${row.id}`, null, {}).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.dialogInfo = res.data | ||||
|             console.log(this.dialogInfo) | ||||
|           } | ||||
|         }); | ||||
|     }, | ||||
|  | ||||
|     onReset() { | ||||
|       this.search.current = 1 | ||||
|       this.search.doTimeStart =  null | ||||
|       this.search.doTimeEnd = null | ||||
|       this.search.familyName = '' | ||||
|       this.searchDotime = [] | ||||
|       this.getList(); | ||||
|     }, | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss"> | ||||
| .pointsDetails { | ||||
|   height: 100%; | ||||
|   background: #f3f6f9; | ||||
|   overflow: auto; | ||||
|   .form_content { | ||||
|     .form_flex { | ||||
|       display: flex; | ||||
|       div { | ||||
|         flex: 1; | ||||
|       } | ||||
|     } | ||||
|     .form_info { | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|     .form_label { | ||||
|       display: inline-block; | ||||
|       color: #999; | ||||
|       vertical-align: top; | ||||
|       width: 70px; | ||||
|       text-align: right; | ||||
|     } | ||||
|     .form_value { | ||||
|       display: inline-block; | ||||
|       color: #333; | ||||
|       width: calc(100% - 70px); | ||||
|       // img { | ||||
|       //   width: 100px; | ||||
|       //   height: 100px; | ||||
|       //   margin: 0 8px 8px 0; | ||||
|       // } | ||||
|     } | ||||
|   } | ||||
|   .form_div { | ||||
|     padding-top: 24px; | ||||
|     border-top: 1px solid #eee; | ||||
|   } | ||||
|   .status-0 { | ||||
|     color: #FF4466; | ||||
|   } | ||||
|  | ||||
|   .status-1 { | ||||
|     color: #2EA222; | ||||
|   } | ||||
|  | ||||
|   .status-2 { | ||||
|     color: #999999; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,176 +0,0 @@ | ||||
| <template> | ||||
|   <div class="scoreChange"> | ||||
|     <ai-list isTabs> | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template slot="left"> | ||||
|             <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 | ||||
|             :tableData="tableData" | ||||
|             :col-configs="colConfigs" | ||||
|             :total="page.total" | ||||
|             :current.sync="page.current" | ||||
|             :size.sync="page.size" | ||||
|             @getList="getList"> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <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="residentId"> | ||||
|           <ai-person-select :instance="instance" :customClicker="true" | ||||
|                             :url="'/app/appresident/list?areaId=' + user.info.areaId" | ||||
|                             :isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson"> | ||||
|             <template name="option" v-slot:option="{ item }"> | ||||
|               <span class="iconfont iconProlife">{{ item.name }}</span> | ||||
|               <ai-id mode="show" :show-eyes="false" :value="item.idNumber"/> | ||||
|             </template> | ||||
|           </ai-person-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="调整说明" prop="description"> | ||||
|           <el-input v-model.trim="form.description" placeholder="请输入..." type="textarea" :rows="4" show-word-limit | ||||
|                     maxlength="100"></el-input> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="类型" prop="doType"> | ||||
|           <el-radio-group v-model="form.doType"> | ||||
|             <el-radio label="0">加分</el-radio> | ||||
|             <el-radio label="1">减分</el-radio> | ||||
|           </el-radio-group> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="积分" prop="changeIntegral"> | ||||
|           <el-input v-model.trim.num="form.changeIntegral" placeholder="请输入正整数" size="small"></el-input> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex" | ||||
|  | ||||
| export default { | ||||
|   name: "scoreChange", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function, | ||||
|     areaId: String | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       tableData: [], | ||||
|       page: { | ||||
|         current: 1, | ||||
|         size: 10, | ||||
|         total: 10 | ||||
|       }, | ||||
|       form: {}, | ||||
|       dialog: false, | ||||
|       personList: [], | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(["user"]), | ||||
|     rules() { | ||||
|       return { | ||||
|         residentId: [{required: true, message: '请选择人员', trigger: 'blur'},], | ||||
|         description: [{required: true, message: '请输入调整说明', trigger: 'blur'},], | ||||
|         doType: [{required: true, message: '请输入调整说明', trigger: 'change'},], | ||||
|         changeIntegral: [ | ||||
|           { | ||||
|             required: true, validator: (rule, value, callback) => { | ||||
|               if (!/^[1-9]\d*$/.test(value)) { | ||||
|                 callback(new Error('请输入正整数')) | ||||
|               } else { | ||||
|                 callback(); | ||||
|               } | ||||
|             }, trigger: 'blur' | ||||
|           },], | ||||
|       } | ||||
|     }, | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {prop: "residentName", label: "姓名"}, | ||||
|         {prop: "description", label: "调整说明"}, | ||||
|         { | ||||
|           prop: "changeIntegral", label: "类型", align: "center", | ||||
|           render: (h, {row}) => [< span> {+row.changeIntegral > 0 ? "加分" : '减分' | ||||
|           } < /span>] | ||||
|         }, | ||||
|         { | ||||
|           prop: "changeIntegral", | ||||
|           label: "积分", | ||||
|           align: "center", | ||||
|           render: (h, {row}) => [ | ||||
|             <span>{row.changeIntegral > 0 ? `+${row.changeIntegral}` : `${row.changeIntegral}`}</span>] | ||||
|         }, | ||||
|         {prop: "doTime", label: "操作时间"}, | ||||
|         {prop: "declareObjName", label: "操作人", align: "center"}, | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     selectPerson(val) { | ||||
|       if (val) { | ||||
|         this.form.residentId = val.id | ||||
|         this.personList = [{...val}] | ||||
|       } else { | ||||
|         this.form.residentId = "" | ||||
|         this.personList = [] | ||||
|       } | ||||
|     }, | ||||
|     onConfirm() { | ||||
|       this.$refs['form'].validate(valid => { | ||||
|         if (valid) { | ||||
|           this.instance.post(`/app/appvillagerintegraldetail/changeIntegral`, { | ||||
|             ...this.form, | ||||
|             changeIntegral: this.form.doType == 0 ? `+${this.form.changeIntegral}` : `-${this.form.changeIntegral}` | ||||
|           }).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success("添加成功") | ||||
|               this.dialog = false | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appvillagerintegraldetail/list`, null, { | ||||
|         params: { | ||||
|           ...this.page, | ||||
|           areaId: this.areaId, | ||||
|           doType: 2 | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .scoreChange { | ||||
|   height: 100%; | ||||
|   overflow: auto; | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user