qx
2025-06-05 53606eac81e6d3a76937c4cb6f45ad61581cb4da
src/views/doctor/checkAll/index.vue
@@ -59,8 +59,11 @@
          :show-overflow-tooltip="true"
          width="110px"
        /> -->
        <el-table-column label="审核时间" align="center" prop="shsj" :show-overflow-tooltip="true" width="180px" />
        <el-table-column label="完成时间" align="center" prop="finishTime" :show-overflow-tooltip="true" width="160px" />
        <el-table-column v-if="tjStatus === '1'" label="审核时间" align="center" prop="shsj" :show-overflow-tooltip="true"
          width="180px" />
        <el-table-column v-if="tjStatus === '0'" label="完成时间" align="center" prop="finishTime"
          :show-overflow-tooltip="true" width="160px" />
        <el-table-column label="套餐名称" align="center" prop="pacName" :show-overflow-tooltip="true" width="160px" />
        <el-table-column label="状态" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px">
          <template slot-scope="scope">
            <span>{{ scope.row.tjStatus == "1" ? "已审核" : "未审核" }}</span>
@@ -75,12 +78,12 @@
        <el-table-column label="操作" align="center" width="120px" fixed="right">
          <template slot-scope="scope">
            <el-button fixed="right" title="详情" type="text" size="mini" @click.stop="handleClick(scope.row)"
            icon="el-icon-document-copy"></el-button>
            <el-button fixed="right" title="同步" type="text" size="mini" @click.stop="tongbu(scope.row)" v-if="scope.row.tjStatus != '1'"
            icon="el-icon-upload2"></el-button>
              icon="el-icon-document-copy"></el-button>
            <el-button fixed="right" title="同步" type="text" size="mini" @click.stop="tongbu(scope.row)"
              v-if="scope.row.tjStatus != '1'" icon="el-icon-upload2"></el-button>
            <el-button fixed="right" title="处方" type="text" size="mini" @click.stop="rowClick(scope.row)"
              icon="el-icon-edit-outline"></el-button>
            <!-- <el-button type="text" size="mini" @click="generate(scope.row)" v-if="scope.row.tjStatus=='1'">生成</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>
@@ -98,9 +101,9 @@
      </div>
    </template>
    <!-- 点击弹出框 -->
    <el-drawer custom-class="tanchu" :visible.sync="drawer" :before-close="handleClose" :with-header="false" size="100%"
      show-close="true">
    <!-- 点击弹出框   show-close="true"-->
    <el-drawer custom-class="tanchu" :visible.sync="drawer" :before-close="handleClose" :with-header="false"
      size="100%">
      <div class="top">
        <table style="
            width: 100%;
@@ -125,16 +128,16 @@
              {{ tableAll.cusName }}
            </td>
            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
              性别:
            </td>
            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
              {{
              性别:{{
                tableAll.cusSex == 0
                  ? "男"
                  : tableAll.cusSex == 1
                    ? "女"
                    : "未知"
              }}
            </td>
            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
              年龄:{{ tableAll.age }}
            </td>
          </tr>
          <tr style="
@@ -180,6 +183,9 @@
        </div>
        <div class="btn1">
          <el-button @click="yichangjieguo()" type="primary"><span class="vertical-text">异常结果</span></el-button>
        </div>
        <div class="btn1">
          <el-button @click="fuchaxiangmu()" type="primary"><span class="vertical-text">复查项目</span></el-button>
        </div>
      </div>
      <div class="box">
@@ -244,7 +250,10 @@
                      ">
                      主检医师:
                    </td>
                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
                    <td style="
                        border: 1px solid #dfe6ec;
                        border-collapse: collapse;
                      " colspan="2">
                      {{ item.doctorName }}
                    </td>
                  </tr>
@@ -260,7 +269,10 @@
                      ">
                      备注:
                    </td>
                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="3">
                    <td style="
                        border: 1px solid #dfe6ec;
                        border-collapse: collapse;
                      " colspan="3">
                      <el-input type="textarea" autosize placeholder="请输入内容" v-model="changedate[index].remark"
                        v-on:input="change" style="width: 100%">
                      </el-input>
@@ -305,7 +317,10 @@
                      ">
                      检查提示:
                    </td>
                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
                    <td style="
                        border: 1px solid #dfe6ec;
                        border-collapse: collapse;
                      " colspan="2">
                      <el-input type="textarea" autosize placeholder="请输入内容" v-model="item.remark" style="width: 100%">
                      </el-input>
                      <!-- <textarea
@@ -328,7 +343,10 @@
                      ">
                      主检医师:
                    </td>
                    <td style="border: 1px solid #dfe6ec; border-collapse: collapse" colspan="2">
                    <td style="
                        border: 1px solid #dfe6ec;
                        border-collapse: collapse;
                      " colspan="2">
                      {{ item.doctorName }}
                    </td>
                  </tr>
@@ -373,9 +391,11 @@
                    :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys">
                    <el-table-column type="expand">
                      <template slot-scope="props">
                        <div style="padding: 10px;">
                        <div style="padding: 10px">
                          <!-- 内容区域 -->
                          <div v-if="props.row.advices && props.row.advices.length > 0">
                          <div v-if="
                            props.row.advices && props.row.advices.length > 0
                          ">
                            <div v-for="(jianyi, index1) in props.row.advices" :key="index1"
                              style="margin-bottom: 10px">
                              <div>
@@ -401,8 +421,7 @@
                            </div>
                          </div>
                          <div style="margin-top: 10px;">
                          <div style="margin-top: 10px">
                            <el-button @click="shanchu(props.row)" type="danger" size="small">删除</el-button>
                          </div>
                        </div>
@@ -422,7 +441,6 @@
                    <el-table-column align="center" prop="proAdvice" label="单位" width="78">
                    </el-table-column>
                  </el-table>
                </template>
                <template v-if="item.jyjc == '1'">
@@ -430,9 +448,11 @@
                    :header-cell-style="{ background: '#67C23A' }" :expand-row-keys="expends" :row-key="getRowKeys">
                    <el-table-column type="expand">
                      <template slot-scope="props">
                        <div style="padding: 10px;">
                        <div style="padding: 10px">
                          <!-- 内容区域 -->
                          <div v-if="props.row.advices && props.row.advices.length > 0">
                          <div v-if="
                            props.row.advices && props.row.advices.length > 0
                          ">
                            <div v-for="(jianyi, index1) in props.row.advices" :key="index1"
                              style="margin-bottom: 10px">
                              <div>
@@ -458,8 +478,7 @@
                            </div>
                          </div>
                          <div style="margin-top: 10px;">
                          <div style="margin-top: 10px">
                            <el-button @click="shanchu(props.row)" type="danger" size="small">删除</el-button>
                          </div>
                        </div>
@@ -505,11 +524,43 @@
                </el-table>
              </div>
            </template>
          </div>
        </div>
      </div>
            <template v-if="status1 == 2">
              <div>
                <div style="text-align: center; margin-top: 10px;">
                  复查项目
                </div>
                <div style="display: flex;margin:15px ;">
                  <span slot="label" style="display: inline-block; border-bottom: 2px solid blue;font-size: 0.8vw;"
                    @click="handleQuery">
                    项目选择
                  </span>
                  <div v-if="xmChange.length > 0" style="display: flex;">
                    <div style="margin:0 40px;font-size: 0.8vw;">项目名称:{{ xmChange[0].proName || "" }}</div>
                    <div style="margin:0 40px ;font-size: 0.8vw;">价格:{{ xmChange[0].price || "" }}</div>
                  </div>
                  <div v-else style="display: flex;">
                    <div style="margin:0 40px;font-size: 0.8vw;">项目名称:{{ }}</div>
                    <div style="margin:0 40px ;font-size: 0.8vw;">价格:{{ }}</div>
                  </div>
                  <el-button type="primary" size="mini" @click="handleaddClick()">添加</el-button>
                </div>
      <div class="hist3" v-if="wenzhen">
                <el-table :row-style="redxiangmu" :data="fcList" style="width: 100%">
                  <el-table-column type="selection" width="40" align="center" />
                  <el-table-column label="序号" align="center" prop="newID" />
                  <el-table-column label="名称" align="center" prop="proName" width="100px" />
                  <el-table-column label="价格" align="center" prop="price" />
                  <el-table-column label="科室" align="center" prop="deptName" />
                  <el-table-column label="操作" align="center" width="130px">
                    <template slot-scope="scope">
                      <el-button type="primary" size="mini" @click="handledeleteClick(scope.row)">删除</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </div>
            </template>
            <template v-if="status1 == 3">
              <div class="hist3" >
        <span class="txt">问诊信息</span>
        <el-form ref="form" :model="formobj" label-width="100px" :inline="true" size="mini">
          <el-collapse class="coll" v-model="activeName" accordion>
@@ -709,8 +760,30 @@
          </el-collapse>
        </el-form>
      </div>
            </template>
          </div>
        </div>
      </div>
    </el-drawer>
    <el-dialog :visible.sync="xmopen" width="800px" append-to-body>
      <div style="margin: 20px;">
        <el-table :data="datasList" ref="elTable" v-loading="loading" @selection-change="handlexmChange" border
          height="320px">
          <el-table-column type="selection" width="40" align="center" />
          <el-table-column label="名称" align="center" prop="proName" width="100px" />
          <el-table-column label="价格" align="center" prop="price" />
          <el-table-column label="科室" align="center" prop="deptName" />
        </el-table>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFormxm">确 定</el-button>
        <el-button @click="cancels">取 消</el-button>
      </div>
    </el-dialog>
    <el-dialog title="PDF 预览" :visible.sync="dialogVisible" :close-on-click-modal="false" width="50%">
      <div class="main">
        <iframe id="printIframe" :src="url" frameborder="0" style="width: 100%; height: 100%"></iframe>
@@ -724,7 +797,7 @@
    </el-dialog>
    <Packages ref="bbb" :baogao="baogao" />
    <Prescription ref="Pre" :preObj="preObj" />
    <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" />
    <proposal ref="proposal" :cusobj="cusobj" :tjNumber="tjNumber" @event1="eventchange($event)" />
    <createproposal ref="createproposal" :creatobj="creatobj" />
    <el-dialog title="常用建议维护" :visible.sync="propdialog" width="500px" append-to-body>
@@ -751,14 +824,15 @@
  gettoPdf,
  getModified,
  isPdfOrJimu,
  addOrder,
  addOrder,UpdFcPro,
  getFcList
} from "@/api/doctor/checkAll";
import { getInfoById } from "@/api/hosp/history";
import { getInfo } from "@/api/login";
import { getCompany, queryCompany } from "@/api/team/tuanti";
import { reportHistory, yichang, shanchu } from "@/api/doctor/check";
import { getPdf, revoke } from "@/api/hosp/order";
import { cSWebGetPro,dataSynchronization } from "@/api/doctor/examination";
import { cSWebGetPro, dataSynchronization } from "@/api/doctor/examination";
import ViewPdf from "@/components/ViewPdf";
import Historicalreport from "@/components/Historicalreport";
import { getDicts } from "@/api/system/dict/data";
@@ -802,12 +876,13 @@
      preObj: {},
      baogao: [],
      flags: false,
      fcList: [],
      xmopen: false,
      datasList: [],
      jianqianwenzhendata: [],
      jianqians: false,
      sex: true,
      activeName: "1",
      wenzhen: false,
      hosproy: true,
      remarks: "",
      remark: "",
      creatobj: {},
@@ -899,6 +974,7 @@
      // 查询参数
      yichangList: [],
      statusList: [],
      xmChange: [],
      queryParam: {
        pageNum: 1,
        pageSize: 10,
@@ -957,32 +1033,32 @@
      dataSynchronization(tjNumber)
        .then((res, error) => {
          if (res.code == 200) {
            this.clearTimeSet = null;
            this.$modal.closeLoading();
            this.$modal.msgSuccess("同步成功!");
          }
        })
        .catch((error) => {
          this.clearTimeSet = null;
          this.$modal.closeLoading();
        });
    },
    shanchu(row) {
      console.log(row)
    /*  shanchu(row) {
      console.log(row);
      shanchu({
        id: row.orderDetailId,
      }).then((res) => {
        console.log(res);
        // 找到要删除项所在的父级数组
        const parentItem = this.yichangList.find(item =>
          item.sone.some(soneItem => soneItem.proId === row.proId)
        const parentItem = this.yichangList.find((item) =>
          item.sone.some((soneItem) => soneItem.proId === row.proId)
        );
        if (parentItem) {
          // 从父级的 sone 数组中删除该项
          const index = parentItem.sone.findIndex(item => item.proId === row.proId);
          const index = parentItem.sone.findIndex(
            (item) => item.proId === row.proId
          );
          if (index > -1) {
            parentItem.sone.splice(index, 1);
@@ -997,11 +1073,61 @@
            // 更新 expends 数组
            this.getExpends();
            this.$message.success('删除成功');
            this.$message.success("删除成功");
          }
        }
      })
      });
    }, */
    shanchu(row) {
      this.isdisabled = true;
      shanchu({
        id: row.orderDetailId,
      })
        .then((res) => {
          console.log(res, 1111);
          if (res.code === 200) {
            const parentItem = this.yichangList.find((item) =>
              item.sone.some(
                (soneItem) => soneItem.orderDetailId === row.orderDetailId
              )
            );
            if (parentItem) {
              const index = parentItem.sone.findIndex(
                (item) => item.orderDetailId === row.orderDetailId
              );
              if (index > -1) {
                parentItem.sone.splice(index, 1);
                if (parentItem.sone.length === 0) {
                  const parentIndex = this.yichangList.indexOf(parentItem);
                  if (parentIndex > -1) {
                    this.yichangList.splice(parentIndex, 1);
                  }
                }
                this.getExpends();
                this.$forceUpdate();
                this.$message.success("删除成功");
              } else {
                this.$message.error("未找到要删除的子项");
              }
            } else {
              this.$message.error("未找到要删除的父项");
            }
          } else {
            this.$message.error("后端删除失败:" + (res.msg || "未知错误"));
          }
        })
        .catch((error) => {
          console.error("删除失败:", error);
          this.$message.error("删除操作失败:" + error.message);
        })
        .finally(() => {
          this.isdisabled = false;
        });
    },
    getConfigKey() {
      getconfigKey("sfkqtwbg").then((res) => {
@@ -1036,6 +1162,88 @@
        }
      });
    },
    fuchaxiangmu() {
      this.loading = true;
      this.status1 = 2;
      let data = {
        tjNum: this.tjNumber,
        type: 1
      };
      getFcList(data)
        .then((res) => {
          this.fcList = res.data;
          this.fcList.forEach((item,index) => {
            item.newID = index + 1;
          })
        })
        .catch((error) => {
          console.error('获取复查项目失败:', error);
          this.$message.error('获取复查项目失败');
        })
        .finally(() => {
          this.loading = false;
        });
    },
    handleQuery() {
      this.xmopen = true
      let data = {
        tjNum: this.tjNumber,
        type: 0
      }
      getFcList(data).then(res => {
        this.datasList = res.data
      })
    },
    handleaddClick() {
      console.log(this.xmChange)
      let data = {
        orderId: this.xmChange[0].orderId,
        data: [{
          proId: this.xmChange[0].proId,
          type: 1
        }]
      }
      UpdFcPro(data).then(res => {
        if (res.code == 200) {
          this.xmChange = []
          this.fuchaxiangmu()
        }
      })
    },
    handledeleteClick(row) {
      let data = {
        orderId: row.orderId,
        data: [{
          proId: row.proId,
          type: 0
        }]
      }
      UpdFcPro(data).then(res => {
        if (res.code == 200) {
          this.fuchaxiangmu()
        }
      })
    },
    handlexmChange(selection) {
      this.xmChange = []
      this.xmChange = selection
      if (selection.length > 1) {
        let del_row = selection.shift();
        this.$refs.elTable.toggleRowSelection(del_row, false); //设置这一行取消选中
      }
    },
    submitFormxm() {
      this.xmopen = false
    },
    cancels() {
      this.xmopen = false
      this.xmChange = []
    },
    guanbi() {
      this.drawer = false;
    },
@@ -1047,7 +1255,7 @@
      }).then((res) => {
        this.yichangList = res.data;
        console.log(this.yichangList, 3232);
        // console.log(this.yichangList, 3232);
        this.getExpends();
        this.yichangList.forEach((item) => {
@@ -1176,7 +1384,7 @@
              }, 3000);
              this.$message({
                message: "报告正在生成,请两分钟后预览!",
                type: "error"
                type: "error",
              });
            } else {
              this.dialogVisible = true;
@@ -1240,8 +1448,6 @@
    historicalreport() {
      this.loading = true;
      this.wenzhen = false;
      this.hosproy = true;
      let data = {
        cusId: this.tableAll.cusId,
      };
@@ -1256,8 +1462,7 @@
    },
    medicalhistory() {
      this.wenzhen = true;
      this.hosproy = false;
      this.status1 = 3;
      let tjNumber = this.tableAll.tjNumber;
      getInfoById(tjNumber).then((response) => {
        this.formobj = response.data;
@@ -1335,11 +1540,16 @@
    },
    eventchange(data) {
      this.dataText = data;
      console.log(data, 6655);
      if (this.textarea1 == null) {
        this.textarea1 = "";
      }
      data.forEach((item) => {
      /* data.forEach((item) => {
        this.textarea1 += item.advice;
      }); */
      data.forEach((item) => {
        this.textarea1 += (item.advice || item.jynr || "") + "\n";
      });
    },
    proposalChange() {
@@ -1390,6 +1600,7 @@
          if (res.data) {
            // this.Testitems = res.data
            this.changedate = res.data;
            this.changedate.forEach((item) => {
              this.textarea1 = item.checkAdvice;
            });