|
@@ -6,17 +6,20 @@
|
6
|
6
|
|
7
|
7
|
<view class="Scanning_cont">
|
8
|
8
|
<scroll-view scroll-y class="scrollContent">
|
|
9
|
+ <checkbox-group @change="checkboxChange">
|
9
|
10
|
<view class="column" v-for="(item, index) in patientList" :key="item.id">
|
10
|
|
- <view class="top">
|
11
|
|
- <view class="name">姓名:</view>
|
12
|
|
- <view class="value">{{item.patientName}}</view>
|
13
|
|
- <text class="orders green">{{index + 1}}</text>
|
14
|
|
- </view>
|
15
|
|
- <view class="bottom">
|
16
|
|
- <view class="name">住院号:</view>
|
17
|
|
- <view class="value">{{item.residenceNo}}</view>
|
18
|
|
- </view>
|
|
11
|
+ <view class="top">
|
|
12
|
+ <checkbox :value="item.id" :checked="item.checked" activeBackgroundColor="#49b856" activeBorderColor="#49b856" iconColor="#fff"/>
|
|
13
|
+ <text class="orders green">{{index + 1}}</text>
|
|
14
|
+ <view class="name">姓名:</view>
|
|
15
|
+ <view class="value">{{item.patientName}}</view>
|
|
16
|
+ </view>
|
|
17
|
+ <view class="bottom">
|
|
18
|
+ <view class="name">住院号:</view>
|
|
19
|
+ <view class="value">{{item.residenceNo}}</view>
|
|
20
|
+ </view>
|
19
|
21
|
</view>
|
|
22
|
+ </checkbox-group>
|
20
|
23
|
</scroll-view>
|
21
|
24
|
</view>
|
22
|
25
|
|
|
@@ -60,11 +63,33 @@
|
60
|
63
|
this.SMFlag = true;
|
61
|
64
|
},
|
62
|
65
|
methods: {
|
|
66
|
+ checkboxChange (e) {
|
|
67
|
+ var items = this.patientList,
|
|
68
|
+ values = e.detail.value;
|
|
69
|
+ for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
70
|
+ const item = items[i]
|
|
71
|
+ if(values.includes(item.id)){
|
|
72
|
+ this.$set(item,'checked',true)
|
|
73
|
+ }else{
|
|
74
|
+ this.$set(item,'checked',false)
|
|
75
|
+ }
|
|
76
|
+ }
|
|
77
|
+ console.log(8888,this.patientList)
|
|
78
|
+ },
|
63
|
79
|
// 送回病房-扫描科室
|
64
|
80
|
scanDept() {
|
65
|
81
|
if (!this.SMFlag) {
|
66
|
82
|
return;
|
67
|
83
|
}
|
|
84
|
+ let isList = this.patientList.filter(i=>i.checked)
|
|
85
|
+ if(isList.length==0){
|
|
86
|
+ uni.showToast({
|
|
87
|
+ icon: 'error',
|
|
88
|
+ title: '请勾选患者',
|
|
89
|
+ duration: 2000,
|
|
90
|
+ });
|
|
91
|
+ return
|
|
92
|
+ }
|
68
|
93
|
this.SMFlag = false;
|
69
|
94
|
let code = "";
|
70
|
95
|
SM().then((ress1) => {
|
|
@@ -177,22 +202,23 @@
|
177
|
202
|
let postData = {
|
178
|
203
|
"workOrder": [],
|
179
|
204
|
};
|
180
|
|
- console.log(this.patientList);
|
181
|
205
|
this.patientList.forEach(v => {
|
182
|
|
- postData.workOrder.push({
|
183
|
|
- sourceId: 4,
|
184
|
|
- "hosId": this.hosId,
|
185
|
|
- "startDept": {
|
186
|
|
- "id": this.currentStartDept.id
|
187
|
|
- },
|
188
|
|
- "createDept": this.currentStartDept.id,
|
189
|
|
- "patient": {
|
190
|
|
- "patientCode": v.patientCode
|
191
|
|
- },
|
192
|
|
- "worker": {
|
193
|
|
- "id": userId
|
194
|
|
- },
|
195
|
|
- })
|
|
206
|
+ if(v.checked){
|
|
207
|
+ postData.workOrder.push({
|
|
208
|
+ sourceId: 4,
|
|
209
|
+ "hosId": this.hosId,
|
|
210
|
+ "startDept": {
|
|
211
|
+ "id": this.currentStartDept.id
|
|
212
|
+ },
|
|
213
|
+ "createDept": this.currentStartDept.id,
|
|
214
|
+ "patient": {
|
|
215
|
+ "patientCode": v.patientCode
|
|
216
|
+ },
|
|
217
|
+ "worker": {
|
|
218
|
+ "id": userId
|
|
219
|
+ },
|
|
220
|
+ })
|
|
221
|
+ }
|
196
|
222
|
})
|
197
|
223
|
post("/workerOrder/returnSickRoom", postData).then((res) => {
|
198
|
224
|
console.log(res)
|
|
@@ -297,7 +323,7 @@
|
297
|
323
|
onLoad(options) {
|
298
|
324
|
console.log(options, "options");
|
299
|
325
|
this.queryObj = options;
|
300
|
|
- this.patientList = [{id: options.patientId, patientName: options.patientName, residenceNo: options.patientResidenceNo, patientCode: options.patientCode}]
|
|
326
|
+ this.patientList = [{id: options.patientId, patientName: options.patientName, residenceNo: options.patientResidenceNo, patientCode: options.patientCode, checked:true}]
|
301
|
327
|
// #ifdef APP-PLUS
|
302
|
328
|
webHandle("no", "app");
|
303
|
329
|
// #endif
|
|
@@ -338,7 +364,7 @@
|
338
|
364
|
min-height: 0;
|
339
|
365
|
}
|
340
|
366
|
.column{
|
341
|
|
- padding: 24rpx 64rpx;
|
|
367
|
+ padding: 24rpx 44rpx;
|
342
|
368
|
font-size: 26rpx;
|
343
|
369
|
margin-top: 16rpx;
|
344
|
370
|
background-color: #fff;
|
|
@@ -356,12 +382,12 @@
|
356
|
382
|
.top{
|
357
|
383
|
position: relative;
|
358
|
384
|
.orders{
|
359
|
|
- width: 64rpx;
|
|
385
|
+ width: 54rpx;
|
360
|
386
|
text-align: center;
|
361
|
|
- position: absolute;
|
362
|
|
- left: -64rpx;
|
363
|
|
- top: 50%;
|
364
|
|
- transform: translateY(-50%);
|
|
387
|
+ // position: absolute;
|
|
388
|
+ // left: -64rpx;
|
|
389
|
+ // top: 50%;
|
|
390
|
+ // transform: translateY(-50%);
|
365
|
391
|
font-size: 28rpx;
|
366
|
392
|
font-weight: bold;
|
367
|
393
|
}
|