From 50fb58286ed3b718c39a97e0987ee7561a295651 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 04 七月 2025 17:56:41 +0800
Subject: [PATCH] git ch
---
company/src/components/enterprise/onlineReporting.vue | 785 +++++++++++++++++++++++++++++--------------------------
1 files changed, 414 insertions(+), 371 deletions(-)
diff --git a/company/src/components/enterprise/onlineReporting.vue b/company/src/components/enterprise/onlineReporting.vue
index 221ffe6..3cfe3d4 100644
--- a/company/src/components/enterprise/onlineReporting.vue
+++ b/company/src/components/enterprise/onlineReporting.vue
@@ -7,7 +7,7 @@
:confirm-working="isWorking"
@confirm="confirm"
>
- <div class="box">
+ <div class="box" id="section1">
<div class="box_status">
<div class="box_status_row" v-for="(item, index) in statusList" :key="index">
<div :class="index <= i ? 'box_status_row_icon statusColor2 statusColor3' : 'box_status_row_icon'">
@@ -162,7 +162,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 6)" />
+ <uploadProgress width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 6)" />
</div>
</div>
</div>
@@ -181,7 +181,7 @@
</div>
<div class="box_desc_list_row">
<el-form-item label="鎶ユ浜鸿仈绯绘柟寮�" prop="informantPhone">
- <el-input v-model="form.informantPhone" placeholder="璇疯緭鍏�"></el-input>
+ <el-input v-model="form.informantPhone" type="number" maxlength="11" placeholder="璇疯緭鍏�"></el-input>
</el-form-item>
</div>
<div class="box_desc_list_ZW"></div>
@@ -199,7 +199,11 @@
</div>
<div class="box_item">
<div class="box_item_title">
- <span>鐞嗚禂鏉愭枡</span>
+ <div> <span>涓婁紶鐞嗚禂鏉愭枡</span></div>
+ <div style="float: right">
+ <el-button type="primary" v-if="insurance && insurance.lpStampTempFile && insurance.lpStampTempFile.fileurlFull" @click="openLinkUrl(insurance.lpStampTempFile.fileurlFull)">鐩栫珷鏂囦欢妯$増</el-button>
+ <el-button type="primary" v-if="insurance && insurance.lpFile && insurance.lpFile.fileurlFull" @click="openLinkUrl(insurance.lpFile.fileurlFull)">鐞嗚禂鏉愭枡涓�瑙堣〃</el-button>
+ </div>
</div>
<div class="box_item_list">
<div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -209,7 +213,7 @@
</div>
<div class="box_item_list_row_info">
<div class="label">鏂囦欢涓婁紶璇存槑锛�</div>
- <div class="content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬�佽�冨嫟璁板綍銆佽韩浠借瘉姝e弽闈€�侊紱</div>
+ <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
</div>
<div class="box_item_list_row_l">
<div class="desc_data_list_item" v-for="(item, index) in form.relationFileList" :key="index">
@@ -227,7 +231,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 1)" />
+ <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 1)" />
</div>
</div>
<div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -237,7 +241,7 @@
</div>
<div class="box_item_list_row_info">
<div class="label">鏂囦欢涓婁紶璇存槑锛�</div>
- <div class="content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬�佽�冨嫟璁板綍銆佽韩浠借瘉姝e弽闈€�侊紱</div>
+ <div v-if="insurance && insurance.lpMzFileInfo" class="content" v-html="insurance.lpMzFileInfo"></div>
</div>
<div class="box_item_list_row_l">
<div class="desc_data_list_item" v-for="(item, index) in form.outpatientFileList" :key="index">
@@ -255,7 +259,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 2)" />
+ <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 2)" />
</div>
</div>
<div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -265,7 +269,7 @@
</div>
<div class="box_item_list_row_info">
<div class="label">鏂囦欢涓婁紶璇存槑锛�</div>
- <div class="content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬�佽�冨嫟璁板綍銆佽韩浠借瘉姝e弽闈€�侊紱</div>
+ <div v-if="insurance && insurance.lpZyFileInfo" class="content" v-html="insurance.lpZyFileInfo"></div>
</div>
<div class="box_item_list_row_l">
<div class="desc_data_list_item" v-for="(item, index) in form.hospitalFileList" :key="index">
@@ -283,7 +287,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 3)" />
+ <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 3)" />
</div>
</div>
<div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -293,7 +297,7 @@
</div>
<div class="box_item_list_row_info">
<div class="label">鏂囦欢涓婁紶璇存槑锛�</div>
- <div class="content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬�佽�冨嫟璁板綍銆佽韩浠借瘉姝e弽闈€�侊紱</div>
+ <div v-if="insurance && insurance.lpScFileInfo" class="content" v-html="insurance.lpScFileInfo"></div>
</div>
<div class="box_item_list_row_l">
<div class="desc_data_list_item" v-for="(item, index) in form.disabilityFileList" :key="index">
@@ -311,7 +315,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 4)" />
+ <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 4)" />
</div>
</div>
<div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -321,7 +325,7 @@
</div>
<div class="box_item_list_row_info">
<div class="label">鏂囦欢涓婁紶璇存槑锛�</div>
- <div class="content">闇�涓婁紶鐨勬枃浠讹細鍔冲姩鍚堝悓澶嶅嵃浠躲�佸伐璧勬祦姘淬�佽�冨嫟璁板綍銆佽韩浠借瘉姝e弽闈€�侊紱</div>
+ <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
</div>
<div class="box_item_list_row_l">
<div class="desc_data_list_item" v-for="(item, index) in form.otherFileList" :key="index">
@@ -339,7 +343,7 @@
<span>{{ item.name }}</span>
</div>
</div>
- <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 5)" />
+ <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 5)" />
</div>
</div>
</div>
@@ -356,17 +360,17 @@
</div>
<div class="box_desc_list">
<div class="box_desc_list_row">
- <el-form-item label="鏀舵閾惰" prop="receiveBank">
+ <el-form-item label="鏀舵閾惰" :prop="userInfo.type === 1 ? '' : 'receiveBank'">
<el-input v-model="form.receiveBank" placeholder="璇疯緭鍏ユ敹娆鹃摱琛屾敮琛屽悕绉�"></el-input>
</el-form-item>
</div>
<div class="box_desc_list_row">
- <el-form-item label="鏀舵浜�" prop="receiveUserName">
+ <el-form-item label="鏀舵浜�" :prop="userInfo.type === 1 ? '' : 'receiveUserName'">
<el-input v-model="form.receiveUserName" placeholder="璇疯緭鍏ュ紑鎴峰鍚�"></el-input>
</el-form-item>
</div>
<div class="box_desc_list_row">
- <el-form-item label="鏀舵璐﹀彿" prop="receiveAccount">
+ <el-form-item label="鏀舵璐﹀彿" :prop="userInfo.type === 1 ? '' : 'receiveAccount'">
<el-input v-model="form.receiveAccount" placeholder="璇疯緭鍏ラ摱琛岃处鍙�"></el-input>
</el-form-item>
</div>
@@ -389,13 +393,13 @@
</el-form>
<div class="box_footer">
<div class="box_footer_btns" v-if="i === 0">
- <el-button type="primary" @click="confirm(0)">鏆傚瓨</el-button>
+ <el-button type="primary" :loading="isWorking" @click="confirm(0)">鏆傚瓨</el-button>
<el-button type="primary" @click="next">涓嬩竴姝�</el-button>
</div>
<div class="box_footer_btns" v-if="i === 1">
- <el-button @click="i--">涓婁竴姝�</el-button>
- <el-button type="primary" @click="confirm(0)">鏆傚瓨</el-button>
- <el-button type="primary" @click="confirm(1)">鎻愪氦</el-button>
+ <el-button @click="previousStep">涓婁竴姝�</el-button>
+ <el-button type="primary" :loading="isWorking" @click="confirm(0)">鏆傚瓨</el-button>
+ <el-button type="primary" :loading="isWorking" @click="confirm(1)">鎻愪氦</el-button>
</div>
</div>
</div>
@@ -407,360 +411,399 @@
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import upload from '@/components/common/upload'
- import { saveSettleClaims } from '@/api/business/settleRisk'
- import { findById } from '@/api/business/settleClaims'
- import { findListByDTO } from '@/api/business/member'
- import { findList } from '@/api/business/applyChange'
- import { findTreeList } from '@/api/business/knowledge'
- import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
- import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
- import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
- import { mapState } from 'vuex'
- export default {
- name: 'onlineReporting',
- extends: BaseOpera,
- components: { GlobalWindow, upload, OperaSettleClaimsWindow, OperaWtbApplyShopWindow, OperaInsuranceApplyDetails },
- computed: {
- ...mapState(['userInfo'])
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import upload from '@/components/common/upload'
+import uploadProgress from '@/components/common/uploadProgress'
+import { saveSettleClaims } from '@/api/business/settleRisk'
+import { findById } from '@/api/business/settleClaims'
+import { findListByDTO } from '@/api/business/member'
+import { findList } from '@/api/business/applyChange'
+import { findTreeList } from '@/api/business/knowledge'
+import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
+import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
+import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
+import { mapState } from 'vuex'
+import { getById } from '@/api/business/insurance'
+export default {
+ name: 'onlineReporting',
+ extends: BaseOpera,
+ components: { GlobalWindow, upload,uploadProgress, OperaSettleClaimsWindow, OperaWtbApplyShopWindow, OperaInsuranceApplyDetails },
+ computed: {
+ ...mapState(['userInfo'])
+ },
+ data () {
+ var checkPhone = (rule, value, callback) => {
+ if (value === '') {
+ callback(new Error('璇疯緭鍏�'));
+ } else if (!/^[1]\d{10}$/.test(value)) {
+ callback(new Error('鎵嬫満鍙蜂笉鍚堟硶'));
+ } else {
+ callback();
+ }
+ };
+ return {
+ i: 0,
+ id: null,
+ statusList: [
+ {
+ name: '濉啓鍑洪櫓淇℃伅',
+ info: '瀹屾垚鎶ユ鍩虹淇℃伅濉啓'
},
- data () {
- return {
- i: 0,
- id: null,
- statusList: [
- {
- name: '濉啓鍑洪櫓淇℃伅',
- info: '瀹屾垚鎶ユ鍩虹淇℃伅濉啓'
- },
- {
- name: '涓婁紶鐞嗚禂鏉愭枡',
- info: '琛ュ厖闇�瑕佺悊璧旂殑鐩稿叧璧勬枡'
- },
- {
- name: '瀹屾垚鎶ユ',
- info: '鎻愪氦鎶ユ淇℃伅'
- }
- ],
- form: {
- id: null,
- memberId: '',
- idcardNo: '',
- insuranceApplyId: '',
- happenTime: '',
- hospital: '',
- area: [],
- areaId: '',
- address: '',
- areaInfo: '',
- content: '',
- type: 0,
- inHospital: 0,
- hurtType: 0,
- medicalInsurance: 0,
- reportFileList: [],
- informantName: '',
- informantPhone: '',
-
- relationFileList: [],
- outpatientFileList: [],
- hospitalFileList: [],
- disabilityFileList: [],
- otherFileList: [],
-
- applyDetailId: '',
- solutionId: '',
- worktypeId: '',
- duId: '',
- receiveBank: '',
- receiveUserName: '',
- receiveAccount: ''
- },
- rules: {
- receiveAccount: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- receiveUserName: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- receiveBank: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- memberId: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- idcardNo: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- happenTime: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- content: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- type: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- inHospital: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- hurtType: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- medicalInsurance: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- informantName: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- informantPhone: [
- { required: true, message: '涓嶈兘涓虹┖' }
- ],
- },
- pickerOptions: {},
- area: [],
- user: [],
- solutionList: []
- }
+ {
+ name: '涓婁紶鐞嗚禂鏉愭枡',
+ info: '琛ュ厖闇�瑕佺悊璧旂殑鐩稿叧璧勬枡'
},
- created () {
- this.config({
- api: '/business/settleClaims',
- 'field.id': 'id'
- })
- },
- methods: {
- open (title, id) {
- this.title = title
- this.form.area = []
- this.i = 0
- this.solutionList = []
- this.area = []
- this.user = []
- this.getUser()
- this.getCityTree()
- if (id) {
- findById(id)
- .then(res => {
- this.visible = true
- this.$nextTick(() => {
- for (const key in this.form) {
- this.form[key] = res[key]
- }
- if (this.form.areaId) {
- this.form.area = this.form.areaId.split(',').map(item => Number(item))
- }
- findList({ memberId: this.form.memberId })
- .then(res1 => {
- res1.forEach(item => {
- if (item.id === res.applyDetailId) {
- item.active = true
- this.pickerOptions = {
- disabledDate(time) {
- return time.getTime() < new Date(item.parentStartTime).getTime() || time.getTime() > new Date(item.parentEndTime).getTime()
- }
- };
- } else {
- item.active = false
- }
- })
- this.solutionList = res1
- })
- })
- })
- } else {
- this.visible = true
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- this.form.informantName = this.userInfo.realname
- })
- }
- },
- continueReporting() {
- this.i = 0
- this.id = null
- this.pickerOptions = {}
- this.solutionList = []
- this.form = {
- id: null,
- memberId: '',
- idcardNo: '',
- insuranceApplyId: '',
- happenTime: '',
- hospital: '',
- area: [],
- areaId: '',
- address: '',
- areaInfo: '',
- content: '',
- type: 0,
- inHospital: 0,
- hurtType: 0,
- medicalInsurance: 0,
- reportFileList: [],
- informantName: '',
- informantPhone: '',
-
- relationFileList: [],
- outpatientFileList: [],
- hospitalFileList: [],
- disabilityFileList: [],
- otherFileList: [],
-
- applyDetailId: '',
- solutionId: '',
- worktypeId: '',
- duId: '',
- receiveBank: '',
- receiveUserName: '',
- receiveAccount: ''
- }
- },
- changeArea(e) {
- if (!e && e.length === 0) {
- this.form.areaId = ''
- this.form.areaInfo = ''
- } else {
- this.form.areaId = e.join(',')
- this.form.areaInfo = this.$refs.cascader.getCheckedNodes()[0].pathLabels.join(',')
- }
- },
- async getCityTree() {
- this.area = await findTreeList({})
- this.setSecondLevelChildrenToNullPrecise(this.area);
- },
- setSecondLevelChildrenToNullPrecise(data, level = 1) {
- if (!data || !data.length) return;
-
- data.forEach(item => {
- if (item.childAreasList && item.childAreasList.length) {
- if (level === 2) {
- // 杩欐槸绗竴绾ц妭鐐癸紝澶勭悊鍏跺瓙鑺傜偣锛堢浜岀骇锛�
- item.childAreasList.forEach(child => {
- child.childAreasList = null;
- });
- } else {
- // 缁х画閫掑綊澶勭悊鏇存繁灞傜骇
- this.setSecondLevelChildrenToNullPrecise(item.childAreasList, level + 1);
- }
- }
- });
- },
- getUser() {
- findListByDTO({})
- .then(res => {
- this.user = res
- })
- },
- delFile(index, type) {
- if (type === 1) {
- this.form.relationFileList.splice(index, 1)
- } else if (type === 2) {
- this.form.outpatientFileList.splice(index, 1)
- } else if (type === 3) {
- this.form.hospitalFileList.splice(index, 1)
- } else if (type === 4) {
- this.form.disabilityFileList.splice(index, 1)
- } else if (type === 5) {
- this.form.otherFileList.splice(index, 1)
- } else if (type === 6) {
- this.form.reportFileList.splice(index, 1)
- }
- },
- claimsUploadFile(file, type) {
- file.fileurl = file.imgaddr
- file.name = file.originname
- file.fileurlFull = file.url
- if (type === 1) {
- this.form.relationFileList.push(file)
- } else if (type === 2) {
- this.form.outpatientFileList.push(file)
- } else if (type === 3) {
- this.form.hospitalFileList.push(file)
- } else if (type === 4) {
- this.form.disabilityFileList.push(file)
- } else if (type === 5) {
- this.form.otherFileList.push(file)
- } else if (type === 6) {
- this.form.reportFileList.push(file)
- }
- },
- getSolutions(id) {
- let row = this.user.filter(item => item.id === id)
- this.form.idcardNo = row[0].idcardNo
- findList({ memberId: id })
- .then(res => {
- this.form.insuranceApplyId = ''
- res.forEach(item => {
- item.active = false
- })
- this.solutionList = res
- })
- },
- changeSolution(e, i) {
- this.solutionList.forEach((item, index) => {
- item.active = i === index
- })
- let obj = this.solutionList.filter(item => item.active)[0]
- this.form.insuranceApplyId = obj.applyId
- this.form.solutionId = obj.solutionId
- this.form.worktypeId = obj.worktypeId
- this.form.duId = obj.duId
- this.form.applyDetailId = obj.id
- this.form.happenTime = ''
- this.pickerOptions = {
- disabledDate(time) {
- return time.getTime() < new Date(obj.parentStartTime).getTime() || time.getTime() > new Date(obj.parentEndTime).getTime()
- }
- };
- },
- // 鏌ョ湅淇濆崟璇︽儏
- jumpSolutionDetail(id, solutionType) {
- if (solutionType === 1) {
- this.$refs.OperaWtbApplyShopWindow.open('濮旀墭鎶曚繚璇︽儏', { id: id })
- } else {
- this.$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: id })
- }
- },
- confirm(saveType) {
- this.isWorking = true
- saveSettleClaims({...this.form, saveType})
- .then(res => {
- console.log(res)
- if (saveType === 0) {
- this.visible = false
- } else {
- this.id = res
- this.i = 2
- }
- this.$emit('success')
- })
- .finally(() => {
- this.isWorking = false
- })
- },
- next() {
- this.$refs.form.validate((valid) => {
- if (!valid) return
- this.i++
- // this.isWorking = true
- // createSys(obj)
- // .then(() => {
- // this.visible = false
- // this.$emit('success')
- // })
- // .catch(e => {
- // this.$tip.apiFailed(e)
- // })
- // .finally(() => {
- // this.isWorking = false
- // })
- })
- }
+ {
+ name: '瀹屾垚鎶ユ',
+ info: '鎻愪氦鎶ユ淇℃伅'
}
+ ],
+ form: {
+ id: null,
+ memberId: '',
+ idcardNo: '',
+ insuranceApplyId: '',
+ happenTime: '',
+ hospital: '',
+ area: [],
+ areaId: '',
+ address: '',
+ areaInfo: '',
+ content: '',
+ type: 0,
+ inHospital: 0,
+ hurtType: 0,
+ medicalInsurance: 0,
+ reportFileList: [],
+ informantName: '',
+ informantPhone: '',
+
+ relationFileList: [],
+ outpatientFileList: [],
+ hospitalFileList: [],
+ disabilityFileList: [],
+ otherFileList: [],
+
+ applyDetailId: '',
+ solutionId: '',
+ worktypeId: '',
+ duId: '',
+ receiveBank: '',
+ receiveUserName: '',
+ receiveAccount: ''
+ },
+ rules: {
+ receiveAccount: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ receiveUserName: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ receiveBank: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ memberId: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ idcardNo: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ happenTime: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ content: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ type: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ inHospital: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ hurtType: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ medicalInsurance: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ informantName: [
+ { required: true, message: '涓嶈兘涓虹┖' }
+ ],
+ informantPhone: [
+ { required: true, validator: checkPhone }
+ ]
+ },
+ pickerOptions: {
+ disabledDate (time) {
+ return time.getTime() > Date.now() // 绂佺敤鏈潵鐨勬棩鏈�
+ }
+ },
+ area: [],
+ user: [],
+ insurance: null,
+ solutionList: []
}
+ },
+ created () {
+ this.config({
+ api: '/business/settleClaims',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ open (title, id) {
+ this.title = title
+ this.continueReporting()
+ this.form.area = []
+ this.i = 0
+ this.solutionList = []
+ this.area = []
+ this.user = []
+ this.getUser()
+ this.getCityTree()
+ this.insurance = {}
+ if (id) {
+ findById(id)
+ .then(res => {
+ this.visible = true
+ this.$nextTick(() => {
+ for (const key in this.form) {
+ this.form[key] = res[key]
+ }
+ if (this.form.areaId) {
+ this.form.area = this.form.areaId.split(',').map(item => Number(item))
+ }
+ findList({ memberId: this.form.memberId })
+ .then(res1 => {
+ res1.forEach(item => {
+ if (item.id === res.applyDetailId) {
+ this.getInsuranceFile(item)//鑾峰彇淇濋櫓鏂规鏂囦欢璇存槑
+ item.active = true
+ this.pickerOptions = {
+ disabledDate (time) {
+ var start = new Date(item.startTime)
+ var end = new Date(item.endTime)
+ return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
+ }
+ }
+ } else {
+ item.active = false
+ }
+ })
+ this.solutionList = res1
+ })
+ })
+ })
+ } else {
+ this.visible = true
+ this.$nextTick(() => {
+ this.$refs.form.resetFields()
+ this.form.informantName = this.userInfo.realname
+ })
+ }
+ },
+ openLinkUrl(url){
+ window.open(url)
+ },
+ continueReporting () {
+ this.i = 0
+ this.id = null
+ this.pickerOptions = {}
+ this.solutionList = []
+ this.form = {
+ id: null,
+ memberId: '',
+ idcardNo: '',
+ insuranceApplyId: '',
+ happenTime: '',
+ hospital: '',
+ area: [],
+ areaId: '',
+ address: '',
+ areaInfo: '',
+ content: '',
+ type: 0,
+ inHospital: 0,
+ hurtType: 0,
+ medicalInsurance: 0,
+ reportFileList: [],
+ informantName: '',
+ informantPhone: '',
+
+ relationFileList: [],
+ outpatientFileList: [],
+ hospitalFileList: [],
+ disabilityFileList: [],
+ otherFileList: [],
+
+ applyDetailId: '',
+ solutionId: '',
+ worktypeId: '',
+ duId: '',
+ receiveBank: '',
+ receiveUserName: '',
+ receiveAccount: ''
+ }
+ },
+ changeArea (e) {
+ if (!e && e.length === 0) {
+ this.form.areaId = ''
+ this.form.areaInfo = ''
+ } else {
+ this.form.areaId = e.join(',')
+ this.form.areaInfo = this.$refs.cascader.getCheckedNodes()[0].pathLabels.join(',')
+ }
+ },
+ async getCityTree () {
+ this.area = await findTreeList({})
+ this.setSecondLevelChildrenToNullPrecise(this.area)
+ },
+ setSecondLevelChildrenToNullPrecise (data, level = 1) {
+ if (!data || !data.length) return
+
+ data.forEach(item => {
+ if (item.childAreasList && item.childAreasList.length) {
+ if (level === 2) {
+ // 杩欐槸绗竴绾ц妭鐐癸紝澶勭悊鍏跺瓙鑺傜偣锛堢浜岀骇锛�
+ item.childAreasList.forEach(child => {
+ child.childAreasList = null
+ })
+ } else {
+ // 缁х画閫掑綊澶勭悊鏇存繁灞傜骇
+ this.setSecondLevelChildrenToNullPrecise(item.childAreasList, level + 1)
+ }
+ }
+ })
+ },
+ getUser () {
+ findListByDTO({})
+ .then(res => {
+ this.user = res
+ })
+ },
+ delFile (index, type) {
+ if (type === 1) {
+ this.form.relationFileList.splice(index, 1)
+ } else if (type === 2) {
+ this.form.outpatientFileList.splice(index, 1)
+ } else if (type === 3) {
+ this.form.hospitalFileList.splice(index, 1)
+ } else if (type === 4) {
+ this.form.disabilityFileList.splice(index, 1)
+ } else if (type === 5) {
+ this.form.otherFileList.splice(index, 1)
+ } else if (type === 6) {
+ this.form.reportFileList.splice(index, 1)
+ }
+ },
+ getInsuranceFile (obj) {
+ this.insurance = null
+ getById(obj.insuranceId,1)
+ .then(res => {
+ this.insurance = res
+ })
+ },
+ claimsUploadFile (file, type) {
+ file.fileurl = file.imgaddr
+ file.name = file.originname
+ file.fileurlFull = file.url
+ if (type === 1) {
+ this.form.relationFileList.push(file)
+ } else if (type === 2) {
+ this.form.outpatientFileList.push(file)
+ } else if (type === 3) {
+ this.form.hospitalFileList.push(file)
+ } else if (type === 4) {
+ this.form.disabilityFileList.push(file)
+ } else if (type === 5) {
+ this.form.otherFileList.push(file)
+ } else if (type === 6) {
+ this.form.reportFileList.push(file)
+ }
+ },
+ getSolutions (id) {
+ const row = this.user.filter(item => item.id === id)
+ this.form.idcardNo = row[0].idcardNo
+ findList({ memberId: id, isSettleClaims: 1 })
+ .then(res => {
+ this.form.insuranceApplyId = ''
+ res.forEach(item => {
+ item.active = false
+ })
+ this.solutionList = res
+ this.changeSolution(null, 0)
+ })
+ },
+ changeSolution (e, i) {
+ this.pickerOptions = {}
+ if (this.solutionList.length < i) {
+ return
+ }
+ this.solutionList.forEach((item, index) => {
+ item.active = i === index
+ })
+ const obj = this.solutionList.filter(item => item.active)[0]
+ this.getInsuranceFile(obj)
+ this.pickerOptions = {
+ disabledDate (time) {
+ var start = new Date(obj.startTime)
+ var end = new Date(obj.endTime)
+ return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
+ }
+ }
+ this.form.insuranceApplyId = obj.applyId
+ this.form.solutionId = obj.solutionId
+ this.form.worktypeId = obj.worktypeId
+ this.form.duId = obj.duId
+ this.form.applyDetailId = obj.id
+ this.form.happenTime = obj.startTime
+ console.log(this.pickerOptions)
+ },
+ // 鏌ョ湅淇濆崟璇︽儏
+ jumpSolutionDetail (id, solutionType) {
+ if (solutionType === 1) {
+ this.$refs.OperaWtbApplyShopWindow.open('濮旀墭鎶曚繚璇︽儏', { id: id })
+ } else {
+ this.$refs.OperaInsuranceApplyDetails.open('鎶曚繚璇︽儏', { id: id })
+ }
+ },
+ confirm (saveType) {
+ this.$refs.form.validate((valid) => {
+ if (!valid) return;
+ this.isWorking = true
+ saveSettleClaims({ ...this.form, saveType })
+ .then(res => {
+ if (saveType === 0) {
+ this.visible = false
+ } else {
+ this.id = res
+ this.i = 2
+ }
+ this.$emit('success')
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ .finally(() => {
+ this.isWorking = false
+ })
+ })
+ },
+ previousStep() {
+ this.i--
+ var element = document.getElementById('section1');
+ element.scrollIntoView({ behavior: 'smooth' });
+ },
+ next () {
+ this.$refs.form.validate((valid) => {
+ if (!valid) return
+ this.i++
+ var element = document.getElementById('section1');
+ element.scrollIntoView({ behavior: 'smooth' });
+ })
+ }
+ }
+}
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3