整合工程
This commit is contained in:
		| @@ -1,354 +0,0 @@ | ||||
| <template> | ||||
|   <ai-list class="AppPartyPayment"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="党费缴纳" isShowBottomBorder :instance="instance"></ai-title> | ||||
|     </template> | ||||
|     <template #content> | ||||
|       <div class="statistics-top"> | ||||
|         <div class="statistics-top__item"> | ||||
|           <span>本月已缴纳党费金额</span> | ||||
|           <h2 style="color: #2266FF;">{{ topTotal['本月缴纳党费'] || 0 }}</h2> | ||||
|         </div> | ||||
|         <div class="statistics-top__item"> | ||||
|           <span>本月已缴纳人数</span> | ||||
|           <h2 style="color: #22AA99;">{{ topTotal['本月已缴纳人数'] || 0  }}</h2> | ||||
|         </div> | ||||
|         <div class="statistics-top__item"> | ||||
|           <span>本月未缴纳党费金额</span> | ||||
|           <h2 style="color: #F8B425">{{ topTotal['本月未缴纳党费'] || 0 }}</h2> | ||||
|         </div> | ||||
|         <div class="statistics-top__item"> | ||||
|           <span>本月未缴纳人数</span> | ||||
|           <h2 style="color: #999;">{{ topTotal['本月未缴纳人数'] || 0 }}</h2> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="content"> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <ai-party :instance="instance" v-model="search.partyOrgId" :topOrgId="topOrgId" :name.sync="search.partyOrgName" | ||||
|                     style="display:inline-block" @origin="handlePartyOrgSelect" customClicker | ||||
|                     url="/app/partyOrganization/queryAllChildren"> | ||||
|               <el-input size="small" v-model="search.partyOrgName" readonly placeholder="选择党组织"></el-input> | ||||
|             </ai-party> | ||||
|             <el-date-picker v-model="search.ymd" type="month" placeholder="选择日期" size="small" value-format="yyyy-MM" @change="getListInit"></el-date-picker> | ||||
|             <ai-select | ||||
|               v-model="search.status" | ||||
|               @change="getListInit()" | ||||
|               placeholder="状态" | ||||
|               :selectList="dict.getDict('zhishengPartyFeeRecordStatus')"> | ||||
|             </ai-select> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" v-model="search.name" placeholder="姓名/身份证" | ||||
|               suffix-icon="iconfont iconSearch" v-throttle="() => {getListInit()}" clearable @clear="search.name = '', getListInit()"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">新增</el-button> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <ai-import :instance="instance" :dict="dict" type="appconvenientaddressbook" name="党费缴纳" | ||||
|               @success="getListInit()" importUrl="/app/appdfjnzhisheng/import" url="/app/appdfjnzhisheng/downloadTemplate"> | ||||
|               <el-button icon="iconfont iconImport">导入</el-button> | ||||
|             </ai-import> | ||||
|             <ai-download :instance="instance" url="/app/appdfjnzhisheng/export" :params="search" fileName="党费缴纳" | ||||
|               :disabled="tableData.length == 0"> | ||||
|               <el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button> | ||||
|             </ai-download> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="total" | ||||
|           :current.sync="search.current" | ||||
|           :size.sync="search.size" | ||||
|           @getList="getList"> | ||||
|           <el-table-column slot="option" label="操作" align="center" width="160px" fixed="right"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" title="编辑" @click="edit(row)">编辑</el-button> | ||||
|                 <el-button type="text" title="删除" @click="remove(row)">删除</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </div> | ||||
|       <ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="$refs.form.resetFields()" @onConfirm="handlePayment"> | ||||
|         <el-form ref="form" :rules="rules" size="small" :model="form" label-width="80px"> | ||||
|           <el-form-item label="党员姓名" prop="name"> | ||||
|             <el-autocomplete ref="poiInput" v-model="form.name" size="small" clearable :fetch-suggestions="handleSearch" | ||||
|               placeholder="请输入党员姓名" @select="handleSelect" :trigger-on-focus="false" style="width:100%;"> | ||||
|               <template slot-scope="{item}"> | ||||
|                 <span style="direction: rtl" v-text="`${item.name}-${item.partyOrgName}(${item.idNumber})`"/> | ||||
|               </template> | ||||
|             </el-autocomplete>  | ||||
|           </el-form-item> | ||||
|           <el-form-item label="身份证号" prop="idNumber"> | ||||
|             <el-input placeholder="自动带入" v-model="form.idNumber" :disabled="true" size="small"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="缴纳状态" prop="status"> | ||||
|             <el-radio-group v-model="form.status"> | ||||
|               <el-radio label="1">已缴纳</el-radio> | ||||
|               <el-radio label="0">未缴纳</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="缴纳月份" prop="ymd"> | ||||
|             <el-date-picker v-model="form.ymd" type="month" placeholder="选择年月" size="small" value-format="yyyy-MM"></el-date-picker> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="金额(元)" prop="amount"> | ||||
|             <el-input-number :precision="2" size="small" type="input" v-model="form.amount" clearable placeholder="2位小数"></el-input-number> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import {mapState} from 'vuex' | ||||
|   export default { | ||||
|     name: 'AppPartyPayment', | ||||
|     label: '党费缴纳', | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|     data () { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           partyOrgId: '', | ||||
|           partyOrgName: '', | ||||
|           name: '', | ||||
|           status: '', | ||||
|           ymd: '' | ||||
|         }, | ||||
|         total: 0, | ||||
|         tableData: [], | ||||
|         colConfigs: [ | ||||
|           { prop: 'orgName', label: '党组织' }, | ||||
|           { prop: 'name', label: '党员姓名', align: 'center',  }, | ||||
|           { prop: 'idNumber', label: '身份证', align: 'center' }, | ||||
|           { prop: 'ymd', label: '缴纳月份', align: 'center' }, | ||||
|           { prop: 'amount', label: '缴纳党费', align: 'center' }, | ||||
|           { prop: 'status', label: '状态', align: 'center',format: v => this.dict.getLabel('zhishengPartyFeeRecordStatus', v)}, | ||||
|           { slot: 'option'} | ||||
|         ], | ||||
|         topOrgId: '', | ||||
|         dialog: false, | ||||
|         dialogTitle: '', | ||||
|         form: { | ||||
|           name: '', | ||||
|           idNumber: '', | ||||
|           status: '0', | ||||
|           ymd: '', | ||||
|           amount: '', | ||||
|           orgId: '', | ||||
|           orgName: '', | ||||
|           partyId: '' | ||||
|         }, | ||||
|         topTotal: {} | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       params () { | ||||
|         return { | ||||
|           ...this.search, | ||||
|           startTime: this.search.type === '3' ? this.date[0] : '', | ||||
|           endTime: this.search.type === '3' ? this.date[1] : '' | ||||
|         } | ||||
|       }, | ||||
|       rules() { | ||||
|         return { | ||||
|           name: [{ required: true, message: '请输入党员姓名', trigger: 'change'}], | ||||
|           idNumber: [{ required: true, message: '请选择党员', trigger: 'change'}], | ||||
|           status: [{ required: true, message: '请选择缴费状态', trigger: 'change'}], | ||||
|           ymd: [{ required: true, message: '请选择缴纳月份', trigger: 'change'}], | ||||
|           amount: [{ required: true, message: '请输入金额', trigger: 'blur'}], | ||||
|         } | ||||
|       }, | ||||
|       ...mapState(['user']), | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.topOrgId = this.user.info.organizationId | ||||
|       this.dict.load('zhishengPartyFeeRecordStatus').then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|       this.getTotal() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       toAdd() { | ||||
|         this.form =  { | ||||
|           name: '', | ||||
|           idNumber: '', | ||||
|           status: '0', | ||||
|           ymd: '', | ||||
|           amount: '', | ||||
|           orgId: '', | ||||
|           orgName: '', | ||||
|           partyId: '' | ||||
|         } | ||||
|         this.dialogTitle = '新增党费信息' | ||||
|         this.dialog = true | ||||
|       }, | ||||
|       edit(row) { | ||||
|         this.form = row | ||||
|         this.dialog = true | ||||
|         this.dialogTitle = '编辑党费信息' | ||||
|       }, | ||||
|       handleSearch(e, cb) { | ||||
|         this.instance.post(`/app/appparty/fuzzyList?name=${e}&size=50`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             cb(res.data) | ||||
|           } | ||||
|         }); | ||||
|       }, | ||||
|       handleSelect(e) { | ||||
|         this.form.name = e.name | ||||
|         this.form.idNumber = e.idNumber | ||||
|         this.form.orgId = e.partyOrgId | ||||
|         this.form.orgName = e.partyOrgName | ||||
|         this.form.partyId = e.id | ||||
|       }, | ||||
|       handlePayment() { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.instance.post(`/app/appdfjnzhisheng/addOrUpdate`, {...this.form}).then((res) => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success(this.dialogTitle == '编辑党费信息' ? "编辑成功" : "新增成功"); | ||||
|                 this.$refs.form.resetFields() | ||||
|                 this.dialog = false | ||||
|                 this.getListInit() | ||||
|                 this.getTotal() | ||||
|               } | ||||
|             }); | ||||
|           } | ||||
|         }); | ||||
|       }, | ||||
|       handlePartyOrgSelect(e) { | ||||
|         let {isLeaf, name, id} = e?.[0] || {}; | ||||
|         if (isLeaf == 1) { | ||||
|           this.search.partyOrgName = name; | ||||
|           this.search.partyOrgId = id; | ||||
|         } | ||||
|         this.getListInit() | ||||
|       }, | ||||
|       getListInit() { | ||||
|         this.search.current = 1 | ||||
|         this.getList() | ||||
|       }, | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appdfjnzhisheng/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             orgId: this.search.partyOrgId | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             res.data.records.map((item) => { | ||||
|               item.ymd = item.ymd.substring(0, 7) | ||||
|             }) | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       remove(row) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appdfjnzhisheng/delete?ids=${row.id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|       getTotal() { | ||||
|         this.instance.post(`/app/appdfjnzhisheng/statistics`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.topTotal = res.data | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .AppPartyPayment { | ||||
|  | ||||
|     .bottom { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|  | ||||
|       & > .ai-card { | ||||
|         flex: 1; | ||||
|  | ||||
|         &:last-child { | ||||
|           margin-left: 20px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     :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; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     :deep( .ai-card) { | ||||
|       .ai-card__body { | ||||
|         padding: 12px 16px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .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,35 +0,0 @@ | ||||
| <template> | ||||
|   <section class="AppPartyScore"> | ||||
|     <component :is="currentPage" v-bind="$props"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import PsList from "./psList"; | ||||
| import PsDetail from "./psDetail"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppPartyScore", | ||||
|   components: {PsDetail, PsList}, | ||||
|   label: "党员积分", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       return this.$route.query.id ? PsDetail : PsList | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("partyIntegralType") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppPartyScore { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -1,154 +0,0 @@ | ||||
| <template> | ||||
|   <section class="psDetail"> | ||||
|     <ai-detail> | ||||
|       <ai-title slot="title" title="积分详情" isShowBottomBorder isShowBack @onBackClick="back"/> | ||||
|       <template #content> | ||||
|         <el-row type="flex"> | ||||
|           <ai-card hideTitle class="staCard fill"> | ||||
|             <template #content> | ||||
|               <div class="color-999" v-text="`姓名`"/> | ||||
|               <b v-text="detail.name"/> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card hideTitle class="staCard fill"> | ||||
|             <template #content> | ||||
|               <div class="color-999" v-text="`学习强国`"/> | ||||
|               <el-button type="text" @click="handleEditLearningIntergral(detail.id)">编辑</el-button> | ||||
|               <b class="color-26f" v-text="detail.learningIntegral||0"/> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card hideTitle class="staCard fill"> | ||||
|             <template slot="content"> | ||||
|               <div class="color-999" v-text="`个人积分`"/> | ||||
|               <b class="color-26f" v-text="detail.integral||0"/> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card hideTitle class="staCard fill"> | ||||
|             <template #content> | ||||
|               <div class="color-999" v-text="`家庭积分`"/> | ||||
|               <b class="color-26f" v-text="detail.familySurplusIntegral||0"/> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-row> | ||||
|         <ai-card title="余额变动明细"> | ||||
|           <template #content> | ||||
|             <ai-table :tableData="detail.integralInfoList" :isShowPagination="false" :col-configs="colConfigs" | ||||
|                       :dict="dict"/> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
|     <ai-dialog :visible.sync="dialog" title="学习强国设置" width="500px" @close="form={}" @onConfirm="submit"> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="110px"> | ||||
|         <el-form-item label="学习强国积分" prop="learningIntegral"> | ||||
|           <el-input v-model.number="form.learningIntegral" placeholder="请输入正整数" clearable/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "psDetail", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       detail: {}, | ||||
|       colConfigs: [ | ||||
|         {label: "时间", prop: "createTime"}, | ||||
|         {label: "类型", prop: "integralType", align: 'center', dict: "partyIntegralType"}, | ||||
|         {label: "变动积分", prop: "integral", align: 'center'}, | ||||
|         {label: "剩余积分", prop: "residualIntegral", align: 'center'}, | ||||
|         {label: "调整说明", prop: "remark"}, | ||||
|       ], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: { | ||||
|         learningIntegral: [ | ||||
|           {required: true, message: "请输入学习强国积分"}, | ||||
|           {pattern: /^\d+$/g, message: "请输入正整数"} | ||||
|         ] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       let {id} = this.$route.query | ||||
|       this.instance.post("/app/appparty/getPartyIntegralDetail", null, { | ||||
|         params: {id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.detail = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     back() { | ||||
|       this.$router.push({}) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/appparty/editLearningIntegral", null,{ | ||||
|             params:this.form | ||||
|           }).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.getDetail() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleEditLearningIntergral(partyMemberId) { | ||||
|       this.dialog = true | ||||
|       this.form = {partyMemberId} | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getDetail() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .psDetail { | ||||
|   height: 100%; | ||||
|  | ||||
|   .color-999 { | ||||
|     color: #999; | ||||
|   } | ||||
|  | ||||
|   .color-26f { | ||||
|     color: #26f; | ||||
|   } | ||||
|  | ||||
|   :deep(.staCard ){ | ||||
|     font-size: 14px; | ||||
|  | ||||
|     b { | ||||
|       font-size: 24px; | ||||
|       line-height: 40px; | ||||
|     } | ||||
|  | ||||
|     & + .staCard { | ||||
|       margin-left: 16px; | ||||
|     } | ||||
|  | ||||
|     .ai-card__body { | ||||
|       position: relative; | ||||
|  | ||||
|       .el-button { | ||||
|         position: absolute; | ||||
|         right: 32px; | ||||
|         top: 6px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,116 +0,0 @@ | ||||
| <template> | ||||
|   <section class="psList"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="党员积分" isShowBottomBorder/> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #right> | ||||
|             <ai-import :instance="instance" name="党员积分" title="导入党员积分" | ||||
|                        suffixName="xlsx" | ||||
|                        url="/app/apppartyintegralinfo/downloadTemplate" | ||||
|                        importUrl="/app/apppartyintegralinfo/import" | ||||
|                        @onSuccess="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||
|                   @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> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
| import {ID} from "dui/lib/js/utils"; | ||||
|  | ||||
| export default { | ||||
|   name: "psList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "姓名", prop: "name"}, | ||||
|         {label: "个人积分", prop: "integral", align: "center"}, | ||||
|         {label: "家庭积分", prop: "familySurplusIntegral", align: "center"}, | ||||
|         {label: "学习强国", prop: "learningIntegral", align: "center"}, | ||||
|         {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', ID.hideId(row.idNumber)), width: 165}, | ||||
|         {label: '联系电话', prop: 'phone', align: 'center', width: 120} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       familyList: [], | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     back() { | ||||
|       this.$router.push({}) | ||||
|     }, | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appparty/listByPartyIntegral", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     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() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .psList { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -1,34 +0,0 @@ | ||||
| <template> | ||||
|   <section class="AppPartyScoreFlow"> | ||||
|     <component :is="currentPage" v-bind="$props"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import PsfList from "./psfList"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppPartyScoreFlow", | ||||
|   components: {PsfList}, | ||||
|   label: "党员积分明细", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       return PsfList | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("partyIntegralType") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppPartyScoreFlow { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -1,150 +0,0 @@ | ||||
| <template> | ||||
|   <section class="psfList"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="党员积分明细" isShowBottomBorder/> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||
|             <el-date-picker type="daterange" placeholder="日期" size="small" clearable v-model="createTime" | ||||
|                             @change="handleSearchTime" start-placeholder="开始时间" end-placeholder="结束时间" | ||||
|                             value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00','23:59:59']"/> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索党员" v-model="search.partyName" clearable | ||||
|                       @change="page.current=1,getTableData()" suffix-icon="iconfont iconSearch"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||
|                   @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="showDetail(row)">详情</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog :visible.sync="dialog" title="积分对象" width="600px" @close="form={}" @onConfirm="submit" | ||||
|                :customFooter="!isAdd"> | ||||
|       <el-form v-if="isAdd" :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="选择人员" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" action="/app/appparty/list" :instance="instance" | ||||
|                      :prop="{label:'name'}"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="调整说明" prop="remark"> | ||||
|           <el-input type="textarea" placeholder="请输入" v-model="form.remark" maxlength="100" show-word-limit rows="3" | ||||
|                     clearable/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="类型" prop="integralType"> | ||||
|           <ai-select v-model="form.integralType" :selectList="dict.getDict('partyIntegralType')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="积分" prop="integral"> | ||||
|           <el-input v-model.number="form.integral" placeholder="请输入正整数" clearable/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <ai-wrapper v-else> | ||||
|         <ai-info-item label="对象" :value="form.partyName"/> | ||||
|         <ai-info-item label="调整说明" :value="form.remark" isLine/> | ||||
|         <ai-info-item label="类型" :value="dict.getLabel('partyIntegralType',form.integralType)"/> | ||||
|         <ai-info-item label="积分" :value="form.integral"/> | ||||
|       </ai-wrapper> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "psfList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "对象", prop: "partyName"}, | ||||
|         {label: "调整说明", prop: "remark", align: "center"}, | ||||
|         {label: "时间", prop: "createTime"}, | ||||
|         {label: "类型", prop: "integralType", align: "center", dict: "partyIntegralType"}, | ||||
|         {label: "积分", prop: "integral", align: "center"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     }, | ||||
|     isAdd() { | ||||
|       return !this.form.id | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: { | ||||
|         partyId: {required: true, message: "请选择人员"}, | ||||
|         remark: {required: true, message: "请输入调整说明"}, | ||||
|         integralType: {required: true, message: "请选择类型"}, | ||||
|         integral: [ | ||||
|           {required: true, message: "请输入分数"}, | ||||
|           {pattern: /^\d+$/g, message: "请输入正整数"} | ||||
|         ], | ||||
|       }, | ||||
|       createTime: "" | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/apppartyintegralinfo/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records?.map(e => ({ | ||||
|             ...e, | ||||
|             integral: (e.integralType == 0 ? "-" : '+') + e.integral | ||||
|           })) | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     showDetail(row) { | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.dialog = true | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           let loading = this.$loading({text: "提交中..."}) | ||||
|           this.instance.post("/app/apppartyintegralinfo/addOrUpdate", this.form).then(res => { | ||||
|             loading.close() | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.getTableData() | ||||
|             } | ||||
|           }).catch(() => loading.close()) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleSearchTime(v) { | ||||
|       this.page.current = 1 | ||||
|       this.search.startTime = v?.[0] | ||||
|       this.search.endTime = v?.[1] | ||||
|       this.getTableData() | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .psfList { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user