1
lkk
8 小时以前 18f35fe78de41a1b240758c91e05380decb48978
src/views/doctor/checkAll/index.vue
@@ -291,36 +291,33 @@
          <template slot-scope="scope">
            <el-button
              fixed="right"
              title="处方"
              type="text"
              size="mini"
              @click.stop="rowClick(scope.row)"
              icon="el-icon-edit-outline"
            ></el-button>
              v-if="msgkcf == 'y' || msgkcf == 'Y'"
              >处方</el-button
            >
            <el-button
              fixed="right"
              title="详情"
              type="text"
              size="mini"
              @click.stop="handleClick(scope.row)"
              icon="el-icon-document-copy"
            ></el-button>
              >详情</el-button
            >
            <el-button
              type="text"
              size="mini"
              @click.stop="viewReport(scope.row)"
              v-if="scope.row.tjStatus == '1'"
              title="预览"
              icon="el-icon-view"
            ></el-button>
              >预览</el-button
            >
            <el-button
              type="text"
              size="mini"
              v-if="scope.row.tjStatus == '1'"
              title="撤销"
              @click.stop="getRevoke(scope.row)"
              icon="el-icon-refresh-left"
            ></el-button>
              >撤销</el-button
            >
          </template>
        </el-table-column>
      </el-table>
@@ -377,10 +374,7 @@
              "
            >
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                姓名:
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                {{ tableAll.cusName }}
                姓名:{{ tableAll.cusName }}
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                性别:
@@ -395,6 +389,9 @@
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                年龄:{{ tableAll.age }}
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                体检号:{{ tableAll.tjNumber }}
              </td>
            </tr>
            <tr
              style="
@@ -404,16 +401,16 @@
              "
            >
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                体检单号:
                单位名称:{{ tableAll.tjCompName }}
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                {{ tableAll.tjNumber }}
                体检类型:{{ tableAll.tjCategory }}
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                体检时间:
                套餐:{{ tableAll.pacName }}
              </td>
              <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
                {{ tableAll.tjTime }}
                体检时间:{{ tableAll.tjTime }}
              </td>
            </tr>
          </table>
@@ -736,6 +733,7 @@
                    placeholder="请输入内容"
                    v-model="textarea1"
                    :autosize="{ minRows: minRows, maxRows: maxRows }"
                    style="font-size: 16px"
                  ></el-input>
                </el-form-item>
              </el-form>
@@ -781,6 +779,7 @@
                      style="width: 100%"
                      :header-cell-style="{ background: '#67C23A' }"
                      :row-key="getRowKeys"
                      :expand-row-keys="expends"
                    >
                      <!--  :expand-row-keys="expends" -->
                      <el-table-column type="expand">
@@ -1073,13 +1072,19 @@
                      :formatter="formatDate"
                      width="160"
                    />
                    <el-table-column label="操作" align="center" width="80px">
                    <el-table-column
                      label="操作"
                      align="center"
                      fixed="right"
                      width="80px"
                    >
                      <template slot-scope="scope">
                        <el-button
                          type="primary"
                          size="mini"
                          @click="huifu(scope.row)"
                          v-if="scope.row.type == '2'"
                          :disabled="tjStatus === '1'"
                          >恢复</el-button
                        >
                        <el-button
@@ -1087,6 +1092,7 @@
                          size="mini"
                          @click="chexiao(scope.row)"
                          v-if="scope.row.type == '1'"
                          :disabled="tjStatus === '1'"
                          >撤销</el-button
                        >
                      </template>
@@ -1142,11 +1148,11 @@
                    style="width: 100%"
                    border
                  >
                    <el-table-column
                    <!-- <el-table-column
                      type="selection"
                      width="40"
                      align="center"
                    />
                    /> -->
                    <el-table-column label="序号" align="center" prop="newID" />
                    <el-table-column
                      label="名称"
@@ -2146,6 +2152,8 @@
      status1: 0,
      viewportHeight: 0,
      expends: [],
      expandRowKeys: [],
      shouldExpand: false,
    };
  },
@@ -2576,6 +2584,15 @@
    yichangjieguo() {
      this.loading = true;
      this.status1 = 0;
      getConfigKey("kzycxmsfzk").then((res) => {
        this.shouldExpand = res.msg;
        // 只有Y/y才展开,其它(包括空、N、null、undefined)都不展开
        if (this.shouldExpand === "Y") {
          this.getExpends();
        } else {
          this.expends = [];
        }
      });
      yichang({
        tjNum: this.tjNumber,
      })
@@ -2594,15 +2611,24 @@
          if (!this.yichangList) {
            this.$message.warning("暂无异常报告");
          }
          // 这里也可以根据shouldExpand再调用一次getExpends,确保数据已加载
          if (this.shouldExpand === "Y" || this.shouldExpand === "y") {
            this.getExpends();
          } else {
            this.expends = [];
          }
        })
        .catch((error) => {
          this.isLoading = false;
          console.error("获取异常结果失败:", error);
          this.$message.error("获取异常结果失败");
        })
        .finally(() => {
          this.isLoading = false;
          this.loading = false;
        });
    },
    fuchaxiangmu() {
      this.loading = true;
@@ -2632,7 +2658,7 @@
          this.status1 = 4;
          this.ychfList = res.data;
          if (this.ychfList.length == 0) {
            this.message.success("暂无异常恢复项目");
            this.$message.success("暂无异常恢复项目");
          }
        })
        .catch((error) => {
@@ -2930,10 +2956,9 @@
    propoChange() {
      this.cusobj = { sex: this.tableAll.cusSex, isZj: 0 };
      this.$refs.proposal.clearSearchFields();
      getConfigKey("mrzscyjy").then((res) => {
        this.mrjy = res.msg; // 会触发 watch → 设置 tjproposal = "1"
        // console.log(res, 4444);
        // 等数据状态准备好后再打开弹窗
        this.$refs.proposal.title = "建议方案";
        this.$refs.proposal.open = true;
@@ -3128,6 +3153,18 @@
      this.qingkong();
      this.$refs.Pre.open = false;
      this.tableAll = row;
      let dict = "dict_tjtype";
      getDicts(dict).then((res) => {
        if (res.code == 200) {
          res.data.forEach((item) => {
            if (this.tableAll.tjCategory == item.dictValue) {
              this.tableAll.tjCategory = item.dictLabel;
            }
          });
        } else {
          throw new Error("获取体检类型字典失败");
        }
      });
      this.tjproject = "0";
      this.tjNumber = this.tableAll.tjNumber;
@@ -3149,7 +3186,7 @@
                  this.isLoading = true;
                  this.drawer = true;
                  getupdateCheckType(this.tjNumber).then((response) => {
                    this.isLoading = false;
                    // this.isLoading = false;
                    this.changedate = response.data;
                    if (this.changedate) {
                      this.changedate.forEach((item) => {
@@ -3204,7 +3241,7 @@
                      this.isLoading = true;
                      this.drawer = true;
                      getupdateCheckType(this.tjNumber).then((response) => {
                        this.isLoading = false;
                        // this.isLoading = false;
                        this.changedate = response.data;
                        if (this.changedate) {
                          for (let i = 0; i < this.changedate.length; i++) {
@@ -3331,7 +3368,45 @@
              id: this.MsgId,
            };
            addOrder(dataList)
            /* gettoPdf(tjNumber)
              .then((res) => {
                this.$modal.msgSuccess("已生成报告!请前往报告核收页面确认!");
              })
              .catch(() => {
                this.$modal.msgError(
                  "打印报告失败,请前往报告打印页面补打报告!"
                );
              }); */
            const statePromise = getfiedState(reportData).then(() => {
              this.drawer = false;
            });
            const updatePromises = this.changedate.map((item) => {
              this.proIds = item.parentId;
              let remarks = item.remark;
              let updateOrderRemarkVos = [
                {
                  tjNumber,
                  proId: this.proIds.toString(),
                  remarks,
                },
              ];
              return getModified(updateOrderRemarkVos);
            });
            Promise.all([statePromise, ...updatePromises])
              .then(() => {
                this.loading = false;
                this.queryParams.page = 1;
                this.queryParams.pageSize = 10;
                this.submitForm();
                this.$forceUpdate();
              })
              .catch((error) => {
                this.loading = false;
                console.error("发生错误:", error);
              });
            /* addOrder(dataList)
              .then((res) => {
                if (res.code == 200) {
                  // gettoPdf(tjNumber)
@@ -3378,7 +3453,7 @@
              .catch((error) => {
                this.loading = false;
                console.error("addOrderPromise 失败:", error);
              });
              }); */
          } else {
            this.loading = false;
            this.$modal.msgError("提交失败");