|
@@ -0,0 +1,661 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="Scanning_Result">
|
|
3
|
+ <view class="Scanning_top">
|
|
4
|
+ <view class="Scanning_top_icon">
|
|
5
|
+ <text class="cubeic-ok newicon newicon-duigou"></text>
|
|
6
|
+ </view>
|
|
7
|
+ <view class="ScanTips">扫描成功</view>
|
|
8
|
+ </view>
|
|
9
|
+
|
|
10
|
+ <view class="Scanning_cont">
|
|
11
|
+ <scroll-view scroll-y class="scrollContent">
|
|
12
|
+ <view class="column">
|
|
13
|
+ <view class="name">打包单号:</view>
|
|
14
|
+ <view class="value">{{specimenPackageDTO.packCode}}</view>
|
|
15
|
+ </view>
|
|
16
|
+ <view class="column">
|
|
17
|
+ <view class="name">打包科室:</view>
|
|
18
|
+ <view class="value">{{specimenPackageDTO.packDeptDTO ? specimenPackageDTO.packDeptDTO.dept : ''}}</view>
|
|
19
|
+ </view>
|
|
20
|
+ <view class="column">
|
|
21
|
+ <view class="name">终点科室:</view>
|
|
22
|
+ <view class="value">{{specimenPackageDTO.targetDeptDTO ? specimenPackageDTO.targetDeptDTO.dept : ''}}</view>
|
|
23
|
+ </view>
|
|
24
|
+ <view class="column">
|
|
25
|
+ <view class="name">检验科室:</view>
|
|
26
|
+ <view class="value">
|
|
27
|
+ <template v-if="specimenPackageDTO.endDeptList">
|
|
28
|
+ <view class="valueBlock" v-for="item of specimenPackageDTO.endDeptList" :key="item.id">
|
|
29
|
+ {{item.dept}}
|
|
30
|
+ </view>
|
|
31
|
+ </template>
|
|
32
|
+ </view>
|
|
33
|
+ </view>
|
|
34
|
+ <view class="column">
|
|
35
|
+ <view class="name">标本数:</view>
|
|
36
|
+ <view class="value">{{specimenPackageDTO.specimenNum}}</view>
|
|
37
|
+ </view>
|
|
38
|
+ <view class="column">
|
|
39
|
+ <view class="name">试管类型:</view>
|
|
40
|
+ <view class="value">
|
|
41
|
+ <view class="valueBlock" v-for="tube2 of tube" :key="tube2.id">
|
|
42
|
+ <view class="valueItem" v-for="item of tube2" :key="item.id">{{item.name}}:{{item.size}}</view>
|
|
43
|
+ </view>
|
|
44
|
+ </view>
|
|
45
|
+ </view>
|
|
46
|
+ </scroll-view>
|
|
47
|
+ </view>
|
|
48
|
+
|
|
49
|
+ <view class="foot_btn_spe" v-if="config.id">
|
|
50
|
+ <view class="column">
|
|
51
|
+ <!-- 需要核对 -->
|
|
52
|
+ <template v-if="config.drugsStartCheck === 1">
|
|
53
|
+ <!-- 两个按钮-样式 设计如此,别BB -->
|
|
54
|
+ <template v-if="(queryObj.type === 'build' || queryObj.type === 'receive') && (config.drugsCreateSign === 1 || config.drugsReceiveSign === 1) && !config.drugsStartManual">
|
|
55
|
+ <view class="btn" @click="goIndex()">返回</view>
|
|
56
|
+ <view class="btn" @click="createOrBuildOrder(undefined, 'scan')" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单签到扫一扫</view>
|
|
57
|
+ <view class="btn" @click="createOrBuildOrder(undefined, 'hand')" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1 && config.drugsStartManual">建单签到{{config.drugsStartManual.name}}</view>
|
|
58
|
+ <view class="btn" @click="createOrBuildOrder(orderId, 'scan')" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单签到扫一扫</view>
|
|
59
|
+ <view class="btn" @click="createOrBuildOrder(orderId, 'hand')" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1 && config.drugsStartManual">接单签到{{config.drugsStartManual.name}}</view>
|
|
60
|
+ </template>
|
|
61
|
+
|
|
62
|
+ <!-- 三个按钮-样式 设计如此,别BB -->
|
|
63
|
+ <template v-else-if="(queryObj.type === 'build' || queryObj.type === 'receive') && (config.drugsCreateSign === 1 || config.drugsReceiveSign === 1) && config.drugsStartManual">
|
|
64
|
+ <view class="btn" @click="createOrBuildOrder(undefined, 'scan')" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单签到扫一扫</view>
|
|
65
|
+ <view class="btn" @click="createOrBuildOrder(undefined, 'hand')" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1 && config.drugsStartManual">建单签到{{config.drugsStartManual.name}}</view>
|
|
66
|
+ <view class="btn" @click="createOrBuildOrder(orderId, 'scan')" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单签到扫一扫</view>
|
|
67
|
+ <view class="btn" @click="createOrBuildOrder(orderId, 'hand')" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1 && config.drugsStartManual">接单签到{{config.drugsStartManual.name}}</view>
|
|
68
|
+ <view class="btnW100 grayBg" @click="goIndex()">返回</view>
|
|
69
|
+ </template>
|
|
70
|
+ </template>
|
|
71
|
+ <!-- 不需要核对 -->
|
|
72
|
+ <template v-if="config.drugsStartCheck !== 1">
|
|
73
|
+ <view class="btn" @click="goIndex()">返回</view>
|
|
74
|
+ <view class="btn" @click="createOrBuildOrder()" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单并签到</view>
|
|
75
|
+ <view class="btn" @click="createOrBuildOrder(orderId)" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单并签到</view>
|
|
76
|
+ </template>
|
|
77
|
+ <!-- 查看 -->
|
|
78
|
+ <template v-if="queryObj.type === 'view'">
|
|
79
|
+ <view class="btnW100" @click="goIndex()">返回</view>
|
|
80
|
+ </template>
|
|
81
|
+ <!-- 终点科室核对 -->
|
|
82
|
+ <template v-if="queryObj.type === 'end'">
|
|
83
|
+ <view class="btn" @click="goIndex()">返回</view>
|
|
84
|
+ <view class="btn" @click="toCheckPage()">批量交接</view>
|
|
85
|
+ </template>
|
|
86
|
+
|
|
87
|
+ </view>
|
|
88
|
+ </view>
|
|
89
|
+ <!-- 填写交接人工号弹窗 -->
|
|
90
|
+ <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
|
|
91
|
+ @cancel="hosCancel">
|
|
92
|
+ </selectAccount>
|
|
93
|
+ <!-- 动态密钥 -->
|
|
94
|
+ <numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
|
|
95
|
+ </view>
|
|
96
|
+</template>
|
|
97
|
+<script>
|
|
98
|
+ import numberKeyModel from "@/components/numberKeyModel/numberKeyModel.vue";
|
|
99
|
+ import {
|
|
100
|
+ get,
|
|
101
|
+ post,
|
|
102
|
+ SM,
|
|
103
|
+ webHandle
|
|
104
|
+ } from "@/http/http.js";
|
|
105
|
+ import chunk from 'lodash-es/chunk'
|
|
106
|
+ export default {
|
|
107
|
+ data() {
|
|
108
|
+ return {
|
|
109
|
+ queryObj: {}, //路由传递过来的数据
|
|
110
|
+ specimenPackageDTO: {}, //标本包信息
|
|
111
|
+ config: {}, //药品的业务流程配置
|
|
112
|
+ orderId: undefined, //根据药包查询到的工单ID
|
|
113
|
+ tube: [],//试管类型
|
|
114
|
+ SMFlag: true, //控制扫码
|
|
115
|
+ workOrder: {}, //工单信息
|
|
116
|
+ // 填写交接人工号弹窗model
|
|
117
|
+ hosModels: {
|
|
118
|
+ disjunctor: false,
|
|
119
|
+ },
|
|
120
|
+ showKey:false,
|
|
121
|
+ keyNum:4, //密钥位数
|
|
122
|
+ isNumberKey:false, //是否开启动态密钥
|
|
123
|
+ keyArr: [],
|
|
124
|
+ };
|
|
125
|
+ },
|
|
126
|
+ components: {
|
|
127
|
+ numberKeyModel,
|
|
128
|
+ },
|
|
129
|
+ onShow() {
|
|
130
|
+ this.SMFlag = true;
|
|
131
|
+ },
|
|
132
|
+ methods: {
|
|
133
|
+ // 返回
|
|
134
|
+ goIndex(){
|
|
135
|
+ uni.redirectTo({
|
|
136
|
+ url: `/pages/receiptpage/receiptpage`,
|
|
137
|
+ });
|
|
138
|
+ },
|
|
139
|
+ // 批量交接
|
|
140
|
+ toCheckPage(){
|
|
141
|
+ uni.redirectTo({
|
|
142
|
+ url: `/pages/specimenPackage/checkPage/checkPage?packageType=${this.queryObj.packageType}&packageId=${this.queryObj.packageId}&orderId=${this.queryObj.orderId}`,
|
|
143
|
+ });
|
|
144
|
+ },
|
|
145
|
+ // 根据配置跳转页面
|
|
146
|
+ pageNavigateByConfig(config, responseData, queryObj, checkType){
|
|
147
|
+ let packageType = queryObj.packageType;
|
|
148
|
+ let orderId = responseData.orderId;
|
|
149
|
+ let packageId = queryObj.packageId;
|
|
150
|
+ let orderStateValue = responseData.orderStateValue;
|
|
151
|
+ if(config.spePackageModel === 1){
|
|
152
|
+ // 一单一包
|
|
153
|
+ if(responseData.orderStateValue == 4){
|
|
154
|
+ // 待到达
|
|
155
|
+ if(config.drugsStartCheck === 1){
|
|
156
|
+ // 起点科室支持核对
|
|
157
|
+ if(checkType === 'scan'){
|
|
158
|
+ // 扫码
|
|
159
|
+ this.scanCode();
|
|
160
|
+ }else if(checkType === 'hand'){
|
|
161
|
+ // 手动输入
|
|
162
|
+ this.fillInManually(config.drugsStartManual.value);
|
|
163
|
+ }
|
|
164
|
+ }else{
|
|
165
|
+ // 起点科室不支持核对
|
|
166
|
+ this.completeOrder(responseData, queryObj);
|
|
167
|
+ }
|
|
168
|
+ }
|
|
169
|
+ }
|
|
170
|
+ },
|
|
171
|
+ // 扫一扫交接
|
|
172
|
+ scanCode(){
|
|
173
|
+ if (!this.SMFlag) {
|
|
174
|
+ return;
|
|
175
|
+ }
|
|
176
|
+ this.SMFlag = false;
|
|
177
|
+ SM().then((content) => {
|
|
178
|
+ uni.showLoading({
|
|
179
|
+ title: "加载中",
|
|
180
|
+ mask: true,
|
|
181
|
+ });
|
|
182
|
+
|
|
183
|
+ this.bigScan(content);
|
|
184
|
+ }).catch(err => {
|
|
185
|
+ this.SMFlag = true;
|
|
186
|
+ });
|
|
187
|
+ },
|
|
188
|
+ // 扫码
|
|
189
|
+ bigScan(content){
|
|
190
|
+ let postData = {
|
|
191
|
+ type: this.queryObj.packageType,
|
|
192
|
+ orderStateValue: this.workOrder.gdState.value,
|
|
193
|
+ code: content,
|
|
194
|
+ orderId: this.workOrder.id,
|
|
195
|
+ }
|
|
196
|
+
|
|
197
|
+ post("/transflow/bigScan", postData)
|
|
198
|
+ .then((res) => {
|
|
199
|
+ this.SMFlag = true;
|
|
200
|
+ uni.hideLoading();
|
|
201
|
+ if (res.codeBean) {
|
|
202
|
+ if(res.codeBean.valid){
|
|
203
|
+ this.pageCheckNavigateByConfig(this.config, this.workOrder, this.queryObj, res.codeBean.userDTO, res.codeBean.departmentDTO);
|
|
204
|
+ }else{
|
|
205
|
+ uni.showToast({
|
|
206
|
+ icon: "none",
|
|
207
|
+ title: res.codeBean.msg || "接口获取数据失败!",
|
|
208
|
+ });
|
|
209
|
+ }
|
|
210
|
+ } else {
|
|
211
|
+ uni.showToast({
|
|
212
|
+ icon: "none",
|
|
213
|
+ title: "接口获取数据失败!",
|
|
214
|
+ });
|
|
215
|
+ }
|
|
216
|
+ });
|
|
217
|
+ },
|
|
218
|
+ // 获取配置
|
|
219
|
+ getConfig() {
|
|
220
|
+ let postData = {
|
|
221
|
+ idx: 0,
|
|
222
|
+ sum: 9999,
|
|
223
|
+ hospitalConfig:{
|
|
224
|
+ hosId:this.hosId,
|
|
225
|
+ model:"all"
|
|
226
|
+ }
|
|
227
|
+ };
|
|
228
|
+
|
|
229
|
+ post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
|
|
230
|
+ if (result.status == 200) {
|
|
231
|
+ this.keyArr = []
|
|
232
|
+ for(let i of result.list){
|
|
233
|
+ if(i.key=='digitalSecretKey'){
|
|
234
|
+ if(i.value==1){
|
|
235
|
+ this.isNumberKey = true
|
|
236
|
+ }else{
|
|
237
|
+ this.isNumberKey = false
|
|
238
|
+ }
|
|
239
|
+ }else if(i.key=='numberDigitalSecretKey'){
|
|
240
|
+ this.keyNum = Number(i.value)
|
|
241
|
+ }
|
|
242
|
+ }
|
|
243
|
+ for(let i = 0; i < this.keyNum; i++){
|
|
244
|
+ this.keyArr.push({
|
|
245
|
+ value:null
|
|
246
|
+ })
|
|
247
|
+ }
|
|
248
|
+ console.log(444,this.keyArr)
|
|
249
|
+ }
|
|
250
|
+ });
|
|
251
|
+ },
|
|
252
|
+ confirmKey(data){
|
|
253
|
+ this.padChange(data)
|
|
254
|
+ this.showKey = false
|
|
255
|
+ },
|
|
256
|
+ isShowKey(){
|
|
257
|
+ this.showKey = true
|
|
258
|
+ },
|
|
259
|
+ padChange(scannerCode){
|
|
260
|
+ if(!this.isNumberKey){
|
|
261
|
+ scannerCode = scannerCode.replace('\n','')
|
|
262
|
+ }
|
|
263
|
+ this.bigScan(scannerCode);
|
|
264
|
+ },
|
|
265
|
+ // 手动填写
|
|
266
|
+ fillInManually(value){
|
|
267
|
+ if(value == 1){
|
|
268
|
+ // 填写工号
|
|
269
|
+ this.showSelectAccount();
|
|
270
|
+ }else if(value == 2){
|
|
271
|
+ // 动态密钥
|
|
272
|
+ this.isShowKey();
|
|
273
|
+ }
|
|
274
|
+ },
|
|
275
|
+ // 填写交接人工号-确认
|
|
276
|
+ hosOk(data) {
|
|
277
|
+ console.log(data);
|
|
278
|
+ const {
|
|
279
|
+ accountName,
|
|
280
|
+ account,
|
|
281
|
+ accountId
|
|
282
|
+ } = data;
|
|
283
|
+ if (!accountName && !account) {
|
|
284
|
+ //没有填写交接人
|
|
285
|
+ uni.showModal({
|
|
286
|
+ title: "提示",
|
|
287
|
+ content: "请填写交接人工号!",
|
|
288
|
+ showCancel: false,
|
|
289
|
+ success: function(res) {
|
|
290
|
+ if (res.confirm) {
|
|
291
|
+ console.log("用户点击确定");
|
|
292
|
+ } else if (res.cancel) {
|
|
293
|
+ console.log("用户点击取消");
|
|
294
|
+ }
|
|
295
|
+ },
|
|
296
|
+ });
|
|
297
|
+ return;
|
|
298
|
+ } else if ((!accountName && account) || (accountName && !account)) {
|
|
299
|
+ //没有填写交接人
|
|
300
|
+ uni.showModal({
|
|
301
|
+ title: "提示",
|
|
302
|
+ content: "请填写正确的交接人工号!",
|
|
303
|
+ showCancel: false,
|
|
304
|
+ success: function(res) {
|
|
305
|
+ if (res.confirm) {
|
|
306
|
+ console.log("用户点击确定");
|
|
307
|
+ } else if (res.cancel) {
|
|
308
|
+ console.log("用户点击取消");
|
|
309
|
+ }
|
|
310
|
+ },
|
|
311
|
+ });
|
|
312
|
+ return;
|
|
313
|
+ }
|
|
314
|
+ this.hosModels.disjunctor = false;
|
|
315
|
+ this.validateAccount(data);
|
|
316
|
+ },
|
|
317
|
+ // 填写交接人工号-取消
|
|
318
|
+ hosCancel() {
|
|
319
|
+ this.hosModels.disjunctor = false;
|
|
320
|
+ this.flag = true;
|
|
321
|
+ },
|
|
322
|
+ // 填写交接人工号弹窗
|
|
323
|
+ showSelectAccount() {
|
|
324
|
+ this.hosModels = {
|
|
325
|
+ disjunctor: true,
|
|
326
|
+ };
|
|
327
|
+ },
|
|
328
|
+ // 手动填写工号校验
|
|
329
|
+ validateAccount(accountObj){
|
|
330
|
+ const {
|
|
331
|
+ accountName,
|
|
332
|
+ account,
|
|
333
|
+ accountId
|
|
334
|
+ } = accountObj;
|
|
335
|
+ uni.showLoading({
|
|
336
|
+ title: "加载中",
|
|
337
|
+ mask: true,
|
|
338
|
+ });
|
|
339
|
+
|
|
340
|
+ let postData = {
|
|
341
|
+ extraType: 'inputAccountValid',
|
|
342
|
+ type: this.queryObj.packageType,
|
|
343
|
+ orderStateValue: this.workOrder.gdState.value,
|
|
344
|
+ userId: accountId,
|
|
345
|
+ orderId: this.workOrder.id,
|
|
346
|
+ }
|
|
347
|
+
|
|
348
|
+ post("/transflow/extra", postData)
|
|
349
|
+ .then((res) => {
|
|
350
|
+ uni.hideLoading();
|
|
351
|
+ if(res.state == 200){
|
|
352
|
+ if(res.data){
|
|
353
|
+ if (res.data.codeBean) {
|
|
354
|
+ if(res.data.codeBean.valid){
|
|
355
|
+ this.pageCheckNavigateByConfig(this.config, this.workOrder, this.queryObj, { id: accountId, name: accountName }, res.data.codeBean.departmentDTO);
|
|
356
|
+ }else{
|
|
357
|
+ uni.showToast({
|
|
358
|
+ icon: "none",
|
|
359
|
+ title: res.data.codeBean.msg || "接口获取数据失败!",
|
|
360
|
+ });
|
|
361
|
+ }
|
|
362
|
+ } else {
|
|
363
|
+ uni.showToast({
|
|
364
|
+ icon: "none",
|
|
365
|
+ title: "接口获取数据失败!",
|
|
366
|
+ });
|
|
367
|
+ }
|
|
368
|
+ }else{
|
|
369
|
+ uni.showToast({
|
|
370
|
+ icon: "none",
|
|
371
|
+ title: "接口获取数据失败!",
|
|
372
|
+ });
|
|
373
|
+ }
|
|
374
|
+ }else{
|
|
375
|
+ uni.showToast({
|
|
376
|
+ icon: "none",
|
|
377
|
+ title: res.msg || "接口获取数据失败!",
|
|
378
|
+ });
|
|
379
|
+ }
|
|
380
|
+ });
|
|
381
|
+ },
|
|
382
|
+ // 核对-根据配置跳转页面
|
|
383
|
+ pageCheckNavigateByConfig(config, workOrder, queryObj, accountObj, departmentDTO){
|
|
384
|
+ console.log(accountObj, departmentDTO);
|
|
385
|
+ let packageType = queryObj.packageType;
|
|
386
|
+ let orderId = workOrder.id;
|
|
387
|
+ this.completeCheckOrder(workOrder, queryObj, accountObj);
|
|
388
|
+ },
|
|
389
|
+ // 核对-工单完成
|
|
390
|
+ completeCheckOrder(workOrder, queryObj, accountObj){
|
|
391
|
+ uni.showLoading({
|
|
392
|
+ title: "加载中",
|
|
393
|
+ mask: true,
|
|
394
|
+ });
|
|
395
|
+ let postData = {
|
|
396
|
+ "type": queryObj.packageType,
|
|
397
|
+ "orderId": workOrder.id,
|
|
398
|
+ "packageId": +this.queryObj.packageId,
|
|
399
|
+ "handover": accountObj ? accountObj.id : undefined,
|
|
400
|
+ };
|
|
401
|
+ post('/transflow/checkComplete', postData).then(res => {
|
|
402
|
+ uni.hideLoading();
|
|
403
|
+ if(res.state == 200){
|
|
404
|
+ uni.showToast({
|
|
405
|
+ icon: "none",
|
|
406
|
+ title: workOrder.gdState.value == 4 ? "交接成功,请尽快送达科室!" : (workOrder.gdState.value == 5 ? "交接成功,完成配送!" : ""),
|
|
407
|
+ duration: 60000,
|
|
408
|
+ mask: true,
|
|
409
|
+ complete(){
|
|
410
|
+ setTimeout(() => {
|
|
411
|
+ uni.hideToast();
|
|
412
|
+ uni.redirectTo({
|
|
413
|
+ url: `/pages/receiptpage/receiptpage`,
|
|
414
|
+ });
|
|
415
|
+ }, 2000)
|
|
416
|
+ }
|
|
417
|
+ });
|
|
418
|
+ }else{
|
|
419
|
+ uni.showToast({
|
|
420
|
+ icon: "none",
|
|
421
|
+ title: res.msg || "接口获取数据失败!",
|
|
422
|
+ });
|
|
423
|
+ }
|
|
424
|
+ })
|
|
425
|
+ },
|
|
426
|
+ // 工单完成
|
|
427
|
+ completeOrder(responseData, queryObj){
|
|
428
|
+ uni.showLoading({
|
|
429
|
+ title: "加载中",
|
|
430
|
+ mask: true,
|
|
431
|
+ });
|
|
432
|
+ let postData = {
|
|
433
|
+ "type": queryObj.packageType,
|
|
434
|
+ "packageId": +this.queryObj.packageId,
|
|
435
|
+ "orderId": responseData.orderId,
|
|
436
|
+ };
|
|
437
|
+ post('/transflow/checkComplete', postData).then(res => {
|
|
438
|
+ uni.hideLoading();
|
|
439
|
+ if(res.state == 200){
|
|
440
|
+ uni.showToast({
|
|
441
|
+ icon: "none",
|
|
442
|
+ title: responseData.orderStateValue == 4 ? "交接成功,请尽快送达科室!" : (responseData.orderStateValue == 5 ? "交接成功,完成配送!" : ""),
|
|
443
|
+ duration: 60000,
|
|
444
|
+ mask: true,
|
|
445
|
+ complete(){
|
|
446
|
+ setTimeout(() => {
|
|
447
|
+ uni.hideToast();
|
|
448
|
+ uni.redirectTo({
|
|
449
|
+ url: `/pages/receiptpage/receiptpage`,
|
|
450
|
+ });
|
|
451
|
+ }, 2000)
|
|
452
|
+ }
|
|
453
|
+ });
|
|
454
|
+ }else{
|
|
455
|
+ uni.showToast({
|
|
456
|
+ icon: "none",
|
|
457
|
+ title: res.msg || "接口获取数据失败!",
|
|
458
|
+ });
|
|
459
|
+ }
|
|
460
|
+ })
|
|
461
|
+ },
|
|
462
|
+ // 建单并签到/接单并签到-orderId
|
|
463
|
+ // 扫码scan/手动hand-checkType
|
|
464
|
+ createOrBuildOrder(orderId, checkType){
|
|
465
|
+ uni.showModal({
|
|
466
|
+ title: "提示",
|
|
467
|
+ content: `请确认是否${orderId ? '接' : '建'}单并签到?`,
|
|
468
|
+ success: (result) => {
|
|
469
|
+ if (result.confirm) {
|
|
470
|
+ console.log("用户点击确定");
|
|
471
|
+ let postData = {
|
|
472
|
+ type: this.queryObj.packageType,
|
|
473
|
+ id: +this.queryObj.packageId,
|
|
474
|
+ orderId,
|
|
475
|
+ };
|
|
476
|
+ uni.showLoading({
|
|
477
|
+ title: "加载中",
|
|
478
|
+ mask: true,
|
|
479
|
+ });
|
|
480
|
+ post(`/transflow/createOrTakeOrder`, postData).then((ress) => {
|
|
481
|
+ uni.hideLoading();
|
|
482
|
+ if (ress.state == 200) {
|
|
483
|
+ if(ress.data.msg){
|
|
484
|
+ uni.showToast({
|
|
485
|
+ icon: "none",
|
|
486
|
+ title: ress.data.msg || "接口获取数据失败!",
|
|
487
|
+ });
|
|
488
|
+ }else{
|
|
489
|
+ this.workOrder = {
|
|
490
|
+ id: ress.data.orderId,
|
|
491
|
+ gdState: {
|
|
492
|
+ value: ress.data.orderStateValue,
|
|
493
|
+ },
|
|
494
|
+ };
|
|
495
|
+ console.log('workOrder', this.workOrder);
|
|
496
|
+ this.pageNavigateByConfig(this.config, ress.data, this.queryObj, checkType);
|
|
497
|
+ }
|
|
498
|
+ } else {
|
|
499
|
+ uni.showToast({
|
|
500
|
+ icon: "none",
|
|
501
|
+ title: ress.msg || "接口获取数据失败!",
|
|
502
|
+ });
|
|
503
|
+ }
|
|
504
|
+ });
|
|
505
|
+ } else if (result.cancel) {
|
|
506
|
+ console.log("用户点击取消");
|
|
507
|
+ }
|
|
508
|
+ },
|
|
509
|
+ });
|
|
510
|
+ },
|
|
511
|
+ //获取页面信息
|
|
512
|
+ getInfo(){
|
|
513
|
+ uni.showLoading({
|
|
514
|
+ title: "加载中",
|
|
515
|
+ mask: true,
|
|
516
|
+ });
|
|
517
|
+
|
|
518
|
+ post(`/transflow/scanInfo`, {type: this.queryObj.packageType, id: +this.queryObj.packageId, orderStateValue: this.queryObj.type === 'end' ? '5' : '4'}).then(res => {
|
|
519
|
+ uni.hideLoading();
|
|
520
|
+ if(res.state == 200){
|
|
521
|
+ if(res.data){
|
|
522
|
+ this.specimenPackageDTO = res.data.dto || {};
|
|
523
|
+ this.orderId = this.queryObj.orderId;
|
|
524
|
+ this.config = res.data.taskTypeConfig || {};
|
|
525
|
+ let tube = res.data.tube || [];
|
|
526
|
+ this.tube = chunk(tube, 3);
|
|
527
|
+ }
|
|
528
|
+ }else{
|
|
529
|
+ uni.showToast({
|
|
530
|
+ icon: "none",
|
|
531
|
+ title: res.msg || "接口获取数据失败!",
|
|
532
|
+ });
|
|
533
|
+ }
|
|
534
|
+ })
|
|
535
|
+ },
|
|
536
|
+ },
|
|
537
|
+ onLoad(options) {
|
|
538
|
+ console.log(options, "options");
|
|
539
|
+ this.queryObj = options;
|
|
540
|
+ this.getInfo();
|
|
541
|
+ this.getConfig();
|
|
542
|
+ // #ifdef APP-PLUS
|
|
543
|
+ webHandle("no", "app");
|
|
544
|
+ // #endif
|
|
545
|
+ // #ifdef H5
|
|
546
|
+ webHandle("no", "wx");
|
|
547
|
+ // #endif
|
|
548
|
+ },
|
|
549
|
+ };
|
|
550
|
+</script>
|
|
551
|
+<style lang="less" scoped>
|
|
552
|
+ .Scanning_Result {
|
|
553
|
+ background: #FAFBFD;
|
|
554
|
+ padding: 0 48rpx;
|
|
555
|
+ display: flex;
|
|
556
|
+ flex-direction: column;
|
|
557
|
+ height: 100vh;
|
|
558
|
+
|
|
559
|
+ .Scanning_top {
|
|
560
|
+ margin: 50rpx auto 64rpx;
|
|
561
|
+ display: flex;
|
|
562
|
+ flex-direction: column;
|
|
563
|
+ align-items: center;
|
|
564
|
+ .Scanning_top_icon {
|
|
565
|
+ width: 128rpx;
|
|
566
|
+ height: 128rpx;
|
|
567
|
+ border-radius: 50%;
|
|
568
|
+
|
|
569
|
+ .cubeic-ok {
|
|
570
|
+ font-size: 128rpx;
|
|
571
|
+ color: #35b34a;
|
|
572
|
+ }
|
|
573
|
+ }
|
|
574
|
+ .ScanTips{
|
|
575
|
+ margin-top: 34rpx;
|
|
576
|
+ font-size: 38rpx;
|
|
577
|
+ font-weight: bold;
|
|
578
|
+ }
|
|
579
|
+ }
|
|
580
|
+
|
|
581
|
+ .Scanning_cont {
|
|
582
|
+ flex: 1;
|
|
583
|
+ min-height: 0;
|
|
584
|
+ display: flex;
|
|
585
|
+ flex-direction: column;
|
|
586
|
+ .scrollContent{
|
|
587
|
+ flex: 1;
|
|
588
|
+ min-height: 0;
|
|
589
|
+ }
|
|
590
|
+ .column{
|
|
591
|
+ display: flex;
|
|
592
|
+ justify-content: center;
|
|
593
|
+ font-size: 30rpx;
|
|
594
|
+ margin-bottom: 32rpx;
|
|
595
|
+ .name{
|
|
596
|
+ font-weight: bold;
|
|
597
|
+ word-break: break-all;
|
|
598
|
+ flex-shrink: 0;
|
|
599
|
+ }
|
|
600
|
+ .value{
|
|
601
|
+ word-break: break-all;
|
|
602
|
+ flex: 1;
|
|
603
|
+ .valueBlock{
|
|
604
|
+ margin-top: 16rpx;
|
|
605
|
+ display: flex;
|
|
606
|
+ &:first-of-type{
|
|
607
|
+ margin-top: 0;
|
|
608
|
+ }
|
|
609
|
+ .valueItem{
|
|
610
|
+ flex: 1;
|
|
611
|
+ }
|
|
612
|
+ }
|
|
613
|
+ }
|
|
614
|
+ }
|
|
615
|
+ }
|
|
616
|
+
|
|
617
|
+ .foot_btn_spe {
|
|
618
|
+ margin: 24rpx 0;
|
|
619
|
+ display: flex;
|
|
620
|
+ flex-direction: column;
|
|
621
|
+ align-items: center;
|
|
622
|
+ gap: 24rpx;
|
|
623
|
+ font-weight: bold;
|
|
624
|
+
|
|
625
|
+ .column{
|
|
626
|
+ width: 100%;
|
|
627
|
+ display: flex;
|
|
628
|
+ justify-content: space-between;
|
|
629
|
+ gap: 24rpx;
|
|
630
|
+ flex-wrap: wrap;
|
|
631
|
+
|
|
632
|
+ .grayBg{
|
|
633
|
+ background: #8F939C!important;
|
|
634
|
+ }
|
|
635
|
+
|
|
636
|
+ .btn {
|
|
637
|
+ height: 78rpx;
|
|
638
|
+ width: calc(50% - 24rpx);
|
|
639
|
+ background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
|
|
640
|
+ color: #fff;
|
|
641
|
+ border-radius: 4rpx;
|
|
642
|
+ font-size: 30rpx;
|
|
643
|
+ display: flex;
|
|
644
|
+ justify-content: center;
|
|
645
|
+ align-items: center;
|
|
646
|
+ }
|
|
647
|
+ .btnW100 {
|
|
648
|
+ height: 78rpx;
|
|
649
|
+ width: 100%;
|
|
650
|
+ background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
|
|
651
|
+ color: #fff;
|
|
652
|
+ border-radius: 4rpx;
|
|
653
|
+ font-size: 30rpx;
|
|
654
|
+ display: flex;
|
|
655
|
+ justify-content: center;
|
|
656
|
+ align-items: center;
|
|
657
|
+ }
|
|
658
|
+ }
|
|
659
|
+ }
|
|
660
|
+ }
|
|
661
|
+</style>
|