wwl
2024-12-17 f052b5f35dfd8c8f63c580ada77d3bfeb1bd31c4
打印
2个文件已修改
103 ■■■■ 已修改文件
src/api/hosp/order.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/biol/index.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/hosp/order.js
@@ -118,7 +118,17 @@
    }
  })
}
// 生成pdf
export function getPdfpre(tjNumber,flag,sfdy) {
  return request({
    url: '/system/report/previewprint/'+ flag + '/'+ tjNumber + '/' + sfdy,
    method: 'get',
    responseType: 'blob',
    headers:{
      "type": 'application/pdf'
    }
  })
}
// 导诊单
export function getTjNumber(tjNumber) {
  return request({
src/views/system/biol/index.vue
@@ -13,7 +13,7 @@
          v-model="queryParams.dyzt"
          placeholder="请选择"
          @change="handleQuery"
          style="width: 100px;"
          style="width: 100px"
        >
          <el-option
            v-for="item in optionsOne"
@@ -138,7 +138,16 @@
          size="mini"
          :disabled="single"
          @click="baogaoyulan"
          >报告预览</el-button
          >报告打印</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          size="mini"
          :disabled="single"
          @click="yulan"
          >预览报告</el-button
        >
      </el-col>
      <el-col :span="1.5">
@@ -536,6 +545,7 @@
  listOrder,
  getNumber,
  getPdf,
  getPdfpre,
  getprint,
  hasReport,
  hasPrintCode,
@@ -692,8 +702,8 @@
        tjNum: undefined,
        dyzt: "0",
        compId: null,
        dw:null,
        tjCompName:''
        dw: null,
        tjCompName: "",
      },
      startTime: "",
      // 表单参数
@@ -807,7 +817,9 @@
      isPdfOrJimu(tjNumber).then((response) => {
        if (response.data.flag == "0") {
          const flag = true;
          getPdf(tjNumber, flag).then((response) => {
          getPdfpre(tjNumber, flag,1).then((response) => {
            console.log('getPdfpre');
            if (response.size === 0) {
              const loading = this.$loading({
                lock: true,
@@ -830,16 +842,48 @@
              this.url = window.webkitURL.createObjectURL(response); //将后端返回的blob文件读取出url
            }
          });
        } else {
          let url = response.data.url;
          const params = { url };
          this.$tab.openPage(
            "健康证检查表",
            "/report/zongjianjiankangzheng",
            params
          );
        }
      });
    },
    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
            }
          });
        }
      });
    },
    exportPDF() {
      const tjNumber = this.report[0];
      isPdfOrJimu(tjNumber).then((res) => {
        console.log(res);
      })
    },
    //打印小票
    printHandle() {
@@ -1083,8 +1127,7 @@
    // 选框数据
    searchSelect(val) {
      this.CheckBox = val;
      console.log(this.CheckBox,9999);
      console.log(this.CheckBox, 9999);
    },
    // onSubmit() {
@@ -1095,13 +1138,13 @@
    },
    /** 查询体检记录列表 */
    getList() {
      console.log(this.CheckBox,2323);
      console.log(this.CheckBox, 2323);
      // this.queryParams.checkStatus = this.checkStatus;
      this.queryParams.compId = this.CheckBox.drugManufacturerId;
      this.queryParams.dw = this.CheckBox.cnName;
      if (this.createTimeList) {
        this.queryParams.djbeginTime = this.createTimeList[0];
        this.queryParams.djendTime = this.createTimeList[1];
@@ -1117,8 +1160,8 @@
      // 获取单位信息集合
      getCompany(this.queryParams).then((response) => {
        this.CompanyList = response.data;
        console.log( this.CompanyList,555);
        console.log(this.CompanyList, 555);
        this.loading = false;
      });
      getOrderListOO(this.queryParams).then((response) => {
@@ -1212,9 +1255,9 @@
        tjNum: undefined,
        dyzt: "0",
        compId: null,
        dw:null,
        tjCompName:''
      }
        dw: null,
        tjCompName: "",
      };
      this.createTimeList = [];
      this.resetForm("queryForm");
      this.handleQuery();