lkk
2024-12-16 c7b33db117fd2893d7d1c93bf5d46e87d33e44d0
src/views/reservation/reservations/index.vue
@@ -1,5 +1,96 @@
<template>
  <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"
      >
        <el-form-item label="单位名称" prop="cnName">
          <el-input v-model="form1.cnName" placeholder="请输入中文名称" />
        </el-form-item>
        <el-form-item label="联系人" prop="contactPerson">
          <el-input v-model="form1.contactPerson" placeholder="请输入联系人" />
        </el-form-item>
        <el-form-item label="联系电话" prop="contactPhone">
          <el-input v-model="form1.contactPhone" placeholder="请输入联系电话" />
        </el-form-item>
        <el-form-item label="税号" prop="taxNumber">
          <el-input v-model="form1.taxNumber" placeholder="请输入税号" />
        </el-form-item>
        <el-form-item label="法人" prop="legalPerson">
          <el-input v-model="form1.legalPerson" placeholder="请输入法人" />
        </el-form-item>
        <el-form-item label="注册地址" prop="registerAddress">
          <el-input
            v-model="form1.registerAddress"
            placeholder="请输入注册地址"
          />
        </el-form-item>
        <el-form-item label="通讯地址" prop="mailingAddress">
          <el-input
            v-model="form1.mailingAddress"
            placeholder="请输入通讯地址"
          />
        </el-form-item>
        <el-form-item label="开户银行" prop="bankAccount">
          <el-input v-model="form1.bankAccount" placeholder="请输入开户银行" />
        </el-form-item>
        <el-form-item label="银行账户" prop="countNum">
          <el-input v-model="form1.countNum" placeholder="请输入银行账户" />
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="form1.email" placeholder="请输入邮箱" />
        </el-form-item>
        <el-form-item label="负责人" prop="principal">
          <el-input v-model="form1.principal" placeholder="请输入负责人" />
        </el-form-item>
        <el-form-item label="网址" prop="url">
          <el-input v-model="form1.url" placeholder="请输入网址" />
        </el-form-item>
        <el-form-item label="传真" prop="faxNumber">
          <el-input v-model="form1.faxNumber" placeholder="请输入传真" />
        </el-form-item>
        <el-form-item label="行政区划名称" prop="areaName">
          <el-input v-model="form1.areaName" placeholder="请输入行政区划名称" />
        </el-form-item>
        <el-form-item label="排序" prop="orderNum">
          <el-input v-model="form1.orderNum" placeholder="请输入排序" />
        </el-form-item>
        <el-form-item label="有效时间" prop="validTime">
          <el-date-picker
            clearable
            v-model="form1.validTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择有效时间"
          >
          </el-date-picker> </el-form-item
        ><br />
        <el-form-item label="备注" prop="remark">
          <el-input
            v-model="form1.remark"
            type="textarea"
            placeholder="请输入内容"
            :rows="2"
            label-width="400px"
            style="width: 830px"
            resize="none"
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer2">
        <el-button type="primary" @click="submitFormS">确 定</el-button>
        <el-button @click="cancel1">取 消</el-button>
      </div>
    </el-dialog>
    <el-form
      :model="queryParams"
      ref="queryForm"
@@ -38,20 +129,23 @@
        <el-select
          :remote-method="getRemoteData"
          v-model="queryParams.company"
          value-key="drugManufacturerId"
          remote
          default-first-option
          allow-create
          filterable
          style="width: 200px"
          placeholder="请选择单位名称"
          clearable
          @change="searchSelect"
          @change="idFn1"
        >
          <el-option
            v-for="dict in CompanyList"
            :key="dict.drugManufacturerId"
            :key="dict.cnName"
            :label="dict.cnName"
            :value="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
@@ -81,7 +175,7 @@
        >
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
    <el-row :gutter="10" style="margin: 10px 15px">
      <el-col :span="1.5">
        <el-button
          type="primary"
@@ -89,9 +183,19 @@
          size="mini"
          :disabled="multiple"
          @click="batch"
          v-hasPermi="['reservation:reservation:remove']"
          >撤销预约</el-button
        >
        <!--  v-hasPermi="['reservation:reservation:remove']" -->
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          size="mini"
          :disabled="single"
          @click="receipt"
          >补打小票</el-button
        >
        <!-- v-hasPermi="['reservation:reservation:remove']" -->
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
@@ -106,6 +210,7 @@
      @selection-change="handleSelectionChange"
      :default-sort="{ prop: 'reservationTime', order: 'descending' }"
      highlight-current-row
      style="margin-left: 15px"
    >
      <el-table-column
        type="selection"
@@ -132,6 +237,7 @@
        <template slot-scope="scope">
          <span v-if="scope.row.sex == '0'">男</span>
          <span v-if="scope.row.sex == '1'">女</span>
          <span v-if="scope.row.sex == '2'">未知</span>
        </template>
      </el-table-column>
      <el-table-column
@@ -166,20 +272,7 @@
        width="110px"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="邮箱"
        align="center"
        prop="email"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column
        label="地址"
        align="center"
        prop="address"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column
        label="预约时间"
        align="center"
@@ -198,7 +291,11 @@
        prop="tjType"
        width="80px"
        :show-overflow-tooltip="true"
      />
      >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" />
        </template>
      </el-table-column>
      <el-table-column
        label="婚姻"
        align="center"
@@ -247,6 +344,20 @@
        prop="company"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="邮箱"
        align="center"
        prop="email"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column
        label="地址"
        align="center"
        prop="address"
        :show-overflow-tooltip="true"
        width="160px"
      />
      <el-table-column label="操作" align="center" width="90px" fixed="right">
        <template slot-scope="scope">
          <el-button
@@ -254,17 +365,17 @@
            type="text"
            icon="el-icon-s-order"
            @click="handleUpdate1(scope.row)"
            v-hasPermi="['reservation:reservation:edit']"
            title="预约详细"
          ></el-button>
          <!--  v-hasPermi="['reservation:reservation:edit']" -->
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['reservation:reservation:edit']"
            title="修改"
          ></el-button>
          <!-- v-hasPermi="['reservation:reservation:edit']" -->
          <el-button
            size="mini"
            type="text"
@@ -414,7 +525,7 @@
              </el-form-item>
              <el-form-item label="体检类别" prop="tjCategory">
                <el-select
                  style="width: 150px"
                  style="width: 140px"
                  v-model="formIn.tjCategory"
                  placeholder="请选择体检类别"
                >
@@ -433,12 +544,27 @@
                  style="width: 160px"
                />
              </el-form-item>
              <el-form-item label="工作单位" prop="company">
                <el-input
              <el-form-item label="单位名称" prop="company">
                <el-select
                  :remote-method="getRemoteData"
                  v-model="formIn.company"
                  placeholder="请输入工作单位"
                  style="width: 410px"
                />
                  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="career">
                <el-select
@@ -594,31 +720,20 @@
              <el-tab-pane label="单项">
                <div class="tab3">
                  <div class="tab2">
                    <el-tree
                      :data="data"
                      show-checkbox
                      node-key="proId"
                      :props="defaultProps"
                      @check-change="handleCurrentChecked"
                    >
                    </el-tree>
                    <v-tree-transfer
                      :treeData="treedataList"
                      :defaultProps="{
                        children: 'tjProjectList',
                        label: 'proName',
                      }"
                      :defaultKeys="defaultKeys"
                      @changeKeys="changeCategoryKeys"
                      :key="datekey"
                    ></v-tree-transfer>
                    <!-- <el-tree :data="data" show-checkbox node-key="proId" :props="defaultProps"
                      @check-change="handleCurrentChecked">
                    </el-tree>-->
                  </div>
                  <!-- <el-button
                      style="
                        width: 20px;
                        height: 100px;
                        margin-left: 10px;
                        margin-top: 20%;
                        font-size: 10px;
                      "
                      type="primary"
                      size="mini"
                      @click="submit"
                      ><i
                        style="font-size: 18px"
                        class="el-icon-d-arrow-right"
                      ></i
                    ></el-button> -->
                </div>
              </el-tab-pane>
            </el-tabs>
@@ -653,7 +768,7 @@
                    <el-form-item label="应收金额">
                      <el-input
                        placeholder="应收金额"
                        :value="TotalPrice1 + '.00'"
                        :value="TotalPrice1"
                        disabled
                        style="width: 160px"
                      ></el-input>
@@ -677,6 +792,7 @@
                        placeholder="实收金额"
                        v-model="TotalPrice"
                        style="width: 120px"
                        disabled
                      ></el-input>
                    </el-form-item>
@@ -720,9 +836,9 @@
                            item.parentName +
                            " (应收金额:" +
                            item.ordPrice +
                            ".00元 / 实收金额:" +
                            " / 实收金额:" +
                            item.nowPrice +
                            ".00元)"
                            "元)"
                          }}
                        </template>
                        <el-table
@@ -739,12 +855,8 @@
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column
                            prop="nowPrice"
                            label="实收金额"
                          >
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -766,17 +878,24 @@
                          style="width: 100%"
                          height="250"
                        >
                           <el-table-column prop="proName" label="项目" width="180">
                    </el-table-column>
                    <el-table-column prop="proSex" label="性别" width="180">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额">
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额">
                    </el-table-column>
                     <el-table-column prop="isEat" label="空腹">
                    </el-table-column>
                          <el-table-column
                            prop="proName"
                            label="项目"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="proSex"
                            label="性别"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column prop="proCheckMethod" label="空腹">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -786,17 +905,24 @@
                    <div>
                      <el-collapse-item title="请选择项目">
                        <el-table :data="list" border style="width: 100%">
                          <el-table-column prop="proName" label="项目" width="180">
                    </el-table-column>
                    <el-table-column prop="proSex" label="性别" width="180">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额">
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额">
                    </el-table-column>
                     <el-table-column prop="isEat" label="空腹">
                    </el-table-column>
                          <el-table-column
                            prop="proName"
                            label="项目"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="proSex"
                            label="性别"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column prop="proCheckMethod" label="空腹">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -823,6 +949,43 @@
        </div>
      </template>
    </el-drawer>
    <div
      style="
        position: absolute;
        bottom: 100px;
        left: 500px;
        width: 700px;
        display: none;
      "
    >
      <div id="printBill">
        <div style="font-size: 13px; color: #000000">
          <div style="width: 48%; margin-top: 10px">姓名:{{ fmobj.name }}</div>
          <div style="width: 48%; margin-top: 10px">
            性别:{{ fmobj.sex === 0 ? "男" : "女" }}
          </div>
          <div style="width: 48%; margin-top: 10px">电话:{{ fmobj.phoe }}</div>
          <div style="width: 48%; margin-top: 10px">
            日期:{{ fmobj.reservationTime }}
          </div>
          <div style="width: 58%; margin-top: 10px">套餐:{{ pacName }}</div>
          <div style="width: 100%; margin-top: 10px">温馨提示:</div>
          <div style="width: 100%">1、采血,腹部彩超检查后方可用餐。</div>
          <div style="width: 100%">
            2、近期若有生育计划及未成年人,不宜进行胸片、双能骨密度等放射检查。
          </div>
          <div style="width: 100%">
            3、怀孕或可能已受孕的女士,还应避免妇科、放射科及阴式超声检查。
          </div>
          <div style="width: 100%">4、经期女性不宜进行妇科及尿常规检查。</div>
          <div style="width: 100%">
            5、若您在等待检查过程中有疑问,请及时联系导检护士。
          </div>
          <div style="width: 100%">6、体检结束后请将导检单交还至前台。</div>
        </div>
      </div>
    </div>
    <!-- 修改预约登记信息对话框 -->
    <el-drawer title="预约信息维护" :visible.sync="drawer" size="55%">
@@ -969,12 +1132,27 @@
                  style="width: 160px"
                />
              </el-form-item>
              <el-form-item label="工作单位" prop="company">
                <el-input
              <el-form-item label="单位名称" prop="company">
                <el-select
                  :remote-method="getRemoteData"
                  v-model="formIn.company"
                  placeholder="请输入工作单位"
                  style="width: 410px"
                />
                  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="career">
                <el-select
@@ -1024,9 +1202,7 @@
                  style="width: 190px"
                />
              </el-form-item>
              <el-button type="primary" @click="taocan = true" size="mini"
                >选择套餐</el-button
              >
              <!-- <el-button type="primary" @click="Package" size="mini">选择套餐</el-button> -->
            </el-form>
          </div>
@@ -1095,6 +1271,12 @@
                        label="套餐名称"
                        align="center"
                        prop="pacName"
                        width="120px"
                      />
                      <el-table-column
                        label="套餐价格"
                        align="center"
                        prop="price"
                        width="120px"
                      />
                      <el-table-column
@@ -1185,7 +1367,7 @@
                    <el-form-item label="应收金额">
                      <el-input
                        placeholder="应收金额"
                        :value="TotalPrice1 + '.00'"
                        :value="TotalPrice1"
                        disabled
                        style="width: 160px"
                      ></el-input>
@@ -1218,7 +1400,7 @@
                        @click="submitPrice"
                        :disabled="confirm"
                        size="mini"
                        >签到登记</el-button
                        >预约修改</el-button
                      >
                    </el-form-item>
                    <!-- </el-form> -->
@@ -1262,17 +1444,24 @@
                          style="width: 100%"
                          height="270"
                        >
                           <el-table-column prop="proName" label="项目" width="180">
                    </el-table-column>
                    <el-table-column prop="proSex" label="性别" width="180">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额">
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额">
                    </el-table-column>
                     <el-table-column prop="isEat" label="空腹">
                    </el-table-column>
                          <el-table-column
                            prop="proName"
                            label="项目"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="proSex"
                            label="性别"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column prop="proCheckMethod" label="空腹">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -1294,17 +1483,24 @@
                          style="width: 100%"
                          height="250"
                        >
                           <el-table-column prop="proName" label="项目" width="180">
                    </el-table-column>
                    <el-table-column prop="proSex" label="性别" width="180">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额">
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额">
                    </el-table-column>
                     <el-table-column prop="isEat" label="空腹">
                    </el-table-column>
                          <el-table-column
                            prop="proName"
                            label="项目"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="proSex"
                            label="性别"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column prop="proCheckMethod" label="空腹">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -1314,17 +1510,24 @@
                    <div>
                      <el-collapse-item title="请选择项目">
                        <el-table :data="list" border style="width: 100%">
                           <el-table-column prop="proName" label="项目" width="180">
                    </el-table-column>
                    <el-table-column prop="proSex" label="性别" width="180">
                    </el-table-column>
                    <el-table-column prop="ordPrice" label="应收金额">
                    </el-table-column>
                    <el-table-column prop="nowPrice" label="实收金额">
                    </el-table-column>
                     <el-table-column prop="isEat" label="空腹">
                    </el-table-column>
                          <el-table-column
                            prop="proName"
                            label="项目"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column
                            prop="proSex"
                            label="性别"
                            width="180"
                          >
                          </el-table-column>
                          <el-table-column prop="ordPrice" label="应收金额">
                          </el-table-column>
                          <el-table-column prop="nowPrice" label="实收金额">
                          </el-table-column>
                          <el-table-column prop="proCheckMethod" label="空腹">
                          </el-table-column>
                        </el-table>
                      </el-collapse-item>
                    </div>
@@ -1355,27 +1558,31 @@
</template>
<script>
import { addComp } from "@/api/system/comp";
import {
  listReservation,
  gettjCancel,
  tjReappoint,
  tjCancelTj,
  getReservation,
} from "@/api/reservation/reservation";
import printJS from "print-js";
import {
  deptTreeSelect,
  projectGetList,
  getOrder,
  getCusIdcard,
  getPackageListName,
  getaddtTransition,
  getTransitionList,
  getGuide,
  getaddTj,
  getconfigKey,
} from "@/api/system/tijian";
import { getCompany, queryCompany } from "@/api/team/tuanti";
import user from "@/store/modules/user";
import VTreeTransfer from "../../system/tijian/TreeTransfer.vue";
export default {
  components: {
    VTreeTransfer,
  },
  name: "Reservation",
  dicts: [
    "dict_user_national",
@@ -1391,8 +1598,19 @@
    "dict_ageunit",
  ],
  data() {
    let checkPhoneNum = (rule, value, callback) => {
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback("");
      } else if (value != undefined && value != "") {
        return callback();
      } else if (!patter.test(value)) {
        return callback("");
      }
    };
    return {
      isfalse:false,
      isfalse: false,
      tijiao1: true,
      index: 0,
      proIds: "",
@@ -1404,6 +1622,7 @@
        },
      },
      taocan: false,
      defaultKeys: [],
      value1: "",
      pacName: "",
      hides: false,
@@ -1423,6 +1642,8 @@
      thisCancas: null,
      thisContext: null,
      thisVideo: null,
      datekey: Date.now(),
      treedataList: [],
      list: [],
      activeName: "1",
      // 遮罩层
@@ -1466,7 +1687,7 @@
      multiple: true,
      nodeobj: {},
      // 是否显示弹出层
      Seachopen: false,
      pacId: "",
      // 结果
      result: "",
@@ -1512,26 +1733,45 @@
        cusIsvip: null,
      },
      formIn: {},
      fmobj: {},
      // 表单校验
      form1: {},
      open1: false,
      rules1: {
        cnName: [{ required: true, trigger: "blur" }],
        contactPerson: [{ required: true, trigger: "blur" }],
        contactPhone: [
          {
            required: true,
            trigger: "blur",
          },
          {
            pattern: /^1[3-9]\d{9}$/,
            trigger: "blur",
          },
        ],
      },
      rules: {
        cusName: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
        cusName: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        cusSex: [
          { required: true, message: "性别不能为空", trigger: "change" },
          { required: true, validator: checkPhoneNum, trigger: "change" },
        ],
        cusBrithday: [
          { required: true, message: "出生日期不能为空", trigger: "blur" },
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        // cusAddr: [
        //   { required: true, message: "现居住地址不能为空", trigger: "blur" },
        // ],
        cusPhone: [
          { required: true, message: "联系电话不能为空", trigger: "blur" },
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        reservationTime: [
          { required: true, message: "预约日期不能为空", trigger: "change" },
          { required: true, validator: checkPhoneNum, trigger: "change" },
        ],
        timeRegion: [
          { required: true, message: "时间不能为空", trigger: "blur" },
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
      },
      options: [
@@ -1585,21 +1825,21 @@
        name: [
          {
            required: true,
            message: "姓名不能为空",
            validator: checkPhoneNum,
            trigger: "blur",
          },
        ],
        idCard: [
          {
            required: true,
            message: "身份证号不能为空",
            validator: checkPhoneNum,
            trigger: "blur",
          },
        ],
        phoe: [
          {
            required: true,
            message: "联系电话不能为空",
            validator: checkPhoneNum,
            trigger: "blur",
          },
        ],
@@ -1617,6 +1857,58 @@
    this.getList();
  },
  methods: {
    getCompanyList() {
      this.loading = true;
      getconfigKey("team_reservation_default_day").then((res) => {
        this.queryParams.yxts = res.msg;
      });
      getCompany(this.queryParam).then((response) => {
        this.CompanyList = response.data;
        this.total = response.total;
        this.loading = false;
      });
    },
    cancel1() {
      this.open1 = false;
      this.reset1();
    },
    submitFormS() {
      this.$refs["form1"].validate((valid) => {
        if (valid) {
          addComp(this.form1).then((response) => {
            this.$modal.msgSuccess("新增成功");
            this.open1 = false;
            this.getCompanyList();
          });
        }
      });
    },
    reset1() {
      this.form1 = {
        company: "",
        payType: "",
        name: "",
        phoe: "",
        signingPic: "",
        discount: "",
      };
    },
    handleAdd1() {
      this.reset1();
      this.open1 = true;
      this.title = "添加体检单位信息维护";
    },
    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;
          }
        });
      }
    },
    /** 查询体检预约列表 */
    getList() {
      this.loading = true;
@@ -1625,30 +1917,6 @@
        //  response.rows.forEach((item, index) =>
        // {item.newID =(this.queryParams.pageNum - 1) * this.queryParams.pageSize +index +1;
        //   });
        this.reservationList.forEach((item) => {
          if (item.tjType === "2") {
            item.tjType = "个人";
          } else {
            item.tjType = "团队";
          }
          if (item.tjCategory === "01") {
            item.tjCategory = "健康体检";
          } else if (item.tjCategory === "02") {
            item.tjCategory = "职业病体检";
          } else if (item.tjCategory === "03") {
            item.tjCategory = "公卫体检";
          } else if (item.tjCategory === "04") {
            item.tjCategory = "入职体检";
          } else if (item.tjCategory === "05") {
            item.tjCategory = "公务员体检";
          } else if (item.tjCategory === "06") {
            item.tjCategory = "医保体检";
          } else if (item.tjCategory === "07") {
            item.tjCategory = "婚检";
          } else if (item.tjCategory === "09") {
            item.tjCategory = "出入境体检";
          }
        });
        this.total = response.total;
        this.loading = false;
      });
@@ -1723,6 +1991,10 @@
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      selection.forEach((item) => {
        this.fmobj = item;
      });
      console.log(this.fmobj);
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
@@ -1737,8 +2009,10 @@
    /** 修改按钮操作 */
    handleUpdate(row) {
      console.log(row);
      this.title = "修改体检预约";
      this.formIn = row;
      this.form.tjType = this.formIn.tjType;
      if (this.formIn.timeRegion === 0) {
        this.formIn.timeRegion = "8:00-9:00";
      }
@@ -1753,66 +2027,75 @@
      }
      if (this.formIn.isExpire === 2) {
        this.drawer = true;
        this.discount = this.formIn.discount;
        if (this.formIn.discount != null) {
          this.discount = this.formIn.discount;
        }
        //全部套餐
        if (this.formIn.sex != null) {
          let cusSex = this.formIn.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.$refs.tb.toggleRowSelection(item3, true);
                    throw Error();
                  }
                });
              });
            });
            // this.newpacName.forEach((item3) => {
            //   this.tableData1.forEach((item4) => {
            //     item4.list.forEach((item6) => {
            //       if (item6.pacName === item3.pacName) {
            //         this.$refs.tb.toggleRowSelection(item3, true);
            //         throw Error();
            //       }
            //     });
            //   });
            // });
            this.loading = false;
          });
        } else {
          deptTreeSelect().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();
                  }
                });
              });
            });
            // 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.loading = false;
          });
        }
        let cusId = this.formIn.idCard;
        let id = this.formIn.id;
        this.list1 = true;
        (this.tableData1 = []),
          (this.newpacName = []),
          getTransitionList(cusId).then((response) => {
          getReservation(id).then((response) => {
            if (response.data) {
              this.tableData1 = 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 = "单项";
              let cusId = response.data.idCard;
              getTransitionList(cusId).then((response) => {
                if (response.data) {
                  this.tableData1 = response.data;
                  if (this.tableData1.length != 0) {
                    this.TotalPrice1 = 0;
                    this.tableData1.forEach((item) => {
                      this.TotalPrice1 += item.nowPrice;
                      console.log(this.discount);
                      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;
                  }
                });
                this.list1 = false;
                this.list3 = true;
              } else {
                this.list1 = true;
              }
                }
              });
            } else {
              this.tableData1 = [];
              this.list3 = false;
@@ -1820,15 +2103,19 @@
            }
          });
        /** 查询部门下拉树结构 */
        projectGetList().then((response) => {
          this.data = response.data;
          this.dXData = response.data;
          return;
        });
        // /** 查询部门下拉树结构 */
        // projectGetList().then((response) => {
        //   this.treedataList = response.data.list;
        //   this.dXData = response.data.list;
        //   return;
        // });
      } else {
        this.$message.warning("已过期请重新预约");
      }
    },
    changeCategoryKeys(val) {
      this.proIds = [];
      this.proIds = val;
    },
    /** 修改详细按钮操作 */
    handleUpdate1(row) {
@@ -1846,91 +2133,103 @@
      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.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;
          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();
                  }
                });
      }
      //全部套餐
      if (this.formIn.sex != null) {
        let cusSex = this.formIn.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();
                }
              });
            });
            this.loading = false;
          });
        } else {
          deptTreeSelect().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();
                  }
                });
          this.loading = false;
        });
      } else {
        deptTreeSelect().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();
                }
              });
            });
            this.loading = false;
          });
        }
        let cusId = this.formIn.idCard;
        this.list1 = true;
        (this.tableData1 = []),
          (this.newpacName = []),
          getTransitionList(cusId).then((response) => {
            if (response.data) {
              this.tableData1 = 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;
          this.loading = false;
        });
      }
      let id = this.formIn.id;
      this.list1 = true;
      (this.tableData1 = []),
        (this.newpacName = []),
        getReservation(id).then((response) => {
          if (response.data) {
            let cusId = response.data.idCard;
            getTransitionList(cusId).then((response) => {
              if (response.data) {
                this.tableData1 = 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;
                }
              } else {
                this.tableData1 = [];
                this.list3 = false;
                this.list1 = true;
              }
            } else {
              this.tableData1 = [];
              this.list3 = false;
              this.list1 = true;
            }
          });
        /** 查询部门下拉树结构 */
        projectGetList().then((response) => {
          this.data = response.data;
          this.dXData = response.data;
          return;
            });
          }
        });
      /** 查询部门下拉树结构 */
      projectGetList().then((response) => {
        this.treedataList = response.data.list;
        this.dXData = response.data.list;
        return;
      });
    },
    // 折扣
    numberChange(currentValue, oldValue) {
      this.discount = currentValue;
      this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2);
    },
    Package() {
      this.taocan = true;
      this.datekey = Date.now();
    },
    /** 搜索操作 */
@@ -1961,9 +2260,9 @@
      this.multiple = !selection.length;
      if (selection[0]) {
        this.DataList = [];
        this.data = JSON.parse(JSON.stringify(this.dXData));
        this.treedataList = JSON.parse(JSON.stringify(this.dXData));
        selection[0].tjProjectList.forEach((selectionitem) => {
          this.data.forEach((item) => {
          this.treedataList.forEach((item) => {
            if (selectionitem.proName == item.proName) {
              item.disabled = true;
              item.tjProjectList = [];
@@ -1987,7 +2286,7 @@
          });
        });
      } else {
        this.data = JSON.parse(JSON.stringify(this.dXData));
        this.treedataList = JSON.parse(JSON.stringify(this.dXData));
        return;
      }
    },
@@ -2007,6 +2306,20 @@
      } else {
        this.proIds = [];
      }
    },
    receipt() {
      setTimeout(function () {
        const style = "@media print { @page{margin:0 10mm,size:4mm 6mm;}};"; //打印时去掉眉页眉尾
        printJS({
          printable: "printBill", // 标签元素id
          type: "html",
          header: "",
          targetStyles: ["*"],
          scanStyles: false, //打印必须加上,不然页面上的css样式无效
          style,
        });
      }, 100);
    },
    // 项目提交
@@ -2070,91 +2383,91 @@
    // 最后提交按钮
    submitPrice() {
      let _this = this;
      if (_this.tableData1.length > 0) {
        if (this.tableData[0]) {
          var pacId = this.tableData[0].pacId;
        }
        // let copeWith = this.TotalPrice1;
        // let paidIn = this.TotalPrice;
        // let discount = this.discount;
        // this.tjFlowingWater = { copeWith, paidIn, discount };
        if (this.formIn.timeRegion === "8:00-9:00") {
          this.formIn.timeRegion = 0;
        }
        if (this.formIn.timeRegion === "9:00-10:00") {
          this.formIn.timeRegion = 1;
        }
        if (this.formIn.timeRegion === "10:00-11:00") {
          this.formIn.timeRegion = 2;
        }
        if (this.formIn.timeRegion === "11:00-12:00") {
          this.formIn.timeRegion = 3;
        }
        let data;
        if (pacId) {
          data = {
            id: this.formIn.id,
            isExpire: this.formIn.isExpire,
            address: this.formIn.address,
            company: this.formIn.company,
            department: this.formIn.department,
            discount: this.discount,
            email: this.formIn.email,
            idCard: this.formIn.idCard,
            marriage: this.formIn.marriage,
            name: this.formIn.name,
            nation: this.formIn.nation,
            pacId,
            phoe: this.formIn.cusPhone,
            reservationTime: this.formIn.reservationTime,
            sex: this.formIn.sex,
            timeRegion: this.formIn.timeRegion,
            tjCategory: this.formIn.tjCategory,
            // tjFlowingWater: this.tjFlowingWater,
            tjType: this.formIn.tjType,
            idType: this.formIn.idType,
            age: this.formIn.age,
            ageUnit: this.formIn.ageUnit,
            career: this.formIn.career,
          };
        } else {
          data = {
            id: this.formIn.id,
            isExpire: this.formIn.isExpire,
            address: this.formIn.address,
            company: this.formIn.company,
            department: this.formIn.department,
            discount: this.discount,
            email: this.formIn.email,
            idCard: this.formIn.idCard,
            marriage: this.formIn.marriage,
            name: this.formIn.name,
            nation: this.formIn.nation,
            pacId,
            phoe: this.formIn.phoe,
            reservationTime: this.formIn.reservationTime,
            sex: this.formIn.sex,
            timeRegion: this.formIn.timeRegion,
            tjCategory: this.formIn.tjCategory,
            // tjFlowingWater: this.tjFlowingWater,
            tjType: this.formIn.tjType,
            idType: this.formIn.idType,
            age: this.formIn.age,
            ageUnit: this.formIn.ageUnit,
            career: this.formIn.career,
          };
        }
        tjReappoint(data).then((res) => {
          if (res.code === 200) {
            this.$modal.msgSuccess("登记成功");
          }
          _this.drawer = false;
        });
        this.getList();
        this.$tab.refreshPage();
      } else {
        this.$message.warning("请选择您要体检的内容");
      // if (_this.tableData1.length > 0) {
      if (this.tableData[0]) {
        var pacId = this.tableData[0].pacId;
      }
      // let copeWith = this.TotalPrice1;
      // let paidIn = this.TotalPrice;
      // let discount = this.discount;
      // this.tjFlowingWater = { copeWith, paidIn, discount };
      if (this.formIn.timeRegion === "8:00-9:00") {
        this.formIn.timeRegion = 0;
      }
      if (this.formIn.timeRegion === "9:00-10:00") {
        this.formIn.timeRegion = 1;
      }
      if (this.formIn.timeRegion === "10:00-11:00") {
        this.formIn.timeRegion = 2;
      }
      if (this.formIn.timeRegion === "11:00-12:00") {
        this.formIn.timeRegion = 3;
      }
      let data;
      if (pacId) {
        data = {
          id: this.formIn.id,
          isExpire: this.formIn.isExpire,
          address: this.formIn.address,
          company: this.formIn.company,
          department: this.formIn.department,
          discount: this.discount,
          email: this.formIn.email,
          idCard: this.formIn.idCard,
          marriage: this.formIn.marriage,
          name: this.formIn.name,
          nation: this.formIn.nation,
          pacId,
          phoe: this.formIn.cusPhone,
          reservationTime: this.formIn.reservationTime,
          sex: this.formIn.sex,
          timeRegion: this.formIn.timeRegion,
          tjCategory: this.formIn.tjCategory,
          // tjFlowingWater: this.tjFlowingWater,
          tjType: this.formIn.tjType,
          idType: this.formIn.idType,
          age: this.formIn.age,
          ageUnit: this.formIn.ageUnit,
          career: this.formIn.career,
        };
      } else {
        data = {
          id: this.formIn.id,
          isExpire: this.formIn.isExpire,
          address: this.formIn.address,
          company: this.formIn.company,
          department: this.formIn.department,
          discount: this.discount,
          email: this.formIn.email,
          idCard: this.formIn.idCard,
          marriage: this.formIn.marriage,
          name: this.formIn.name,
          nation: this.formIn.nation,
          pacId,
          phoe: this.formIn.phoe,
          reservationTime: this.formIn.reservationTime,
          sex: this.formIn.sex,
          timeRegion: this.formIn.timeRegion,
          tjCategory: this.formIn.tjCategory,
          // tjFlowingWater: this.tjFlowingWater,
          tjType: this.formIn.tjType,
          idType: this.formIn.idType,
          age: this.formIn.age,
          ageUnit: this.formIn.ageUnit,
          career: this.formIn.career,
        };
      }
      tjReappoint(data).then((res) => {
        if (res.code === 200) {
          this.$modal.msgSuccess("预约成功");
        }
        _this.drawer = false;
      });
      this.getList();
      this.$tab.refreshPage();
      // } else {
      //   this.$message.warning("请选择您要体检的内容");
      // }
    },
    // 最后提交按钮
    submitPrice1() {
@@ -2384,7 +2697,12 @@
  -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;
@@ -2398,6 +2716,7 @@
  width: 300px;
  height: 300px;
}
.tj1 {
  width: 230px;
  display: flex;