lkk
3 天以前 33de1cf5576373b99dc2a6ed4be097f4d6ad0892
src/views/hosp/project/index.vue
@@ -1666,24 +1666,40 @@
    },
    handleUpdate1() {
      this.form = {};
      // this.form = this.xiugaiList;
      // this.form.proStatus = this.form.proStatus.toString();
      // this.form.sfcyyc = this.form.sfcyyc.toString();
      // this.form.proDelivery = this.form.proDelivery.toString();
      this.proParent = true;
      this.isPriceDisabled = true;
        // 先加载科室列表数据,再设置表单数据
      Promise.all([
        listDept(this.queryParams),
        getlist()
      ]).then(([deptResponse, listResponse]) => {
        // 先设置科室列表
        this.parentNameList = deptResponse.data;
        // 再设置表单数据
      this.form = this.xiugaiList;
      this.form.proStatus = this.form.proStatus.toString();
      this.form.sfcyyc = this.form.sfcyyc.toString();
      this.form.proDelivery = this.form.proDelivery.toString();
      this.proParent = true;
      this.isPriceDisabled = true;
      getlist().then((response) => {
        if (response.code == 200) {
        // 处理项目选项
        if (listResponse.code == 200) {
          this.loading = false;
          this.projectOptions = [];
          const project = { proId: 0, proName: "主类目", children: [] };
          project.children = this.handleTree(response.data.list, "proId");
          this.key = response.data.key;
          project.children = this.handleTree(listResponse.data.list, "proId");
          this.key = listResponse.data.key;
          this.projectOptions.push(project);
          console.log(this.projectOptions, 11111);
        }
      });
      this.open = true;
      }).catch((error) => {
        console.error("加载数据失败:", error);
        this.$message.error("加载数据失败");
      })
    },
    handleUpdate(row) {
      this.reset();
@@ -1691,6 +1707,8 @@
      const proId = row.proId || this.ids;
      this.proParent = false;
      this.isPriceDisabled = false;
      listDept(this.queryParams).then((response) => {
        this.parentNameList = response.data;
      getProject(proId).then((response) => {
        this.form = response.data;
        this.showPrise = this.form.proParentId === "0";
@@ -1733,6 +1751,8 @@
        this.open = true;
        this.title = "体检项目信息维护";
      });
      })
    },
    getSelectValue(val) {
      this.form.consumablesList.forEach((formitem) => {