| | |
| | | applyStartTime: '', |
| | | applyEndTime: '', |
| | | addDetailList: [], |
| | | delDetailList: [], |
| | | delDetailList: [] |
| | | }, |
| | | tempMemberIndex: -1, |
| | | activeName: '0', |
| | | pickerOptions: {}, |
| | | price: '', |
| | |
| | | this.list = [] |
| | | this.form.id = null |
| | | this.item = null |
| | | this.tempMemberIndex = -1 |
| | | this.form.solutionId = '' |
| | | this.form.solutionsName = '' |
| | | this.form.applyStartTime = '' |
| | |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | // this.changeSolution1(res.solutionId) |
| | | }) |
| | | }, |
| | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '总价' |
| | | return |
| | | } else if (index === 7) { |
| | | let total = 0 |
| | | if (this.activeName === '0') { |
| | |
| | | total += item.fee |
| | | }) |
| | | sums[index] = total |
| | | return |
| | | } else { |
| | | this.form.delDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = '-' + total |
| | | return |
| | | } |
| | | } |
| | | }) |
| | |
| | | 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.importEmployees.open('上传名单', { arr: this.form.addDetailList, price: this.price }) |
| | | this.$refs.importEmployees.open('上传名单', { arr: this.form.addDetailList, price: this.price, solutionId: this.form.solutionId }) |
| | | } else { |
| | | this.$refs.importEmployees.open('上传名单', { arr: this.form.delDetailList, price: this.price }) |
| | | this.$refs.importEmployees.open('上传名单', { arr: this.form.delDetailList, price: this.price, solutionId: this.form.solutionId }) |
| | | } |
| | | }, |
| | | // 切换方案 |
| | |
| | | } |
| | | }, |
| | | getUser(obj) { |
| | | console.log(this.seleData) |
| | | 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.seleData = [] |
| | | this.$refs.multipleTable.clearSelection(); |
| | | this.$refs.multipleTable.clearSelection() |
| | | }, |
| | | // 选择员工 |
| | | sele() { |
| | |
| | | return sexAndAge.age |
| | | }, |
| | | handleSelectionChange (e) { |
| | | this.seleData = e.map(item => item.name) |
| | | this.seleData = e.map(item => item.idCard) |
| | | }, |
| | | getValue(list) { |
| | | list.forEach(item => { |
| | | const temIndex = this.tempMemberIndex |
| | | item.id = temIndex |
| | | item.name = item.memberName |
| | | this.tempMemberIndex = this.tempMemberIndex - 1 |
| | | }) |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.push(...list) |
| | | } else { |