| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import selectEmployees from '@/components/enterprise/selectEmployees' |
| | | import addEmployee from '@/components/enterprise/addEmployee' |
| | | import addEmployee from '@/components/enterprise/addEmployeeWithDu' |
| | | import importEmployees from '@/components/enterprise/importEmployees' |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import detailsPolicyholder from '@/components/business/detailsPolicyholder' |
| | | // import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow' |
| | | // import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow' |
| | | import { all, getNewVersion } from '@/api/business/solutions' |
| | | import { mapState } from 'vuex' |
| | | import { create, getCountCyclePriceVO, getDetail, findList, updateData } from '@/api/business/insuranceApply' |
| | | import { create, getCountCyclePriceVO, getDetail, findList } from '@/api/business/insuranceApply' |
| | | import { UTable, UTableColumn } from 'umy-ui' |
| | | // Vue.component(UTable.name, UTable); |
| | | // Vue.component(UTableColumn.name, UTableColumn); |
| | | export default { |
| | | name: 'OperaInsuranceApplyAddWindow', |
| | | name: 'OperaInsuranceApplyAddWindowNew', |
| | | extends: BaseOpera, |
| | | components: { |
| | | GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType, detailsPolicyholder, UTable, UTableColumn |
| | | // , OperaWtbApplyShopWindow, OperaInsuranceApplyDetails |
| | | GlobalWindow, |
| | | selectEmployees, |
| | | addEmployee, |
| | | importEmployees, |
| | | confirmJobType, |
| | | detailsPolicyholder, |
| | | UTable, |
| | | UTableColumn |
| | | }, |
| | | data () { |
| | | return { |
| | | sumFee:0, |
| | | sumFee: 0, |
| | | form: { |
| | | id: null, |
| | | ID: null, |
| | |
| | | // 监听tableData的变化 |
| | | tableData: { |
| | | deep: true, |
| | | handler(newVal, oldVal) { |
| | | handler (newVal, oldVal) { |
| | | // 数据变化时的处理逻辑 |
| | | this.getSummaries2() |
| | | console.log(this.tableData.length) |
| | |
| | | solutionId: this.form.solutionId |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.visible = false |
| | | if (this.item.type == 1) { |
| | | // this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: res }) |
| | | this.$emit('success', 1, { id: res }) |
| | | } else { |
| | | // this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: res }) |
| | | this.$emit('success', 1, { id: res }) |
| | | } |
| | | this.$emit('success', 1, { id: res,godetail:true,type:this.item.type}) |
| | | this.$tip.apiSuccess('操作成功') |
| | | this.visible = false |
| | | // this.$emit('success','委托投保详情', { id: res }) |
| | | }) |
| | | .catch(e => { |
| | |
| | | }) |
| | | sums[index] = total.toFixed(2) |
| | | // } |
| | | }else { |
| | | } else { |
| | | sums[index] = '' |
| | | } |
| | | }) |
| | |
| | | return sums |
| | | }, |
| | | getSummaries2 () { |
| | | this.sumFee = 0; |
| | | if(this.tableData&&this.tableData.length){ |
| | | this.sumFee = 0 |
| | | if (this.tableData && this.tableData.length) { |
| | | this.tableData.forEach((column, index) => { |
| | | this.sumFee = parseFloat(this.sumFee) + parseFloat(column.fee) |
| | | }) |
| | |
| | | |
| | | let price = 0 |
| | | // if (this.item && this.item.type != 1) { |
| | | this.tableData.forEach(item => { |
| | | price = price + item.fee |
| | | }) |
| | | this.tableData.forEach(item => { |
| | | price = price + item.fee |
| | | }) |
| | | // } |
| | | this.$refs.detailsPolicyholder.open('投保详情单', { |
| | | companyName: this.userInfo.company.name, |
| | |
| | | this.$message.warning('请先选择保险方案') |
| | | return |
| | | } |
| | | this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price }) |
| | | this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price, solutionId: this.form.solutionId }) |
| | | }, |
| | | uploadUser () { |
| | | if (!this.form.solutionId) { |
| | |
| | | }, |
| | | // 切换方案 |
| | | changeSolution (e) { |
| | | this.sumFee =0; |
| | | this.sumFee = 0 |
| | | this.form.applyEndTime = '' |
| | | this.form.applyStartTime = '' |
| | | if (!this.form.id) { |
| | |
| | | }) |
| | | this.tableData.forEach(item => { |
| | | // if (this.item.type != 0) { |
| | | item.fee = this.price |
| | | item.fee = this.price |
| | | // } |
| | | }) |
| | | }, |