From b54b3c4662338ca0897b8dbc9172f7f00306a09d Mon Sep 17 00:00:00 2001
From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com>
Date: 星期二, 25 六月 2024 17:42:04 +0800
Subject: [PATCH] qxtj

---
 src/views/hosp/customer/index.vue |  877 ++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 704 insertions(+), 173 deletions(-)

diff --git a/src/views/hosp/customer/index.vue b/src/views/hosp/customer/index.vue
index 6f45569..f7ae839 100644
--- a/src/views/hosp/customer/index.vue
+++ b/src/views/hosp/customer/index.vue
@@ -1,9 +1,21 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="濮撳悕" prop="cusName">
-        <el-input v-model="queryParams.cusName" placeholder="璇疯緭鍏ュ鍚�" clearable style="width:120px"
-          @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.cusName"
+          placeholder="璇疯緭鍏ュ鍚�"
+          clearable
+          style="width: 120px"
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <!-- <el-form-item label="鎬у埆" prop="cusSex">
         <el-select v-model="queryParams.cusSex" placeholder="璇烽�夋嫨鎬у埆" clearable style="width:120px">
@@ -17,8 +29,13 @@
         <el-input v-model="queryParams.cusAddr" placeholder="璇疯緭鍏ョ幇灞呬綇鍦板潃" clearable @keyup.enter.native="handleQuery"/>
       </el-form-item> -->
       <el-form-item label="鑱旂郴鐢佃瘽" prop="cusPhone">
-        <el-input v-model="queryParams.cusPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" style="width:140px" clearable
-          @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.cusPhone"
+          placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+          style="width: 140px"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <!-- <el-form-item label="閭斂缂栫爜" prop="cusPostcode">
         <el-input v-model="queryParams.cusPostcode" placeholder="璇疯緭鍏ラ偖鏀跨紪鐮�" clearable @keyup.enter.native="handleQuery"/>
@@ -56,11 +73,21 @@
         </el-select>
       </el-form-item> -->
       <el-form-item label="韬唤璇佸彿" prop="cusIdcard">
-        <el-input v-model="queryParams.cusIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.cusIdcard"
+          placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="浠嬬粛浜�" prop="cusIntroduce">
-        <el-input v-model="queryParams.cusIntroduce" placeholder="璇疯緭鍏ヤ粙缁嶄汉" clearable style="width:140px"
-          @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.cusIntroduce"
+          placeholder="璇疯緭鍏ヤ粙缁嶄汉"
+          clearable
+          style="width: 140px"
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <!-- <el-form-item label="浣撴娆℃暟" prop="cusNumber">
         <el-input
@@ -71,32 +98,76 @@
         />
       </el-form-item> -->
       <el-form-item label="浣撴娆℃暟" prop="cusNumber">
-        <el-input v-model="queryParams.cusNumber" placeholder="杈撳叆鏁存暟" clearable style="width:100px"
-          @keyup.enter.native="handleQuery" />
+        <el-input
+          v-model="queryParams.cusNumber"
+          placeholder="杈撳叆鏁存暟"
+          clearable
+          style="width: 100px"
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="鏄惁VIP" prop="cusIsvip">
-        <el-select v-model="queryParams.cusIsvip" placeholder="閫夋嫨VIP" clearable style="width:100px">
-          <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
+        <el-select
+          v-model="queryParams.cusIsvip"
+          placeholder="閫夋嫨VIP"
+          clearable
+          style="width: 100px"
+        >
+          <el-option
+            v-for="dict in dict.type.sys_yes_no"
+            :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"  style="margin: 0 15px;">鎼滅储</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          style="margin: 0 15px"
+          >鎼滅储</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >閲嶇疆</el-button
+        >
       </el-form-item>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
-          v-hasPermi="['hosp:customer:add']">鏂板</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['hosp:customer:add']"
+          >鏂板</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-          v-hasPermi="['hosp:customer:edit']">淇敼</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['hosp:customer:edit']"
+          >淇敼</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-          v-hasPermi="['hosp:customer:remove']">鍒犻櫎</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['hosp:customer:remove']"
+          >鍒犻櫎</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -109,101 +180,303 @@
         >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport"
-          v-hasPermi="['hosp:customer:export']">瀵煎嚭</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['hosp:customer:export']"
+          >瀵煎嚭</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table border v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="40px" align="center" fixed="left" />
-      <el-table-column label="搴忓彿" align="center" prop="newID" fixed="left" :show-overflow-tooltip="true" width="50px" />
-      <el-table-column label="濮撳悕" align="center" prop="cusName" width="90px" fixed="left"
-        :show-overflow-tooltip="true" />
-      <el-table-column label="鎬у埆" align="center" prop="cusSex" :show-overflow-tooltip="true" width="60px">
+    <el-table
+      border
+      v-loading="loading"
+      :data="customerList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        type="selection"
+        width="40px"
+        align="center"
+        fixed="left"
+      />
+      <el-table-column
+        label="搴忓彿"
+        align="center"
+        prop="newID"
+        fixed="left"
+        :show-overflow-tooltip="true"
+        width="50px"
+      />
+      <el-table-column
+        label="濮撳悕"
+        align="center"
+        prop="cusName"
+        width="90px"
+        fixed="left"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="鎬у埆"
+        align="center"
+        prop="cusSex"
+        :show-overflow-tooltip="true"
+        width="60px"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.cusSex" />
+          <dict-tag
+            :options="dict.type.sys_user_sex"
+            :value="scope.row.cusSex"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="鍑虹敓鏃ユ湡" align="center" prop="cusBrithday" width="100px" :show-overflow-tooltip="true">
+      <el-table-column
+        label="鍑虹敓鏃ユ湡"
+        align="center"
+        prop="cusBrithday"
+        width="100px"
+        :show-overflow-tooltip="true"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.cusBrithday, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="韬唤璇佸彿" align="center" prop="cusIdcard" width="170px" :show-overflow-tooltip="true" />
-      <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="cusPhone" width="110px" :show-overflow-tooltip="true" />
-      <el-table-column label="鐜颁綇鍧�" align="center" prop="cusAddr" width="180px" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="韬唤璇佸彿"
+        align="center"
+        prop="cusIdcard"
+        width="170px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="鑱旂郴鐢佃瘽"
+        align="center"
+        prop="cusPhone"
+        width="110px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="鐜颁綇鍧�"
+        align="center"
+        prop="cusAddr"
+        width="180px"
+        :show-overflow-tooltip="true"
+      />
 
-      <el-table-column label="閭斂缂栫爜" align="center" prop="cusPostcode" width="80px" :show-overflow-tooltip="true" />
-      <el-table-column label="閭" align="center" prop="cusEmail" width="170px" :show-overflow-tooltip="true" />
-      <el-table-column label="姘戞棌" align="center" prop="cusNational" width="80px" :show-overflow-tooltip="true">
+      <el-table-column
+        label="閭斂缂栫爜"
+        align="center"
+        prop="cusPostcode"
+        width="80px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="閭"
+        align="center"
+        prop="cusEmail"
+        width="170px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="姘戞棌"
+        align="center"
+        prop="cusNational"
+        width="80px"
+        :show-overflow-tooltip="true"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.dict_user_national" :value="scope.row.cusNational" />
+          <dict-tag
+            :options="dict.type.dict_user_national"
+            :value="scope.row.cusNational"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="濠氬Щ鐘跺喌" align="center" prop="cusMarryStatus" :show-overflow-tooltip="true" width="80px">
+      <el-table-column
+        label="濠氬Щ鐘跺喌"
+        align="center"
+        prop="cusMarryStatus"
+        :show-overflow-tooltip="true"
+        width="80px"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.dict_user_marry" :value="scope.row.cusMarryStatus" />
+          <dict-tag
+            :options="dict.type.dict_user_marry"
+            :value="scope.row.cusMarryStatus"
+          />
         </template>
       </el-table-column>
 
-      <el-table-column label="浠嬬粛浜�" align="center" prop="cusIntroduce" width="90px" :show-overflow-tooltip="true" />
-      <el-table-column label="娆℃暟" align="center" prop="cusNumber" width="55px" :show-overflow-tooltip="true" />
-      <el-table-column label="VIP" align="center" prop="cusIsvip" width="55px" :show-overflow-tooltip="true">
+      <el-table-column
+        label="浠嬬粛浜�"
+        align="center"
+        prop="cusIntroduce"
+        width="90px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="娆℃暟"
+        align="center"
+        prop="cusNumber"
+        width="55px"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="VIP"
+        align="center"
+        prop="cusIsvip"
+        width="55px"
+        :show-overflow-tooltip="true"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.cusIsvip" />
+          <dict-tag
+            :options="dict.type.sys_yes_no"
+            :value="scope.row.cusIsvip"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="榛戝悕鍗�" align="center" prop="isBlack" width="76px" >
+      <el-table-column
+        label="榛戝悕鍗�"
+        align="center"
+        prop="isBlack"
+        width="76px"
+      >
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isBlack" />
+          <dict-tag
+            :options="dict.type.sys_yes_no"
+            :value="scope.row.isBlack"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="绱㈠紩鍗″彿" align="center" prop="indexCard" :show-overflow-tooltip="true" />
-      <el-table-column fixed="right" label="鎿嶄綔" align="center" width="90px" class-name="small-padding fixed-width">
+      <el-table-column
+        label="绱㈠紩鍗″彿"
+        align="center"
+        prop="indexCard"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        fixed="right"
+        label="鎿嶄綔"
+        align="center"
+        width="90px"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-            v-hasPermi="['hosp:customer:edit']" title="淇敼"></el-button>
-          <el-button size="mini" type="text" icon="el-icon-share" @click="handleDetails(scope.row)"
-            v-hasPermi="['hosp:customer:edit']" title="璇︽儏"></el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['hosp:customer:remove']" title="鍒犻櫎"></el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['hosp:customer:edit']"
+            title="淇敼"
+          ></el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-share"
+            @click="handleDetails(scope.row)"
+            v-hasPermi="['hosp:customer:edit']"
+            title="璇︽儏"
+          ></el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['hosp:customer:remove']"
+            title="鍒犻櫎"
+          ></el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <div class="pag">
       <div class="pag1">
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize" @pagination="getList" />
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
       </div>
     </div>
 
     <!-- 娣诲姞鎴栦慨鏀逛俊鎭璇濇 -->
-    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="1000px"
+      append-to-body
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="100px"
+        :inline="true"
+      >
         <el-form-item label="濮撳悕" prop="cusName">
-          <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" style="width: 200px" />
+          <el-input
+            v-model="form.cusName"
+            placeholder="璇疯緭鍏ュ鍚�"
+            style="width: 200px"
+          />
         </el-form-item>
         <el-form-item label="鎬у埆" prop="cusSex">
-          <el-select v-model="form.cusSex" placeholder="璇烽�夋嫨鎬у埆" style="width: 200px">
-            <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
-              :value="parseInt(dict.value)"></el-option>
+          <el-select
+            v-model="form.cusSex"
+            placeholder="璇烽�夋嫨鎬у埆"
+            style="width: 200px"
+          >
+            <el-option
+              v-for="dict in dict.type.sys_user_sex"
+              :key="dict.value"
+              :label="dict.label"
+              :value="parseInt(dict.value)"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="韬唤璇佸彿" prop="cusIdcard">
-          <el-input v-model="form.cusIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" style="width: 200px" />
+          <el-input
+            v-model="form.cusIdcard"
+            @input="inputChange"
+            placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�"
+            style="width: 200px"
+          />
         </el-form-item>
         <el-form-item label="鍑虹敓鏃ユ湡" prop="cusBrithday">
-          <el-date-picker clearable v-model="form.cusBrithday" type="date" value-format="yyyy-MM-dd"
-            placeholder="璇烽�夋嫨鍑虹敓鏃ユ湡" style="width: 200px">
+          <el-date-picker
+            disabled
+            clearable
+            v-model="form.cusBrithday"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="璇烽�夋嫨鍑虹敓鏃ユ湡"
+            style="width: 200px"
+          >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="鐜颁綇鍧�" prop="cusAddr">
-          <el-input v-model="form.cusAddr" placeholder="璇疯緭鍏ョ幇灞呬綇鍦板潃" style="width: 200px" />
+        <el-form-item label="骞撮緞" prop="age">
+          <el-input
+            disabled
+            v-model="form.age"
+            placeholder="璇疯緭鍏ュ勾榫�"
+            style="width: 200px"
+          />
         </el-form-item>
         <el-form-item label="鑱旂郴鐢佃瘽" prop="cusPhone">
-          <el-input v-model="form.cusPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" style="width: 200px" />
+          <el-input
+            v-model="form.cusPhone"
+            placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+            style="width: 200px"
+          />
         </el-form-item>
         <!-- <el-form-item label="璐﹀彿瀵嗙爜" prop="cusPassword">
           <el-input v-model="form.cusPassword" placeholder="璇疯緭鍏ヨ处鍙峰瘑鐮�" style="width: 220px" />
@@ -212,32 +485,72 @@
           <el-input v-model="form.cusPostcode" placeholder="璇疯緭鍏ラ偖鏀跨紪鐮�"  />
         </el-form-item> -->
         <el-form-item label="閭" prop="cusEmail">
-          <el-input v-model="form.cusEmail" placeholder="璇疯緭鍏ラ偖绠�" style="width: 200px" />
+          <el-input
+            v-model="form.cusEmail"
+            placeholder="璇疯緭鍏ラ偖绠�"
+            style="width: 200px"
+          />
         </el-form-item>
         <!-- <el-form-item label="绱㈠紩鍗″彿" prop="indexCard">
           <el-input v-model="form.indexCard" placeholder="璇疯緭鍏ョ储寮曞崱鍙�" style="width: 220px" />
         </el-form-item> -->
         <el-form-item label="姘戞棌" prop="cusNational">
-          <el-select v-model="form.cusNational" placeholder="璇烽�夋嫨姘戞棌" style="width: 200px" filterable>
-            <el-option v-for="dict in dict.type.dict_user_national" :key="dict.value" :label="dict.label"
-              :value="dict.value"></el-option>
+          <el-select
+            v-model="form.cusNational"
+            placeholder="璇烽�夋嫨姘戞棌"
+            style="width: 200px"
+            filterable
+          >
+            <el-option
+              v-for="dict in dict.type.dict_user_national"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="濠氬Щ鐘跺喌" prop="cusMarryStatus">
-          <el-select v-model="form.cusMarryStatus" placeholder="璇烽�夋嫨濠氬Щ鐘跺喌" style="width: 200px">
-            <el-option v-for="dict in dict.type.dict_user_marry" :key="dict.value" :label="dict.label"
-              :value="dict.value"></el-option>
+          <el-select
+            v-model="form.cusMarryStatus"
+            placeholder="璇烽�夋嫨濠氬Щ鐘跺喌"
+            style="width: 200px"
+          >
+            <el-option
+              v-for="dict in dict.type.dict_user_marry"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
           </el-select>
         </el-form-item>
 
         <el-form-item label="浠嬬粛浜�" prop="cusIntroduce">
-          <el-input v-model="form.cusIntroduce" placeholder="璇疯緭鍏ヤ粙缁嶄汉" style="width: 200px" />
+          <el-input
+            v-model="form.cusIntroduce"
+            placeholder="璇疯緭鍏ヤ粙缁嶄汉"
+            style="width: 200px"
+          />
         </el-form-item>
         <el-form-item label="鏄惁VIP" prop="cusIsvip">
-          <el-select v-model="form.cusIsvip" placeholder="璇烽�夋嫨鏄惁VIP" style="width: 200px">
-            <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
-              :value="dict.value"></el-option>
+          <el-select
+            v-model="form.cusIsvip"
+            placeholder="璇烽�夋嫨鏄惁VIP"
+            style="width: 200px"
+          >
+            <el-option
+              v-for="dict in dict.type.sys_yes_no"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
           </el-select>
+        </el-form-item>
+        <el-form-item label="鐜颁綇鍧�" prop="cusAddr">
+          <el-input
+            v-model="form.cusAddr"
+            placeholder="璇疯緭鍏ョ幇灞呬綇鍦板潃"
+            style="width: 200px"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -247,28 +560,74 @@
     </el-dialog>
 
     <!-- 鐐瑰嚮鍙宠竟寮瑰嚭灞� -->
-    <el-drawer :visible.sync="drawer" :with-header="false" size="70%" :before-close="handleClose">
-      <div style="text-align: center;margin: 10px 0;">
+    <el-drawer
+      :visible.sync="drawer"
+      :with-header="false"
+      size="70%"
+      :before-close="handleClose"
+    >
+      <div style="text-align: center; margin: 10px 0">
         <span>鍋ュ悍璁板綍</span>
       </div>
       <template>
-        <el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick" style="margin-left: 10px;">
+        <el-tabs
+          v-model="activeName"
+          type="border-card"
+          @tab-click="handleTabClick"
+          style="margin-left: 10px"
+        >
           <el-tab-pane label="浣撴璁板綍" name="first">
             <el-row>
               <el-col :span="14">
-                <el-table ref="selectChargeRuleRef" v-loading="loading" :data="detailsList" border height="680px"
-                  style="width: 96%; margin: 10px 10px" @selection-change="selectChargeRule">
-                  <el-table-column type="selection" width="40px" align="center" fixed="left" />
+                <el-table
+                  ref="selectChargeRuleRef"
+                  v-loading="loading"
+                  :data="detailsList"
+                  border
+                  height="680px"
+                  style="width: 96%; margin: 10px 10px"
+                  @selection-change="selectChargeRule"
+                >
+                  <el-table-column
+                    type="selection"
+                    width="40px"
+                    align="center"
+                    fixed="left"
+                  />
                   <!-- <el-table-column prop="tjNum" label="浣撴鍙�" width="155" align="center"></el-table-column> -->
-                  <el-table-column prop="tjTime" label="浣撴鏃堕棿" width="155" align="center"></el-table-column>
-                  <el-table-column prop="tjProName" label="浣撴椤圭洰" align="center"></el-table-column>
-                  <el-table-column prop="userName" label="鎬绘鍖诲笀" width="75" align="center"></el-table-column>
-                  <el-table-column prop="paidIn" label="浣撴璐圭敤" width="75" align="center"></el-table-column>
+                  <el-table-column
+                    prop="tjTime"
+                    label="浣撴鏃堕棿"
+                    width="155"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="tjProName"
+                    label="浣撴椤圭洰"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="userName"
+                    label="鎬绘鍖诲笀"
+                    width="75"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="paidIn"
+                    label="浣撴璐圭敤"
+                    width="75"
+                    align="center"
+                  ></el-table-column>
                 </el-table>
               </el-col>
               <el-col :span="10">
                 <div>
-                  <iframe id="printIframe" :src="url" frameborder="0" style="width: 100%;height: 680px;"></iframe>
+                  <iframe
+                    id="printIframe"
+                    :src="url"
+                    frameborder="0"
+                    style="width: 100%; height: 680px"
+                  ></iframe>
                 </div>
               </el-col>
             </el-row>
@@ -276,18 +635,52 @@
           <el-tab-pane label="闂ㄨ瘖璁板綍" name="second">
             <el-row>
               <el-col :span="14">
-                <el-table ref="selectChargeRuleRef" v-loading="loading" :data="detailsList" border height="680px"
-                  style="width: 96%; margin: 10px 10px" @selection-change="selectChargeRule">
-                  <el-table-column type="selection" width="40px" align="center" />
-                  <el-table-column prop="project.proScope" label="搴忓彿"></el-table-column>
-                  <el-table-column prop="project.proScope" label="灏辫瘖鏃堕棿" align="center"></el-table-column>
-                  <el-table-column prop="project.proScope" label="灏辫瘖绉戝" align="center"></el-table-column>
-                  <el-table-column prop="project.proScope" label="鎺ヨ瘖鍖诲笀" align="center"></el-table-column>
-                  <el-table-column prop="project.proScope" label="灏辫瘖鎬昏垂鐢�" align="center"></el-table-column>
+                <el-table
+                  ref="selectChargeRuleRef"
+                  v-loading="loading"
+                  :data="detailsList"
+                  border
+                  height="680px"
+                  style="width: 96%; margin: 10px 10px"
+                  @selection-change="selectChargeRule"
+                >
+                  <el-table-column
+                    type="selection"
+                    width="40px"
+                    align="center"
+                  />
+                  <el-table-column
+                    prop="project.proScope"
+                    label="搴忓彿"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="灏辫瘖鏃堕棿"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="灏辫瘖绉戝"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="鎺ヨ瘖鍖诲笀"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="灏辫瘖鎬昏垂鐢�"
+                    align="center"
+                  ></el-table-column>
                 </el-table>
               </el-col>
               <el-col :span="10">
-                <quill-editor v-model="form.content" :options="editorOption" style="height:680px;width:96%">
+                <quill-editor
+                  v-model="form.content"
+                  :options="editorOption"
+                  style="height: 680px; width: 96%"
+                >
                 </quill-editor>
               </el-col>
             </el-row>
@@ -295,57 +688,168 @@
           <el-tab-pane label="浣忛櫌璁板綍" name="third">
             <el-row>
               <el-col :span="14">
-            <el-table ref="selectChargeRuleRef" v-loading="loading" :data="detailsList" border height="680px"
-              style="width: 96%; margin: 10px 10px" @selection-change="selectChargeRule">
-              <el-table-column type="selection" width="40px" align="center" />
-              <el-table-column prop="project.proScope" label="搴忓彿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鍏ラ櫌鏃堕棿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鍑洪櫌鏃堕棿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="浣忛櫌澶╂暟" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="浣忛櫌绉戝" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="涓绘不鍖诲笀" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="涓昏璇婃柇" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鏄惁鎵嬫湳" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="绂婚櫌鏂瑰紡" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="浣忛櫌鎬昏垂鐢�" align="center"></el-table-column>
-            </el-table>
-          </el-col>
+                <el-table
+                  ref="selectChargeRuleRef"
+                  v-loading="loading"
+                  :data="detailsList"
+                  border
+                  height="680px"
+                  style="width: 96%; margin: 10px 10px"
+                  @selection-change="selectChargeRule"
+                >
+                  <el-table-column
+                    type="selection"
+                    width="40px"
+                    align="center"
+                  />
+                  <el-table-column
+                    prop="project.proScope"
+                    label="搴忓彿"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="鍏ラ櫌鏃堕棿"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="鍑洪櫌鏃堕棿"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="浣忛櫌澶╂暟"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="浣忛櫌绉戝"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="涓绘不鍖诲笀"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="涓昏璇婃柇"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="鏄惁鎵嬫湳"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="绂婚櫌鏂瑰紡"
+                    align="center"
+                  ></el-table-column>
+                  <el-table-column
+                    prop="project.proScope"
+                    label="浣忛櫌鎬昏垂鐢�"
+                    align="center"
+                  ></el-table-column>
+                </el-table>
+              </el-col>
               <el-col :span="10">
-                <quill-editor v-model="form.content" :options="editorOption" style="height:680px;width:96%">
+                <quill-editor
+                  v-model="form.content"
+                  :options="editorOption"
+                  style="height: 680px; width: 96%"
+                >
                 </quill-editor>
               </el-col>
             </el-row>
           </el-tab-pane>
           <el-tab-pane label="鎵嬫湳璁板綍" name="fourth">
-            <el-table v-loading="loading" :data="detailsList" border height="460px"
-              style="width: 96%; margin: 10px 10px">
-              <el-table-column prop="project.proScope" label="搴忓彿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="寮�濮嬫椂闂�" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="缁撴潫鏃堕棿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鎵嬫湳鍚嶇О" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鎵嬫湳缂栫爜" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鎵嬫湳绾у埆" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="鏈��" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="涓�鍔�" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="浜屽姪" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="楹婚唹鏂瑰紡" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="楹婚唹寮�濮嬫椂闂�" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="楹婚唹缁撴潫鏃堕棿" align="center"></el-table-column>
-              <el-table-column prop="project.proScope" label="楹婚唹鍖诲笀" align="center"></el-table-column>
+            <el-table
+              v-loading="loading"
+              :data="detailsList"
+              border
+              height="460px"
+              style="width: 96%; margin: 10px 10px"
+            >
+              <el-table-column
+                prop="project.proScope"
+                label="搴忓彿"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="寮�濮嬫椂闂�"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="缁撴潫鏃堕棿"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="鎵嬫湳鍚嶇О"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="鎵嬫湳缂栫爜"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="鎵嬫湳绾у埆"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="鏈��"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="涓�鍔�"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="浜屽姪"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="楹婚唹鏂瑰紡"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="楹婚唹寮�濮嬫椂闂�"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="楹婚唹缁撴潫鏃堕棿"
+                align="center"
+              ></el-table-column>
+              <el-table-column
+                prop="project.proScope"
+                label="楹婚唹鍖诲笀"
+                align="center"
+              ></el-table-column>
             </el-table>
           </el-tab-pane>
         </el-tabs>
       </template>
-
     </el-drawer>
   </div>
 </template>
 
 <script>
-import { quillEditor } from 'vue-quill-editor'
-import 'quill/dist/quill.core.css'
-import 'quill/dist/quill.snow.css'
-import 'quill/dist/quill.bubble.css'
+import { quillEditor } from "vue-quill-editor";
+import "quill/dist/quill.core.css";
+import "quill/dist/quill.snow.css";
+import "quill/dist/quill.bubble.css";
 
 import {
   listCustomer,
@@ -353,9 +857,9 @@
   delCustomer,
   addCustomer,
   updateCustomer,
-  getHistryTjOrderByCusIdCard
+  getHistryTjOrderByCusIdCard,
 } from "@/api/hosp/customer";
-import { getPdf ,addCustomerBlack} from "@/api/hosp/order";
+import { getPdf, addCustomerBlack } from "@/api/hosp/order";
 
 export default {
   name: "Customer",
@@ -370,32 +874,32 @@
     let checkPhoneNum = (rule, value, callback) => {
       let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
       if (value == "" && value == undefined && !value) {
-        return callback('');
+        return callback("");
       } else if (value != undefined && value != "") {
         return callback();
       } else if (!patter.test(value)) {
-        return callback('');
+        return callback("");
       }
     };
     return {
       editorOption: {
-        placeholder: '璇峰湪杩欓噷杈撳叆',
+        placeholder: "璇峰湪杩欓噷杈撳叆",
         modules: {
           toolbar: [
-            ['bold', 'italic', 'underline', 'strike'], //鍔犵矖锛屾枩浣擄紝涓嬪垝绾匡紝鍒犻櫎绾�
-            ['blockquote', 'code-block'], //寮曠敤锛屼唬鐮佸潡
+            ["bold", "italic", "underline", "strike"], //鍔犵矖锛屾枩浣擄紝涓嬪垝绾匡紝鍒犻櫎绾�
+            ["blockquote", "code-block"], //寮曠敤锛屼唬鐮佸潡
             [{ header: 1 }, { header: 2 }], // 鏍囬锛岄敭鍊煎鐨勫舰寮忥紱1銆�2琛ㄧず瀛椾綋澶у皬
-            [{ list: 'ordered' }, { list: 'bullet' }], //鍒楄〃
-            [{ script: 'sub' }, { script: 'super' }], // 涓婁笅鏍�
-            [{ indent: '-1' }, { indent: '+1' }], // 缂╄繘
-            [{ direction: 'rtl' }], // 鏂囨湰鏂瑰悜
-            [{ size: ['small', false, 'large', 'huge'] }], // 瀛椾綋澶у皬
+            [{ list: "ordered" }, { list: "bullet" }], //鍒楄〃
+            [{ script: "sub" }, { script: "super" }], // 涓婁笅鏍�
+            [{ indent: "-1" }, { indent: "+1" }], // 缂╄繘
+            [{ direction: "rtl" }], // 鏂囨湰鏂瑰悜
+            [{ size: ["small", false, "large", "huge"] }], // 瀛椾綋澶у皬
             [{ header: [1, 2, 3, 4, 5, 6, false] }], //鍑犵骇鏍囬
             [{ color: [] }, { background: [] }], // 瀛椾綋棰滆壊锛屽瓧浣撹儗鏅鑹�
             [{ font: [] }], //瀛椾綋
             [{ align: [] }], //瀵归綈鏂瑰紡
-            ['clean'], //娓呴櫎瀛椾綋鏍峰紡
-            ['image', 'video'], //涓婁紶鍥剧墖銆佷笂浼犺棰�
+            ["clean"], //娓呴櫎瀛椾綋鏍峰紡
+            ["image", "video"], //涓婁紶鍥剧墖銆佷笂浼犺棰�
           ],
         },
       },
@@ -408,7 +912,7 @@
       single: true,
       drawer: false,
       detailsList: [],
-      activeName: 'first',
+      activeName: "first",
       // 闈炲涓鐢�
       multiple: true,
       url: "",
@@ -445,7 +949,9 @@
       form: {},
       // 琛ㄥ崟鏍¢獙
       rules: {
-        cusName: [{ required: true, validator: checkPhoneNum, trigger: "blur" }],
+        cusName: [
+          { required: true, validator: checkPhoneNum, trigger: "blur" },
+        ],
         cusSex: [
           { required: true, validator: checkPhoneNum, trigger: "change" },
         ],
@@ -559,32 +1065,61 @@
 
     // 璇︽儏
     handleDetails(row) {
-      this.drawer = true
-      let cusId = row.cusId
-      getHistryTjOrderByCusIdCard(cusId).then(res => {
-        this.detailsList = res.data
-      })
+      this.drawer = true;
+      let cusId = row.cusId;
+      getHistryTjOrderByCusIdCard(cusId).then((res) => {
+        this.detailsList = res.data;
+      });
     },
 
-    handleBlacklist(){
-      let data ={
-        cusId :this.ids[0]
-      }
-      addCustomerBlack(data).then(res => {
-        this.$modal.msgSuccess("宸插姞鍏ラ粦鍚嶅崟")
+    handleBlacklist() {
+      let data = {
+        cusId: this.ids[0],
+      };
+      addCustomerBlack(data).then((res) => {
+        this.$modal.msgSuccess("宸插姞鍏ラ粦鍚嶅崟");
         this.getList();
-      })
+      });
+    },
+
+    inputChange() {
+      const reg =
+        /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      if (reg.test(this.form.cusIdcard)) {
+        var org_birthday = this.form.cusIdcard.substring(6, 14);
+        var org_gender = this.form.cusIdcard.substring(16, 17);
+        var sex = org_gender % 2 == 1 ? 0 : 1;
+        var birthday =
+          org_birthday.substring(0, 4) +
+          "-" +
+          org_birthday.substring(4, 6) +
+          "-" +
+          org_birthday.substring(6, 8);
+        var birthdays = new Date(birthday.replace(/-/g, "-"));
+        let d = new Date();
+        let age =
+          d.getFullYear() -
+          birthdays.getFullYear() -
+          (d.getMonth() < birthdays.getMonth() ||
+          (d.getMonth() == birthdays.getMonth() &&
+            d.getDate() < birthdays.getDate())
+            ? 1
+            : 0);
+        this.form.cusSex = sex;
+        this.form.cusBrithday = birthday;
+        this.form.age = age;
+      }
     },
 
     selectChargeRule(val) {
       if (val.length > 1) {
-        this.$refs.selectChargeRuleRef.clearSelection()
-        this.$refs.selectChargeRuleRef.toggleRowSelection(val[val.length - 1])
+        this.$refs.selectChargeRuleRef.clearSelection();
+        this.$refs.selectChargeRuleRef.toggleRowSelection(val[val.length - 1]);
       }
-      let selectedRule = val[val.length - 1]
+      let selectedRule = val[val.length - 1];
       if (this.activeName == "first") {
         const flag = true;
-        let tjNumber = selectedRule.tjNum
+        let tjNumber = selectedRule.tjNum;
         // let tjNumber = "10001240305100029"
         getPdf(tjNumber, flag).then((response) => {
           if (response.size === 0) {
@@ -608,19 +1143,15 @@
           }
         });
       } else if (this.activeName == "second") {
-
       } else if (this.activeName == "third") {
-
       }
-
     },
-
 
     handleClose() {
       this.$tab.refreshPage();
     },
     handleTabClick() {
-      console.log(this.activeName)
+      console.log(this.activeName);
     },
     /** 鎻愪氦鎸夐挳 */
     submitForm() {
@@ -654,7 +1185,7 @@
           this.getList();
           this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {

--
Gitblit v1.8.0