| | |
| | | <div class="list"> |
| | | <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> |
| | | <el-form-item label="保险方案" prop="solutionId"> |
| | | <el-select v-model="form.solutionId" @change="changeSolution" placeholder="请选择"> |
| | | <el-select v-model="form.solutionId" filterable @change="changeSolution" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in company" |
| | | :key="item.id" |
| | |
| | | <div style="display: inline-block;margin-right: 30px;font-size: 14px"><span>合计费用:</span> |
| | | <span style="font-weight: bold;color: red">{{sumFee}}</span>元 |
| | | </div> |
| | | <el-button type="primary" @click="sele">选取派遣单位</el-button> |
| | | <el-button type="primary" @click="sele(1)" v-if="item && item.hasDispatchUnit !== 1">选取派遣单位</el-button> |
| | | <el-button type="primary" @click="sele(2)" v-if="item && item.hasDispatchUnit === 1">选取工种</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- show-summary |
| | |
| | | </template> |
| | | </u-table-column> |
| | | <u-table-column |
| | | v-if="item && item.hasDispatchUnit !== 1" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | | </u-table-column> |
| | |
| | | import importEmployees from '@/components/enterprise/importEmployees' |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import detailsPolicyholder from '@/components/business/detailsPolicyholder' |
| | | import { all, getNewVersion } from '@/api/business/solutions' |
| | | import { all, getNewVersion, getUseList } from '@/api/business/solutions' |
| | | import { mapState } from 'vuex' |
| | | import { create, getCountCyclePriceVO, getDetail, findList } from '@/api/business/insuranceApply' |
| | | import { UTable, UTableColumn } from 'umy-ui' |
| | |
| | | ID: null, |
| | | solutionId: '', |
| | | applyStartTime: '', |
| | | applyEndTime: '' |
| | | applyEndTime: '', |
| | | companyId: null |
| | | }, |
| | | solutionName: '', |
| | | type: '', |
| | |
| | | this.isWorking = true |
| | | // if (!this.form.id) { |
| | | create({ |
| | | companyId: this.form.companyId, |
| | | applyDetailList: arr, |
| | | applyStartTime: this.form.applyStartTime, |
| | | applyEndTime: this.form.applyEndTime, |
| | |
| | | this.form.solutionId = '' |
| | | this.form.applyStartTime = '' |
| | | this.form.applyEndTime = '' |
| | | if (target.companyId) { |
| | | this.form.companyId = target.companyId |
| | | this.form.companyName = target.companyName |
| | | } |
| | | if (target && target.id) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | |
| | | this.$message.warning('至少添加一项员工') |
| | | return |
| | | } |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | console.log(this.tableData[i].worktypeId) |
| | | console.log(this.tableData[i].duId) |
| | | if (!this.tableData[i].worktypeId || !this.tableData[i].duId) { |
| | | this.$message.warning('请完善派遣单位和工种信息') |
| | | return |
| | | if (this.item.hasDispatchUnit !== 1) { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (!this.tableData[i].worktypeId || !this.tableData[i].duId) { |
| | | this.$message.warning('请完善派遣单位和工种信息') |
| | | return |
| | | } |
| | | } |
| | | } else { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (!this.tableData[i].worktypeId) { |
| | | this.$message.warning('请完善派工种信息') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | |
| | | let price = 0 |
| | | // if (this.item && this.item.type != 1) { |
| | | this.tableData.forEach(item => { |
| | | price = price + item.fee |
| | | }) |
| | | // } |
| | | this.$refs.detailsPolicyholder.open('投保详情单', { |
| | | companyName: this.userInfo.company.name, |
| | | solutionName: this.item.name, |
| | | solutionType: this.item.type, |
| | | applyStartTime: this.form.applyStartTime, |
| | | applyEndTime: this.form.applyEndTime, |
| | | insureNum: this.tableData.length, |
| | | totalPrice: price, |
| | | detailList: this.tableData |
| | | }) |
| | | if (!this.form.companyId) { |
| | | this.$refs.detailsPolicyholder.open('投保详情单', { |
| | | companyName: this.userInfo.company.name, |
| | | solutionName: this.item.name, |
| | | solutionType: this.item.type, |
| | | applyStartTime: this.form.applyStartTime, |
| | | applyEndTime: this.form.applyEndTime, |
| | | insureNum: this.tableData.length, |
| | | totalPrice: price, |
| | | detailList: this.tableData |
| | | }) |
| | | } else { |
| | | this.$refs.detailsPolicyholder.open('投保详情单', { |
| | | companyName: this.form.companyName, |
| | | solutionName: this.item.name, |
| | | solutionType: this.item.type, |
| | | applyStartTime: this.form.applyStartTime, |
| | | applyEndTime: this.form.applyEndTime, |
| | | insureNum: this.tableData.length, |
| | | totalPrice: price, |
| | | detailList: this.tableData |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$message.warning('请先选择保险方案') |
| | | return |
| | | } |
| | | this.$refs.selectEmployees.open('选取员工', { arr: this.tableData, price: this.price, type: 1 }) |
| | | this.$refs.selectEmployees.open('选取员工', { arr: this.tableData, price: this.price, type: 1, companyId: this.form.companyId }) |
| | | }, |
| | | addUser () { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请先选择保险方案') |
| | | return |
| | | } |
| | | this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price, solutionId: this.form.solutionId }) |
| | | this.$refs.addEmployee.open('添加员工', { arr: this.tableData, price: this.price, solutionId: this.form.solutionId, companyId: this.form.companyId }) |
| | | }, |
| | | uploadUser () { |
| | | if (!this.form.solutionId) { |
| | |
| | | this.$refs.multipleTable.clearSelection() |
| | | }, |
| | | // 选择员工 |
| | | sele () { |
| | | sele (type) { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请选择保险方案') |
| | | return |
| | |
| | | this.$message.warning('请选择员工') |
| | | return |
| | | } |
| | | this.$refs.confirmJobType.open('确认工种', { solutionId: this.form.solutionId }) |
| | | this.$refs.confirmJobType.open('确认工种', { solutionId: this.form.solutionId, type }) |
| | | }, |
| | | // 查询全部方案 |
| | | getCompany () { |
| | | all({}) |
| | | getUseList(this.form.companyId, 2) |
| | | .then(res => { |
| | | this.company = res |
| | | }) |
| | | // all({ companyId: this.form.companyId }) |
| | | // .then(res => { |
| | | // this.company = res |
| | | // }) |
| | | }, |
| | | getAgeByIdCard (idCard) { |
| | | const sexAndAge = {} |