tj
qinxianzhangyao
2023-10-26 4bdd0b1ef2aff1fd6f174b0f44a7248c0d2168f1
src/views/system/tijian/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="app-container">
    <el-row class="container">
    <el-row class="container" v-show="top">
      <el-col style="width: 1050px">
        <div style="width: 1200px">
          <el-form style="margin: 4px 8px; width: 1200px" :inline="true" ref="form" :model="form" :rules="rules"
@@ -20,7 +20,8 @@
              </el-select>
            </el-form-item>
            <el-form-item label="证件号" prop="cusIdcard">
            <el-form-item label="证件号" prop="cusIdcard" :rules="showHidden.has_idcard === 'Y' ? rules.cusIdcard : []"
              :required="showHidden.has_idcard === 'Y'">
              <el-input :disabled="isDisabled" style="width: 186px" v-model="form.cusIdcard" placeholder="请输入身份证号"
                @input="inputChange" />
              <i style="font-size: 17px; margin-left: 3px" class="el-icon-search" @click="handleQuery"></i>
@@ -34,7 +35,8 @@
                <el-option v-for="dict in dict.type.dict_ageunit" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select> </el-form-item>
            <el-form-item label="性别" prop="cusSex">
            <el-form-item label="性别" prop="cusSex" :rules="showHidden.has_sex === 'Y' ? rules.cusSex : []"
              :required="showHidden.has_sex === 'Y'">
              <el-select :disabled="isDisabled" style="width: 160px" v-model="form.cusSex" placeholder="性别">
                <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
                  :value="parseInt(dict.value)"></el-option>
@@ -45,18 +47,19 @@
                value-format="yyyy-MM-dd" placeholder="请选择出生日期">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="联系电话" prop="cusPhone">
            <el-form-item label="联系电话" prop="cusPhone" :rules="showHidden.is_phone === 'Y' ? rules.cusPhone : []"
              :required="showHidden.is_phone === 'Y'">
              <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" style="width: 186px" />
            </el-form-item>
            <el-form-item label="户口地址" prop="addr">
              <el-input v-model="form.addr" placeholder="请输入户口地址" :disabled="isDisabled" style="width: 410px" />
              <el-input v-model="form.addr" placeholder="请输入户口地址" :disabled="isDisabled" style="width: 380px" />
            </el-form-item>
            <el-form-item label="现住址" prop="cusAddr">
              <el-input v-model="form.cusAddr" placeholder="请输入现居住地址" :disabled="isDisabled" style="width: 430px" />
              <el-input v-model="form.cusAddr" placeholder="请输入现居住地址" :disabled="isDisabled" style="width: 440px" />
            </el-form-item><br />
            <el-form-item label="职业" prop="career">
              <el-select filterable :disabled="isDisabled" v-model="form.career" placeholder="请输入职业" style="width: 160px">
              <el-select filterable :disabled="isDisabled" v-model="form.career" placeholder="请输入职业" style="width: 130px">
                <el-option v-for="dict in dict.type.dict_job" :key="dict.value" :label="dict.label"
                  :value="dict.value"></el-option>
              </el-select>
@@ -75,7 +78,7 @@
              </el-select>
            </el-form-item>
            <el-form-item label="工作单位" prop="company">
              <el-input :disabled="isDisabled" v-model="form.company" placeholder="请输入工作单位" style="width: 210px" />
              <el-input :disabled="isDisabled" v-model="form.company" placeholder="请输入工作单位" style="width: 220px" />
            </el-form-item><br />
            <!-- <el-form-item label="邮政编码" prop="cusPostcode">
@@ -86,7 +89,7 @@
          </el-form-item> -->
            <el-form-item label="介绍人" prop="cusIntroduce">
              <el-input :disabled="isDisabled" v-model="form.cusIntroduce" placeholder="请输入介绍人" style="width: 160px" />
              <el-input :disabled="isDisabled" v-model="form.cusIntroduce" placeholder="请输入介绍人" style="width: 130px" />
            </el-form-item>
            <el-form-item label="邮箱" prop="cusEmail">
              <el-input v-model="form.cusEmail" placeholder="请输入邮箱" :disabled="isDisabled" style="width: 160px" />
@@ -126,17 +129,17 @@
                <el-radio label="个人" v-if="form.tjType == null"></el-radio>
              </el-radio-group>
            </el-form-item> -->
            <el-form-item style="margin-left: 205px">
            <el-form-item style="margin-left: 260px">
              <el-button :disabled="isDisabled" style="margin-left: 50px" type="primary" size="mini"
                @click="submitForm">登记</el-button>
              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" @queryTable="getList">重置</el-button>
              <el-button type="primary" @click="Package" size="mini" v-if="tcShows">选择套餐</el-button>
              <!-- v-if="tcShows" -->
              <!-- <el-button type="primary" icon="el-icon-search" @click="handleQuery" size="mini">查询</el-button> -->
            </el-form-item>
          </el-form>
        </div>
      </el-col>
      <el-col :span="4" style="1px solid black;mar-right:60px">
      <el-col :span="4" style="1px solid black;mar-right:60px" v-show="showHidden.mall_hasPhoto == 'Y'">
        <div class="content">
          <!-- <el-upload
            v-show="hide"
@@ -194,6 +197,7 @@
                style="width: 850px">
                <el-table-column type="selection" width="40px" align="center" label="选择" />
                <el-table-column label="套餐名称" align="center" prop="pacName" width="120px" />
                <el-table-column label="套餐价格" align="center" prop="price" width="120px" />
                <el-table-column label="套餐明细" align="center" prop="allProName" :show-overflow-tooltip="true" />
                <!-- :selectable="checkSelectable" -->
                <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -222,11 +226,13 @@
        </el-tab-pane>
        <el-tab-pane label="单项">
          <div class="tab3">
            <div class="tab2">
              <el-tree ref="tree" :data="data" show-checkbox node-key="proId" :props="defaultProps"
            <!-- <div class="tab2"> -->
            <v-tree-transfer :treeData="treedataList" :defaultProps="{ children: 'tjProjectList', label: 'proName' }"
              :defaultKeys="defaultKeys" @changeKeys="changeCategoryKeys" :key="datekey"></v-tree-transfer>
            <!-- <el-tree ref="tree" :data="treedataList" show-checkbox node-key="proId" :props="defaultProps"
                :default-expanded-keys="treeId" :default-checked-keys="treeList" @check-change="handleCurrentChecked">
              </el-tree>
            </div>
              </el-tree> -->
            <!-- </div> -->
            <!-- <el-button
                style="
                  width: 20px;
@@ -244,7 +250,7 @@
        </el-tab-pane>
      </el-tabs>
      <span slot="footer" class="dialog-footer">
        <el-button @click="taocan = false">取 消</el-button>
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="submit">确 定</el-button>
      </span>
    </el-dialog>
@@ -294,9 +300,9 @@
           </div> -->
          <template>
            <el-form :model="form" :inline="true" label-width="80px" style="margin-left: 7px">
            <el-form :model="form" :inline="true" label-width="75px" style="margin-left: 7px">
              <el-form-item label="体检类型">
                <el-select style="width: 160px" v-model="form.tjType" placeholder="请选择体检类型">
                <el-select style="width: 100px" v-model="form.tjType" placeholder="请选择体检类型">
                  <el-option v-for="dict in dict.type.dict_team" :key="dict.value" :label="dict.label"
                    :value="dict.value"></el-option>
                </el-select>
@@ -305,19 +311,23 @@
              <!-- <div class="tab1"> -->
              <!-- <el-form :inline="true" class="tab1"> -->
              <el-form-item label="应收金额">
                <el-input placeholder="应收金额" :value="TotalPrice1 + '.00'" disabled style="width: 160px"></el-input>
                <el-input placeholder="应收金额" v-model="TotalPrice1" disabled style="width: 126px"></el-input>
              </el-form-item>
              <el-form-item label="优惠折扣">
              <el-form-item label="优惠">
                <!-- <el-input style="width: 100px" type="number" v-model="discount" :value="discount"></el-input> -->
                <el-input-number ref="inputNumber" style="width: 130px" v-model="discount" :precision="2" :step="0.1"
                <el-input-number ref="inputNumber" style="width: 126px" v-model="discount" :precision="2" :step="0.1"
                  :max="10" :min="1" @change="numberChange" :disabled="isfalse"></el-input-number>
              </el-form-item>
              <el-form-item label="实收金额">
                <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 120px"></el-input>
                <el-input placeholder="实收金额" v-model="TotalPrice" style="width: 126px"></el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="submitPrice" :disabled="confirm" size="mini">签到登记</el-button>
                <el-button type="primary" @click="Package" size="mini">选择套餐</el-button>
                <el-button type="primary" @click="submitPrice" :disabled="confirm" v-if="showHidden.has_charge == 'N'"
                  size="mini">签到登记</el-button>
                <el-button type="primary" @click="submitCheckinfee" :disabled="confirm"
                  v-if="showHidden.has_charge == 'Y'" size="mini">登记收费</el-button>
              </el-form-item>
              <!-- </el-form> -->
              <!-- </div> -->
@@ -325,6 +335,7 @@
          </template>
          <div style="text-align: center; margin-bottom: 10px; margin-right: 800px">
            已选项目列表
          </div>
          <div style="
@@ -345,9 +356,9 @@
                      item.parentName +
                      " (应收金额:" +
                      item.ordPrice +
                      ".00元 / 实收金额:" +
                      "元 / 实收金额:" +
                      item.nowPrice +
                      ".00元)"
                      "元)"
                    }}
                  </template>
                  <el-table :data="item.list" border style="width: 100%" height="270">
@@ -437,6 +448,104 @@
      </div>
    </el-dialog>
    <el-dialog title="收费" :visible.sync="charge" width="59%" height="700px">
      <div>
        <el-table id="sig" v-loading="loading" :data="feeitems" @selection-change="handleSelect" tooltip-effect="dark"
          ref="multipleTable" border>
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="姓名" align="center" prop="tjName" width="100px" />
          <el-table-column label="性别" align="center" prop="sex" width="90px">
            <template slot-scope="scope">
              <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
            </template>
          </el-table-column>
          <el-table-column label="身份证" align="center" prop="idCard" width="150px"
            :show-overflow-tooltip="true"></el-table-column>
          <el-table-column label="手机号" align="center" prop="tjPhone" width="120px"
            :show-overflow-tooltip="true"></el-table-column>
          <el-table-column label="体检号" align="center" prop="tjNumber" width="160px" />
          <el-table-column label="登记时间" align="center" prop="tjFlowingWater.createTime"
            :show-overflow-tooltip="true"></el-table-column>
          <el-table-column label="单位名称" align="center" prop="tjComp"></el-table-column>
          <el-table-column label="体检类型" align="center" prop="tjType" width="80px">
            <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" prop="tjFlowingWater.waterId" width="200px" />
          <el-table-column label="收费员" align="center" prop="tjFlowingWater.updateBy" width="100px" />
        </el-table>
        <el-row :gutter="10" class="mb8">
          <el-col :span="20">
            <el-form :inline="true" :model="formInline" class="demo-form-inline" style="margin: 12px 6px">
              <el-form-item label="应收金额">
                <el-input style="width: 86px" :value="formInline.price + '.00'" placeholder="金额"
                  :disabled="true"></el-input>
              </el-form-item>
              <el-form-item label="优惠">
                <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="1"
                  @change="numberChange" :disabled="isfalse"></el-input-number>
              </el-form-item>
              <el-form-item label="实收金额">
                <el-input v-model="formInline.paidIn" placeholder="实付" style="width: 94px">
                </el-input>
              </el-form-item>
              <el-form-item label="付款类型" prop="payType">
                <el-select style="width: 120px" v-model="formInline.payType" placeholder="请选择付款类型">
                  <el-option v-for="dict in dict.type.dict_pay_type" :key="dict.value" :label="dict.label"
                    :value="dict.value"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item>
                <el-button style="margin-left: 15px" type="primary" size="mini" @click="SubmitEvent">收费</el-button>
              </el-form-item>
            </el-form>
          </el-col>
        </el-row>
        <el-table v-loading="loading" :data="Chargesubitem" border height="240">
          <el-table-column type="index" width="50"> </el-table-column>
          <el-table-column label="项目名称" align="center" prop="proName" />
          <el-table-column label="应收金额" align="center" prop="proOrdPrice" />
          <el-table-column label="实收金额" align="center" prop="proPrice" />
        </el-table>
      </div>
    </el-dialog>
    <div style="
              position: absolute;
              bottom: 100px;
              width: 360px;
              display: none;
            ">
      <div id="printBill" style="width: 280px;font-size: 1px;" ref="printContent">
        <div style="font-size: 1px;">
          <div style="text-align: center;">
            <h3>{{ hospName }}小票</h3>
          </div>
          <div style="margin-top: 4px;">
            <div>
              姓名:{{ formIn.name }}
            </div>
            <div>
              电话:{{ formIn.phone }}
            </div>
            <div>
              体检项目:{{ formIn.tjPro }}
            </div>
            <div>
              实收金额:{{ formInline.paidIn }}元
            </div>
            <div>
              收费时间:{{ currentDate + " " + currentTime }}
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- <el-dialog
      title="拍照"
      :visible.sync="beat"
@@ -455,7 +564,9 @@
<script>
import { dataURLtoFile, random } from "./file";
import { getInfo } from "@/api/login";
import { addCustomer } from "@/api/hosp/customer";
import { addCustomer, getwater, getfindTj, getByTjNum } from "@/api/hosp/customer";
import { getPrintSetUp } from "@/api/system/examcharge";
import {
  deptTreeSelect,
  projectGetList,
@@ -466,22 +577,26 @@
  getTransitionList,
  getByTeamNo,
  getLoadFile,
  getIsRequired
} from "@/api/system/tijian";
import { MessageBox } from "element-ui";
import VTreeTransfer from './TreeTransfer.vue'
export default {
  dicts: [
    "dict_user_national",
    "dict_user_marry",
    "sys_yes_no",
    "sys_user_sex",
    "dict_pay_type",
    "dict_team",
    "dict_job",
    "dict_user_cardtype",
    "dict_ageunit",
  ],
  name: "Tijian",
  components: {
    VTreeTransfer
  },
  data() {
    return {
      index: 0,
@@ -499,8 +614,29 @@
      isNow: 1,
      treeId: [],
      treeList: [],
      defaultKeys: [],
      adviceList: [],
      feeitems: [],
      refundPros: [],
      Chargesubitem: [],
      standard: {},
      formInline: {
        price: "0",
        payType: "0",
        paidIn: "0.00",
      },
      hospName: "",
      currentDate: "",
      currentTime: "",
      formIn: {
        tjPro:"体检费"
      },
      selectionList: [],
      OrderId: "",
      customer: {},
      // index:['0'],
      taocan: false,
      top: true,
      value: "2",
      getInfodis: "",
      srcUrl: "",
@@ -508,8 +644,10 @@
      hide: true,
      beat: false,
      dialogVisibles: false,
      charge: false,
      src: "",
      url: "",
      datekey: Date.now(),
      dialogVisible: false,
      /** 照相机弹窗模块-start */
      videoWidth: 200,
@@ -557,6 +695,8 @@
      name: "",
      isfalse: false,
      responseList: {},
      showHidden: {},
      tjNumbers: "",
      // 选中数组
      ids: [],
      // 非单个禁用
@@ -573,7 +713,7 @@
      // 显示搜索条件
      showSearch: true,
      // 树状形状
      data: [],
      treedataList: [],
      defaultProps: {
        children: "tjProjectList",
        label: "proName",
@@ -653,10 +793,54 @@
    };
  },
  created() {
    this.getCurrentDateTime()
    this.startTimer()
    this.getList1();
    this.getData();
  },
  methods: {
    getCurrentDateTime() {
      const currentDate = new Date()
      // 格式化日期:YYYY-MM-DD
      const year = currentDate.getFullYear()
      const month = String(currentDate.getMonth() + 1).padStart(2, '0')
      const day = String(currentDate.getDate()).padStart(2, '0')
      this.currentDate = `${year}-${month}-${day}`
      // 格式化时间:HH:mm:ss
      const hours = String(currentDate.getHours()).padStart(2, '0')
      const minutes = String(currentDate.getMinutes()).padStart(2, '0')
      const seconds = String(currentDate.getSeconds()).padStart(2, '0')
      this.currentTime = `${hours}:${minutes}:${seconds}`
    },
    startTimer() {
      this.timer = setInterval(() => {
        this.getCurrentDateTime()
      }, 1000) //每秒钟更新一次
    },
    beforeDestroy() {
      clearInterval(this.timer)
    },//清除定时器,以避免内存泄露。
    freezing(val) {
      if (val == 0) {
        this.form.cusName = random(2)
@@ -667,10 +851,14 @@
    getList1() {
      getInfo().then((response) => {
        this.getInfodis = response.user.discount;
        this.hospName = response.hospName;
        if (this.getInfodis === null) {
          this.isfalse = true;
        }
      });
      getIsRequired().then((response) => {
        this.showHidden = response.data
      })
    },
    inputChange() {
      const reg =
@@ -840,13 +1028,12 @@
          this.loading = false;
        });
      }
      this.getData();
    },
    getData() {
      /** 查询部门下拉树结构 */
      projectGetList().then((response) => {
        this.data = response.data.list;
        this.dXData = response.data;
        this.treedataList = response.data.list;
        this.dXData = response.data.list;
        return;
      });
    },
@@ -942,6 +1129,7 @@
            _this.tcShow = true;
            _this.tcShows = true;
            _this.isDisabled = true;
            _this.top = false;
          });
        }
      });
@@ -964,7 +1152,7 @@
            if (this.form.tjType === null) {
              this.form.tjType = "2";
            }
            if (this.form.reservationId) {
            if (this.form.reservationId != null) {
              if (this.form.groupingId) {
                _this.tcShow = true;
                _this.tcShows = false;
@@ -1176,6 +1364,8 @@
    // 取消按钮
    cancel() {
      this.Seachopen = false;
      this.taocan = false
      this.defaultKeys = []
    },
    /** 搜索操作 */
@@ -1211,7 +1401,7 @@
        this.DataList = [];
        // this.data = 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 = [];
@@ -1235,7 +1425,7 @@
          });
        });
      } else {
        this.data = JSON.parse(JSON.stringify(this.dXData));
        this.treedataList = JSON.parse(JSON.stringify(this.dXData));
        return;
      }
    },
@@ -1243,6 +1433,7 @@
    Package() {
      this.taocan = true;
      let cusSex = this.form.cusSex;
      this.datekey = Date.now()
      //全部套餐
      deptTreeSelect(cusSex).then((response) => {
        this.newpacName = response.rows;
@@ -1262,6 +1453,7 @@
        } catch (error) { }
        this.loading = false;
      });
      this.getData();
    },
    // checkSelectable(row, index) {
@@ -1324,17 +1516,16 @@
        proIds: this.proIds,
      };
      getaddtTransition(data).then((response) => {
        if (response.msg === "操作成功") {
        if (response.code === 200) {
          let cusId = this.form.cusIdcard;
          this.proIds = [];
          getTransitionList(cusId).then((response) => {
            this.tableData1 = response.data;
            // this.checkSelectable();
            console.log(this.tableData1)
            this.TotalPrice1 = 0;
            if (this.tableData1) {
              this.tableData1.forEach((item) => {
                this.TotalPrice1 += item.nowPrice;
                this.TotalPrice =
                  this.TotalPrice1 * (this.discount / 10) + ".00";
                if (item.pacName === null) {
                  item.pacName = "单项";
                }
@@ -1345,16 +1536,264 @@
                }
                this.pacName = item.pacName;
              });
              const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
              let TotalPrice = this.TotalPrice1 * (this.discount / 10);
              if (r.test(TotalPrice)) {
                this.TotalPrice =
                  TotalPrice + '.00';
              } else {
                this.TotalPrice =
                  TotalPrice
              }
              this.list1 = false;
              this.list3 = true;
            } else {
              this.list1 = true;
              this.TotalPrice = "0.00";
            }
          });
        }
      });
      this.taocan = false;
      this.defaultKeys = []
    },
    changeCategoryKeys(val) {
      this.proIds = [];
      this.proIds = val
      // if (this.DataList.length != 0) {
      //   this.DataList.forEach((item) => {
      //     this.proIds.push(item.proId);
      //   });
      // } else {
      //   this.proIds = [];
      // }
    },
    submitCheckinfee() {
      let _this = this;
      let List = _this.tableData1; //单个项目信息
      if (this.responseList.cusId) {
        var userId = this.responseList.cusId;
      } else {
        var userId = _this.form.cusId;
      }
      let tjType = _this.form.tjType;
      if (this.tableData[0]) {
        var pacId = this.tableData[0].pacId;
      }
      //tjOrderList//这个是处理完的每一项套餐信息
      List.forEach((item) => {
        if (item.list) {
          item.list.forEach((item1) => {
            this.tjOrderList.push({
              proName: item1.proName,
              proPrice: item1.nowPrice,
              proId: item1.proId,
            });
          });
        } else if (item.tjProjectList) {
          item.tjProjectList.forEach((item1) => {
            this.tjOrderList.push({
              proName: item1.proName,
              proPrice: item1.priceNow,
              proId: item1.proId,
            });
          });
        } else {
          this.tjOrderList.push({
            proName: item.proName,
            proPrice: item.ysPrice,
            proId: item.proId,
          });
        }
      });
      let copeWith = this.TotalPrice1;
      let paidIn = this.TotalPrice.toString();
      let discount = this.discount;
      this.tjFlowingWater = { copeWith, paidIn, discount };
      let data;
      if (pacId) {
        data = {
          photo: this.srcUrl,
          pacId,
          tjOrderList: this.tjOrderList,
          tjFlowingWater: this.tjFlowingWater,
          userId,
          tjType,
        };
      } else {
        data = {
          photo: this.srcUrl,
          tjOrderList: this.tjOrderList,
          tjFlowingWater: this.tjFlowingWater,
          userId,
          tjType,
        };
      }
      getOrder(data).then((res) => {
        this.$modal.msgSuccess("提交成功");
        this.tjNumbers = res.msg
        this.charge = true;
        let data = {
          tjNum: res.msg
        }
        getfindTj(data).then((response) => {
          if (response.data) {
            this.feeitems = response.data;
          }
        })
      });
    },
    // 表格单选
    handleSelect(selection, val) {
      console.log(selection, val)
      this.selectionList = this.$refs.multipleTable.selection;
      this.selectionList.forEach((item) => {
        this.formIn.name = item.tjName
        this.formIn.phone = item.tjPhone
        this.OrderId = item.tjOrderId;
        if (item.tjFlowingWater != null) {
          this.waterId = item.tjFlowingWater.waterId;
          this.tollCollectorName = item.tjFlowingWater.updateBy;
          this.tjSerialNumber = item.tjFlowingWater.tjSerialNumber;
        }
        this.customer = {
          cusIdcard: item.idCard,
          cusName: item.tjName,
          cusPhone: item.tjPhone,
          cusSex: item.sex === "男" ? "0" : "1",
        };
        if (item.tjComp != null) {
          this.standard = {
            company: item.tjComp,
            tjType: item.tjType === "团队" ? "1" : "2",
          };
        } else {
          this.standard = {
            tjType: item.tjType === "团队" ? "1" : "2",
          };
        }
      });
      if (selection.length > 1) {
        let del_row = selection.shift();
        this.$refs.multipleTable.toggleRowSelection(del_row, false);
      }
      let data = {
        type: "0",
        OrderId: this.OrderId,
      };
      getByTjNum(data).then((response) => {
        if (response.data) {
          this.Chargesubitem = response.data;
          this.formInline.price = 0;
          this.adviceList = [];
          if (this.Chargesubitem.length != 0) {
            this.Chargesubitem.forEach((item) => {
              this.adviceList.push({
                proId: item.proId,
                proName: item.proName,
              });
              if (this.formInline.price) {
                this.formInline.price += item.proOrdPrice;
                this.formInline.paidIn += item.proPrice;
              } else {
                this.formInline.price = item.proOrdPrice;
                this.formInline.paidIn = item.proPrice;
              }
            });
            const r = /^\+?[0-9][0-9]*$/; //正整数(可以以打头)
            //const r=/^\+?[1-9][0-9]*$/;//正整数
            if (r.test(this.formInline.paidIn)) {
              this.formInline.paidIn = this.formInline.paidIn + ".00";
            }
            this.discount =
              (this.formInline.paidIn / this.formInline.price) * 10;
            if (this.discount <= this.getInfodis) {
              this.discount = this.getInfodis;
            }
          } else {
            this.discount = 10;
            this.formInline.paidIn = "0.00";
          }
          this.total = response.data.total;
        } else {
          this.tableList = [];
        }
      });
    },
    // 收费
    SubmitEvent() {
      if (this.feeitems.length != 0) {
        this.refundPros.push(
          { standard: this.standard },
          { adviceList: this.adviceList }
        );
        let data = {
          paidIn: this.formInline.paidIn,
          discount: this.discount,
          copeWith: this.formInline.price,
          waterId: this.waterId,
          tollCollectorName: this.tollCollectorName,
          tjSerialNumber: this.tjSerialNumber,
          payType: this.formInline.payType,
          customer: this.customer,
          refundPros: this.refundPros,
          orderId: this.OrderId,
        };
        getwater(data).then((res) => {
          if (res.msg != "该订单已付款 无须再付") {
            this.mobanId = res.data.mobanId;
            this.waterId = res.data.waterId;
            this.$modal.msgSuccess("操作成功");
            this.charge = false
            this.isDisabled = false;
            this.top = true
            this.reset()
            getPrintSetUp().then(res => {
              if (res.msg == "0") {
                this.$nextTick(() => {
                  const style =
                    "@media print { @page{margin:0 10mm,size:4mm 6mm;}};"; //打印时去掉眉页眉尾
                  printJS({
                    printable: "printBill", // 标签元素id
                    noPrint: ".noPrint",
                    type: 'html',
                    header: "",
                    targetStyles: ["*"],
                    maxWidth: "800",
                    scanStyles: true, //打印必须加上,不然页面上的css样式无效
                    style,
                  });
                });
              } else {
                const tjnumber = this.tjNumbers;
                const viewNum = "809623418249637888";
                const params = { viewNum, tjnumber };
                this.$tab.openPage("个人发票", "/report/charge", params);
              }
            })
          } else {
            this.$message({
              type: "warning ",
              message: "查询到您已退款,请您重新预约!",
            });
          }
        });
      } else {
        this.$message({
          type: "warning ",
          message: "请先查询客户信息!",
        });
      }
    },
    // 最后提交按钮