3
lkk
2024-12-31 7f78bf8e0745ff51e3d307bd531ff40ea624568a
3
1个文件已修改
64 ■■■■ 已修改文件
src/views/system/comp/index.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/comp/index.vue
@@ -462,6 +462,7 @@
                  type="primary"
                  icon="el-icon-edit"
                  size="mini"
                  :disabled="singlegg"
                  @click="xiangmuWh"
                  >项目维护</el-button
                >
@@ -1424,9 +1425,6 @@
    },
    // 折扣
    numberChange(currentValue) {
      console.log(this.forms.limits, 888);
      console.log(currentValue, 666);
      this.forms.limits = currentValue;
      /* if (this.forms.limits > this.getInfodis) {
        this.forms.limits = this.getInfodis;
@@ -1642,7 +1640,51 @@
      ).toFixed(2);
      // console.log(this.groupingList, 555);
      this.handleGroup();
      let mapList = [];
      this.OnenewpacName.forEach((item) => {
        mapList.push({
          proName: item.proName,
          proId: item.proId,
          proPrice: item.proPrice,
        });
      });
      // 如果 selectionList 为空,使用 mapList 继续保存
      if (this.OnenewpacName.length === 0) {
        this.$modal.msgError("请先选中项目");
        return; // 提示用户选中项目
      }
      let data = {
        groupingName: this.forms.groupingName,
        gtAge: this.forms.gtAge,
        limits: this.forms.limits,
        ltAge: this.forms.ltAge,
        pacName: this.forms.pacName,
        payType: this.forms.payType,
        sex: this.forms.sex,
        dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 如果没有选中部门,设置为空
        dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "",
        mapList: mapList,
        price: this.forms.price,
        ysPrice: this.forms.ysPrice,
        id: this.groupList[0].id,
      };
      // 发送请求保存数据
      dwgrouping(data).then((res) => {
        if (res.code == 200) {
          this.beCurrent();
          this.forms.groupingName = "";
          this.forms.sex = "";
          this.forms.pacName = "";
          this.forms.price = "";
          this.forms.ysPrice = "";
          this.forms.payType = "";
        }
      });
      // this.handleGroup();
    },
    // 套餐单项获取
    handleChangeOne(selection) {
@@ -1757,6 +1799,12 @@
      getDetails(id).then((res) => {
        this.OnenewpacName = res.data.groupingProList;
        this.OnenewpacName.forEach((item, index) => {
          this.queryParams.price += item.proPrice;
        });
        // return this.OnenewpacName.forEach((item) => {
        //   this.queryParams.price += item.proPrice;
        // });
      });
      if (this.forms.sex) {
        deptTreeSelect(this.forms.sex).then((response) => {
@@ -1853,14 +1901,14 @@
    }, */
    handleGroup() {
      // 如果没有选中任何部门(即没有 selectionList),可以直接从 OnenewpacName 获取数据
      // let mapList = [];
      /*  this.OnenewpacName.forEach((item) => {
      let mapList = [];
      this.OnenewpacName.forEach((item) => {
        mapList.push({
          proName: item.proName,
          proId: item.proId,
          proPrice: item.proPrice,
        });
      }); */
      });
      // 如果 selectionList 为空,使用 mapList 继续保存
      /* if (this.OnenewpacName.length === 0) {
@@ -1883,7 +1931,7 @@
        sex: this.forms.sex,
        dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 如果没有选中部门,设置为空
        dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "",
        // mapList: mapList,
        mapList: mapList,
        price: this.forms.price,
        ysPrice: this.forms.ysPrice,
        id: this.groupList[0].id,