qx
qx
7 天以前 887851419d98568a815de95a6a96fbdfb3dfcf38
src/views/system/tijian/index.vue
@@ -1,4 +1,6 @@
<template>
   <div v-loading="isLoading" element-loading-text="请稍候..." element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(255, 255, 255, 0.8)" style="height: 100%; padding: 20px; position: relative;">
  <div class="app-container">
    <el-dialog :title="title" :visible.sync="open1" width="1000px" append-to-body>
      <el-form ref="form1" :model="form1" :rules="rules1" label-width="100px" :inline="true">
@@ -181,7 +183,7 @@
                trigger: 'blur',
              },
            ]">
              <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled"
              <el-input v-model="form.cusPhone" placeholder="请输入联系电话"  maxlength="11" :disabled="isDisabled"
                @input="form.cusPhone = $event.replace(/\s/g, '')" />
            </el-form-item>
@@ -292,7 +294,7 @@
      <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" v-model="activeNames"
        @tab-click="handleClick">
        <el-tab-pane label="套餐" name="first">
          <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto">
          <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto" @submit.native.prevent="handle">
            <el-form-item label="套餐名称" prop="pacName">
              <el-input v-model="queryParam.pacName" placeholder="请输入套餐名称" clearable @keyup.enter.native="handle" />
            </el-form-item>
@@ -562,6 +564,15 @@
            </div>
            已选项目列表
          </div>
          <div v-loading="contentLoading" element-loading-text="加载中..." element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.7)" style=" padding: 0px 6px;
    border: 1px solid #e6ebf5;
    max-height: 650%;
    overflow: auto;
    width: 916px;
    margin-left: 35px;" >
          <div style="
              padding: 0px 6px;
              border: 1px solid #e6ebf5;
@@ -617,6 +628,7 @@
                </template>
              </el-table-column>
            </el-table>
          </div>
          </div>
        </div>
      </el-col>
@@ -749,6 +761,7 @@
    <Packages ref="aaa" @add="handleChanges" />
    <selectName ref="bbb" @add="handleChangesName" />
  </div>
</div>
</template>
<script>
@@ -815,6 +828,8 @@
  data() {
    return {
      isSubmitting: false,
      contentLoading: false,
      isLoading: false,
      open1: false,
      filterage: "",
      checkedkeys: [],
@@ -1323,7 +1338,9 @@
      // }
      if (!value) return true;
      if (data.proName.indexOf(value) !== -1) return true;
      if (data.proEngName.indexOf(value) !== -1) return true;
      let values = value.toLowerCase();
      if (data.proEngName.indexOf(values) !== -1) return true;
      // 匹配小写
      let arr = data.proName.spell("low", "array");
      let spell = arr.join("");
@@ -1347,20 +1364,8 @@
      if (data.zhmc.indexOf(value) !== -1) {
        return data.zhmc.indexOf(value) !== -1;
      } else {
        console.log(55555)
        if (/[A-Z]/.test(data.pym)) { // 检查是否包含大写字母
          let pym = data.pym.toLowerCase()
          console.log(pym,11111)
          return pym.indexOf(value) !== -1;
        } else if (/[a-z]/.test(data.pym)) { // 检查是否包含小写字母
          console.log(pym,22222)
          let pym = data.pym.toLowerCase()
          return pym.indexOf(value) !== -1;
        } else {
          console.log(66666)
          return data.pym.indexOf(value) !== -1;
        }
        let values = value.toLowerCase();
        return data.pym.indexOf(values) !== -1;
      }
    },
    beforeDestroy() {
@@ -1968,11 +1973,15 @@
    // 最新使用webSocket通信
    readCardWebSocket(resultObj) {
      let _this = this;
 const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
      if (resultObj.code === 200 && resultObj.data.name != null) {
        //回显相关数据
        _this.form.cusName = resultObj.data.name;
        _this.form.cusSex = resultObj.data.sex == "0" ? "女" : "男";
        if (isChineseChar(resultObj.data.sex)) {
          _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0
        } else {
          _this.form.cusSex = resultObj.data.sex;
        }
        _this.form.cusNational = resultObj.data.mz;
        _this.form.cusBrithday = resultObj.data.csrq;
        if (_this.form.cusBrithday) {
@@ -2027,7 +2036,7 @@
          //回显相关数据
          _this.form.cusName = resultObj.resultContent.partyName;
          _this.form.cusSex =
            resultObj.resultContent.gender == "0" ? "女" : "男";
            resultObj.resultContent.gender ;
          _this.form.cusNational = resultObj.resultContent.nation;
          _this.form.cusBrithday = resultObj.resultContent.bornDay;
          if (_this.form.cusBrithday) {
@@ -2323,7 +2332,8 @@
        dwId: this.form.firmId,
      };
      if (this.name) {
        getPackageListName(this.name).then((response) => {
      let name= this.name.toLowerCase()
        getPackageListName(name).then((response) => {
          this.newpacName = response.data;
          this.loading = false;
        });
@@ -2915,6 +2925,7 @@
    // 项目提交
    submit() {
    this.isLoading = true;
      if (this.form.cusIdcard) {
        var cusId = this.form.cusIdcard;
      } else {
@@ -2928,6 +2939,8 @@
      this.isSubmitting = true; // 开始提交时设置标志
      this.TotalPrice1 = 0; // 初始化应收金额
      this.TotalPrice = 0; // 初始化实收金额
      this.contentLoading = true;
      this.discount = 10; // 初始化折扣为10(100%)
      // 判断是否有选中的套餐
@@ -2964,9 +2977,11 @@
              this.processOrderItems(cusId);
            }
            this.isSubmitting = false; // 提交完成后重置标志
             this.isLoading = false;
          })
          .catch(() => {
            this.isSubmitting = false; // 确保在错误情况下也重置标志
             this.isLoading = false;
          });
      } else {
        getaddtTransition(data)
@@ -2975,9 +2990,13 @@
              this.processOrderItems(cusId);
            }
            this.isSubmitting = false; // 提交完成后重置标志
             this.isLoading = false;
            // this.contentLoading = false;
          })
          .catch(() => {
            this.isSubmitting = false; // 确保在错误情况下也重置标志
             this.isLoading = false;
            // this.contentLoading = false;
          });
      }
@@ -2989,6 +3008,7 @@
    // 处理订单项目
    processOrderItems(cusId) {
      getTransitionList1(cusId).then((response) => {
        this.contentLoading = false;
        this.tableData1 = response.data;
        let Price = 0;
        if (this.tableData1) {