1
wwl
2024-12-31 c1a720f950f96f9315dd152289ea57b673d47d84
src/views/system/tijian/index.vue
@@ -135,10 +135,11 @@
                },
              ]"
            >
            <span
              <span
                slot="label"
                style="display: inline-block; border-bottom: 2px solid blue"
                @click="openname"
            @click="openname"
              >
                姓名
              </span>
@@ -1087,13 +1088,30 @@
            </div>
          </el-dialog>
          <div style="display: flex; align-items: flex-end;margin-bottom: 10px">
            <div style="margin-left: 46px;font-size:16px;">
              已选项目条数:0条
          <div
            style="
              display: flex;
              align-items: center;
              justify-content: flex-start;
              width: 100%;
            "
          >
            <div
              style="
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
              margin-left: 46px;
                font-size: 16px;
                margin-right: 20px;
              "
            >
              <span v-if="this.tableData1[0]">{{ this.tableData1[0].pacName || "" }}</span> 已选项目条数:<span
                style="font-weight: 700; color: red; margin-right: 5px"
                >{{ this.tableData1.length || 0 }}</span
              >条
            </div>
            <div style="margin-left: 242px;font-size:26px;font-weight: 700">
              已选项目列表
            </div>
            已选项目列表
          </div>
          <div
            style="
@@ -1115,8 +1133,6 @@
                  <template slot="title">
                    <div style="width: 70%">
                      {{
                        item.pacName +
                        ":" +
                        item.parentName +
                        " (应收金额:" +
                        item.ordPrice +
@@ -1488,10 +1504,12 @@
      </span>
    </el-dialog>
    <Packages ref="aaa" @add="handleChanges" />
    <selectName ref="bbb" @add="handleChangesName"/>
  </div>
</template>
<script>
import selectName from "@/components/selectName";
import { dataURLtoFile, random } from "./file";
import { getInfo } from "@/api/login";
import {
@@ -1502,6 +1520,7 @@
} from "@/api/hosp/customer";
import { getPrintSetUp } from "@/api/system/examcharge";
import {
  tuantiSelect,
  deptTreeSelect,
  projectGetList,
  getOrder,
@@ -1510,6 +1529,7 @@
  getCusIdcard,
  getPackageListName,
  getaddtTransition,
  tuantiqueren,
  getTransitionList,
  getByTeamNo,
  delTbBycusCardIdAndProId,
@@ -1545,6 +1565,7 @@
    VTreeTransfer,
    historyTj,
    Packages,
    selectName,
  },
  data() {
    return {
@@ -1814,7 +1835,12 @@
  mounted() {},
  methods: {
    openname: {},
    openname() {
      this.$refs.bbb.open = true;
      this.$refs.bbb.title = "搜索姓名";
      this.$refs.bbb.getList();
    },
    getCompanyList() {
      this.loading = true;
      getconfigKey("team_reservation_default_day").then((res) => {
@@ -2340,13 +2366,7 @@
            this.responseList = response.data;
            
            this.$modal.msgSuccess("新增成功");
            // let cusSex = this.form.cusSex;
            // //全部套餐
            // deptTreeSelect(cusSex).then((response) => {
            //   this.newpacName = response.rows;
            //   this.loading = false;
            // });
            // this.handleQuery();
            _this.tcShow = true;
            _this.tcShows = true;
            _this.isDisabled = true;
@@ -2837,7 +2857,10 @@
      // this.form.cusName = param1[0].pacName;
      // this.form.cusPhone = param1[0].pacRemark;
    },
    handleChangesName(params){
      this.form.cusIdcard = params[0].sfzh
      this.handleQuery()
    },
    // selected(row, index) {
    //   if (this.formPacId !== null) {
    //     if (row.pacId == this.formPacId) {
@@ -2892,16 +2915,27 @@
    handle() {
      this.loading = true;
      this.name = this.queryParam.pacName;
      let param = {
        sex: this.form.cusSex,
        dwId: this.form.dictCompId
      }
      if (this.name) {
        getPackageListName(this.name).then((response) => {
          this.newpacName = response.data;
          this.loading = false;
        });
      } else {
        deptTreeSelect().then((response) => {
        if(this.form.tjType == 1) {
          tuantiSelect(param).then((response) => {
          this.newpacName = response.data;
          this.loading = false;
        })
        } else{
          deptTreeSelect().then((response) => {
          this.newpacName = response.rows;
          this.loading = false;
        });
        }
      }
    },
@@ -2988,13 +3022,51 @@
    },
    Package() {
      this.taocan = true;
      this.activeNames = "first";
      let cusSex = this.form.cusSex;
      this.datekey = Date.now();
      //全部套餐
      this.loading = true;
      deptTreeSelect(cusSex).then((response) => {
      let param = {
        sex: cusSex,
        dwId: this.form.dictCompId || ''
      }
      if(this.form.tjType == 1) {
       if(!this.form.dictCompId) {
        this.$message({
                        type: "warning",
                        message: "请先维护单位!",
                      });
       } else {
        this.taocan = true;
        this.loading = true;
        tuantiSelect(param).then((res) => {
          this.newpacName = res.data;
          try {
          if (this.tableData1.length >= 1) {
            this.newpacName.forEach((item3) => {
              this.tableData1.forEach((item4) => {
                item4.list.forEach((item6) => {
                  if (item6.pacName === item3.pacName) {
                    this.$nextTick(() => {
                      this.$refs.tb.toggleRowSelection(item3, true);
                    });
                    throw Error();
                  }
                });
              });
            });
          }
        } catch (error) {}
        this.loading = false;
        })
       }
      } else {
        this.taocan = true;
        this.loading = true;
        deptTreeSelect(cusSex).then((response) => {
        this.newpacName = response.rows;
        try {
          if (this.tableData1.length >= 1) {
@@ -3014,7 +3086,9 @@
        } catch (error) {}
        this.loading = false;
      });
      // this.getData();
      }
    },
    // 点击多选框获取选中数据
@@ -3410,7 +3484,8 @@
        pacId: _this.pacId,
        proIds: this.proIds,
      };
      getaddtTransition(data).then((response) => {
      if (this.form.tjType == 1){
        tuantiqueren(data).then((response) => {
        if (response.code == 200) {
          let cusId = this.form.cusIdcard;
          this.proIds = [];
@@ -3450,21 +3525,54 @@
          console.log(失败了);
        }
      });
      } else {
        getaddtTransition(data).then((response) => {
        if (response.code == 200) {
          let cusId = this.form.cusIdcard;
          this.proIds = [];
          getTransitionList(cusId).then((response) => {
            this.tableData1 = response.data;
            this.TotalPrice1 = 0;
            if (this.tableData1) {
              this.tableData1.forEach((item) => {
                this.TotalPrice1 += item.nowPrice;
                if (item.tjCategory != null) {
                  this.tjCategory = item.tjCategory;
                }
                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;
              this.list2 = false;
            } else {
              this.list1 = true;
              this.TotalPrice = "0.00";
            }
          });
        } else {
          console.log(失败了);
        }
      });
      }
      this.taocan = false;
      this.defaultKeys = [];
      this.DataLists = [];
    },
    // changeCategoryKeys(val) {
    //   this.proIds = [];
    //   this.proIds = val;
    // if (this.DataList.length != 0) {
    //   this.DataList.forEach((item) => {
    //     this.proIds.push(item.proId);
    //   });
    // } else {
    //   this.proIds = [];
    // }
    // },
    submitCheckinfee() {
      let _this = this;
      if (_this.tjCategory !== "") {