Browse Source

动态密钥开发

maotao 4 months ago
parent
commit
91c6a5c637

+ 219 - 0
components/appUpdata/appUpdata.vue

@@ -0,0 +1,219 @@
1
+<template>
2
+	<!-- 版本更新提示升级 -->
3
+	<view class="upbox" v-if="isUpdate">
4
+		<view class="content">
5
+	<!-- 		<view class="upimg">
6
+				<image class="img" src="/static/img/updata.png"></image>
7
+			</view> -->
8
+			<view class="versioninfo">
9
+				<view class="title">发现新版本</view>
10
+				<view class="schedule" v-if="isSchedule">	
11
+					<progress :percent="upProgress" show-info stroke-width="15" />
12
+				</view>
13
+				<view class="btn">
14
+					<button type="primary" size="mini" :disabled="isSchedule" @click="nowUpdate()">立即升级</button>
15
+				</view>
16
+			</view>
17
+		</view>
18
+	</view>
19
+</template>
20
+
21
+<script>
22
+	import {
23
+	  get,
24
+	  post
25
+	} from "../../http/http.js";
26
+	export default {
27
+		name:"appUpdata",
28
+		data() {
29
+			return {
30
+				isUpdate:false,
31
+				// 服务器图片地址
32
+				// baseUrl: configSetting.baseUrl,
33
+				isSchedule: false,
34
+				upProgress: 0,
35
+				Version: true,
36
+				// manifest 中应用版本名称
37
+				appVersion: '',
38
+				// manifest 中应用版本号
39
+				appVersionCode: '',
40
+				apkInfo: {},
41
+				apkUrl:'http://192.168.3.108/getapk/pdaz-v1.0.0.apk',
42
+				updateContent: []
43
+			};
44
+		},
45
+		created() {
46
+			this.getProperty()
47
+		},
48
+		methods: {
49
+			getProperty(){
50
+				// 获取本地应用资源版本号
51
+				plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
52
+					this.appVersion = wgtinfo.version;
53
+					this.appVersionCode = wgtinfo.versionCode;
54
+					// this.getVersionNumber();
55
+				})
56
+			},
57
+			// 获取后台版本号 检查是否有新版本
58
+			getVersionNumber() {
59
+				let version = this.appVersionCode;
60
+				// this.isUpdate = true;
61
+				post("/configuration/updData/workConfigHistory").then((res) => {
62
+				    if (res.status == 200) {
63
+				      if(res.appVersionCode > version) {
64
+				      	this.apkInfo = res;
65
+				      	this.isUpdate = true;
66
+				      } else {
67
+				      	this.isUpdate = false;
68
+				      }
69
+				    } else {
70
+						uni.showToast({
71
+							icon: "none",
72
+							title: res.msg || "接口获取数据失败!",
73
+						});
74
+					}
75
+				})	
76
+			},
77
+			// 暂不升级
78
+			notUpdate() {
79
+				this.isUpdate = false;
80
+			},
81
+			// 点击立即升级查看手机是安卓还是ios
82
+			nowUpdate() {
83
+				this.androidUpdate();
84
+			},
85
+			// 安卓更新
86
+			androidUpdate() {
87
+				// 浏览器安装
88
+				// plus.runtime.openURL(this.apkUrl, function(res) {
89
+				// 	console.log(res);  
90
+				// }); 
91
+				const downloadTask = uni.downloadFile({
92
+					url: this.apkUrl, //apk下载链接
93
+					success: (res) => {
94
+						if (res.statusCode !== 200) {
95
+							uni.showToast({
96
+								title: '下载安装包失败',
97
+								icon: 'error',
98
+								duration: 2000
99
+							});
100
+							this.isSchedule = false;
101
+							this.isUpdate = false;
102
+							return;
103
+						}
104
+						// 异步请求
105
+						if (res.statusCode === 200) {
106
+							console.log('更新成功');
107
+						// 更新好直接安装,下次启动生效
108
+						plus.runtime.install(res.tempFilePath, {
109
+							force: true
110
+						}, () => {
111
+							// uni.showModal({
112
+							// 	title: '安装成功是否重启?',
113
+							// 	success: res => {
114
+							// 		if (res.confirm) {
115
+							// 			//更新完重启app
116
+							// 			plus.runtime.restart();
117
+							// 		}
118
+							// 	}
119
+							// });				
120
+						}, err => {
121
+							uni.showToast({
122
+								title: '更新失败',
123
+								icon: 'error',
124
+								duration: 2000
125
+							});
126
+						})
127
+					 }	
128
+					},
129
+					fail: (err) => {
130
+						console.log('err',err);
131
+					},
132
+					//接口调用结束 调用成功、失败都会执行
133
+					complete: ()=>{
134
+						downloadTask.offProgressUpdate();//取消监听加载进度
135
+					}
136
+				});
137
+				//监听下载进度
138
+				downloadTask.onProgressUpdate(res => {
139
+					this.isSchedule = true;
140
+					this.upProgress = res.progress;
141
+					if(res.progress >= 100) {
142
+						this.isSchedule = false;
143
+						this.isUpdate = false;
144
+						this.$emit('getUpdate');
145
+					}
146
+				});
147
+			}
148
+		},
149
+		
150
+	}
151
+</script>
152
+
153
+<style scoped lang="scss">
154
+.upbox {
155
+	position: fixed;
156
+	z-index: 999;
157
+	top: 0;
158
+	right: 0;
159
+	width: 100%;
160
+	height: 100vh;
161
+	background-color: rgba(153, 153, 153, 0.75);
162
+	display: flex;
163
+	align-items: center;
164
+}	
165
+.content {
166
+	margin: 0 5%;
167
+	width: 90%;
168
+	text-align: center;
169
+	.upimg {
170
+		height: 420rpx;
171
+		width: 100%;
172
+		.img {
173
+			height: 100%;
174
+			width: 100%;
175
+		}
176
+	}
177
+	.versioninfo {
178
+		padding: 15rpx 30rpx;
179
+		border-radius: 25rpx;
180
+		background-color: #fff;
181
+	}
182
+	.title {
183
+		// position: absolute;
184
+		// top: 150rpx;
185
+		font-size: 40rpx;
186
+		// color: #fff;
187
+	}
188
+	.info {
189
+		position: relative;
190
+		padding-left: 38rpx;
191
+		view {
192
+			height: 50rpx;
193
+			line-height: 50rpx;
194
+		}
195
+	}
196
+	.schedule {
197
+		margin: 15rpx;
198
+		/deep/.uni-progress-bar {  
199
+		    border-radius: 30rpx;  
200
+		}  
201
+		/deep/.uni-progress-inner-bar {  
202
+		    border-radius: 30rpx;  
203
+		}
204
+	}
205
+	.btn {
206
+		height: 110rpx;
207
+		margin-top: 30rpx;
208
+		display: flex;
209
+		justify-content: space-evenly;
210
+		button {
211
+			width: 46%;
212
+			height: 75rpx;
213
+			display: flex;
214
+			align-items: center;
215
+			justify-content: center;
216
+		}
217
+	}
218
+}
219
+</style>

+ 10 - 4
components/bigScreen/bigScreen.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <view class="toolbar" @click="Scanning()" hover-class="seimin-btn-hover">
2
+  <view class="toolbar" :class="!isNumberKey?'fixed-class':''" @click="Scanning()" hover-class="seimin-btn-hover">
3 3
     <text class="toolbar-icon newicon newicon-saoma"></text>
4 4
     <text class="toolbar-sao">扫一扫</text>
5 5
     <!-- 填写交接人工号弹窗 -->
@@ -34,6 +34,9 @@
34 34
         SMFlag: true,
35 35
       }
36 36
     },
37
+		props:{
38
+			isNumberKey:Boolean
39
+		},
37 40
     methods: {
38 41
       // 填写交接人工号-确认
39 42
       hosOk(data) {
@@ -465,8 +468,11 @@
465 468
 
466 469
 <style lang="less">
467 470
   // 底部扫一扫
471
+	.fixed-class{
472
+		position: fixed;
473
+	}
468 474
   .toolbar {
469
-    position: fixed;
475
+    // position: fixed;
470 476
     left: 0;
471 477
     right: 0;
472 478
     bottom: 30rpx;
@@ -477,8 +483,8 @@
477 483
     align-items: center;
478 484
     box-sizing: border-box;
479 485
     border-radius: 4rpx;
480
-    box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.24);
481
-    background-color: #e5e9ed;
486
+    // box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.24);
487
+    // background-color: #e5e9ed;
482 488
 
483 489
     .toolbar-icon {
484 490
       font-size: 52rpx;

+ 161 - 0
components/numberKeyModel/numberKeyModel.vue

@@ -0,0 +1,161 @@
1
+<template>
2
+  <view class="showModel">
3
+		<view class="showModel__wrap">
4
+			<view class="showModel__header">
5
+			  数字密钥
6
+			</view>
7
+			<view class="content">
8
+				<view class="content-tip">请输入数字密钥。</view>
9
+				<view class="content-box">
10
+					<input class="content-item" v-for="(i, index) in keyArr" :key="index" v-model="i.value"/>
11
+				</view>
12
+			</view>
13
+			<view class="bottom">
14
+				<button class="bottom-btn confirm-btn" @click="confirm">确定</button>
15
+				<button class="bottom-btn" @click="cancel">取消</button>
16
+			</view>
17
+		</view>
18
+  </view>
19
+</template>
20
+
21
+<script>
22
+import {
23
+    get,
24
+    post,
25
+    SM
26
+  } from "../../http/http.js";
27
+export default {
28
+  data() {
29
+    return {
30
+      
31
+    };
32
+  },
33
+  watch: {
34
+
35
+  },
36
+  props: {
37
+		keyArr:{
38
+			type:Array,
39
+			default:[]
40
+		}
41
+  },
42
+	created(){
43
+		for(let i of this.keyArr){
44
+			i.value = null
45
+		}
46
+	},
47
+  methods: {
48
+    confirm(){
49
+			for(let i of this.keyArr){
50
+				if(!i.value){
51
+					uni.showToast({
52
+						title: `数字密钥为${this.keyArr.length}位数`,
53
+						duration: 1000,
54
+						icon:'none'
55
+					});
56
+					return
57
+				}
58
+			}
59
+			let arr = []
60
+			for(let i of this.keyArr){
61
+				arr.push(i.value)
62
+			}
63
+			post(`/dept/check/${arr.join('')}`).then((res) => {
64
+				if (res.status == 200) {
65
+					this.$emit('confirm',res.data)
66
+				}else{
67
+					uni.showToast({
68
+						title: res.msg,
69
+						duration: 1000,
70
+						icon:'none'
71
+					});
72
+				}
73
+			});
74
+    },
75
+    cancel(){
76
+      this.$emit('cancel')
77
+    },
78
+  },
79
+};
80
+</script>
81
+
82
+<style lang="less" scoped>
83
+.showModel {
84
+  position: fixed;
85
+  left: 0;
86
+  right: 0;
87
+  top: 0;
88
+  bottom: 0;
89
+  background-color: rgba(0, 0, 0, 0.2);
90
+  z-index: 99;
91
+
92
+  .showModel__wrap {
93
+    width: 90%;
94
+    position: absolute;
95
+    left: 50%;
96
+    top: 50%;
97
+    transform: translate(-50%, -50%);
98
+    background-color: #fff;
99
+    border-radius: 12rpx;
100
+
101
+    .showModel__header {
102
+      font-size: 36rpx;
103
+      color: #000;
104
+			font-weight: bold;
105
+      height: 84rpx;
106
+      display: flex;
107
+      justify-content: center;
108
+      align-items: center;
109
+    }
110
+		.content{
111
+			background: #FAFBFD;
112
+			border: 1px solid #E6E6E6;
113
+			margin-bottom: 20rpx;
114
+			.content-tip{
115
+				text-align: center;
116
+				padding: 50rpx 0 30rpx 0;
117
+				font-size: 28rpx;
118
+			}
119
+			.content-box{
120
+				display: flex;
121
+				justify-content: space-around;
122
+				margin-bottom: 20rpx;
123
+				.content-item{
124
+					width: 100rpx;
125
+					height: 100rpx;
126
+					border-radius: 10rpx;
127
+					border: 1px solid #CCCCCC;
128
+					color: #000;
129
+					font-size: 32rpx;
130
+					// margin: 0 20rpx;
131
+					text-align: center;
132
+				}
133
+			}
134
+		}
135
+		.bottom{
136
+			border-top: 1px solid #ccc;
137
+			display: flex;
138
+			uni-button{
139
+				border-radius: 0 !important;
140
+				background: #fff !important;
141
+			}
142
+			uni-button:after{
143
+				border: none !important;
144
+			}
145
+			.bottom-btn{
146
+				color: #A8A8A8;
147
+				font-size: 30rpx;
148
+				padding: 20rpx 0;
149
+				width: 50%;
150
+				display: flex;
151
+				align-items: center;
152
+				justify-content: center;
153
+			}
154
+			.confirm-btn{
155
+				color: #5DAC6B;
156
+				border-right: 1px solid #ccc;
157
+			}
158
+		}
159
+  }
160
+}
161
+</style>

+ 182 - 34
pages/checkAfterScanning/checkAfterScanning.vue

@@ -24,17 +24,24 @@
24 24
         </view>
25 25
       </view>
26 26
     </view>
27
-    <view class="foot_btn_spe">
28
-      <view class="btn1" @click="Scanning_complete()">核对完成</view>
29
-      <view class="btn3" @click="goBack">返回</view>
30
-    </view>
27
+		<view class="foot_btn_spe" v-if="enterDynamicDigitalKey==0">
28
+		  <view class="btn1" @click="Scanning_complete('scan')">核对完成</view>
29
+		  <view class="btn3" @click="goBack">取消</view>
30
+		</view>
31
+		<view class="foot_btn_spe" v-if="enterDynamicDigitalKey==1">
32
+			<view class="btn1" @click="Scanning_complete('scan')">扫一扫核对</view>
33
+		  <view class="btn1" @click="isShowKey()">数字核对</view>
34
+		  <view class="btn3" @click="goBack">返回</view>
35
+		</view>
31 36
     <!-- 弹窗 -->
32 37
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
33 38
       @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
34 39
     <!-- 弹窗 -->
35 40
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
36 41
       @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate"></showModel>
37
-  </view>
42
+		<!-- 动态密钥 -->
43
+		<numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
44
+	</view>
38 45
 </template>
39 46
 <script>
40 47
   import {
@@ -43,6 +50,7 @@
43 50
     SM,
44 51
     webHandle
45 52
   } from "../../http/http.js";
53
+	import numberKeyModel from "../../components/numberKeyModel/numberKeyModel.vue";
46 54
   export default {
47 55
     data() {
48 56
       return {
@@ -59,9 +67,120 @@
59 67
         models2: {
60 68
           disjunctor: false,
61 69
         },
70
+				showKey:false,
71
+				keyNum:4, //密钥位数
72
+				isNumberKey:false, //是否开启动态密钥
73
+				keyArr: [],
74
+				enterDynamicDigitalKey:null,
75
+				keyType:null,
76
+				contentData:null,
62 77
       };
63 78
     },
79
+		components: {
80
+			numberKeyModel
81
+		},
64 82
     methods: {
83
+			confirmKey(data){
84
+				this.Scanning_complete('key')
85
+				this.contentData = data
86
+				this.showKey = false
87
+			},
88
+			isShowKey(){
89
+				this.showKey = true
90
+			},
91
+			// 获取配置
92
+			getConfig() {
93
+				// 判断开关
94
+				const userData = uni.getStorageSync("userData");	
95
+				let postData = {
96
+					idx: 0,
97
+					sum: 9999,
98
+					hospitalConfig:{
99
+						hosId:userData.user.currentHospital.id,
100
+						model:"all"
101
+					}
102
+				};
103
+			
104
+				post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
105
+						if (result.status == 200) {
106
+							this.keyArr = []
107
+							for(let i of result.list){
108
+								if(i.key=='digitalSecretKey'){
109
+									if(i.value==1){
110
+										this.isNumberKey = true
111
+									}else{
112
+										this.isNumberKey = false
113
+									}
114
+								}else if(i.key=='numberDigitalSecretKey'){
115
+									this.keyNum = Number(i.value) 
116
+								}
117
+							}
118
+							for(let i = 0; i < this.keyNum; i++){
119
+								this.keyArr.push({
120
+									value:null
121
+								})
122
+							}
123
+						}
124
+					});
125
+				
126
+			  uni.showLoading({
127
+			    title: "加载中",
128
+			    mask: true,
129
+			  });
130
+			  // 查询标本配送业务
131
+			  post("/simple/data/fetchDataList/taskType",{
132
+			      "idx": 0,
133
+			      "sum": 10,
134
+			      "taskType": {
135
+			          "simpleQuery": true,
136
+			          "hosId": {
137
+			              "id": userData.user.currentHospital.id
138
+			          },
139
+			          "associationType": {
140
+			              "key": "association_types",
141
+			              "value": "specimen"
142
+			          }
143
+			      }
144
+			  }).then((res) => {
145
+			    if (res.status == 200) {
146
+			      let taskTypeDTO = res.list[0];
147
+			  		if(taskTypeDTO){
148
+			        // 查询业务页面控制-标本
149
+			        post("/simple/data/fetchDataList/taskTypeConfig",{
150
+			            "idx": 0,
151
+			            "sum": 10,
152
+			            "taskTypeConfig": {
153
+			              taskTypeDTO,
154
+			            }
155
+			        }).then((res) => {
156
+			          if (res.status == 200) {
157
+			            let data = res.list[0];
158
+									uni.hideLoading();
159
+			        		if(data){
160
+										// 输入动态数字密钥
161
+			              this.enterDynamicDigitalKey = data.enterDynamicDigitalKey
162
+										console.log(55555,this.enterDynamicDigitalKey)
163
+			            }
164
+			          } else {
165
+			            uni.hideLoading();
166
+			            uni.showToast({
167
+			              icon: "none",
168
+			              title: res.msg || "接口获取数据失败!",
169
+			            });
170
+			          }
171
+			        });
172
+			      }else{
173
+			        uni.hideLoading();
174
+			      }
175
+			    } else {
176
+			      uni.hideLoading();
177
+			      uni.showToast({
178
+			        icon: "none",
179
+			        title: res.msg || "接口获取数据失败!",
180
+			      });
181
+			    }
182
+			  });
183
+			},
65 184
       // 获取核对信息
66 185
       getInfo(gdId){
67 186
         uni.showLoading({
@@ -130,34 +249,61 @@
130 249
                     if(data.arriveScanCode == 1){
131 250
                       // 扫描科室二维码
132 251
                       uni.hideLoading();
133
-                      SM().then((content) => {
134
-                        let postData = {
135
-                          code: content,
136
-                          type: 'specimen',
137
-                          hosId: userData.user.currentHospital.id,
138
-                          orderId: +this.queryObj.id,
139
-                        };
140
-                        console.log(postData)
141
-                        uni.showLoading({
142
-                          title: "加载中",
143
-                          mask: true,
144
-                        });
145
-                        post("/workerOrder/arriveScanCheck", postData).then((res) => {
146
-                          uni.hideLoading();
147
-                          if (res.state == 200) {
148
-                            this.handoverId = res.handover;//扫动态码或静态码,后端会返回交接人,核对完成接口传过去
149
-                            this.handoverDeptId = res.handoverDeptId;//扫动态码或静态码,后端会返回科室,核对完成接口传过去
150
-                            fn();
151
-                          } else {
152
-                            uni.showToast({
153
-                              icon: "none",
154
-                              title: res.msg || "接口获取数据失败!",
155
-                            });
156
-                          }
157
-                        })
158
-                      }).catch(err => {
159
-                        
160
-                      });
252
+											if(this.keyType=='key'){
253
+												let postData = {
254
+													code: this.contentData,
255
+													type: 'specimen',
256
+													hosId: userData.user.currentHospital.id,
257
+													orderId: +this.queryObj.id,
258
+												};
259
+												console.log(postData)
260
+												uni.showLoading({
261
+													title: "加载中",
262
+													mask: true,
263
+												});
264
+												post("/workerOrder/arriveScanCheck", postData).then((res) => {
265
+													uni.hideLoading();
266
+													if (res.state == 200) {
267
+														this.handoverId = res.handover;//扫动态码或静态码,后端会返回交接人,核对完成接口传过去
268
+														this.handoverDeptId = res.handoverDeptId;//扫动态码或静态码,后端会返回科室,核对完成接口传过去
269
+														fn();
270
+													} else {
271
+														uni.showToast({
272
+															icon: "none",
273
+															title: res.msg || "接口获取数据失败!",
274
+														});
275
+													}
276
+												})
277
+											}else{
278
+												SM().then((content) => {
279
+												  let postData = {
280
+												    code: content,
281
+												    type: 'specimen',
282
+												    hosId: userData.user.currentHospital.id,
283
+												    orderId: +this.queryObj.id,
284
+												  };
285
+												  console.log(postData)
286
+												  uni.showLoading({
287
+												    title: "加载中",
288
+												    mask: true,
289
+												  });
290
+												  post("/workerOrder/arriveScanCheck", postData).then((res) => {
291
+												    uni.hideLoading();
292
+												    if (res.state == 200) {
293
+												      this.handoverId = res.handover;//扫动态码或静态码,后端会返回交接人,核对完成接口传过去
294
+												      this.handoverDeptId = res.handoverDeptId;//扫动态码或静态码,后端会返回科室,核对完成接口传过去
295
+												      fn();
296
+												    } else {
297
+												      uni.showToast({
298
+												        icon: "none",
299
+												        title: res.msg || "接口获取数据失败!",
300
+												      });
301
+												    }
302
+												  })
303
+												}).catch(err => {
304
+												  
305
+												});
306
+											}
161 307
                     }else{
162 308
                       uni.hideLoading();
163 309
                       fn();
@@ -194,7 +340,8 @@
194 340
         
195 341
       },
196 342
       // 完成核对
197
-      Scanning_complete() {
343
+      Scanning_complete(type) {
344
+				this.keyType = type
198 345
         this.beforeScanning(() => {
199 346
           if (
200 347
             this.queryObj.type1 == "plan-spe-ddd-2" ||
@@ -400,6 +547,7 @@
400 547
       console.log(options);
401 548
       this.queryObj = options;
402 549
       this.getInfo(this.queryObj.id);
550
+			this.getConfig();
403 551
       // #ifdef APP-PLUS
404 552
       webHandle("no", "app");
405 553
       // #endif

+ 15 - 6
pages/homePage/homePage.vue

@@ -78,7 +78,9 @@
78 78
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
79 79
       @ok="ok2" @cancel="cancel2" :operate="models2.operate">
80 80
     </showModel>
81
-  </view>
81
+		<!-- apk自动更新 -->
82
+		<appUpdata v-if="isApp && isUpdate" @getUpdate="isUpdate=false"></appUpdata>
83
+	</view>
82 84
 </template>
83 85
 
84 86
 <script>
@@ -89,6 +91,7 @@
89 91
     webHandle
90 92
   } from "../../http/http.js";
91 93
   import showModel from "../../components/showModel/showModel.vue";
94
+	import appUpdata from "../../components/appUpdata/appUpdata.vue";
92 95
   import {
93 96
     AES,
94 97
     mode,
@@ -151,9 +154,13 @@
151 154
         models2: {
152 155
           disjunctor: false,
153 156
         },
154
-        objHistory: {}
157
+        objHistory: {},
158
+				isUpdate:true
155 159
       };
156 160
     },
161
+		components: {
162
+			appUpdata
163
+		},
157 164
     methods: {
158 165
       //aes加密
159 166
       encryptByEnAES(data) {
@@ -1113,6 +1120,11 @@
1113 1120
       if (uni.getStorageSync("userData")) {
1114 1121
         this.online = uni.getStorageSync("userData").user.online;
1115 1122
       }
1123
+			// #ifdef APP-PLUS
1124
+			this.isApp = true;
1125
+			this.isUpdate = true;
1126
+			uni.closeSocket();
1127
+			// #endif
1116 1128
       if (!this.workSchemeType) {
1117 1129
         return;
1118 1130
       }
@@ -1124,9 +1136,6 @@
1124 1136
       let userId = uni.getStorageSync("userData").user.id;
1125 1137
       this.getWorkScheme(true, uni.getStorageSync("userData").user.currentHospital.id);
1126 1138
       this.getHistorys(userId); //获取上班历史记录
1127
-      // #ifdef APP-PLUS
1128
-      uni.closeSocket();
1129
-      // #endif
1130 1139
       // #ifdef H5
1131 1140
       document.body.addEventListener("touchmove", this.stop, {
1132 1141
         passive: false,
@@ -1164,6 +1173,7 @@
1164 1173
       //#endif
1165 1174
       // #ifdef APP-PLUS
1166 1175
       this.isApp = true;
1176
+			this.isUpdate = true;
1167 1177
       // 通知权限 start
1168 1178
       // var main = plus.android.runtimeMainActivity();
1169 1179
       // var pkName = main.getPackageName();
@@ -1200,7 +1210,6 @@
1200 1210
 <style lang="less" scoped>
1201 1211
   .HomeItem {
1202 1212
     height: 100vh;
1203
-
1204 1213
     .login {
1205 1214
       height: 420rpx;
1206 1215
       padding: 0 32rpx;

+ 214 - 0
pages/receipt_infopage/receipt_infopage.vue

@@ -446,9 +446,12 @@
446 446
     <checkboxModal v-if="checkboxModels.disjunctor" :content="checkboxModels.content" :disjunctor="checkboxModels.disjunctor"
447 447
       @ok="checkboxOk" @cancel="checkboxCancel">
448 448
     </checkboxModal>
449
+		<!-- PDA扫描 -->
450
+		<scanner></scanner>
449 451
   </view>
450 452
 </template>
451 453
 <script>
454
+	import scanner from "../../components/scanner/scanner.vue";
452 455
   import selectAccount from "../../components/selectAccount/selectAccount.vue";
453 456
   import smallScreen from "../../components/smallScreen/smallScreen.vue";
454 457
   import {
@@ -464,6 +467,7 @@
464 467
   export default {
465 468
     components: {
466 469
       selectAccount,
470
+			scanner
467 471
     },
468 472
     data() {
469 473
       return {
@@ -1581,7 +1585,217 @@
1581 1585
           }
1582 1586
         });
1583 1587
       },
1588
+			// 获取是否需要选择陪检方式
1589
+			getInspectAndPatientTransform(content){
1590
+				let sData = this.infoDATA
1591
+				let sType = null
1592
+				if(((!sData.worker)||(sData.worker&&sData.worker.id == this.currentUserId))&&sData.gdState.value != 6&&sData.gdState.value != 7&&sData.gdState.value != 11){
1593
+					if(sData.gdState.value != 2 &&
1594
+				  sData.taskType.associationType.value != 'jPBag' &&
1595
+				  sData.taskType.associationType.value != 'drugsBag' &&
1596
+				  sData.taskType.associationType.value != 'specimen' &&
1597
+				  sData.taskType.associationType.value != 'specimenPlan' &&
1598
+				  sData.taskType.associationType.value != 'ordinary' &&
1599
+				  !(sData.taskType.associationType.value == 'other' && (sData.gdState.value == 4 && sData.taskType.carryingCourses[0].actionsSwitch || sData.gdState.value == 5 && sData.taskType.carryingCourses[1].actionsSwitch))){
1600
+						sType = 1
1601
+					}
1602
+				}
1603
+				if(sData.gdState.value != 2 &&
1604
+				  sData.taskType.associationType.value != 'patientTransport' &&
1605
+				  sData.taskType.associationType.value != 'inspect' &&
1606
+				  sData.taskType.associationType.value != 'other' &&
1607
+				  sData.taskType.associationType.value != 'ordinary'){
1608
+						sType = 2
1609
+					}
1610
+			  // 患者陪检,患者其他服务,工单状态是待到达
1611
+			  if((sData.taskType.associationType.value === 'inspect' || sData.taskType.associationType.value === 'patientTransport') && sData.gdState.value == 4){
1612
+			    const postData = {
1613
+			      "idx":0,
1614
+			      "sum":1,
1615
+			      "taskTypeConfig":{
1616
+			        "taskTypeDTO":{
1617
+			          "hosId": {"id": this.hosId},
1618
+			          "associationType": {
1619
+			            "key": "association_types",
1620
+			            "value":"inspect",
1621
+			          },
1622
+			        },
1623
+			      },
1624
+			    };
1625
+			    uni.showLoading({
1626
+			      mask: true,
1627
+			      title: '加载中'
1628
+			    })
1629
+			    post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
1630
+			      console.log(res)
1631
+			      if (res.status == 200) {
1632
+			        res.list = res.list || [];
1633
+			        if(res.list[0] && res.list[0].signTypeIds){
1634
+			          // 如果开启
1635
+			          const postData = {
1636
+			            "idx":0,
1637
+			            "sum":9999,
1638
+			            "workOrderInspectScore":{
1639
+			              "hosId": this.hosId,
1640
+			            },
1641
+			          };
1642
+			          post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
1643
+			            console.log(res)
1644
+			            uni.hideLoading();
1645
+			            if (res.status == 200) {
1646
+			              res.list = res.list || [];
1647
+			              let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
1648
+			              console.log(radioInspectionDistanceItem)
1649
+			              this.models4 = {
1650
+			                disjunctor: true,
1651
+			                title: "请选择陪检方式",
1652
+			                radioInspectionDistanceItem,
1653
+			                icon: "",
1654
+			                operate: {
1655
+			                  ok: "确定",
1656
+			                  cancel: "取消",
1657
+			                },
1658
+			              };
1659
+			            } else {
1660
+			              uni.showToast({
1661
+			                icon: "none",
1662
+			                title: res.msg || "接口获取数据失败!",
1663
+			              });
1664
+			            }
1665
+			          })
1666
+			        }else{
1667
+			          uni.hideLoading();
1668
+			          this.Scan_ss(content,sData,sType);
1669
+			        }
1670
+			      } else {
1671
+			        uni.hideLoading();
1672
+			        uni.showToast({
1673
+			          icon: "none",
1674
+			          title: res.msg || "接口获取数据失败!",
1675
+			        });
1676
+			      }
1677
+			    })
1678
+			  }else{
1679
+			    this.Scan_ss(content,sData,sType);
1680
+			  }
1681
+			},
1682
+			Scan_ss(content, data, type) {
1683
+			  if (!this.SMFlag) {
1684
+			    return;
1685
+			  }
1686
+			  this.SMFlag = false;
1687
+			  this.currentData = data;
1688
+				if(content){
1689
+					content = content.replace('\n','')
1690
+					uni.showLoading({
1691
+						title: "加载中",
1692
+						mask: true,
1693
+					});
1694
+					//检验二维码的有效性
1695
+					post("/dept/scanning", {
1696
+						content: content,
1697
+						taskTypeId: data.taskType.id,
1698
+						gdState: data.gdState.id,
1699
+					}).then((result) => {
1700
+						this.SMFlag = true;
1701
+						this.currentCode = result.code;
1702
+						if (result.state == 200 || result.state == 201) {
1703
+							if (result.account) {
1704
+								if (type == 1) {
1705
+									this.isOpenTransportationProcessRemarks(this.currentData, {
1706
+										account: result.account,
1707
+										accountName: result.name,
1708
+										accountId: result.id,
1709
+									}, 'nextDeptOrder_ss');
1710
+								} else if (type == 2) {
1711
+									this.nextDeptOrder_s(this.currentData, {
1712
+										account: result.account,
1713
+										accountName: result.name,
1714
+										accountId: result.id,
1715
+									});
1716
+								}
1717
+							} else {
1718
+								if (type == 1) {
1719
+									this.isOpenTransportationProcessRemarks(this.currentData, undefined, 'nextDeptOrder_ss');
1720
+								} else if (type == 2) {
1721
+									this.nextDeptOrder_s(this.currentData);
1722
+								}
1723
+							}
1724
+						} else if (result.state == '0000') {
1725
+							uni.hideLoading();
1726
+							// this.showSelectAccount(); //yeye
1727
+						} else {
1728
+							uni.hideLoading();
1729
+							uni.showToast({
1730
+								icon: "none",
1731
+								title: result.info || "接口获取数据失败!",
1732
+							});
1733
+						}
1734
+					});
1735
+				}
1736
+			},
1737
+			// 其他临床服务-运输过程-终点科室是否开通备注填写
1738
+			isOpenTransportationProcessRemarks(data, accountObj, funName){
1739
+			  const tasktype = data.taskType;
1740
+			  console.log(tasktype, data);
1741
+			  if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[1].logSwitch && data.gdState.value == 5){
1742
+			    uni.navigateTo({
1743
+			      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)) : ''}`
1744
+			    })
1745
+			  }else{
1746
+			    this[funName](data, accountObj);
1747
+			  }
1748
+			},
1749
+			// 如果不是患者陪检或患者转运或其他
1750
+			// 科室签到
1751
+			nextDeptOrder_s(data, accountObj) {
1752
+			  console.log(this.currentCode);
1753
+			  let ids = [];
1754
+			  let id = data.id;
1755
+			  ids.push(id);
1756
+			  let code = "";
1757
+			  let postData = {
1758
+			    ids
1759
+			  };
1760
+			  if (accountObj) {
1761
+			    postData.handover = [accountObj.accountId];
1762
+			  }
1763
+			  if (this.currentCode) {
1764
+			    code = this.currentCode;
1765
+			    // 科室签到
1766
+			    post("/workerOrder/orderSign/" + code, postData).then((res) => {
1767
+			      uni.hideLoading();
1768
+			      if (res.status == 200) {
1769
+			        // 跳转到扫描科室
1770
+			        // type1: res.type, //type类型
1771
+			        // id: data.id, //工单ID
1772
+			        // deptCode: code, //二维码
1773
+			        // dept: res.dept //科室名称
1774
+			        console.log(data,'工单')
1775
+			        let endDepts = data.endDepts.map(v=>v.id).toString();
1776
+			        console.log(endDepts,'smallScreen');
1777
+			        uni.navigateTo({
1778
+			          url: `../../pages/scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&endDepts=${endDepts}`,
1779
+			        });
1780
+			      } else {
1781
+			        uni.navigateTo({
1782
+			          url: `../../pages/scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1&qrcode=${this.currentCode}`,
1783
+			        });
1784
+			      }
1785
+			    });
1786
+			  }
1787
+			},
1584 1788
     },
1789
+		onShow(){
1790
+		  this.SMFlag = true;
1791
+			let that = this
1792
+			// #ifdef APP-PLUS
1793
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
1794
+			uni.$on('scan', function(data) {
1795
+				that.getInspectAndPatientTransform(data)
1796
+			})
1797
+			// #endif
1798
+		},
1585 1799
     onLoad(options) {
1586 1800
       console.log(options, 'options');
1587 1801
       options.associationTypeValue === 'drugsBag' && this.isShowDrugsBatchInfo();

+ 231 - 15
pages/receiptpage/receiptpage.vue

@@ -316,15 +316,22 @@
316 316
         </view>
317 317
       </scroll-view>
318 318
     </view>
319
-    <!-- 底部扫一扫 -->
320
-    <view class="bigScreenWrap">
321
-      <bigScreen ref="bigscreen"></bigScreen>
322
-      <view class="more" v-if="arrayBigScreen.length"></view>
323
-      <picker class="more_picker" @cancel="cancelPicker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
324
-        :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
325
-        <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
326
-      </picker>
327
-    </view>
319
+		<view class="bigScreenWrap">
320
+			<view class="left" @click="isShowKey" v-if="isNumberKey">
321
+				<text class="left-icon newicon newicon-miyue"></text>
322
+				<view class="left-title">数字密钥</view>
323
+			</view>
324
+			<!-- 底部扫一扫 -->
325
+			<view class="right" :class="!isNumberKey?'right-100':''">
326
+			  <bigScreen ref="bigscreen" :isNumberKey="isNumberKey"></bigScreen>
327
+			  <view class="more" v-if="arrayBigScreen.length"></view>
328
+			  <picker class="more_picker" @cancel="cancelPicker" @click.stop @change="execFilterBigScreen($event)" :value="indexBigScreen"
329
+			    :range="arrayBigScreen" range-key="name" v-if="arrayBigScreen.length">
330
+			    <view class="uni-input">{{ arrayBigScreen[indexBigScreen].name }}</view>
331
+			  </picker>
332
+			</view>
333
+		</view>
334
+
328 335
 		<!-- 悬浮按钮 -->
329 336
     <uni-fab :pattern="pattern" :content="content" :direction="direction" @fabClick="fabClick" @trigger="trigger"></uni-fab>
330 337
 		<!-- 弹窗 -->
@@ -413,6 +420,8 @@
413 420
     <!-- 示闲弹窗 -->
414 421
     <showModel :title="models4.title" icon="models4.icon" :disjunctor="models4.disjunctor" :content="models4.content" @know="know4" @ok="ok4" @cancel="cancel4" :operate="models4.operate"></showModel>
415 422
 		<scanner></scanner>
423
+		<!-- 动态密钥 -->
424
+		<numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
416 425
 	</view>
417 426
 </template>
418 427
 <script>
@@ -421,11 +430,13 @@
421 430
 	import scanner from "../../components/scanner/scanner.vue";
422 431
   import showModel from "../../components/showModel/showModel.vue";
423 432
   import bigScreen from "../../components/bigScreen/bigScreen.vue";
433
+	import numberKeyModel from "../../components/numberKeyModel/numberKeyModel.vue";
424 434
   // https://ext.dcloud.net.cn/plugin?id=144
425 435
   import uniFab from "@/components/uni-fab/uni-fab.vue";
426 436
 	import uniDrawer from "@/components/uni-drawer/uni-drawer.vue";
427 437
 	import ldSelect from "@/components/ld-select/ld-select.vue";
428 438
 	import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
439
+	
429 440
   import {
430 441
     get,
431 442
     post,
@@ -577,6 +588,17 @@
577 588
         scroll_top: 0, //距离顶部的距离
578 589
         scroll_refresher_enabled: true, //是否开启自定义下拉刷新
579 590
         quiltCode: '',
591
+				tabType: "", //当前选中项
592
+				selectArr: [], //选中项
593
+				workData: [],
594
+				userId: {
595
+				  ids: [],
596
+				},
597
+				code: "",
598
+				showKey:false,
599
+				keyNum:4, //密钥位数
600
+				isNumberKey:false, //是否开启动态密钥
601
+				keyArr: []
580 602
       };
581 603
     },
582 604
 		components: {
@@ -616,15 +638,184 @@
616 638
       uniFab,
617 639
       showModel,
618 640
       bigScreen,
641
+			numberKeyModel,
619 642
 			scanner,
620 643
       selectAccount,
621 644
     },
622 645
     methods: {
646
+			confirmKey(data){
647
+				this.padChange(data)
648
+				this.showKey = false
649
+			},
650
+			isShowKey(){
651
+				this.showKey = true
652
+			},
653
+			// 获取配置
654
+			getConfig() {
655
+			  let postData = {
656
+			    idx: 0,
657
+			    sum: 9999,
658
+					hospitalConfig:{
659
+						hosId:this.hosId,
660
+						model:"all"
661
+					}
662
+			  };
663
+
664
+			  post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
665
+			      if (result.status == 200) {
666
+							this.keyArr = []
667
+							for(let i of result.list){
668
+								if(i.key=='digitalSecretKey'){
669
+									if(i.value==1){
670
+										this.isNumberKey = true
671
+									}else{
672
+										this.isNumberKey = false
673
+									}
674
+								}else if(i.key=='numberDigitalSecretKey'){
675
+									this.keyNum = Number(i.value) 
676
+								}
677
+							}
678
+							for(let i = 0; i < this.keyNum; i++){
679
+								this.keyArr.push({
680
+									value:null
681
+								})
682
+							}
683
+							console.log(444,this.keyArr)
684
+			      }
685
+			    });
686
+			},
687
+			// 标本配送-待送达-运输过程-标本数字交接,则,科室签到不需要填写交接人
688
+			validateHandoverSpecimen(){
689
+			  return post("/simple/data/fetchDataList/taskType", {
690
+			    "idx": 0,
691
+			    "sum": 1,
692
+			    "taskType": {
693
+			        "hosId": {
694
+			            "id": this.hosId
695
+			        },
696
+			        "associationType": {
697
+			            "key": "association_types",
698
+			            "value": "specimen"
699
+			        }
700
+			    }
701
+			  });
702
+			},
703
+			//科室签到
704
+			//trueBigScanner----判断是否大扫描
705
+			//bigScanner----判断是否需要交接人
706
+			//accountObj----弹窗填写的交接人信息
707
+			async orderDeptHandler(bigScanner, accountObj) {
708
+			  console.log(this.infoDATA);
709
+			  uni.showLoading({
710
+			    title: "加载中",
711
+			    mask: true,
712
+			  });
713
+			  if(this.tabType === 'specimen' && this.infoDATA.specimen && this.infoDATA.specimen[0].gdState.value == 5){
714
+			    let result = await this.validateHandoverSpecimen();
715
+			    if (result.status == 200) {
716
+			      if(result.list.length){
717
+			        // 标本-运送过程-终点科室-标本数字交接
718
+			        if(result.list[0].carryingCourses[1].checkoutMethod.value == 3){
719
+			          bigScanner = false;
720
+			        }
721
+			      }else{
722
+			        uni.showToast({
723
+			          icon: "none",
724
+			          title: "请配置标本配送任务类型!",
725
+			        });
726
+			        uni.hideLoading();
727
+			        return;
728
+			      }
729
+			    }
730
+			  }
731
+			  let type = "orderSign/" + this.code;
732
+			  let list = {
733
+			    ids: this.userId.ids,
734
+			    trueBigScanner: ['666']
735
+			  };
736
+			  bigScanner && (list.bigScanner = ['666']);
737
+			  if (accountObj) {
738
+			    list.handover = [accountObj.accountId];
739
+			  }
740
+			
741
+			  post("/workerOrder/" + type, list).then((res) => {
742
+			    console.log(this.tabType)
743
+			    uni.hideLoading();
744
+			    if (res.status == 200) {
745
+			      if (this.tabType == 'specimenPlan') {
746
+			        // -----------------------------
747
+			        console.log(this.selectArr, '选中工单')
748
+			        let gd = this.infoDATA.specimenPlan.find(v => v.id == this.selectArr[0]);
749
+			        let startDeptId = gd.startDept.id; //起点科室id
750
+			        let isDigitalHandover = gd.taskType.isDigitalHandover; //是否数字交接开关
751
+			        let signDeptId = res.deptId; //签到的科室id
752
+			        let gdId = gd.id;
753
+			        let gdState = gd.gdState.value;
754
+			        let endDepts = gd.endDepts.map(v => v.id).toString();
755
+			        uni.navigateTo({
756
+			          url: `../scanning_djEnd/scanning_djEnd?type=${
757
+			            this.tabType
758
+			          }&type1=${res.type}&code=${this.code}&dept=${
759
+			            res.dept
760
+			          }&ids=${encodeURIComponent(
761
+			            JSON.stringify(this.userId.ids)
762
+			          )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&startDeptId=${startDeptId}&isDigitalHandover=${isDigitalHandover}&signDeptId=${signDeptId}&gdId=${gdId}&gdState=${gdState}&endDepts=${endDepts}`,
763
+			        });
764
+			      } else if (this.tabType == 'specimen') {
765
+			        // 同济是false
766
+			        if (res.deptType && res.deptType.value === 'middleRoom') {
767
+			        // if (false) {
768
+			          // 如果是中转科室
769
+			          uni.navigateTo({
770
+			            url: `../checkAfterBigScreen/checkAfterBigScreen?type=${
771
+			            this.tabType
772
+			          }&type1=${res.type}&code=${this.code}&dept=${
773
+			            res.dept
774
+			          }&ids=${encodeURIComponent(
775
+			            JSON.stringify(this.userId.ids)
776
+			          )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
777
+			          });
778
+			        } else if(res.type === 'spe-dsd-4'){
779
+			          // 检验方式是标本数字交接
780
+			          uni.navigateTo({
781
+			            url: `/pages/specimenHandoverNew/specimenHandoverNew?type=${
782
+			            this.tabType
783
+			          }&type1=${res.type}&code=${this.code}&dept=${
784
+			            res.dept
785
+			          }&ids=${encodeURIComponent(
786
+			            JSON.stringify(this.userId.ids)
787
+			          )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
788
+			          });
789
+			        } else{
790
+			          uni.navigateTo({
791
+			            url: `../scanning_djEnd/scanning_djEnd?type=${
792
+			            this.tabType
793
+			          }&type1=${res.type}&code=${this.code}&dept=${
794
+			            res.dept
795
+			          }&ids=${encodeURIComponent(
796
+			            JSON.stringify(this.userId.ids)
797
+			          )}&model=${encodeURIComponent(JSON.stringify(res))}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
798
+			          });
799
+			        }
800
+			      }
801
+			    } else if (res.status == "0000") {
802
+			      this.showSelectAccount();
803
+			    } else {
804
+			      this.flag = true;
805
+			      uni.navigateTo({
806
+			        url: `../scanning_djEnd/scanning_djEnd?type=${this.tabType}&type1=${
807
+			        res.type
808
+			      }&code=${this.code}&dept=${res.dept}&ids=${encodeURIComponent(
809
+			        JSON.stringify(this.userId.ids)
810
+			      )}&model=${encodeURIComponent(JSON.stringify(res))}&deptId=${res.deptId}`,
811
+			      });
812
+			    }
813
+			  });
814
+			},
623 815
 			padChange(scannerCode){
624
-				scannerCode = scannerCode.replace('\n','')
625
-				// if(e.detail.value.length<5){
626
-				// 	return
627
-				// }
816
+				if(!this.isNumberKey){
817
+					scannerCode = scannerCode.replace('\n','')
818
+				}
628 819
 				if (!this.SMFlag) {
629 820
 				  return;
630 821
 				}
@@ -2742,7 +2933,7 @@
2742 2933
       // #endif
2743 2934
       this.selectedLabelSlots = "执行中";
2744 2935
       this.initList();
2745
-      
2936
+      this.getConfig();
2746 2937
       // 科室二维码切换科室回显
2747 2938
       if (options.showDepartmentQrcodeId && options.showDepartmentQrcodeDept) {
2748 2939
         this.updateUser({id: options.showDepartmentQrcodeId, dept: options.showDepartmentQrcodeDept})
@@ -2755,11 +2946,11 @@
2755 2946
       // #endif
2756 2947
     },
2757 2948
     onShow() {
2949
+			this.getConfig();
2758 2950
 			let that = this
2759 2951
 			// #ifdef APP-PLUS
2760 2952
 			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
2761 2953
 			uni.$on('scan', function(data) {
2762
-				console.log(888,data)
2763 2954
 				that.padChange(data)
2764 2955
 			})
2765 2956
 			// #endif
@@ -2924,6 +3115,31 @@
2924 3115
       bottom: 30rpx;
2925 3116
       z-index: 999;
2926 3117
       height: 88rpx;
3118
+			padding: 0 8rpx;
3119
+			display: flex;
3120
+			.left{
3121
+				width: 25%;
3122
+				background-color: #e5e9ed;
3123
+				margin-right: 8rpx;
3124
+				display: flex;
3125
+				align-items: center;
3126
+				justify-content: center;
3127
+				.left-title{
3128
+					font-size: 30rpx;
3129
+				}
3130
+				.left-icon{
3131
+					font-size: 34rpx;
3132
+					margin-right: 10rpx;
3133
+					color: #07863c;
3134
+				}
3135
+			}
3136
+			.right{
3137
+				width: 75%;
3138
+				background-color: #e5e9ed;
3139
+			}
3140
+			.right-100{
3141
+				width: 100% !important;
3142
+			}
2927 3143
     }
2928 3144
 
2929 3145
     .red {

+ 9 - 0
pages/scanning/scanning.vue

@@ -270,6 +270,15 @@
270 270
         };
271 271
       },
272 272
     },
273
+		onShow() {
274
+			let that = this
275
+			// #ifdef APP-PLUS
276
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
277
+			// uni.$on('scan', function(data) {
278
+			// 	that.pdaChange(data)
279
+			// })
280
+			// #endif
281
+		},
273 282
     onLoad(options) {
274 283
       console.log(options, 'options')
275 284
       this.queryObj = options;

+ 9 - 0
pages/scanning_B/scanning_B.vue

@@ -419,6 +419,15 @@
419 419
         };
420 420
       },
421 421
     },
422
+		onShow() {
423
+			let that = this
424
+			// #ifdef APP-PLUS
425
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
426
+			// uni.$on('scan', function(data) {
427
+			// 	that.pdaChange(data)
428
+			// })
429
+			// #endif
430
+		},
422 431
     onLoad(options) {
423 432
       this.res = JSON.parse(options.res);
424 433
       this.infoDATA = JSON.parse(options.infoDATA); //详细信息

+ 21 - 3
pages/scanning_Result/scanning_Result.vue

@@ -261,9 +261,12 @@
261 261
     </handViewSpecimen>
262 262
 		<!-- 调查问卷二维码 -->
263 263
 		 <questionCode v-if="isQuestionModel" :orderId="dataId" @know="isQuestionModel = false"></questionCode>
264
-  </view>
264
+		<!-- PDA扫描 -->
265
+		<scanner></scanner>
266
+	</view>
265 267
 </template>
266 268
 <script>
269
+	import scanner from "../../components/scanner/scanner.vue";
267 270
   import showModel from "../../components/showModel/showModel.vue";
268 271
 	import questionCode from "../../components/questionCode/questionCode.vue";
269 272
   import {
@@ -280,7 +283,8 @@
280 283
   } from '../../tools/enum.drugsbagType.js';
281 284
   export default {
282 285
 		components:{
283
-			questionCode
286
+			questionCode,
287
+			scanner
284 288
 		},
285 289
     data() {
286 290
       return {
@@ -429,7 +433,9 @@
429 433
                       if(flag){
430 434
                         setTimeout(()=>{
431 435
                           if (type === 'scan') {
432
-                            this.Scanning_again();
436
+														// #ifdef H5
437
+														this.Scanning_again();
438
+														// #endif
433 439
                           }
434 440
                         },500)
435 441
                       }
@@ -605,6 +611,11 @@
605 611
           this.SMFlag = true;
606 612
         });
607 613
       },
614
+			// pda扫描
615
+			pdaChange(content){
616
+				content = content.replace('\n','')
617
+				this.hand_scanning_common(content, 'scan');
618
+			},
608 619
       // 正常完成扫描
609 620
       overFinish() {
610 621
         let data = {
@@ -1012,6 +1023,13 @@
1012 1023
     onShow() {
1013 1024
       this.SMFlag = true;
1014 1025
       this.gotoFlag = true;
1026
+			let that = this
1027
+			// #ifdef APP-PLUS
1028
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
1029
+			uni.$on('scan', function(data) {
1030
+				that.pdaChange(data)
1031
+			})
1032
+			// #endif
1015 1033
     },
1016 1034
     onLoad(options) {
1017 1035
       this.isEndDeptRedShow = options.isEndDeptRed === 'true';

+ 6 - 0
pages/scanning_all/scanning_all.vue

@@ -909,6 +909,12 @@
909 909
       setTimeout(() => {
910 910
         this.texiao();
911 911
       }, 500);
912
+			// #ifdef APP-PLUS
913
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
914
+			// uni.$on('scan', function(data) {
915
+			// 	that.pdaChange(data)
916
+			// })
917
+			// #endif
912 918
     },
913 919
     onHide() {
914 920
       this.animationData = {};

+ 6 - 0
pages/scanning_blood/scanning_blood.vue

@@ -322,6 +322,12 @@
322 322
     },
323 323
     onShow() {
324 324
       this.gotoFlag = true;
325
+			// #ifdef APP-PLUS
326
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
327
+			// uni.$on('scan', function(data) {
328
+			// 	that.pdaChange(data)
329
+			// })
330
+			// #endif
325 331
     },
326 332
     onLoad(options) {
327 333
 			this.hosId = uni.getStorageSync('userData').user.currentHospital.id;

+ 18 - 0
pages/scanning_blood_process/scanning_blood_process.vue

@@ -63,9 +63,12 @@
63 63
     <handViewBlood v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
64 64
       @ok="speOk" @cancel="speCancel">
65 65
     </handViewBlood>
66
+		<!-- PDA扫描 -->
67
+		<scanner></scanner>
66 68
   </view>
67 69
 </template>
68 70
 <script>
71
+	import scanner from "../../components/scanner/scanner.vue";
69 72
   import {
70 73
     get,
71 74
     post,
@@ -87,6 +90,9 @@
87 90
         queryObj: {}, //路由传递过来的数据
88 91
       };
89 92
     },
93
+		components:{
94
+			scanner
95
+		},
90 96
     methods: {
91 97
       // 录入到工单
92 98
       input_common(ress1, type, isFlag = false){
@@ -248,6 +254,11 @@
248 254
           this.SMFlag = true;
249 255
         });
250 256
       },
257
+			// pda扫描
258
+			pdaChange(content){
259
+				content = content.replace('\n','')
260
+				this.hand_scanning_common(content, 'scan', isFlag);
261
+			},
251 262
       // 清点核对
252 263
       countAndCheck() {
253 264
         if(this.forceDept){
@@ -263,6 +274,13 @@
263 274
     },
264 275
     onShow() {
265 276
       this.SMFlag = true;
277
+			let that = this
278
+			// #ifdef APP-PLUS
279
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
280
+			uni.$on('scan', function(data) {
281
+				that.pdaChange(data)
282
+			})
283
+			// #endif
266 284
     },
267 285
     onLoad(options) {
268 286
       console.log(options, "result", this.forceDept);

+ 21 - 3
pages/scanning_code/scanning_code.vue

@@ -365,9 +365,12 @@
365 365
     </changeSpeNum>
366 366
 		<!-- 调查问卷二维码 -->
367 367
 		 <questionCode v-if="isQuestionModel" :orderId="infoDATA.id" @know="isQuestionModel = false"></questionCode>
368
-  </view>
368
+		<!-- PDA扫描 -->
369
+		<scanner></scanner>
370
+	</view>
369 371
 </template>
370 372
 <script>
373
+	import scanner from "../../components/scanner/scanner.vue";
371 374
   import showModel from "../../components/showModel/showModel.vue";
372 375
 	import questionCode from "../../components/questionCode/questionCode.vue";
373 376
   import {
@@ -381,7 +384,8 @@
381 384
   } from "../../tools/photograph.js";
382 385
   export default {
383 386
 		components:{
384
-			questionCode
387
+			questionCode,
388
+			scanner
385 389
 		},
386 390
     data() {
387 391
       return {
@@ -900,7 +904,9 @@
900 904
                       if(flag){
901 905
                         if (type === 'scan') {
902 906
                           setTimeout(() => {
903
-                            this.Scanning_again(this.dataId);
907
+														// #ifdef H5
908
+														this.Scanning_again(this.dataId);
909
+														// #endif
904 910
                           }, 500)
905 911
                         }
906 912
                       }
@@ -1097,6 +1103,11 @@
1097 1103
           this.SMFlag = true;
1098 1104
         });
1099 1105
       },
1106
+			// pda扫描
1107
+			pdaChange(content){
1108
+				content = content.replace('\n','')
1109
+				this.hand_scanning_common(content, 'scan');
1110
+			},
1100 1111
       show(type) {
1101 1112
         this.showType = type;
1102 1113
         if (type === "show") {
@@ -1384,6 +1395,13 @@
1384 1395
     },
1385 1396
     onShow() {
1386 1397
       this.SMFlag = true;
1398
+			let that = this
1399
+			// #ifdef APP-PLUS
1400
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
1401
+			uni.$on('scan', function(data) {
1402
+				that.pdaChange(data)
1403
+			})
1404
+			// #endif
1387 1405
     },
1388 1406
     onLoad(options) {
1389 1407
       console.log(options);

+ 21 - 3
pages/scanning_djEnd/scanning_djEnd.vue

@@ -214,10 +214,13 @@
214 214
     </changeSpeNum>
215 215
 		<!-- 调查问卷二维码 -->
216 216
 		 <questionCode v-if="isQuestionModel" :orderId="questionId" @know="isQuestionModel = false"></questionCode>
217
-  </view>
217
+		<!-- PDA扫描 -->
218
+		<scanner></scanner>
219
+	</view>
218 220
 </template>
219 221
 <script>
220 222
   import showModel from "../../components/showModel/showModel.vue";
223
+	import scanner from "../../components/scanner/scanner.vue";
221 224
 	import questionCode from "../../components/questionCode/questionCode.vue";
222 225
   import {
223 226
     get,
@@ -227,7 +230,8 @@
227 230
   } from "../../http/http.js";
228 231
   export default {
229 232
 		components:{
230
-			questionCode
233
+			questionCode,
234
+			scanner
231 235
 		},
232 236
     data() {
233 237
       return {
@@ -686,7 +690,9 @@
686 690
                     if(flag){
687 691
                       if (type === 'scan') {
688 692
                         setTimeout(()=>{
689
-                          this.Scanning_again();
693
+													// #ifdef H5
694
+													this.Scanning_again();
695
+													// #endif
690 696
                         },500)
691 697
                       }
692 698
                     }
@@ -1082,6 +1088,11 @@
1082 1088
             this.SMFlag = true;
1083 1089
           });
1084 1090
       },
1091
+			// pda扫描
1092
+			pdaChange(content){
1093
+				content = content.replace('\n','')
1094
+				this.hand_scanning_common(content, 'scan');
1095
+			},
1085 1096
       // 知道了
1086 1097
       showAlert() {
1087 1098
         uni.navigateTo({
@@ -1227,6 +1238,13 @@
1227 1238
     onShow() {
1228 1239
       this.SMFlag = true;
1229 1240
       this.gotoFlag = true;
1241
+			let that = this;
1242
+			// #ifdef APP-PLUS
1243
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
1244
+			uni.$on('scan', function(data) {
1245
+				that.pdaChange(data)
1246
+			})
1247
+			// #endif
1230 1248
     },
1231 1249
     onLoad(options) {
1232 1250
       console.log(options, "djEnd");

+ 21 - 3
pages/scanning_djInfo/scanning_djInfo.vue

@@ -162,10 +162,13 @@
162 162
     </handViewSpecimen>
163 163
 		<!-- 调查问卷二维码 -->
164 164
 		 <questionCode v-if="isQuestionModel" :orderId="gdId" @know="isQuestionModel = false"></questionCode>
165
-  </view>
165
+		<!-- PDA扫描 -->
166
+		<scanner></scanner>
167
+	</view>
166 168
 </template>
167 169
 <script>
168 170
   import showModel from "../../components/showModel/showModel.vue";
171
+	import scanner from "../../components/scanner/scanner.vue";
169 172
 	import questionCode from "../../components/questionCode/questionCode.vue";
170 173
   import {
171 174
     get,
@@ -178,7 +181,8 @@
178 181
   } from '../../tools/enum.drugsbagType.js';
179 182
   export default {
180 183
 		components:{
181
-			questionCode
184
+			questionCode,
185
+			scanner
182 186
 		},
183 187
     data() {
184 188
       return {
@@ -347,7 +351,9 @@
347 351
                       if(flag){
348 352
                         if (type === 'scan') {
349 353
                           setTimeout(()=>{
350
-                            this.Scanning_again();
354
+														// #ifdef H5
355
+														this.Scanning_again();
356
+														// #endif
351 357
                           },500)
352 358
                         } else if (type === 'hand') {
353 359
                           this.hand_again();
@@ -680,6 +686,11 @@
680 686
             this.SMFlag = true;
681 687
           });
682 688
       },
689
+			// pda扫描
690
+			pdaChange(content){
691
+				content = content.replace('\n','')
692
+				this.hand_scanning_common(content, 'scan');
693
+			},
683 694
       // 知道了
684 695
       showAlert() {
685 696
         uni.navigateTo({
@@ -799,6 +810,13 @@
799 810
     onShow() {
800 811
       this.SMFlag = true;
801 812
       this.gotoFlag = true;
813
+			let that = this;
814
+			// #ifdef APP-PLUS
815
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
816
+			uni.$on('scan', function(data) {
817
+				that.pdaChange(data)
818
+			})
819
+			// #endif
802 820
     },
803 821
     onLoad(options) {
804 822
       this.isEndDeptRedShow = options.isEndDeptRed === 'true';

+ 5 - 0
pages/specimenHandoverNew/specimenHandoverNew.vue

@@ -286,6 +286,11 @@
286 286
         this.getInfo('specimenDesc');
287 287
       },
288 288
     },
289
+		onShow(){
290
+			// #ifdef APP-PLUS
291
+			uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
292
+			// #endif
293
+		},
289 294
     onLoad(options) {
290 295
       console.log(options, "result");
291 296
       this.queryObj = options;

+ 1 - 1
pages/specimenPort/specimenPort.vue

@@ -13,7 +13,7 @@
13 13
 				<view>{{item.status.name}}</view>
14 14
 			</view>
15 15
 			<view class="df-list">
16
-				<view class="df-list-over-left">申请科室:{{item.patientDTO.department.dept}}</view>
16
+				<view class="df-list-over-left">科室:{{item.patientDTO.department.dept}}</view>
17 17
 				<view class="df-list-over">部位:{{item.takePart}}</view>
18 18
 			</view>
19 19
 			<view class="df-list">

+ 26 - 3
static/font/demo_index.html

@@ -55,6 +55,12 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon newicon">&#xe653;</span>
59
+                <div class="name">密钥</div>
60
+                <div class="code-name">&amp;#xe653;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
58 64
               <span class="icon newicon">&#xe659;</span>
59 65
                 <div class="name">筛选</div>
60 66
                 <div class="code-name">&amp;#xe659;</div>
@@ -714,9 +720,9 @@
714 720
 <pre><code class="language-css"
715 721
 >@font-face {
716 722
   font-family: 'newicon';
717
-  src: url('iconfont.woff2?t=1728893186075') format('woff2'),
718
-       url('iconfont.woff?t=1728893186075') format('woff'),
719
-       url('iconfont.ttf?t=1728893186075') format('truetype');
723
+  src: url('iconfont.woff2?t=1731394849627') format('woff2'),
724
+       url('iconfont.woff?t=1731394849627') format('woff'),
725
+       url('iconfont.ttf?t=1731394849627') format('truetype');
720 726
 }
721 727
 </code></pre>
722 728
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -743,6 +749,15 @@
743 749
         <ul class="icon_lists dib-box">
744 750
           
745 751
           <li class="dib">
752
+            <span class="icon newicon newicon-miyue"></span>
753
+            <div class="name">
754
+              密钥
755
+            </div>
756
+            <div class="code-name">.newicon-miyue
757
+            </div>
758
+          </li>
759
+          
760
+          <li class="dib">
746 761
             <span class="icon newicon newicon-shaixuan"></span>
747 762
             <div class="name">
748 763
               筛选
@@ -1734,6 +1749,14 @@
1734 1749
           
1735 1750
             <li class="dib">
1736 1751
                 <svg class="icon svg-icon" aria-hidden="true">
1752
+                  <use xlink:href="#newicon-miyue"></use>
1753
+                </svg>
1754
+                <div class="name">密钥</div>
1755
+                <div class="code-name">#newicon-miyue</div>
1756
+            </li>
1757
+          
1758
+            <li class="dib">
1759
+                <svg class="icon svg-icon" aria-hidden="true">
1737 1760
                   <use xlink:href="#newicon-shaixuan"></use>
1738 1761
                 </svg>
1739 1762
                 <div class="name">筛选</div>

+ 4 - 0
static/font/iconfont.css

@@ -13,6 +13,10 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.newicon-miyue:before {
17
+  content: "\e653";
18
+}
19
+
16 20
 .newicon-shaixuan:before {
17 21
   content: "\e659";
18 22
 }

File diff suppressed because it is too large
+ 1 - 1
static/font/iconfont.js


+ 7 - 0
static/font/iconfont.json

@@ -6,6 +6,13 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "8655877",
10
+      "name": "密钥",
11
+      "font_class": "miyue",
12
+      "unicode": "e653",
13
+      "unicode_decimal": 58963
14
+    },
15
+    {
9 16
       "icon_id": "12911869",
10 17
       "name": "筛选",
11 18
       "font_class": "shaixuan",

BIN
static/font/iconfont.ttf


BIN
static/font/iconfont.woff


BIN
static/font/iconfont.woff2


BIN
static/img/updata.png