yxh
yxh
7 天以前 8022f7036945b75f82f2dfc43055623f81ed98f6
src/views/project/fundflowrule/index.vue
@@ -240,6 +240,18 @@
            v-if="scope.row.totallevel == '3'"
            size="mini"
            >三级</el-button
          ><el-button
            type="primary"
            plain
            v-if="scope.row.totallevel == '4'"
            size="mini"
            >四级</el-button
          ><el-button
            type="primary"
            plain
            v-if="scope.row.totallevel == '5'"
            size="mini"
            >五级</el-button
          >
        </template>
      </el-table-column>
@@ -290,27 +302,34 @@
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="费用类别" prop="applytype">
              <el-select v-model="form.applytype" placeholder="请选择费用类别" style="width:100%">
                <el-option
                  v-for="dict in dict.type.sys_ConsolationType"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="费用类别" prop="fundtype">
              <el-select v-model="form.fundtype" placeholder="请选择费用类别" style="width:100%">
              <el-select
                v-model="form.fundtype"
                placeholder="请选择费用类别"
                style="width:100%"
              >
                <el-option
                  v-for="dict in dict.type.sys_fundtypes"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="费用名称" prop="applytype">
              <el-select
                v-model="form.applytype"
                placeholder="请选择费用名称"
                style="width:100%"
              >
                <el-option
                  v-for="dict in dict.type.sys_ConsolationType"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
@@ -375,13 +394,29 @@
        </el-row>
        <el-row>
          <el-col>
          <el-col :span="12">
            <el-form-item
              label="是否只审核同部门"
              prop="verificationdept"
              label-width="140px"
            >
              <el-radio-group v-model="form.verificationdept">
                <el-radio
                  v-for="dict in yesnoArr"
                  :key="dict.value"
                  :label="parseInt(dict.value)"
                  >{{ dict.label }}</el-radio
                >
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="是否是必审人"
              prop="mustAudite"
              label-width="140px"
            >
              <el-radio-group v-model="form.mustAudite">
                <el-radio
                  v-for="dict in yesnoArr"
                  :key="dict.value"
@@ -408,7 +443,7 @@
  delFundflowrule,
  addFundflowrule,
  updateFundflowrule,
  exportFundflowrule,
  exportFundflowrule
} from "@/api/project/fundflowrule";
export default {
@@ -417,7 +452,7 @@
    "sys_expensetype",
    "sys_consolationfundlevel",
    "sys_fundtypes",
    "sys_ConsolationType",
    "sys_ConsolationType"
  ],
  data() {
    return {
@@ -451,7 +486,7 @@
        verificationdept: null,
        flowlevel: null,
        totallevel: null,
        fundtype: null,
        fundtype: null
      },
      // 表单参数
      form: {},
@@ -459,13 +494,15 @@
      rules: {},
      yesnoArr: [
        { label: "否", value: 0 },
        { label: "是", value: 1 },
        { label: "是", value: 1 }
      ],
      checkLevelArr: [
        { label: "一级", value: "1" },
        { label: "二级", value: "2" },
        { label: "三级", value: "3" },
      ],
        { label: "四级", value: "4" },
        { label: "五级", value: "5" }
      ]
    };
  },
  created() {
@@ -475,7 +512,7 @@
    /** 查询费用审批规则列表 */
    getList() {
      this.loading = true;
      listFundflowrule(this.queryParams).then((response) => {
      listFundflowrule(this.queryParams).then(response => {
        this.fundflowruleList = response.rows;
        this.total = response.total;
        this.loading = false;
@@ -496,7 +533,7 @@
        verificationdept: null,
        flowlevel: null,
        totallevel: null,
        fundtype: null,
        fundtype: null
      };
      this.resetForm("form");
    },
@@ -512,7 +549,7 @@
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.ids = selection.map(item => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
@@ -526,26 +563,26 @@
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getFundflowrule(id).then((response) => {
      getFundflowrule(id).then(response => {
        this.form = response.data;
        this.form.flowlevel =  this.form.flowlevel.toString();
        this.form.totallevel =  this.form.totallevel.toString();
        this.form.flowlevel = this.form.flowlevel.toString();
        this.form.totallevel = this.form.totallevel.toString();
        this.open = true;
        this.title = "修改费用审批规则";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateFundflowrule(this.form).then((response) => {
            updateFundflowrule(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addFundflowrule(this.form).then((response) => {
            addFundflowrule(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
@@ -559,7 +596,7 @@
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除费用审批规则编号为"' + ids + '"的数据项?')
        .then(function () {
        .then(function() {
          return delFundflowrule(ids);
        })
        .then(() => {
@@ -577,12 +614,12 @@
          this.exportLoading = true;
          return exportFundflowrule(queryParams);
        })
        .then((response) => {
        .then(response => {
          this.$download.name(response.msg);
          this.exportLoading = false;
        })
        .catch(() => {});
    },
  },
    }
  }
};
</script>