wwl
2025-05-19 2a5114d7be44e464c55e7942759229be1a3c28fe
src/views/system/zhiye/index.vue
@@ -488,20 +488,20 @@
                  @blur="numberChangeXianPrice(discount, discount)" />
              </el-form-item>
              <el-form-item label="接害工龄年" prop="zhiyeJhgln" label-width="84px">
                <el-input  v-model="form.zhiyeJhgln"  type="number" style="width: 140px"/>
                <el-input v-model="form.zhiyeJhgln" type="number" style="width: 140px" />
              </el-form-item>
              <el-form-item label="接害工龄月" prop="zhiyeJhgln" label-width="84px">
                <el-input  v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
                <el-input v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
              </el-form-item>
              <el-form-item label="开始接害日期" prop="zhiyeKsjhrq" label-width="100px">
                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date"
                  value-format="yyyy-MM-dd" style="width: 200px" />
                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date" value-format="yyyy-MM-dd"
                  style="width: 200px" />
              </el-form-item>
              <el-form-item label="工号" label-width="50px">
                <el-input  v-model="form.zhiyeGh"  />
                <el-input v-model="form.zhiyeGh" />
              </el-form-item>
              <el-form-item label="车间" label-width="106px">
                <el-input  v-model="form.zhiyeCj" />
                <el-input v-model="form.zhiyeCj" />
              </el-form-item>
              <br />
@@ -550,9 +550,6 @@
                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>
@@ -2394,90 +2391,29 @@
      let cusSex = this.form.cusSex;
      this.datekey = Date.now();
      //全部套餐
      let param = {
        sex: cusSex,
        dwId: this.form.firmId || "",
      };
      if (this.form.tjType == 1) {
        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();
                      }
      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);
                    });
                  });
                });
              }
            } 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();
                    }
                  });
                    throw Error();
                  }
                });
              });
            }
          } catch (error) { }
          this.loading = false;
        });
      }
            });
          }
        } catch (error) { }
        this.loading = false;
      });
    },
    // 点击多选框获取选中数据
@@ -2967,6 +2903,15 @@
        });
      }
      // 如果 tjCategory 为 "02",确保选中的套餐被添加到 tableData1
      if (this.tjCategory === "02" && this.tableData.length > 0) {
        this.tableData.forEach((item) => {
          if (!this.tableData1.some((existingItem) => existingItem.pacId === item.pacId)) {
            this.tableData1.push(item);
          }
        });
      }
      this.taocan = false;
      this.defaultKeys = [];
      this.DataLists = [];