qx
qx
2025-04-10 6e08327e5ac538a54c11fe3fe9952b11ce1888e4
qx
5个文件已修改
145 ■■■■■ 已修改文件
src/api/system/comp.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sampling/sampling/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/comp/12334.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/comp/index.vue 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/tijian/index.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/comp.js
@@ -92,13 +92,11 @@
}
// 获取体检单项项目信息
export function getProjectList(proName) {
export function getProjectList(query) {
  return request({
    url: '/hosp/dwgrouping/getTjParentProjectList',
    method: 'get',
    params:{
      proName:proName
    }
    params: query
  })
}
src/views/sampling/sampling/index.vue
@@ -105,7 +105,7 @@
      </div>
      <div style="width: 50%">
        <!-- v-if="this.rightTabShow" -->
        <el-table :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange"
        <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange"
          :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px">
          <el-table-column type="selection" width="40" align="center" />
          <!--  :selectable="selectEnable" -->
@@ -298,6 +298,7 @@
        proName: null,
      },
      startTime: "",
     tableKey : "",
      pickerOptions: {
        shortcuts: [
          {
@@ -673,6 +674,7 @@
          .then((response) => {
            if (response.data) {
              this.tableList = response.data;
              this.tableKey = Date.now()
              this.$nextTick(() => {
                if (this.$refs.tab1) {
                  this.$refs.tab1.doLayout(); // 修改为正确的 ref 名称
@@ -680,6 +682,7 @@
                }
              });
              resolve(this.tableList);
              this.loading = false;
            } else {
              this.tableList = [];
              this.selectList = [];
@@ -1083,7 +1086,7 @@
<style>
#ta .el-table__header-wrapper .el-checkbox {
  /* display: none; */
  display: none;
}
.el-table .warning-row {
src/views/system/comp/12334.vue
@@ -1213,7 +1213,6 @@
        });
      } else {
        console.log('进来了else');
        deptTreeSelect().then((response) => {
          this.newpacName = response.rows;
          console.log('6', response.rows);
src/views/system/comp/index.vue
@@ -139,7 +139,7 @@
    </div>
    <div>
      <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="false">
      <el-dialog :title="title" :visible.sync="opens" width="1350px" append-to-body :close-on-click-modal="true">
        <el-row :gutter="20">
          <el-col :span="7" :xs="24">
            <div style="padding: 0 20px">
@@ -210,10 +210,6 @@
                  <el-input v-model="forms.gtAge" style="width: 54px" />
                </el-col>
              </el-form-item>
            </el-form>
            <el-row :gutter="10" class="mb8">
@@ -322,13 +318,13 @@
            </div>
          </el-col>
          <el-col :span="8" :xs="24">
            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
            <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              label-width="68px" @submit.native.prevent>
              <el-form-item>
                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">选择套餐</el-button>
              </el-form-item>
              <el-form-item label="项目名称" prop="proName">
                <el-input ref="inputName" v-model="queryParams.proName" placeholder="请输入项目名称" clearable
                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="请输入项目名称" clearable
                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
              </el-form-item>
              <el-form-item>
@@ -402,7 +398,7 @@
                }}</span>条</div>
          </el-col>
          <el-col :span="2" :xs="24">
          <!-- <el-col :span="2" :xs="24">
            <div style="margin: 240% 16%" class="btntoleft">
              <el-button type="primary" size="medium"
                style="writing-mode: vertical-rl; text-align: center; letter-spacing: 5px;" @click="resetright">
@@ -411,16 +407,16 @@
                <i class="el-icon-back"></i>
              </el-button>
            </div>
          </el-col>
          </el-col> -->
          <el-col :span="7" :xs="24">
            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
            <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch"
              label-width="68px" @submit.native.prevent>
              <el-form-item>
                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">选择套餐</el-button>
              </el-form-item>
              <el-form-item label="项目名称" prop="proName">
                <el-input ref="inputName" v-model="queryParams.proName" placeholder="请输入项目名称" clearable
                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="请输入项目名称" clearable
                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
              </el-form-item>
              <el-form-item>
@@ -505,13 +501,13 @@
            </div>
          </el-col>
          <el-col :span="8" :xs="24">
            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
            <el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch"
              label-width="68px" @submit.native.prevent>
              <el-form-item>
                <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">选择套餐</el-button>
              </el-form-item>
              <el-form-item label="项目名称" prop="proName">
                <el-input ref="inputName" v-model="queryParams.proName" placeholder="请输入项目名称" clearable
                <el-input ref="inputName" v-model="queryParams1.proName" placeholder="请输入项目名称" clearable
                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
              </el-form-item>
              <el-form-item>
@@ -703,6 +699,10 @@
        xianprice: null,
        limits: null
      },
      queryParams1: {
        proName: null,
        pym: null,
      },
      id: "",
      // 表单参数
      form: {},
@@ -882,8 +882,8 @@
    updateProPrice(row) {
      const proPrice = new Big(row.proPrice);
      const limits = new Big(row.limits);
      const result = proPrice.times(limits.div(10));  // ordPrice * (discount / 10)
      row.ysPrice = result.toNumber();
      const result = proPrice.times(limits.div(10)).toNumber();  // ordPrice * (discount / 10)
      row.ysPrice = result.toFixed(2);
      this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
        return sum.plus(new Big(item.ysPrice || '0'));
      }, new Big(0)).toNumber();
@@ -892,8 +892,8 @@
    updateProPrice1(row) {
      const proPrice = new Big(row.proPrice);
      const limits = new Big(row.limits);
      const result = proPrice.times(limits.div(10));
      row.ysPrice = result.toNumber();
      const result = proPrice.times(limits.div(10)).toNumber();  // ordPrice * (discount / 10)
      row.ysPrice = result.toFixed(2);
      const totalYsPrice = this.OnenewpacName.reduce((sum, item) => {
        return sum.plus(new Big(item.ysPrice || '0'));
      }, new Big(0));
@@ -923,12 +923,9 @@
    },
    changeXianjia() {
      // 原始折扣率计算
      if (this.queryParams.price !== 0) {
        this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10;
      }
    },
    getList() {
@@ -938,7 +935,6 @@
        (this.loading = true);
      listComp(this.queryParams).then((response) => {
        this.compList = response.rows;
        response.rows.forEach((item, index) => {
          item.newID =
            (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
@@ -1103,7 +1099,7 @@
            item.ysPrice = result.toNumber();
            this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
              return sum.plus(new Big(item.ysPrice || '0'));
            }, new Big(0));
            }, new Big(0)).toNumber();
          })
          // ----------------------------------------------------------
@@ -1187,7 +1183,7 @@
        });
      } else {
        deptTreeSelect().then((response) => {
          console.log('222', response.rows);
          this.newpacName = response.rows;
          this.loading = false;
          response.rows.forEach((item, index) => {
@@ -1241,21 +1237,27 @@
      }
    },
    handleSearchFor() {
      getProjectList(this.queryParams.proName).then((response) => {
        response.data.forEach((item, index) => {
          item.newID =
            (this.queryParams.pageNum - 1) * this.queryParams.pageSize +
            index +
            1;
        });
      // 判断是否为汉字
      const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
      if (isChineseChar(this.queryParams1.proName)) {
        this.queryParams1.pym = null
        getProjectList(this.queryParams1).then((response) => {
        this.Treedata = response.data;
      });
      } else {
        this.queryParams1.pym = this.queryParams1.proName
        this.queryParams1.proName = null
        getProjectList(this.queryParams1).then((response) => {
          this.Treedata = response.data;
        });
      }
    },
    // 单项数据获取
    handleChangesingle(selection) {
      console.log(selection,22222222)
      if (selection) {
        this.dataList = selection;
        this.resetright()
      }
    },
    resetright() {
@@ -1269,7 +1271,7 @@
        const newItemsToAdd = []; // 用于存储新需要添加的项目
        this.dataList.forEach((item) => {
          this.$refs.tre.toggleRowSelection(item, false); // 取消选中状态
          // 使用 $set 确保响应性
          this.$set(item, 'limits', 10); // 设置限制数量
          this.$set(item, 'ysPrice', item.proPrice); // 设置现价为原价
@@ -1280,11 +1282,12 @@
            newItemsToAdd.push(item); // 如果不存在相同项目,则添加到新数组
            this.updateProPrice(item);
          }
          this.$refs.tre.toggleRowSelection(item, false); // 取消选中状态
        });
        // 添加新项目到 OnenewpacName
        this.OnenewpacName.push(...newItemsToAdd);
        console.log(  this.OnenewpacName,2121)
        // 删除重复项目,这里我们只需处理新添加的项目和原有项目之间的重复
        for (let i = this.OnenewpacName.length - newItemsToAdd.length; i < this.OnenewpacName.length - 1; i++) {
          for (let j = i + 1; j < this.OnenewpacName.length; j++) {
@@ -1299,11 +1302,12 @@
        // 重新计算总价和现价
        this.OnenewpacName.forEach((item) => {
          this.queryParams.price += item.proPrice; // 累加原价
          this.queryParams.xianprice += item.ysPrice || 0; // 累加现价,如果ysPrice为undefined则累加0
          //this.queryParams.xianprice += item.ysPrice || 0;  累加现价,如果ysPrice为undefined则累加0
        });
        // 计算优惠,这里假设优惠是现价与原价的差额百分比
        this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10;
        this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
        return sum.plus(new Big(item.ysPrice || '0'));
      }, new Big(0)).toNumber();
      this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
      }
    },
    handledbelete(row) {
@@ -1474,13 +1478,16 @@
        let id = this.groupList[0].id || '';
        getDetails(id).then((res) => {
          this.OnenewpacName = res.data.groupingProList;
          this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
            return sum.plus(new Big(item.ysPrice || '0'));
          }, new Big(0));
          this.OnenewpacName.forEach((item, index) => {
            this.queryParams.price += item.proPrice;
          });
          this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
          // this.queryParams.xianprice = this.OnenewpacName.reduce((sum, item) => {
          //   return sum.plus(new Big(item.ysPrice || '0'));
          // }, new Big(0)).toNumber();
          // this.OnenewpacName.forEach((item, index) => {
          //   this.queryParams.price += item.proPrice;
          // });
          // this.youhui = (Math.floor((this.queryParams.xianprice / this.queryParams.price) * 100) / 100) * 10
          this.queryParams.xianprice = res.data.ysPrice
          this.queryParams.price= res.data.price
          this.youhui= res.data.limits
        });
      }
      // console.log(this.groupList[0].id, 9966);
@@ -1522,7 +1529,6 @@
      }
      getProjectList().then((response) => {
        this.Treedata = response.data;
        // console.log(this.Treedata,999888);
      });
    },
src/views/system/tijian/index.vue
@@ -89,7 +89,8 @@
              <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="openname">
                姓名
              </span>
              <el-input v-model="form.cusName" placeholder="请输入姓名" :disabled="isDisabled" @input="form.cusName = $event.replace(/\s/g, '')" />
              <el-input v-model="form.cusName" placeholder="请输入姓名" :disabled="isDisabled"
                @input="form.cusName = $event.replace(/\s/g, '')" />
            </el-form-item>
            <el-form-item label="证件类型" prop="idType">
@@ -147,7 +148,8 @@
              <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handleQuery">
                证件号码
              </span>
              <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="请输入身份证号" @input="handleIdCardInput"/>
              <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="请输入身份证号"
                @input="handleIdCardInput" />
              <!-- <i style="
                    font-size: 1rem;
                    position: absolute;
@@ -179,7 +181,8 @@
                trigger: 'blur',
              },
            ]">
              <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" @input="form.cusPhone = $event.replace(/\s/g, '')"/>
              <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled"
                @input="form.cusPhone = $event.replace(/\s/g, '')" />
            </el-form-item>
            <el-form-item label="出生日期" prop="cusBrithday">
@@ -1116,7 +1119,7 @@
            });
            this.TotalPrice = this.tableData1.reduce((sum, item) => {
              return sum.plus(new Big(item.nowPrice || "0"));
            }, new Big(0));
            }, new Big(0)).toNumber();
            this.discount =
              (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) *
              10;
@@ -1147,13 +1150,13 @@
      row.nowPrice = result.toNumber();
      this.TotalPrice = this.tableData1.reduce((sum, item) => {
        return sum.plus(new Big(item.nowPrice || "0"));
      }, new Big(0));
      }, new Big(0)).toNumber();
      this.discount =
        (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
    },
    updateProPrice1(row) {
      console.log("进入了1")
      console.log("进入了1", row)
      const ordPrice = new Big(row.ordPrice);
      const discount = new Big(row.discount);
      const result = ordPrice.times(discount.div(10));
@@ -1646,7 +1649,7 @@
            item.nowPrice = result.toNumber();
            this.TotalPrice = this.tableData1.reduce((sum, item) => {
              return sum.plus(new Big(item.nowPrice || "0"));
            }, new Big(0));
            }, new Big(0)).toNumber();
          });
        })
        .catch(() => {
@@ -1729,6 +1732,7 @@
      }
      if (formData.tjType === "") {
        formData.tjType = this.dict.type.dict_team[0].value;
      }
      addCustomer(formData).then((response) => {
@@ -2927,10 +2931,15 @@
    // 处理订单项目
    processOrderItems(cusId) {
      console.log(11222)
      getTransitionList1(cusId).then((response) => {
        this.tableData1 = response.data;
        let Price = 0;
        if (this.tableData1) {
          this.tableData1.forEach((item) => {
            if (typeof item.nowPrice  === 'number') {
              item.nowPrice  = Number(item.nowPrice.toFixed(2));
          }
            if (item.tjCategory != null) {
              this.tjCategory = item.tjCategory;
            }
@@ -2940,8 +2949,11 @@
              });
            }
            this.TotalPrice1 += item.ordPrice || 0; // 累加应收金额
            this.TotalPrice += item.nowPrice || 0; // 累加实收金额
            // this.TotalPrice += item.nowPrice || 0;
            Price += item.nowPrice || 0; // 累加实收金额
            this.TotalPrice = Price.toFixed(2);
          });
          console.log( this.TotalPrice1,this.TotalPrice)
          // 计算折扣
          this.discount = this.TotalPrice1 > 0 ?
            (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10 : 0;
@@ -3386,8 +3398,10 @@
}
.filter-tree {
  overflow-y: auto; /* 保留纵向滚动条 */
  overflow-x: hidden; /* 隐藏横向滚动条 */
  overflow-y: auto;
  /* 保留纵向滚动条 */
  overflow-x: hidden;
  /* 隐藏横向滚动条 */
  height: 350px;
}
@@ -3498,6 +3512,7 @@
  width: 100%;
  display: flex;
}
/* .tab3 {
  overflow-y: auto;
}