Procházet zdrojové kódy

新增门诊患者缴费明细查询

yanqiliang před 2 měsíci
rodič
revize
5d14e513ee

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "普瑞眼科移动护理v3",
     "appid" : "__UNI__58FA072",
     "description" : "",
-    "versionName" : "1.2.2",
-    "versionCode" : 122,
+    "versionName" : "1.2.3",
+    "versionCode" : 123,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,

+ 224 - 0
pages/components/PaymentDetailPopup.vue

@@ -0,0 +1,224 @@
+<!-- 门诊患者缴费明细弹框 -->
+<template>
+  <view class="payment-popup" v-if="show">
+    <!-- 遮罩层 -->
+    <view class="mask" @click="handleClose"></view>
+    
+    <!-- 弹框内容 -->
+    <view class="popup-content">
+      <!-- 头部信息区域 -->
+      <view class="popup-header">
+        <view class="patient-name">{{ patientInfo.name || '未填写' }}</view>
+        <view class="visit-info">
+          <view class="info-item">就诊科室:{{ patientInfo.department || '未填写' }}</view>
+          <view class="info-item">就诊医生:{{ patientInfo.doctor || '未填写' }}</view>
+          <view class="info-item">就诊时间:{{ patientInfo.time || '未填写' }}</view>
+        </view>
+      </view>
+      
+      <!-- 分隔线 -->
+      <view class="divider"></view>
+      
+      <!-- 缴费明细区域 -->
+      <view class="detail-section">
+        <view class="detail-title">缴费明细</view>
+        
+        <!-- 明细列表头部 -->
+        <view class="detail-header">
+          <view class="detail-col name-col">项目名称</view>
+          <view class="detail-col price-col">金额</view>
+          <view class="detail-col time-col">时间</view>
+          <view class="detail-col status-col">状态</view>
+        </view>
+        
+        <!-- 明细列表内容 -->
+        <view class="detail-list">
+          <view 
+            class="detail-item" 
+            v-for="(item, index) in paymentDetails" 
+            :key="index">
+            <view class="detail-col name-col">{{ item.itemName }}</view>
+            <view class="detail-col price-col">¥{{ item.price }}</view>
+            <view class="detail-col time-col">{{ item.billDate+' '+ item.billTime}}</view>
+            <view v-if="item.paidStatusDesc === '已结算'" class="detail-col status-col">{{ item.paidStatusDesc }}</view>
+			<view v-if="item.paidStatusDesc !== '已结算'" class="detail-col time-col">{{ item.paidStatusDesc }}</view>
+          </view>
+          
+          <!-- 空状态 -->
+          <view class="empty-state" v-if="paymentDetails.length === 0">
+            暂无缴费明细
+          </view>
+        </view>
+      </view>
+      
+      <!-- 底部操作区域 -->
+      <view class="popup-footer">
+        <button class="close-btn" @click="handleClose">关闭</button>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { defineProps } from 'vue'
+
+// 定义组件接收的参数
+const props = defineProps({
+  // 是否显示弹框
+  show: {
+    type: Boolean,
+    default: false
+  },
+  // 患者信息
+  patientInfo: {
+    type: Object,
+    default: () => ({
+      name: '',       // 姓名
+      department: '', // 就诊科室
+      doctor: '',     // 就诊医生
+      time: ''        // 就诊时间
+    })
+  },
+  // 缴费明细数组
+  paymentDetails: {
+    type: Array,
+    default: () => []
+  }
+})
+
+// 定义 emits 事件
+const emit = defineEmits(['close'])
+
+// 关闭弹框
+const handleClose = () => {
+  emit('close')
+}
+</script>
+
+<style scoped>
+.payment-popup {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 999;
+}
+
+.mask {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(0, 0, 0, 0.5);
+}
+
+.popup-content {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  background-color: #fff;
+  border-radius: 16rpx 16rpx 0 0;
+  max-height: 80vh;
+  overflow-y: auto;
+}
+
+.popup-header {
+  padding: 30rpx;
+}
+
+.patient-name {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 20rpx;
+}
+
+.visit-info {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 20rpx 40rpx;
+}
+
+.info-item {
+  font-size: 28rpx;
+  color: #666;
+  line-height: 1.5;
+}
+
+.divider {
+  height: 1px;
+  background-color: #f5f5f5;
+  margin: 0 30rpx;
+}
+
+.detail-section {
+  padding: 15rpx 30rpx;
+}
+
+.detail-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 20rpx;
+}
+
+.detail-header, .detail-item {
+  display: flex;
+  align-items: center;
+  padding: 20rpx 0;
+  border-bottom: 1px solid #f5f5f5;
+}
+
+.detail-header {
+  font-weight: bold;
+  color: #666;
+}
+
+.detail-item:last-child {
+  border-bottom: none;
+}
+
+.detail-col {
+  font-size: 28rpx;
+  text-align: center;
+}
+
+.name-col {
+  flex: 3;
+  text-align: left;
+}
+
+.price-col, .time-col {
+  flex: 2;
+}
+
+.status-col {
+  flex: 2;
+  color: #f53f3f;
+}
+
+.empty-state {
+  padding: 60rpx 0;
+  text-align: center;
+  color: #999;
+  font-size: 28rpx;
+}
+
+.popup-footer {
+  padding: 30rpx;
+  border-top: 1px solid #f5f5f5;
+}
+
+.close-btn {
+  width: 100%;
+  height: 80rpx;
+  line-height: 80rpx;
+  background-color: #007aff;
+  color: #fff;
+  font-size: 32rpx;
+  border-radius: 8rpx;
+}
+</style>

+ 162 - 100
pages/index/index.vue

@@ -26,7 +26,7 @@
           <view class="userinfo">
             <view class="date">{{ dateStr }}</view>
             <view class="username">
-              {{ userData.userName }}
+              {{ userData?.userName }}
               <span class="but-span">
                 <view class="userout" @tap="userOutFun">退出登录</view>
                 <view class="changeloc" @tap="changeloc">切换科室</view>
@@ -38,19 +38,24 @@
       </view>
 
       <view class="wardtitle">
-        <text style="padding-left: 3px">在院患者 ({{ userData.locDesc }})</text>
+        <!-- <text style="padding-left: 3px">在院患者 ({{ userData.locDesc }})</text> -->
+		 <view @click="togglePatientType">
+		      <text style="padding-left: 3px">{{ currentType }}</text>
+		      <text class="refresh-icon"> ↺切换</text>
+		</view>
       </view>
       <view class="patcontent">
+		  
+		<!-- 在院患者列表 -->
         <view 
+		  v-if="+currentTypeIndex === 0"
           class="patlist" 
           @tap="gotoPatMainPage(item)" 
           v-for="(item, index) in wardPatList" 
-          :key="index"
-        >
+          :key="index">
           <van-cell
             :icon="item.patSexCode === '1' ? `${imgDomain}/images/icon/gender-male.png` : `${imgDomain}/images/icon/gender-female.png`"
-            use-label-slot
-          >
+            use-label-slot>
             <van-row slot="title" class="topinfo">
               <van-col span="4">{{ item.admBedCode }}</van-col>
               <van-col span="15">
@@ -79,6 +84,36 @@
             </van-row>
           </van-cell>
         </view>
+		
+		<!-- 今日门诊手术患者列表 -->
+		<view
+		  v-if="+currentTypeIndex === 1"
+		  class="patlist" 
+		  @tap="openPatOperaModal(item)" 
+		  v-for="(item, index) in wardPatList" 
+		  :key="index">
+		  <van-cell
+		    :icon="item.patSexCode === '1' ? `${imgDomain}/images/icon/gender-male.png` : `${imgDomain}/images/icon/gender-female.png`"
+		    use-label-slot>
+		    <van-row slot="title" class="topinfo">
+		      <van-col span="20">{{ item.admLocDesc+ ' - ' + item.patName}}</van-col>
+		      <van-col span="4">
+		        <view class="paticon">
+		          <view
+		            :style="`width:18px;height:18px;background:url(${imgDomain}/images/mobilenurse/bedicon.png);background-position: ${getposition(iconitem)}`"
+		            v-for="(iconitem, iconindex) in item.admIcon"
+		            :key="iconindex"
+		          ></view>
+		        </view>
+		      </van-col>
+		    </van-row>
+		    <van-row slot="label" class="bottominfo">
+		      <van-col span="19">就诊时间: {{ item.admDatetime }}</van-col>
+		      <van-col span="5"></van-col>
+		    </van-row>
+		  </van-cell>
+		</view>
+		
       </view>
     </view>
     <van-action-sheet 
@@ -100,6 +135,14 @@
         :key="index"
       ></van-cell>
     </van-action-sheet>
+	
+	<!-- 引入弹框组件 -->
+	    <PaymentDetailPopup 
+	      :show="showPopup"
+	      :patientInfo="patientInfo"
+	      :paymentDetails="paymentDetails"
+	      @close="showPopup = false"
+	    />
   </view>
 </template>
 
@@ -112,25 +155,26 @@ import Util from '../../utils/util.js';
 import Common from '../../utils/common.js';
 import { $http } from '../../config/https';
 import navBar from '@/pages/components/navbar/index';
-
-// 工具函数(替代原wxs模块)
-const getspan = (widh) => {
-  return widh.replace("px", "");
-};
-
-const findPat = (patinfo, searchData) => {
-  if (!searchData) return 1;
-  const searchStr = searchData.toUpperCase();
-  return (
-    patinfo.patName.includes(searchData) ||
-    patinfo.admBedCode.includes(searchData) ||
-    patinfo.patID.includes(searchData) ||
-    patinfo.patNameSpell.includes(searchStr) ||
-    patinfo.patNo.includes(searchStr) ||
-    patinfo.patMedicalNo.includes(searchStr) ||
-    patinfo.admID === searchData
-  ) ? 1 : 0;
-};
+import PaymentDetailPopup from '@/pages/components/PaymentDetailPopup.vue'
+
+// // 工具函数(替代原wxs模块)
+// const getspan = (widh) => {
+//   return widh.replace("px", "");
+// };
+
+// const findPat = (patinfo, searchData) => {
+//   if (!searchData) return 1;
+//   const searchStr = searchData.toUpperCase();
+//   return (
+//     patinfo.patName.includes(searchData) ||
+//     patinfo.admBedCode.includes(searchData) ||
+//     patinfo.patID.includes(searchData) ||
+//     patinfo.patNameSpell.includes(searchStr) ||
+//     patinfo.patNo.includes(searchStr) ||
+//     patinfo.patMedicalNo.includes(searchStr) ||
+//     patinfo.admID === searchData
+//   ) ? 1 : 0;
+// };
 
 const getposition = (iconitem) => {
   return `-${(iconitem.position % 10 - 1) * 18}px -${Math.floor(iconitem.position / 10) * 18}px`;
@@ -149,13 +193,6 @@ const navbarData = ref({
 
 const userData = ref(uni.getStorageSync('userData') || {});
 const patInfo = ref(uni.getStorageSync('patInfo') || {});
-const patColums = ref([]);
-const templateList = ref([{
-  icon: `${httpconfig.imgDomain}/images/icon/mine-address.png`,
-  title: '巡视单',
-  value: '',
-  url: ''
-}]);
 const timer = ref(null);
 const dateStr = ref('2020年11月15日 14:25 星期三');
 const searchData = ref('');
@@ -168,6 +205,30 @@ const curLoc = ref(-1);
 const wardPatList = ref('');
 const percent = ref(0);
 const downLineShow = ref(true);
+// 控制弹框显示/隐藏
+const showPopup = ref(false);
+// 患者信息(响应式对象)
+const patientInfo = ref({name: '',department: '',doctor: '',time: ''});
+// 缴费明细数组(响应式数组)
+const paymentDetails = ref([]);
+
+// 定义患者类型选项
+const patientTypes = [
+  { key: 'inpatient', label: `在院患者 (${userData.value.locDesc})` },
+  { key: 'outpatient', label: '今日门诊手术患者' }
+];
+// 当前选中的类型
+const currentTypeIndex = ref(0);
+// 切换患者类型
+const togglePatientType = () => {
+  currentTypeIndex.value = (currentTypeIndex.value + 1) % patientTypes.length;
+  wardPatList.value = '';
+  getAuthorityApply();
+};
+// 当前显示的类型文本
+const currentType = computed(() => {
+  return patientTypes[currentTypeIndex.value].label;
+});
 
 onShow(() => {
   try {
@@ -180,6 +241,9 @@ onShow(() => {
         uni.$appGlobal.globalData.value.currentRoute = currentRoute
       }
     }
+	
+	getAuthorityApply();
+	getAppVersion();
   } catch (err) {
     console.error('更新当前路由失败:', err)
   }
@@ -200,9 +264,6 @@ onMounted(() => {
   }
   
   getAuthorityApply();
-  if (patColums.value.length === 0) {
-    getPatInfoColumns();
-  }
   showTime();
   getAppVersion();
 });
@@ -292,34 +353,6 @@ const downAppApk = (setValue) => {
   });
 };
 
-const gotoPatMainPage = (patInfoData) => {
-  Util.getPatInfo(patInfoData.admID, () => {
-    uni.navigateTo({ url: '../patMainPage/patMainPage' });
-  });
-};
-
-const gotoPage = (e) => {
-  const flag = e.currentTarget.dataset.flag;
-  if (flag === 'Pat') {
-    uni.navigateTo({ url: '../wardPatList/wardPatList' });
-  } else if (flag === 'template') {
-    const patInfo = uni.getStorageSync('patInfo');
-    if (!patInfo) {
-      uni.showModal({
-        title: '提示',
-        content: '无患者信息,请先扫描患者腕带或选择患者!!!',
-        showCancel: false,
-        confirmText: '知道了'
-      });
-      return;
-    }
-    const itemdata = e.currentTarget.dataset.itemdata;
-    uni.navigateTo({
-      url: `../nurseRecordList/nurseRecordList?templateID=${itemdata.id}&title=${itemdata.IEMRTemplateDesc}列表`
-    });
-  }
-};
-
 const scan = () => {
   uni.scanCode({
     success: (res) => {
@@ -348,11 +381,16 @@ const getPatInfo = (admID) => {
   });
 };
 
+//获取列表数据前校验是否处于登录状态
 const getAuthorityApply = () => {
   const storedUserData = uni.getStorageSync('userData');
   if (storedUserData) {
     userData.value = storedUserData;
-    getWardPatList();
+	if(+currentTypeIndex.value === 1){
+		getMZOperaPatList();
+	}else{
+		getWardPatList();
+	}
   } else {
     gotoAuthority();
   }
@@ -362,64 +400,82 @@ const gotoAuthority = () => {
   uni.reLaunch({ url: '../authentication/authentication' });
 };
 
-const getPatInfoColumns = () => {
-  const data = {
-    params: [{ compontName: 'MobileNursePatInfo', type: 'C', reactCode: [] }]
-  };
+//获取住院病区患者列表数据
+const getWardPatList = () => {
+  const userData = uni.getStorageSync('userData');
+  uni.showLoading({ title: '数据加载中...' });
   
   $http.post('urlDeault',this, {
-    code: '01040073',
-    data,
+    code: '04020025',
+    data: {
+      params: [{ wardID: userData.locID, patMessage: searchData.value || '' }]
+    },
     success: (res) => {
+      uni.hideLoading();
       if (+res.errorCode === 0) {
-        if (res.result.C) {
-          patColums.value = res.result.C;
-        } else {
-          uni.showToast({ title: '未获取到病人信息维护,请联系信息中心', icon: 'none' });
-        }
-      } else {
-        uni.showToast({ title: res.errorMessage, icon: 'none' });
+        wardPatList.value = res.result.patList;
+        showchangeLoc.value = false;
+      } else if (['01040053', '01040054', '01040055'].includes(res.errorCode)) {
+        getWardPatList();
       }
     }
   });
 };
 
-const getTemplateList = () => {
-  const patInfo = uni.getStorageSync('patInfo');
+//获取今日门诊手术患者列表数据
+const getMZOperaPatList = () => {
   const userData = uni.getStorageSync('userData');
-  const data = {
-    params: [{
-      hospID: userData.hospID,
-      admID: patInfo.admInfo ? patInfo.admInfo.admID : '',
-      useFlag: 'N'
-    }]
-  };
-  
+  uni.showLoading({ title: '数据加载中...' });
   $http.post('urlDeault',this, {
-    code: '10020001',
-    data,
+    code: '04020033',
+    data: {
+      params: [{ patMessage: searchData.value || '' }]
+    },
     success: (res) => {
-      templateList.value = res.result.TemplateList;
+      uni.hideLoading();
+      if (+res.errorCode === 0) {
+        wardPatList.value = res.result.patList;
+      } else {
+         uni.showToast({ title: res.errorMessage, icon: 'none' });
+      }
     }
   });
 };
 
-const getWardPatList = () => {
-  const userData = uni.getStorageSync('userData');
+//住院患者前往患者主页
+const gotoPatMainPage = (patInfoData) => {
+  Util.getPatInfo(patInfoData.admID, () => {
+    uni.navigateTo({ url: '../patMainPage/patMainPage' });
+  });
+};
+
+//门诊患者打开缴费弹框
+const openPatOperaModal = (patInfoData) => {
+	patientInfo.value = {
+		name: patInfoData.patName,
+		department: patInfoData.admLocDesc,
+		doctor: patInfoData.admDocDesc,
+		time: patInfoData.admDatetime,
+	};
+	//获取门诊手术患者详情数据
+	getMZOperaPatDetail(patInfoData.admID);
+};
+
+//门诊手术患者详情数据
+const getMZOperaPatDetail = (admID) => {
   uni.showLoading({ title: '数据加载中...' });
-  
   $http.post('urlDeault',this, {
-    code: '04020025',
+    code: '04020034',
     data: {
-      params: [{ wardID: userData.locID, patMessage: searchData.value || '' }]
+      params: [{ admID: admID }]
     },
     success: (res) => {
       uni.hideLoading();
       if (+res.errorCode === 0) {
-        wardPatList.value = res.result.patList;
-        showchangeLoc.value = false;
-      } else if (['01040053', '01040054', '01040055'].includes(res.errorCode)) {
-        getWardPatList();
+		paymentDetails.value = res.result;
+        showPopup.value = true;
+      } else {
+         uni.showToast({ title: res.errorMessage, icon: 'none' });
       }
     }
   });
@@ -656,7 +712,12 @@ const changeToLoc = (loc) => {
     line-height: 42rpx;
     margin-bottom: 10rpx;
 }
-
+.refresh-icon {
+  font-size: 14px;
+  margin-left: 8px;
+  color: #007aff;
+  transition: transform 0.5s ease;
+}
 .username {
     font-size: 14px;
     font-weight: 400;
@@ -758,6 +819,7 @@ const changeToLoc = (loc) => {
 .paticon {
     display: flex;
     flex-direction: row;
+	padding: 0rpx !important;
 }
 .bottominfo {
     font-weight: 400;

+ 4 - 1
pages/patMainPage/patMainPage.vue

@@ -93,7 +93,7 @@
 						</view>
 					</view>
 					<view v-if="nurserecordflag" class="morenurserecord" :style="{ height: screenHeight-330 + 'px' }">
-						<van-row>
+						<van-row class="morenurserecord_row">
 							<van-col
 								span="8"
 								:data-itemdata="item"
@@ -494,6 +494,9 @@ defineExpose({
     font-weight: 400;
     color: #333333;
 }
+.morenurserecord_row{
+	width: 100%;
+}
 .toptitle {
     height: 46rpx;
     margin-bottom: 24rpx;