| | |
| | | this.form.lisXmbm = param1[0].pacCode; |
| | | this.form.lisXmmc = param1[0].pacName; |
| | | }, |
| | | /* getList() { |
| | | getList() { |
| | | this.loading = true; |
| | | let data = { |
| | | proName: this.queryParams.proName, |
| | |
| | | this.projectList = response.data.list; |
| | | this.loading = false; |
| | | }); |
| | | }, */ |
| | | }, |
| | | getConsumables() { |
| | | this.loading = true; |
| | | listConsumables(this.queryParams).then((response) => { |
| | |
| | | } |
| | | }, |
| | | handleUpdate1() { |
| | | // this.updateLoading = true; |
| | | 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() |
| | |
| | | |
| | | // 等待右侧表格刷新 |
| | | await this.getList(); |
| | | |
| | | // 立即刷新当前项目数据,确保数据是最新的 |
| | | await this.refreshCurrentProjectData(); |
| | | |
| | | this.pageLoading = false; // ✅ 统一加载状态控制 |
| | | }, |
| | |
| | | }); |
| | | } |
| | | }, */ |
| | | // 刷新当前选中项目的数据 |
| | | async refreshCurrentProjectData() { |
| | | if (this.id) { |
| | | try { |
| | | const response = await getInfoByProId(this.id); |
| | | this.xiugaiList = response.data; |
| | | console.log("刷新项目数据成功:", this.xiugaiList); |
| | | return response.data; |
| | | } catch (error) { |
| | | console.error("刷新项目数据失败:", error); |
| | | this.$message.error("刷新项目数据失败"); |
| | | this.xiugaiList = null; // 刷新失败时重置为 null |
| | | return null; |
| | | } |
| | | } |
| | | return null; |
| | | }, |
| | | submit() { |
| | | this.ChangeList.forEach((item) => { |
| | | this.form.proPrice = item.ckdj; |
| | |
| | | this.sfxmId = parseInt(item.id); |
| | | }); |
| | | this.dialogTableVisible = false; |
| | | this.getDeptList(); |
| | | this.getDeptTree().then(() => { |
| | | this.precomputePinyin(); |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | const proIds = row.proId || this.ids; |