seimin 2 years ago
parent
commit
4328280c5f

+ 207 - 0
components/showMyQrcode/showMyQrcode.vue

@@ -0,0 +1,207 @@
1
+<template>
2
+  <view class="showModel" v-show="disjunctor">
3
+    <view class="showModel__wrap">
4
+      <view class="showModel__header">
5
+        我的二维码
6
+      </view>
7
+      <view class="showModel__article">
8
+        <view class="showModel__content">
9
+          <image :src="qrCode" mode="widthFix" style="width: 100%;"></image>
10
+        </view>
11
+      </view>
12
+      <view class="showModel__footer">
13
+        <view class="showModel__know" @click="know" hover-class="seimin-btn-hover">关闭</view>
14
+      </view>
15
+    </view>
16
+  </view>
17
+</template>
18
+
19
+<script>
20
+  import {
21
+    get,
22
+    post,
23
+    webHandle
24
+  } from "../../http/http.js";
25
+  export default {
26
+    data() {
27
+      return {
28
+        qrCode: '',
29
+      };
30
+    },
31
+    props: {
32
+      // 显示隐藏
33
+      disjunctor: {
34
+        type: Boolean,
35
+        default: false,
36
+      },
37
+    },
38
+    methods: {
39
+      // 关闭
40
+      know() {
41
+        this.$emit("know");
42
+      },
43
+      // 获取我的二维码
44
+      getQrCode(){
45
+        uni.showLoading({
46
+          title: "加载中",
47
+          mask: true,
48
+        });
49
+        post("/data/createUserQRCode/0", {})
50
+          .then((result) => {
51
+            uni.hideLoading();
52
+            if (result.status == 200) {
53
+              this.qrCode = result.data;
54
+            } else {
55
+              uni.showToast({
56
+                icon: "none",
57
+                title: '请求失败',
58
+              });
59
+            }
60
+          })
61
+      }
62
+    },
63
+    mounted() {
64
+      this.getQrCode();
65
+    }
66
+  };
67
+</script>
68
+
69
+<style lang="less" scoped>
70
+  .showModel {
71
+    position: fixed;
72
+    left: 0;
73
+    right: 0;
74
+    top: 0;
75
+    bottom: 0;
76
+    background-color: rgba(0, 0, 0, 0.2);
77
+    z-index: 999999;
78
+
79
+    .showModel__wrap {
80
+      width: 560rpx;
81
+      position: absolute;
82
+      left: 50%;
83
+      top: 50%;
84
+      transform: translate(-50%, -50%);
85
+      background-color: #fff;
86
+      border-radius: 12rpx;
87
+
88
+      .showModel__header {
89
+        font-size: 36rpx;
90
+        color: #000;
91
+        height: 84rpx;
92
+        display: flex;
93
+        justify-content: center;
94
+        align-items: center;
95
+      }
96
+
97
+      .showModel__article {
98
+        color: #000;
99
+        margin: 0 auto 25rpx;
100
+        width: 488rpx;
101
+        background-color: rgb(249, 250, 251);
102
+        border: 2rpx solid rgb(229, 233, 237);
103
+        border-radius: 12rpx;
104
+        box-sizing: border-box;
105
+        display: flex;
106
+        flex-direction: column;
107
+        justify-content: center;
108
+        align-items: center;
109
+
110
+        &.p0 {
111
+          padding: 0;
112
+        }
113
+
114
+        &.p1 {
115
+          text-align: left;
116
+        }
117
+
118
+        .showModel__icon {
119
+          font-size: 138rpx;
120
+          margin-bottom: 32rpx;
121
+
122
+          &.showModel__icon--success {
123
+            color: rgb(52, 179, 73);
124
+          }
125
+
126
+          &.showModel__icon--warn {
127
+            color: rgb(245, 165, 35);
128
+          }
129
+
130
+          &.showModel__icon--error {
131
+            color: rgb(255, 58, 82);
132
+          }
133
+        }
134
+
135
+        .showModel__content {
136
+          font-size: 36rpx;
137
+          word-break: break-all;
138
+          width: 100%;
139
+        }
140
+
141
+        .showModel__info {
142
+          font-size: 32rpx;
143
+          color: rgb(102, 102, 102);
144
+        }
145
+
146
+        .specialCloseFlag {
147
+          width: 90%;
148
+          height: 100%;
149
+          padding: 16rpx;
150
+        }
151
+
152
+        .radio-wrap {
153
+          .radio-item {
154
+            margin-top: 16rpx;
155
+
156
+            /deep/ .uni-radio-input-checked {
157
+              background-color: #49b856 !important;
158
+              border-color: #49b856 !important;
159
+            }
160
+          }
161
+        }
162
+      }
163
+
164
+      .showModel__footer {
165
+        box-sizing: border-box;
166
+        height: 100rpx;
167
+        border-top: 2rpx solid rgb(229, 233, 237);
168
+        display: flex;
169
+        align-items: center;
170
+
171
+        view {
172
+          height: 100%;
173
+          display: flex;
174
+          align-items: center;
175
+          justify-content: center;
176
+          font-size: 36rpx;
177
+          color: rgb(102, 102, 102);
178
+          position: relative;
179
+
180
+          &:nth-of-type(2)::before {
181
+            content: "";
182
+            position: absolute;
183
+            left: 0;
184
+            bottom: 0;
185
+            width: 2rpx;
186
+            height: 87rpx;
187
+            background-color: rgb(229, 233, 237);
188
+          }
189
+        }
190
+
191
+        .showModel__ok {
192
+          flex: 1;
193
+          color: rgb(73, 184, 86);
194
+        }
195
+
196
+        .showModel__cancel {
197
+          flex: 1;
198
+        }
199
+
200
+        .showModel__know {
201
+          flex: 1;
202
+          color: rgb(73, 184, 86);
203
+        }
204
+      }
205
+    }
206
+  }
207
+</style>

+ 1 - 1
main.js

@@ -4,7 +4,7 @@ import App from './App'
4 4
 import wx from 'weixin-jsapi'
5 5
 // import VConsole from 'vconsole';
6 6
 // new VConsole();
7
-console.info('v2.4.22');
7
+console.info('v2.4.23');
8 8
 Vue.prototype.wx = wx //声明扫码
9 9
 Vue.prototype.audios = [] //待播放的语音集合
10 10
 // #endif

+ 1 - 1
pages/patientInformationList/patientInformationList.vue

@@ -162,7 +162,7 @@
162 162
           console.log(res)
163 163
           if (res.status == 200) {
164 164
             res.list = res.list || [];
165
-            if (res.list[0].signTypeIds) {
165
+            if (res.list[0] && res.list[0].signTypeIds) {
166 166
               // 如果开启
167 167
               const postData = {
168 168
                 "idx": 0,

+ 21 - 0
pages/receiptpage/receiptpage.vue

@@ -280,6 +280,8 @@
280 280
     <!-- 弹窗 -->
281 281
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
282 282
       @ok="ok" @cancel="cancel" @know="know" :operate="models.operate"></showModel>
283
+    <!-- 我的二维码-弹窗 -->
284
+    <showMyQrcode v-if="showMyQrcodeModel.disjunctor" :disjunctor="showMyQrcodeModel.disjunctor" @know="closeMyQrcodeModel"></showMyQrcode>
283 285
     <!-- 手动查询标本弹窗 -->
284 286
     <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
285 287
       @ok="speOk" @cancel="speCancel">
@@ -309,6 +311,10 @@
309 311
   export default {
310 312
     data() {
311 313
       return {
314
+        // 弹窗model
315
+        showMyQrcodeModel: {
316
+          disjunctor: false,
317
+        },
312 318
         SMFlag: true,
313 319
         // 手动查询标本弹窗model
314 320
         speModels: {
@@ -557,6 +563,10 @@
557 563
             this.content.push({
558 564
               text: "摆药取药",
559 565
             });
566
+          } else if (item.link === "myQrcode") {
567
+            this.content.push({
568
+              text: "我的二维码",
569
+            });
560 570
           }
561 571
         });
562 572
       },
@@ -646,8 +656,19 @@
646 656
           this.showHandViewDrugsbag();
647 657
         } else if (e.item.text === "摆药取药") {
648 658
           this.handleTakeMedicine()
659
+        } else if (e.item.text === "我的二维码") {
660
+          this.myQrcodeHandler()
649 661
         }
650 662
       },
663
+      // 我的二维码
664
+      myQrcodeHandler(){
665
+        this.showMyQrcodeModel = {
666
+          disjunctor: true,
667
+        };
668
+      },
669
+      closeMyQrcodeModel(){
670
+        this.showMyQrcodeModel.disjunctor = false;
671
+      },
651 672
       // 摆药取药
652 673
       handleTakeMedicine() {
653 674
         if (!this.SMFlag) {

+ 1 - 1
pages/scanning_all/scanning_all.vue

@@ -414,7 +414,7 @@
414 414
               post("/simple/data/fetchDataList/taskTypeConfig", postData).then((result) => {
415 415
                 uni.hideLoading();
416 416
                 if(result.status == 200){
417
-                  if(result.list[0].checkType){
417
+                  if(result.list && result.list[0] && result.list[0].checkType){
418 418
                     if(result.list[0].checkType.value == 1){
419 419
                       // 起点终点科室按照血制品类型进行核对
420 420
                       uni.navigateTo({

+ 2 - 2
pages/scanning_ins/scanning_ins.vue

@@ -323,7 +323,7 @@
323 323
           console.log(res)
324 324
           if (res.status == 200) {
325 325
             res.list = res.list || [];
326
-            if (res.list[0].signTypeIds) {
326
+            if (res.list[0] && res.list[0].signTypeIds) {
327 327
               // 如果开启
328 328
               const postData = {
329 329
                 "idx": 0,
@@ -398,7 +398,7 @@
398 398
             console.log(res)
399 399
             if (res.status == 200) {
400 400
               res.list = res.list || [];
401
-              if (res.list[0].signTypeIds && this.typeData.gdState.value == 4) {
401
+              if (res.list[0] && res.list[0].signTypeIds && this.typeData.gdState.value == 4) {
402 402
                 // 如果开启并且工单状态是待到达
403 403
                 const postData = {
404 404
                   "idx": 0,