haoxuan
2024-04-29 9a1a38de1cead46bfb28e22cdbdcf3fd32a4a94b
src/views/employeeSalary/salaryPlan/components/addDialog.vue
@@ -35,9 +35,9 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item prop="salaryType" label="薪资类型">
        <el-form-item prop="salaryTypeId" label="薪资类型">
          <el-select
            v-model="form.salaryType"
            v-model="form.salaryTypeId"
            style="width: calc(100% - 40px)"
            placeholder="请选择车间"
          >
@@ -45,7 +45,7 @@
              v-for="item in unitList"
              :key="item.id"
              :label="item.name"
              :value="item.name"
              :value="item.id"
            >
            </el-option>
          </el-select>
@@ -169,7 +169,7 @@
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button type="cancel" @click="cancelMethod()">取消</el-button>
        <el-button type="primary" @click="submitForm('form')">确 定</el-button>
        <el-button type="primary" :loading="isAddloading" @click="submitForm('form')">确 定</el-button>
      </span>
    </el-dialog>
    <BomDialog
@@ -221,7 +221,7 @@
      form: {
        name: "",
        workTypes: [],
        salaryType: "",
        salaryTypeId: null,
        salaryFormula: "",
        salaryFormulaHtml: "",
        error: "",
@@ -325,7 +325,7 @@
            trigger: ["blur", "change"],
          },
        ],
        salaryType: [
        salaryTypeId: [
          { required: true, message: "请选择", trigger: ["blur", "change"] },
        ],
        salaryFormulaHtml: [
@@ -334,6 +334,7 @@
      },
      unitList: [],
      constType: "",
      isAddloading: false,
    };
  },
  computed: {},
@@ -363,7 +364,7 @@
        this.form = {
          name: "",
          workTypes: [],
          salaryType: "",
          salaryTypeId: null,
          salaryFormula: "",
          salaryFormulaHtml: "",
          error: "",
@@ -553,6 +554,7 @@
          values: dataList,
        }
      }
      this.isAddloading = true;
      saveSalaryType(params).then((res) => {
        if (res.code == 200) {
          this.$message({
@@ -568,6 +570,11 @@
          }
          this.handleGetBomKindDictList(val?val:'');
        }
        this.isAddloading = false;
      }).catch(() => {
                setTimeout(() => {
                  this.isAddloading = false;
                }, 3000);
      });
    },
    handleGetBomKindDictList(val) {