|
@@ -0,0 +1,405 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="showModel">
|
|
3
|
+ <view class="showModel__wrap">
|
|
4
|
+ <view class="content" v-if="speDATA && speDATA.data">
|
|
5
|
+ <view class="content-box">
|
|
6
|
+ <view class="icon">
|
|
7
|
+ <text class="red newicon newicon-guanbi1"></text>
|
|
8
|
+ <!-- <text class="error-text">提示</text> -->
|
|
9
|
+ </view>
|
|
10
|
+ <view class="list weight red">{{speDATA.msg}}</view>
|
|
11
|
+ <view class="list flex">
|
|
12
|
+ <view>条码:<text class="mar-rig" :class="speDATA.data.urgent==0?'green':'red'">{{speDATA.data.urgent==0?'普':'急'}}</text> {{speDATA.data.scode}}</view>
|
|
13
|
+ <view>{{speDATA.data.speState ? speDATA.data.speState.name : ''}}</view>
|
|
14
|
+ </view>
|
|
15
|
+ <view class="list">检查项目:{{ speDATA.data.specimenDesc || "-" }}</view>
|
|
16
|
+ <view class="list">类型:{{speDATA.data.stype ? speDATA.data.stype.name : ''}} <text v-if="speDATA.data.tubeType">、</text> {{speDATA.data.tubeType && speDATA.data.tubeType.name || ''}}</view>
|
|
17
|
+ <view class="list">患者:{{ speDATA.data.patientName}} <text v-if="speDATA.data.bedNum">({{speDATA.data.bedNum}})</text></view>
|
|
18
|
+ <view class="list">{{speDATA.data.sickRoom.dept}}
|
|
19
|
+ <text style="width: 4em;text-align: center;margin-left: 1em;margin-right: 1em;" class="newicon newicon-arrow-right-full"></text>
|
|
20
|
+ {{speDATA.data.checkDept.dept}}</view>
|
|
21
|
+ <view class="list" v-if="speDATA.speVerifyType=='collectDept'
|
|
22
|
+ || speDATA.speVerifyType=='testDept' || speDATA.speVerifyType=='tubeType'
|
|
23
|
+ || speDATA.speVerifyType=='urgent'">
|
|
24
|
+ <checkbox-group @change="forceDeptInputBlur">
|
|
25
|
+ <checkbox value="addConfig" :checked="addConfig" color="#49b856" />{{msg}}
|
|
26
|
+ </checkbox-group>
|
|
27
|
+ </view>
|
|
28
|
+ </view>
|
|
29
|
+ </view>
|
|
30
|
+ <view class="foot_btn_spe">
|
|
31
|
+ <view class="btn green" @click="confirm()">是</view>
|
|
32
|
+ <view class="btn gray" @click="cancel()">否</view>
|
|
33
|
+ </view>
|
|
34
|
+ </view>
|
|
35
|
+ </view>
|
|
36
|
+</template>
|
|
37
|
+
|
|
38
|
+<script>
|
|
39
|
+import {
|
|
40
|
+ get,
|
|
41
|
+ post,
|
|
42
|
+ SM
|
|
43
|
+ } from "../../http/http.js";
|
|
44
|
+export default {
|
|
45
|
+ data() {
|
|
46
|
+ return {
|
|
47
|
+ addConfig:false,
|
|
48
|
+ msg:null,
|
|
49
|
+ // 终点科室标红
|
|
50
|
+ isEndDeptRed: false,
|
|
51
|
+ currentCode: '', //当前小扫描的科室二维码
|
|
52
|
+ deptId: undefined,
|
|
53
|
+ handover: undefined,
|
|
54
|
+ SMFlag: true,
|
|
55
|
+ // 交接人信息
|
|
56
|
+ accountObj: undefined,
|
|
57
|
+ // 完成扫描的id
|
|
58
|
+ wcId: "",
|
|
59
|
+ wcFlag: false,
|
|
60
|
+ // 弹窗model
|
|
61
|
+ models: {
|
|
62
|
+ disjunctor: false,
|
|
63
|
+ },
|
|
64
|
+ // 单选框弹窗model1
|
|
65
|
+ models1: {
|
|
66
|
+ disjunctor: false,
|
|
67
|
+ },
|
|
68
|
+ // 完成扫描弹窗model1
|
|
69
|
+ models2: {
|
|
70
|
+ disjunctor: false,
|
|
71
|
+ },
|
|
72
|
+ infoDATA: {},
|
|
73
|
+ res: {},
|
|
74
|
+ infoType: "",
|
|
75
|
+ DEPTCode: "",
|
|
76
|
+ RESData: {},
|
|
77
|
+ DEPT: "",
|
|
78
|
+ dataId: "",
|
|
79
|
+ type: "",
|
|
80
|
+ model: {},
|
|
81
|
+ speNum: 0,
|
|
82
|
+ queryObj: {}, //路由传递过来的数据
|
|
83
|
+ selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
|
|
84
|
+ gotoFlag: true,
|
|
85
|
+ content: "",
|
|
86
|
+ taskTypeId:"",
|
|
87
|
+ errorModal:null,
|
|
88
|
+ speDATA:null,
|
|
89
|
+ interceptData:null,
|
|
90
|
+ intercept:null,
|
|
91
|
+ };
|
|
92
|
+ },
|
|
93
|
+ onLoad(options){
|
|
94
|
+ console.log(77776666,options)
|
|
95
|
+ this.intercept = options.intercept
|
|
96
|
+ this.queryObj = options;
|
|
97
|
+ if (options.model) {
|
|
98
|
+ this.infoDATA = JSON.parse(options.model);
|
|
99
|
+ this.speDATA = JSON.parse(options.model);
|
|
100
|
+ }
|
|
101
|
+
|
|
102
|
+ if (options.accountObj && options.accountObj != "undefined") {
|
|
103
|
+ this.accountObj = JSON.parse(options.accountObj);
|
|
104
|
+ }
|
|
105
|
+ if (options.deptId && options.deptId != "undefined") {
|
|
106
|
+ this.deptId = options.deptId;
|
|
107
|
+ }
|
|
108
|
+ if (options.handover && options.handover != "undefined") {
|
|
109
|
+ this.handover = options.handover;
|
|
110
|
+ }
|
|
111
|
+ this.dataId = options.id;
|
|
112
|
+ if(options.taskTypeId){
|
|
113
|
+ this.taskTypeId = options.taskTypeId
|
|
114
|
+ }else if(this.infoDATA.workOrderList && this.infoDATA.workOrderList.length>0){
|
|
115
|
+ this.taskTypeId = this.infoDATA.workOrderList[0].taskType.id
|
|
116
|
+ }
|
|
117
|
+ this.RESData = options.resData;
|
|
118
|
+ this.res["status"] = options.status;
|
|
119
|
+ this.res["msg"] = options.msg;
|
|
120
|
+ this.res["patient"] = options.patient;
|
|
121
|
+ this.res["patientCode"] = options.patientCode;
|
|
122
|
+ this.res["deptName"] = options.deptName;
|
|
123
|
+ this.res["bedNum"] = options.bedNum;
|
|
124
|
+ this.infoType = options.type1;
|
|
125
|
+
|
|
126
|
+ if (options.dept) {
|
|
127
|
+ this.DEPT = options.dept;
|
|
128
|
+ }
|
|
129
|
+ if (options.speNum) {
|
|
130
|
+ this.speNum = options.speNum;
|
|
131
|
+ }
|
|
132
|
+ this.DEPTCode = options.deptCode;
|
|
133
|
+ this.type = options.type;
|
|
134
|
+ this.setMsg()
|
|
135
|
+ },
|
|
136
|
+ methods: {
|
|
137
|
+ setMsg(){
|
|
138
|
+ if(this.speDATA.speVerifyType=='collectDept'){
|
|
139
|
+ this.msg = '增加收取科室'
|
|
140
|
+ }else if(this.speDATA.speVerifyType=='testDept'){
|
|
141
|
+ this.msg = '收取本科室不在提示'
|
|
142
|
+ }else if(this.speDATA.speVerifyType=='tubeType'){
|
|
143
|
+ this.msg = '收取此试管类型不在提示'
|
|
144
|
+ }else if(this.speDATA.speVerifyType=='urgent'){
|
|
145
|
+ this.msg = '记录本次操作,不在提示'
|
|
146
|
+ }
|
|
147
|
+ },
|
|
148
|
+ forceDeptInputBlur(e){
|
|
149
|
+ this.addConfig = e.detail.value.length > 0
|
|
150
|
+ },
|
|
151
|
+ confirm(){
|
|
152
|
+ if(this.speDATA.speVerifyType!='collectDept'
|
|
153
|
+ && this.speDATA.speVerifyType!='testDept' && this.speDATA.speVerifyType!='tubeType'
|
|
154
|
+ && this.speDATA.speVerifyType!='urgent'){
|
|
155
|
+ this.addConfig = true
|
|
156
|
+ }
|
|
157
|
+ let data = {
|
|
158
|
+ code: this.speDATA.data.scode,
|
|
159
|
+ addConfig: this.addConfig
|
|
160
|
+ }
|
|
161
|
+ this.interceptData = data
|
|
162
|
+ this.hand_scanning_common(this.interceptData.code, 'scan')
|
|
163
|
+ },
|
|
164
|
+ // 手动输入标本和扫码公共方法
|
|
165
|
+ hand_scanning_common(ress1, type) {
|
|
166
|
+ // ----------------
|
|
167
|
+ uni.showLoading({
|
|
168
|
+ title: "加载中",
|
|
169
|
+ mask: true,
|
|
170
|
+ });
|
|
171
|
+ //检验二维码的有效性
|
|
172
|
+ post("/dept/scanning", {
|
|
173
|
+ content: ress1,
|
|
174
|
+ }).then((result) => {
|
|
175
|
+ this.SMFlag = true;
|
|
176
|
+ this.currentCode = result.code;
|
|
177
|
+ if (result.state == 200 || result.state == 201) {
|
|
178
|
+ let codes = result.code;
|
|
179
|
+ if (codes) {
|
|
180
|
+ let speCode = codes;
|
|
181
|
+ let data = {
|
|
182
|
+ code: speCode,
|
|
183
|
+ type: this.queryObj.type1,
|
|
184
|
+ deptCode: this.DEPTCode,
|
|
185
|
+ ids: [],
|
|
186
|
+ speVerifyType:null,
|
|
187
|
+ addConfig:null
|
|
188
|
+ };
|
|
189
|
+ if(this.speDATA){
|
|
190
|
+ data.speVerifyType = this.speDATA.speVerifyType
|
|
191
|
+ }else{
|
|
192
|
+ delete data.speVerifyType
|
|
193
|
+ }
|
|
194
|
+ if(this.interceptData && this.interceptData.addConfig){
|
|
195
|
+ data.addConfig = 1
|
|
196
|
+ }else{
|
|
197
|
+ delete data.addConfig
|
|
198
|
+ }
|
|
199
|
+ data.ids.push(this.dataId);
|
|
200
|
+ let postType = "";
|
|
201
|
+ if (this.type == "jPBag" || this.type == "drugsBag") {
|
|
202
|
+ postType = "handleDrugsAndJp";
|
|
203
|
+ if(this.type == "drugsBag"){
|
|
204
|
+ delete data.ids;
|
|
205
|
+ }
|
|
206
|
+ data.deptId = this.deptId;
|
|
207
|
+ data.handover = this.handover;
|
|
208
|
+ }
|
|
209
|
+ if (this.type == "specimen") {
|
|
210
|
+ data["speCode"] = data.code;
|
|
211
|
+ delete data.code;
|
|
212
|
+ postType = "handleSpes";
|
|
213
|
+ }
|
|
214
|
+ if (this.type == "specimenPlan") {
|
|
215
|
+ data["speCode"] = data.code;
|
|
216
|
+ delete data.code;
|
|
217
|
+ postType = "handlePlanSpes";
|
|
218
|
+ }
|
|
219
|
+ if (this.type == "inspect") {
|
|
220
|
+ postType = "handleIns";
|
|
221
|
+ }
|
|
222
|
+ if (this.type == "patientTransport") {
|
|
223
|
+ postType = "handleTrans";
|
|
224
|
+ }
|
|
225
|
+ post("/workerOrder/" + postType, data).then((ress) => {
|
|
226
|
+ uni.hideLoading();
|
|
227
|
+ this.speDATA = null
|
|
228
|
+ this.interceptData = null
|
|
229
|
+ if (ress.status == 200 || ress.status == 11111) {
|
|
230
|
+ //标本和标本轮巡工单,扫描标本后会自动调用摄像头,继续扫描,直到status不是200
|
|
231
|
+ if ((this.type == "specimenPlan" || this.type == "specimen") && ress.status != 11111) {
|
|
232
|
+ if(ress){
|
|
233
|
+ this.infoDATA = ress.data;
|
|
234
|
+ this.speNum = ress.specimenCount;
|
|
235
|
+ uni.redirectTo({
|
|
236
|
+ url: `../scanning_Result/scanning_Result?type=${
|
|
237
|
+ this.queryObj.type
|
|
238
|
+ }&type1=${
|
|
239
|
+ this.queryObj.type1
|
|
240
|
+ }&infoData=${encodeURIComponent(
|
|
241
|
+ JSON.stringify(ress.data)
|
|
242
|
+ )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
|
|
243
|
+ this.queryObj.deptCode
|
|
244
|
+ }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}&scanOrHand=scan&isEndDeptRed=${this.isEndDeptRed}`,
|
|
245
|
+ });
|
|
246
|
+ }
|
|
247
|
+ }
|
|
248
|
+ } else if (ress.status==513){
|
|
249
|
+ this.speDATA = ress
|
|
250
|
+ this.setMsg()
|
|
251
|
+ } else if(ress.status==10004){
|
|
252
|
+ uni.showToast({
|
|
253
|
+ icon: "none",
|
|
254
|
+ title: ress.msg,
|
|
255
|
+ });
|
|
256
|
+ }else{
|
|
257
|
+ uni.redirectTo({
|
|
258
|
+ url: `../scanning_Result/scanning_Result?type=${
|
|
259
|
+ this.queryObj.type
|
|
260
|
+ }&type1=${this.queryObj.type1}&status=${ress.status}&msg=${
|
|
261
|
+ ress.msg
|
|
262
|
+ }&deptCode=${this.queryObj.deptCode}&dept=${
|
|
263
|
+ this.queryObj.dept
|
|
264
|
+ }&id=${this.dataId}&model=${encodeURIComponent(
|
|
265
|
+ JSON.stringify(this.infoDATA)
|
|
266
|
+ )}&accountObj=${encodeURIComponent(JSON.stringify(this.accountObj))}&deptId=${this.deptId}&handover=${this.handover}&scanOrHand=scan&qrcode=${this.currentCode}`,
|
|
267
|
+ });
|
|
268
|
+ }
|
|
269
|
+ });
|
|
270
|
+ } else {
|
|
271
|
+ uni.hideLoading();
|
|
272
|
+ }
|
|
273
|
+ } else {
|
|
274
|
+ uni.hideLoading();
|
|
275
|
+ uni.showToast({
|
|
276
|
+ icon: "none",
|
|
277
|
+ title: result.info || "接口获取数据失败!",
|
|
278
|
+ });
|
|
279
|
+ }
|
|
280
|
+ });
|
|
281
|
+ },
|
|
282
|
+ cancel(){
|
|
283
|
+ uni.navigateBack();
|
|
284
|
+ },
|
|
285
|
+ },
|
|
286
|
+};
|
|
287
|
+</script>
|
|
288
|
+
|
|
289
|
+<style lang="less" scoped>
|
|
290
|
+.showModel {
|
|
291
|
+ // position: fixed;
|
|
292
|
+ // left: 0;
|
|
293
|
+ // right: 0;
|
|
294
|
+ // top: 0;
|
|
295
|
+ // bottom: 0;
|
|
296
|
+ // background-color: rgba(0, 0, 0, 0.2);
|
|
297
|
+ // z-index: 99;
|
|
298
|
+
|
|
299
|
+ .showModel__wrap {
|
|
300
|
+ // width: 90%;
|
|
301
|
+ // position: absolute;
|
|
302
|
+ // left: 50%;
|
|
303
|
+ // top: 50%;
|
|
304
|
+ // transform: translate(-50%, -50%);
|
|
305
|
+ background-color: #fff;
|
|
306
|
+ // border-radius: 12rpx;
|
|
307
|
+ height: 100vh;
|
|
308
|
+ .showModel__header {
|
|
309
|
+ font-size: 36rpx;
|
|
310
|
+ color: #000;
|
|
311
|
+ font-weight: bold;
|
|
312
|
+ height: 84rpx;
|
|
313
|
+ display: flex;
|
|
314
|
+ justify-content: center;
|
|
315
|
+ align-items: center;
|
|
316
|
+ }
|
|
317
|
+ .content{
|
|
318
|
+ background: #fff;
|
|
319
|
+ border-top: 1px solid #E6E6E6;
|
|
320
|
+ .content-tip{
|
|
321
|
+ text-align: center;
|
|
322
|
+ padding: 50rpx 0 30rpx 0;
|
|
323
|
+ font-size: 28rpx;
|
|
324
|
+ }
|
|
325
|
+ .content-box{
|
|
326
|
+ padding: 24rpx;
|
|
327
|
+ height: 83vh;
|
|
328
|
+
|
|
329
|
+ .icon{
|
|
330
|
+ display: flex;
|
|
331
|
+ justify-content: center;
|
|
332
|
+ align-items: center;
|
|
333
|
+ .red{
|
|
334
|
+ font-size: 80rpx;
|
|
335
|
+ }
|
|
336
|
+ .error-text{
|
|
337
|
+ margin-left: 30rpx;
|
|
338
|
+ font-size: 40rpx;
|
|
339
|
+ }
|
|
340
|
+ }
|
|
341
|
+
|
|
342
|
+ .flex{
|
|
343
|
+ display: flex;
|
|
344
|
+ justify-content: space-between;
|
|
345
|
+ }
|
|
346
|
+
|
|
347
|
+ .weight{
|
|
348
|
+ font-weight: bold;
|
|
349
|
+ text-align: center;
|
|
350
|
+ font-size: 38rpx;
|
|
351
|
+ }
|
|
352
|
+
|
|
353
|
+ .list{
|
|
354
|
+ padding: 20rpx 0;
|
|
355
|
+ }
|
|
356
|
+
|
|
357
|
+ .content-item{
|
|
358
|
+ width: 80rpx;
|
|
359
|
+ height: 80rpx;
|
|
360
|
+ border-radius: 10rpx;
|
|
361
|
+ border: 1px solid #CCCCCC;
|
|
362
|
+ color: #000;
|
|
363
|
+ font-size: 32rpx;
|
|
364
|
+ // margin: 0 20rpx;
|
|
365
|
+ text-align: center;
|
|
366
|
+ }
|
|
367
|
+ }
|
|
368
|
+ }
|
|
369
|
+ .foot_btn_spe {
|
|
370
|
+ padding: 24rpx;
|
|
371
|
+ line-height: 88rpx;
|
|
372
|
+ height: 100rpx;
|
|
373
|
+ text-align: center;
|
|
374
|
+ display: flex;
|
|
375
|
+ justify-content: space-between;
|
|
376
|
+ flex-wrap: wrap;
|
|
377
|
+
|
|
378
|
+ view {
|
|
379
|
+ height: 88rpx;
|
|
380
|
+ width: 48%;
|
|
381
|
+ color: #fff;
|
|
382
|
+ border-radius: 8rpx;
|
|
383
|
+ font-size: 32rpx;
|
|
384
|
+ margin-top: 16rpx;
|
|
385
|
+ }
|
|
386
|
+
|
|
387
|
+ .green{
|
|
388
|
+ background-image: linear-gradient(to right, #72c172, #3bb197);
|
|
389
|
+ color: #fff !important;
|
|
390
|
+ }
|
|
391
|
+
|
|
392
|
+ .gray{
|
|
393
|
+ background: #afafaf;
|
|
394
|
+ color: #fff;
|
|
395
|
+ }
|
|
396
|
+ }
|
|
397
|
+ }
|
|
398
|
+ .green{
|
|
399
|
+ color: #49B856;
|
|
400
|
+ }
|
|
401
|
+ .mar-rig{
|
|
402
|
+ margin-right: 8rpx;
|
|
403
|
+ }
|
|
404
|
+}
|
|
405
|
+</style>
|