|
|
@@ -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;
|