1
lkk
2025-01-21 7d2dba2945bf807413e7fc809fc06acebe3721a8
src/views/system/biol/index.vue
@@ -137,8 +137,9 @@
          type="primary"
          size="mini"
          :disabled="single"
          :loading="isLoading"
          @click="baogaoyulan"
          >报告打印</el-button
          >报告预览</el-button
        >
      </el-col>
      <el-col :span="1.5">
@@ -146,8 +147,9 @@
          type="primary"
          size="mini"
          :disabled="single"
          @click="yulan"
          >预览报告</el-button
          :loading="isChexiao"
          @click="chexiao"
          >撤销报告</el-button
        >
      </el-col>
      <el-col :span="1.5">
@@ -545,12 +547,12 @@
  listOrder,
  getNumber,
  getPdf,
  getPdfpre,
  getprint,
  hasReport,
  hasPrintCode,
  getOrderListOO,
  getNewDateList,
  getChexiao,
} from "@/api/hosp/order";
import moment from "moment";
import ViewPdf from "@/components/ViewPdf";
@@ -571,6 +573,8 @@
    return {
      radios: "1",
      dialogVisiblese: false,
      isLoading: false,
      isChexiao:false,
      createTimeList: "",
      // printObj: {
      //   id: "box",             //打印的区域
@@ -684,6 +688,7 @@
      open: false,
      // 日期范围
      datetimerange: [],
      seleList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
@@ -814,12 +819,14 @@
    },
    baogaoyulan() {
      const tjNumber = this.report[0];
      console.log(tjNumber, 5555);
      this.isLoading = true;
      isPdfOrJimu(tjNumber).then((response) => {
        if (response.data.flag == "0") {
          const flag = true;
          getPdfpre(tjNumber, flag,1).then((response) => {
            console.log('getPdfpre');
          this.isLoading = false;
          getPdf(tjNumber, flag).then((response) => {
            if (response.size === 0) {
              const loading = this.$loading({
                lock: true,
@@ -842,48 +849,32 @@
              this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
            }
          });
        } else {
          let url = response.data.url;
          const params = { url };
          this.$tab.openPage(
            "健康证检查表",
            "/report/zongjianjiankangzheng",
            params
          );
        }
        this.isLoading = false;
      });
    },
    yulan() {
      const tjNumber = this.report[0];
      isPdfOrJimu(tjNumber).then((response) => {
        if (response.data.flag == "0") {
          const flag = true;
          getPdfpre(tjNumber, flag,0).then((response) => {
            console.log('getPdfpre');
            if (response.size === 0) {
              const loading = this.$loading({
                lock: true,
                text: "Loading",
                spinner: "el-icon-loading",
                background: "rgba(0, 0, 0, 0.7)",
              });
              setTimeout(() => {
                loading.close();
              }, 3000);
              // this.$message.msgSuccess("报告正在生成,请两分钟后预览!");
              this.$message({
                message: "报告正在生成,请两分钟后预览!",
                type: "warning",
              });
            } else {
              console.log(response);
              this.dialogVisible = true;
              this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
            }
          });
    // 撤销打印
    chexiao() {
      const tjNUms = this.seleList.map((item) => item.tjNumber);
      this.isChexiao = true
      getChexiao(tjNUms).then((res) => {
        console.log(res, 6666);
        if (res.code === 200) {
          this.$modal.msgSuccess("撤销成功!");
          this.getList();
        } else {
          this.$modal.msgError("撤销失败!");
        }
        this.isChexiao = false
      });
    },
    exportPDF() {
      const tjNumber = this.report[0];
      isPdfOrJimu(tjNumber).then((res) => {
        console.log(res);
      })
    },
    //打印小票
    printHandle() {
@@ -1265,6 +1256,9 @@
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.orderId);
      this.seleList = selection;
      console.log(this.seleList, 222333);
      this.DataList1 = this.$refs.multipleTable.selection;
      this.DataList1.forEach((item) => {
        this.barcode = item.tjNumber;