|
@@ -0,0 +1,454 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="transferWorkOrder">
|
|
3
|
+ <!-- <mSearch class="search" :mode="2" button="inside" placeholder="请搜索患者名称、住院号" @search="doSearch()" v-model="keyword" searchButtonType="icon" searchButtonName="newicon-saoma"></mSearch> -->
|
|
4
|
+ <scroll-view scroll-y class="list">
|
|
5
|
+ <view class="item tac"><text class="green">患者回科清单</text></view>
|
|
6
|
+ <view class="item" v-for="(item, index) in listComputed" :key="item.id" @click="selectItem(item)">
|
|
7
|
+ <view>{{item.patientName}}({{item.bedNum}})-{{item.patientCode}}</view>
|
|
8
|
+ <text class="right-icon newicon newicon-lajitong" @click="deleteIt(item, index)"></text>
|
|
9
|
+ </view>
|
|
10
|
+ </scroll-view >
|
|
11
|
+ <view class="footer">
|
|
12
|
+ <template v-if="list.length">
|
|
13
|
+ <view class="primaryButton btn gray" hover-class="seimin-btn-hover" @click="tagClick()" v-if="!config.batchPatientCheckType">确认回科</view>
|
|
14
|
+ <template v-if="config.batchPatientCheckType == 1 || config.batchPatientCheckType == 2">
|
|
15
|
+ <view class="primaryButton btn gray" hover-class="seimin-btn-hover" @click="scanCode()">扫一扫</view>
|
|
16
|
+ <view class="primaryButton btn gray" hover-class="seimin-btn-hover" @click="fillInManually(2)" v-if="isNumberKey && config.batchPatientDynamicKey == 1">动态密钥</view>
|
|
17
|
+ </template>
|
|
18
|
+ <view class="primaryButton btn gray" hover-class="seimin-btn-hover" @click="fillInManually(1)" v-if="config.batchPatientCheckType == 3">工号确认</view>
|
|
19
|
+ </template>
|
|
20
|
+ <view class="btn gray" hover-class="seimin-btn-hover" @click="goBack()">返回</view>
|
|
21
|
+ </view>
|
|
22
|
+ <!-- 弹窗 -->
|
|
23
|
+ <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content" :operate="models.operate" @ok="ok" @cancel="cancel"></showModel>
|
|
24
|
+ <!-- 弹窗 -->
|
|
25
|
+ <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content" :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
|
|
26
|
+
|
|
27
|
+ <!-- 动态密钥 -->
|
|
28
|
+ <numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
|
|
29
|
+
|
|
30
|
+ <!-- 填写交接人工号弹窗 -->
|
|
31
|
+ <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk" @cancel="hosCancel"></selectAccount>
|
|
32
|
+ </view>
|
|
33
|
+</template>
|
|
34
|
+
|
|
35
|
+<script>
|
|
36
|
+ import { get, post, SM, webHandle } from "../../http/http.js";
|
|
37
|
+ import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
|
|
38
|
+ import numberKeyModel from "@/components/numberKeyModel/numberKeyModel.vue";
|
|
39
|
+ export default {
|
|
40
|
+ onShow() {
|
|
41
|
+ this.SMFlag = true;
|
|
42
|
+ },
|
|
43
|
+ onLoad(options) {
|
|
44
|
+ console.log('options', options);
|
|
45
|
+ this.options = options || {};
|
|
46
|
+ this.deptId = +options.deptId;
|
|
47
|
+ this.list = JSON.parse(options.patientList);
|
|
48
|
+ console.log(this.list);
|
|
49
|
+ this.getConfig();
|
|
50
|
+ this.getConfig1();
|
|
51
|
+ },
|
|
52
|
+ components: {
|
|
53
|
+ //引用mSearch组件,如不需要删除即可
|
|
54
|
+ mSearch,
|
|
55
|
+ numberKeyModel,
|
|
56
|
+ },
|
|
57
|
+ data() {
|
|
58
|
+ return {
|
|
59
|
+ // 填写交接人工号弹窗model
|
|
60
|
+ hosModels: {
|
|
61
|
+ disjunctor: false,
|
|
62
|
+ },
|
|
63
|
+ showKey:false,
|
|
64
|
+ keyNum:4, //密钥位数
|
|
65
|
+ isNumberKey:false, //是否开启动态密钥
|
|
66
|
+ keyArr: [],
|
|
67
|
+ SMFlag: true,
|
|
68
|
+ keyword: '',
|
|
69
|
+ hosId: uni.getStorageSync('userData').user.currentHospital.id,
|
|
70
|
+ list: [],
|
|
71
|
+ patientInspectLogDTOIndex: undefined,
|
|
72
|
+ deptId: undefined,
|
|
73
|
+ options: {},
|
|
74
|
+ config: {},
|
|
75
|
+ // 弹窗model
|
|
76
|
+ models: {
|
|
77
|
+ disjunctor: false,
|
|
78
|
+ },
|
|
79
|
+ // 弹窗model1
|
|
80
|
+ models1: {
|
|
81
|
+ disjunctor: false,
|
|
82
|
+ },
|
|
83
|
+ };
|
|
84
|
+ },
|
|
85
|
+ computed: {
|
|
86
|
+ listComputed() {
|
|
87
|
+ if(this.keyword){
|
|
88
|
+ return this.list.filter( v => v.patientName.includes(this.keyword) || v.residenceNo.includes(this.keyword))
|
|
89
|
+ }else{
|
|
90
|
+ return this.list;
|
|
91
|
+ }
|
|
92
|
+ }
|
|
93
|
+ },
|
|
94
|
+ methods:{
|
|
95
|
+ // 获取配置
|
|
96
|
+ getConfig() {
|
|
97
|
+ let postData = {
|
|
98
|
+ idx: 0,
|
|
99
|
+ sum: 9999,
|
|
100
|
+ hospitalConfig:{
|
|
101
|
+ hosId:this.hosId,
|
|
102
|
+ model:"all"
|
|
103
|
+ }
|
|
104
|
+ };
|
|
105
|
+
|
|
106
|
+ post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
|
|
107
|
+ if (result.status == 200) {
|
|
108
|
+ this.keyArr = []
|
|
109
|
+ for(let i of result.list){
|
|
110
|
+ if(i.key=='digitalSecretKey'){
|
|
111
|
+ if(i.value==1){
|
|
112
|
+ this.isNumberKey = true
|
|
113
|
+ }else{
|
|
114
|
+ this.isNumberKey = false
|
|
115
|
+ }
|
|
116
|
+ }else if(i.key=='numberDigitalSecretKey'){
|
|
117
|
+ this.keyNum = Number(i.value)
|
|
118
|
+ }
|
|
119
|
+ }
|
|
120
|
+ for(let i = 0; i < this.keyNum; i++){
|
|
121
|
+ this.keyArr.push({
|
|
122
|
+ value:null
|
|
123
|
+ })
|
|
124
|
+ }
|
|
125
|
+ console.log(444,this.keyArr)
|
|
126
|
+ }
|
|
127
|
+ });
|
|
128
|
+ },
|
|
129
|
+ confirmKey(data){
|
|
130
|
+ this.padChange(data)
|
|
131
|
+ this.showKey = false
|
|
132
|
+ },
|
|
133
|
+ isShowKey(){
|
|
134
|
+ this.showKey = true
|
|
135
|
+ },
|
|
136
|
+ padChange(scannerCode){
|
|
137
|
+ if(!this.isNumberKey){
|
|
138
|
+ scannerCode = scannerCode.replace('\n','')
|
|
139
|
+ }
|
|
140
|
+ this.bigScan(scannerCode);
|
|
141
|
+ },
|
|
142
|
+ // 手动填写
|
|
143
|
+ fillInManually(value){
|
|
144
|
+ if(value == 1){
|
|
145
|
+ // 填写工号
|
|
146
|
+ this.showSelectAccount();
|
|
147
|
+ }else if(value == 2){
|
|
148
|
+ // 动态密钥
|
|
149
|
+ this.isShowKey();
|
|
150
|
+ }
|
|
151
|
+ },
|
|
152
|
+ // 填写交接人工号-确认
|
|
153
|
+ hosOk(data) {
|
|
154
|
+ console.log(data);
|
|
155
|
+ const {
|
|
156
|
+ accountName,
|
|
157
|
+ account,
|
|
158
|
+ accountId
|
|
159
|
+ } = data;
|
|
160
|
+ if (!accountName && !account) {
|
|
161
|
+ //没有填写交接人
|
|
162
|
+ uni.showModal({
|
|
163
|
+ title: "提示",
|
|
164
|
+ content: "请填写交接人工号!",
|
|
165
|
+ showCancel: false,
|
|
166
|
+ success: function(res) {
|
|
167
|
+ if (res.confirm) {
|
|
168
|
+ console.log("用户点击确定");
|
|
169
|
+ } else if (res.cancel) {
|
|
170
|
+ console.log("用户点击取消");
|
|
171
|
+ }
|
|
172
|
+ },
|
|
173
|
+ });
|
|
174
|
+ return;
|
|
175
|
+ } else if ((!accountName && account) || (accountName && !account)) {
|
|
176
|
+ //没有填写交接人
|
|
177
|
+ uni.showModal({
|
|
178
|
+ title: "提示",
|
|
179
|
+ content: "请填写正确的交接人工号!",
|
|
180
|
+ showCancel: false,
|
|
181
|
+ success: function(res) {
|
|
182
|
+ if (res.confirm) {
|
|
183
|
+ console.log("用户点击确定");
|
|
184
|
+ } else if (res.cancel) {
|
|
185
|
+ console.log("用户点击取消");
|
|
186
|
+ }
|
|
187
|
+ },
|
|
188
|
+ });
|
|
189
|
+ return;
|
|
190
|
+ }
|
|
191
|
+ this.hosModels.disjunctor = false;
|
|
192
|
+ this.validateAccount(data);
|
|
193
|
+ },
|
|
194
|
+ // 填写交接人工号-取消
|
|
195
|
+ hosCancel() {
|
|
196
|
+ this.hosModels.disjunctor = false;
|
|
197
|
+ this.flag = true;
|
|
198
|
+ },
|
|
199
|
+ // 填写交接人工号弹窗
|
|
200
|
+ showSelectAccount() {
|
|
201
|
+ this.hosModels = {
|
|
202
|
+ disjunctor: true,
|
|
203
|
+ };
|
|
204
|
+ },
|
|
205
|
+ // 手动填写工号校验
|
|
206
|
+ validateAccount(accountObj){
|
|
207
|
+ const { accountName, account, accountId } = accountObj;
|
|
208
|
+ this.tagClick(accountId);
|
|
209
|
+ },
|
|
210
|
+ // 扫一扫交接
|
|
211
|
+ scanCode(){
|
|
212
|
+ if (!this.SMFlag) {
|
|
213
|
+ return;
|
|
214
|
+ }
|
|
215
|
+ this.SMFlag = false;
|
|
216
|
+ SM().then((content) => {
|
|
217
|
+ uni.showLoading({
|
|
218
|
+ title: "加载中",
|
|
219
|
+ mask: true,
|
|
220
|
+ });
|
|
221
|
+
|
|
222
|
+ this.bigScan(content);
|
|
223
|
+ }).catch(err => {
|
|
224
|
+ this.SMFlag = true;
|
|
225
|
+ });
|
|
226
|
+ },
|
|
227
|
+ // 扫码
|
|
228
|
+ bigScan(content){
|
|
229
|
+ let postData = {
|
|
230
|
+ type: 'patientDept', //根据患者所在科室,对比扫码科室校验
|
|
231
|
+ deptId: this.deptId,
|
|
232
|
+ scanCode: content,
|
|
233
|
+ }
|
|
234
|
+
|
|
235
|
+ post("/workerOrder/scanCheck", postData)
|
|
236
|
+ .then((res) => {
|
|
237
|
+ this.SMFlag = true;
|
|
238
|
+ uni.hideLoading();
|
|
239
|
+ if (res.state == 200) {
|
|
240
|
+ this.tagClick();
|
|
241
|
+ } else {
|
|
242
|
+ uni.showToast({
|
|
243
|
+ icon: "none",
|
|
244
|
+ title: res.msg || "接口获取数据失败!",
|
|
245
|
+ });
|
|
246
|
+ }
|
|
247
|
+ });
|
|
248
|
+ },
|
|
249
|
+ // 标记回科
|
|
250
|
+ tagClick(handover){
|
|
251
|
+ this.handover = handover;
|
|
252
|
+ this.models1 = {
|
|
253
|
+ disjunctor: true,
|
|
254
|
+ title: "提示",
|
|
255
|
+ content: `是否确定批量回科?`,
|
|
256
|
+ icon: "warn",
|
|
257
|
+ operate: {
|
|
258
|
+ ok: "确定",
|
|
259
|
+ cancel: "取消",
|
|
260
|
+ },
|
|
261
|
+ };
|
|
262
|
+ },
|
|
263
|
+ //确定
|
|
264
|
+ ok1() {
|
|
265
|
+ this.models1.disjunctor = false;
|
|
266
|
+ uni.showLoading({
|
|
267
|
+ title: "加载中",
|
|
268
|
+ mask: true,
|
|
269
|
+ });
|
|
270
|
+ post("/nurse/patientInspect/setPatientInspectBackDept", {
|
|
271
|
+ pilIds: this.list.map(v => v.id).toString(),
|
|
272
|
+ handover: this.handover,
|
|
273
|
+ }).then((res) => {
|
|
274
|
+ uni.hideLoading();
|
|
275
|
+ if (res.state == 200) {
|
|
276
|
+ uni.showToast({
|
|
277
|
+ icon: "none",
|
|
278
|
+ mask: true,
|
|
279
|
+ title: "操作成功!",
|
|
280
|
+ });
|
|
281
|
+ setTimeout(() => {
|
|
282
|
+ uni.navigateTo({
|
|
283
|
+ url: `/pages/patientInspectLog/patientInspectLogList`,
|
|
284
|
+ });
|
|
285
|
+ },300)
|
|
286
|
+ } else {
|
|
287
|
+ uni.showToast({
|
|
288
|
+ icon: 'none',
|
|
289
|
+ title: res.msg || '请求数据失败!'
|
|
290
|
+ });
|
|
291
|
+ }
|
|
292
|
+ })
|
|
293
|
+ },
|
|
294
|
+ //取消
|
|
295
|
+ cancel1() {
|
|
296
|
+ this.models1.disjunctor = false;
|
|
297
|
+ },
|
|
298
|
+ // 返回
|
|
299
|
+ goBack() {
|
|
300
|
+ uni.navigateBack();
|
|
301
|
+ },
|
|
302
|
+ getConfig1(){
|
|
303
|
+ uni.showLoading({
|
|
304
|
+ mask: true,
|
|
305
|
+ title: '加载中'
|
|
306
|
+ })
|
|
307
|
+ const postData = {
|
|
308
|
+ "idx":0,
|
|
309
|
+ "sum":1,
|
|
310
|
+ "taskTypeConfig":{
|
|
311
|
+ "taskTypeDTO":{
|
|
312
|
+ "hosId": {"id": this.hosId},
|
|
313
|
+ "associationType": {
|
|
314
|
+ "key": "association_types",
|
|
315
|
+ "value":"inspect",
|
|
316
|
+ },
|
|
317
|
+ },
|
|
318
|
+ },
|
|
319
|
+ };
|
|
320
|
+ post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
|
|
321
|
+ uni.hideLoading();
|
|
322
|
+ if (res.status == 200) {
|
|
323
|
+ let list = res.list || [];
|
|
324
|
+ if(list.length){
|
|
325
|
+ this.config = res.list[0];
|
|
326
|
+ }else{
|
|
327
|
+ this.config = {};
|
|
328
|
+ }
|
|
329
|
+ } else {
|
|
330
|
+ uni.hideLoading();
|
|
331
|
+ uni.showToast({
|
|
332
|
+ icon: "none",
|
|
333
|
+ title: res.msg || "接口获取数据失败!",
|
|
334
|
+ });
|
|
335
|
+ }
|
|
336
|
+ })
|
|
337
|
+ },
|
|
338
|
+ // 移除
|
|
339
|
+ deleteIt(patientInspectLogDTO, index){
|
|
340
|
+ this.patientInspectLogDTOIndex = index;
|
|
341
|
+ this.models = {
|
|
342
|
+ disjunctor: true,
|
|
343
|
+ content: `您确认将<b style='color:red'>${patientInspectLogDTO.patientName}</b>移除吗?`,
|
|
344
|
+ icon: "warn",
|
|
345
|
+ operate: {
|
|
346
|
+ ok: "确定",
|
|
347
|
+ cancel: "取消",
|
|
348
|
+ },
|
|
349
|
+ };
|
|
350
|
+ },
|
|
351
|
+ // 确定
|
|
352
|
+ ok() {
|
|
353
|
+ this.models.disjunctor = false;
|
|
354
|
+ this.list.splice(this.patientInspectLogDTOIndex, 1);
|
|
355
|
+ },
|
|
356
|
+ // 取消
|
|
357
|
+ cancel() {
|
|
358
|
+ this.models.disjunctor = false;
|
|
359
|
+ },
|
|
360
|
+ doSearch(){
|
|
361
|
+ // 扫码
|
|
362
|
+ if (!this.SMFlag) {
|
|
363
|
+ return;
|
|
364
|
+ }
|
|
365
|
+ this.SMFlag = false;
|
|
366
|
+ SM().then((content) => {
|
|
367
|
+ this.keyword = content;
|
|
368
|
+ }).catch(err => {
|
|
369
|
+ this.SMFlag = true;
|
|
370
|
+ });
|
|
371
|
+ },
|
|
372
|
+ toTransferWorkOrderUser() {
|
|
373
|
+ uni.redirectTo({
|
|
374
|
+ url: `/pages/transferWorkOrder/transferWorkOrderUser`,
|
|
375
|
+ });
|
|
376
|
+ },
|
|
377
|
+ selectItem(patient){
|
|
378
|
+ this.list.forEach(v => {
|
|
379
|
+ if(v.id === patient.id){
|
|
380
|
+ v.checked ? this.$set(v, 'checked', false) : this.$set(v, 'checked', true)
|
|
381
|
+ }
|
|
382
|
+ })
|
|
383
|
+ },
|
|
384
|
+ }
|
|
385
|
+ }
|
|
386
|
+</script>
|
|
387
|
+
|
|
388
|
+<style lang="less" scoped>
|
|
389
|
+.right-icon{
|
|
390
|
+ color: #888;
|
|
391
|
+ font-size: 44rpx;
|
|
392
|
+}
|
|
393
|
+.transferWorkOrder{
|
|
394
|
+ width: 100%;
|
|
395
|
+ height: 100vh;
|
|
396
|
+ display: flex;
|
|
397
|
+ flex-direction: column;
|
|
398
|
+ /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover{
|
|
399
|
+ border-color: #49B856!important;
|
|
400
|
+ }
|
|
401
|
+ .green{
|
|
402
|
+ color: #49B856;
|
|
403
|
+ font-size: 36rpx;
|
|
404
|
+ font-weight: bold;
|
|
405
|
+ }
|
|
406
|
+ .search{
|
|
407
|
+ padding: 10rpx 24rpx;
|
|
408
|
+ }
|
|
409
|
+ .list{
|
|
410
|
+ flex: 1;
|
|
411
|
+ min-height: 0;
|
|
412
|
+ background-color: #fff;
|
|
413
|
+ .item{
|
|
414
|
+ height: 100rpx;
|
|
415
|
+ line-height: 100rpx;
|
|
416
|
+ font-size: 28rpx;
|
|
417
|
+ border-bottom: 1rpx solid #D5D5D5;
|
|
418
|
+ padding: 0 32rpx;
|
|
419
|
+ display: flex;
|
|
420
|
+ align-items: center;
|
|
421
|
+ justify-content: space-between;
|
|
422
|
+ &.tac{
|
|
423
|
+ justify-content: center;
|
|
424
|
+ }
|
|
425
|
+ }
|
|
426
|
+ }
|
|
427
|
+ .footer{
|
|
428
|
+ margin-top: 24rpx;
|
|
429
|
+ margin-bottom: 24rpx;
|
|
430
|
+ line-height: 80rpx;
|
|
431
|
+ height: 80rpx;
|
|
432
|
+ background: #fff;
|
|
433
|
+ display: flex;
|
|
434
|
+ align-items: center;
|
|
435
|
+ .btn {
|
|
436
|
+ height: 80rpx;
|
|
437
|
+ flex: 1;
|
|
438
|
+ margin: 0 24rpx 0 0;
|
|
439
|
+ background-color: #49B856;
|
|
440
|
+ color: #fff;
|
|
441
|
+ border-radius: 8rpx;
|
|
442
|
+ font-size: 34rpx;
|
|
443
|
+ text-align: center;
|
|
444
|
+ &:first-of-type{
|
|
445
|
+ margin-left: 24rpx;
|
|
446
|
+ }
|
|
447
|
+ &.gray{
|
|
448
|
+ background-color: #8F939C;
|
|
449
|
+ }
|
|
450
|
+ }
|
|
451
|
+ }
|
|
452
|
+}
|
|
453
|
+
|
|
454
|
+</style>
|