| | |
| | | <div class="desc_times"> |
| | | <el-timeline :reverse="reverse"> |
| | | <el-timeline-item |
| | | v-for="(activity, index) in model.settleClaimsLogList" |
| | | v-for="(activity, index) in activeLogList" |
| | | :key="index" |
| | | :timestamp="activity.timestamp"> |
| | | <div style="display: flex; flex-direction: column;" v-if="activity.objType==3"> |
| | |
| | | |
| | | <script> |
| | | |
| | | import UploadFileCommon from '@/components/common/UploadFileCommon' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import OperaSettleClaimsCheckWindow from '@/components/business/OperaSettleClaimsCheckWindow' |
| | | import onlineReporting from '@/components/enterprise/onlineReporting' |
| | | import supplementaryExplanation from '@/components/enterprise/supplementaryExplanation' |
| | | import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow' |
| | | import upload from '@/components/common/upload' |
| | | import {confirmFile, findById,exportFiles,claimsUploadFile,delFile} from '@/api/business/settleClaims' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | name: 'OperaSettleClaimsWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, OperaSettleClaimsCheckWindow, OperaInsuranceApplyDetails, UploadFileCommon, onlineReporting, supplementaryExplanation, upload }, |
| | | data () { |
| | | return { |
| | | loading: false, |
| | | doneFileDate: null, |
| | | remarkLogList: [], |
| | | list: [], |
| | | model: {}, |
| | | activeName: 'first', |
| | | reverse: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/settleClaims', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open(title,target){ |
| | | this.model = {} |
| | | this.model = target |
| | | this.title = title |
| | | this.visible = true |
| | | this.doneFileDate = null |
| | | this.remarkLogList = [] |
| | | this.getDetail() |
| | | }, |
| | | // 判断两个时间之间相差是否 |
| | | contrast24(time1, time2) { |
| | | console.log(time1) |
| | | console.log(time2) |
| | | if (time1 && time2) { |
| | | let a = new Date(time1) |
| | | let b = new Date(time2) |
| | | let timeDiff = Math.abs(a.getTime() - b.getTime()); |
| | | console.log(Math.ceil(timeDiff / (3600 * 1000))) |
| | | return Math.ceil(timeDiff / (3600 * 1000)) <= 24; |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | contrast(time1, time2) { |
| | | if (time1 && time2) { |
| | | let a = new Date(time1).getTime() |
| | | let b = new Date(time2).getTime() |
| | | return a > b |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | edit() { |
| | | let obj = JSON.parse(JSON.stringify(this.model)) |
| | | obj.areaId = obj.areaId.split(',').map(item => Number(item)) |
| | | this.$refs.onlineReporting.open('修改信息', obj) |
| | | }, |
| | | openBaoxiandan(){ |
| | | window.open(this.model.baoxiandanFile.fileurlFull); |
| | | }, |
| | | delFile(id){ |
| | | this.$dialog.messageConfirm('确认删除该附件吗,一旦删除无法撤回?') |
| | | .then(() => { |
| | | delFile(this.model.id, id).then(response => { |
| | | this.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }) |
| | | }, |
| | | getDetail(){ |
| | | findById( this.model.id) |
| | | .then(res => { |
| | | this.model = res |
| | | this.remarkLogList = [] |
| | | var logList = this.model.settleClaimsLogList |
| | | if (logList) { |
| | | logList.forEach(item => { |
| | | if (item.objType == 2) { |
| | | this.doneFileDate = item.createDate |
| | | } |
| | | if (item.objType==7) { |
| | | this.remarkLogList.push(item) |
| | | } |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | |
| | | }) |
| | | }, |
| | | handleClick(tab) { |
| | | this.activeName = tab.name |
| | | }, |
| | | callback(){ |
| | | this.getDetail() |
| | | this.$emit('success') |
| | | }, |
| | | claimsUploadFile(e, objType) { |
| | | claimsUploadFile({ |
| | | id: this.model.id, |
| | | objType, |
| | | fileUrl: e.imgaddr, |
| | | fileName: e.originname, |
| | | fileType: e.type |
| | | }).then(response => { |
| | | this.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | submit(type) { |
| | | var that = this |
| | | if (type == 0) { |
| | | this.$dialog.messageConfirm('理赔材料收集完成,请及时提交保险公司!') |
| | | .then(() => { |
| | | // this.isWorking = true |
| | | confirmFile({id:that.model.id}) |
| | | .then(response => { |
| | | that.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }) |
| | | }else if(type == 1){ |
| | | //资料下载 |
| | | this.$dialog.exportConfirm('确认进行资料下载吗?') |
| | | .then(() => { |
| | | this.isWorking = true |
| | | exportFiles({ id: that.model.id }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.$message.error("下载资料失败,请确认资料数据不为空") |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | import UploadFileCommon from '@/components/common/UploadFileCommon' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import OperaSettleClaimsCheckWindow from '@/components/business/OperaSettleClaimsCheckWindow' |
| | | import onlineReporting from '@/components/enterprise/onlineReporting' |
| | | import supplementaryExplanation from '@/components/enterprise/supplementaryExplanation' |
| | | import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow' |
| | | import upload from '@/components/common/upload' |
| | | import { confirmFile, findById, exportFiles, claimsUploadFile, delFile } from '@/api/business/settleClaims' |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | name: 'OperaSettleClaimsWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, OperaSettleClaimsCheckWindow, OperaInsuranceApplyDetails, UploadFileCommon, onlineReporting, supplementaryExplanation, upload }, |
| | | data () { |
| | | return { |
| | | loading: false, |
| | | doneFileDate: null, |
| | | remarkLogList: [], |
| | | activeLogList:[], |
| | | list: [], |
| | | model: {}, |
| | | activeName: 'first', |
| | | reverse: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/settleClaims', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.model = {} |
| | | this.model = target |
| | | this.title = title |
| | | this.visible = true |
| | | this.doneFileDate = null |
| | | this.remarkLogList = [] |
| | | this.activeLogList = [] |
| | | this.getDetail() |
| | | }, |
| | | // 判断两个时间之间相差是否 |
| | | contrast24 (time1, time2) { |
| | | console.log(time1) |
| | | console.log(time2) |
| | | if (time1 && time2) { |
| | | const a = new Date(time1) |
| | | const b = new Date(time2) |
| | | const timeDiff = Math.abs(a.getTime() - b.getTime()) |
| | | console.log(Math.ceil(timeDiff / (3600 * 1000))) |
| | | return Math.ceil(timeDiff / (3600 * 1000)) <= 24 |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | contrast (time1, time2) { |
| | | if (time1 && time2) { |
| | | const a = new Date(time1).getTime() |
| | | const b = new Date(time2).getTime() |
| | | return a > b |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | edit () { |
| | | const obj = JSON.parse(JSON.stringify(this.model)) |
| | | obj.areaId = obj.areaId.split(',').map(item => Number(item)) |
| | | this.$refs.onlineReporting.open('修改信息', obj) |
| | | }, |
| | | openBaoxiandan () { |
| | | window.open(this.model.baoxiandanFile.fileurlFull) |
| | | }, |
| | | delFile (id) { |
| | | this.$dialog.messageConfirm('确认删除该附件吗,一旦删除无法撤回?') |
| | | .then(() => { |
| | | delFile(this.model.id, id).then(response => { |
| | | this.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }) |
| | | }, |
| | | getDetail () { |
| | | findById(this.model.id) |
| | | .then(res => { |
| | | this.model = res |
| | | this.remarkLogList = [] |
| | | this.activeLogList =[] |
| | | var logList = this.model.settleClaimsLogList |
| | | if (logList) { |
| | | logList.forEach(item => { |
| | | if (item.objType == 2) { |
| | | this.doneFileDate = item.createDate |
| | | } |
| | | if (item.objType == 7) { |
| | | this.remarkLogList.push(item) |
| | | } else { |
| | | this.activeLogList.push(item) |
| | | } |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | handleClick (tab) { |
| | | this.activeName = tab.name |
| | | }, |
| | | callback () { |
| | | this.getDetail() |
| | | this.$emit('success') |
| | | }, |
| | | claimsUploadFile (e, objType) { |
| | | claimsUploadFile({ |
| | | id: this.model.id, |
| | | objType, |
| | | fileUrl: e.imgaddr, |
| | | fileName: e.originname, |
| | | fileType: e.type |
| | | }).then(response => { |
| | | this.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | submit (type) { |
| | | var that = this |
| | | if (type == 0) { |
| | | this.$dialog.messageConfirm('理赔材料收集完成,请及时提交保险公司!') |
| | | .then(() => { |
| | | // this.isWorking = true |
| | | confirmFile({ id: that.model.id }) |
| | | .then(response => { |
| | | that.getDetail() |
| | | }).catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }) |
| | | } else if (type == 1) { |
| | | // 资料下载 |
| | | this.$dialog.exportConfirm('确认进行资料下载吗?') |
| | | .then(() => { |
| | | this.isWorking = true |
| | | exportFiles({ id: that.model.id }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.$message.error('下载资料失败,请确认资料数据不为空') |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .v-modal { |