| | |
| | | import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow' |
| | | |
| | | import applyReturn from '@/components/enterprise/applyReturn' |
| | | import { getDetail, getSignLink, applyDetailPage, applyChagneDetailPage, exportExcel, applyChagneDetailExcel, applyOpt } from "@/api/business/insuranceApply"; |
| | | import { findListByDTO } from "@/api/business/dispatchUnit"; |
| | | import { fetchList } from "@/api/business/applyChange"; |
| | | import { findListByDTO as worktypeFindListByDTO } from "@/api/business/worktype"; |
| | | import { getDetail, getSignLink, applyDetailPage, applyChagneDetailPage, exportExcel, applyChagneDetailExcel, applyOpt } from '@/api/business/insuranceApply' |
| | | import { findListByDTO } from '@/api/business/dispatchUnit' |
| | | import { fetchList } from '@/api/business/applyChange' |
| | | import { findListByDTO as worktypeFindListByDTO } from '@/api/business/worktype' |
| | | import OperaInsuranceApplyAddWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow' |
| | | import { mapState } from 'vuex' |
| | | |
| | |
| | | name: 'OperaInsuranceApplyWindow1', |
| | | extends: BaseOpera, |
| | | components: { |
| | | GlobalWindow, |
| | | GlobalWindow, |
| | | OperaPdfViewerWindow, |
| | | InsuranceDetails, |
| | | OperaInsuranceApplyCheckWindow, |
| | | applyReturn, |
| | | InsuranceDetails, |
| | | OperaInsuranceApplyCheckWindow, |
| | | applyReturn, |
| | | OperaInsuranceApplyAddWindow, |
| | | additionSubtractionApplication, |
| | | factoryChange, |
| | | OperaApplyChangeDetailWindow, |
| | | OperaApplyChangeUnitDetailWindow, |
| | | operaverifyPhoneNumberWindew |
| | | additionSubtractionApplication, |
| | | factoryChange, |
| | | OperaApplyChangeDetailWindow, |
| | | OperaApplyChangeUnitDetailWindow, |
| | | operaverifyPhoneNumberWindew |
| | | }, |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | | dataId:null, |
| | | dataId: null, |
| | | model: {}, |
| | | form: { |
| | | id: null, |
| | | editDate: '' |
| | | id: null, |
| | | editDate: '' |
| | | }, |
| | | // 验证规则 |
| | | rules: { |
| | | }, |
| | | formInline: { |
| | | applyStatus: '', |
| | | duId: '', |
| | | workTypeId: '', |
| | | memberName: '', |
| | | end: [], |
| | | start: [], |
| | | endTimeE: '', |
| | | endTimeS: '', |
| | | startTimeE: '', |
| | | startTimeS: '', |
| | | type: '' |
| | | applyStatus: '', |
| | | duId: '', |
| | | workTypeId: '', |
| | | memberName: '', |
| | | end: [], |
| | | start: [], |
| | | endTimeE: '', |
| | | endTimeS: '', |
| | | startTimeE: '', |
| | | startTimeS: '', |
| | | type: '' |
| | | }, |
| | | visible1: false, |
| | | visible2: false, |
| | |
| | | radio: 0, |
| | | activities: [], |
| | | tableData: [], |
| | | list: [], |
| | | list1: [], |
| | | list2: [], |
| | | dwList: [], |
| | | gzList: [], |
| | | list: [], |
| | | list1: [], |
| | | list2: [], |
| | | dwList: [], |
| | | gzList: [], |
| | | activeName: '0', |
| | | total: 0, |
| | | total: 0, |
| | | currentPage: 1, |
| | | loading: false |
| | | loading: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | methods: { |
| | | open(title,target){ |
| | | this.visible = true; |
| | | this.title = title |
| | | this.model = {} |
| | | this.dataId = null |
| | | this.dataId = target.id |
| | | this.formInline.applyStatus = '' |
| | | this.formInline.duId = '' |
| | | this.formInline.workTypeId = '' |
| | | this.formInline.memberName = '' |
| | | this.formInline.end = '' |
| | | this.formInline.start = '' |
| | | this.formInline.endTimeE = '' |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.startTimeS = '' |
| | | this.formInline.type = '' |
| | | this.activeName = '0' |
| | | this.getDetail() |
| | | this.getList() |
| | | this.getDW() |
| | | this.getGZ() |
| | | }, |
| | | // 关闭订单 |
| | | closeOrder () { |
| | | this.$confirm('确认关闭此订单吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | applyOpt({ |
| | | applyId: this.dataId, |
| | | optType: 2 |
| | | }).then(res => { |
| | | this.getDetail() |
| | | }) |
| | | }).catch(() => { |
| | | open (title, target) { |
| | | this.visible = true |
| | | this.title = title |
| | | this.model = {} |
| | | this.dataId = null |
| | | this.dataId = target.id |
| | | this.formInline.applyStatus = '' |
| | | this.formInline.duId = '' |
| | | this.formInline.workTypeId = '' |
| | | this.formInline.memberName = '' |
| | | this.formInline.end = '' |
| | | this.formInline.start = '' |
| | | this.formInline.endTimeE = '' |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.startTimeS = '' |
| | | this.formInline.type = '' |
| | | this.activeName = '0' |
| | | this.getDetail() |
| | | this.getList() |
| | | this.getDW() |
| | | this.getGZ() |
| | | }, |
| | | // 关闭订单 |
| | | closeOrder () { |
| | | this.$confirm('确认关闭此订单吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | applyOpt({ |
| | | applyId: this.dataId, |
| | | optType: 2 |
| | | }).then(res => { |
| | | this.getDetail() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | }, |
| | | // 派遣单位 |
| | | getDW() { |
| | | findListByDTO({ applyId: this.dataId }) |
| | | .then(res => { |
| | | this.dwList = res |
| | | }) |
| | | }, |
| | | // 工种 |
| | | getGZ() { |
| | | worktypeFindListByDTO({ |
| | | id: this.dataId, |
| | | queryType: 2 |
| | | }).then(res => { |
| | | this.gzList = res |
| | | }) |
| | | }, |
| | | resetting() { |
| | | if (this.activeName === '0') { |
| | | this.formInline.applyStatus = '0' |
| | | } else { |
| | | this.formInline.applyStatus = '' |
| | | } |
| | | this.formInline.start = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.endTimeE = '' |
| | | this.list = [] |
| | | this.list1 = [] |
| | | this.list2 = [] |
| | | this.formInline.duId = '' |
| | | this.formInline.workTypeId = '' |
| | | this.formInline.memberName = '' |
| | | this.formInline.end = [] |
| | | this.formInline.end = [] |
| | | this.formInline.endTimeE = '' |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.startTimeS = '' |
| | | this.search() |
| | | }, |
| | | search() { |
| | | this.currentPage = 1 |
| | | this.getList() |
| | | }, |
| | | changeStart(e) { |
| | | if (e.length > 0) { |
| | | this.formInline.startTimeS = e[0] |
| | | this.formInline.startTimeE = e[1] |
| | | } else { |
| | | this.formInline.startTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | changeEnd(e) { |
| | | if (e.length > 0) { |
| | | this.formInline.endTimeS = e[0] |
| | | this.formInline.endTimeE = e[1] |
| | | } else { |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.endTimeE = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | exportExcel() { |
| | | if (this.activeName === '0') { |
| | | exportExcel({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | solutionName: this.tableData[0].solutionsName, |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS |
| | | } |
| | | }).then(response => { |
| | | this.download(response) |
| | | }) |
| | | } else { |
| | | applyChagneDetailExcel({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS, |
| | | type: this.formInline.type |
| | | } |
| | | }).then(response => { |
| | | this.download(response) |
| | | }) |
| | | }) |
| | | }, |
| | | // 派遣单位 |
| | | getDW () { |
| | | findListByDTO({ applyId: this.dataId }) |
| | | .then(res => { |
| | | this.dwList = res |
| | | }) |
| | | }, |
| | | // 工种 |
| | | getGZ () { |
| | | worktypeFindListByDTO({ |
| | | id: this.dataId, |
| | | queryType: 2 |
| | | }).then(res => { |
| | | this.gzList = res |
| | | }) |
| | | }, |
| | | resetting () { |
| | | if (this.activeName === '0') { |
| | | this.formInline.applyStatus = '0' |
| | | } else { |
| | | this.formInline.applyStatus = '' |
| | | } |
| | | this.formInline.start = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.endTimeE = '' |
| | | this.list = [] |
| | | this.list1 = [] |
| | | this.list2 = [] |
| | | this.formInline.duId = '' |
| | | this.formInline.workTypeId = '' |
| | | this.formInline.memberName = '' |
| | | this.formInline.end = [] |
| | | this.formInline.end = [] |
| | | this.formInline.endTimeE = '' |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | this.formInline.startTimeS = '' |
| | | this.search() |
| | | }, |
| | | search () { |
| | | this.currentPage = 1 |
| | | this.getList() |
| | | }, |
| | | changeStart (e) { |
| | | if (e.length > 0) { |
| | | this.formInline.startTimeS = e[0] |
| | | this.formInline.startTimeE = e[1] |
| | | } else { |
| | | this.formInline.startTimeS = '' |
| | | this.formInline.startTimeE = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | changeEnd (e) { |
| | | if (e.length > 0) { |
| | | this.formInline.endTimeS = e[0] |
| | | this.formInline.endTimeE = e[1] |
| | | } else { |
| | | this.formInline.endTimeS = '' |
| | | this.formInline.endTimeE = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | exportExcel () { |
| | | if (this.activeName === '0') { |
| | | exportExcel({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | solutionName: this.tableData[0].solutionsName, |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS |
| | | } |
| | | }, |
| | | getList() { |
| | | if (this.activeName === '0') { |
| | | applyDetailPage({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS |
| | | } |
| | | }).then(res => { |
| | | this.list = res.records |
| | | this.total = res.total |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.table) |
| | | if (this.$refs.table && this.$refs.table.doLayout) { |
| | | this.$refs.table.doLayout(); |
| | | } |
| | | }); |
| | | }) |
| | | } else { |
| | | fetchList({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | status: this.formInline.applyStatus, |
| | | endTimeE: this.formInline.endTimeS, |
| | | endTimeS: this.formInline.startTimeS, |
| | | type: this.formInline.type |
| | | } |
| | | }).then(res => { |
| | | if (this.activeName === '1') { |
| | | this.list1 = res.records |
| | | } else if (this.activeName === '2') { |
| | | this.list2 = res.records |
| | | } |
| | | this.total = res.total |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.table) |
| | | if (this.$refs.table && this.$refs.table.doLayout) { |
| | | this.$refs.table.doLayout(); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | handleClick(e) { |
| | | this.activeName = e.index |
| | | if (e.index === '1') { |
| | | this.formInline.type = 0 |
| | | } else if (e.index === '2') { |
| | | this.formInline.type = 1 |
| | | }).then(response => { |
| | | this.download(response) |
| | | }) |
| | | } else { |
| | | applyChagneDetailExcel({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS, |
| | | type: this.formInline.type |
| | | } |
| | | }).then(response => { |
| | | this.download(response) |
| | | }) |
| | | } |
| | | }, |
| | | getList () { |
| | | if (this.activeName === '0') { |
| | | applyDetailPage({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | applyStatus: this.formInline.applyStatus, |
| | | duId: this.formInline.duId, |
| | | workTypeId: this.formInline.workTypeId, |
| | | memberName: this.formInline.memberName, |
| | | endTimeE: this.formInline.endTimeE, |
| | | endTimeS: this.formInline.endTimeS, |
| | | startTimeE: this.formInline.startTimeE, |
| | | startTimeS: this.formInline.startTimeS |
| | | } |
| | | }).then(res => { |
| | | this.list = res.records |
| | | this.total = res.total |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.table) |
| | | if (this.$refs.table && this.$refs.table.doLayout) { |
| | | this.$refs.table.doLayout() |
| | | } |
| | | this.resetting() |
| | | }, |
| | | goSign(){ |
| | | this.loading = true |
| | | }) |
| | | }) |
| | | } else { |
| | | fetchList({ |
| | | capacity: 10, |
| | | page: this.currentPage, |
| | | model: { |
| | | applyId: this.dataId, |
| | | status: this.formInline.applyStatus, |
| | | endTimeE: this.formInline.endTimeS, |
| | | endTimeS: this.formInline.startTimeS, |
| | | type: this.formInline.type |
| | | } |
| | | }).then(res => { |
| | | if (this.activeName === '1') { |
| | | this.list1 = res.records |
| | | } else if (this.activeName === '2') { |
| | | this.list2 = res.records |
| | | } |
| | | this.total = res.total |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs.table) |
| | | if (this.$refs.table && this.$refs.table.doLayout) { |
| | | this.$refs.table.doLayout() |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleClick (e) { |
| | | this.activeName = e.index |
| | | if (e.index === '1') { |
| | | this.formInline.type = 0 |
| | | } else if (e.index === '2') { |
| | | this.formInline.type = 1 |
| | | } |
| | | this.resetting() |
| | | }, |
| | | goSign () { |
| | | this.loading = true |
| | | getSignLink(this.dataId).then(res => { |
| | | this.loading = false |
| | | this.loading = false |
| | | // setTimeout(() => { |
| | | window.open(res) |
| | | window.open(res) |
| | | // }, 500); |
| | | }).catch(err => { |
| | | this.loading = false |
| | | this.$tip.apiFailed(err) |
| | | this.loading = false |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }, |
| | | viewToubaodan(){ |
| | | if(this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull){ |
| | | setTimeout(() => { |
| | | this.$refs.OperaPdfViewerWindow.open('查看投保单',this.model.toubaodanSignedFile.fileurlFull) |
| | | // window.open(this.model.toubaodanSignedFile.fileurlFull) |
| | | }, 500); |
| | | |
| | | } else if(this.model.toubaodanFile && this.model.toubaodanFile.fileurlFull){ |
| | | setTimeout(() => { |
| | | this.$refs.OperaPdfViewerWindow.open('查看投保单',this.model.toubaodanFile.fileurlFull) |
| | | // window.open(this.model.toubaodanFile.fileurlFull) |
| | | },500) |
| | | } |
| | | viewToubaodan () { |
| | | if (this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull) { |
| | | setTimeout(() => { |
| | | this.$refs.OperaPdfViewerWindow.open('查看投保单', this.model.toubaodanSignedFile.fileurlFull) |
| | | // window.open(this.model.toubaodanSignedFile.fileurlFull) |
| | | }, 500) |
| | | } else if (this.model.toubaodanFile && this.model.toubaodanFile.fileurlFull) { |
| | | setTimeout(() => { |
| | | this.$refs.OperaPdfViewerWindow.open('查看投保单', this.model.toubaodanFile.fileurlFull) |
| | | // window.open(this.model.toubaodanFile.fileurlFull) |
| | | }, 500) |
| | | } |
| | | }, |
| | | viewBaoxiandan(){ |
| | | if(this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull){ |
| | | this.$refs.OperaPdfViewerWindow.open('查看保险单',this.model.baoxiandanFile.fileurlFull) |
| | | viewBaoxiandan () { |
| | | if (this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull) { |
| | | this.$refs.OperaPdfViewerWindow.open('查看保险单', this.model.baoxiandanFile.fileurlFull) |
| | | // window.open(this.model.baoxiandanFile.fileurlFull) |
| | | } |
| | | }, |
| | | handleSizeChange(val){ |
| | | console.log(val) |
| | | handleSizeChange (val) { |
| | | console.log(val) |
| | | }, |
| | | handleCurrentChange(val){ |
| | | console.log(val) |
| | | this.currentPage = val |
| | | this.getList() |
| | | handleCurrentChange (val) { |
| | | console.log(val) |
| | | this.currentPage = val |
| | | this.getList() |
| | | }, |
| | | onSubmit(){ |
| | | onSubmit () { |
| | | |
| | | }, |
| | | getDetail(){ |
| | | getDetail () { |
| | | getDetail(this.dataId).then(res => { |
| | | console.log(res) |
| | | this.model = res |
| | |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | successEvent(){ |
| | | // this.visible=false |
| | | successEvent () { |
| | | // this.visible=false |
| | | this.getDetail() |
| | | this.$emit('success') |
| | | } |