소스 검색

8月15日

XMLWAN 2 년 전
부모
커밋
b2d218e0e4

+ 8 - 0
src/api/dialysis.js 파일 보기

355
     params: params
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
       :total="total"
242
       :total="total"
243
     >
243
     >
244
     </el-pagination>
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
   </div>
312
   </div>
246
 </template>
313
 </template>
247
 
314
 
248
 
315
 
249
 <script>
316
 <script>
250
-  import { GetAllZone,saveDialysisSetting,getDialysisSetting,getDialysisParameter } from '@/api/dialysis'
317
+  import { GetAllZone,saveDialysisSetting,getDialysisSetting,getDialysisParameter,getDialysisParameterGoodList } from '@/api/dialysis'
251
   import { uParseTime } from "@/utils/tools";
318
   import { uParseTime } from "@/utils/tools";
252
   import { getDataConfig } from '@/utils/data'
319
   import { getDataConfig } from '@/utils/data'
253
   import store from "@/store";
320
   import store from "@/store";
326
         bicarbonate:false,
393
         bicarbonate:false,
327
         glucose:false,
394
         glucose:false,
328
         blood_access_option:[],
395
         blood_access_option:[],
396
+        startdialogVisible:false,
397
+        schedule_type:"",
398
+        partion_type:"",
329
       }
399
       }
330
     },
400
     },
331
     created() {
401
     created() {
456
         })
526
         })
457
       },
527
       },
458
       statistics() {
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
       handleScheduleDateChange(val) {
632
       handleScheduleDateChange(val) {
462
         this.query.schedule_date = val
633
         this.query.schedule_date = val

+ 50 - 7
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 파일 보기

198
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157 && this.$store.getters.xt_user.template_info.template_id!=54">
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
                           <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">
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
                             <el-form-item
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
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
202
                                     :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
203
+
203
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
204
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
204
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
205
                                           v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
206
+
205
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
207
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
206
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
208
                                           v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
207
                             </el-form-item>
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
                             <el-form-item
227
                             <el-form-item
210
                                     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'
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
                                     :label="'首剂(mg) : '">
229
                                     :label="'首剂(mg) : '">
255
 
273
 
256
 
274
 
257
                     <el-col :span="8" v-if="anticoagulant.weichi != -1 && isShows('维持')">
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
                             <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '"
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
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
280
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
263
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
281
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
264
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
282
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
265
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
283
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
266
                             </el-form-item>
284
                             </el-form-item>
267
                             <el-form-item :label="'维持(mg/h) : '"
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
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
287
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
270
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
288
                                           v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
271
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
289
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
272
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
290
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
273
                             </el-form-item>
291
                             </el-form-item>
292
+                           
293
+             
294
+                         
295
+
274
                           </div>
296
                           </div>
275
                           <div v-else>
297
                           <div v-else>
276
                             <el-form-item :label="'维持(iu/h) : '"
298
                             <el-form-item :label="'维持(iu/h) : '"
287
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
309
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
288
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
310
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
289
                             </el-form-item>
311
                             </el-form-item>
312
+                           
313
+                           
314
+                
290
                           </div>
315
                           </div>
291
                         </div>
316
                         </div>
317
+
318
+
292
                         <div v-else>
319
                         <div v-else>
293
                             <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'维持(mg/h) : '">
320
                             <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'维持(mg/h) : '">
294
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
321
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
302
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
329
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
303
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
330
                                           v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
304
                             </el-form-item>
331
                             </el-form-item>
332
+
305
                         </div>
333
                         </div>
306
 
334
 
307
                     </el-col>
335
                     </el-col>
310
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
338
                         <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
311
                           <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">
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
                             <el-form-item
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
                                     :label="'总量(' + anticoagulant.zongliang_unit + ') : '">
342
                                     :label="'总量(' + anticoagulant.zongliang_unit + ') : '">
315
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
343
                                 <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
316
                                           v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
344
                                           v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
325
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
353
                                 <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
326
                                           v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
354
                                           v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
327
                             </el-form-item>
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
                           </div>
371
                           </div>
329
                           <div v-else>
372
                           <div v-else>
330
                             <el-form-item
373
                             <el-form-item
2034
           }
2077
           }
2035
           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 ) {
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
             this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
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
             if (schedual.schedule_type == 1) {
2081
             if (schedual.schedule_type == 1) {
2039
               this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
2082
               this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
2040
             } else if (schedual.schedule_type == 2) {
2083
             } else if (schedual.schedule_type == 2) {

+ 68 - 11
src/xt_pages/outpatientCharges/summary.vue 파일 보기

108
           >报表下载
108
           >报表下载
109
           </el-button
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
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
113
           <!--          <el-button size="small" type="primary" @click="export_detail_two"-->
114
           <!--          >报表下载2-->
114
           <!--          >报表下载2-->
1499
             for (let i = 0; i < med_chrgitm_types.length; i++) {
1499
             for (let i = 0; i < med_chrgitm_types.length; i++) {
1500
               let price = 0
1500
               let price = 0
1501
               let obj = {
1501
               let obj = {
1502
+
1502
                 number:"440722196501072316",
1503
                 number:"440722196501072316",
1503
                 name: order.patient.name,
1504
                 name: order.patient.name,
1504
-                idNo: order.patient.id_card_no,
1505
+                idNo: "",
1505
                 med_chrgitm_name:this.getType(med_chrgitm_types[i]),
1506
                 med_chrgitm_name:this.getType(med_chrgitm_types[i]),
1506
                 price:"",
1507
                 price:"",
1507
                 remark:"",
1508
                 remark:"",
1508
               }
1509
               }
1509
               if(i == 0){
1510
               if(i == 0){
1510
                 obj.remark = "就诊日期:" + this.getTimes(order.settle_accounts_date) + " 医保报销: "+order.fund_pay_sumamt + " 现金:"+order.psn_cash_pay
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
               }else{
1513
               }else{
1512
                 obj.remark = ""
1514
                 obj.remark = ""
1515
+                obj.idNo = ""
1513
               }
1516
               }
1514
               for (let b = 0; b < order.info.length; b++) {
1517
               for (let b = 0; b < order.info.length; b++) {
1515
                 if(med_chrgitm_types[i] ==  order.info[b].med_chrgitm_type){
1518
                 if(med_chrgitm_types[i] ==  order.info[b].med_chrgitm_type){
1520
               obj.price = price
1523
               obj.price = price
1521
               list.push(obj)
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
           var tarList = []
1547
           var tarList = []
1527
           for (let i = 0; i < list.length; i++) {
1548
           for (let i = 0; i < list.length; i++) {
1528
             let obj = {
1549
             let obj = {
1550
+              "订单序号": list[i].index,
1551
+              "订单号码":"",
1529
               "购方名称": list[i].name,
1552
               "购方名称": list[i].name,
1530
-              "购方纳税人识别号":list[i].number,
1531
-              "身份证":  list[i].idNo,
1553
+              "购方纳税人识别号":list[i].idNo,
1554
+              "开户行及账号":"",
1555
+              "地址电话":"",
1556
+              "税收编码":"3070202000000000000",
1532
               "商品名称": list[i].med_chrgitm_name,
1557
               "商品名称": list[i].med_chrgitm_name,
1558
+              "规格型号":"",
1559
+              "计量单位":"",
1560
+              "数量":"",
1561
+              "单价":"",
1533
               "金额": list[i].price,
1562
               "金额": list[i].price,
1563
+              "税率":"0%",
1564
+              "优惠政策":"普通零税率",
1565
+              "税额":"0",
1534
               "备注": list[i].remark,
1566
               "备注": list[i].remark,
1567
+              "电子邮箱":"",
1535
 
1568
 
1536
             }
1569
             }
1537
             tarList.push(obj)
1570
             tarList.push(obj)
1539
 
1572
 
1540
           import("@/vendor/Export2Excel").then((excel) => {
1573
           import("@/vendor/Export2Excel").then((excel) => {
1541
             const tHeader = [
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
             const filterVal = [
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
             const data = this.formatJson(filterVal, tarList);
1614
             const data = this.formatJson(filterVal, tarList);
1558
             excel.export_json_to_excel({
1615
             excel.export_json_to_excel({

+ 1 - 1
src/xt_pages/stock/drugs/components/drugQuery.vue 파일 보기

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

+ 102 - 95
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue 파일 보기

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

+ 105 - 104
src/xt_pages/stock/drugs/components/purchaseDrugQueryPrint.vue 파일 보기

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

+ 5 - 5
src/xt_pages/stock/drugs/drugNewQuery.vue 파일 보기

9
             <el-tab-pane label="库存查询" name="first">
9
             <el-tab-pane label="库存查询" name="first">
10
               <DrugQuery></DrugQuery>
10
               <DrugQuery></DrugQuery>
11
             </el-tab-pane>
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
             <el-tab-pane label="有效期查询" name="third">
17
             <el-tab-pane label="有效期查询" name="third">
18
                 <ExpiryDateDrugQuery ref="mychildOne"></ExpiryDateDrugQuery>
18
                 <ExpiryDateDrugQuery ref="mychildOne"></ExpiryDateDrugQuery>
19
             </el-tab-pane>
19
             </el-tab-pane>

+ 8 - 0
src/xt_pages/stock/query/purchaseStockQuery.vue 파일 보기

195
      good_name:"",
195
      good_name:"",
196
      specification_name:"",
196
      specification_name:"",
197
      loading:false,
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
       formatJson(filterVal, jsonData) {
1000
       formatJson(filterVal, jsonData) {
994
         return jsonData.map(v => filterVal.map(j => v[j]));
1001
         return jsonData.map(v => filterVal.map(j => v[j]));
995
       },
1002
       },
1003
+     
996
   },
1004
   },
997
   // created(){
1005
   // created(){
998
   //   this.getStorehouseList()
1006
   //   this.getStorehouseList()

+ 2 - 2
src/xt_pages/stock/stockNewQuery.vue 파일 보기

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