lkk
2024-10-28 44abccb72072ef05474b06ed790f069c85c24faf
src/views/hosp/order/index.vue
@@ -246,7 +246,10 @@
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" />
            <dict-tag
              :options="dict.type.dict_team"
              :value="scope.row.tjType"
            />
            <!-- <span v-if="scope.row.tjType == '2'">个人</span>
            <span v-if="scope.row.tjType == '1'">团队</span> -->
          </template>
@@ -1414,6 +1417,7 @@
import moment from "moment";
import { getZhList, getlistByZhId } from "@/api/system/package";
import { getwater } from "@/api/hosp/customer";
import { getInfo } from "@/api/login";
import ViewPdf from "@/components/ViewPdf";
import {
  projectGetList,
@@ -1697,9 +1701,13 @@
      });
    },
    /** 点击显示导检单报表*/ //lige    开始
    handleReport1(row) {
    /* handleReport1(row) {
      const tjNumber = this.tjnumbers;
      const viewNum = "792931586196398080";
      getInfo().then(((res)=>{
        console.log(res,123);
      }))
      const params = { viewNum, tjNumber };
      hasReport(tjNumber).then((res) => {
        if (res == 1) {
@@ -1707,6 +1715,31 @@
        } else {
          this.$message.error("该用户暂无项目!");
        }
      });
    }, */
    handleReport1(row) {
      const tjNumber = this.tjnumbers;
      const viewNum = "792931586196398080";
      // 先调用 getInfo 获取 userId
      getInfo()
        .then((res) => {
          console.log(res, 1111);
          const dqdlr = res.user.userId; // 获取 userId
          console.log("User ID:", dqdlr);
          const params = { viewNum, tjNumber, dqdlr }; // 将 userId 加入 params
          // 再调用 hasReport 检查报告状态
          hasReport(tjNumber).then((reportRes) => {
            if (reportRes === 1) {
              this.$tab.openPage("导诊单", "/report/breDailyReport", params);
            } else {
              this.$message.error("该用户暂无项目!");
            }
          });
        })
        .catch(() => {
          this.$message.error("无法获取用户信息!");
      });
    },
@@ -2016,16 +2049,35 @@
      const tjNumber = this.tjnumbers;
      const viewNum = "983185234038140928";
      const jxbz = this.bldhid;
      const params = { viewNum, tjNumber, jxbz };
      console.log(params);
      // const params = { viewNum, tjNumber, jxbz };
      // console.log(params);
      getInfo()
        .then((res) => {
          console.log(res, 1111);
          const dqdlr = res.user.userId; // 获取 userId
          const params = { viewNum, tjNumber, jxbz, dqdlr };
      hasReport(tjNumber).then((res) => {
            if (res == 1) {
              this.$tab.openPage(
                "导诊单",
                "/report/budabreDailyReport",
                params
              );
              this.budadaozhen = false;
            } else {
              this.$message.error("该用户暂无项目!");
            }
          });
        })
      /* hasReport(tjNumber).then((res) => {
        if (res == 1) {
          this.$tab.openPage("导诊单", "/report/budabreDailyReport", params);
          this.budadaozhen = false;
        } else {
          this.$message.error("该用户暂无项目!");
        }
      });
      }); */
    },
    handleClick(tab, event) {
@@ -2319,9 +2371,9 @@
        }
      });
      this.TotalPrice1 = 0;
      this.DataList3.forEach(item=>{
      this.DataList3.forEach((item) => {
        this.TotalPrice1 += item.proPrice;
      })
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
@@ -2647,7 +2699,6 @@
  margin-top: 10px;
}
.box {
  display: flex;
  justify-content: space-between;
}