Browse Source

工单问卷优化

maotao 9 months ago
parent
commit
fc8e60e0f7

+ 4 - 2
components/smallScreen/smallScreen.vue

@@ -250,7 +250,8 @@
250 250
                         res.bedNum
251 251
                       }&status=${res.status}&msg=${
252 252
                         res.msg
253
-                      }&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
253
+                      }&taskTypeId=${data.taskType.id}&model=${
254
+												encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
254 255
                       });
255 256
                     }
256 257
                   }else{
@@ -265,7 +266,8 @@
265 266
                       res.bedNum
266 267
                     }&status=${res.status}&msg=${
267 268
                       res.msg
268
-                    }&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
269
+                    }&taskTypeId=${data.taskType.id}&model=${
270
+											encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
269 271
                     });
270 272
                   }
271 273
                 }

+ 46 - 1
pages/scanning_Result/scanning_Result.vue

@@ -259,10 +259,13 @@
259 259
     <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
260 260
       @ok="speOk" @cancel="speCancel">
261 261
     </handViewSpecimen>
262
+		<!-- 调查问卷二维码 -->
263
+		 <questionCode v-if="isQuestionModel" :orderId="dataId" @know="isQuestionModel = false"></questionCode>
262 264
   </view>
263 265
 </template>
264 266
 <script>
265 267
   import showModel from "../../components/showModel/showModel.vue";
268
+	import questionCode from "../../components/questionCode/questionCode.vue";
266 269
   import {
267 270
     get,
268 271
     post,
@@ -276,8 +279,13 @@
276 279
     DRUGSBAG_TYPE
277 280
   } from '../../tools/enum.drugsbagType.js';
278 281
   export default {
282
+		components:{
283
+			questionCode
284
+		},
279 285
     data() {
280 286
       return {
287
+				// 调研二维码
288
+				isQuestionModel:false,
281 289
         DRUGSBAG_TYPE,
282 290
         currentCode: '', //当前小扫描的科室二维码
283 291
         // 手动查询标本弹窗model
@@ -319,6 +327,7 @@
319 327
         selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
320 328
         gotoFlag: true,
321 329
         content: "",
330
+				taskTypeId:"",
322 331
       };
323 332
     },
324 333
     methods: {
@@ -868,6 +877,37 @@
868 877
           url: "../receiptpage/receiptpage"
869 878
         });
870 879
       },
880
+			// 获取问卷配置
881
+			getQuestionnaireSet(){
882
+				uni.showLoading({
883
+				  title: "加载中",
884
+				  mask: true,
885
+				});
886
+				const userData = uni.getStorageSync("userData");
887
+				post("/simple/data/fetchDataList/questionnaireConfig",{
888
+					questionnaireConfig:{
889
+						hosId:userData.user.scope.hospitalId.id
890
+					},
891
+					idx:0,
892
+					sum:10
893
+				}).then((res) => {
894
+				  uni.hideLoading();
895
+				  if (res.status == 200) {
896
+				    let data = res.list[0];
897
+						if(data.taskTypeDTOS.length>0){
898
+							let isQuestion = data.taskTypeDTOS.find(i=> i.id == this.taskTypeId)
899
+							if(isQuestion){
900
+								this.isQuestionModel = true
901
+							}
902
+						}
903
+				  } else {
904
+				    uni.showToast({
905
+				      icon: "none",
906
+				      title: res.msg || "接口获取数据失败!",
907
+				    });
908
+				  }
909
+				});
910
+			}
871 911
     },
872 912
     onShow() {
873 913
       this.SMFlag = true;
@@ -877,7 +917,7 @@
877 917
       if (options.status == 200&&options.scanOrHand === 'hand'&&(options.type === "specimen"||options.type === "specimenPlan")) {
878 918
         this.hand_again();
879 919
       }
880
-      console.log(options, "result");
920
+			console.log(options , "options");
881 921
       this.queryObj = options;
882 922
       this.isKs = this.queryObj.isKs;
883 923
       if (options.infoData && options.infoData != "undefined") {
@@ -885,6 +925,7 @@
885 925
       } else if (options.model) {
886 926
         this.infoDATA = JSON.parse(options.model);
887 927
       }
928
+			console.log(this.infoDATA , "result");
888 929
       if (options.accountObj && options.accountObj != "undefined") {
889 930
         this.accountObj = JSON.parse(options.accountObj);
890 931
       }
@@ -895,6 +936,7 @@
895 936
         this.handover = options.handover;
896 937
       }
897 938
       this.dataId = options.id;
939
+			this.taskTypeId = options.taskTypeId
898 940
       this.RESData = options.resData;
899 941
       this.res["status"] = options.status;
900 942
       this.res["msg"] = options.msg;
@@ -904,6 +946,9 @@
904 946
       this.res["deptName"] = options.deptName;
905 947
       this.res["bedNum"] = options.bedNum;
906 948
       this.infoType = options.type1;
949
+			if(this.infoType == 'trans-dsd-1' && this.infoDATA.status == 200){
950
+				this.getQuestionnaireSet()
951
+			}
907 952
       if (options.dept) {
908 953
         this.DEPT = options.dept;
909 954
       }

+ 2 - 2
pages/scanning_code/scanning_code.vue

@@ -1179,7 +1179,7 @@
1179 1179
           uni.hideLoading();
1180 1180
           if (res.status == 200) {
1181 1181
             this.infoDATA = res.data;
1182
-						if(this.infoDATA.gdState.value=='7'){//7已完成
1182
+						if(this.infoDATA.gdState.value=='6' || this.infoDATA.gdState.value=='7'){//7已完成
1183 1183
 							this.getQuestionnaireSet()
1184 1184
 						}
1185 1185
             if(this.infoDATA.taskType.isDigitalHandover==1){
@@ -1205,7 +1205,7 @@
1205 1205
           uni.hideLoading();
1206 1206
           if (res.state == 200) {
1207 1207
             this.infoDATA = res.data;
1208
-						if(this.infoDATA.gdState.value=='7'){//7已完成
1208
+						if(this.infoDATA.gdState.value=='6' || this.infoDATA.gdState.value=='7'){//7已完成
1209 1209
 							this.getQuestionnaireSet()
1210 1210
 						}
1211 1211
             if(this.infoDATA.taskType.isDigitalHandover==1){