|
|
@@ -21,6 +21,13 @@
|
|
|
<text class="info-gender">{{ patient.gender }} · {{ patient.admAge }} · {{ patient.patExtNo }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view
|
|
|
+ class="end-visit-btn"
|
|
|
+ :class="{ 'end-visit-btn-disabled': visitStatusCode === 'F' || endVisitSubmitting }"
|
|
|
+ @tap="endVisit"
|
|
|
+ >
|
|
|
+ <text class="end-visit-text">结束就诊</text>
|
|
|
+ </view>
|
|
|
<view class="collapse-btn" @tap="toggleExpand">
|
|
|
<text class="collapse-text">{{ expanded ? '收起' : '展开' }}</text>
|
|
|
<text class="collapse-arrow" :class="{ 'collapse-arrow-up': expanded }">▾</text>
|
|
|
@@ -311,12 +318,15 @@
|
|
|
<script>
|
|
|
import { $http } from '../../../config/https.js';
|
|
|
import httpConfig from '../../../config/httpConfig.js';
|
|
|
+import Cache from '../../../utils/cache.js';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
expanded: false,
|
|
|
loading: false,
|
|
|
+ visitStatusCode: '',
|
|
|
+ endVisitSubmitting: false,
|
|
|
currentTab: 'timeline',
|
|
|
tabs: [
|
|
|
{ code: 'timeline', label: '历程时间线' },
|
|
|
@@ -386,6 +396,50 @@ export default {
|
|
|
toggleExpand() {
|
|
|
this.expanded = !this.expanded;
|
|
|
},
|
|
|
+ endVisit() {
|
|
|
+ if (this.visitStatusCode === 'F' || this.endVisitSubmitting) return;
|
|
|
+
|
|
|
+ const that = this;
|
|
|
+ const userData = Cache.get('userData') || {};
|
|
|
+ uni.showModal({
|
|
|
+ title: '\u786e\u8ba4\u7ed3\u675f\u5c31\u8bca',
|
|
|
+ content: '\u7ed3\u675f\u540e\u60a3\u8005\u5c06\u65e0\u6cd5\u7ee7\u7eed\u54a8\u8be2\uff0c\u786e\u8ba4\u7ed3\u675f\u5c31\u8bca\uff1f',
|
|
|
+ confirmText: '\u7ed3\u675f\u5c31\u8bca',
|
|
|
+ confirmColor: '#f56c6c',
|
|
|
+ success(e) {
|
|
|
+ if (!e.confirm || that.endVisitSubmitting) return;
|
|
|
+
|
|
|
+ that.endVisitSubmitting = true;
|
|
|
+ $http.post('urlDeault', that, {
|
|
|
+ code: '03100061',
|
|
|
+ data: {
|
|
|
+ params: [
|
|
|
+ {
|
|
|
+ admID: that.admID,
|
|
|
+ userID: userData.userID,
|
|
|
+ hospID: userData.hospID,
|
|
|
+ locID: userData.locID
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ success(res) {
|
|
|
+ if (res.errorCode !== '0') return;
|
|
|
+
|
|
|
+ that.visitStatusCode = 'F';
|
|
|
+ that.summary = Object.assign({}, that.summary || {}, {
|
|
|
+ statusCode: 'F',
|
|
|
+ queueStatus: '\u5df2\u5b8c\u6210'
|
|
|
+ });
|
|
|
+ uni.showToast({ title: '\u5df2\u7ed3\u675f\u5c31\u8bca', icon: 'success' });
|
|
|
+ that.loadPatientHistory();
|
|
|
+ },
|
|
|
+ complete() {
|
|
|
+ that.endVisitSubmitting = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
switchTab(code) {
|
|
|
this.currentTab = code;
|
|
|
},
|
|
|
@@ -600,6 +654,7 @@ export default {
|
|
|
const result = res.result || {};
|
|
|
const info = result.info || {};
|
|
|
const messageResult = result.messageResult || {};
|
|
|
+ that.visitStatusCode = (result.messageSummary || {}).statusCode || '';
|
|
|
|
|
|
// 用接口返回覆盖患者信息(字段按 12100048 实际返回映射)
|
|
|
that.patient = Object.assign({}, that.patient, {
|
|
|
@@ -797,6 +852,7 @@ export default {
|
|
|
|
|
|
.info-base {
|
|
|
flex: 1;
|
|
|
+ min-width: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
@@ -805,6 +861,7 @@ export default {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: baseline;
|
|
|
+ flex-wrap: wrap;
|
|
|
}
|
|
|
|
|
|
.info-name {
|
|
|
@@ -825,7 +882,33 @@ export default {
|
|
|
margin-top: 6rpx;
|
|
|
}
|
|
|
|
|
|
+.end-visit-btn {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ min-width: 112rpx;
|
|
|
+ height: 52rpx;
|
|
|
+ margin-right: 18rpx;
|
|
|
+ padding: 0 14rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ background: #f56c6c;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.end-visit-text {
|
|
|
+ font-size: 22rpx;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 1;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.end-visit-btn-disabled {
|
|
|
+ background: #c8cdd5;
|
|
|
+}
|
|
|
+
|
|
|
.collapse-btn {
|
|
|
+ flex: 0 0 auto;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|