yxh
13 小时以前 ad5e7a527167a86ca7969e874df9950a5c4e2ff9
src/views/project/fund/performancedetails/index.vue
@@ -11,7 +11,7 @@
                clearable
                style="width: 100%"
                v-model="form.applyTime"
                type="date"
                type="date" format="yyyy-MM-dd"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="申请日期"
                :disabled="true"
@@ -59,9 +59,17 @@
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="5">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入联系电话" />
           <el-col :span="5">
            <el-form-item label="绩效日期" prop="jxrq">
              <el-date-picker
                clearable
                style="width: 100%"
                v-model="form.jxrq"
                type="date" format="yyyy-MM-dd"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="绩效日期"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="5">
@@ -90,9 +98,14 @@
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="联系电话" prop="phone">
              <el-input v-model="form.phone" placeholder="请输入联系电话" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="text-align: left">
          <el-col :span="8">
          <el-col :span="12">
            <el-form-item label="申请说明" prop="remark">
              <el-input v-model="form.remark" placeholder="申请说明" />
            </el-form-item>
@@ -280,6 +293,31 @@
                      : "点击选择"
                  }}</el-button
                >
              </template>
            </el-table-column>
            <el-table-column
              prop="deptName"
              align="center"
              label="绩效科室"
              width="160"
            >
              <template slot-scope="scope">
                <el-select
                  v-model="scope.row.deptId"
                  size="mini"
                  clearable
                  filterable
                  placeholder="请选择绩效科室"
                  style="width: 100%"
                  @change="value => handleRowDeptChange(scope.row, value)"
                >
                  <el-option
                    v-for="dept in deptList"
                    :key="dept.deptId"
                    :label="dept.deptName"
                    :value="dept.deptId"
                  />
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
@@ -858,7 +896,8 @@
            :label="city"
            :key="city.id"
            >{{ city.username }}{{ city.isUnitPerson ? "(单位)" : ""
            }}{{ city.unitname ? " · " + city.unitname : "" }}</el-checkbox
            }}{{ city.unitname ? " · " + city.unitname : ""
            }}{{ city.deptName ? " · 科室:" + city.deptName : "" }}</el-checkbox
          >
        </el-checkbox-group>
      </div>
@@ -915,10 +954,12 @@
import { listItemexpense } from "@/api/project/itemexpense";
import { getUserProfile } from "@/api/system/user";
import { listDept } from "@/api/system/dept";
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { getToken } from "@/utils/auth";
import { moneySum, moneyAdd, moneySub, moneyRound } from "@/utils/money";
import { checkFileName, checkDetails } from "@/utils/fileNameCheck";
import CustomImageViewer from "@/components/CustomImageViewer";
export default {
@@ -969,6 +1010,8 @@
      expertlist: [],
      //医疗机构列表
      unitList: [],
      //绩效科室列表
      deptList: [],
      //费用报销机构列表
      feeUnitList: [],
      batchdialogVisible: false,
@@ -1660,6 +1703,11 @@
    },
    /** 提交按钮 */
    submitForm: debounce(function() {
      // 2026-10-15:保存前附件文件名规范校验(仅新增单据;老单据的历史附件由后端按"只校验本次变更"放行)
      if (!this.checkDetailFileNames()) {
        return;
      }
      if (!this.randomnumber) {
        this.randomnumber = this.generateRandomString(9);
        this.form.randomnumber = this.randomnumber;
@@ -1885,11 +1933,7 @@
          this.$router.go(-1);
        } else {
          this.$modal.closeLoading();
          if (res.msg) {
            this.$modal.msgError("操作失误");
          } else {
            this.$modal.msgError(res.msg);
          }
          this.$modal.msgError(res.msg || "操作失败");
        }
      });
    },
@@ -1998,6 +2042,25 @@
        this.feeUnitList = res.data;
        console.log(this.feeUnitList);
      });
    },
    /** 绩效科室列表 */
    getDeptList() {
      listDept({}).then(res => {
        this.deptList = res.data || [];
      });
    },
    /** 表格内直接修改绩效科室:同步名称 */
    handleRowDeptChange(row, deptId) {
      if (deptId === null || deptId === undefined || deptId === "") {
        this.$set(row, "deptName", null);
        return;
      }
      const dept = this.deptList.find(
        item => String(item.deptId) === String(deptId)
      );
      this.$set(row, "deptName", dept ? dept.deptName : null);
    },
    //获取医疗机构列表
@@ -2182,6 +2245,11 @@
    },
    // 接受提醒立刻保存
    Savenow() {
      // 2026-10-15:保存前附件文件名规范校验(仅新增单据;老单据的历史附件由后端按"只校验本次变更"放行)
      if (!this.checkDetailFileNames()) {
        return;
      }
      if (!this.randomnumber) {
        this.randomnumber = this.generateRandomString(9);
        this.form.randomnumber = this.randomnumber;
@@ -2502,6 +2570,8 @@
          isunit: isunit ? 1 : 0,
          unitname: item.unitname,
          unitno: item.unitno,
          deptId: item.deptId,
          deptName: item.deptName,
          uintuserno: null,
          title: item.title,
          idcardtype: null,
@@ -2727,6 +2797,8 @@
        singleDetail.title = person.title;
        singleDetail.unitname = person.unitname;
        singleDetail.unitno = person.unitno;
        singleDetail.deptId = person.deptId;
        singleDetail.deptName = person.deptName;
      } else {
        // 手工输入的人员:只写姓名,身份证号/银行账号由经办人填写
        singleDetail.beneficiaryname = String(key);
@@ -2763,7 +2835,43 @@
        this.Networkheader = string.slice(0, index + 4); // 截取8032及其前部字符
      }
    },
    /**
     * 2026-10-15:上传时校验附件文件名(业务要求:不合格立即提示且不加入列表)。
     * 规则与后端 AttachmentNameValidator 同口径:必须含中文 / 去掉扩展名后主干 ≤20 字 /
     * 不含空格及 / \ : * ? " < > | # % 等特殊字符。
     */
    checkUploadFileName(file) {
      const raw = file && file.raw ? file.raw.name : file && file.name;
      const r = checkFileName(raw);
      if (!r.ok) {
        this.$modal.msgError(r.msg);
        return false;
      }
      return true;
    },
    /**
     * 2026-10-15:保存前校验整单明细附件文件名(含同一行内重名)。
     * 口径(业务确认):只校验"本次变更"的附件——老单据里已存在的不合规附件名不能把保存卡死
     * (否则老单据改一个金额都存不进去)。后端按 id 读旧记录放行历史附件;前端拿不到"哪些是历史"
     * 的权威信息,因此**仅新增单据**做保存前拦截,编辑老单据时新增的不合规附件由后端二次校验拦下。
     */
    checkDetailFileNames() {
      if (this.form && this.form.id) {
        return true;
      }
      const c = checkDetails(this.rbDetails);
      if (!c.ok) {
        this.$modal.msgError(c.msg);
        return false;
      }
      return true;
    },
    uploadSccess(response, file, fileList) {
      if (!this.checkUploadFileName(file)) {
        return;
      }
      this.rbDetails;
      const config = {
        headers: { Authorization: "Bearer " + this.ICDtoken }
@@ -3119,6 +3227,7 @@
    this.getExternalList();
    this.getFeeUnitList();
    this.listperformance();
    this.getDeptList();
  },
  //生命周期 - 挂载完成(可以访问DOM元素)