haoxuan
2024-04-28 9ceddcd1ae23033134d4e32b02eaf272e4c77151
src/views/employeeSalary/salaryPlan/index.vue
@@ -113,11 +113,11 @@
                let workTypeNames=''
                if(item.workTypes){
                  for(let i in item.workTypes){
                    workTypeNames=workTypeNames+','+item.workTypeNames[i].name
                    workTypeNames=item.workTypes[i].workName+','+workTypeNames
                  }
                }
                let salaryFormulaValue=''
                salaryFormulaValue=item.salaryFormula?item.salaryFormula.split(",").join(''):[]
                salaryFormulaValue=item.salaryFormula?item.salaryFormula.split(",").join(''):[]
                return {
                  ...item,
                  workTypeNames:workTypeNames,
@@ -142,7 +142,7 @@
    },
    // 新增
    addBtnClick() {
      this.editRow = { title:'新建',type:'add' }
      this.editRow = { title:'新建',type: 'add' }
      this.$refs.add.islook = true;
    },
    // 搜索
@@ -157,15 +157,22 @@
    // 编辑
    handleClick(row) {
      let config=JSON.parse(JSON.stringify(row));
      let arr=config.workTypes?config.workTypes:[]
      let workTypes=[]
      if(arr&&arr.length>0){
        for(let i in arr){
          workTypes.push({
            value:arr[i].ID,
            label: arr[i].workName
          })
        }
      }
      this.editRow = { 
        ...config, 
        title:'编辑',
        type:'edit',
        id:config.ID,
        workTypeObj:{
          value:config.workTypeId,
          label:config.workType,
        }
        workTypes:workTypes
      }
      this.$refs.add.islook = true;
    },