瀏覽代碼

8月15日

XMLWAN 2 年之前
父節點
當前提交
b2d218e0e4

+ 8 - 0
src/api/dialysis.js 查看文件

@@ -355,3 +355,11 @@ export function getDialysisAdviceSchedudeList(params) {
355 355
     params: params
356 356
   })
357 357
 }
358
+
359
+export function getDialysisParameterGoodList(params) {
360
+  return request({
361
+    url: '/api/patient/getdialysisparametergoodlist',
362
+    method: 'get',
363
+    params: params
364
+  })
365
+}

+ 173 - 2
src/xt_pages/dialysis/details/consumable/dialysisParameter.vue 查看文件

@@ -242,12 +242,79 @@
242 242
       :total="total"
243 243
     >
244 244
     </el-pagination>
245
+
246
+
247
+   <el-dialog
248
+      title="药品统计表"
249
+      :visible.sync="startdialogVisible"
250
+      width="70%">
251
+      <span>
252
+        <div class="cell clearfix">
253
+          <label class="title"> <span class="name">排班班次</span> : </label>
254
+           <el-select v-model="schedule_type" placeholder="请选择">
255
+            <el-option
256
+              v-for="item in schedulArr"
257
+              :key="item.value"
258
+              :label="item.label"
259
+              :value="item.value">
260
+            </el-option>
261
+           </el-select>
262
+           <label class="title"> <span class="name">病区选择</span> : </label>
263
+           <el-select v-model="partion_type" placeholder="请选择">
264
+            <el-option
265
+              v-for="item in partitionArr"
266
+              :key="item.id"
267
+              :label="item.name"
268
+              :value="item.id">
269
+            </el-option>
270
+           </el-select>
271
+        </div> 
272
+       <el-table
273
+        :data="tableList"
274
+        border
275
+        :row-style="{ color: '#303133' }"
276
+        :header-cell-style="{
277
+          backgroundColor: 'rgb(245, 247, 250)',
278
+          color: '#606266'
279
+        }"
280
+      >
281
+         <el-table-column  align="center"  label="序号">
282
+           <template slot-scope="scope">
283
+              {{scope.$index+1}}
284
+           </template>
285
+        </el-table-column>
286
+        <el-table-column  align="center"   label="名称">
287
+         <template slot-scope="scope">
288
+             {{scope.row.name}}
289
+         </template>
290
+        </el-table-column>
291
+        <el-table-column  align="center"  label="规格">
292
+           <template slot-scope="scope">
293
+             {{scope.row.specification_name}}
294
+           </template>
295
+        </el-table-column>
296
+       
297
+        <el-table-column  align="center"   label="数量">
298
+           <template slot-scope="scope">
299
+            {{scope.row.count}}
300
+           </template>
301
+        </el-table-column>
302
+        
303
+     
304
+
305
+      </el-table>
306
+      </span>
307
+      <span slot="footer" class="dialog-footer">
308
+        <el-button @click="startdialogVisible = false">取 消</el-button>
309
+        <el-button type="primary" @click="startdialogVisible = false">确 定</el-button>
310
+      </span>
311
+    </el-dialog>
245 312
   </div>
246 313
 </template>
247 314
 
248 315
 
249 316
 <script>
250
-  import { GetAllZone,saveDialysisSetting,getDialysisSetting,getDialysisParameter } from '@/api/dialysis'
317
+  import { GetAllZone,saveDialysisSetting,getDialysisSetting,getDialysisParameter,getDialysisParameterGoodList } from '@/api/dialysis'
251 318
   import { uParseTime } from "@/utils/tools";
252 319
   import { getDataConfig } from '@/utils/data'
253 320
   import store from "@/store";
@@ -326,6 +393,9 @@
326 393
         bicarbonate:false,
327 394
         glucose:false,
328 395
         blood_access_option:[],
396
+        startdialogVisible:false,
397
+        schedule_type:"",
398
+        partion_type:"",
329 399
       }
330 400
     },
331 401
     created() {
@@ -456,7 +526,108 @@
456 526
         })
457 527
       },
458 528
       statistics() {
459
-        this.$refs.consumables.show()
529
+         var params = {
530
+          schedule_type:this.schedule_type,
531
+          partion_type:this.partion_type,
532
+          selected_date:this.query.schedule_date,
533
+        }
534
+        getDialysisParameterGoodList(params).then(response=>{
535
+           if(response.data.state == 1){
536
+            this.startdialogVisible = true
537
+            var list = response.data.data.list
538
+            console.log("list232323223222wid",list)
539
+            if(list!=null && list.length>0){
540
+              for(let i=0;i<list.length;i++){
541
+                 list[i].dialysis_dialyszers_arr = []
542
+                 list[i].dialyzer_perfusion_apparatus_arr = []
543
+                 list[i].dialysis_irrigation_arr = []
544
+                 if(list[i].dialysis_prescription.dialysis_dialyszers!=""){
545
+                   list[i].dialysis_dialyszers_arr = list[i].dialysis_prescription.dialysis_dialyszers.split(",")
546
+                 }
547
+                 if(list[i].dialysis_prescription.dialyzer_perfusion_apparatus!=""){
548
+                   list[i].dialyzer_perfusion_apparatus_arr = list[i].dialysis_prescription.dialyzer_perfusion_apparatus.split(",")
549
+                 }
550
+                 if(list[i].dialysis_prescription.dialysis_irrigation!=""){
551
+                   list[i].dialysis_irrigation_arr = list[i].dialysis_prescription.dialysis_irrigation.split(",")
552
+                 }
553
+              }
554
+            }
555
+            var dialysisDialyszersArr = []
556
+            var dialyzerPerfusionApparaArr = []
557
+            var dialysisIrrigationArr = []
558
+            for(let i=0;i<list.length;i++){
559
+             for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
560
+              console.log("list23323232",list[i].dialysis_dialyszers_arr[j])
561
+               dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])  
562
+             }
563
+             for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
564
+              dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
565
+             }
566
+             for(let y=0;y<list[i].dialysis_irrigation_arr.length;y++){
567
+              dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
568
+             }
569
+            }
570
+            console.log("透析器",dialysisDialyszersArr)
571
+            console.log("透析器/灌流器",dialyzerPerfusionApparaArr)
572
+            console.log("灌流器",dialysisIrrigationArr)
573
+             
574
+           let obj = {}
575
+           let objOne = {}
576
+           let objTwo = {}
577
+           for(let i = 0 ; i < dialysisDialyszersArr.length; i++){
578
+            if(obj[dialysisDialyszersArr[i]]){
579
+               obj[dialysisDialyszersArr[i]] +=1
580
+            }else{
581
+              obj[dialysisDialyszersArr[i]] = 1
582
+            }
583
+           }
584
+           let Arr = [];
585
+            for (let i in obj) {
586
+              let a = {};
587
+              a[i] = obj[i];
588
+              a.name = "透析器"
589
+              a.count = obj[i]
590
+              a.specification_name = i
591
+              Arr.push(a);
592
+            }
593
+          
594
+           for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
595
+            if(objOne[dialyzerPerfusionApparaArr[i]]){
596
+                objOne[dialyzerPerfusionApparaArr[i]] +=1
597
+             }else{
598
+              objOne[dialyzerPerfusionApparaArr[i]] = 1
599
+             }   
600
+           }
601
+           
602
+           for (let i in objOne) {
603
+              let a = {};
604
+              a[i] = objOne[i];
605
+              a.name = "透析器/灌流器"
606
+              a.count = objOne[i]
607
+              a.specification_name = i
608
+              Arr.push(a);
609
+            }
610
+
611
+           for(let i=0;i<dialysisIrrigationArr.length;i++){
612
+            if(objTwo[dialysisIrrigationArr[i]]){
613
+              objTwo[dialysisIrrigationArr[i]] +=1
614
+             }else{
615
+              objTwo[dialysisIrrigationArr[i]] = 1
616
+             }   
617
+           }
618
+
619
+           for (let i in objTwo) {
620
+              let a = {};
621
+              a[i] = objTwo[i];
622
+              a.name = "灌流器"
623
+              a.count = objTwo[i]
624
+              a.specification_name = i
625
+              Arr.push(a);
626
+            }
627
+            console.log("newa",Arr)
628
+            this.tableList = Arr
629
+           }
630
+        })
460 631
       },
461 632
       handleScheduleDateChange(val) {
462 633
         this.query.schedule_date = val

+ 50 - 7
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -198,14 +198,32 @@
198 198
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157 && this.$store.getters.xt_user.template_info.template_id!=54">
199 199
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387">
200 200
                             <el-form-item
201
-                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987'
201
+                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987 && this.$store.getters.xt_user.template_info.org_id!=9990'
202 202
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
203
+
203 204
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
204 205
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
206
+
205 207
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
206 208
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
207 209
                             </el-form-item>
208 210
 
211
+                            <el-form-item v-if="this.$store.getters.xt_user.template_info.org_id == 9990 && dialysisPrescription.anticoagulant==7" :label="'首剂(mg):'"> 
212
+                               <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
213
+                                          v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
214
+
215
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
216
+                                          v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
217
+                            </el-form-item>
218
+                           <el-form-item v-else :label="'首剂(iu):'"> 
219
+                               <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
220
+                                          v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
221
+
222
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
223
+                                          v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
224
+                            </el-form-item>
225
+
226
+
209 227
                             <el-form-item
210 228
                                     v-if='dialysisPrescription.anticoagulant == 2 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987 || this.$store.getters.xt_user.template_info.org_id == 10346 || this.$store.getters.xt_user.template_info.org_id == 10387 && dialysisPrescription.anticoagulant == 2'
211 229
                                     :label="'首剂(mg) : '">
@@ -255,22 +273,26 @@
255 273
 
256 274
 
257 275
                     <el-col :span="8" v-if="anticoagulant.weichi != -1 && isShows('维持')">
258
-                        <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157 ">
259
-                          <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387">
276
+                        <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157  && this.$store.getters.xt_user.template_info.org_id == 9990">
277
+                          <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387 ">
260 278
                             <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '"
261
-                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987  && this.$store.getters.xt_user.template_info.org_id != 54">
279
+                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987  && this.$store.getters.xt_user.template_info.org_id != 54 && this.$store.getters.xt_user.template_info.org_id != 9990">
262 280
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
263 281
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
264 282
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
265 283
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
266 284
                             </el-form-item>
267 285
                             <el-form-item :label="'维持(mg/h) : '"
268
-                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987 || this.$store.getters.xt_user.template_info.org_id == 54 ||  this.$store.getters.xt_user.template_info.org_id == 10346 ||  this.$store.getters.xt_user.template_info.org_id == 10387">
286
+                                          v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987 || this.$store.getters.xt_user.template_info.org_id == 54 ||  this.$store.getters.xt_user.template_info.org_id == 10346 ||  this.$store.getters.xt_user.template_info.org_id == 10387  ||  this.$store.getters.xt_user.template_info.org_id == 9990">
269 287
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
270 288
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
271 289
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
272 290
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
273 291
                             </el-form-item>
292
+                           
293
+             
294
+                         
295
+
274 296
                           </div>
275 297
                           <div v-else>
276 298
                             <el-form-item :label="'维持(iu/h) : '"
@@ -287,8 +309,13 @@
287 309
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
288 310
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
289 311
                             </el-form-item>
312
+                           
313
+                           
314
+                
290 315
                           </div>
291 316
                         </div>
317
+
318
+
292 319
                         <div v-else>
293 320
                             <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'维持(mg/h) : '">
294 321
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
@@ -302,6 +329,7 @@
302 329
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
303 330
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
304 331
                             </el-form-item>
332
+
305 333
                         </div>
306 334
 
307 335
                     </el-col>
@@ -310,7 +338,7 @@
310 338
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
311 339
                           <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387">
312 340
                             <el-form-item
313
-                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38  && this.$store.getters.xt_user.template_info.org_id != 9987 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387'
341
+                                    v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38  && this.$store.getters.xt_user.template_info.org_id != 9987 && this.$store.getters.xt_user.template_info.template_id != 54 && this.$store.getters.xt_user.template_info.org_id != 10346 && this.$store.getters.xt_user.template_info.org_id != 10387 && this.$store.getters.xt_user.template_info.org_id != 9990'
314 342
                                     :label="'总量(' + anticoagulant.zongliang_unit + ') : '">
315 343
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
316 344
                                           v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
@@ -325,6 +353,21 @@
325 353
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
326 354
                                           v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
327 355
                             </el-form-item>
356
+
357
+                             <el-form-item
358
+                                    v-if='this.$store.getters.xt_user.template_info.org_id == 9990 && dialysisPrescription.anticoagulant == 7'
359
+                                    :label="'总量(mg)'">
360
+                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
361
+                                          v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
362
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
363
+                                          v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
364
+                            </el-form-item>
365
+                            <el-form-item v-else  :label="总量(mg)">
366
+                                <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
367
+                                          v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
368
+                                <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
369
+                                          v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
370
+                            </el-form-item>
328 371
                           </div>
329 372
                           <div v-else>
330 373
                             <el-form-item
@@ -2034,7 +2077,7 @@
2034 2077
           }
2035 2078
           if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ) {
2036 2079
             this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2037
-          }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9671){
2080
+          }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9990){
2038 2081
             if (schedual.schedule_type == 1) {
2039 2082
               this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
2040 2083
             } else if (schedual.schedule_type == 2) {

+ 68 - 11
src/xt_pages/outpatientCharges/summary.vue 查看文件

@@ -108,7 +108,7 @@
108 108
           >报表下载
109 109
           </el-button
110 110
           >
111
-          <el-button v-if="$store.getters.xt_user.org_id == 10106" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
111
+          <el-button v-if="$store.getters.xt_user.org_id == 10106 || $store.getters.xt_user.org_id == 0" size="small" type="primary" @click="export_detail_ten">报表下载2</el-button>
112 112
 
113 113
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
114 114
           <!--          >报表下载2-->
@@ -1499,17 +1499,20 @@ export default {
1499 1499
             for (let i = 0; i < med_chrgitm_types.length; i++) {
1500 1500
               let price = 0
1501 1501
               let obj = {
1502
+
1502 1503
                 number:"440722196501072316",
1503 1504
                 name: order.patient.name,
1504
-                idNo: order.patient.id_card_no,
1505
+                idNo: "",
1505 1506
                 med_chrgitm_name:this.getType(med_chrgitm_types[i]),
1506 1507
                 price:"",
1507 1508
                 remark:"",
1508 1509
               }
1509 1510
               if(i == 0){
1510 1511
                 obj.remark = "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay
1512
+                obj.idNo = order.patient.id_card_no
1511 1513
               }else{
1512 1514
                 obj.remark = ""
1515
+                obj.idNo = ""
1513 1516
               }
1514 1517
               for (let b = 0; b < order.info.length; b++) {
1515 1518
                 if(med_chrgitm_types[i] ==  order.info[b].med_chrgitm_type){
@@ -1520,18 +1523,48 @@ export default {
1520 1523
               obj.price = price
1521 1524
               list.push(obj)
1522 1525
             }
1526
+          }
1527
+          let list_two = []
1528
+          const obj = {}
1529
+          for(let i = 0; i < list.length; i++){
1530
+            console.log(list[i])
1531
+            list_two.push(list[i].name)
1532
+          }
1533
+
1534
+          list_two = list_two.reduce((cur, next) => {
1535
+            obj[next] ? '' : obj[next] = true && cur.push(next)
1536
+            return cur
1537
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1523 1538
 
1539
+          for(let i = 0; i < list_two.length; i++){
1540
+            for(let b = 0; b < list.length; b++){
1541
+              if(list_two[i] == list[b].name){
1542
+                list[b]['index'] = i+1
1543
+              }
1544
+            }
1524 1545
           }
1525 1546
 
1526 1547
           var tarList = []
1527 1548
           for (let i = 0; i < list.length; i++) {
1528 1549
             let obj = {
1550
+              "订单序号": list[i].index,
1551
+              "订单号码":"",
1529 1552
               "购方名称": list[i].name,
1530
-              "购方纳税人识别号":list[i].number,
1531
-              "身份证":  list[i].idNo,
1553
+              "购方纳税人识别号":list[i].idNo,
1554
+              "开户行及账号":"",
1555
+              "地址电话":"",
1556
+              "税收编码":"3070202000000000000",
1532 1557
               "商品名称": list[i].med_chrgitm_name,
1558
+              "规格型号":"",
1559
+              "计量单位":"",
1560
+              "数量":"",
1561
+              "单价":"",
1533 1562
               "金额": list[i].price,
1563
+              "税率":"0%",
1564
+              "优惠政策":"普通零税率",
1565
+              "税额":"0",
1534 1566
               "备注": list[i].remark,
1567
+              "电子邮箱":"",
1535 1568
 
1536 1569
             }
1537 1570
             tarList.push(obj)
@@ -1539,20 +1572,44 @@ export default {
1539 1572
 
1540 1573
           import("@/vendor/Export2Excel").then((excel) => {
1541 1574
             const tHeader = [
1542
-              "购方名称",
1543
-              "购方纳税人识别号",
1544
-              "身份证",
1545
-              "商品名称",
1546
-              "金额",
1547
-              "备注",
1575
+              "订单序号",
1576
+                "订单号码",
1577
+                "购方名称",
1578
+                "购方纳税人识别号",
1579
+                "开户行及账号",
1580
+                "地址电话",
1581
+                "税收编码",
1582
+                "商品名称",
1583
+                "规格型号",
1584
+                "计量单位",
1585
+                "数量",
1586
+                "单价",
1587
+                "金额",
1588
+                "税率",
1589
+                "优惠政策",
1590
+                "税额",
1591
+                "备注",
1592
+                "电子邮箱",
1548 1593
             ];
1549 1594
             const filterVal = [
1595
+              "订单序号",
1596
+              "订单号码",
1550 1597
               "购方名称",
1551 1598
               "购方纳税人识别号",
1552
-              "身份证",
1599
+              "开户行及账号",
1600
+              "地址电话",
1601
+              "税收编码",
1553 1602
               "商品名称",
1603
+              "规格型号",
1604
+              "计量单位",
1605
+              "数量",
1606
+              "单价",
1554 1607
               "金额",
1608
+              "税率",
1609
+              "优惠政策",
1610
+              "税额",
1555 1611
               "备注",
1612
+              "电子邮箱",
1556 1613
             ];
1557 1614
             const data = this.formatJson(filterVal, tarList);
1558 1615
             excel.export_json_to_excel({

+ 1 - 1
src/xt_pages/stock/drugs/components/drugQuery.vue 查看文件

@@ -36,7 +36,7 @@
36 36
             class="filter-item"
37 37
             type="primary"
38 38
             @click="toCheck"
39
-            >脚本
39
+            >调试
40 40
           </el-button> -->
41 41
           <el-button
42 42
             size="small"

+ 102 - 95
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue 查看文件

@@ -18,8 +18,8 @@
18 18
             format="yyyy-MM-dd"
19 19
             value-format="yyyy-MM-dd"
20 20
             @change="startTimeChange"
21
-           ></el-date-picker> 
22
-            <span>-</span> 
21
+           ></el-date-picker>
22
+            <span>-</span>
23 23
             <el-date-picker
24 24
               size="small"
25 25
               v-model="end_time"
@@ -32,7 +32,7 @@
32 32
               format="yyyy-MM-dd"
33 33
               value-format="yyyy-MM-dd"
34 34
               @change="endTimeChange"
35
-          ></el-date-picker>  
35
+          ></el-date-picker>
36 36
           <span style="font-size:14px;color:#606266">药品类型:</span>
37 37
           <el-select v-model="good_type" style="width:200px;margin-right:10px;" placeholder="请选择"
38 38
           filterable
@@ -84,33 +84,33 @@
84 84
               </template>
85 85
             </el-table-column>
86 86
             <el-table-column label="期初结余" align="center">
87
-               
87
+
88 88
                  <el-table-column prop="drugIn" label="数量" width="100" align="center">
89
-                   
89
+
90 90
                  </el-table-column>
91
-              
91
+
92 92
                 <el-table-column prop="drugInMoney" label="进货金额" width="100" align="center">
93
-                   
93
+
94 94
                 </el-table-column>
95 95
                 <el-table-column prop="drugSaleMoney" label="销售金额" width="100" align="center">
96
-                 
96
+
97 97
                 </el-table-column>
98
-             
98
+
99 99
             </el-table-column>
100 100
             <el-table-column label="本期增加" align="center">
101
-             
101
+
102 102
                 <el-table-column prop="drugAdd" label="数量" width="100" align="center">
103
-                
103
+
104 104
                 </el-table-column>
105
-             
105
+
106 106
                 <el-table-column prop="drugAddPrice" label="进货金额" width="100" align="center">
107
-                  
107
+
108 108
                 </el-table-column>
109 109
                 <el-table-column  prop="drugAddSalePrice" label="销售金额"  width="100" align="center">
110 110
                 </el-table-column>
111
-              
111
+
112 112
             </el-table-column>
113
-         
113
+
114 114
             <el-table-column label="本期减少" align="center">
115 115
                <el-table-column prop="drugOut" label="数量" width="100" align="center">
116 116
                 </el-table-column>
@@ -119,7 +119,7 @@
119 119
                 <el-table-column prop="drugOutSalePrice" label="销售金额" width="100" align="center">
120 120
                 </el-table-column>
121 121
             </el-table-column>
122
-          
122
+
123 123
             <el-table-column label="期末结余" align="center">
124 124
               <el-table-column prop="overDrug" label="数量" width="100" align="center">
125 125
               </el-table-column>
@@ -129,7 +129,7 @@
129 129
               </el-table-column>
130 130
             </el-table-column>
131 131
 
132
-          
132
+
133 133
           </el-table>
134 134
            <el-pagination
135 135
             @size-change="handleSizeChange"
@@ -147,7 +147,7 @@
147 147
 
148 148
 
149 149
 
150
-  
150
+
151 151
 
152 152
   </div>
153 153
 </template>
@@ -192,7 +192,7 @@ export default {
192 192
      specification_name:"",
193 193
      loading:false,
194 194
     }
195
-  
195
+
196 196
   },
197 197
   methods:{
198 198
     changeStorehouseName(){
@@ -212,7 +212,7 @@ export default {
212 212
              this.houseList.push(houseList[i])
213 213
            }
214 214
            this.manufacturerList = response.data.data.manufacturerList
215
-        
215
+
216 216
            this.patientList = response.data.data.patientList
217 217
          }
218 218
       })
@@ -241,7 +241,7 @@ export default {
241 241
                   }
242 242
                 }
243 243
               }
244
-             
244
+
245 245
              //期初结余出库
246 246
               if(list[i].DrugWarehouseOutInfoStart!=null && list[i].DrugWarehouseOutInfoStart.length>0){
247 247
                 for(let j=0;j<list[i].DrugWarehouseOutInfoStart.length;j++){
@@ -269,7 +269,7 @@ export default {
269 269
                    }
270 270
                 }
271 271
               }
272
-             
272
+
273 273
               //期末结余出库
274 274
                if(list[i].DrugWarehouseOutInfoEnd!=null && list[i].DrugWarehouseOutInfoEnd.length>0){
275 275
                 for(let j=0;j<list[i].DrugWarehouseOutInfoEnd.length;j++){
@@ -296,7 +296,7 @@ export default {
296 296
                    }
297 297
                 }
298 298
               }
299
-           
299
+
300 300
               //期中减少
301 301
               if(list[i].DrugWarehouseOutInfoStartEnd!=null && list[i].DrugWarehouseOutInfoStartEnd.length > 0){
302 302
                 for(let j=0;j<list[i].DrugWarehouseOutInfoStartEnd.length;j++){
@@ -314,8 +314,8 @@ export default {
314 314
                    }
315 315
                 }
316 316
               }
317
-           
318
-           
317
+
318
+
319 319
 
320 320
               //期初盘盈
321 321
               if(list[i].WareStartStockInventoryProfit!=null && list[i].WareStartStockInventoryProfit.length > 0){
@@ -334,8 +334,8 @@ export default {
334 334
                    }
335 335
                  }
336 336
               }
337
-              
338
-      
337
+
338
+
339 339
 
340 340
              //期中盘盈
341 341
              if(list[i].WareStartEndStockInventoryProfit!=null && list[i].WareStartEndStockInventoryProfit.length > 0){
@@ -400,7 +400,7 @@ export default {
400 400
             for(let i=0;i<drugTypeList.length;i++){
401 401
                this.drugTypeList.push(drugTypeList[i])
402 402
             }
403
-           
403
+
404 404
          }
405 405
       })
406 406
     },
@@ -495,18 +495,18 @@ export default {
495 495
    if(arr3!=null && arr3.length > 0){
496 496
     for(let i=0;i<arr3.length;i++){
497 497
       totalthree += arr3[i].count
498
-     } 
498
+     }
499 499
    }
500 500
   if(arr4!=null && arr4.length > 0){
501 501
     for(let i=0;i<arr4.length;i++){
502 502
       totalfour += arr4[i].count
503
-     } 
503
+     }
504 504
   }
505 505
 
506 506
   if(arr5!=null && arr5.length > 0){
507 507
     for(let i=0;i<arr5.length;i++){
508 508
       totalfive += arr5[i].count
509
-     } 
509
+     }
510 510
   }
511 511
   // console.log("totalONE223323232323232",totalOne)
512 512
   // console.log("totalTwo2oo2o32o3o32o23",totalTwo)
@@ -533,9 +533,9 @@ export default {
533 533
   if(max_str == "" && min_str == ""){
534 534
     return "0"
535 535
   }else{
536
-   return max_str + min_str 
536
+   return max_str + min_str
537 537
   }
538
- 
538
+
539 539
 
540 540
   },
541 541
   getDrugWarehouseInfo(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
@@ -549,12 +549,12 @@ export default {
549 549
    var min_str = "";
550 550
    if(arr!=null && arr.length > 0){
551 551
     for(let i=0;i<arr.length;i++){
552
-      total_one += arr[i].count 
552
+      total_one += arr[i].count
553 553
      }
554 554
    }
555 555
    if(arr4!=null && arr4.length > 0){
556 556
     for(let i=0;i<arr4.length;i++){
557
-      total_four += arr4[i].count 
557
+      total_four += arr4[i].count
558 558
      }
559 559
    }
560 560
    if(arr2!=null && arr2.length > 0){
@@ -565,13 +565,13 @@ export default {
565 565
    if(arr3!=null && arr3.length >0){
566 566
      for(let i=0;i<arr3.length;i++){
567 567
        total_three +=arr3[i].count
568
-     }  
568
+     }
569 569
    }
570 570
 
571 571
     if(arr5!=null && arr5.length >0){
572 572
      for(let i=0;i<arr5.length;i++){
573 573
        total_five +=arr5[i].count
574
-     }  
574
+     }
575 575
    }
576 576
 
577 577
   total = total_one - total_four +total_two - total_three + total_five
@@ -596,7 +596,7 @@ export default {
596 596
    if(max_str == "" && min_str == ""){
597 597
      return "0"
598 598
    }else{
599
-     return max_str + min_str;  
599
+     return max_str + min_str;
600 600
    }
601 601
 
602 602
   },
@@ -614,7 +614,7 @@ export default {
614 614
    if(outArr.length > 0){
615 615
      for(let i=0;i<outArr.length;i++){
616 616
       out_total+= outArr[i].count
617
-     }  
617
+     }
618 618
    }
619 619
    total = add_total - out_total
620 620
   if (total < min_number) {
@@ -632,7 +632,7 @@ export default {
632 632
       min_str = (total % min_number) + min_unit;
633 633
     }
634 634
    }
635
-  return max_str + min_str;  
635
+  return max_str + min_str;
636 636
 
637 637
   },
638 638
  getDrugWarehouseInfoMoneyStart(arr,min_number,min_unit,max_unit,last_price,outArr){
@@ -655,7 +655,7 @@ export default {
655 655
 
656 656
    total = addTotal - outTotal
657 657
    if (total < min_number) {
658
-      min_str = total 
658
+      min_str = total
659 659
    }
660 660
    if (total >= min_number) {
661 661
     if (parseInt(total / min_number) != 0) {
@@ -665,7 +665,7 @@ export default {
665 665
       min_str = (total % min_number);
666 666
     }
667 667
    }
668
- 
668
+
669 669
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
670 670
 
671 671
    return total_price
@@ -681,7 +681,7 @@ export default {
681 681
      }
682 682
    }
683 683
    if (total < min_number) {
684
-      min_str = total 
684
+      min_str = total
685 685
    }
686 686
    if (total >= min_number) {
687 687
     if (parseInt(total / min_number) != 0) {
@@ -691,13 +691,13 @@ export default {
691 691
       min_str = (total % min_number);
692 692
     }
693 693
    }
694
- 
694
+
695 695
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
696
-   
696
+
697 697
    return total_price
698 698
   },
699 699
   getDrugWarehouseInfoStockAdd(arr,min_number,min_unit,max_unit){
700
-  
700
+
701 701
    var total = 0
702 702
    var max_str = "";
703 703
    var min_str = "";
@@ -721,7 +721,7 @@ export default {
721 721
       min_str = (total % min_number) + min_unit;
722 722
     }
723 723
    }
724
-  return max_str + min_str;  
724
+  return max_str + min_str;
725 725
   },
726 726
   getDrugWarehouseInfoaddMoney(arr,min_number,min_unit,max_unit,last_price){
727 727
    var total = 0
@@ -734,7 +734,7 @@ export default {
734 734
      }
735 735
    }
736 736
    if (total < min_number) {
737
-      min_str = total 
737
+      min_str = total
738 738
    }
739 739
    if (total >= min_number) {
740 740
     if (parseInt(total / min_number) != 0) {
@@ -744,12 +744,12 @@ export default {
744 744
       min_str = (total % min_number);
745 745
     }
746 746
    }
747
- 
747
+
748 748
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
749 749
    return total_price
750 750
   },
751 751
   getDrugInMoneyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
752
-   
752
+
753 753
    var totalOne = 0
754 754
    var totalTwo =0
755 755
    var total_three = 0
@@ -758,20 +758,20 @@ export default {
758 758
    var total_price = 0
759 759
    if(arr!=null&&arr.length > 0){
760 760
     for(let i=0;i<arr.length;i++){
761
-      totalOne += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price/min_number)
761
+      totalOne += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price%min_number)
762 762
      }
763 763
    }
764
-  
764
+
765 765
   if(arr2!=null&&arr2.length > 0){
766 766
     for(let i=0;i<arr2.length;i++){
767 767
       totalTwo += ((arr2[i].count/min_number) * arr2[i].price) + ((arr2[i].count%min_number)*(arr2[i].price/min_number))
768 768
      }
769 769
    }
770 770
 
771
-  
771
+
772 772
   if(arr3!=null&&arr3.length > 0){
773 773
     for(let i=0;i<arr3.length;i++){
774
-      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price 
774
+      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price
775 775
      }
776 776
    }
777 777
 
@@ -788,15 +788,21 @@ export default {
788 788
    }
789 789
 
790 790
    total_price =(totalOne - totalTwo + total_three - total_four + totalFive).toFixed(2)
791
+   console.log("totalONE232332323323223322323wi",totalOne)
792
+   console.log("totalTwo99999999999999988888888",totalTwo)
793
+   console.log("total_three99999999999999988888888",total_three)
794
+   console.log("total_four99999999999999988888888",total_four)
795
+   console.log("totalFive99999999999999988888888",totalFive)
796
+   console.log("-------------------------------------------")
791 797
    if(total_price >0){
792 798
     return total_price
793 799
    }else{
794 800
     return "0.00"
795 801
    }
796
-  
802
+
797 803
   },
798 804
   getDrugInMoney(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
799
-  
805
+
800 806
    var total_price = 0
801 807
    var total_one_price = 0
802 808
    var total_two_price = 0
@@ -805,13 +811,14 @@ export default {
805 811
    var total_five_price = 0
806 812
    if(arr!=null&&arr.length > 0){
807 813
     for(let i=0;i<arr.length;i++){
808
-      total_one_price += arr[i].count * (arr[i].price/min_number)
814
+      total_one_price += arr[i].count * (arr[i].price/min_number) + arr[i].count * (arr[i].price%min_number)
809 815
      }
810 816
    }
811
-   
817
+
812 818
    if(arr4!=null && arr4.length > 0){
813 819
      for(let i=0;i<arr4.length;i++){
814
-       total_four_price +=arr4[i].count * arr4[i].xt_drug_warehouse_info.price/min_number
820
+      //  total_four_price +=arr4[i].count * arr4[i].xt_drug_warehouse_info.price/min_number
821
+      total_four_price+= ((arr4[i].count/min_number) * arr4[i].price) + ((arr4[i].count%min_number)*(arr4[i].price/min_number))
815 822
      }
816 823
    }
817 824
 
@@ -820,7 +827,7 @@ export default {
820 827
        total_two_price += arr2[i].count * arr2[i].xt_drug_warehouse_info.price/min_number
821 828
      }
822 829
    }
823
-  
830
+
824 831
   if(arr3!=null && arr3.length > 0){
825 832
      for(let i=0;i<arr3.length;i++){
826 833
        total_three_price += arr3[i].count * arr3[i].xt_drug_warehouse_info.price/min_number
@@ -832,7 +839,7 @@ export default {
832 839
        total_five_price += arr5[i].count * arr5[i].xt_drug_warehouse_info.price/min_number
833 840
      }
834 841
    }
835
- 
842
+
836 843
    total_price = total_one_price - total_four_price + total_two_price - total_three_price + total_five_price
837 844
    if(total_price > 0){
838 845
      return total_price.toFixed(2)
@@ -841,7 +848,7 @@ export default {
841 848
    }
842 849
   },
843 850
   getSaleMoney(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
844
-  
851
+
845 852
    var total_price = 0
846 853
    var total_price_one = 0
847 854
    var total_price_two = 0
@@ -862,21 +869,21 @@ export default {
862 869
     for(let i=0;i<arr2.length;i++){
863 870
      total_price_two += arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
864 871
     }
865
-    
872
+
866 873
    }
867 874
 
868 875
   if(arr3!=null && arr3.length > 0){
869 876
     for(let i=0;i<arr3.length;i++){
870 877
       total_price_three += arr3[i].count * arr3[i].xt_drug_warehouse_info.retail_price
871 878
     }
872
-    
879
+
873 880
    }
874 881
 
875 882
   if(arr5!=null && arr5.length > 0){
876 883
     for(let i=0;i<arr5.length;i++){
877 884
       total_price_five += arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
878 885
     }
879
-    
886
+
880 887
    }
881 888
 
882 889
   total_price = total_price_one - total_price_four + total_price_two - total_price_three + total_price_five
@@ -885,7 +892,7 @@ export default {
885 892
    }else{
886 893
     return "0.00"
887 894
    }
888
-  
895
+
889 896
   },
890 897
   getSaleMoneyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
891 898
   var totalOne = 0
@@ -896,19 +903,19 @@ export default {
896 903
    var total_five = 0
897 904
    if(arr!=null&&arr.length > 0){
898 905
     for(let i=0;i<arr.length;i++){
899
-      totalOne += arr[i].count*arr[i].xt_drug_warehouse_info.retail_price 
906
+      totalOne += arr[i].count*arr[i].xt_drug_warehouse_info.retail_price
900 907
      }
901 908
    }
902
-  
909
+
903 910
   if(arr2!=null&&arr2.length > 0){
904 911
     for(let i=0;i<arr2.length;i++){
905 912
       totalTwo += arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
906 913
      }
907 914
    }
908
-  
915
+
909 916
   if(arr3!=null&&arr3.length > 0){
910 917
     for(let i=0;i<arr3.length;i++){
911
-      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price 
918
+      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price
912 919
      }
913 920
    }
914 921
 
@@ -927,7 +934,7 @@ export default {
927 934
   //  console.log("totalTwo",totalTwo)
928 935
   //  console.log("total_three",total_three)
929 936
   //  console.log("total_four",total_four)
930
-  
937
+
931 938
   //  console.log("total_pricewode",(totalOne - totalTwo+total_three - total_four).toFixed(2))
932 939
    total_price =(totalOne - totalTwo+total_three - total_four + total_five).toFixed(2)
933 940
    if(total_price > 0){
@@ -935,7 +942,7 @@ export default {
935 942
    }else{
936 943
      return "0.00"
937 944
    }
938
-  
945
+
939 946
   },
940 947
   getDrugWarehouseOutInfo(arr,min_number,min_unit,max_unit){
941 948
    var total = 0
@@ -961,7 +968,7 @@ export default {
961 968
       min_str = (total % min_number) + min_unit;
962 969
     }
963 970
    }
964
-  return max_str + min_str;  
971
+  return max_str + min_str;
965 972
   },
966 973
   getDrugWarehouseOutMoney(arr,min_number,min_unit,max_unit,last_price){
967 974
    var total = 0
@@ -974,7 +981,7 @@ export default {
974 981
      }
975 982
    }
976 983
    if (total < min_number) {
977
-      min_str = total 
984
+      min_str = total
978 985
    }
979 986
    if (total >= min_number) {
980 987
     if (parseInt(total / min_number) != 0) {
@@ -993,7 +1000,7 @@ export default {
993 1000
     this.getStorehouseList()
994 1001
     this.getlist()
995 1002
    },
996
-  
1003
+
997 1004
   drugAddInfo(arr,min_number,min_unit,max_unit,arr2){
998 1005
     var total = 0
999 1006
     var totalone = 0
@@ -1030,13 +1037,13 @@ export default {
1030 1037
     if(max_str == "" && min_str == ""){
1031 1038
       return "0"
1032 1039
     }else{
1033
-      return max_str + min_str  
1040
+      return max_str + min_str
1034 1041
     }
1035
-   
1042
+
1036 1043
    },
1037 1044
    getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
1038 1045
     var total = 0
1039
-    var totalone =0 
1046
+    var totalone =0
1040 1047
     var totaltwo = 0
1041 1048
     var total_price = 0
1042 1049
 
@@ -1045,7 +1052,7 @@ export default {
1045 1052
         totalone += arr[i].count * arr[i].xt_drug_warehouse_info.price/min_number
1046 1053
       }
1047 1054
     }
1048
-   
1055
+
1049 1056
     if(arr2!=null && arr2.length > 0){
1050 1057
      for(let i=0;i<arr2.length;i++){
1051 1058
        totaltwo +=arr2[i].count * arr2[i].xt_drug_warehouse_info.price/min_number
@@ -1071,7 +1078,7 @@ export default {
1071 1078
        total_two +=arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
1072 1079
       }
1073 1080
     }
1074
-    
1081
+
1075 1082
     total = total_one + total_two
1076 1083
 
1077 1084
     total_price = total.toFixed(2)
@@ -1118,12 +1125,12 @@ export default {
1118 1125
    if(max_str == "" && min_str == ""){
1119 1126
      return "0"
1120 1127
    }else{
1121
-    return max_str + min_str;  
1128
+    return max_str + min_str;
1122 1129
    }
1123
- 
1130
+
1124 1131
    },
1125 1132
    getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1126
-    
1133
+
1127 1134
     var total_price = 0
1128 1135
     var total_one_price =0
1129 1136
     var total_two_price = 0
@@ -1133,7 +1140,7 @@ export default {
1133 1140
     var total_three = 0
1134 1141
     if(arr!=null&&arr.length > 0){
1135 1142
       for(let i=0;i<arr.length;i++){
1136
-        total_one_price += arr[i].count * (arr[i].xt_drug_warehouse_info.price/min_number) 
1143
+        total_one_price += arr[i].count * (arr[i].xt_drug_warehouse_info.price/min_number)
1137 1144
         total += arr[i].count
1138 1145
       }
1139 1146
     }
@@ -1150,20 +1157,20 @@ export default {
1150 1157
         total_three +=arr3[i].count
1151 1158
       }
1152 1159
     }
1153
-   
1160
+
1154 1161
     total_price = total_one_price + total_two_price - total_three_price
1155 1162
     if(total_price > 0){
1156 1163
       return total_price.toFixed(2)
1157 1164
     }else{
1158 1165
      return "0.00"
1159 1166
     }
1160
-    
1167
+
1161 1168
    },
1162 1169
    getDrugOutSaleprice(arr,min_number,min_unit,max_unit,arr3,arr4){
1163 1170
     var total_price = 0
1164 1171
     var total_price_one = 0
1165 1172
     var total_price_two = 0
1166
-    var total_price_three = 0 
1173
+    var total_price_three = 0
1167 1174
     if(arr!=null&&arr.length > 0){
1168 1175
       for(let i=0;i<arr.length;i++){
1169 1176
         total_price_one += arr[i].count * arr[i].xt_drug_warehouse_info.retail_price
@@ -1181,15 +1188,15 @@ export default {
1181 1188
          total_price_three +=arr4[i].count * arr4[i].xt_drug_warehouse_info.retail_price
1182 1189
       }
1183 1190
     }
1184
-   
1191
+
1185 1192
    total_price = total_price_one + total_price_two - total_price_three
1186
-    
1193
+
1187 1194
     if(total_price > 0){
1188 1195
       return total_price.toFixed(2)
1189 1196
     }else{
1190 1197
      return "0.00"
1191 1198
     }
1192
-    
1199
+
1193 1200
    },
1194 1201
    toPrint(){
1195 1202
     this.$router.push({path:"/drugs/purchase/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&page="+this.page+"&limit="+this.limit+"&keyword="+this.keyword+"&good_type="+this.good_type})
@@ -1201,19 +1208,19 @@ export default {
1201 1208
           this.tableList[i].good_type = this.getDrugTypeName(this.tableList[i].drug_type)
1202 1209
           this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
1203 1210
           this.tableList[i].specification_name = this.tableList[i].dose + this.tableList[i].dose_unit +"*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
1204
-          
1211
+
1205 1212
         }
1206 1213
         import('@/vendor/Export2Excel').then(excel => {
1207 1214
            const multiHeader = [['序号', '查询日期','  药品类型','药品名称','规格&单位','生产产商', '期初结余' , '', '', '本期增加', '', '', '本期减少' , '', '', '期末结余' , '', '']]
1208 1215
            const header = ['', '','','','','', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额', '数量', '进货金额', '销售金额']
1209 1216
            const merges = ['A1:A2', 'B1:B2','C1:C2','D1:D2','E1:E2','F1:F2','G1:I1', 'J1:L1', 'M1:O1', 'P1:R1']
1210 1217
            const filterVal = ['index', 'query_date', 'good_type','drug_name','specification_name','manufacturer_name','drugIn','drugInMoney','drugSaleMoney','drugAdd','drugAddPrice','drugAddSalePrice','drugOut','drugOutPrice','drugOutSalePrice','overDrug','overDrugPrice','oveDrugSaleMoney']
1211
-    
1218
+
1212 1219
            const data = this.formatJson(filterVal, this.tableList)
1213
-           
1220
+
1214 1221
            const filename = '药品进销存查询'
1215
-     
1216
-          
1222
+
1223
+
1217 1224
             excel.export_json_to_excel({
1218 1225
               multiHeader,
1219 1226
               header,

+ 105 - 104
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue 查看文件

@@ -15,10 +15,10 @@
15 15
                         <span class="main_title">药品进销存查询表</span>
16 16
                     </div>
17 17
                     <div style="text-align:left;margin-bottom:20px;font-size: 14px;margin-bottom:-30px">
18
-                      <span class="time_p">查询日期:{{start_time}} ~</span><span class="time_p">{{end_time}}</span> 
18
+                      <span class="time_p">查询日期:{{start_time}} ~</span><span class="time_p">{{end_time}}</span>
19 19
                     </div>
20 20
                     <div style="text-align:right;margin-bottom:20px;font-size: 14px;">
21
-                      <span class="time_p">打印时间:{{time_now}}</span> 
21
+                      <span class="time_p">打印时间:{{time_now}}</span>
22 22
                     </div>
23 23
                     <div class="table_panel">
24 24
                         <table class="table">
@@ -29,26 +29,26 @@
29 29
                                   <td rowspan="2" width="80">药品名称</td>
30 30
                                   <td rowspan="2" width="80">规格&单位</td>
31 31
                                   <td rowspan="2" width="80">生产厂商</td>
32
-                                  <td width="80" colspan="3">期初结余</td>    
33
-                                  <td width="80" colspan="3">本期增加</td>   
34
-                                  <td width="80" colspan="3">本期减少</td>  
35
-                                  <td width="80" colspan="3">期末结余</td>                                             
32
+                                  <td width="80" colspan="3">期初结余</td>
33
+                                  <td width="80" colspan="3">本期增加</td>
34
+                                  <td width="80" colspan="3">本期减少</td>
35
+                                  <td width="80" colspan="3">期末结余</td>
36 36
                                 </tr>
37 37
                                 <tr>
38
-                                  <td>数量</td>   
39
-                                  <td>进货金额</td> 
40
-                                  <td>销售金额</td>   
41
-                                  <td>数量</td>   
42
-                                  <td>进货金额</td> 
43
-                                  <td>销售金额</td> 
44
-                                  <td>数量</td>   
45
-                                  <td>进货金额</td> 
46
-                                  <td>销售金额</td> 
47
-                                  <td>数量</td>   
48
-                                  <td>进货金额</td> 
49
-                                  <td>销售金额</td>    
38
+                                  <td>数量</td>
39
+                                  <td>进货金额</td>
40
+                                  <td>销售金额</td>
41
+                                  <td>数量</td>
42
+                                  <td>进货金额</td>
43
+                                  <td>销售金额</td>
44
+                                  <td>数量</td>
45
+                                  <td>进货金额</td>
46
+                                  <td>销售金额</td>
47
+                                  <td>数量</td>
48
+                                  <td>进货金额</td>
49
+                                  <td>销售金额</td>
50 50
                                 </tr>
51
-                               
51
+
52 52
                             </thead>
53 53
                             <tbody>
54 54
                                 <tr v-for="(item,index) in this.tableList" :key="index">
@@ -57,19 +57,19 @@
57 57
                                  <td> {{item.drug_name}}</td>
58 58
                                  <td> {{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</td>
59 59
                                  <td>{{getManufacturName(item.manufacturer)}}</td>
60
-                                 <td>{{item.drugIn}}</td>   
61
-                                 <td>{{item.drugInMoney}}</td> 
62
-                                 <td>{{item.drugSaleMoney}}</td>   
63
-                                 <td>{{item.drugAdd}}</td>   
64
-                                 <td>{{item.drugAddPrice}}</td> 
65
-                                 <td>{{item.drugAddSalePrice}}</td> 
66
-                                 <td>{{item.drugOut}}</td>   
67
-                                 <td>{{item.drugOutPrice}}</td> 
68
-                                 <td>{{item.drugOutSalePrice}}</td> 
69
-                                 <td>{{item.overDrug}}</td>   
70
-                                 <td>{{item.overDrugPrice}}</td> 
71
-                                 <td>{{item.oveDrugSaleMoney}}</td>    
72
-                                </tr>  
60
+                                 <td>{{item.drugIn}}</td>
61
+                                 <td>{{item.drugInMoney}}</td>
62
+                                 <td>{{item.drugSaleMoney}}</td>
63
+                                 <td>{{item.drugAdd}}</td>
64
+                                 <td>{{item.drugAddPrice}}</td>
65
+                                 <td>{{item.drugAddSalePrice}}</td>
66
+                                 <td>{{item.drugOut}}</td>
67
+                                 <td>{{item.drugOutPrice}}</td>
68
+                                 <td>{{item.drugOutSalePrice}}</td>
69
+                                 <td>{{item.overDrug}}</td>
70
+                                 <td>{{item.overDrugPrice}}</td>
71
+                                 <td>{{item.oveDrugSaleMoney}}</td>
72
+                                </tr>
73 73
                             </tbody>
74 74
                         </table>
75 75
                     </div>
@@ -162,7 +162,7 @@ export default {
162 162
                   }
163 163
                 }
164 164
               }
165
-             
165
+
166 166
              //期初结余出库
167 167
               if(list[i].DrugWarehouseOutInfoStart!=null && list[i].DrugWarehouseOutInfoStart.length>0){
168 168
                 for(let j=0;j<list[i].DrugWarehouseOutInfoStart.length;j++){
@@ -190,7 +190,7 @@ export default {
190 190
                    }
191 191
                 }
192 192
               }
193
-             
193
+
194 194
               //期末结余出库
195 195
                if(list[i].DrugWarehouseOutInfoEnd!=null && list[i].DrugWarehouseOutInfoEnd.length>0){
196 196
                 for(let j=0;j<list[i].DrugWarehouseOutInfoEnd.length;j++){
@@ -217,7 +217,7 @@ export default {
217 217
                    }
218 218
                 }
219 219
               }
220
-           
220
+
221 221
               //期中减少
222 222
               if(list[i].DrugWarehouseOutInfoStartEnd!=null && list[i].DrugWarehouseOutInfoStartEnd.length > 0){
223 223
                 for(let j=0;j<list[i].DrugWarehouseOutInfoStartEnd.length;j++){
@@ -235,8 +235,8 @@ export default {
235 235
                    }
236 236
                 }
237 237
               }
238
-           
239
-           
238
+
239
+
240 240
 
241 241
               //期初盘盈
242 242
               if(list[i].WareStartStockInventoryProfit!=null && list[i].WareStartStockInventoryProfit.length > 0){
@@ -255,8 +255,8 @@ export default {
255 255
                    }
256 256
                  }
257 257
               }
258
-              
259
-      
258
+
259
+
260 260
 
261 261
              //期中盘盈
262 262
              if(list[i].WareStartEndStockInventoryProfit!=null && list[i].WareStartEndStockInventoryProfit.length > 0){
@@ -294,7 +294,7 @@ export default {
294 294
             }
295 295
 
296 296
 
297
-           
297
+
298 298
              for(let i=0;i<list.length;i++){
299 299
               list[i].last_price_in = 0
300 300
               list[i].drugIn = this.getDrugWarehouseInfoOne(list[i].DrugWarehouseInfoStart,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].DrugWarehouseOutInfoStart,list[i].WareStartStockInventoryProfit,list[i].WareStartStockInventoryLosses,list[i].WareStartStockCancelInfo)
@@ -322,7 +322,7 @@ export default {
322 322
             for(let i=0;i<drugTypeList.length;i++){
323 323
                this.drugTypeList.push(drugTypeList[i])
324 324
             }
325
-           
325
+
326 326
          }
327 327
       })
328 328
     },
@@ -367,7 +367,7 @@ export default {
367 367
      return storehouse_name
368 368
    },
369 369
 
370
-  
370
+
371 371
    startFirstTimeChange(){
372 372
      this.getlist()
373 373
    },
@@ -421,18 +421,18 @@ export default {
421 421
    if(arr3!=null && arr3.length > 0){
422 422
     for(let i=0;i<arr3.length;i++){
423 423
       totalthree += arr3[i].count
424
-     } 
424
+     }
425 425
    }
426 426
   if(arr4!=null && arr4.length > 0){
427 427
     for(let i=0;i<arr4.length;i++){
428 428
       totalfour += arr4[i].count
429
-     } 
429
+     }
430 430
   }
431 431
 
432 432
   if(arr5!=null && arr5.length > 0){
433 433
     for(let i=0;i<arr5.length;i++){
434 434
       totalfive += arr5[i].count
435
-     } 
435
+     }
436 436
   }
437 437
 
438 438
   total = totalOne - totalTwo + totalthree - totalfour + totalfive
@@ -454,9 +454,9 @@ export default {
454 454
    if(max_str == "" && min_str == ""){
455 455
     return "0"
456 456
    }else{
457
-     return max_str + min_str;  
457
+     return max_str + min_str;
458 458
    }
459
- 
459
+
460 460
 
461 461
   },
462 462
   getDrugWarehouseInfo(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
@@ -470,12 +470,12 @@ export default {
470 470
    var min_str = "";
471 471
    if(arr!=null && arr.length > 0){
472 472
     for(let i=0;i<arr.length;i++){
473
-      total_one += arr[i].count 
473
+      total_one += arr[i].count
474 474
      }
475 475
    }
476 476
    if(arr4!=null && arr4.length > 0){
477 477
     for(let i=0;i<arr4.length;i++){
478
-      total_four += arr4[i].count 
478
+      total_four += arr4[i].count
479 479
      }
480 480
    }
481 481
    if(arr2!=null && arr2.length > 0){
@@ -486,13 +486,13 @@ export default {
486 486
    if(arr3!=null && arr3.length >0){
487 487
      for(let i=0;i<arr3.length;i++){
488 488
        total_three +=arr3[i].count
489
-     }  
489
+     }
490 490
    }
491 491
 
492 492
     if(arr5!=null && arr5.length >0){
493 493
      for(let i=0;i<arr5.length;i++){
494 494
        total_five +=arr5[i].count
495
-     }  
495
+     }
496 496
    }
497 497
 
498 498
   total = total_one - total_four +total_two - total_three + total_five
@@ -517,7 +517,7 @@ export default {
517 517
   if(max_str == ""&&min_str == ""){
518 518
     return "0"
519 519
   }else{
520
-   return max_str + min_str;  
520
+   return max_str + min_str;
521 521
   }
522 522
   },
523 523
   getDrugWarehouseInfoStart(arr,min_number,min_unit,max_unit,outArr){
@@ -534,7 +534,7 @@ export default {
534 534
    if(outArr.length > 0){
535 535
      for(let i=0;i<outArr.length;i++){
536 536
       out_total+= outArr[i].count
537
-     }  
537
+     }
538 538
    }
539 539
    total = add_total - out_total
540 540
   if (total < min_number) {
@@ -552,7 +552,7 @@ export default {
552 552
       min_str = (total % min_number) + min_unit;
553 553
     }
554 554
    }
555
-  return max_str + min_str;  
555
+  return max_str + min_str;
556 556
 
557 557
   },
558 558
  getDrugWarehouseInfoMoneyStart(arr,min_number,min_unit,max_unit,last_price,outArr){
@@ -576,7 +576,7 @@ export default {
576 576
    console.log("233232232tade",outTotal)
577 577
    total = addTotal - outTotal
578 578
    if (total < min_number) {
579
-      min_str = total 
579
+      min_str = total
580 580
    }
581 581
    if (total >= min_number) {
582 582
     if (parseInt(total / min_number) != 0) {
@@ -586,7 +586,7 @@ export default {
586 586
       min_str = (total % min_number);
587 587
     }
588 588
    }
589
- 
589
+
590 590
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
591 591
     console.log("total_price",total_price)
592 592
    return total_price
@@ -602,7 +602,7 @@ export default {
602 602
      }
603 603
    }
604 604
    if (total < min_number) {
605
-      min_str = total 
605
+      min_str = total
606 606
    }
607 607
    if (total >= min_number) {
608 608
     if (parseInt(total / min_number) != 0) {
@@ -612,13 +612,13 @@ export default {
612 612
       min_str = (total % min_number);
613 613
     }
614 614
    }
615
- 
615
+
616 616
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
617 617
     console.log("total_price",total_price)
618 618
    return total_price
619 619
   },
620 620
   getDrugWarehouseInfoStockAdd(arr,min_number,min_unit,max_unit){
621
-  
621
+
622 622
    var total = 0
623 623
    var max_str = "";
624 624
    var min_str = "";
@@ -642,7 +642,7 @@ export default {
642 642
       min_str = (total % min_number) + min_unit;
643 643
     }
644 644
    }
645
-  return max_str + min_str;  
645
+  return max_str + min_str;
646 646
   },
647 647
   getDrugWarehouseInfoaddMoney(arr,min_number,min_unit,max_unit,last_price){
648 648
    var total = 0
@@ -655,7 +655,7 @@ export default {
655 655
      }
656 656
    }
657 657
    if (total < min_number) {
658
-      min_str = total 
658
+      min_str = total
659 659
    }
660 660
    if (total >= min_number) {
661 661
     if (parseInt(total / min_number) != 0) {
@@ -665,12 +665,12 @@ export default {
665 665
       min_str = (total % min_number);
666 666
     }
667 667
    }
668
- 
668
+
669 669
    total_price = (max_str * last_price + min_str*(last_price/min_number)).toFixed(2)
670 670
    return total_price
671 671
   },
672 672
   getDrugInMoneyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
673
-   
673
+
674 674
    var totalOne = 0
675 675
    var totalTwo =0
676 676
    var total_three = 0
@@ -679,20 +679,20 @@ export default {
679 679
    var total_price = 0
680 680
    if(arr!=null&&arr.length > 0){
681 681
     for(let i=0;i<arr.length;i++){
682
-      totalOne += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price/min_number)
682
+      totalOne += arr[i].count*(arr[i].price/min_number)+ arr[i].count*(arr[i].price%min_number)
683 683
      }
684 684
    }
685
-  
685
+
686 686
   if(arr2!=null&&arr2.length > 0){
687 687
     for(let i=0;i<arr2.length;i++){
688 688
       totalTwo += ((arr2[i].count/min_number) * arr2[i].price) + ((arr2[i].count%min_number)*(arr2[i].price/min_number))
689 689
      }
690 690
    }
691 691
 
692
-  
692
+
693 693
   if(arr3!=null&&arr3.length > 0){
694 694
     for(let i=0;i<arr3.length;i++){
695
-      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price 
695
+      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price
696 696
      }
697 697
    }
698 698
 
@@ -714,10 +714,10 @@ export default {
714 714
    }else{
715 715
     return "0.00"
716 716
    }
717
-  
717
+
718 718
   },
719 719
   getDrugInMoney(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
720
-  
720
+
721 721
    var total_price = 0
722 722
    var total_one_price = 0
723 723
    var total_two_price = 0
@@ -726,13 +726,14 @@ export default {
726 726
    var total_five_price = 0
727 727
    if(arr!=null&&arr.length > 0){
728 728
     for(let i=0;i<arr.length;i++){
729
-      total_one_price += arr[i].count * (arr[i].price/min_number)
729
+      total_one_price += (arr[i].count/min_number*arr[i].price) + arr[i].count*(arr[i].price%min_number)
730 730
      }
731 731
    }
732
-   
732
+
733 733
    if(arr4!=null && arr4.length > 0){
734 734
      for(let i=0;i<arr4.length;i++){
735
-       total_four_price +=arr4[i].count * arr4[i].xt_drug_warehouse_info.price/min_number
735
+      //  total_four_price +=arr4[i].count * arr4[i].xt_drug_warehouse_info.price/min_number
736
+      total_four_price+= ((arr4[i].count/min_number) * arr4[i].price) + ((arr4[i].count%min_number)*(arr4[i].price/min_number))
736 737
      }
737 738
    }
738 739
 
@@ -741,7 +742,7 @@ export default {
741 742
        total_two_price += arr2[i].count * arr2[i].xt_drug_warehouse_info.price/min_number
742 743
      }
743 744
    }
744
-  
745
+
745 746
   if(arr3!=null && arr3.length > 0){
746 747
      for(let i=0;i<arr3.length;i++){
747 748
        total_three_price += arr3[i].count * arr3[i].xt_drug_warehouse_info.price/min_number
@@ -753,7 +754,7 @@ export default {
753 754
        total_five_price += arr5[i].count * arr5[i].xt_drug_warehouse_info.price/min_number
754 755
      }
755 756
    }
756
- 
757
+
757 758
    total_price = total_one_price - total_four_price + total_two_price - total_three_price + total_five_price
758 759
    if(total_price > 0){
759 760
      return total_price.toFixed(2)
@@ -762,7 +763,7 @@ export default {
762 763
    }
763 764
   },
764 765
   getSaleMoney(arr,arr4,min_number,min_unit,max_unit,arr2,arr3,arr5){
765
-  
766
+
766 767
    var total_price = 0
767 768
    var total_price_one = 0
768 769
    var total_price_two = 0
@@ -783,21 +784,21 @@ export default {
783 784
     for(let i=0;i<arr2.length;i++){
784 785
      total_price_two += arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
785 786
     }
786
-    
787
+
787 788
    }
788 789
 
789 790
   if(arr3!=null && arr3.length > 0){
790 791
     for(let i=0;i<arr3.length;i++){
791 792
       total_price_three += arr3[i].count * arr3[i].xt_drug_warehouse_info.retail_price
792 793
     }
793
-    
794
+
794 795
    }
795 796
 
796 797
   if(arr5!=null && arr5.length > 0){
797 798
     for(let i=0;i<arr5.length;i++){
798 799
       total_price_five += arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
799 800
     }
800
-    
801
+
801 802
    }
802 803
 
803 804
   total_price = total_price_one - total_price_four + total_price_two - total_price_three + total_price_five
@@ -806,7 +807,7 @@ export default {
806 807
    }else{
807 808
     return "0.00"
808 809
    }
809
-  
810
+
810 811
   },
811 812
   getSaleMoneyOne(arr,min_number,min_unit,max_unit,arr2,arr3,arr4,arr5){
812 813
   var totalOne = 0
@@ -817,19 +818,19 @@ export default {
817 818
    var total_five = 0
818 819
    if(arr!=null&&arr.length > 0){
819 820
     for(let i=0;i<arr.length;i++){
820
-      totalOne += arr[i].count*arr[i].xt_drug_warehouse_info.retail_price 
821
+      totalOne += arr[i].count*arr[i].xt_drug_warehouse_info.retail_price
821 822
      }
822 823
    }
823
-  
824
+
824 825
   if(arr2!=null&&arr2.length > 0){
825 826
     for(let i=0;i<arr2.length;i++){
826 827
       totalTwo += arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
827 828
      }
828 829
    }
829
-  
830
+
830 831
   if(arr3!=null&&arr3.length > 0){
831 832
     for(let i=0;i<arr3.length;i++){
832
-      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price 
833
+      total_three+=arr3[i].count* arr3[i].xt_drug_warehouse_info.retail_price
833 834
      }
834 835
    }
835 836
 
@@ -844,14 +845,14 @@ export default {
844 845
       total_five+=arr5[i].count * arr5[i].xt_drug_warehouse_info.retail_price
845 846
      }
846 847
    }
847
-   
848
+
848 849
    total_price =(totalOne - totalTwo+total_three - total_four + total_five).toFixed(2)
849 850
    if(total_price > 0){
850 851
       return total_price
851 852
    }else{
852 853
      return "0.00"
853 854
    }
854
-  
855
+
855 856
   },
856 857
   getDrugWarehouseOutInfo(arr,min_number,min_unit,max_unit){
857 858
    var total = 0
@@ -877,7 +878,7 @@ export default {
877 878
       min_str = (total % min_number) + min_unit;
878 879
     }
879 880
    }
880
-  return max_str + min_str;  
881
+  return max_str + min_str;
881 882
   },
882 883
   getDrugWarehouseOutMoney(arr,min_number,min_unit,max_unit,last_price){
883 884
    var total = 0
@@ -890,7 +891,7 @@ export default {
890 891
      }
891 892
    }
892 893
    if (total < min_number) {
893
-      min_str = total 
894
+      min_str = total
894 895
    }
895 896
    if (total >= min_number) {
896 897
     if (parseInt(total / min_number) != 0) {
@@ -939,13 +940,13 @@ export default {
939 940
     if(max_str == ""&& min_str == ""){
940 941
       return "0"
941 942
     }else{
942
-      return max_str + min_str;  
943
+      return max_str + min_str;
943 944
     }
944
-   
945
+
945 946
    },
946 947
     getdrugAddPrice(arr,min_number,min_unit,max_unit,arr2){
947 948
     var total = 0
948
-    var totalone =0 
949
+    var totalone =0
949 950
     var totaltwo = 0
950 951
     var total_price = 0
951 952
 
@@ -954,7 +955,7 @@ export default {
954 955
         totalone += arr[i].count * arr[i].xt_drug_warehouse_info.price/min_number
955 956
       }
956 957
     }
957
-   
958
+
958 959
     if(arr2!=null && arr2.length > 0){
959 960
      for(let i=0;i<arr2.length;i++){
960 961
        totaltwo +=arr2[i].count * arr2[i].xt_drug_warehouse_info.price/min_number
@@ -980,7 +981,7 @@ export default {
980 981
        total_two +=arr2[i].count * arr2[i].xt_drug_warehouse_info.retail_price
981 982
       }
982 983
     }
983
-    
984
+
984 985
     total = total_one + total_two
985 986
 
986 987
     total_price = total.toFixed(2)
@@ -1027,12 +1028,12 @@ export default {
1027 1028
    if(max_str == "" && min_str == ""){
1028 1029
      return "0"
1029 1030
    }else{
1030
-     return max_str + min_str; 
1031
+     return max_str + min_str;
1031 1032
    }
1032
-   
1033
+
1033 1034
    },
1034 1035
      getDrugOutPrice(arr,min_number,min_unit,max_unit,arr2,arr3){
1035
-    
1036
+
1036 1037
     var total_price = 0
1037 1038
     var total_one_price =0
1038 1039
     var total_two_price = 0
@@ -1042,7 +1043,7 @@ export default {
1042 1043
     var total_three = 0
1043 1044
     if(arr!=null&&arr.length > 0){
1044 1045
       for(let i=0;i<arr.length;i++){
1045
-        total_one_price += arr[i].count * (arr[i].xt_drug_warehouse_info.price/min_number) 
1046
+        total_one_price += arr[i].count * (arr[i].xt_drug_warehouse_info.price/min_number)
1046 1047
         total += arr[i].count
1047 1048
       }
1048 1049
     }
@@ -1059,20 +1060,20 @@ export default {
1059 1060
         total_three +=arr3[i].count
1060 1061
       }
1061 1062
     }
1062
-   
1063
+
1063 1064
     total_price = total_one_price + total_two_price - total_three_price
1064 1065
     if(total_price > 0){
1065 1066
       return total_price.toFixed(2)
1066 1067
     }else{
1067 1068
      return "0.00"
1068 1069
     }
1069
-    
1070
+
1070 1071
    },
1071 1072
    getDrugOutSaleprice(arr,min_number,min_unit,max_unit,arr3,arr4){
1072 1073
     var total_price = 0
1073 1074
     var total_price_one = 0
1074 1075
     var total_price_two = 0
1075
-    var total_price_three = 0 
1076
+    var total_price_three = 0
1076 1077
     if(arr!=null&&arr.length > 0){
1077 1078
       for(let i=0;i<arr.length;i++){
1078 1079
         total_price_one += arr[i].count * arr[i].xt_drug_warehouse_info.retail_price
@@ -1090,20 +1091,20 @@ export default {
1090 1091
          total_price_three +=arr4[i].count * arr4[i].xt_drug_warehouse_info.retail_price
1091 1092
       }
1092 1093
     }
1093
-   
1094
+
1094 1095
    total_price = total_price_one + total_price_two - total_price_three
1095
-    
1096
+
1096 1097
     if(total_price > 0){
1097 1098
       return total_price.toFixed(2)
1098 1099
     }else{
1099 1100
      return "0.00"
1100 1101
     }
1101
-    
1102
+
1102 1103
    },
1103 1104
    },
1104 1105
     created(){
1105 1106
       this.org_id =  this.$store.getters.xt_user.org_id
1106
-     
1107
+
1107 1108
       var starttime =  this.$route.query.start_time
1108 1109
       this.start_time = starttime
1109 1110
       var endtime =  this.$route.query.end_time
@@ -1143,7 +1144,7 @@ export default {
1143 1144
       border: 1px solid;
1144 1145
       border-collapse: collapse;
1145 1146
       padding: 2px;
1146
-      
1147
+
1147 1148
 
1148 1149
       thead {
1149 1150
         tr {

+ 5 - 5
src/xt_pages/stock/drugs/drugNewQuery.vue 查看文件

@@ -9,11 +9,11 @@
9 9
             <el-tab-pane label="库存查询" name="first">
10 10
               <DrugQuery></DrugQuery>
11 11
             </el-tab-pane>
12
-            <div v-if="org_id!=10265">
13
-              <el-tab-pane label="进销存查询" name="second">
14
-                <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
15
-              </el-tab-pane>
16
-           </div>
12
+          
13
+            <el-tab-pane label="进销存查询" name="second">
14
+              <PurchaseDrugQuery ref="mychild"></PurchaseDrugQuery>
15
+            </el-tab-pane>
16
+        
17 17
             <el-tab-pane label="有效期查询" name="third">
18 18
                 <ExpiryDateDrugQuery ref="mychildOne"></ExpiryDateDrugQuery>
19 19
             </el-tab-pane>

+ 8 - 0
src/xt_pages/stock/query/purchaseStockQuery.vue 查看文件

@@ -195,6 +195,13 @@ export default {
195 195
      good_name:"",
196 196
      specification_name:"",
197 197
      loading:false,
198
+     pickerOptions:{ //禁用当前日期之前的日期
199
+           disabledDate(v) {
200
+            //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
201
+            console.log("vvvvvvvvvv",v.getTime(), new Date().getTime() - 86400000)
202
+            return v.getTime() < new Date().getTime() - 86400000;
203
+          },
204
+      },
198 205
     }
199 206
   
200 207
   },
@@ -993,6 +1000,7 @@ export default {
993 1000
       formatJson(filterVal, jsonData) {
994 1001
         return jsonData.map(v => filterVal.map(j => v[j]));
995 1002
       },
1003
+     
996 1004
   },
997 1005
   // created(){
998 1006
   //   this.getStorehouseList()

+ 2 - 2
src/xt_pages/stock/stockNewQuery.vue 查看文件

@@ -9,11 +9,11 @@
9 9
             <el-tab-pane label="库存查询" name="first">
10 10
               <GoodNewQuery></GoodNewQuery>
11 11
             </el-tab-pane>
12
-           <div v-if="org_id!=10265">
12
+          
13 13
             <el-tab-pane label="进销存查询" name="second">
14 14
                <PurchaseStockQuery ref="mychild"></PurchaseStockQuery>
15 15
             </el-tab-pane>
16
-           </div>
16
+         
17 17
             <el-tab-pane label="有效期查询" name="third">
18 18
                 <expiryDateQuery ref="mychildone"></expiryDateQuery>
19 19
             </el-tab-pane>