Browse Source

优化日期以及门诊费用确认

DESKTOP-MINPJAU\Administrator 3 years ago
parent
commit
aafe40b785
2 changed files with 43 additions and 36 deletions
  1. 8 7
      src/utils/date.js
  2. 35 29
      src/views/med-tec-mod/MenZhenXiangMu.vue

+ 8 - 7
src/utils/date.js

@@ -111,17 +111,18 @@ export function getDateRangeFormatDate(data) {
     return {startTime, endTime}
 }
 
-export function getDateRangeFormatDateTime(data) {
+export function getDateRangeFormatDateTime(date) {
     let startTime = ''
     let endTime = ''
-    if (typeof data === 'undefined' || data === null || data.length === 0) return {startTime, endTime}
+    if (!date) return {startTime, endTime}
+    if (!date[0] || !date[1]) return {startTime, endTime}
     //用户手动输入了日期 并且没有按下大键盘上面的回车
-    if (typeof data[0].$d !== 'undefined') {
-        startTime = formatDatetime(data[0].$d)
-        endTime = formatDatetime(data[1].$d)
+    if (!date[0].$d) {
+        startTime = formatDatetime(date[0].$d)
+        endTime = formatDatetime(date[1].$d)
     } else {
-        startTime = formatDatetime(data[0])
-        endTime = formatDatetime(data[1])
+        startTime = formatDatetime(date[0])
+        endTime = formatDatetime(date[1])
     }
     return {startTime, endTime}
 }

+ 35 - 29
src/views/med-tec-mod/MenZhenXiangMu.vue

@@ -2,18 +2,18 @@
   <el-container>
     <el-header>
       <el-date-picker
-          type="daterange"
           v-model="dateRange"
+          :shortcuts="shortcuts"
+          end-placeholder="结束日期"
           placeholder="选择日期"
-          style="width: 280px"
           range-separator="至"
           start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :shortcuts="shortcuts"
+          style="width: 280px"
+          type="daterange"
       ></el-date-picker>
       患者ID:
-      <el-input style="width: 120px" @keyup.enter="getMzPatientClick" v-model="patientId"
-                @blur="patientId = $event.target.value.trim()" clearable></el-input>
+      <el-input v-model="patientId" clearable style="width: 120px"
+                @blur="patientId = $event.target.value.trim()" @keyup.enter="getMzPatientClick"></el-input>
       <el-select v-model="xiangMuZhuangTai" style="width: 90px">
         <el-option v-for="item in xiangMuZhuangTaiData" :key="item.code" :label="item.name" :value="item.code">
           <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
@@ -21,34 +21,34 @@
           <span :style="{ color: item.color }">{{ item.name }}</span>
         </el-option>
       </el-select>
-      <el-button type="primary" icon="el-icon-search" @click="getMzPatientClick"> 查询</el-button>
-      <el-button type="primary" icon="el-icon-search" @click="kuaiSuChaZhaoClick "> 快速查找</el-button>
-      <el-button type="warning" icon="el-icon-search" @click="chaoZuoZhiNanDialog = true"> 操作指南</el-button>
-      <el-button type="success" icon="el-icon-upload" @click="baoCunClick"> 保存</el-button>
+      <el-button icon="el-icon-search" type="primary" @click="getMzPatientClick"> 查询</el-button>
+      <el-button icon="el-icon-search" type="primary" @click="kuaiSuChaZhaoClick "> 快速查找</el-button>
+      <el-button icon="el-icon-search" type="warning" @click="chaoZuoZhiNanDialog = true"> 操作指南</el-button>
+      <el-button icon="el-icon-upload" type="success" @click="baoCunClick"> 保存</el-button>
       <br>
       <el-tag effect="dark" size="medium">患者姓名: {{ patient.name }}</el-tag>
-      <el-tag effect="dark" type="warning" size="medium">性别:{{ cptSex(patient.sex) }}</el-tag>
+      <el-tag effect="dark" size="medium" type="warning">性别:{{ cptSex(patient.sex) }}</el-tag>
       <el-tag effect="dark" size="medium">出生日期: {{ patient.birthDay }}</el-tag>
-      <el-tag effect="dark" type="warning" size="medium">诊疗卡: {{ patient.icCardNo }}</el-tag>
+      <el-tag effect="dark" size="medium" type="warning">诊疗卡: {{ patient.icCardNo }}</el-tag>
     </el-header>
     <el-container>
       <el-main>
         <el-row>
           <el-col :span="4">
-            <el-table :height="windowsHeight / 1.1" :data="shouFeiData" highlight-current-row stripe
+            <el-table :data="shouFeiData" :height="windowsHeight / 1.1" highlight-current-row stripe
                       @cell-click="getFeiYongXinXiClick">
               <el-table-column label="收费信息">
                 <el-table-column label="缴费日期" prop="chargeDate" width="80"></el-table-column>
                 <el-table-column label="流水号">
                   <template #default="scope">
-                    <el-popover placement="right" :width="800" trigger="click">
+                    <el-popover :width="800" placement="right" trigger="click">
                       <template #reference>
-                        <el-button @click="getFeiYongXinXiClick(scope.row)" type="success">{{
+                        <el-button type="success" @click="getFeiYongXinXiClick(scope.row)">{{
                             scope.row.realNo
                           }}
                         </el-button>
                       </template>
-                      <el-table :height="windowsHeight / 2" :data="feiYongData" highlight-current-row stripe>
+                      <el-table :data="feiYongData" :height="windowsHeight / 2" highlight-current-row stripe>
                         <el-table-column label="缴费明细信息">
                           <el-table-column label="待确认标志" prop="confirmFlag">
                             <template #default="scope">
@@ -71,13 +71,13 @@
             </el-table>
           </el-col>
           <el-col :span="20">
-            <el-table :height="windowsHeight / 1.1" :data="keQueRenData" highlight-current-row stripe>
+            <el-table :data="keQueRenData" :height="windowsHeight / 1.1" highlight-current-row stripe>
               <el-table-column label="本科室">
                 <el-table-column label="待确认标志" prop="confirmFlag" width="250">
                   <template #default="scope">
                     <el-radio-group v-model="scope.row.confirmFlag">
-                      <el-radio-button :label="0"
-                                       :disabled="scope.row.xiangMuZhuangTai === 1 || scope.row.xiangMuZhuangTai === 3">
+                      <el-radio-button :disabled="scope.row.xiangMuZhuangTai === 1 || scope.row.xiangMuZhuangTai === 3"
+                                       :label="0">
                         未确认
                       </el-radio-button>
                       <el-radio-button :label="1">确认</el-radio-button>
@@ -93,7 +93,7 @@
                 <el-table-column label="执行科室" prop="execDeptName"></el-table-column>
                 <el-table-column label="申请号" prop="reqNo">
                   <template #default="scope">
-                    <el-popover placement="left" :width="800" trigger="click">
+                    <el-popover :width="800" placement="left" trigger="click">
                       <template #reference>
                         <el-button type="success" @click="getMingXiClick(scope.row)">{{ scope.row.reqNo }}</el-button>
                       </template>
@@ -118,17 +118,17 @@
     <el-table
         :data="kuaiSuChaZhaoData.list.slice((kuaiSuChaZhaoData.currentPage - 1 ) *
         kuaiSuChaZhaoData.pageSize,kuaiSuChaZhaoData.pageSize * kuaiSuChaZhaoData.currentPage)"
-        @cell-click="chaZhaoTable"
-        :height="windowsHeight / 2" highlight-current-row stripe>
+        :height="windowsHeight / 2"
+        highlight-current-row stripe @cell-click="chaZhaoTable">
       <el-table-column label="姓名" prop="name"></el-table-column>
       <el-table-column label="门诊号" prop="patientId"></el-table-column>
     </el-table>
     <el-pagination
-        background
         :current-page="kuaiSuChaZhaoData.currentPage"
         :page-size="kuaiSuChaZhaoData.pageSize"
-        layout="total,  prev, pager, next, jumper"
         :total="kuaiSuChaZhaoData.list.length"
+        background
+        layout="total,  prev, pager, next, jumper"
         @current-change="kuaiSuChaZhaoCurrent"
     >
     </el-pagination>
@@ -151,11 +151,11 @@ import {shortcuts} from '@/data/shortcuts'
 import {ref} from 'vue'
 import {cptSex} from '@/utils/computed'
 import {
-  getMzPatient,
   getFeiYongXinXi,
-  menZhenXiangMuQuXiaoHuoQueRen,
-  kuaiSuChaZhao
-} from '../../api/zhu-yuan-yi-ji/men-zhen-xiang-mu.js'
+  getMzPatient,
+  kuaiSuChaZhao,
+  menZhenXiangMuQuXiaoHuoQueRen
+} from '@/api/zhu-yuan-yi-ji/men-zhen-xiang-mu'
 import {getDateRangeFormatDate} from '@/utils/date'
 import store from '@/store'
 import {clone} from '@/utils/clone.js'
@@ -238,8 +238,14 @@ export default {
         type: 'warning',
       })
           .then(() => {
+            const list = []
+            keQueRenData.value.forEach(item => {
+              if (item.confirmFlag !== item.oldConfirmFlag) {
+                list.push(item)
+              }
+            })
             let baoCun = {
-              list: keQueRenData.value,
+              list: list,
               realNo: lingShiBaoCunJiaoFeiMingXi.value.realNo,
               patientId: lingShiBaoCunJiaoFeiMingXi.value.patientId,
               times: lingShiBaoCunJiaoFeiMingXi.value.times,