| | |
| | | <el-button type="danger" @click="deleItem">删除</el-button> |
| | | </div> |
| | | <div class="btns_item" v-if="activeName !== '1'"> |
| | | <el-button type="primary" @click="sele">选取派遣单位</el-button> |
| | | <!-- <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> |
| | | <el-table |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="item && item.hasDispatchUnit !== 1" |
| | | :key="Math.random()" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | | v-if="item && item.hasDispatchUnit !== 1" |
| | | :key="Math.random()" |
| | | prop="duName" |
| | | label="派遣单位"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | | prop="workTypeName" |
| | | label="所属工种"> |
| | | :key="Math.random()" |
| | | prop="workTypeName" |
| | | label="所属工种"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :key="Math.random()" |
| | |
| | | types: [0] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | | item.fee = '' |
| | | item.fee = item.fee |
| | | item.idCard = item.memberIdcardNo |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '总价' |
| | | } else if (index === 7) { |
| | | } else if (this.item && this.item.hasDispatchUnit === 1 && index === 6) { |
| | | let total = 0 |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.forEach(item => { |
| | |
| | | this.form.delDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | // if (total < 0) { |
| | | sums[index] = (total||0).toFixed(2) |
| | | // } else { |
| | | // sums[index] = '-' + total |
| | | // } |
| | | return |
| | | } |
| | | sums[index] = '' |
| | | } else if (this.item && this.item.hasDispatchUnit === 0 && index === 7) { |
| | | let total = 0 |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = total.toFixed(2) |
| | | return |
| | | } else { |
| | | this.form.delDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = (total||0).toFixed(2) |
| | | return |
| | | } |
| | | sums[index] = '' |
| | | } |
| | | }) |
| | | return sums |
| | |
| | | if (this.activeName === '0') { |
| | | this.seleData.forEach(item => { |
| | | this.form.addDetailList.forEach((row, index) => { |
| | | if (item === row.name) { |
| | | if (item === row.idCard) { |
| | | this.form.addDetailList.splice(index, 1) |
| | | } |
| | | }) |
| | |
| | | } else { |
| | | this.seleData.forEach(item => { |
| | | this.form.delDetailList.forEach((row, index) => { |
| | | if (item === row.name) { |
| | | if (item === row.idCard) { |
| | | this.form.delDetailList.splice(index, 1) |
| | | } |
| | | }) |
| | |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.$refs.addEmployee.open('添加加保员工', { arr: this.form.addDetailList, solutionId: this.item.newVersionSolutionId, price: this.price }) |
| | | this.$refs.addEmployee.open('添加加保员工', { arr: this.form.addDetailList, solutionId: this.item.newVersionSolutionId, price: this.price, companyId: this.item.hasDispatchUnit === 1 ? '1' : '' }) |
| | | } else { |
| | | this.$refs.addEmployee.open('添加减保员工', { arr: this.form.delDetailList, solutionId: this.item.newVersionSolutionId, price: this.reducePrice }) |
| | | this.$refs.addEmployee.open('添加减保员工', { arr: this.form.delDetailList, solutionId: this.item.newVersionSolutionId, price: this.reducePrice, companyId: this.item.hasDispatchUnit === 1 ? '1' : '' }) |
| | | } |
| | | }, |
| | | uploadUser () { |
| | |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.$refs.importEmployees.open('加保员工名单', { arr: this.form.addDetailList, type: 1, price: this.price, solutionId: this.item.newVersionSolutionId }) |
| | | this.$refs.importEmployees.open('加保员工名单', { arr: this.form.addDetailList, type: 1, price: this.price, solutionId: this.item.newVersionSolutionId, hasDispatchUnit: this.item.hasDispatchUnit }) |
| | | } else { |
| | | this.$refs.importEmployees.open('减保员工名单', { arr: this.form.delDetailList, type: 0, price: this.reducePrice, solutionId: this.item.newVersionSolutionId, insuranceApplyId: this.form.id }) |
| | | this.$refs.importEmployees.open('减保员工名单', { arr: this.form.delDetailList, type: 0, price: this.reducePrice, solutionId: this.item.newVersionSolutionId, insuranceApplyId: this.form.id, hasDispatchUnit: this.item.hasDispatchUnit }) |
| | | } |
| | | }, |
| | | // 切换方案 |
| | |
| | | this.seleData.forEach(item => { |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.forEach(row => { |
| | | if (item === row.name) { |
| | | if (item === row.idCard) { |
| | | row.workTypeName = obj.workTypeName |
| | | row.worktypeId = obj.worktypeId |
| | | row.duName = obj.duName |
| | |
| | | }) |
| | | } else { |
| | | this.form.delDetailList.forEach(row => { |
| | | if (item === row.name) { |
| | | if (item === row.idCard) { |
| | | row.workTypeName = obj.workTypeName |
| | | row.worktypeId = obj.worktypeId |
| | | row.duName = obj.duName |
| | |
| | | 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.newVersionSolutionId }) |
| | | this.$refs.confirmJobType.open('确认工种', { solutionId: this.newVersionSolutionId, type }) |
| | | }, |
| | | // 查询全部方案 |
| | | getCompany () { |
| | |
| | | return sexAndAge.age |
| | | }, |
| | | handleSelectionChange (e) { |
| | | this.seleData = e.map(item => item.name) |
| | | this.seleData = e.map(item => item.memberIdcardNo) |
| | | }, |
| | | getValue (list) { |
| | | console.log(list) |