k94314517
2024-04-07 3e72240f9926463bba8d2d5cbec743dbcdcf9bd3
company/src/components/enterprise/additionSubtractionApplication.vue
@@ -202,8 +202,9 @@
                    applyStartTime: '',
                    applyEndTime: '',
                    addDetailList: [],
                    delDetailList: [],
        delDetailList: []
                },
      tempMemberIndex: -1,
                activeName: '0',
                pickerOptions: {},
                price: '',
@@ -237,6 +238,7 @@
                this.list = []
                this.form.id = null
                this.item = null
      this.tempMemberIndex = -1
                this.form.solutionId = ''
                this.form.solutionsName = ''
                this.form.applyStartTime = ''
@@ -310,7 +312,7 @@
                                    }
                                }
                            }
                        };
          }
                        // this.changeSolution1(res.solutionId)
                    })
            },
@@ -320,7 +322,6 @@
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '总价'
                        return
                    } else if (index === 7) {
                        let total = 0
                        if (this.activeName === '0') {
@@ -328,13 +329,11 @@
                                total += item.fee
                            })
                            sums[index] = total
                            return
                        } else {
                            this.form.delDetailList.forEach(item => {
                                total += item.fee
                            })
                            sums[index] = '-' + total
                            return
                        }
                    }
                })
@@ -348,7 +347,7 @@
                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)
                            }
                        })
@@ -356,7 +355,7 @@
                } 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)
                            }
                        })
@@ -483,9 +482,9 @@
                    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 })
                }
            },
            // 切换方案
@@ -509,10 +508,11 @@
                }
            },
            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
@@ -521,7 +521,7 @@
                        })
                    } 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
@@ -531,7 +531,7 @@
                    }
                })
                this.seleData = []
                this.$refs.multipleTable.clearSelection();
      this.$refs.multipleTable.clearSelection()
            },
            // 选择员工
            sele() {
@@ -577,9 +577,15 @@
                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 {