浏览代码

消毒供应起点科室多动作签到

seimin 1 年之前
父节点
当前提交
7be8d32230

+ 60 - 15
pages/otherCompleteOrder/otherCompleteOrder.vue

@@ -2,9 +2,11 @@
2
   <view class="HomeItem">
2
   <view class="HomeItem">
3
     <view class="goWorkAll">
3
     <view class="goWorkAll">
4
       <view class="goWorkSelect combination" v-if="actionConfirmSwitch">
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
         <view class="goWorkSelect-list scroll">
8
         <view class="goWorkSelect-list scroll">
7
-          <checkbox-group @change="checkboxChange">
9
+          <checkbox-group @change="checkboxChange" v-if="actionConfirmType == 1 || actionConfirmType == 2">
8
             <label class="goWorkSelect-item relative" v-for="action in actions" :key="action.value">
10
             <label class="goWorkSelect-item relative" v-for="action in actions" :key="action.value">
9
               <view>
11
               <view>
10
                 <checkbox :value="action.value" :checked="action.checked" />
12
                 <checkbox :value="action.value" :checked="action.checked" />
@@ -12,6 +14,14 @@
12
               <view>{{action.name}}</view>
14
               <view>{{action.name}}</view>
13
             </label>
15
             </label>
14
           </checkbox-group>
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
         </view>
25
         </view>
16
       </view>
26
       </view>
17
       <view class="goWorkSelect history" v-if="actionPhotoSwitch">
27
       <view class="goWorkSelect history" v-if="actionPhotoSwitch">
@@ -23,7 +33,7 @@
23
       </view>
33
       </view>
24
     </view>
34
     </view>
25
     <view class="foot_btn_spe">
35
     <view class="foot_btn_spe">
26
-      <view class="btn1" @click="photographToOther(order, 'end')">完成工单</view>
36
+      <view class="btn1" @click="photographToOther(order)">完成工单</view>
27
       <view class="btn3" @click="goBack">返回</view>
37
       <view class="btn3" @click="goBack">返回</view>
28
     </view>
38
     </view>
29
     <!-- 填写交接人账号弹窗 -->
39
     <!-- 填写交接人账号弹窗 -->
@@ -50,6 +60,7 @@
50
     },
60
     },
51
     data() {
61
     data() {
52
       return {
62
       return {
63
+        currentIndex: undefined,
53
         // 填写交接人账号弹窗model
64
         // 填写交接人账号弹窗model
54
         hosModels: {
65
         hosModels: {
55
           disjunctor: false,
66
           disjunctor: false,
@@ -62,6 +73,8 @@
62
         actionPhotoSwitch: false,
73
         actionPhotoSwitch: false,
63
         // 确认动作开关
74
         // 确认动作开关
64
         actionConfirmSwitch: false,
75
         actionConfirmSwitch: false,
76
+        // 确认动作模式开关
77
+        actionConfirmType: false,
65
         // 参数
78
         // 参数
66
         options: {},
79
         options: {},
67
         //动作列表
80
         //动作列表
@@ -75,7 +88,7 @@
75
       isOpenTransportationProcessRemarks(data, accountObj, funName){
88
       isOpenTransportationProcessRemarks(data, accountObj, funName){
76
         const tasktype = data.taskType;
89
         const tasktype = data.taskType;
77
         console.log(tasktype, data);
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
           uni.navigateTo({
92
           uni.navigateTo({
80
             url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}&currentCode=${this.currentCode}&funName=${funName}&actions=${this.actions ? encodeURIComponent(JSON.stringify(this.actions)) : ''}&imageValue=${this.imageValue ? encodeURIComponent(JSON.stringify(this.imageValue)) : ''}`
93
             url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}&currentCode=${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
         this.currentData = data;
164
         this.currentData = data;
152
         let actions = this.actions.filter(v => v.checked);
165
         let actions = this.actions.filter(v => v.checked);
153
         let imageValue = this.imageValue;
166
         let imageValue = this.imageValue;
154
         console.log(actions);
167
         console.log(actions);
155
         console.log(imageValue);
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
           uni.showToast({
185
           uni.showToast({
158
             icon: "none",
186
             icon: "none",
159
-          	title: '您需要完成以下动作,才可完成功工单!',
187
+          	title,
160
           	duration: 2000
188
           	duration: 2000
161
           });
189
           });
162
           return;
190
           return;
@@ -164,7 +192,7 @@
164
         if(this.actionPhotoSwitch && !imageValue.length){
192
         if(this.actionPhotoSwitch && !imageValue.length){
165
           uni.showToast({
193
           uni.showToast({
166
             icon: "none",
194
             icon: "none",
167
-          	title: '您需要完成拍照,才可完成工单!',
195
+          	title: '您需要完成拍照,才可完成工单!',
168
           	duration: 2000
196
           	duration: 2000
169
           });
197
           });
170
           return;
198
           return;
@@ -174,9 +202,15 @@
174
           mask: true,
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
         post("/dept/scanning", {
212
         post("/dept/scanning", {
179
-          content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
213
+          content,
180
           taskTypeId: data.taskType.id,
214
           taskTypeId: data.taskType.id,
181
           gdState: data.gdState.id,
215
           gdState: data.gdState.id,
182
         }).then((result) => {
216
         }).then((result) => {
@@ -220,9 +254,14 @@
220
       },
254
       },
221
       // 选择动作
255
       // 选择动作
222
       checkboxChange: function (e) {
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
           const item = items[i]
265
           const item = items[i]
227
           if(values.includes(item.value)){
266
           if(values.includes(item.value)){
228
             this.$set(item,'checked',true)
267
             this.$set(item,'checked',true)
@@ -248,20 +287,26 @@
248
       if(options.order){
287
       if(options.order){
249
         options.order = JSON.parse(options.order);
288
         options.order = JSON.parse(options.order);
250
         this.order = options.order;
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
       if(options.orderId){
296
       if(options.orderId){
253
         this.orderId = options.orderId;
297
         this.orderId = options.orderId;
254
       }
298
       }
255
       if(options.taskType){
299
       if(options.taskType){
256
         options.taskType = JSON.parse(options.taskType);
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
         this.actions = actions.split('$').map((v, i) => ({
303
         this.actions = actions.split('$').map((v, i) => ({
260
           value: i,
304
           value: i,
261
           name: v,
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
   };

+ 3 - 1
pages/receipt_infopage/receipt_infopage.vue

@@ -350,10 +350,12 @@
350
           infoDATA.taskType.associationType.value != 'specimen' &&
350
           infoDATA.taskType.associationType.value != 'specimen' &&
351
           infoDATA.taskType.associationType.value != 'specimenPlan' &&
351
           infoDATA.taskType.associationType.value != 'specimenPlan' &&
352
           infoDATA.taskType.associationType.value != 'ordinary' &&
352
           infoDATA.taskType.associationType.value != 'ordinary' &&
353
-          !(infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch)
353
+          !(infoDATA.taskType.associationType.value == 'other' && (infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch || infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch))
354
         " hover-class="seimin-btn-hover">
354
         " hover-class="seimin-btn-hover">
355
           <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
355
           <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
356
         </view>
356
         </view>
357
+        <!-- 其他临床服务-完成工单-待到达 -->
358
+        <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">完成工单</view>
357
         <!-- 其他临床服务-完成工单-待送达 -->
359
         <!-- 其他临床服务-完成工单-待送达 -->
358
         <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">完成工单</view>
360
         <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">完成工单</view>
359
         <!-- 其他临床服务-拍照 -->
361
         <!-- 其他临床服务-拍照 -->

+ 3 - 1
pages/receiptpage/receiptpage.vue

@@ -264,9 +264,11 @@
264
                 item.taskType.associationType.value != 'specimenPlan' &&
264
                 item.taskType.associationType.value != 'specimenPlan' &&
265
                 item.taskType.associationType.value != 'ordinary'
265
                 item.taskType.associationType.value != 'ordinary'
266
               ">
266
               ">
267
-              <view v-if="!(item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch)" class="page_item_btn" hover-class="seimin-btn-hover">
267
+              <view v-if="!(item.taskType.associationType.value == 'other' && (item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch || item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch))" class="page_item_btn" hover-class="seimin-btn-hover">
268
                 <smallScreen :sData="item" :sType="1">扫码</smallScreen>
268
                 <smallScreen :sData="item" :sType="1">扫码</smallScreen>
269
               </view>
269
               </view>
270
+              <!-- 其他临床服务-完成工单-待到达 -->
271
+              <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 4 && item.taskType.carryingCourses[0].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">完成工单</view>
270
               <!-- 其他临床服务-完成工单-待送达 -->
272
               <!-- 其他临床服务-完成工单-待送达 -->
271
               <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">完成工单</view>
273
               <view v-if="item.taskType.associationType.value == 'other' && item.gdState.value == 5 && item.taskType.carryingCourses[1].actionsSwitch" class="page_item_btn" @click="otherCompleteOrder(item)" hover-class="seimin-btn-hover">完成工单</view>
272
               <!-- 其他临床服务-拍照 -->
274
               <!-- 其他临床服务-拍照 -->

+ 20 - 6
tools/commonFun.js

@@ -15,10 +15,15 @@ export function nextDeptOrder_ss(_this, data, accountObj) {
15
     let actions = _this.actions.filter(v => v.checked);
15
     let actions = _this.actions.filter(v => v.checked);
16
     let actionRemarks = actions.map(v => v.name).toString();
16
     let actionRemarks = actions.map(v => v.name).toString();
17
     if(actionRemarks){
17
     if(actionRemarks){
18
-      post("/workerOrder/addOtherRemarks", {
18
+      let postData = {
19
         orderId: data.id,
19
         orderId: data.id,
20
-        actionRemarks: actionRemarks,
21
-      }).then((result1) => {
20
+      };
21
+      if(data.gdState.value == 4){
22
+        postData.actionStartRemarks = actionRemarks;
23
+      }else if(data.gdState.value == 5){
24
+        postData.actionRemarks = actionRemarks;
25
+      }
26
+      post("/workerOrder/addOtherRemarks", postData).then((result1) => {
22
         if(result1.state == 200){
27
         if(result1.state == 200){
23
           postWorkerOrder(_this, data, accountObj);
28
           postWorkerOrder(_this, data, accountObj);
24
         }else{
29
         }else{
@@ -45,10 +50,19 @@ export function uploadToOther(_this, data, accountObj){
45
   });
50
   });
46
   _this.imageValue = _this.imageValue || [];
51
   _this.imageValue = _this.imageValue || [];
47
   let imageValue = _this.imageValue;
52
   let imageValue = _this.imageValue;
53
+  let gdOperate;
54
+  let uploadType;
55
+  if(data.gdState.value == 4){
56
+    gdOperate = 27;
57
+    uploadType = 'orderStartPhoto';
58
+  }else if(data.gdState.value == 5){
59
+    gdOperate = 22;
60
+    uploadType = 'orderEndPhoto';
61
+  }
48
   // 完成工单
62
   // 完成工单
49
   post('/workerOrder/findRecordInfoByOrderId', {
63
   post('/workerOrder/findRecordInfoByOrderId', {
50
     orderId: data.id,
64
     orderId: data.id,
51
-    gdOperate: 22,
65
+    gdOperate,
52
   }).then(result => {
66
   }).then(result => {
53
     if (result.state == 200) {
67
     if (result.state == 200) {
54
       let n = 0;
68
       let n = 0;
@@ -72,7 +86,7 @@ export function uploadToOther(_this, data, accountObj){
72
             n++;
86
             n++;
73
             uni.uploadFile({
87
             uni.uploadFile({
74
               url: pathUrl +
88
               url: pathUrl +
75
-                "/common/common/uploadAttachment/orderEndPhoto/" +
89
+                "/common/common/uploadAttachment/"+ uploadType +"/" +
76
                 data.id +
90
                 data.id +
77
                 "/" + result.recordId,
91
                 "/" + result.recordId,
78
               filePath: tp,
92
               filePath: tp,
@@ -116,7 +130,7 @@ export function uploadToOther(_this, data, accountObj){
116
             n++;
130
             n++;
117
             uni.uploadFile({
131
             uni.uploadFile({
118
               url: pathUrl +
132
               url: pathUrl +
119
-                "/common/common/uploadAttachment/orderEndPhoto/" +
133
+                "/common/common/uploadAttachment/"+ uploadType +"/" +
120
                 data.id +
134
                 data.id +
121
                 "/" + result.recordId,
135
                 "/" + result.recordId,
122
               filePath: tp,
136
               filePath: tp,