|
@@ -2,9 +2,11 @@
|
2
|
2
|
<view class="HomeItem">
|
3
|
3
|
<view class="goWorkAll">
|
4
|
4
|
<view class="goWorkSelect combination" v-if="actionConfirmSwitch">
|
5
|
|
- <view class="goWorkSelect-head">您需要完成以下动作,才可完成工单。如完成请勾选对应项!</view>
|
|
5
|
+ <view class="goWorkSelect-head" v-if="actionConfirmType == 1">您需要完成以下所有动作,才可完成工单。如完成请勾选对应项!</view>
|
|
6
|
+ <view class="goWorkSelect-head" v-if="actionConfirmType == 2">您需要完成以下至少一个动作,才可完成工单。如完成请勾选对应项!</view>
|
|
7
|
+ <view class="goWorkSelect-head" v-if="actionConfirmType == 3">您需要完成以下一个动作,才可完成工单。如完成请勾选对应项!</view>
|
6
|
8
|
<view class="goWorkSelect-list scroll">
|
7
|
|
- <checkbox-group @change="checkboxChange">
|
|
9
|
+ <checkbox-group @change="checkboxChange" v-if="actionConfirmType == 1 || actionConfirmType == 2">
|
8
|
10
|
<label class="goWorkSelect-item relative" v-for="action in actions" :key="action.value">
|
9
|
11
|
<view>
|
10
|
12
|
<checkbox :value="action.value" :checked="action.checked" />
|
|
@@ -12,6 +14,14 @@
|
12
|
14
|
<view>{{action.name}}</view>
|
13
|
15
|
</label>
|
14
|
16
|
</checkbox-group>
|
|
17
|
+ <radio-group @change="checkboxChange" v-if="actionConfirmType == 3">
|
|
18
|
+ <label class="goWorkSelect-item relative" v-for="action in actions" :key="action.value">
|
|
19
|
+ <view>
|
|
20
|
+ <radio :value="action.value" :checked="action.checked" />
|
|
21
|
+ </view>
|
|
22
|
+ <view>{{action.name}}</view>
|
|
23
|
+ </label>
|
|
24
|
+ </radio-group>
|
15
|
25
|
</view>
|
16
|
26
|
</view>
|
17
|
27
|
<view class="goWorkSelect history" v-if="actionPhotoSwitch">
|
|
@@ -23,7 +33,7 @@
|
23
|
33
|
</view>
|
24
|
34
|
</view>
|
25
|
35
|
<view class="foot_btn_spe">
|
26
|
|
- <view class="btn1" @click="photographToOther(order, 'end')">完成工单</view>
|
|
36
|
+ <view class="btn1" @click="photographToOther(order)">完成工单</view>
|
27
|
37
|
<view class="btn3" @click="goBack">返回</view>
|
28
|
38
|
</view>
|
29
|
39
|
<!-- 填写交接人账号弹窗 -->
|
|
@@ -50,6 +60,7 @@
|
50
|
60
|
},
|
51
|
61
|
data() {
|
52
|
62
|
return {
|
|
63
|
+ currentIndex: undefined,
|
53
|
64
|
// 填写交接人账号弹窗model
|
54
|
65
|
hosModels: {
|
55
|
66
|
disjunctor: false,
|
|
@@ -62,6 +73,8 @@
|
62
|
73
|
actionPhotoSwitch: false,
|
63
|
74
|
// 确认动作开关
|
64
|
75
|
actionConfirmSwitch: false,
|
|
76
|
+ // 确认动作模式开关
|
|
77
|
+ actionConfirmType: false,
|
65
|
78
|
// 参数
|
66
|
79
|
options: {},
|
67
|
80
|
//动作列表
|
|
@@ -75,7 +88,7 @@
|
75
|
88
|
isOpenTransportationProcessRemarks(data, accountObj, funName){
|
76
|
89
|
const tasktype = data.taskType;
|
77
|
90
|
console.log(tasktype, data);
|
78
|
|
- if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[1].logSwitch && data.gdState.value == 5){
|
|
91
|
+ if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[this.currentIndex].logSwitch && data.gdState.value == 5){
|
79
|
92
|
uni.navigateTo({
|
80
|
93
|
url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}¤tCode=${this.currentCode}&funName=${funName}&actions=${this.actions ? encodeURIComponent(JSON.stringify(this.actions)) : ''}&imageValue=${this.imageValue ? encodeURIComponent(JSON.stringify(this.imageValue)) : ''}`
|
81
|
94
|
})
|
|
@@ -147,16 +160,31 @@
|
147
|
160
|
}
|
148
|
161
|
},
|
149
|
162
|
// 拍照-其他
|
150
|
|
- photographToOther(data, type) {
|
|
163
|
+ photographToOther(data) {
|
151
|
164
|
this.currentData = data;
|
152
|
165
|
let actions = this.actions.filter(v => v.checked);
|
153
|
166
|
let imageValue = this.imageValue;
|
154
|
167
|
console.log(actions);
|
155
|
168
|
console.log(imageValue);
|
156
|
|
- if(this.actionConfirmSwitch && this.actions.length !== actions.length){
|
|
169
|
+ if(
|
|
170
|
+ this.actionConfirmSwitch &&
|
|
171
|
+ (
|
|
172
|
+ (this.actionConfirmType == 1 && this.actions.length !== actions.length) ||
|
|
173
|
+ (this.actionConfirmType == 2 && !actions.length) ||
|
|
174
|
+ (this.actionConfirmType == 3 && !actions.length)
|
|
175
|
+ )
|
|
176
|
+ ){
|
|
177
|
+ let title = '';
|
|
178
|
+ if(this.actionConfirmType == 1){
|
|
179
|
+ title = '您需要完成以下所有动作,才可完成工单!';
|
|
180
|
+ }else if(this.actionConfirmType == 2){
|
|
181
|
+ title = '您需要完成以下至少一个动作,才可完成工单!';
|
|
182
|
+ }else if(this.actionConfirmType == 3){
|
|
183
|
+ title = '您需要完成以下一个动作,才可完成工单!';
|
|
184
|
+ }
|
157
|
185
|
uni.showToast({
|
158
|
186
|
icon: "none",
|
159
|
|
- title: '您需要完成以下动作,才可完成功工单!',
|
|
187
|
+ title,
|
160
|
188
|
duration: 2000
|
161
|
189
|
});
|
162
|
190
|
return;
|
|
@@ -164,7 +192,7 @@
|
164
|
192
|
if(this.actionPhotoSwitch && !imageValue.length){
|
165
|
193
|
uni.showToast({
|
166
|
194
|
icon: "none",
|
167
|
|
- title: '您需要完成拍照,才可完成功工单!',
|
|
195
|
+ title: '您需要完成拍照,才可完成工单!',
|
168
|
196
|
duration: 2000
|
169
|
197
|
});
|
170
|
198
|
return;
|
|
@@ -174,9 +202,15 @@
|
174
|
202
|
mask: true,
|
175
|
203
|
});
|
176
|
204
|
// 其他临床服务
|
|
205
|
+ let content;
|
|
206
|
+ if(this.currentIndex == 0){
|
|
207
|
+ content = data.startDept.qrcode;
|
|
208
|
+ }else if(this.currentIndex == 1){
|
|
209
|
+ content = data.endDepts[0].qrcode;
|
|
210
|
+ }
|
177
|
211
|
//检验二维码的有效性
|
178
|
212
|
post("/dept/scanning", {
|
179
|
|
- content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
|
|
213
|
+ content,
|
180
|
214
|
taskTypeId: data.taskType.id,
|
181
|
215
|
gdState: data.gdState.id,
|
182
|
216
|
}).then((result) => {
|
|
@@ -220,9 +254,14 @@
|
220
|
254
|
},
|
221
|
255
|
// 选择动作
|
222
|
256
|
checkboxChange: function (e) {
|
223
|
|
- var items = this.actions,
|
224
|
|
- values = e.detail.value;
|
225
|
|
- for (var i = 0, lenI = items.length; i < lenI; ++i) {
|
|
257
|
+ let items = this.actions;
|
|
258
|
+ let values = [];
|
|
259
|
+ if(this.actionConfirmType == 1 || this.actionConfirmType == 2){
|
|
260
|
+ values = e.detail.value || [];
|
|
261
|
+ }else if(this.actionConfirmType == 3){
|
|
262
|
+ values = [e.detail.value];
|
|
263
|
+ }
|
|
264
|
+ for (let i = 0, lenI = items.length; i < lenI; ++i) {
|
226
|
265
|
const item = items[i]
|
227
|
266
|
if(values.includes(item.value)){
|
228
|
267
|
this.$set(item,'checked',true)
|
|
@@ -248,20 +287,26 @@
|
248
|
287
|
if(options.order){
|
249
|
288
|
options.order = JSON.parse(options.order);
|
250
|
289
|
this.order = options.order;
|
|
290
|
+ if(this.order.gdState.value == 4){
|
|
291
|
+ this.currentIndex = 0;
|
|
292
|
+ }else if(this.order.gdState.value == 5){
|
|
293
|
+ this.currentIndex = 1;
|
|
294
|
+ }
|
251
|
295
|
}
|
252
|
296
|
if(options.orderId){
|
253
|
297
|
this.orderId = options.orderId;
|
254
|
298
|
}
|
255
|
299
|
if(options.taskType){
|
256
|
300
|
options.taskType = JSON.parse(options.taskType);
|
257
|
|
- this.actionConfirmSwitch = options.taskType.carryingCourses[1].actionConfirmSwitch;
|
258
|
|
- let actions = options.taskType.carryingCourses[1].actionRemarks || "";
|
|
301
|
+ this.actionConfirmSwitch = options.taskType.carryingCourses[this.currentIndex].actionConfirmSwitch;
|
|
302
|
+ let actions = options.taskType.carryingCourses[this.currentIndex].actionRemarks || "";
|
259
|
303
|
this.actions = actions.split('$').map((v, i) => ({
|
260
|
304
|
value: i,
|
261
|
305
|
name: v,
|
262
|
306
|
}));
|
263
|
307
|
|
264
|
|
- this.actionPhotoSwitch = options.taskType.carryingCourses[1].actionPhotoSwitch;
|
|
308
|
+ this.actionPhotoSwitch = options.taskType.carryingCourses[this.currentIndex].actionPhotoSwitch;
|
|
309
|
+ this.actionConfirmType = options.taskType.carryingCourses[this.currentIndex].actionConfirmType;
|
265
|
310
|
}
|
266
|
311
|
},
|
267
|
312
|
};
|