Explorar o código

药品录入,标本录入

seimin %!s(int64=2) %!d(string=hai) anos
pai
achega
cec297dc99
Modificáronse 1 ficheiros con 50 adicións e 9 borrados
  1. 50 9
      pages/scanning_djEnd/scanning_djEnd.vue

+ 50 - 9
pages/scanning_djEnd/scanning_djEnd.vue

@@ -114,6 +114,12 @@
114 114
           type1 === 'jp-ddd-2' ||
115 115
           type1 === 'jp-dsd-2'
116 116
         ">继续扫描</view>
117
+      <view class="btn3" @click="showHandViewDrugsbag()" v-if="
118
+          type1 === 'drug-ddd-2' ||
119
+          type1 === 'drug-dsd-2' ||
120
+          type1 === 'jp-ddd-2' ||
121
+          type1 === 'jp-dsd-2'
122
+        ">手动录入</view>
117 123
       <view class="btn3" @click="showAlert()" v-if="
118 124
           type1 === 'drug-ddd-1' ||
119 125
           type1 === 'drug-dsd-1' ||
@@ -130,7 +136,7 @@
130 136
           (type1 != 'spe-ddd-1') & (type1 != 'spe-ddd-2'))
131 137
       ">
132 138
       <view class="btn1" @click="Scanning_again()">扫描标本</view>
133
-      <view class="btn3" @click="hand_again()">手动录入</view>
139
+      <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
134 140
       <view class="btn3" @click="getNoScanSpecimen()">未扫描标本</view>
135 141
       <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view>
136 142
     </view>
@@ -139,7 +145,7 @@
139 145
         (type == 'specimen' && type1 == 'spe-ddd-2')
140 146
       ">
141 147
       <view class="btn1" @click="Scanning_again()">扫描标本</view>
142
-      <view class="btn3" @click="hand_again()">手动录入</view>
148
+      <view class="btn3" @click="showHandViewSpecimen()">手动录入</view>
143 149
       <view class="btn3" @click="getNoScanSpecimen()">未扫描标本</view>
144 150
       <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view>
145 151
     </view>
@@ -189,6 +195,10 @@
189 195
     <handViewSpecimen v-if="speModels.disjunctor" :title="speModels.title" :disjunctor="speModels.disjunctor"
190 196
       @ok="speOk" @cancel="speCancel">
191 197
     </handViewSpecimen>
198
+    <!-- 手动查询药品弹窗 -->
199
+    <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
200
+      :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
201
+    </handViewDrugsBag>
192 202
   </view>
193 203
 </template>
194 204
 <script>
@@ -207,6 +217,10 @@
207 217
         speModels: {
208 218
           disjunctor: false,
209 219
         },
220
+        // 手动查询药品弹窗model
221
+        drugbagModels: {
222
+          disjunctor: false,
223
+        },
210 224
         // 交接人信息
211 225
         accountObj: undefined,
212 226
         //传给后端查询是否继续扫描
@@ -234,6 +248,39 @@
234 248
       };
235 249
     },
236 250
     methods: {
251
+      // 手动查询药品-确认
252
+      drugbagOk(data) {
253
+        console.log(data);
254
+        if (!data.id) {
255
+          //没有查询到药品
256
+          uni.showModal({
257
+            title: '提示',
258
+            content: "没有查询到发药单号!",
259
+            showCancel: false,
260
+            success: function(res) {
261
+              if (res.confirm) {
262
+                console.log('用户点击确定');
263
+              } else if (res.cancel) {
264
+                console.log('用户点击取消');
265
+              }
266
+            }
267
+          });
268
+          return;
269
+        }
270
+        this.drugbagModels.disjunctor = false;
271
+        this.hand_scanning_common(data.packid, 'hand');
272
+      },
273
+      // 手动查询药品-取消
274
+      drugbagCancel() {
275
+        this.drugbagModels.disjunctor = false;
276
+      },
277
+      // 手动查询药品弹窗
278
+      showHandViewDrugsbag() {
279
+        this.drugbagModels = {
280
+          title: '填写发药单号',
281
+          disjunctor: true,
282
+        }
283
+      },
237 284
       // 手动查询标本-确认
238 285
       speOk(data) {
239 286
         console.log(data);
@@ -267,10 +314,6 @@
267 314
           disjunctor: true,
268 315
         }
269 316
       },
270
-      // 手动录入标本
271
-      hand_again() {
272
-        this.showHandViewSpecimen();
273
-      },
274 317
       // 手动输入标本和扫码公共方法
275 318
       hand_scanning_common(ress1, type) {
276 319
         uni.showLoading({
@@ -283,8 +326,8 @@
283 326
           content: ress1,
284 327
         }).then((result) => {
285 328
           this.SMFlag = true;
286
-          this.currentCode = result.code;
287 329
           if (result.state == 200 || result.state == 201) {
330
+            this.currentCode = result.code;
288 331
             let ress = result.code;
289 332
             let speCode = ress;
290 333
             let data = {
@@ -331,8 +374,6 @@
331 374
                 if (this.type == "specimenPlan" || this.type == "specimen") {
332 375
                   if (type === 'scan') {
333 376
                     this.Scanning_again();
334
-                  } else if (type === 'hand') {
335
-                    // this.hand_again();
336 377
                   }
337 378
                 }
338 379
                 this.speNum = ress.specimenCount;