薪资方案列表联调字段调试+处计费公式定义数据形式用列表显示+删薪资方案接口联调+保存薪资方案接口联调
5个文件已修改
116 ■■■■■ 已修改文件
src/assets/style/index.scss 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/TableCommonView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/employeeSalary/attendanceStatistics/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/employeeSalary/salaryPlan/components/addDialog.vue 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/employeeSalary/salaryPlan/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/style/index.scss
@@ -164,8 +164,17 @@
.font_weight_700{
  font-weight: 700;
}
.cursor_pinter{
  cursor: pointer;
.circle_blue{
  padding:0 3px;
  text-align:center;
  display:inline-block;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
  background:#72a3f8;
  color:#fff;
}
.btn-pager {
  display: flex;
src/components/makepager/TableCommonView.vue
@@ -42,7 +42,7 @@
      
      <template slot="header">
          {{ item.label }}
          <span v-if="item.weekDay">/{{item.weekDay}}</span>
          <span v-if="item.weekDay"> - {{item.weekDay}}</span>
          <span v-if="item.iconRight">
            <i
              :class="item.iconRight"
src/views/employeeSalary/attendanceStatistics/index.vue
@@ -170,7 +170,7 @@
                      label:headerList.details[i].date+'',
                      weekDay:headerList.details[i].weekDay+'',
                      prop:'headerDate'+headerList.details[i].date,
                      min:100,
                      min:90,
                      default:true,
                      isCallMethod:true,
                      isClass: true,
src/views/employeeSalary/salaryPlan/components/addDialog.vue
@@ -341,6 +341,46 @@
    tabClickBottom(activeName) {
      this.activeName = activeName;
    },
    formInfo() {
      if (this.islook) {
        this.form = {
          name: "",
          workTypes: [],
          salaryType: "",
          salaryFormula: "",
          salaryFormulaHtml: "",
          error: "",
          purchaseTypeList: [1],
          cycle: '1',
        };
        this.$nextTick(() => {
          this.$refs["form"].resetFields();
          if (this.editRow.id) {
            this.form = JSON.parse(JSON.stringify(this.editRow));
            let salaryFormula=this.form.salaryFormula?this.form.salaryFormula:''
            this.form.salaryFormulaHtml=''
            this.form.salaryFormula=''
            this.form.purchaseTypeList =[1]
            let arr=salaryFormula?salaryFormula.split(','):[]
            let formulaNameArr=this.formulaName.concat(this.formulaNameTwo).concat(this.formulaSymbol)
            if(arr.length>0){
              for(let i in arr){
                for(let j in formulaNameArr){
                  let reg2 =
                    /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                  if (reg2.test(arr[i])) {
                    this.formulaClick({ name: "常量数字", type: 3, width: 2, },arr[i]);
                  }else if(formulaNameArr[j].name==arr[i]){
                    this.formulaClick(formulaNameArr[j])
                  }
                }
              }
            }
          }
        });
      }
    },
    // 点击生产数据和考勤及补贴数据 赋值计费公式定义
    formulaClick(item, value) {
      let string = "";
@@ -414,9 +454,9 @@
        }
        if (!string) {
          this.form.error = 2;
          this.$set(this.form,'error',2)
        } else {
          this.form.error = 1;
          this.$set(this.form,'error',1)
        }
      }
    },
@@ -470,26 +510,6 @@
        this.unitList = res.data;
      });
    },
    formInfo() {
      if (this.islook) {
        this.form = {
          name: "",
          workTypes: [],
          salaryType: "",
          salaryFormula: "",
          salaryFormulaHtml: "",
          error: "",
          purchaseTypeList: [1],
          cycle: '1',
        };
        this.$nextTick(() => {
          this.$refs["form"].resetFields();
          if (this.editRow.id) {
            this.form = JSON.parse(JSON.stringify(this.editRow));
          }
        });
      }
    },
    getSelectDataList() {
      getWorkTypeList({
        page: 0,
@@ -511,6 +531,11 @@
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.checkFormula()
          if(this.form.error==2){
            this.$message.error("请检查计费公式定义!");
            return true;
          }
          let form = JSON.parse(JSON.stringify(this.form));
          let arr = form.salaryFormula.split(",");
           arr=arr.splice(0,arr.length-1)
@@ -519,6 +544,16 @@
            this.$message.error("请点击野纤数量配置生丝标准!");
            return true;
          }
          let workTypes=[]
          if(form.workTypes&&form.workTypes.length>0){
            for(let i in form.workTypes){
              workTypes.push({
                workName:form.workTypes[i].label,
                id:form.workTypes[i].value
              })
            }
          }
          form.workTypes=workTypes
          saveSalaryPlan(form).then((res) => {
            if (res.code == 200) {
              this.$message({
src/views/employeeSalary/salaryPlan/index.vue
@@ -12,10 +12,9 @@
        <TableCommonView
          :table-list="tableList"
          @selTableCol="selTableCol"
          @tableRowClick="tableRowClick"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="180">
            <el-table-column label="操作" width="110">
              <template slot-scope="scope">
                <el-button @click.stop="handleClick(scope.row)" type="text" size="small">修改</el-button>
                <el-button @click.stop="delClick(scope.row)" type="text" size="small">删除</el-button>
@@ -54,7 +53,7 @@
        { label: "工种", prop: "workTypeNames",min:100 },
        { label: "薪资类型", prop: "salaryType",min:110 },
        { label: "计费周期", prop: "cycle",min:110 },
        { label: "计费公式定义", prop: "salaryFormula",min:140  },
        { label: "计费公式定义", prop: "salaryFormulaValue",min:140  },
        { label: "添加时间", prop: "createTime",min:130 },
        { label: "添加人", prop: "addPeople",min:110 },
      ],
@@ -117,9 +116,12 @@
                    workTypeNames=workTypeNames+','+item.workTypeNames[i].name
                  }
                }
                let salaryFormulaValue=''
                salaryFormulaValue=item.salaryFormula?item.salaryFormula.split(",").join(''):[]
                return {
                  ...item,
                  workTypeNames:workTypeNames
                  workTypeNames:workTypeNames,
                  salaryFormulaValue:salaryFormulaValue,
                }
              })
              this.tableList.tableInfomation = list || []
@@ -152,16 +154,14 @@
    refresh(){
      this.getData()
    },
    // 表格行点击
    tableRowClick(row) {
      console.log(row, "row")
    },
    // 编辑
    handleClick(row) {
      let config=JSON.parse(JSON.stringify(row));
      this.editRow = { ...config,
      this.editRow = {
        ...config,
        title:'编辑',
        type:'edit',
        id:config.ID,
        workTypeObj:{
          value:config.workTypeId,
          label:config.workType,
@@ -177,7 +177,7 @@
        type: "warning"
      })
        .then(() => {
          deleteSalaryPlanInfo({ id: row.id }).then((response) => {
          deleteSalaryPlanInfo({ id: row.ID }).then((response) => {
            if (response.code === 200) {
              this.$message.success("删除成功")
              this.getData()