5d87fe6b8fbb78f4406be2663060f4ea5444f13d..cb9989c7167856993a02238fde5a0ddd37c2c0cd
2025-04-29 lkk
1
cb9989 对比 | 目录
2025-04-29 lkk
1
5fc585 对比 | 目录
2025-04-29 lkk
11
6e1868 对比 | 目录
3个文件已修改
155 ■■■■ 已修改文件
src/views/doctor/checkAll/index.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/advicerules/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/package/index.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/checkAll/index.vue
@@ -1637,7 +1637,7 @@
          this.$modal.closeLoading();
        });
    },
    shanchu(row) {
    /*  shanchu(row) {
      console.log(row);
      shanchu({
        id: row.orderDetailId,
@@ -1671,6 +1671,57 @@
          }
        }
      });
    }, */
    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) => {
@@ -1716,7 +1767,7 @@
      }).then((res) => {
        this.yichangList = res.data;
        console.log(this.yichangList, 3232);
        // console.log(this.yichangList, 3232);
        this.getExpends();
        this.yichangList.forEach((item) => {
src/views/hosp/advicerules/index.vue
@@ -238,6 +238,7 @@
      >
        <el-form-item label="科室" prop="ks">
          <el-select
            :rules="rules"
            v-model="form.ks"
            placeholder="请选择科室"
            style="width: 200px"
@@ -611,10 +612,12 @@
      },
      // 表单参数
      form: {
        xb: "2",
        // xb: "2",
      },
      // 表单校验
      rules: {},
      rules: {
        ks: [{ required: true, message: " ", trigger: ["blur", "change"] }],
      },
      upload: {
        // 是否显示弹出层(用户导入)
        open: false,
@@ -643,9 +646,14 @@
    treeId(newVal, oldVal) {
      if (newVal) {
        this.$nextTick(() => {
          document
            .querySelector(".el-tree-node__children .el-tree-node__content")
            .click();
          const node = document.querySelector(
            ".el-tree-node__children .el-tree-node__content"
          );
          if (node) {
            node.click();
          } else {
            console.warn("没有找到 el-tree 节点,无法触发点击");
          }
        });
      }
    },
@@ -740,7 +748,7 @@
        createBy: null,
        updateBy: null,
        deleted: null,
        xb: "2",
        // xb: "2",
      };
      if (this.$refs.form) {
        this.$refs.form.resetFields();
@@ -849,10 +857,9 @@
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.form.xb = this.form.xb === "1" ? "1" : null;
          if (this.form.id != null) {
            updateAdvicerules(this.form).then((response) => {
              console.log(response, 1111333);
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
src/views/system/package/index.vue
@@ -206,7 +206,7 @@
        <el-form-item label="现价" prop="xianprice">
          <el-input v-model="form.xianprice" placeholder="现价" clearable style="width: 140px" @input="changeXianjia"
            @blur="numberChangeXianPrice(youhui, youhui)" type="number" :debounce="3000" min="0"/>
            type="number" :debounce="3000" min="0"/>
        </el-form-item>
        <el-form-item label="关键字" prop="keywords">
          <el-select multiple v-model="form.keywords" placeholder="请选择关键字" style="width: 160px" @change="sel" filterable
@@ -506,30 +506,7 @@
        this.numberChange(currentValue, oldValue);
      }, 300);
    },
    numberChange(currentValue, oldValue) {
      this.$confirm("确定修改所有子项的折扣吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.youhui = currentValue;
          this.DataList.forEach((item) => {
            item.limits = this.youhui;
            const proPrice = new Big(item.priceOrd);
            const limits = new Big(item.limits);
            const result = proPrice.times(limits.div(10));
            item.priceNow = result.toNumber();
          });
          this.form.xianprice = this.DataList.reduce((sum, item) => {
            return sum.plus(new Big(item.priceNow || "0"));
          }, new Big(0)).toNumber();
          this.lastXianPrice = this.form.xianprice;
        })
        .catch(() => {
          this.youhui = oldValue;
        });
    },
    updateProPrice(row) {
      const proPrice = new Big(row.priceOrd);
      const limits = new Big(row.limits);
@@ -884,7 +861,7 @@
        this.youhui = (Math.floor((this.form.xianprice / this.pics) * 100) / 100) * 10;
      }
    },
    numberChangeXianPrice(currentValue, oldValue) {
   /*  numberChangeXianPrice(currentValue, oldValue) {
      if (this.form.xianprice === this.lastXianPrice || !this.form.xianprice) return;
      clearTimeout(this.debounceTimer);
      this.debounceTimer = setTimeout(() => {
@@ -918,7 +895,7 @@
            this.youhui = oldValue;
          });
      }, 500);
    },
    }, */
    spliceData() {
      for (var i = 0; i < this.DataList.length; i++) {
        for (var j = i + 1; j < this.DataList.length; j++) {
@@ -947,6 +924,47 @@
      this.TotalPrice1 = this.DataList.reduce((sum, item) => sum + item.priceOrd, 0);
    },
    submitForm() {
      // 检查现价是否发生变化
      if (this.form.xianprice !== this.lastXianPrice) {
        this.$confirm("确定修改所有子项的折扣吗?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          // 更新所有子项的折扣
          this.youhui = (Math.floor((this.form.xianprice / this.pics) * 100) / 100) * 10;
          let totalYsprice = new Big(0);
          this.DataList.forEach((item) => {
            item.limits = this.youhui;
            const ordPrice = new Big(item.priceOrd);
            const discount = new Big(item.limits);
            const result = ordPrice.times(discount.div(10));
            item.priceNow = result.toNumber();
            totalYsprice = totalYsprice.plus(new Big(item.priceNow));
          });
          if (!totalYsprice.eq(this.form.xianprice)) {
            const diff = new Big(this.form.xianprice).minus(totalYsprice);
            if (this.DataList.length > 0) {
              const lastItem = this.DataList[this.DataList.length - 1];
              const newYsPrice = new Big(lastItem.priceNow).plus(diff).toNumber();
              this.$set(this.DataList[this.DataList.length - 1], "priceNow", newYsPrice);
            }
          }
          // 保存数据
          return this.saveData();
        }).catch(() => {
          // 用户取消操作,恢复原来的现价
          this.form.xianprice = this.lastXianPrice;
        });
      } else {
        // 现价没有变化,直接保存
        this.saveData();
      }
    },
    // 新增一个方法处理保存逻辑
    saveData() {
      this.form.limits = this.youhui;
      this.form.price = this.pics;
      this.form.priceNow = this.form.xianprice;
@@ -967,7 +985,7 @@
        pacName: this.form.pacName,
        limits: this.form.limits,
        pacStatus: this.form.pacStatus,
        packageProjects: packageProjects,
        packageProjects: packageProjects,
        newPrice: this.form.xianprice,
        price: this.pics,
        pacId: this.form.pacId || null,
@@ -978,7 +996,8 @@
        pacRemark: this.form.pacRemark,
        detail: this.form.detail,
      };
      saveOreditTjPacNew(data).then((res) => {
      return saveOreditTjPacNew(data).then((res) => {
        this.open = false;
        this.getList();
      });