qx
2024-06-20 772d8df8a3ee02a6fe2dbd6ba7216e3e3ee0ec63
src/views/system/tijian/index.vue
@@ -334,7 +334,6 @@
              </el-col>
            </el-row>
          </el-form>
          <el-row v-show="top">
            <el-col :span="19">
@@ -431,7 +430,7 @@
      <el-tabs
        type="border-card"
        style="height: 560px; margin: 0 10px; width: 100%"
        v-model="activeNames"
        v-model="activeNames"
        @tab-click="handleClick"
      >
        <el-tab-pane label="套餐" name="first">
@@ -476,7 +475,6 @@
                @selection-change="handleSelectionChange"
                height="450px"
                ref="tb"
              >
                <el-table-column
                  type="selection"
@@ -616,9 +614,12 @@
                    :span-method="objectSpanMethod"
                  >
                    <el-table-column prop="propinName" label="检查项目">
                    </el-table-column>
                    <el-table-column prop="proPrice" label="原价" width="56px"></el-table-column>
                    <el-table-column
                      prop="proPrice"
                      label="原价"
                      width="56px"
                    ></el-table-column>
                    <el-table-column
                      prop="proName"
                      label="明细项目"
@@ -914,6 +915,12 @@
                      "元)"
                    }}
                  </template>
                  <el-button
                    type="primary"
                    @click="candelete(item)"
                    style="margin: 5px"
                    >删 除</el-button
                  >
                  <el-table
                    :data="item.list"
                    border
@@ -1272,6 +1279,7 @@
  getaddtTransition,
  getTransitionList,
  getByTeamNo,
  delTbBycusCardIdAndProId,
  getLoadFile,
  getIsRequired,
  getconfigKey,
@@ -1322,7 +1330,7 @@
        },
      ],
      isNow: 1,
      marryall:0,
      marryall: 0,
      treeId: [],
      treeList: [],
      defaultKeys: [],
@@ -1427,7 +1435,7 @@
      proIds: [],
      // 显示搜索条件
      showSearch: true,
       activeNames: 'first',
      activeNames: "first",
      // 树状形状
      Treedata: [],
      TreedataList: [],
@@ -1613,6 +1621,47 @@
    },
    inputChanges() {
      this.$refs.historyTj.getlist();
    },
    candelete(item) {
      let data = {
        cusCardId: this.form.cusIdcard,
        proId: item.proPrantId,
      };
      delTbBycusCardIdAndProId(data).then((res) => {});
      getTransitionList(this.form.cusIdcard).then((response) => {
        this.tableData1 = response.data;
        this.TotalPrice1 = 0;
        if (this.tableData1) {
          this.tableData1.forEach((item) => {
            this.TotalPrice1 += item.nowPrice;
            if (item.pacName === null) {
              item.pacName = "单项";
            }
            if (item.pacName == "单项") {
              item.list.forEach((item9) => {
                this.treeList.push(item9.proId);
              });
            }
            this.pacName = item.pacName;
          });
          const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
          let TotalPrice = this.TotalPrice1 * (this.discount / 10);
          if (r.test(TotalPrice)) {
            this.TotalPrice = TotalPrice + ".00";
          } else {
            this.TotalPrice = TotalPrice;
          }
          this.list1 = false;
          this.list3 = true;
        } else {
          this.list1 = true;
          this.TotalPrice = "0.00";
        }
      });
    },
    cope() {
      this.tcShow = true;
@@ -2280,14 +2329,14 @@
    //   }
    // },
    resetpackage(){
    resetpackage() {
      if (this.form.cusIdcard) {
        var cusId = this.form.cusIdcard;
      } else {
        this.$message.warning("请先填写信息,再选体检内容");
      }
      let _this = this;
        _this.pacId = "";
      _this.pacId = "";
      this.proIds = [];
      let data = {
        cusId,
@@ -2301,7 +2350,7 @@
          getTransitionList(cusId).then((response) => {
            this.tableData1 = response.data;
            this.TotalPrice1 = 0;
            if (this.tableData1.length>=1) {
            if (this.tableData1.length >= 1) {
              this.list1 = false;
              this.list3 = true;
            } else {
@@ -2316,7 +2365,7 @@
    Package() {
      this.taocan = true;
      this.activeNames="first"
      this.activeNames = "first";
      let cusSex = this.form.cusSex;
      this.datekey = Date.now();
      //全部套餐
@@ -2427,7 +2476,7 @@
            this.list1 = false;
            this.DataList.forEach((item) => {
              this.TotalPrice1 = item.proPrice + this.TotalPrice1;
              this.marryall += item.proPrice
              this.marryall += item.proPrice;
            });
          }
        });
@@ -2459,7 +2508,7 @@
            this.list1 = false;
            this.DataList.forEach((item) => {
              // this.TotalPrice1 = item.proPrice + this.TotalPrice1;
              this.marryall += item.proPrice
              this.marryall += item.proPrice;
            });
          }
        });
@@ -2486,14 +2535,13 @@
    },
    renderContent(h, { node, data, store }) {
        return (
          <span class="custom-tree-node">
               <span>{node.label}</span>
            <span>({data.proPrice}元)</span>
          </span>);
      },
      return (
        <span class="custom-tree-node">
            <span>{node.label}</span>
          <span>({data.proPrice}元)</span>
        </span>
      );
    },
    // 点击获取每个树节点
    handleCurrentChecked1(data, checked, checkedNodes) {
      if (checked == false) {
@@ -2516,7 +2564,7 @@
        this.spliceData();
        this.marryall = 0;
        this.DataList.forEach((item1) => {
          this.marryall += item1.proPrice
          this.marryall += item1.proPrice;
        });
      }
    },
@@ -2528,7 +2576,7 @@
          this.DataList.splice(index, 1);
          this.marryall = 0;
          this.DataList.forEach((item1) => {
            this.marryall += item1.proPrice
            this.marryall += item1.proPrice;
          });
        }
      });
@@ -2968,7 +3016,7 @@
            message: "请选择套餐!",
          });
        }
      }else {
      } else {
        this.$modal.msgError("请选择体检类别");
      }
    },