浏览代码

医嘱确认完善前端页面。

xiaochan 3 年之前
父节点
当前提交
778e99e97f
共有 2 个文件被更改,包括 202 次插入88 次删除
  1. 18 10
      src/api/zhu-yuan-yi-ji/que-ren-yi-zhu-shou-fei.js
  2. 184 78
      src/views/med-tec-mod/QueRenYiZhuShouFei.vue

+ 18 - 10
src/api/zhu-yuan-yi-ji/que-ren-yi-zhu-shou-fei.js

@@ -3,17 +3,25 @@ import request from '../../utils/request'
 const url = '/queRenYiZhuShouFei'
 
 export function getXuQueFeiYiZhu(data) {
-  return request({
-    url: url + '/getXuQueFeiYiZhu',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: url + '/getXuQueFeiYiZhu',
+        method: 'post',
+        data,
+    })
 }
 
 export function baoCunYiZhuQueFeiShuJu(data) {
-  return request({
-    url: url + '/baoCunYiZhuQueFeiShuJu',
-    method: 'post',
-    data,
-  })
+    return request({
+        url: url + '/baoCunYiZhuQueFeiShuJu',
+        method: 'post',
+        data,
+    })
+}
+
+export function huoQuLiShiQueFeiYiZhu(startTime, endTime, inpatientNo, wardCode, execUnit, paiXu, code) {
+    return request({
+        url: url + '/huoQuLiShiQueFeiYiZhu',
+        method: 'get',
+        params: {startTime, endTime, inpatientNo, wardCode, execUnit, paiXu, code},
+    })
 }

+ 184 - 78
src/views/med-tec-mod/QueRenYiZhuShouFei.vue

@@ -1,6 +1,16 @@
 <template>
   <el-container>
     <el-header style="margin-top: 8px">
+      <el-date-picker
+          type="daterange"
+          v-model="dateRange"
+          placeholder="选择日期"
+          style="width: 280px"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :shortcuts="shortcuts"
+      ></el-date-picker>
       <el-input style="width: 160px" placeholder="请输入住院号" clearable v-model.trim="queryTerm.inpatientNo"
                 @keyup.enter="getHuanZheXinXiClick"></el-input>
       <el-select v-model="queryTerm.wardCode" filterable clearable placeholder="请选择病区">
@@ -14,8 +24,7 @@
       <el-button type="primary" icon="el-icon-search" @click="getHuanZheXinXiClick">查询</el-button>
       <el-button type="primary" icon="el-icon-refresh-left" @click="getXuQueFeiYiZhuClick">刷新</el-button>
       排序:
-      <el-select v-model="queryTerm.fenLei" style="width: 100px; margin: auto 10px auto 10px"
-                 @change="getHuanZheXinXiClick">
+      <el-select v-model="queryTerm.fenLei" style="width: 100px; margin: auto 10px auto 10px">
         <el-option :value="0" label="病区"></el-option>
         <el-option :value="1" label="执行人"></el-option>
       </el-select>
@@ -29,68 +38,113 @@
       </el-radio-group>
       <el-divider direction="vertical"></el-divider>
       <el-button type="warning" @click="chaoZuoZhiNan = true">操作指南</el-button>
-      <el-date-picker
-          type="daterange"
-          v-model="dateRange"
-          v-if="queryTerm.liShi === 1"
-          placeholder="选择日期"
-          style="width: 280px"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :shortcuts="shortcuts"
-      ></el-date-picker>
+      <el-switch
+          v-show="queryTerm.liShi === 1"
+          v-model="zhiKanZiJi"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+          active-text="只看自己"
+          inactive-text="全部"
+          :active-value="true"
+          :inactive-value="false"
+      >
+      </el-switch>
     </el-header>
     <el-main>
-      <el-table :data="huanZheYiZhuFeiYongData" :height="winHeight / 1.15" stripe highlight-current-row
-                @cell-click="lingShiQueFeiShuJuClick" ref="tableRef">
-        <el-table-column prop="name" label="姓名" width="90">
-          <template #default="scope">
-            <el-button size="small" :type="scope.row.shiFouYouChuYuanYiZhu === 0 ? 'success' : 'danger'"
-                       style="width: 100px"
-            ><span style="font-size: 20px">{{ scope.row.name }}</span></el-button
-            >
-          </template>
-        </el-table-column>
-        <el-table-column prop="inpatientNo" label="住院号" width="90"></el-table-column>
-        <el-table-column prop="admissTimes" label="住院次数" width="90"></el-table-column>
-        <el-table-column prop="bedNo" label="床号" width="50"></el-table-column>
-        <el-table-column prop="sex" label="性别">
-          <template #default="scope">
-            {{ cptSex(scope.row.sex) }}
-          </template>
-        </el-table-column>
-        <el-table-column prop="admissDate" label="住院日期"></el-table-column>
-        <el-table-column prop="responceTypeName" label="医保身份"></el-table-column>
-        <el-table-column prop="wardName" label="病区"></el-table-column>
-        <el-table-column prop="totalCharge" label="总费用"></el-table-column>
-        <el-table-column label="操作">
-          <template #default="scope">
-            <span v-html="chaoZuo(scope.row.list)"></span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-pagination
-          background
-          @current-change="changeYiZhuQueFei"
-          :current-page="queryTerm.currentPage"
-          :page-size="queryTerm.pageSize"
-          layout=" prev, pager, next,total"
-          :total="queryTerm.total"
-          style="margin-top: 5px"
-          :pager-count="5"
-      ></el-pagination>
+      <div v-show="queryTerm.liShi === 0">
+        <el-table :data="huanZheYiZhuFeiYongData" :height="winHeight / 1.15" stripe highlight-current-row
+                  @cell-click="lingShiQueFeiShuJuClick" ref="tableRef">
+          <el-table-column prop="name" label="姓名" width="90">
+            <template #default="scope">
+              <el-button size="small" :type="scope.row.shiFouYouChuYuanYiZhu === 0 ? 'success' : 'danger'"
+                         style="width: 100px"
+              ><span style="font-size: 20px">{{ scope.row.name }}</span></el-button
+              >
+            </template>
+          </el-table-column>
+          <el-table-column prop="inpatientNo" label="住院号" width="90"></el-table-column>
+          <el-table-column prop="admissTimes" label="住院次数" width="90"></el-table-column>
+          <el-table-column prop="bedNo" label="床号" width="50"></el-table-column>
+          <el-table-column prop="sex" label="性别">
+            <template #default="scope">
+              {{ cptSex(scope.row.sex) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="admissDate" label="住院日期"></el-table-column>
+          <el-table-column prop="responceTypeName" label="医保身份"></el-table-column>
+          <el-table-column prop="wardName" label="病区"></el-table-column>
+          <el-table-column prop="totalCharge" label="总费用"></el-table-column>
+          <el-table-column label="操作">
+            <template #default="scope">
+              <span v-html="chaoZuo(scope.row.list)"></span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+            background
+            @current-change="changeYiZhuQueFei"
+            :current-page="queryTerm.currentPage"
+            :page-size="queryTerm.pageSize"
+            layout=" prev, pager, next,total"
+            :total="queryTerm.total"
+            style="margin-top: 5px"
+            :pager-count="5"
+        ></el-pagination>
+      </div>
+      <div v-show="queryTerm.liShi === 1">
+        <el-table
+            :data="liShiShuJu.list.slice((liShiShuJu.currentPage - 1) * liShiShuJu.pageSize ,liShiShuJu.currentPage * liShiShuJu.pageSize)"
+            :height="winHeight / 1.15" stripe highlight-current-row
+            ref="liShiShuJuRef"
+        >
+          <el-table-column label="患者姓名" prop="name">
+            <template #default="scope">
+              <el-button size="small" :type="scope.row.color === 1 ? 'success' : 'danger'"
+                         style="width: 100px"
+              ><span style="font-size: 20px">{{ scope.row.name }}</span></el-button
+              >
+            </template>
+          </el-table-column>
+          <el-table-column label="住院号" prop="inpatientNo"></el-table-column>
+          <el-table-column label="住院次数" prop="admissTimes"></el-table-column>
+          <el-table-column label="医嘱号" prop="actOrderNo"></el-table-column>
+          <el-table-column label="医嘱时间" prop="occTime" width="70"></el-table-column>
+          <el-table-column label="项目名称" prop="chargeName"></el-table-column>
+          <el-table-column label="金额" prop="chargeFee"></el-table-column>
+          <el-table-column label="数量" prop="orderCount"></el-table-column>
+          <el-table-column label="医生姓名" prop="docotrName"></el-table-column>
+          <el-table-column label="操作人" prop="opIdName"></el-table-column>
+          <el-table-column label="操作时间" prop="opDate" width="70"></el-table-column>
+          <el-table-column label="操作内容" prop="chargeStatus">
+            <template #default="scope">
+              <span v-html="yiZhuZhuangTai(scope.row.chargeStatus)"></span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-pagination
+            background
+            @current-change="liShiShuJuFanYe"
+            :current-page="liShiShuJu.currentPage"
+            :page-size="liShiShuJu.pageSize"
+            layout=" prev, pager, next,total"
+            :total="liShiShuJu.list.length"
+            style="margin-top: 5px"
+            :pager-count="5"
+        ></el-pagination>
+      </div>
     </el-main>
     <el-drawer v-model="xiangXiYiZhuXinXiDrawer" direction="ltr" size="700" title="患者医嘱的详细信息">
       <div style="margin: auto 20px auto 20px">
-        <el-descriptions title="患者信息" border>
+        <el-descriptions :title="lingShiQueFeiShuJu.name" border>
           <template #extra>
             <el-button type="success" @click="baoCunYiZhuQueFeiClick" icon="el-icon-upload"
                        :disabled="queryTerm.liShi === 1">保存
             </el-button>
           </template>
           <el-descriptions-item label="住院号">{{ lingShiQueFeiShuJu.inpatientNo }}</el-descriptions-item>
-          <el-descriptions-item label="姓名">{{ lingShiQueFeiShuJu.name }}</el-descriptions-item>
+          <el-descriptions-item label="姓名">
+            <el-tag size="small" style="font-size: 24px">{{ lingShiQueFeiShuJu.name }}</el-tag>
+          </el-descriptions-item>
           <el-descriptions-item label="性别">{{ cptSex(lingShiQueFeiShuJu.sex) }}</el-descriptions-item>
           <el-descriptions-item label="床号">{{ lingShiQueFeiShuJu.bedNo }}</el-descriptions-item>
           <el-descriptions-item label="医保身份">{{ lingShiQueFeiShuJu.responceTypeName }}</el-descriptions-item>
@@ -115,12 +169,9 @@
                 {{ (scope.row.chargeFee * scope.row.orderCount).toFixed(2) }}
               </template>
             </el-table-column>
-            <el-table-column prop="opIdName" label="操作人" v-if="queryTerm.liShi === 1"></el-table-column>
-            <el-table-column prop="opDate" label="操作时间" v-if="queryTerm.liShi === 1"></el-table-column>
-            <el-table-column label="操作" :width="queryTerm.liShi === 0 ? 230 : 50">
+            <el-table-column label="操作">
               <template #default="scope">
                 <el-radio-group
-                    v-if="queryTerm.liShi === 0"
                     v-model="scope.row.chargeStatus"
                     :fill="scope.row.chargeStatus === '1' ? '#67C23A' : scope.row.chargeStatus === '2' ? '#F56C6C' : '#909399'"
                 >
@@ -128,7 +179,6 @@
                   <el-radio-button label="2">取消</el-radio-button>
                   <el-radio-button label="3">不操作</el-radio-button>
                 </el-radio-group>
-                <span v-else v-html="yiZhuZhuangTai(scope.row.chargeStatus)"> </span>
               </template>
             </el-table-column>
           </el-table-column>
@@ -179,7 +229,11 @@
 
 <script>
 import {onMounted, ref, watch} from 'vue'
-import {getXuQueFeiYiZhu, baoCunYiZhuQueFeiShuJu} from '@/api/zhu-yuan-yi-ji/que-ren-yi-zhu-shou-fei'
+import {
+  getXuQueFeiYiZhu,
+  baoCunYiZhuQueFeiShuJu,
+  huoQuLiShiQueFeiYiZhu
+} from '../../api/zhu-yuan-yi-ji/que-ren-yi-zhu-shou-fei'
 import {getWard} from '@/api/yibao/xiang-mu-lu-ru'
 import {cptSex} from '@/utils/computed'
 import store from '@/store'
@@ -208,7 +262,15 @@ export default {
       liShi: 0,
     })
     const tableRef = ref(null)
+    const liShiShuJuRef = ref(null)
     const chaoZuoZhiNan = ref(true)
+    const zhiKanZiJi = ref(false)
+
+    const liShiShuJu = ref({
+      pageSize: 50,
+      currentPage: 1,
+      list: []
+    })
 
     const xiangXiYiZhuXinXiDrawer = ref(false)
 
@@ -231,25 +293,48 @@ export default {
      * 这个是查询当前病人的
      */
     const getHuanZheXinXiClick = () => {
-      if (queryTerm.value.liShi === 1) {
-        let date = getDateRangeFormatDate(dateRange.value)
-        queryTerm.value.startTimeString = date.startTime
-        queryTerm.value.endTimeString = date.endTime
-      }
+      let date = getDateRangeFormatDate(dateRange.value)
+      queryTerm.value.startTimeString = date.startTime
+      queryTerm.value.endTimeString = date.endTime
       queryTerm.value.execUnit = dept
       queryTerm.value.currentPage = 1
       queryTerm.value.pageSize = 20
-      getXuQueFeiYiZhu(queryTerm.value)
-          .then((res) => {
-            huanZheYiZhuFeiYongData.value = res.records
-            queryTerm.value.total = res.total
-            lingShiQueFeiShuJu.value = {}
-            lingShiQueFeiShuJu.value.list = []
-          })
-          .catch(() => {
-            huanZheYiZhuFeiYongData.value = []
-            queryTerm.value.total = 0
-          })
+      if (queryTerm.value.liShi === 0) {
+        getXuQueFeiYiZhu(queryTerm.value)
+            .then((res) => {
+              huanZheYiZhuFeiYongData.value = res.records
+              queryTerm.value.total = res.total
+              qingKongLingShiShuJu()
+            })
+            .catch(() => {
+              huanZheYiZhuFeiYongData.value = []
+              queryTerm.value.total = 0
+            })
+      } else {
+        let code = ''
+        if (zhiKanZiJi.value) {
+          code = store.state.user.info.code
+        }
+        huoQuLiShiQueFeiYiZhu(queryTerm.value.startTimeString, queryTerm.value.endTimeString, queryTerm.value.inpatientNo, queryTerm.value.wardCode,
+            queryTerm.value.execUnit, queryTerm.value.fenLei, code)
+            .then((res) => {
+              liShiShuJu.value.list = res
+              if (liShiShuJu.value.list.length > 0) {
+                let patNo = liShiShuJu.value.list[0].inpatientNo
+                let color = 1
+                liShiShuJu.value.list.forEach(item => {
+                  if (item.inpatientNo === patNo) {
+                    item.color = color
+                  } else {
+                    color = color === 1 ? 2 : 1
+                    item.color = color
+                    patNo = item.inpatientNo
+                  }
+                })
+              }
+              liShiShuJu.value.currentPage = 1
+            })
+      }
     }
 
     /**
@@ -339,6 +424,18 @@ export default {
           })
     }
 
+    const qingKongLingShiShuJu = () => {
+      lingShiQueFeiShuJu.value.list = []
+      lingShiQueFeiShuJu.value.currentPage = 1
+      lingShiQueFeiShuJu.value.pageSize = 40
+      lingShiQueFeiShuJu.value.total = 0
+      lingShiQueFeiShuJu.value.name = ''
+      lingShiQueFeiShuJu.value.sex = 1
+      lingShiQueFeiShuJu.value.bedNo = 0
+      lingShiQueFeiShuJu.value.responceTypeName = ''
+      lingShiQueFeiShuJu.value.wardName = ''
+    }
+
     const lingShiQueFeiShuJu = ref({
       list: [],
       currentPage: 1,
@@ -372,6 +469,11 @@ export default {
       lingShiQueFeiShuJu.value.pageSize = val
     }
 
+    const liShiShuJuFanYe = (val) => {
+      liShiShuJuRef.value.$refs.bodyWrapper.scrollTop = 0
+      liShiShuJu.value.currentPage = val
+    }
+
 
     onMounted(() => {
       getWard().then((res) => {
@@ -408,6 +510,10 @@ export default {
       xiangXiYiZhuXinXiDrawer,
       handleSizeChange,
       tableRef,
+      liShiShuJu,
+      liShiShuJuFanYe,
+      liShiShuJuRef,
+      zhiKanZiJi
     }
   },
 }
@@ -435,11 +541,11 @@ function chaoZuo(val) {
 function yiZhuZhuangTai(val) {
   switch (val) {
     case '0':
-      return '<span style="color:#67C23A">上账</span>'
+      return '<span style="color:#67C23A;font-size: 24px">上账</span>'
     case '1':
-      return ' <span style="color:#E6A23C">确认但未上账</span>'
+      return ' <span style="color:#E6A23C;font-size: 24px">确认但未上账</span>'
     case '2':
-      return ' <span style="color:#F56C6C">取消</span>'
+      return ' <span style="color:#F56C6C;font-size: 24px">取消</span>'
     case '5':
       return '科室确认'
     case '6':