Browse Source

hah阿凡达

28169 1 month ago
parent
commit
beac9b18c0

+ 19 - 4
src/xt_pages/stock/detail/stockInDetail.vue View File

@@ -316,9 +316,20 @@ export default {
316 316
       dealerList:[],
317 317
       currentIndex:0,
318 318
       good_id:0,
319
+      goodKindList:[]
319 320
     };
320 321
   },
321 322
   methods: {
323
+    getGoodKandName(id){
324
+     
325
+      var name = ""
326
+      for(let i=0;i<this.goodKindList.length;i++){
327
+       if(id == this.goodKindList[i].value){
328
+          name = this.goodKindList[i].name
329
+       }
330
+      }
331
+      return name
332
+    },
322 333
     handleSelect(val){
323 334
      this.good_name = val.good_name
324 335
      this.good_id = val.id
@@ -514,7 +525,8 @@ export default {
514 525
           this.tableDataList = response.data.data.list
515 526
           this.manufacturerList = response.data.data.manufacturerList
516 527
           this.dealerList = response.data.data.dealerList
517
-        
528
+          
529
+          this.goodKindList = response.data.data.goodKindList
518 530
 
519 531
           this.cancelStockDate.push({
520 532
             warehousing_order: "合计",
@@ -937,8 +949,9 @@ export default {
937 949
         var obj = {index:"合计",total_price:0}
938 950
         var total = 0
939 951
         console.log("wowowows",this.tableDataList)
940
-        return
952
+       
941 953
         for(let i=0;i<this.tableDataList.length;i++){
954
+          this.tableDataList[i].good_kand_name = this.getGoodKandName(this.tableDataList[i].GoodInfo.good_kind)
942 955
           this.tableDataList[i].index = i + 1
943 956
           this.tableDataList[i].good_type_name = this.typeName(this.tableDataList[i].good_type_id)
944 957
           this.tableDataList[i].good_name = this.typeNameOne(this.tableDataList[i].good_id)
@@ -956,9 +969,11 @@ export default {
956 969
         obj.total_price = total.toFixed(2)
957 970
         this.tableDataList.push(obj)
958 971
       
972
+        console.log("hhhhhhhhhhhhhhhh",this.tableDataList)
973
+       
959 974
         import('@/vendor/Export2Excel').then(excel => {
960
-        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','批号','生产日期','有效日期','操作时间','制单人','进货价','数量','总价']
961
-        const filterVal = ['index','warehousing_order', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','number','product_date_name','expiry_date_name','time','user_name','price','warehousing_count','total_price']
975
+        const tHeader = ['序号','单据编号','耗材种类', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','批号','生产日期','有效日期','操作时间','制单人','进货价','数量','总价']
976
+        const filterVal = ['index','warehousing_order','good_kand_name', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','number','product_date_name','expiry_date_name','time','user_name','price','warehousing_count','total_price']
962 977
 
963 978
 
964 979
         const data = this.formatJson(filterVal, this.tableDataList)

+ 16 - 4
src/xt_pages/stock/detail/stockOutDetail.vue View File

@@ -350,9 +350,20 @@ export default {
350 350
       patientsList:[],
351 351
       good_id:0,
352 352
       good_name:"",
353
+      goodKindList:[]
353 354
     };
354 355
   },
355 356
   methods: {
357
+    getGoodKandName(id){
358
+     
359
+     var name = ""
360
+     for(let i=0;i<this.goodKindList.length;i++){
361
+      if(id == this.goodKindList[i].value){
362
+         name = this.goodKindList[i].name
363
+      }
364
+     }
365
+     return name
366
+   },
356 367
     changeOrderWayList(){
357 368
       this.GetCancelStock();
358 369
       this.getGoodDetailPrintList()
@@ -572,7 +583,7 @@ export default {
572 583
           this.tableDataList = response.data.data.list
573 584
           this.manufacturerList = response.data.data.manufacturerList
574 585
           this.dealerList = response.data.data.dealerList
575
-
586
+          this.goodKindList = response.data.data.goodKindList
576 587
           this.cancelStockDate.push(objOne);
577 588
 
578 589
         }
@@ -1067,10 +1078,11 @@ export default {
1067 1078
      },
1068 1079
      exportListDetail(){
1069 1080
         console.log("hahhdhafhhahdf",this.tableDataList)
1070
-
1081
+       
1071 1082
         var obj = {index:"合计",total_price:0}
1072 1083
         var total = 0
1073 1084
         for(let i=0;i<this.tableDataList.length;i++){
1085
+          this.tableDataList[i].good_kand_name = this.getGoodKandName(this.tableDataList[i].GoodInfo.good_kind)
1074 1086
           this.tableDataList[i].index = i + 1
1075 1087
           this.tableDataList[i].good_type_name = this.typeName(this.tableDataList[i].good_type_id)
1076 1088
           this.tableDataList[i].good_name = this.typeNameOne(this.tableDataList[i].good_id)
@@ -1100,8 +1112,8 @@ export default {
1100 1112
 
1101 1113
         this.tableDataList.push(obj)
1102 1114
        import('@/vendor/Export2Excel').then(excel => {
1103
-       const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','批号','生产日期','有效日期','操作时间','制单人','进货价','出货价','使用患者','数量','总价']
1104
-       const filterVal = ['index','warehouse_out_order_number', 'good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','number','product_date_name','expiry_date_name','time','user_name','in_price','price','patient_name','out_count','total_price']
1115
+       const tHeader = ['序号','单据编号','耗材种类', '耗材类型', '耗材名称','规格型号','生产厂商','进销商','批号','生产日期','有效日期','操作时间','制单人','进货价','出货价','使用患者','数量','总价']
1116
+       const filterVal = ['index','warehouse_out_order_number','good_kand_name','good_type_name', 'good_name','specification_name','manufacturer_name','dealer_name','number','product_date_name','expiry_date_name','time','user_name','in_price','price','patient_name','out_count','total_price']
1105 1117
 
1106 1118
        const data = this.formatJson(filterVal, this.tableDataList)
1107 1119