1
lkk
2025-01-23 35cebfa072de707605d52842672c50beca04f398
1
3个文件已修改
355 ■■■■■ 已修改文件
src/views/doctor/checkAll/index.vue 246 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/order/index.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/package/index.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue
@@ -715,6 +715,7 @@
                    <el-table-column
                      align="center"
                      label="检测项目"
                      :show-overflow-tooltip="true"
                      width="353"
                    >
                      <template slot-scope="scope">
@@ -821,6 +822,7 @@
                      align="center"
                      label="检测项目"
                      width="232"
                      :show-overflow-tooltip="true"
                    >
                      <template slot-scope="scope">
                        <div>{{ scope.row.proName }}</div>
@@ -1385,6 +1387,7 @@
import { getNewDateList } from "@/api/hosp/order";
import { getconfigKey } from "@/api/login";
import moment from "moment";
import { get } from "sortablejs";
export default {
  components: {
@@ -1604,7 +1607,27 @@
        tjNum: this.tjNumber,
      }).then((res) => {
        this.yichangList = res.data;
        console.log(this.yichangList, 3232);
        this.getExpends();
        this.yichangList.forEach((item) => {
          item.sone.forEach((soneItem) => {
            if (
              !Array.isArray(soneItem.advices) ||
              soneItem.advices.length === 0
            ) {
              // 如果 advices 是空,设置默认值
              soneItem.advices = [
                {
                  bt: "",
                  nr: "",
                },
              ];
            }
          });
        });
        if (!this.yichangList) {
          _this.$message({
            type: "warning ",
@@ -2348,10 +2371,120 @@
    // },
    change(vale) {},
    // determine() {
    //   let tjNumber = this.tableAll.tjNumber;
    //   let tjh = this.tableAll.tjNumber;
    //   // let jyjc = this.yichangList.map(item => item.jyjc || null);
    //   let advice = this.textarea1;
    //   let data = {
    //     tjNumber,
    //     advice,
    //     checkStatus: 1,
    //   };
    //   console.log(this.yichangList, 66);
    //   let dataList = this.yichangList
    //     .map((item) => {
    //       return item.sone.map((soneItem) => ({
    //         tjh,
    //         parentName: item.proName,
    //         jcxm: soneItem.proName,
    //         map: soneItem.advices,
    //         jyjc: item.jyjc, // assuming jyjc belongs to the outer item, not soneItem
    //         jcjg: soneItem.proResult,
    //         ckfw: soneItem.stanId,
    //         dw: soneItem.proAdvice,
    //       }));
    //     })
    //     .flat(); // 使用 flat() 方法将嵌套数组展平
    //   console.log(dataList, 777);
    //   /*  addOrder(dataList).then((res) => {
    //     console.log(res, 999);
    //   }); */
    //   getTjdetailList(data)
    //     .then((response) => {
    //       if (response.code === 200) {
    //         this.$modal.msgSuccess("提交成功");
    //         // 准备生成报告的请求数据
    //         let reportData = {
    //           userId: this.userId,
    //           tjNumber: tjNumber,
    //           state: 1,
    //           id: this.MsgId,
    //         };
    //         // 生成报告并保持 loading 打开
    //         const reportPromise = gettoPdf(tjNumber)
    //           .then((res) => {
    //             this.$modal.msgSuccess("已生成报告!请前往报告核收页面确认!");
    //           })
    //           .catch((error) => {
    //             this.$modal.msgError(
    //               "打印报告失败,请前往报告打印页面补打报告!"
    //             );
    //           });
    //         // 更新状态并提交修改请求
    //         const statePromise = getfiedState(reportData).then((res) => {
    //           this.drawer = false;
    //         });
    //         // const addOrderPromise = addOrder(dataList).then((res) => {
    //         //   console.log(res, 999);
    //         // });
    //         // 处理其他修改操作
    //         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
    //         });
    //         // 等待所有请求完成
    //         Promise.all([
    //           reportPromise,
    //           statePromise,
    //           // addOrderPromise,
    //           ...updatePromises,
    //         ])
    //           .then(() => {
    //             // 所有请求完成,关闭 loading
    //             this.loading = false;
    //             // 更新分页信息
    //             this.queryParams.page = 1;
    //             this.queryParams.pageSize = 10;
    //             this.submitForm();
    //             this.$forceUpdate();
    //           })
    //           .catch((error) => {
    //             // 处理错误情况
    //             this.loading = false;
    //             console.error("发生错误:", error);
    //           });
    //       } else {
    //         // 提交失败,关闭 loading
    //         this.loading = false;
    //       }
    //     })
    //     .catch((error) => {
    //       // 提交请求失败,关闭 loading
    //       this.loading = false;
    //       console.error("提交请求失败:", error);
    //     });
    // },
    determine() {
      let tjNumber = this.tableAll.tjNumber;
      let tjh = this.tableAll.tjNumber;
      // let jyjc = this.yichangList.map(item => item.jyjc || null);
      let advice = this.textarea1;
      let data = {
        tjNumber,
@@ -2359,7 +2492,7 @@
        checkStatus: 1,
      };
      console.log(this.yichangList, 66);
      console.log(this.yichangList, 6644);
      let dataList = this.yichangList
        .map((item) => {
@@ -2368,18 +2501,14 @@
            parentName: item.proName,
            jcxm: soneItem.proName,
            map: soneItem.advices,
            jyjc: item.jyjc, // assuming jyjc belongs to the outer item, not soneItem
            jyjc: item.jyjc,
            jcjg: soneItem.proResult,
            ckfw: soneItem.stanId,
            dw: soneItem.proAdvice,
          }));
        })
        .flat(); // 使用 flat() 方法将嵌套数组展平
      console.log(dataList, 777);
      /*  addOrder(dataList).then((res) => {
        console.log(res, 999);
      }); */
      getTjdetailList(data)
        .then((response) => {
          if (response.code === 200) {
@@ -2393,60 +2522,62 @@
              id: this.MsgId,
            };
            // 生成报告并保持 loading 打开
            const reportPromise = gettoPdf(tjNumber)
            // 调用 addOrderPromise
            console.log(dataList, 5555);
            addOrder(dataList)
              .then((res) => {
                this.$modal.msgSuccess("已生成报告!请前往报告核收页面确认!");
                console.log(res, 999);
                if (res.code == 200) {
                  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
                  });
                  // 等待所有请求完成
                  Promise.all([statePromise, ...updatePromises])
                    .then(() => {
                      // 所有请求完成,关闭 loading
                      this.loading = false;
                      // 更新分页信息
                      this.queryParams.page = 1;
                      this.queryParams.pageSize = 10;
                      this.submitForm();
                      this.$forceUpdate();
                    })
                    .catch((error) => {
                      // 处理错误情况
                      this.loading = false;
                      console.error("发生错误:", error);
                    });
                }
              })
              .catch((error) => {
                this.$modal.msgError(
                  "打印报告失败,请前往报告打印页面补打报告!"
                );
              });
            // 更新状态并提交修改请求
            const statePromise = getfiedState(reportData).then((res) => {
              this.drawer = false;
            });
            const addOrderPromise = addOrder(dataList).then((res) => {
              console.log(res, 999);
            });
            // 处理其他修改操作
            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
            });
            // 等待所有请求完成
            Promise.all([
              reportPromise,
              statePromise,
              addOrderPromise,
              ...updatePromises,
            ])
              .then(() => {
                // 所有请求完成,关闭 loading
                // 如果 addOrderPromise 失败,处理错误
                this.loading = false;
                // 更新分页信息
                this.queryParams.page = 1;
                this.queryParams.pageSize = 10;
                this.submitForm();
                this.$forceUpdate();
              })
              .catch((error) => {
                // 处理错误情况
                this.loading = false;
                console.error("发生错误:", error);
                console.error("addOrderPromise 失败:", error);
              });
          } else {
            // 提交失败,关闭 loading
@@ -2636,7 +2767,6 @@
  width: 684px;
  position: fixed; /* 固定定位 */
  right: 60px;
  .right {
    background-color: #fff;
src/views/hosp/order/index.vue
@@ -2294,36 +2294,6 @@
      //   return [rowspan, 1];
      // }
    },
     objectspanmethod({ row, column, rowIndex, columnIndex }) {
      let fields = ["propinName"];
      let cellValue = row[column.property];
      if (cellValue && fields.includes(column.property)) {
        let prevRow = this.Datalists[rowIndex - 1];
        let nextRow = this.Datalists[rowIndex + 1];
        if (prevRow && prevRow[column.property] === cellValue) {
          return { rowspan: 0, colspan: 0 };
        } else {
          let countRowspan = 1;
          while (nextRow && nextRow[column.property] === cellValue) {
            nextRow = this.Datalists[++countRowspan + rowIndex];
          }
          if (countRowspan > 1) {
            return { rowspan: countRowspan, colspan: 1 };
          }
        }
      }
      // if (columnIndex == 3) {
      //   let rowspan = 0;
      //   this.DataLists.forEach((element) => {
      //     if (element.propinName === row.propinName) {
      //       rowspan++;
      //     }
      //   });
      //   return [rowspan, 1];
      // }
    },
    filterpackage(value, data) {
      if (!value) return true;
      if (data.zhmc.indexOf(value) !== -1) {
@@ -2527,6 +2497,8 @@
        // this.marryalls = 0;
        // this.Datalists = [];
        this.checkedkeys = [];
        this.DataList3 = [];
        getZhList().then((response) => {
          if (response.data) {
            this.packageList = response.data;
@@ -2535,8 +2507,10 @@
        });
      } else {
        // this.TotalPrice1 = 0;
        this.checkedkey = [];
        this.checkedkeys = [];
        // this.DataList = [];
        this.Datalists = [];
        this.DataList3 = [];
        this.getDataList();
        // if (this.marryalls != 0) {
        //   this.TotalPrice1 += this.marryalls;
@@ -2549,7 +2523,7 @@
        let datas = {
          zhId: data.id,
        };
        getlistByZhId(datas).then((res) => {
          this.packagedataList = res.data.tjProjectList;
          for (var i = 0; i < this.packagedataList.length; i++) {
@@ -2841,15 +2815,19 @@
      if (checked === true) {
        // this.$refs.tree.setCheckedKeys([data.proId]);
        let proId = data.proId;
        console.log(data,9898);
        getProSonDxList(proId).then((res) => {
          this.TreedataList = res.data.list;
          this.TreedataList.forEach((item) => {
            // item.disabled = true;
            this.checkedListkey.push(item.proId);
            // this.checkedListkey.push(item.proId);
            if (!this.checkedListkey.includes(item.proId)) {
              this.checkedListkey.push(item.proId);
            }
            this.Datalists.push(item);
            this.DataList3.push(item);
            this.spliceData();
            this.DataList3.forEach((item1) => {
              this.TotalPrice1 += item1.proPrice * item1.sl;
@@ -2872,9 +2850,15 @@
        getProSonDxList(proId).then((res) => {
          this.TreedataList = res.data.list;
          // 从已选列表中移除该项目的 ID
          this.checkedListkey = this.checkedListkey.filter(
            (id) => id !== proId
          // 遍历 TreedataList 并移除相关的子项 ID
          this.TreedataList.forEach((item) => {
            this.checkedListkey = this.checkedListkey.filter(
              (id) => id !== item.proId
            );
          });
          this.Datalists = this.Datalists.filter(
            (item) => item.proParentId !== proId
          );
          // 从 DataList3 中移除相关的子项
src/views/system/package/index.vue
@@ -387,25 +387,23 @@
            ></el-option>
          </el-select>
        </el-form-item> -->
        <el-form-item label="关键字" prop="keywords">
        <el-form-item label="体检类别" prop="tjCategory">
          <el-select
            multiple
            v-model="form.keywords"
            placeholder="请选择关键字"
            v-model="form.tjCategory"
            placeholder="请选择体检类别"
            style="width: 150px"
            @change="sel"
            filterable
            clearable
          >
            <el-option
              v-for="item in keywordList"
              :key="item.id"
              :label="item.keyword"
              :value="item.id"
              v-for="dict in dict.type.dict_tjtype"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="是否上架" prop="isOnSale">
          <!-- <el-radio-group v-model="form.pacStatus">
              <el-radio :label="0">启用</el-radio>
@@ -414,7 +412,7 @@
          <el-select
            v-model="form.isOnSale"
            placeholder="请选择是否上架"
            style="width: 150px"
            style="width: 140px"
            filterable
            clearable
          >
@@ -469,19 +467,21 @@
            style="width: 140px"
          />
        </el-form-item>
        <el-form-item label="体检类别" prop="tjCategory">
        <el-form-item label="关键字" prop="keywords">
          <el-select
            v-model="form.tjCategory"
            placeholder="请选择体检类别"
            style="width: 150px"
            multiple
            v-model="form.keywords"
            placeholder="请选择关键字"
            style="width: 160px"
            @change="sel"
            filterable
            clearable
          >
            <el-option
              v-for="dict in dict.type.dict_tjtype"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
              v-for="item in keywordList"
              :key="item.id"
              :label="item.keyword"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
@@ -864,9 +864,9 @@
        // categoryId: [
        //   { required: true, validator: checkPhoneNum, trigger: "change" },
        // ],
        keywords: [
        /*  keywords: [
          { required: true, validator: checkPhoneNum, trigger: "change" },
        ],
        ], */
        isOnSale: [
          { required: true, validator: checkPhoneNum, trigger: "change" },
        ],
@@ -875,6 +875,9 @@
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        counterPrice: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        tjCategory: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
      },
@@ -1491,7 +1494,7 @@
      if (this.keys) {
        this.form.keywords = this.keys; // 如果有 this.keys,则直接赋值
      } else {
        this.form.keywords = this.form.keywords.toString(); // 如果没有,则将 this.form.keywords 转成字符串
        // this.form.keywords = this.form.keywords; // 如果没有,则将 this.form.keywords 转成字符串
      }
      let packageProjects = []; // 定义一个空数组
@@ -1514,7 +1517,7 @@
        price: this.pics,
        pacId: this.form.pacId || null,
        isOnSale: this.form.isOnSale,
        keywords: this.form.keywords,
        // keywords: this.form.keywords,
        sort: this.form.sort,
        retailPrice: this.form.retailPrice,
        tjCategory: this.form.tjCategory,