qx
qx
2 天以前 ca838a9f056cb7043b57bc34fde916686a465003
src/views/reservation/reservations/index.vue
@@ -99,81 +99,118 @@
      v-show="showSearch"
      label-width="68px"
    >
      <el-form-item label="姓名" prop="name">
        <el-input
          style="width: 120px"
          v-model="queryParams.name"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证号" prop="idCard">
        <el-input
          v-model="queryParams.idCard"
          placeholder="请输入身份证号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="联系电话" prop="phoe">
        <el-input
          v-model="queryParams.phoe"
          placeholder="请输入联系电话"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 140px"
        />
      </el-form-item>
      <el-form-item label="单位名称" prop="company">
        <el-select
          :remote-method="getRemoteData"
          v-model="queryParams.company"
          remote
          default-first-option
          allow-create
          filterable
          style="width: 200px"
          placeholder="请选择单位名称"
          clearable
          @change="idFn1"
        >
          <el-option
            v-for="dict in CompanyList"
            :key="dict.cnName"
            :label="dict.cnName"
            :value="dict.drugManufacturerId"
          />
        </el-select>
        <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
      </el-form-item>
      <el-form-item label="预约超期" prop="isExpire">
        <el-select
          v-model="queryParams.isExpire"
          placeholder="请选择是否超期"
          clearable
          style="width: 140px"
        >
          <el-option
            v-for="dict in options"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
      <el-row>
        <el-col>
          <el-form-item label="姓名" prop="name">
            <el-input
              style="width: 120px"
              v-model="queryParams.name"
              placeholder="请输入姓名"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="身份证号" prop="idCard">
            <el-input
              v-model="queryParams.idCard"
              placeholder="请输入身份证号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="单位名称" prop="companyId">
            <el-select
              :remote-method="getRemoteData"
              v-model="queryParams.companyId"
              remote
              default-first-option
              allow-create
              filterable
              style="width: 200px"
              placeholder="请选择单位名称"
              clearable
              @change="idFn1"
            >
              <el-option
                v-for="dict in CompanyList"
                :key="dict.cnName"
                :label="dict.cnName"
                :value="dict.drugManufacturerId"
              />
            </el-select>
            <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i>
          </el-form-item>
          <!-- <el-form-item label="套餐名称" prop="dwDeptName">
            <el-select v-model="queryParams.dwDeptName" placeholder="请选择套餐名称" clearable style="width: 100%"
              @change="idFn2">
              <el-option v-for="dict in deptList" :key="dict.id" :label="dict.dwDeptName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="分组名称" prop="groupingName">
            <el-select v-model="queryParams.groupingName" placeholder="请选择分组名称" clearable style="width: 100%">
              <el-option v-for="dict in groupingList" :key="dict.id" :label="dict.pacName" :value="dict.id" />
            </el-select>
          </el-form-item> -->
          <el-form-item label="预约时间">
            <el-date-picker
              clearable
              v-model="createTimeList"
              @change="dateChangebirthday2"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :picker-options="pickerOptions"
              value-format="yyyy-MM-dd"
              placeholder="请选择出预约时间"
              style="width: 300px"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col>
          <el-form-item label="联系电话" prop="phoe">
            <el-input
              v-model="queryParams.phoe"
              placeholder="请输入联系电话"
              clearable
              @keyup.enter.native="handleQuery"
              style="width: 140px"
            />
          </el-form-item>
          <el-form-item label="预约超期" prop="isExpire">
            <el-select
              v-model="queryParams.isExpire"
              placeholder="请选择是否超期"
              clearable
              style="width: 140px"
            >
              <el-option
                v-for="dict in options"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="handleQuery"
              >搜索</el-button
            >
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
              >重置</el-button
            >
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-row :gutter="10" style="margin: 10px 15px">
      <el-col :span="1.5">
@@ -295,7 +332,7 @@
          <span>{{ parseTime(scope.row.reservationTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
      <!-- <el-table-column
        label="体检类型"
        align="center"
        prop="tjType"
@@ -305,7 +342,7 @@
        <template slot-scope="scope">
          <dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" />
        </template>
      </el-table-column>
      </el-table-column> -->
      <el-table-column
        label="婚姻"
        align="center"
@@ -355,9 +392,23 @@
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="邮箱"
        label="套餐名称"
        align="center"
        prop="email"
        prop="dwDeptName"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column
        label="分组名称"
        align="center"
        prop="groupingName"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column
        label="单位部门"
        align="center"
        prop="department"
        :show-overflow-tooltip="true"
        width="160px"
      />
@@ -554,10 +605,10 @@
                  style="width: 160px"
                />
              </el-form-item>
              <el-form-item label="单位名称" prop="company">
              <el-form-item label="单位名称" prop="companyId">
                <el-select
                  :remote-method="getRemoteData"
                  v-model="formIn.company"
                  v-model="formIn.companyId"
                  remote
                  default-first-option
                  allow-create
@@ -569,7 +620,7 @@
                >
                  <el-option
                    v-for="dict in CompanyList"
                    :key="dict.cnName"
                    :key="dict.drugManufacturerId"
                    :label="dict.cnName"
                    :value="dict.drugManufacturerId"
                  />
@@ -857,29 +908,36 @@
                  "
                >
                  <el-table :data="tableData1" border style="width: 100%">
                    <el-table-column prop="proName" label="项目" width="180" align="center">
                    <el-table-column
                      prop="proName"
                      label="项目"
                      width="180"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column prop="proType" label="性别" width="50" align="center">
                    <!-- <el-table-column
                      prop="proType"
                      label="性别"
                      width="50"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <template v-if="isAll(scope.row.proType)">
                          全部
                        </template>
                        <template v-else>
                          <dict-tag
                            :options="dict.type.sys_user_sex"
                            :value="scope.row.proType"
                          />
                        </template>
                        {{ scope.row.proType || '全部' }}
                      </template>
                    </el-table-column>
                    </el-table-column> -->
                    <el-table-column prop="ordPrice" label="应收金额" align="center">
                    <el-table-column
                      prop="ordPrice"
                      label="应收金额"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column label="折扣" width="160px" align="center">
                      <!-- @input="validateDiscount(scope.row)" -->
                      <template slot-scope="scope">
                        <el-input-number
                          v-model.number="scope.row.discount"
                          @input="validateDiscount(scope.row)"
                          placeholder="输入折扣"
                          size="small"
                          type="number"
@@ -887,14 +945,22 @@
                          :step="0.1"
                          :max="10"
                          :min="0"
                          :disabled="true"
                          :disabled="true"
                        >
                        </el-input-number>
                      </template>
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额" align="center">
                    <el-table-column
                      prop="nowPrice"
                      label="实收金额"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column prop="proCheckMethod" label="是否空腹" align="center">
                    <el-table-column
                      prop="proCheckMethod"
                      label="是否空腹"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <dict-tag
                          :options="dict.type.sys_yes_no"
@@ -1079,7 +1145,7 @@
              </div>
            </el-col>
          </el-row>
          <el-dialog
            title="导检单预览"
            :visible.sync="dialogVisibles"
@@ -1097,7 +1163,6 @@
        </div>
      </template>
    </el-drawer>
    <el-dialog
      title="PDF 预览"
@@ -1137,7 +1202,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer2">
        <el-button type="primary" @click="submitType"  >确 定</el-button>
        <el-button type="primary" @click="submitType">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
@@ -1339,7 +1404,7 @@
                >
                  <el-option
                    v-for="dict in CompanyList"
                    :key="dict.cnName"
                    :key="dict.drugManufacturerId"
                    :label="dict.cnName"
                    :value="dict.drugManufacturerId"
                  />
@@ -1611,9 +1676,19 @@
                  "
                >
                  <el-table :data="tableData1" border style="width: 100%">
                    <el-table-column prop="proName" label="项目" width="180" align="center">
                    <el-table-column
                      prop="proName"
                      label="项目"
                      width="180"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column prop="proType" label="性别" width="50" align="center">
                    <el-table-column
                      prop="proType"
                      label="性别"
                      width="50"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <template v-if="isAll(scope.row.proType)">
                          全部
@@ -1627,13 +1702,17 @@
                      </template>
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额" align="center">
                    <el-table-column
                      prop="ordPrice"
                      label="应收金额"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column label="折扣" width="160px" align="center">
                      <!--  @input="validateDiscount(scope.row)" -->
                      <template slot-scope="scope">
                        <el-input-number
                          v-model.number="scope.row.discount"
                          @input="validateDiscount(scope.row)"
                          placeholder="输入折扣"
                          size="small"
                          type="number"
@@ -1641,14 +1720,22 @@
                          :step="0.1"
                          :max="10"
                          :min="0"
                          :disabled="true"
                          :disabled="true"
                        >
                        </el-input-number>
                      </template>
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额" align="center">
                    <el-table-column
                      prop="nowPrice"
                      label="实收金额"
                      align="center"
                    >
                    </el-table-column>
                    <el-table-column prop="proCheckMethod" label="是否空腹" align="center">
                    <el-table-column
                      prop="proCheckMethod"
                      label="是否空腹"
                      align="center"
                    >
                      <template slot-scope="scope">
                        <dict-tag
                          :options="dict.type.sys_yes_no"
@@ -1853,10 +1940,14 @@
</template>
<script>
import { addComp,
  addPlOrderAndDetail } from "@/api/system/comp";
import {
  addComp,
  addPlOrderAndDetail,
  Deptlist,
  getDwAndDwDept,
} from "@/api/system/comp";
import Big from "big.js";
import { Loading } from 'element-ui';
import { Loading } from "element-ui";
import {
  listReservation,
  gettjCancel,
@@ -1923,6 +2014,8 @@
      taocan: false,
      webSocket: null,
      defaultKeys: [],
      deptList: [],
      groupingList: [],
      value1: "",
      pacName: "",
      hides: false,
@@ -1934,7 +2027,7 @@
      url: "",
      open2: false,
      forms: {
        tjCategory:"12"
        tjCategory: "12",
      },
      dialogVisible: false,
      /** 照相机弹窗模块-start */
@@ -1993,9 +2086,11 @@
      // 是否显示弹出层
      pacId: "",
      cusIds:[],
      cusIds: [],
      // 结果
      result: "",
      createTimeList: "",
      startTime: "",
      proIds: [],
      // 显示搜索条件
      showSearch: true,
@@ -2027,6 +2122,8 @@
        cusBrithday: null,
        cusAddr: null,
        cusPhone: null,
        yykssj: "", // 预约开始时间
        yyjssj: "", // 预约结束时间
        cusPostcode: null,
        cusEmail: null,
        indexCard: null,
@@ -2036,31 +2133,78 @@
        cusIntroduce: null,
        cusNumber: null,
        cusIsvip: null,
        orderByColumn: "reservationTime",
        isAsc: "desc",
        name: "",
        reservationTime: null,
        idCard: null,
        phoe: null,
        email: null,
        tjType: null,
        companyId: null,
        isExpire: null,
      },
      // 查询参数
      /*  queryParams: {
        pageNum: 1,
        pageSize: 10,
        orderByColumn: "reservationTime",
        isAsc: "desc",
        name: null,
        reservationTime: null,
        idCard: null,
        phoe: null,
        email: null,
        tjType: null,
        companyId: null,
        reservationTime: null,
        isExpire: null,
      }, */
      /* formIn: {
        name: "",
        // age: "",
        // idCard: "",
        // remark: null,
        // pacName: "",
        // cusaddr: null,
        // idType: null,
        // ageUnit: null,
        // sex: null,
        // phoe: "",
        // nation: null,
        // email: "",
        // marriage: null,
        // address: "",
        // tjCategory: null,
        company: "",
        // career: null,
        // reservationTime: null,
        // timeRegion: null,
        // indexCard: "",
        // department: "",
      }, */
      fmobj: {},
      formIn: {
        name: "",
        age: "",
        idType: "",
        idCard: "",
        remark: null,
        pacName: "",
        cusaddr: null,
        idType: null,
        ageUnit: null,
        sex: null,
        age: "",
        ageUnit: "",
        sex: "",
        phoe: "",
        nation: null,
        nation: "",
        email: "",
        marriage: null,
        marriage: "",
        address: "",
        tjCategory: null,
        company: "",
        career: null,
        reservationTime: null,
        timeRegion: null,
        indexCard: "",
        tjCategory: "",
        department: "",
        companyId: "",
        company: "",
        career: "",
        reservationTime: "",
        timeRegion: "",
        indexCard: "",
      },
      fmobj: {},
      // 表单校验
      form1: {},
      open1: false,
@@ -2131,21 +2275,7 @@
      valueUrls: "ws://127.0.0.1:6789/websocket",
      drawer: false,
      drawer1: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        orderByColumn: "reservationTime",
        isAsc: "desc",
        name: null,
        idCard: null,
        phoe: null,
        email: null,
        tjType: null,
        company: null,
        reservationTime: null,
        isExpire: null,
      },
      // 表单参数
      form: {},
      // 表单校验
@@ -2179,11 +2309,43 @@
        //   },
        // ],
      },
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date(new Date().setHours(0, 0, 0, 0));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date(new Date().setHours(0, 0, 0, 0));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date(new Date().setHours(0, 0, 0, 0));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    isAll(value) {
      return value === "" || value === null;
@@ -2212,6 +2374,10 @@
        (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10;
    },
    dateChangebirthday2(val) {
      this.startTime = val;
    },
    /** 删除按钮操作 */
    handleDelete1(row) {
      // console.log(row);
@@ -2227,7 +2393,7 @@
        .then(() => {
          this.TotalPrice1 = 0;
          getTransitionList1(row.cusId).then((response) => {
            this.tableData1 = response.data;
            this.tableData1 = response.data.list;
            this.tableData1.forEach((item) => {
              this.TotalPrice1 += item.ordPrice;
@@ -2288,17 +2454,41 @@
    idFn1(value) {
      if (value) {
        this.form.dictCompId = value;
        this.CompanyList.forEach((item) => {
          if (item.drugManufacturerId == this.form.dictCompId) {
            this.form.compName = item.cnName;
            this.queryParams.company = item.cnName;
          }
        console.log(value)
        // this.CompanyList.forEach((item) => {
        //   if (item.drugManufacturerId == this.form.dictCompId) {
        //     this.form.compName = item.cnName;
        //     this.queryParams.company = item.cnName;
        //   }
        // });
        Deptlist(value).then((response) => {
          this.deptList = response.data;
        });
      }
    },
    idFn2(value) {
      let data = {
        deptId: value,
        dwId: this.form.dictCompId,
      };
      getDwAndDwDept(data).then((response) => {
        // 部门名称
        this.groupingList = response.data;
      });
    },
    /** 查询体检预约列表 */
    getList() {
      this.loading = true;
      if (this.startTime) {
        this.queryParams.yykssj = this.startTime[0];
        this.queryParams.yyjssj = this.startTime[1];
      } else if (this.createTimeList) {
        this.queryParams.yykssj = this.createTimeList[0];
        this.queryParams.yyjssj = this.createTimeList[1];
      } else if (this.createTimeList == null) {
        this.queryParams.yykssj = null;
        this.queryParams.yyjssj = null;
      }
      listReservation(this.queryParams).then((response) => {
        this.reservationList = response.rows;
        //  response.rows.forEach((item, index) =>
@@ -2351,6 +2541,7 @@
        proIds: null,
        pacId: null,
        company: null,
        drugManufacturerId: null,
        companyId: null,
        jobNo: null,
        department: null,
@@ -2374,7 +2565,29 @@
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.startTime = [];
      this.createTimeList = [];
      this.resetForm("queryForm");
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        cusName: null,
        cusSex: null,
        cusBrithday: null,
        cusAddr: null,
        cusPhone: null,
        yykssj: "", // 预约开始时间
        yyjssj: "", // 预约结束时间
        cusPostcode: null,
        cusEmail: null,
        indexCard: null,
        cusNational: null,
        cusMarryStatus: null,
        cusIdcard: null,
        cusIntroduce: null,
        cusNumber: null,
        cusIsvip: null,
      };
      this.handleQuery();
    },
    // 多选框选中数据
@@ -2462,7 +2675,7 @@
              let cusId = response.data.idCard;
              getTransitionList1(cusId).then((response) => {
                if (response.data) {
                  this.tableData1 = response.data;
                  this.tableData1 = response.data.list;
                  if (this.tableData1.length != 0) {
                    this.TotalPrice1 = 0;
                    this.tableData1.forEach((item) => {
@@ -2506,41 +2719,28 @@
    /** 修改详细按钮操作 */
    handleUpdate1(row) {
      this.title = "预约详细信息";
      this.formIn = row;
      if (this.formIn.timeRegion === 0) {
        this.formIn.timeRegion = "8:00-9:00";
      }
      if (row.timeRegion === 1) {
        this.formIn.timeRegion = "9:00-10:00";
      }
      if (row.timeRegion === 2) {
        this.formIn.timeRegion = "10:00-11:00";
      }
      if (row.timeRegion === 3) {
        this.formIn.timeRegion = "11:00-12:00";
      }
      if (this.formIn.isExpire === 1) {
        this.tijiao1 = false;
      }
      this.drawer1 = true;
      if (this.formIn.discount != null) {
        this.discount = this.formIn.discount;
      }
      //全部套餐
      if (this.formIn.sex != null) {
        let cusSex = this.formIn.sex;
      if (row.sex != null) {
        let cusSex = row.sex;
        deptTreeSelect(cusSex).then((response) => {
          this.newpacName = response.rows;
          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();
                }
              });
              // item4.list.forEach((item6) => {
              //   if (item6.pacName === item3.pacName) {
              //     this.$nextTick(() => {
              //       this.$refs.tb.toggleRowSelection(item3, true);
              //     });
              //     throw Error();
              //   }
              // });
              if (item4.pacName === item3.pacName) {
                this.$nextTick(() => {
                  this.$refs.tb.toggleRowSelection(item3, true);
                });
                throw Error();
              }
            });
          });
          this.loading = false;
@@ -2563,42 +2763,63 @@
          this.loading = false;
        });
      }
      let id = this.formIn.id;
      let id = row.id;
      this.list1 = true;
      (this.tableData1 = []),
        (this.newpacName = []),
        getReservation(id).then((response) => {
          if (response.data) {
            let cusId = response.data.idCard;
            getTransitionList1(cusId).then((response) => {
              if (response.data) {
                this.tableData1 = response.data;
      (this.tableData1 = []), (this.newpacName = []), (this.drawer1 = true);
      getReservation(id).then((response) => {
        if (response.data) {
          this.formIn = response.data;
                if (this.tableData1.length != 0) {
                  this.TotalPrice1 = 0;
                  this.tableData1.forEach((item) => {
                    this.TotalPrice1 += item.nowPrice;
                    this.TotalPrice = (
                      this.TotalPrice1 *
                      (this.discount / 10)
                    ).toFixed(2);
                    if (item.pacName === null) {
                      item.pacName = "单项";
                    }
                  });
                  this.list1 = false;
                  this.list3 = true;
                } else {
                  this.list1 = true;
                }
          if (this.formIn.timeRegion === 0) {
            this.formIn.timeRegion = "8:00-9:00";
          }
          if (row.timeRegion === 1) {
            this.formIn.timeRegion = "9:00-10:00";
          }
          if (row.timeRegion === 2) {
            this.formIn.timeRegion = "10:00-11:00";
          }
          if (row.timeRegion === 3) {
            this.formIn.timeRegion = "11:00-12:00";
          }
          if (this.formIn.isExpire === 1) {
            this.tijiao1 = false;
          }
          // this.drawer1 = true;
          if (this.formIn.discount != null) {
            this.discount = this.formIn.discount;
          }
          let cusId = this.formIn.idCard;
          getTransitionList1(cusId).then((response) => {
            if (response.data) {
              this.tableData1 = response.data.list;
              console.log("tableData1", this.tableData1);
              if (this.tableData1.length != 0) {
                this.TotalPrice1 = 0;
                this.tableData1.forEach((item) => {
                  this.TotalPrice1 += item.nowPrice;
                  this.TotalPrice = (
                    this.TotalPrice1 *
                    (this.discount / 10)
                  ).toFixed(2);
                  if (item.pacName === null) {
                    item.pacName = "单项";
                  }
                });
                this.list1 = false;
                this.list3 = true;
              } else {
                this.tableData1 = [];
                this.list3 = false;
                this.list1 = true;
              }
            });
          }
        });
            } else {
              this.tableData1 = [];
              this.list3 = false;
              this.list1 = true;
            }
          });
        }
      });
      /** 查询部门下拉树结构 */
      projectGetList().then((response) => {
@@ -2613,7 +2834,6 @@
      this.discount = currentValue;
      this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2);
    },
    Package() {
      this.taocan = true;
      this.datekey = Date.now();
@@ -2682,104 +2902,107 @@
      this.open2 = true;
    },
    submitType() {
      // let cusIds = [];
      // this.selectList.forEach((item) => {
      //   cusIds.push(item.idCard);
      // });
      let loadingInstance1 = Loading.service({ fullscreen: true,text:"签到中" });
      let loadingInstance1 = Loading.service({
        fullscreen: true,
        text: "签到中",
      });
      let data = {
        cusIds: this.cusIds,
        tjCategory: this.forms.tjCategory,
      };
      this.open2 = false;
      addPlOrderAndDetail(data).then((res) => {
        if(res.code == 200){
        if (res.code == 200) {
          this.open2 = false;
        this.$modal.msgSuccess("签到成功");
        if (res.file) {
          let base64 = res.file;
          this.base64ToBlob({
            b64data: base64,
            contentType: "application/pdf",
          }).then((res) => {
            this.dialogVisible = true;
            // 转后后的blob对象
            try {
              this.url = res.preview;
            } catch (error) {
              this.url = window.webkitURL.createObjectURL(res.preview);
          this.$modal.msgSuccess("签到成功");
          if (res.file) {
            let base64 = res.file;
            this.base64ToBlob({
              b64data: base64,
              contentType: "application/pdf",
            }).then((res) => {
              this.dialogVisible = true;
              // 转后后的blob对象
              try {
                this.url = res.preview;
              } catch (error) {
                this.url = window.webkitURL.createObjectURL(res.preview);
              }
            });
          } else {
            let _this = this;
            this.$nextTick(() => {
              // 以服务的方式调用的 Loading 需要异步关闭
              loadingInstance1.close();
            });
            var websocket = null;
            var url = _this.valueUrls;
            if ("WebSocket" in window) {
              websocket = new WebSocket(url);
            } else if ("MozWebSocket" in window) {
              websocket = new MozWebSocket(url);
            } else {
            }
          });
        }else{
          let _this = this;
          this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
            loadingInstance1.close();
});
        var websocket = null;
        var url = _this.valueUrls;
        if ("WebSocket" in window) {
          websocket = new WebSocket(url);
        } else if ("MozWebSocket" in window) {
          websocket = new MozWebSocket(url);
        } else {
        }
        if (websocket == null) {
          alert("11111");
        }
        websocket.onopen = function () {
          try {
            // 连接设备
            var jsonObjs = {
              type: 4,
              data: res,
            };
            var jStrs = JSON.stringify(jsonObjs);
            websocket.send(jStrs);
          } catch (err) {
            var tryTime = 0;
            // 重试10次,每次之间间隔3秒
            if (tryTime < 1) {
              var t1 = setTimeout(function () {
                tryTime++;
            if (websocket == null) {
              alert("11111");
            }
            websocket.onopen = function () {
              console.log("res", res);
              try {
                // 连接设备
                var jsonObjs = {
                  type: 4,
                  data: res,
                };
                var jStrs = JSON.stringify(jsonObjs);
                websocket.send(jStrs);
              }, 1 * 1000);
            } else {
              console.error("重连失败.");
            }
          }
        };
        websocket.onclose = function () {
          alert("连接关闭");
        };
        websocket.onmessage = function (event) {
          var resultObj = JSON.parse(event.data);
          _this.cardreader = false;
        };
              } catch (err) {
                var tryTime = 0;
                // 重试10次,每次之间间隔3秒
                if (tryTime < 1) {
                  var t1 = setTimeout(function () {
                    tryTime++;
                    var jsonObjs = {
                      type: 4,
                      data: res,
                    };
                    var jStrs = JSON.stringify(jsonObjs);
                    websocket.send(jStrs);
                  }, 1 * 1000);
                } else {
                  console.error("重连失败.");
                }
              }
            };
            websocket.onclose = function () {
              alert("连接关闭");
            };
            websocket.onmessage = function (event) {
              var resultObj = JSON.parse(event.data);
              _this.cardreader = false;
            };
        //连接发生错误的回调方法
        websocket.onerror = function () {
          alert("请检查连接是否正常");
        };
          this.getList()
        }
        }else{
          this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
            //连接发生错误的回调方法
            websocket.onerror = function () {
              alert("请检查连接是否正常");
            };
            this.getList();
          }
        } else {
          this.$nextTick(() => {
            // 以服务的方式调用的 Loading 需要异步关闭
            loadingInstance1.close();
});
          });
        }
      });
    },
    base64ToBlob({ b64data = "", contentType = "", sliceSize = 512 } = {}) {
      return new Promise((resolve, reject) => {
@@ -2924,12 +3147,19 @@
      if (this.formIn.timeRegion === "11:00-12:00") {
        this.formIn.timeRegion = 3;
      }
      this.CompanyList.forEach((item) => {
        if (item.drugManufacturerId === this.formIn.companyId) {
          this.formIn.company = item.cnName;
        }
      });
      let data;
      if (pacId) {
        data = {
          id: this.formIn.id,
          isExpire: this.formIn.isExpire,
          address: this.formIn.address,
          companyId: this.formIn.companyId,
          company: this.formIn.company,
          department: this.formIn.department,
          discount: this.discount,
@@ -2956,6 +3186,7 @@
          id: this.formIn.id,
          isExpire: this.formIn.isExpire,
          address: this.formIn.address,
          companyId: this.formIn.companyId,
          company: this.formIn.company,
          department: this.formIn.department,
          discount: this.discount,
@@ -2981,17 +3212,19 @@
      tjReappoint(data).then((res) => {
        if (res.code === 200) {
          this.$modal.msgSuccess("预约成功");
          this.getList();
          this.$tab.refreshPage();
          _this.drawer = false;
        }
        _this.drawer = false;
      });
      this.getList();
      this.$tab.refreshPage();
      // this.getList();
      // this.$tab.refreshPage();
      // } else {
      //   this.$message.warning("请选择您要体检的内容");
      // }
    },
    // 最后提交按钮
    submitPrice1() {
    /*  submitPrice1() {
      let _this = this;
      if (_this.tableData1.length > 0) {
        if (this.tableData[0]) {
@@ -3045,7 +3278,7 @@
            id: this.formIn.id,
            isExpire: this.formIn.isExpire,
            address: this.formIn.address,
            company: this.formIn.company,
            companyId: this.formIn.companyId,
            department: this.formIn.department,
            discount: this.discount,
            email: this.formIn.email,
@@ -3078,7 +3311,7 @@
      } else {
        this.$message.warning("请选择您要体检的内容");
      }
    },
    }, */
    // 撤销预约·
    handleDelete(row) {
@@ -3207,8 +3440,6 @@
  overflow: hidden;
}
#printIframe::-webkit-scrollbar {
  width: 6px;
}
@@ -3220,12 +3451,14 @@
  -moz-border-radius: 2em;
  border-radius: 2em;
}
.dialog-footer2 {
  width: 960px;
  height: 36px;
  display: flex;
  justify-content: center;
}
/* 修改 滑块 */
#printIframe::-webkit-scrollbar-thumb {
  background-color: #dcdfe6;