Browse Source

新分支

28169 1 year ago
parent
commit
4326e8a645

+ 30 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue View File

524
           </ul>
524
           </ul>
525
         </div>
525
         </div>
526
       </div>
526
       </div>
527
+      
528
+      <!-- <div style="margin-left: 1150px; margin-bottom: 10px;">
529
+        <el-button type="primary" size="small" @toClicK="toExport">导出</el-button>
530
+      </div> -->
527
 
531
 
528
       <el-table
532
       <el-table
529
         :row-style="{ color: '#303133' }"
533
         :row-style="{ color: '#303133' }"
2205
       } else if (this.template_id == 33) {
2209
       } else if (this.template_id == 33) {
2206
         this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
2210
         this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
2207
       }
2211
       }
2212
+    },
2213
+    toExport(){
2214
+      import('@/vendor/Export2Excel').then(excel => { 
2215
+         
2216
+         console.log("监测统计",this.SchedualPatientsTableData)
2217
+        
2218
+         const tHeader = ['序号','机号','规格','数量']
2219
+         const filterVal = ['index','advice_name','specification_name','total_count']
2220
+
2221
+         const data = this.formatJson(filterVal, this.tableList)
2222
+         excel.export_json_to_excel({
2223
+           header: tHeader,
2224
+           data,
2225
+           filename: '药品统计'
2226
+         })
2227
+           this.downloadLoading = false
2228
+         })  
2229
+    },
2230
+    formatJson(filterVal, jsonData) {
2231
+      return jsonData.map(v => filterVal.map(j => {
2232
+        if (j === 'timestamp') {
2233
+          return parseTime(v[j])
2234
+        } else {
2235
+          return v[j]
2236
+        }
2237
+      }))
2208
     }
2238
     }
2209
   },
2239
   },
2210
   components: {
2240
   components: {

+ 3 - 3
src/xt_pages/qcd/statisticalConfiguration.vue View File

69
           <el-pagination
69
           <el-pagination
70
               @size-change="handleSizeChange"
70
               @size-change="handleSizeChange"
71
               @current-change="handleCurrentChange"
71
               @current-change="handleCurrentChange"
72
-              :page-sizes="[12, 20, 30, 100]"
73
-              :page-size="12"
72
+              :page-sizes="[10, 20, 30, 100]"
73
+              :page-size="10"
74
               background
74
               background
75
               style="margin-top:20px;float: right"
75
               style="margin-top:20px;float: right"
76
               layout="total, sizes, prev, pager, next, jumper"
76
               layout="total, sizes, prev, pager, next, jumper"
485
           this.configuraData = configurationlist
485
           this.configuraData = configurationlist
486
           var total = response.data.data.total
486
           var total = response.data.data.total
487
           // console.log("total",total)
487
           // console.log("total",total)
488
-          this.total = total+2
488
+          this.total = total
489
         }
489
         }
490
       })
490
       })
491
     },
491
     },

+ 32 - 5
src/xt_pages/stock/detail/cancelStockDetail.vue View File

257
       tableDataList:[],
257
       tableDataList:[],
258
       table:[],
258
       table:[],
259
       houseList:[],
259
       houseList:[],
260
-      storehouse_id:0
260
+      storehouse_id:0,
261
+      manufacturerList:[],
262
+      dealerList:[],
261
     };
263
     };
262
   },
264
   },
263
   methods: {
265
   methods: {
399
           }
401
           }
400
           console.log("list232323232322332232323ow",this.cancelStockDate)
402
           console.log("list232323232322332232323ow",this.cancelStockDate)
401
           this.tableDataList = response.data.data.list
403
           this.tableDataList = response.data.data.list
402
-
404
+          this.manufacturerList = response.data.data.manufacturerList
405
+          this.dealerList = response.data.data.dealerList
403
           var listgroup = response.data.data.listgroup
406
           var listgroup = response.data.data.listgroup
404
-
407
+          
408
+          this.
405
 
409
 
406
           this.cancelStockDate.push({
410
           this.cancelStockDate.push({
407
             order_number: "合计",
411
             order_number: "合计",
425
         }
429
         }
426
       });
430
       });
427
     },
431
     },
432
+    getManufacturerNameOne(id){
433
+        var manufacturer_name = ""
434
+        for(let i=0;i<this.manufacturerList.length;i++){
435
+          if(id == this.manufacturerList[i].id){
436
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
437
+          }
438
+        }
439
+        return manufacturer_name
440
+     },
441
+     getDealerNameOne(id){
442
+       var dealer_name = ""
443
+     
444
+       for(let i=0;i<this.dealerList.length;i++){
445
+          if(id == this.dealerList[i].id){
446
+              dealer_name = this.dealerList[i].dealer_name
447
+          }
448
+       }
449
+       return dealer_name
450
+     }, 
428
     getXuserName(id) {
451
     getXuserName(id) {
429
       if (id <= 0) {
452
       if (id <= 0) {
430
         return "";
453
         return "";
625
         .catch(() => {});
648
         .catch(() => {});
626
     },
649
     },
627
       exportList(){
650
       exportList(){
628
-        console.log("hhhhhh",this.tableList)
629
         for(let i=0;i<this.tableList.length;i++){
651
         for(let i=0;i<this.tableList.length;i++){
630
           this.tableList[i].index = i+1
652
           this.tableList[i].index = i+1
631
           this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
653
           this.tableList[i].good_name = this.tableList[i].GoodInfo.good_name
633
           this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
655
           this.tableList[i].packing_unit = this.tableList[i].GoodInfo.packing_unit
634
           this.tableList[i].total = this.getTotalCount(this.tableList[i].child)
656
           this.tableList[i].total = this.getTotalCount(this.tableList[i].child)
635
           this.tableList[i].total_price = (this.tableList[i].total * this.tableList[i].price).toFixed(2)
657
           this.tableList[i].total_price = (this.tableList[i].total * this.tableList[i].price).toFixed(2)
658
+          this.tableList[i].manufacturer_name = this.getManufacturerNameOne(this.tableList[i].manufacturer)
659
+          this.tableList[i].dealer_name = this.getDealerNameOne(this.tableList[i].dealer)
636
 
660
 
637
         }
661
         }
638
        var obj = {"index":"合计","total_price":0}
662
        var obj = {"index":"合计","total_price":0}
640
            obj.total_price +=this.tableList[i].total * this.tableList[i].price
664
            obj.total_price +=this.tableList[i].total * this.tableList[i].price
641
        }
665
        }
642
        obj.total_price = obj.total_price.toFixed(2)
666
        obj.total_price = obj.total_price.toFixed(2)
643
-       console.log("obj23233",obj)
667
+      
644
        this.tableList.push(obj)
668
        this.tableList.push(obj)
645
        import('@/vendor/Export2Excel').then(excel => {
669
        import('@/vendor/Export2Excel').then(excel => {
646
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','退库价','总价','备注']
670
        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','退库价','总价','备注']
669
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].CancelStock.creater)
693
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].CancelStock.creater)
670
           this.tableDataList[i].out_count = this.tableDataList[i].count
694
           this.tableDataList[i].out_count = this.tableDataList[i].count
671
           this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
695
           this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
696
+          this.tableDataList[i].manufacturer_name = this.getManufacturerNameOne(this.tableDataList[i].manufacturer)
697
+          this.tableDataList[i].dealer_name = this.getDealerNameOne(this.tableDataList[i].dealer)
672
           total += this.tableDataList[i].count * this.tableDataList[i].price
698
           total += this.tableDataList[i].count * this.tableDataList[i].price
699
+
673
         }
700
         }
674
         obj.total_price = total.toFixed(2)
701
         obj.total_price = total.toFixed(2)
675
         this.tableDataList.push(obj)
702
         this.tableDataList.push(obj)

+ 36 - 6
src/xt_pages/stock/detail/stockInDetail.vue View File

265
       tableDataList:[],
265
       tableDataList:[],
266
       houseList:[],
266
       houseList:[],
267
       storehouse_id:0,
267
       storehouse_id:0,
268
+      manufacturerList:[],
269
+      dealerList:[],
268
     };
270
     };
269
   },
271
   },
270
   methods: {
272
   methods: {
345
             obj["is_total"] = 0;
347
             obj["is_total"] = 0;
346
             this.cancelStockDate.push(obj);
348
             this.cancelStockDate.push(obj);
347
           }
349
           }
350
+          this.manufacturerList = response.data.data.manufacturerList
351
+          this.dealerList = response.data.data.dealerList
348
 
352
 
349
           this.cancelStockDate.push({
353
           this.cancelStockDate.push({
350
             warehousing_order: "合计",
354
             warehousing_order: "合计",
405
             this.cancelStockDate.push(obj);
409
             this.cancelStockDate.push(obj);
406
           }
410
           }
407
           this.tableDataList = response.data.data.list
411
           this.tableDataList = response.data.data.list
408
-          console.log("表格发3223332322332332323232332233",this.cancelStockDate)
412
+          this.manufacturerList = response.data.data.manufacturerList
413
+          this.dealerList = response.data.data.dealerList
414
+        
409
 
415
 
410
           this.cancelStockDate.push({
416
           this.cancelStockDate.push({
411
             warehousing_order: "合计",
417
             warehousing_order: "合计",
772
         for(let i=0;i<this.tableInfo.length;i++){
778
         for(let i=0;i<this.tableInfo.length;i++){
773
           this.tableInfo[i].index = i+1
779
           this.tableInfo[i].index = i+1
774
           this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].price).toFixed(2)
780
           this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].price).toFixed(2)
781
+          this.tableInfo[i].manufacturer_name = this.getManufactuerName(this.tableInfo[i].manufacturer)
782
+          this.tableInfo[i].dealer_name = this.getDealerName(this.tableInfo[i].dealer)
775
         }
783
         }
776
 
784
 
777
         import('@/vendor/Export2Excel').then(excel => {
785
         import('@/vendor/Export2Excel').then(excel => {
778
-        const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','进货价','总价','备注']
779
-        const filterVal = ['index','good_name', 'specification_name', 'packing_unit','warehousing_count','price','total_price','remark']
786
+        const tHeader = ['序号','耗材名称', '规格型号','生产厂商','进销商', '单位','数量','进货价','总价','备注']
787
+        const filterVal = ['index','good_name', 'specification_name','manufacturer_name','dealer_name', 'packing_unit','warehousing_count','price','total_price','remark']
780
 
788
 
781
 
789
 
782
         const data = this.formatJson(filterVal, this.tableInfo)
790
         const data = this.formatJson(filterVal, this.tableInfo)
790
             this.downloadLoading = false
798
             this.downloadLoading = false
791
         })
799
         })
792
       },
800
       },
801
+        getManufacturerName(id){
802
+          var manufacturer_name = ""
803
+          for(let i=0;i<this.manufacturerList.length;i++){
804
+            if(id == this.manufacturerList[i].id){
805
+              manufacturer_name = this.manufacturerList[i].manufacturer_name
806
+            }
807
+          }
808
+          return manufacturer_name
809
+      },
810
+      getDealerName(id){
811
+        var dealer_name = ""
812
+        for(let i=0;i<this.dealerList.length;i++){
813
+            if(id == this.dealerList[i].id){
814
+                dealer_name = this.dealerList[i].dealer_name
815
+            }
816
+        }
817
+        return dealer_name
818
+      }, 
793
       exportListDetal(){
819
       exportListDetal(){
794
 
820
 
795
         var obj = {index:"合计",total_price:0}
821
         var obj = {index:"合计",total_price:0}
796
         var total = 0
822
         var total = 0
823
+        console.log("wowowows",this.tableDataList)
797
         for(let i=0;i<this.tableDataList.length;i++){
824
         for(let i=0;i<this.tableDataList.length;i++){
798
           this.tableDataList[i].index = i + 1
825
           this.tableDataList[i].index = i + 1
799
           this.tableDataList[i].good_type_name = this.typeName(this.tableDataList[i].good_type_id)
826
           this.tableDataList[i].good_type_name = this.typeName(this.tableDataList[i].good_type_id)
802
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].Warehousing.warehousing_time)
829
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].Warehousing.warehousing_time)
803
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].Warehousing.creater)
830
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].Warehousing.creater)
804
           this.tableDataList[i].total_price = (this.tableDataList[i].warehousing_count * this.tableDataList[i].price).toFixed(2)
831
           this.tableDataList[i].total_price = (this.tableDataList[i].warehousing_count * this.tableDataList[i].price).toFixed(2)
832
+          this.tableDataList[i].manufacturer_name = this.getManufactuerName(this.tableDataList[i].manufacturer)
833
+          this.tableDataList[i].dealer_name = this.getDealerName(this.tableDataList[i].dealer)
805
           total += this.tableDataList[i].warehousing_count * this.tableDataList[i].price
834
           total += this.tableDataList[i].warehousing_count * this.tableDataList[i].price
835
+          
806
         }
836
         }
807
         obj.total_price = total.toFixed(2)
837
         obj.total_price = total.toFixed(2)
808
         this.tableDataList.push(obj)
838
         this.tableDataList.push(obj)
839
+      
809
         import('@/vendor/Export2Excel').then(excel => {
840
         import('@/vendor/Export2Excel').then(excel => {
810
-        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','进货价','数量','总价']
811
-        const filterVal = ['index','warehousing_order', 'good_type_name', 'good_name','specification_name','time','user_name','price','warehousing_count','total_price']
841
+        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','操作时间','制单人','进货价','数量','总价']
842
+        const filterVal = ['index','warehousing_order', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','warehousing_count','total_price']
812
 
843
 
813
 
844
 
814
         const data = this.formatJson(filterVal, this.tableDataList)
845
         const data = this.formatJson(filterVal, this.tableDataList)
815
 
846
 
816
-
817
           excel.export_json_to_excel({
847
           excel.export_json_to_excel({
818
             header: tHeader,
848
             header: tHeader,
819
             data,
849
             data,

+ 43 - 5
src/xt_pages/stock/detail/stockOutDetail.vue View File

117
           </template>
117
           </template>
118
         </el-table-column>
118
         </el-table-column>
119
 
119
 
120
+
121
+        <el-table-column label="生产厂商" align="center">
122
+          <template slot-scope="scope">
123
+            {{ getManufactuerName(scope.row.manufacturer) }}
124
+          </template>
125
+        </el-table-column>
126
+
120
         <!-- <el-table-column label="单据类型" align="center">
127
         <!-- <el-table-column label="单据类型" align="center">
121
           <template slot-scope="scope">
128
           <template slot-scope="scope">
122
             {{ getTypeName(scope.row) }}
129
             {{ getTypeName(scope.row) }}
271
       storehouse_id:0,
278
       storehouse_id:0,
272
       houseList:[],
279
       houseList:[],
273
       wareOutList:[],
280
       wareOutList:[],
281
+      manufacturerList:[],
282
+      dealerList:[],
274
     };
283
     };
275
   },
284
   },
276
   methods: {
285
   methods: {
431
           }
440
           }
432
 
441
 
433
           this.tableDataList = response.data.data.list
442
           this.tableDataList = response.data.data.list
443
+          this.manufacturerList = response.data.data.manufacturerList
444
+          this.dealerList = response.data.data.dealerList
434
 
445
 
435
           this.cancelStockDate.push(objOne);
446
           this.cancelStockDate.push(objOne);
436
 
447
 
531
         }
542
         }
532
       });
543
       });
533
     },
544
     },
545
+    getManufacturerNameOne(id){
546
+        var manufacturer_name = ""
547
+        for(let i=0;i<this.manufacturerList.length;i++){
548
+          if(id == this.manufacturerList[i].id){
549
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
550
+          }
551
+        }
552
+        return manufacturer_name
553
+     },
554
+     getDealerNameOne(id){
555
+       var dealer_name = ""
556
+     
557
+       for(let i=0;i<this.dealerList.length;i++){
558
+          if(id == this.dealerList[i].id){
559
+              dealer_name = this.dealerList[i].dealer_name
560
+          }
561
+       }
562
+       return dealer_name
563
+     }, 
534
     getManufactuerName: function(manufacturer_id) {
564
     getManufactuerName: function(manufacturer_id) {
535
       for (let i = 0; i < this.manufacturer.length; i++) {
565
       for (let i = 0; i < this.manufacturer.length; i++) {
536
         if (this.manufacturer[i].id == manufacturer_id) {
566
         if (this.manufacturer[i].id == manufacturer_id) {
851
         if(this.orgId!=10265 && this.orgId !=10215  && this.orgId != 9671 &&this.orgId!=10210&&this.orgId!=9675 && this.orgId!=9956&& this.orgId!=10217 && this.orgId!=10188 && this.orgId!=10191 && this.orgId!=9919 && this.orgId!=0&& this.orgId!=10402 && this.orgId != 10489 && this.orgId!=10375 && this.orgId!=10485){
881
         if(this.orgId!=10265 && this.orgId !=10215  && this.orgId != 9671 &&this.orgId!=10210&&this.orgId!=9675 && this.orgId!=9956&& this.orgId!=10217 && this.orgId!=10188 && this.orgId!=10191 && this.orgId!=9919 && this.orgId!=0&& this.orgId!=10402 && this.orgId != 10489 && this.orgId!=10375 && this.orgId!=10485){
852
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
882
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
853
         }
883
         }
884
+        this.tableOut[i].manufacturer_name = this.getManufacturerNameOne(this.tableOut[i].manufacturer)
885
+        console.log("继续桑",this.tableOut[i].dealer)
886
+        this.tableOut[i].dealer_name = this.getDealerNameOne(this.tableOut[i].dealer)
854
        }
887
        }
888
+       console.log("retusoossoso",this.tableOut)
889
+       
855
        import('@/vendor/Export2Excel').then(excel => {
890
        import('@/vendor/Export2Excel').then(excel => {
856
-       const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','出库时间','备注']
891
+       const tHeader = ['序号','耗材名称', '规格型号','生产厂商','进销商', '单位','数量','出货价','总价','出库时间','备注']
857
 
892
 
858
-       const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','ctime','remark']
893
+       const filterVal = ['index','good_name', 'specification_name', 'manufacturer_name','dealer_name','packing_unit','out_count','packing_price','total_price','ctime','remark']
859
 
894
 
860
        const data = this.formatJson(filterVal, this.tableOut)
895
        const data = this.formatJson(filterVal, this.tableOut)
861
 
896
 
880
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].WarehouseOut.warehouse_out_time)
915
           this.tableDataList[i].time = this.getTime(this.tableDataList[i].WarehouseOut.warehouse_out_time)
881
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].WarehouseOut.creater)
916
           this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].WarehouseOut.creater)
882
           this.tableDataList[i].out_count = this.tableDataList[i].count
917
           this.tableDataList[i].out_count = this.tableDataList[i].count
918
+          this.tableDataList[i].manufacturer_name = this.getManufacturerNameOne(this.tableDataList[i].GoodInfo.manufacturer)
919
+          this.tableDataList[i].dealer_name = this.getDealerNameOne(this.tableDataList[i].GoodInfo.dealer)
883
           if(this.orgId == 9919){
920
           if(this.orgId == 9919){
884
              this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
921
              this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
885
              total += this.tableDataList[i].count * this.tableDataList[i].buy_price
922
              total += this.tableDataList[i].count * this.tableDataList[i].buy_price
891
 
928
 
892
         }
929
         }
893
         obj.total_price = total.toFixed(2)
930
         obj.total_price = total.toFixed(2)
894
-
931
+        console.log("WOHHAHHAHAH",this.tableDataList)
932
+      
895
         this.tableDataList.push(obj)
933
         this.tableDataList.push(obj)
896
        import('@/vendor/Export2Excel').then(excel => {
934
        import('@/vendor/Export2Excel').then(excel => {
897
-       const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','出货价','数量','总价']
898
-       const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','time','user_name','price','out_count','total_price']
935
+       const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','操作时间','制单人','出货价','数量','总价']
936
+       const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','out_count','total_price']
899
 
937
 
900
        const data = this.formatJson(filterVal, this.tableDataList)
938
        const data = this.formatJson(filterVal, this.tableDataList)
901
 
939
 

+ 37 - 14
src/xt_pages/stock/drugs/components/drugCancelDetail.vue View File

235
       tableList:[],
235
       tableList:[],
236
       tableDataList:[],
236
       tableDataList:[],
237
       drugTypeList:[],
237
       drugTypeList:[],
238
+      dealerList:[],
239
+      manufacturerList:[]
238
     };
240
     };
239
   },
241
   },
240
   methods: {
242
   methods: {
348
          if(response.data.state == 1){
350
          if(response.data.state == 1){
349
            var order =  response.data.data.order
351
            var order =  response.data.data.order
350
            var list = response.data.data.orderPrint
352
            var list = response.data.data.orderPrint
353
+           this.dealerList =  response.data.data.dealerList
354
+           this.manufacturerList =  response.data.data.manufacturerList
351
            //this.drugTypeList = response.data.data.drugTypeList
355
            //this.drugTypeList = response.data.data.drugTypeList
352
            for(let i=0;i<list.length;i++){
356
            for(let i=0;i<list.length;i++){
353
              list[i].child = []
357
              list[i].child = []
356
                   list[i].child.push(order[j])
360
                   list[i].child.push(order[j])
357
                }
361
                }
358
             }
362
             }
363
+            list[i].manufacturer_name = this.getManufacturerName(list[i].manufacturer)
364
+            list[i].dealer_name = this.getDealerName(list[i].dealer)
359
            }
365
            }
360
            this.tableDataList = list
366
            this.tableDataList = list
367
+           console.log("数据我我我",this.tableDataList)
361
            var total_price = 0
368
            var total_price = 0
362
           for(let i=0;i<order.length;i++){
369
           for(let i=0;i<order.length;i++){
363
              order[i].specification_name  = order[i].dose + order[i].dose_unit + "*" + order[i].min_number +  order[i].min_unit + "/" + order[i].max_unit
370
              order[i].specification_name  = order[i].dose + order[i].dose_unit + "*" + order[i].min_number +  order[i].min_unit + "/" + order[i].max_unit
364
              order[i].is_total = 0
371
              order[i].is_total = 0
365
              order[i].total_price = order[i].count * order[i].price
372
              order[i].total_price = order[i].count * order[i].price
366
              total_price += order[i].count * order[i].price
373
              total_price += order[i].count * order[i].price
374
+             order[i].manufacturer_name = this.getManufacturerName(order[i].manufacturer)
375
+             order[i].dealer_name = this.getDealerName(order[i].dealer)
367
           }
376
           }
377
+
368
            order.push({
378
            order.push({
369
             order_number: "合计",
379
             order_number: "合计",
370
             is_total: 1,
380
             is_total: 1,
380
          }
390
          }
381
       })
391
       })
382
     },
392
     },
383
-
393
+    getManufacturerName(id){
394
+        var manufacturer_name = ""
395
+        for(let i=0;i<this.manufacturerList.length;i++){
396
+          if(id == this.manufacturerList[i].id){
397
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
398
+          }
399
+        }
400
+        return manufacturer_name
401
+     },
402
+     getDealerName(id){
403
+       var dealer_name = ""
404
+       for(let i=0;i<this.dealerList.length;i++){
405
+          if(id == this.dealerList[i].id){
406
+              dealer_name = this.dealerList[i].dealer_name
407
+          }
408
+       }
409
+       return dealer_name
410
+     }, 
384
      getAdminUser(id){
411
      getAdminUser(id){
385
       var name = ""
412
       var name = ""
386
       for(let i=0;i<this.adminUserOptions.length;i++){
413
       for(let i=0;i<this.adminUserOptions.length;i++){
418
           this.tableDataList[i].ctime = this.getTime(this.tableDataList[i].ctime)
445
           this.tableDataList[i].ctime = this.getTime(this.tableDataList[i].ctime)
419
         }
446
         }
420
        import('@/vendor/Export2Excel').then(excel => {
447
        import('@/vendor/Export2Excel').then(excel => {
421
-        const tHeader = ['序号','单据编号', '药品名称', '规格型号','单据类型','操作时间','制单人','数量','退库价','总价']
422
-        const filterVal = ['index','order_number','drug_name', 'specification_name', 'drug_type','ctime','user_name','total_count','price','total_price']
448
+        const tHeader = ['序号','单据编号', '药品名称', '规格型号','生产厂商','进销商','单据类型','操作时间','制单人','数量','退库价','总价']
449
+        const filterVal = ['index','order_number','drug_name', 'specification_name','manufacturer_name','dealer_name', 'drug_type','ctime','user_name','total_count','price','total_price']
423
 
450
 
424
         const data = this.formatJson(filterVal, this.tableDataList)
451
         const data = this.formatJson(filterVal, this.tableDataList)
425
 
452
 
436
      },
463
      },
437
     exportListOne(){
464
     exportListOne(){
438
       // let obj = {'index':'合计','total_price':0}
465
       // let obj = {'index':'合计','total_price':0}
439
-      console.log("@332322323232332",this.tableList)
440
-
466
+    
467
+ 
441
        for(let i=0;i<this.tableList.length;i++){
468
        for(let i=0;i<this.tableList.length;i++){
442
           this.tableList[i].index = i+1
469
           this.tableList[i].index = i+1
443
           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
470
           this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
453
           this.tableList[i].time = this.getTime(this.tableList[i].ctime)
480
           this.tableList[i].time = this.getTime(this.tableList[i].ctime)
454
           this.tableList[i].user_name = this.getAdminUser(this.tableList[i].creater)
481
           this.tableList[i].user_name = this.getAdminUser(this.tableList[i].creater)
455
 
482
 
456
-          //this.tableList[i].total_price = this.tableList[i].count * this.tableList[i].price
457
-          //  obj.total_price += this.tableList[i].count * this.tableList[i].price
458
         }
483
         }
459
-      //   obj.total_price = obj.total_price.toFixed(2)
460
-      //  this.tableList.push(obj)
461
-      //  for(let i=0;i<this.tableData.length;i++){
462
-      //    this.tableData[i].total_price = (this.tableData[i].total_price).toFixed(2)
463
-      //  }
484
+    
485
+      console.log("@332322323232332",this.tableList)
486
+      
464
        import('@/vendor/Export2Excel').then(excel => {
487
        import('@/vendor/Export2Excel').then(excel => {
465
-       const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','操作时间','制单人','退货价','数量','总价']
466
-       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name', 'time','user_name','price','count','total_price']
488
+       const tHeader = ['序号','单据编号', '药品类型','药品名称', '规格型号','生产厂商','进销商','操作时间','制单人','退货价','数量','总价']
489
+       const filterVal = ['index','order_number','drugtype','drug_name', 'specification_name','manufacturer_name','dealer_name', 'time','user_name','price','count','total_price']
467
 
490
 
468
        const data = this.formatJson(filterVal, this.tableList)
491
        const data = this.formatJson(filterVal, this.tableList)
469
 
492
 

+ 33 - 8
src/xt_pages/stock/drugs/components/drugInOrder.vue View File

449
             var list = response.data.data.list
449
             var list = response.data.data.list
450
           
450
           
451
             this.tabelePrintList = list
451
             this.tabelePrintList = list
452
+            this.manufacturerList = response.data.data.manufacturerList
453
+            this.dealerList = response.data.data.dealerList
452
           }   
454
           }   
453
       })
455
       })
454
     },
456
     },
470
       return name
472
       return name
471
     },
473
     },
472
      exportList(){
474
      exportList(){
473
-       
475
+        
476
+       console.log("tablePrintlist",this.tabelePrintList)
477
+      
474
         for(let i=0;i<this.tabelePrintList.length;i++){
478
         for(let i=0;i<this.tabelePrintList.length;i++){
475
           this.tabelePrintList[i].index = i+1
479
           this.tabelePrintList[i].index = i+1
476
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
480
           this.tabelePrintList[i].drug_name = this.tabelePrintList[i].XtBaseDrug.drug_name
477
-
481
+          this.tabelePrintList[i].manufacturer_name = this.getManufacturerName(this.tabelePrintList[i].manufacturer)
482
+          this.tabelePrintList[i].dealer_name = this.getDealerName(this.tabelePrintList[i].dealer)
478
           this.tabelePrintList[i].unit = this.tabelePrintList[i].XtBaseDrug.dose + this.tabelePrintList[i].XtBaseDrug.dose_unit + "*" + this.tabelePrintList[i].XtBaseDrug.min_number +this.tabelePrintList[i].XtBaseDrug.min_unit +"/"+this.tabelePrintList[i].XtBaseDrug.max_unit
483
           this.tabelePrintList[i].unit = this.tabelePrintList[i].XtBaseDrug.dose + this.tabelePrintList[i].XtBaseDrug.dose_unit + "*" + this.tabelePrintList[i].XtBaseDrug.min_number +this.tabelePrintList[i].XtBaseDrug.min_unit +"/"+this.tabelePrintList[i].XtBaseDrug.max_unit
479
         }
484
         }
480
-        
481
        import('@/vendor/Export2Excel').then(excel => {
485
        import('@/vendor/Export2Excel').then(excel => {
482
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','备注']
483
-       const filterVal = ['index','drug_name', 'unit', 'max_unit','warehousing_count','price','total_price','remark']
486
+       const tHeader = ['序号','药品名称', '规格型号','生产厂商','经销商', '单位','数量','单价','总价','备注']
487
+       const filterVal = ['index','drug_name', 'unit','manufacturer_name','dealer_name', 'max_unit','warehousing_count','price','total_price','remark']
484
        let obj = {'index':'合计','total_price':0}
488
        let obj = {'index':'合计','total_price':0}
485
        for(let i=0;i<this.tabelePrintList.length;i++){
489
        for(let i=0;i<this.tabelePrintList.length;i++){
486
          obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count
490
          obj.total_price += this.tabelePrintList[i].price * this.tabelePrintList[i].warehousing_count
503
      formatJson(filterVal, jsonData) {
507
      formatJson(filterVal, jsonData) {
504
         return jsonData.map(v => filterVal.map(j => v[j]));
508
         return jsonData.map(v => filterVal.map(j => v[j]));
505
      },
509
      },
510
+     getManufacturerName(id){
511
+        var manufacturer_name = ""
512
+        for(let i=0;i<this.manufacturerList.length;i++){
513
+          if(id == this.manufacturerList[i].id){
514
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
515
+          }
516
+        }
517
+        return manufacturer_name
518
+     },
519
+     getDealerName(id){
520
+       var dealer_name = ""
521
+       for(let i=0;i<this.dealerList.length;i++){
522
+          if(id == this.dealerList[i].id){
523
+              dealer_name = this.dealerList[i].dealer_name
524
+          }
525
+       }
526
+       return dealer_name
527
+     }, 
506
      exportListDetail(){
528
      exportListDetail(){
507
        
529
        
508
        import('@/vendor/Export2Excel').then(excel => {
530
        import('@/vendor/Export2Excel').then(excel => {
509
-       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','进货价','数量','总价']
510
-       const filterVal = ['index','warehousing_order','drugtype','drug_name', 'specification_name','time','user_name','price','warehousing_count','total']
531
+       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','生产厂商','进销商','操作时间','制单人','进货价','数量','总价']
532
+       const filterVal = ['index','warehousing_order','drugtype','drug_name', 'specification_name','manufacturer_name','dealer_name','time','user_name','price','warehousing_count','total']
511
 
533
 
512
        var newArr = []
534
        var newArr = []
513
        newArr = this.cancelStockDate
535
        newArr = this.cancelStockDate
536
+       console.log("newArrwowowowoow",newArr)
537
+     
514
        let obj = {'index':'合计','total':0}
538
        let obj = {'index':'合计','total':0}
515
        for(let i=0;i<newArr.length;i++){
539
        for(let i=0;i<newArr.length;i++){
516
           newArr.specification_name = ""
540
           newArr.specification_name = ""
517
           newArr.index = i+1
541
           newArr.index = i+1
518
          newArr[i].drugtype = this.getTypeList(newArr[i].drug_type)
542
          newArr[i].drugtype = this.getTypeList(newArr[i].drug_type)
519
          newArr[i].specification_name = newArr[i].dose + newArr[i].dose_unit +"*" + newArr[i].min_number + newArr[i].min_unit +  "/" + newArr[i].max_unit
543
          newArr[i].specification_name = newArr[i].dose + newArr[i].dose_unit +"*" + newArr[i].min_number + newArr[i].min_unit +  "/" + newArr[i].max_unit
520
-
544
+         newArr[i].manufacturer_name = this.getManufacturerName(newArr[i].manufacturer)
545
+         newArr[i].dealer_name = this.getDealerName(newArr[i].dealer)
521
          newArr[i].time = this.getTime(newArr[i].ctime)
546
          newArr[i].time = this.getTime(newArr[i].ctime)
522
          newArr[i].user_name = this.getAdminUser(newArr[i].creater)
547
          newArr[i].user_name = this.getAdminUser(newArr[i].creater)
523
          newArr[i].total = (newArr[i].price * newArr[i].warehousing_count).toFixed(2)
548
          newArr[i].total = (newArr[i].price * newArr[i].warehousing_count).toFixed(2)

+ 40 - 7
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

122
           </template>
122
           </template>
123
         </el-table-column>
123
         </el-table-column>
124
 
124
 
125
+        <el-table-column label="生产厂商" align="center">
126
+          <template slot-scope="scope">
127
+           {{getManufacturerName(scope.row.manufacturer)}}
128
+          </template>
129
+        </el-table-column>
130
+
125
 
131
 
126
         <el-table-column label="操作时间" align="center">
132
         <el-table-column label="操作时间" align="center">
127
           <template slot-scope="scope">
133
           <template slot-scope="scope">
274
       drugTypeList:[],
280
       drugTypeList:[],
275
       storehouse_id:0,
281
       storehouse_id:0,
276
       houseList:[],
282
       houseList:[],
283
+      dealerList:[],
284
+      manufacturerList:[]
277
     };
285
     };
278
   },
286
   },
279
   methods: {
287
   methods: {
576
         for(let i=0;i<this.tablePrint.length;i++){
584
         for(let i=0;i<this.tablePrint.length;i++){
577
           this.tablePrint[i].index = i+1
585
           this.tablePrint[i].index = i+1
578
           this.tablePrint[i].ctime = this.getTime(this.tablePrint[i].ctime)
586
           this.tablePrint[i].ctime = this.getTime(this.tablePrint[i].ctime)
587
+          this.tablePrint[i].manufacturer_name = this.getManufacturerName(this.tablePrint[i].manufacturer)
588
+          this.tablePrint[i].dealer_name = this.getDealerName(this.tablePrint[i].dealer)
579
         }
589
         }
580
         for(let i=0;i<this.tablePrint.length;i++){
590
         for(let i=0;i<this.tablePrint.length;i++){
581
            if(this.org_id == 9919 || this.org_id == 9671){
591
            if(this.org_id == 9919 || this.org_id == 9671){
594
 
604
 
595
 
605
 
596
        import('@/vendor/Export2Excel').then(excel => {
606
        import('@/vendor/Export2Excel').then(excel => {
597
-       const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','总价','出库时间','备注']
598
-       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','min_price','total_price','ctime','remark']
607
+       const tHeader = ['序号','药品名称', '规格型号','生产厂商','进销商', '单位','数量','单价','总价','出库时间','备注']
608
+       const filterVal = ['index','drug_name', 'unit', 'manufacturer_name','dealer_name','min_unit','count','min_price','total_price','ctime','remark']
599
        let obj = {'index':'合计','total_price':0.00}
609
        let obj = {'index':'合计','total_price':0.00}
600
        for(let i=0;i<this.tablePrint.length;i++){
610
        for(let i=0;i<this.tablePrint.length;i++){
601
          obj.total_price += this.tablePrint[i].total
611
          obj.total_price += this.tablePrint[i].total
619
      },
629
      },
620
     exportListDetai(){
630
     exportListDetai(){
621
       import('@/vendor/Export2Excel').then(excel => {
631
       import('@/vendor/Export2Excel').then(excel => {
622
-       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','操作时间','制单人','出货价','数量','总价']
623
-       const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','time','user_name','price','count','total_price']
632
+       const tHeader = ['序号','单据编号', '药品类型', '药品名称','规格型号','生产厂商','进销商','操作时间','制单人','出货价','数量','总价']
633
+       const filterVal = ['index','warehouse_out_order_number', 'drugtype', 'drug_name','specification_name','manufacturer_name','dealer_name','time','user_name','price','count','total_price']
624
        for(let i=0;i<this.tableData.length;i++){
634
        for(let i=0;i<this.tableData.length;i++){
625
          if(this.tableData[i].is_total == 0){
635
          if(this.tableData[i].is_total == 0){
626
             this.tableData[i].index = i+1
636
             this.tableData[i].index = i+1
633
             if(this.tableData[i].drug_type == 3){
643
             if(this.tableData[i].drug_type == 3){
634
               this.tableData[i].drugtype = "成药"
644
               this.tableData[i].drugtype = "成药"
635
             }
645
             }
636
-            // this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
637
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
646
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
638
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
647
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
639
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
648
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
649
+            this.tableData[i].manufacturer_name = this.getManufacturerName(this.tableData[i].manufacturer)
650
+            this.tableData[i].dealer_name = this.getDealerName(this.tableData[i].dealer)
640
             if(this.org_id == 9919){
651
             if(this.org_id == 9919){
641
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
652
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
642
               if(this.tableData[i].count >=this.tableData[i].min_number){
653
               if(this.tableData[i].count >=this.tableData[i].min_number){
670
           this.downloadLoading = false
681
           this.downloadLoading = false
671
       })
682
       })
672
     },
683
     },
673
-
684
+    getManufacturerName(id){
685
+        var manufacturer_name = ""
686
+        for(let i=0;i<this.manufacturerList.length;i++){
687
+          if(id == this.manufacturerList[i].id){
688
+            manufacturer_name = this.manufacturerList[i].manufacturer_name
689
+          }
690
+        }
691
+        return manufacturer_name
692
+     },
693
+     getDealerName(id){
694
+       var dealer_name = ""
695
+       for(let i=0;i<this.dealerList.length;i++){
696
+          if(id == this.dealerList[i].id){
697
+              dealer_name = this.dealerList[i].dealer_name
698
+          }
699
+       }
700
+       return dealer_name
701
+     }, 
674
     getBaseDrugLibList() {
702
     getBaseDrugLibList() {
675
         let params = {
703
         let params = {
676
           page: 1,
704
           page: 1,
704
      getDrugOutOrderPrint(params).then(response=>{
732
      getDrugOutOrderPrint(params).then(response=>{
705
         if(response.data.state == 1){
733
         if(response.data.state == 1){
706
             var list = response.data.data.list
734
             var list = response.data.data.list
707
-         
735
+            this.dealerList = response.data.data.dealerList
736
+            this.manufacturerList = response.data.data.manufacturerList
708
             let objInfo = {}
737
             let objInfo = {}
709
             if(this.org_id == 9919){
738
             if(this.org_id == 9919){
710
               list.forEach((item,index)=>{
739
               list.forEach((item,index)=>{
726
                   max_unit:item.XtBaseDrug.max_unit,
755
                   max_unit:item.XtBaseDrug.max_unit,
727
                   min_price:item.XtBaseDrug.min_price,
756
                   min_price:item.XtBaseDrug.min_price,
728
                   ctime:item.ctime,
757
                   ctime:item.ctime,
758
+                  manufacturer:item.manufacturer,
759
+                  dealer:item.dealer,
729
                 }
760
                 }
730
               }
761
               }
731
              })
762
              })
749
                   max_unit:item.XtBaseDrug.max_unit,
780
                   max_unit:item.XtBaseDrug.max_unit,
750
                   min_price:item.XtBaseDrug.min_price,
781
                   min_price:item.XtBaseDrug.min_price,
751
                   ctime:item.ctime,
782
                   ctime:item.ctime,
783
+                  manufacturer:item.manufacturer,
784
+                  dealer:item.dealer,
752
                 }
785
                 }
753
               }
786
               }
754
             })
787
             })

+ 4 - 0
src/xt_pages/stock/drugs/inventoryDetails.vue View File

158
             this.$router.push({path:'/stock/drugs/inventoryPrint'}) 
158
             this.$router.push({path:'/stock/drugs/inventoryPrint'}) 
159
         },
159
         },
160
         print_1(){
160
         print_1(){
161
+           if(this.ids == ""){
162
+             this.$message.error("请勾选需要打印的内容")
163
+             return false
164
+           }
161
            this.$router.push({path:'/stock/drugs/print?storehouse_id='+this.storehouse_id+"&drug_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids}) 
165
            this.$router.push({path:'/stock/drugs/print?storehouse_id='+this.storehouse_id+"&drug_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids}) 
162
         },
166
         },
163
         handleSizeChange(val){
167
         handleSizeChange(val){

+ 4 - 0
src/xt_pages/stock/inventoryDetails.vue View File

145
     },
145
     },
146
     methods:{
146
     methods:{
147
         toprint(){
147
         toprint(){
148
+          if(this.ids == ""){
149
+             this.$message.error("请勾选需要打印的内容")
150
+             return false
151
+          }              
148
           this.$router.push({path:'/stock/print_all?storehouse_id='+this.storehouse_id+"&good_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids})
152
           this.$router.push({path:'/stock/print_all?storehouse_id='+this.storehouse_id+"&good_name="+this.searchKey+"&limit="+this.limit+"&page="+this.page+"&ids="+this.ids})
149
         },
153
         },
150
 
154