refactor(xumu): 重构理赔审核页面
- 修改页面布局和样式 - 优化理赔材料上传功能 - 添加审核信息相关字段 - 调整投保对象和审核记录的展示方式 - 优化搜索和筛选功能
This commit is contained in:
		| @@ -13,7 +13,7 @@ export default { | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       let {hash} = this.$route | ||||
|       return ["#claim", "#add"].includes(hash) ? add : list | ||||
|       return ["#audit", "#add"].includes(hash) ? add : list | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| <script> | ||||
| import {mapState} from "vuex" | ||||
| import AiEartagPicker from "@project/xumu/components/AiEartagPicker.vue"; | ||||
| import AiSelect from "dui/packages/basic/AiSelect.vue"; | ||||
|  | ||||
| const records = [ | ||||
|   {label: "序号", type: "index"}, | ||||
| @@ -11,7 +12,7 @@ const records = [ | ||||
| ] | ||||
| export default { | ||||
|   name: "claimAdd", | ||||
|   components: {AiEartagPicker}, | ||||
|   components: {AiSelect, AiEartagPicker}, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     permissions: Function, | ||||
| @@ -28,23 +29,21 @@ export default { | ||||
|     userinfo: v => v.user.info || {}, | ||||
|     pageTitle: v => { | ||||
|       const appName = v.$parent.menuName || v.$parent.$options.label | ||||
|       return v.isClaim ? `新增${appName}` : `${appName}详情` | ||||
|       return v.isAudit ? `${appName}审批` : `${appName}详情` | ||||
|     }, | ||||
|     isClaim: v => v.$route.hash == "#claim", | ||||
|     isAudit: v => v.$route.hash == "#audit", | ||||
|     formImages: v => [ | ||||
|       {label: "勘察报告书", prop: "surveyPicture", rules: {required: v.isClaim, message: '请上传 勘察报告书'}}, | ||||
|       {label: "无害化回执单", prop: "receiptPicture", rules: {required: v.isClaim, message: '请上传 无害化回执单'}}, | ||||
|       {label: "勘察报告书", prop: "surveyPicture"}, | ||||
|       {label: "无害化回执单", prop: "receiptPicture"}, | ||||
|     ], | ||||
|     columns: v => [ | ||||
|       {label: "序号", type: "index"}, | ||||
|       {label: "生物芯片耳标号", prop: "biochipEarNumber"}, | ||||
|       {label: "身长测量照片", prop: "heightPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "电子耳标照片", prop: "earNumberPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "防疫耳标照片", prop: "preventionPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "无害化处理照片", prop: "harmlessPicture", upload: {instance: v.instance, readonly: !v.isClaim, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "报案号", prop: "reportNo", hide: v.isClaim}, | ||||
|       {label: "身长测量照片", prop: "heightPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "电子耳标照片", prop: "earNumberPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "防疫耳标照片", prop: "preventionPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}}, | ||||
|       {label: "无害化处理照片", prop: "harmlessPicture", upload: {instance: v.instance, readonly: !0, valueIsUrl: !0, limit: 1}}, | ||||
|     ].filter(e => !e.hide), | ||||
|     selectedEartags: v => v.detail.list?.length || 0, | ||||
|   }, | ||||
|   methods: { | ||||
|     back(params = {}) { | ||||
| @@ -52,7 +51,7 @@ export default { | ||||
|     }, | ||||
|     getDetail() { | ||||
|       const {id} = this.$route.query | ||||
|       return id && this.instance.post("/api/insurance/claim/apply/getInfo", null, {params: {orderNo: id}}).then(res => { | ||||
|       return id && this.instance.post("/api/insurance/claim/apply/getAuditInfo", null, {params: {id}}).then(res => { | ||||
|         if (res?.data) { | ||||
|           const detail = res.data | ||||
|           return this.detail = {...detail} | ||||
| @@ -61,7 +60,7 @@ export default { | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.detail.validate().then(() => { | ||||
|         this.instance.post("/api/insurance/claim/apply/add", {...this.detail}).then(res => { | ||||
|         this.instance.post("/api/insurance/claim/apply/audit", {...this.detail}).then(res => { | ||||
|           if (res?.code == '0') { | ||||
|             this.$message.success("提交成功!") | ||||
|             this.back() | ||||
| @@ -102,28 +101,44 @@ export default { | ||||
|         </div> | ||||
|       </ai-card> | ||||
|       <ai-card title="投保对象"> | ||||
|         <template #right v-if="isClaim"> | ||||
|           <ai-eartag-picker @select="v=>detail.detailList=v" :instance="instance" | ||||
|                             :action="`/api/insurance/claim/apply/getClaimEarNumberList?orderNo=${detail.orderNo}`"> | ||||
|             <el-button type="text">选择</el-button> | ||||
|           </ai-eartag-picker> | ||||
|         </template> | ||||
|         <ai-highlight class="mar-b8 font-14" :content="`投保标的共${detail.insureNumber}只,已理赔标的共 @v 只`" color="red" :value="selectedEartags"/> | ||||
|         <ai-table :tableData="detail.detailList" :colConfigs="columns" :isShowPagination="!1" hideOptions/> | ||||
|       </ai-card> | ||||
|       <ai-card title="理赔材料" v-if="isClaim"> | ||||
|         <div class="font-12 mar-b8">只能上传JPG/PNG文件,且不超过2M,一次最多5张</div> | ||||
|       <ai-card title="理赔材料"> | ||||
|         <el-form-item v-for="(img,i) in formImages" :key="i" v-bind="img"> | ||||
|           <ai-uploader v-model="detail[img.prop]" :instance="instance" value-is-url :limit="5"/> | ||||
|           <ai-uploader v-model="detail[img.prop]" value-is-url readonly/> | ||||
|         </el-form-item> | ||||
|       </ai-card> | ||||
|       <ai-card title="理赔记录" v-else> | ||||
|         <ai-table :tableData="detail.list" :colConfigs="records" :isShowPagination="!1" hideOptions/> | ||||
|       <ai-card title="审核信息"> | ||||
|         <div class="grid"> | ||||
|           <template v-if="isAudit"> | ||||
|             <el-form-item label="审批状态" prop="auditStatus" :rules="{required:true,message:'请选择审批状态'}"> | ||||
|               <ai-select v-model="detail.auditStatus" dict="auditStatus"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="理赔资料" class="sc-3"> | ||||
|               <ai-uploader v-model="detail.picture" value-is-url :instance="instance" :limit="1"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="报案号" prop="reportNo" :rules="{required:true,message:'请输入 报案号'}"> | ||||
|               <ai-input v-model="detail.reportNo"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="说明"> | ||||
|               <ai-input type="textarea" :rows="3" v-model="detail.remarks"/> | ||||
|             </el-form-item> | ||||
|           </template> | ||||
|           <template v-else> | ||||
|             <el-form-item label="审核状态">{{ dict.getLabel('auditStatus', detail.auditStatus) }}</el-form-item> | ||||
|             <el-form-item label="理赔资料" class="sc-3"> | ||||
|               <el-image :src="detail.picture" :preview-src-list="[detail.picture]"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="审核时间">{{ detail.auditTime }}</el-form-item> | ||||
|             <el-form-item label="审核人">{{ detail.auditName }}</el-form-item> | ||||
|             <el-form-item label="说明">{{ detail.remarks }}</el-form-item> | ||||
|           </template> | ||||
|         </div> | ||||
|       </ai-card> | ||||
|     </el-form> | ||||
|     <div slot="footer"> | ||||
|       <template v-if="isClaim"> | ||||
|         <el-button type="primary" @click="submit(1)">提交</el-button> | ||||
|       <template v-if="isAudit"> | ||||
|         <el-button type="primary" @click="submit">提交</el-button> | ||||
|       </template> | ||||
|       <el-button @click="back">返回</el-button> | ||||
|     </div> | ||||
|   | ||||
| @@ -7,8 +7,8 @@ const columns = [ | ||||
|   {label: "投保单号", prop: "orderNo"}, | ||||
|   {label: "所属养殖户", prop: "applyName"}, | ||||
|   {label: "投保类型", prop: "insureType", dict: "insureType"}, | ||||
|   {label: "投保数量(头)", prop: "insureNumber", width: 120}, | ||||
|   {label: "审批状态", prop: "auditStatus",dict:"auditStatus"}, | ||||
|   {label: "理赔数量", prop: "claimNumber"}, | ||||
|   {label: "审批状态", prop: "auditStatus", dict: "auditStatus"}, | ||||
|   {label: "审批时间", prop: "auditTime"}, | ||||
|   {label: "审批人", prop: "auditName"}, | ||||
| ] | ||||
| @@ -65,6 +65,8 @@ export default { | ||||
|       <template #left> | ||||
|         <ai-input placeholder="投保订单号" v-model="search.orderNo"/> | ||||
|         <ai-select placeholder="全部投保类型" v-model="search.insureType" dict="insureType"/> | ||||
|         <ai-select placeholder="全部审批状态" v-model="search.auditStatus" dict="auditStatus"/> | ||||
|         <ai-select placeholder="全部投保状态" v-model="search.status" dict="insureStatus"/> | ||||
|         <ai-search label="投保日期"> | ||||
|           <el-date-picker v-model="search.beginDate" type="datetime" placeholder="开始日期" size="small"/> | ||||
|           <el-date-picker v-model="search.endDate" type="datetime" placeholder="结束日期" size="small"/> | ||||
| @@ -83,31 +85,14 @@ export default { | ||||
|       <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|         <template slot-scope="{row}"> | ||||
|           <div class="table-options"> | ||||
|             <template v-if="['12'].includes(row.permit)"> | ||||
|               <el-button type="text" @click="dialog=true,$set(form,'id',row.orderNo)">理赔</el-button> | ||||
|             <template v-if="['1'].includes(row.auditStatus)"> | ||||
|               <el-button type="text" @click="$router.push({hash:'#audit',query:{id:row.id}})">审核</el-button> | ||||
|             </template> | ||||
|             <el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.orderNo}})">查看</el-button> | ||||
|             <el-button v-else type="text" @click="$router.push({hash:'#add',query:{id:row.id}})">查看</el-button> | ||||
|           </div> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </ai-table> | ||||
|     <ai-dialog v-model="dialog" title="理赔须知" @closed="form={}"> | ||||
|       <el-form size="small" label-position="top" :mode="form" ref="form"> | ||||
|         <el-form-item label="如遇一下情况进行赔付:"> | ||||
|           1、自然灾害:如暴雨、洪水、台风、冰雹、雷击、暴风雪等导致的肉牛死亡或伤残;<br/> | ||||
|           2、疾病与疫病:包括但不限于口蹄疫、布鲁氏菌病、炭疽、牛结核病等对肉牛生命安全造成威胁的疾病;<br/> | ||||
|           3、意外事故:如火灾、爆炸、触电、盗窃、走失等;<br/> | ||||
|           4、强制扑杀:由于政府政策或疫情控制需要,对肉牛进行的强制扑杀。 | ||||
|         </el-form-item> | ||||
|         <el-form-item class="flex center"> | ||||
|           <el-checkbox v-model="form.agree">本人阅读并知晓理赔须知,承认上传资料的真实性</el-checkbox> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <template #foot> | ||||
|         <el-button @click="$router.push({hash:'#claim',query:{id:form.id}})" type="primary" :disabled="!form.agree">符合要求,立即申请</el-button> | ||||
|         <el-button @click="dialog=false">取消</el-button> | ||||
|       </template> | ||||
|     </ai-dialog> | ||||
|   </ai-page> | ||||
| </template> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user