qx
9 天以前 38a40fefc0c7c6afb17958f6827304dbefda9873
src/views/system/zhiye/index.vue
@@ -758,7 +758,7 @@
  tuantiSelect,
  deptTreeSelect,
  projectGetList,
  getOrderzhiye,
  getOrder,
  getProParentIdDxList,
  getProSonDxList,
  getCusIdcard,
@@ -2380,8 +2380,7 @@
        }
      });
    },
    Package() {
Package() {
      this.activeNames = "first";
      if (this.form.cusSex == "男") {
        this.form.cusSex = 0;
@@ -2391,33 +2390,93 @@
      let cusSex = this.form.cusSex;
      this.datekey = Date.now();
      //全部套餐
      this.taocan = true;
      this.loading = true;
      deptTreeSelect(cusSex).then((response) => {
        this.newpacName = response.rows;
        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);
      let param = {
        sex: cusSex,
        dwId: this.form.firmId || "",
      };
      if (this.form.tjType == 6) {
        if (!this.form.firmId && !this.form.firmName) {
          this.$message({
            type: "warning",
            message: "请先维护单位!",
          });
        } else if (!this.form.firmId && this.form.firmName) {
          this.taocan = true;
          this.loading = true;
          deptTreeSelect(cusSex).then((response) => {
            this.newpacName = response.rows;
            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();
                      }
                    });
                    throw Error();
                  }
                  });
                });
              }
            } catch (error) { }
            this.loading = false;
          });
        } 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) {
              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;
      });
            }
          } catch (error) { }
          this.loading = false;
        });
      }
    },
    // 点击多选框获取选中数据
    handleSelectionChange(selection, row) {
      console.log(selection)
      this.tableData = selection;
      if (selection.length > 1) {
        let del_row = selection.shift();
@@ -2462,37 +2521,6 @@
        });
      }
      if (selection[0]) {
        // this.DataList = [];
        // this.data = JSON.parse(JSON.stringify(this.dXData));
        // selection[0].tjProjectList.forEach((selectionitem) => {
        //   this.Treedata.forEach((item) => {
        //     if (selectionitem.proName == item.proName) {
        //       item.disabled = true;
        //       item.tjProjectList = [];
        //     }
        // if (item.tjProjectList) {
        //   item.tjProjectList.forEach((item1) => {
        //     if (selectionitem.proName == item1.proName) {
        //       item1.disabled = true;
        //       item1.tjProjectList = [];
        //     }
        //     if (item1.tjProjectList) {
        //       item1.tjProjectList.forEach((item2) => {
        //         if (selectionitem.proName == item2.proName) {
        //           item2.disabled = true;
        //           item2.tjProjectList = [];
        //         }
        //       });
        //     }
        //   });
        // }
        // });
        //   this.TreedataList.forEach((item3) => {
        //     if (item3.proParentId == selectionitem.proId) {
        //       item.disabled = true;
        //     }
        //   });
        // });
      } else {
        this.treedataList = JSON.parse(JSON.stringify(this.dXData));
        return;
@@ -2841,6 +2869,7 @@
    // 项目提交
    submit() {
      if (this.form.cusIdcard) {
        var cusId = this.form.cusIdcard;
      } else {
@@ -3041,7 +3070,7 @@
          };
        }
        getOrderzhiye(data).then((res) => {
        getOrder(data).then((res) => {
          this.$modal.msgSuccess("提交成功");
          this.tjNumbers = res.msg;
          this.charge = true;
@@ -3214,7 +3243,14 @@
    },
    listgetOrder(data) {
      getOrderzhiye(data).then((res) => {
      const loading = this.$loading({
        lock: true,
        text: '正在加载中,请稍等!',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      getOrder(data).then((res) => {
        loading.close();
        this.$modal.msgSuccess("提交成功");
        //调接口显示导检单
        const tjNumber = res.msg;
@@ -3226,8 +3262,7 @@
      this.$tab.refreshPage();
    },
    // 最后提交按钮
    submitPrice() {
 submitPrice() {
      let _this = this;
      this.loadingSubmit = true;
      if (_this.tjCategory !== "") {
@@ -3278,12 +3313,11 @@
            discount: item.discount,
            parentProId: item.parentProId,
            cusIdCard: item.cusId,
            yhj: item.nowPrice
            yhj: item.nowPrice,
          })); // 创建新的对象,包含 discount 和 id
        gaibianzhekou(newArray).then((res) => {
          this.loadingSubmit = false;
          if (res.code === 200) {
            let data;
            if (pacId || this.tjOrderList.length > 0) {
@@ -3298,10 +3332,6 @@
                firmId: this.form.firmId,
                firmName: this.form.firmName,
                firmDeptName: this.form.firmDeptName,
                zhiyeJhgly: this.form.zhiyeJhgly,
                zhiyeKsjhrq: this.form.zhiyeKsjhrq,
                zhiyeGh: this.form.zhiyeGh,
                zhiyeCj: this.form.zhiyeCj
              };
              this.listgetOrder(data);
@@ -3316,12 +3346,6 @@
                firmId: this.form.firmId,
                firmName: this.form.firmName,
                firmDeptName: this.form.firmDeptName,
                zhiyeJhgly: this.form.zhiyeJhgly,
                zhiyeKsjhrq: this.form.zhiyeKsjhrq,
                zhiyeGh: this.form.zhiyeGh,
                zhiyeCj: this.form.zhiyeCj
              };
              this.listgetOrder(data);
            } else {