|
@@ -11,8 +11,8 @@
|
11
|
11
|
<!-- 返回值的departmentStrategy是204 则是自主填写 -->
|
12
|
12
|
<!-- 返回值的departmentStrategy是205 则是固定科室类型 -->
|
13
|
13
|
<!-- 100013 (护士端一键建单展示策略)取起点科室,和msg值展示 -->
|
14
|
|
- <!-- <block v-if="dataObj.status == 100013"> -->
|
15
|
|
- <view class="select_block" @click="selectDept('start')">
|
|
14
|
+ <view class="select_block" @click="selectDept('start')"
|
|
15
|
+ v-if="qucikCreateOrderType !== 'patient'||(qucikCreateOrderType === 'patient'&&!(dataObj.start.start.departmentStrategy == 201 || dataObj.start.start.departmentStrategy == 203))">
|
16
|
16
|
<!-- 默认科室和固定科室 -->
|
17
|
17
|
<text class="select_label"
|
18
|
18
|
:class="{disableColor:dataObj.start.start.departmentStrategy == 201 || dataObj.start.start.departmentStrategy == 203}">起点科室</text>
|
|
@@ -26,7 +26,8 @@
|
26
|
26
|
<text class="pda pda-xiangyou"></text>
|
27
|
27
|
</view>
|
28
|
28
|
</view>
|
29
|
|
- <view class="select_block" @click="selectDept('end')">
|
|
29
|
+ <view class="select_block" @click="selectDept('end')"
|
|
30
|
+ v-if="qucikCreateOrderType !== 'patient'||(qucikCreateOrderType === 'patient'&&!(dataObj.end.end.departmentStrategy == 201 || dataObj.end.end.departmentStrategy == 203))">
|
30
|
31
|
<!-- 默认科室和固定科室 -->
|
31
|
32
|
<text class="select_label"
|
32
|
33
|
:class="{disableColor:dataObj.end.end.departmentStrategy == 201 || dataObj.end.end.departmentStrategy == 203}">终点科室</text>
|
|
@@ -40,7 +41,6 @@
|
40
|
41
|
<text class="pda pda-xiangyou"></text>
|
41
|
42
|
</view>
|
42
|
43
|
</view>
|
43
|
|
- <!-- </block> -->
|
44
|
44
|
</block>
|
45
|
45
|
<!-- 备注 -->
|
46
|
46
|
<view class="remarks" v-if="dataObj.remarksSwitch == 1">
|
|
@@ -79,6 +79,7 @@
|
79
|
79
|
</template>
|
80
|
80
|
|
81
|
81
|
<script>
|
|
82
|
+ import cloneDeep from 'lodash/cloneDeep';
|
82
|
83
|
import {
|
83
|
84
|
mapState,
|
84
|
85
|
mapMutations
|
|
@@ -95,7 +96,7 @@
|
95
|
96
|
data() {
|
96
|
97
|
return {
|
97
|
98
|
//患者建单信息展示
|
98
|
|
- patientMsg: '您选择类型为<b class="green">转科</b>,需要填写科室,选择完成后点击下一步',
|
|
99
|
+ patientMsg: '',
|
99
|
100
|
// 传递过来的参数
|
100
|
101
|
queryParams: {},
|
101
|
102
|
// 选择的起点科室
|
|
@@ -117,23 +118,7 @@
|
117
|
118
|
// 历史输入
|
118
|
119
|
historyCustomRemarks: [],
|
119
|
120
|
//底部按钮
|
120
|
|
- btns: [{
|
121
|
|
- name: "回到首页",
|
122
|
|
- type: "default",
|
123
|
|
- click: () => {
|
124
|
|
- uni.navigateTo({
|
125
|
|
- url: "/pages/index/index",
|
126
|
|
- });
|
127
|
|
- },
|
128
|
|
- },
|
129
|
|
- {
|
130
|
|
- name: "确认",
|
131
|
|
- type: "primary",
|
132
|
|
- click: () => {
|
133
|
|
- this.submitData();
|
134
|
|
- },
|
135
|
|
- },
|
136
|
|
- ],
|
|
121
|
+ btns: [],
|
137
|
122
|
};
|
138
|
123
|
},
|
139
|
124
|
computed: {
|
|
@@ -144,8 +129,54 @@
|
144
|
129
|
"deptDisplay",
|
145
|
130
|
'searchDeptParams',
|
146
|
131
|
'searchDeptResultList',
|
147
|
|
- 'patientBuildTrip'
|
|
132
|
+ 'patientBuildTrip',
|
|
133
|
+ 'patientTaskTypeName'
|
148
|
134
|
]),
|
|
135
|
+ isWriteDept() {
|
|
136
|
+ return {
|
|
137
|
+ startDept: this.startDept,
|
|
138
|
+ endDept: this.endDept
|
|
139
|
+ }
|
|
140
|
+ }
|
|
141
|
+ },
|
|
142
|
+ watch: {
|
|
143
|
+ isWriteDept(newVal) {
|
|
144
|
+ console.log(newVal);
|
|
145
|
+ if (this.qucikCreateOrderType !== 'patient') {
|
|
146
|
+ return;
|
|
147
|
+ }
|
|
148
|
+ if (newVal.startDept.id && newVal.endDept.id) {
|
|
149
|
+ this.btns = [{
|
|
150
|
+ name: "返回列表",
|
|
151
|
+ type: "default",
|
|
152
|
+ click: () => {
|
|
153
|
+ uni.navigateTo({
|
|
154
|
+ url:'/pages/patientList/patientList'
|
|
155
|
+ })
|
|
156
|
+ },
|
|
157
|
+ },
|
|
158
|
+ {
|
|
159
|
+ name: "下一步",
|
|
160
|
+ type: "primary",
|
|
161
|
+ click: () => {
|
|
162
|
+ uni.navigateTo({
|
|
163
|
+ url: "/pages/index/index",
|
|
164
|
+ });
|
|
165
|
+ },
|
|
166
|
+ },
|
|
167
|
+ ];
|
|
168
|
+ } else {
|
|
169
|
+ this.btns = [{
|
|
170
|
+ name: "返回列表",
|
|
171
|
+ type: "default",
|
|
172
|
+ click: () => {
|
|
173
|
+ uni.navigateTo({
|
|
174
|
+ url:'/pages/patientList/patientList'
|
|
175
|
+ })
|
|
176
|
+ },
|
|
177
|
+ }, ];
|
|
178
|
+ }
|
|
179
|
+ }
|
149
|
180
|
},
|
150
|
181
|
methods: {
|
151
|
182
|
...mapMutations('other', ['changeSearchDeptParams', 'changeSearchDeptResultList']),
|
|
@@ -194,6 +225,7 @@
|
194
|
225
|
},
|
195
|
226
|
// 获取数据(除历史输入)
|
196
|
227
|
getBuildTrip(res) {
|
|
228
|
+ res = cloneDeep(res);
|
197
|
229
|
if (
|
198
|
230
|
res.status == 200 ||
|
199
|
231
|
res.status == 100012 ||
|
|
@@ -213,13 +245,28 @@
|
213
|
245
|
res.msg = res.msg.replace(/<b>/g, '<text class="green">');
|
214
|
246
|
res.msg = res.msg.replace(/<\/b>/g, "</text>");
|
215
|
247
|
}
|
216
|
|
- if (res.start || res.end) {
|
|
248
|
+ if (res.start) {
|
217
|
249
|
//其他服务建单
|
218
|
250
|
if (
|
219
|
251
|
res.start.start.departmentStrategy == 201 ||
|
220
|
252
|
res.start.start.departmentStrategy == 203) {
|
221
|
253
|
this.startDept = res.start.start.list[0];
|
222
|
254
|
}
|
|
255
|
+
|
|
256
|
+ if (
|
|
257
|
+ res.start.start.departmentStrategy == 202 ||
|
|
258
|
+ res.start.start.departmentStrategy == 204 ||
|
|
259
|
+ res.start.start.departmentStrategy == 205
|
|
260
|
+ ) {
|
|
261
|
+ if (this.queryParams.isShow) {
|
|
262
|
+ this.startDept = this.searchDeptResultList.start || {};
|
|
263
|
+ } else {
|
|
264
|
+ this.changeSearchDeptResultList({});
|
|
265
|
+ }
|
|
266
|
+ }
|
|
267
|
+ }
|
|
268
|
+ if (res.end) {
|
|
269
|
+ //其他服务建单
|
223
|
270
|
if (
|
224
|
271
|
res.end.end.departmentStrategy == 201 ||
|
225
|
272
|
res.end.end.departmentStrategy == 203) {
|
|
@@ -227,13 +274,11 @@
|
227
|
274
|
}
|
228
|
275
|
|
229
|
276
|
if (
|
230
|
|
- res.start.start.departmentStrategy == 204 ||
|
231
|
|
- res.start.start.departmentStrategy == 205 ||
|
|
277
|
+ res.end.end.departmentStrategy == 202 ||
|
232
|
278
|
res.end.end.departmentStrategy == 204 ||
|
233
|
279
|
res.end.end.departmentStrategy == 205
|
234
|
280
|
) {
|
235
|
281
|
if (this.queryParams.isShow) {
|
236
|
|
- this.startDept = this.searchDeptResultList.start || {};
|
237
|
282
|
this.endDept = this.searchDeptResultList.end || {};
|
238
|
283
|
} else {
|
239
|
284
|
this.changeSearchDeptResultList({});
|
|
@@ -370,6 +415,14 @@
|
370
|
415
|
dept: checkedObj.label,
|
371
|
416
|
deptalias: checkedObj.labelAlias
|
372
|
417
|
};
|
|
418
|
+ // 防止后选择不回显
|
|
419
|
+ let searchDeptResultList = this.searchDeptResultList;
|
|
420
|
+ searchDeptResultList[this.selectdDeptType] = {
|
|
421
|
+ id: checkedObj.value,
|
|
422
|
+ dept: checkedObj.label,
|
|
423
|
+ deptalias: checkedObj.labelAlias
|
|
424
|
+ }
|
|
425
|
+ this.changeSearchDeptResultList(searchDeptResultList);
|
373
|
426
|
},
|
374
|
427
|
// 选择起点科室
|
375
|
428
|
selectDept(type) {
|
|
@@ -383,8 +436,8 @@
|
383
|
436
|
}
|
384
|
437
|
if (
|
385
|
438
|
(this.dataObj.end.end.departmentStrategy == 201 ||
|
386
|
|
- this.dataObj.end.end.departmentStrategy == 203 &&
|
387
|
|
- type === 'end')) {
|
|
439
|
+ this.dataObj.end.end.departmentStrategy == 203) &&
|
|
440
|
+ type === 'end') {
|
388
|
441
|
//默认科室和固定科室不能选科室
|
389
|
442
|
return;
|
390
|
443
|
}
|
|
@@ -419,9 +472,38 @@
|
419
|
472
|
}
|
420
|
473
|
},
|
421
|
474
|
onLoad(queryParams) {
|
|
475
|
+ this.patientMsg = `您选择类型为<b class="green">${this.patientTaskTypeName}</b>,需要填写科室,选择完成后点击下一步`;
|
422
|
476
|
this.queryParams = queryParams;
|
423
|
|
- console.log(queryParams);
|
424
|
|
- console.log(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
|
|
477
|
+ if (this.qucikCreateOrderType === 'patient') {
|
|
478
|
+ //患者建单选科室
|
|
479
|
+ this.btns = [{
|
|
480
|
+ name: "返回列表",
|
|
481
|
+ type: "default",
|
|
482
|
+ click: () => {
|
|
483
|
+ uni.navigateTo({
|
|
484
|
+ url:'/pages/patientList/patientList'
|
|
485
|
+ })
|
|
486
|
+ },
|
|
487
|
+ }, ];
|
|
488
|
+ } else {
|
|
489
|
+ this.btns = [{
|
|
490
|
+ name: "回到首页",
|
|
491
|
+ type: "default",
|
|
492
|
+ click: () => {
|
|
493
|
+ uni.navigateTo({
|
|
494
|
+ url: "/pages/index/index",
|
|
495
|
+ });
|
|
496
|
+ },
|
|
497
|
+ },
|
|
498
|
+ {
|
|
499
|
+ name: "确认",
|
|
500
|
+ type: "primary",
|
|
501
|
+ click: () => {
|
|
502
|
+ this.submitData();
|
|
503
|
+ },
|
|
504
|
+ },
|
|
505
|
+ ]
|
|
506
|
+ }
|
425
|
507
|
this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
|
426
|
508
|
},
|
427
|
509
|
};
|