XMLWAN 3 years ago
parent
commit
f54361468c
2 changed files with 38 additions and 32 deletions
  1. 17 17
      src/xt_pages/data/components/consumables.vue
  2. 21 15
      src/xt_pages/data/components/drugs.vue

+ 17 - 17
src/xt_pages/data/components/consumables.vue View File

@@ -810,7 +810,7 @@
810 810
         })
811 811
       },
812 812
       goodInfoDialogComfirm: function(val) {
813
-        
813
+
814 814
         if (val.isCreated == 2) {
815 815
           //修改
816 816
           val['id'] = this.goodInfo.editGoodId;
@@ -958,11 +958,11 @@
958 958
             this.$message.error(response.data.msg);
959 959
             return false
960 960
           } else {
961
-           
961
+
962 962
             for(let i=0;i<response.data.data.goodType.length;i++){
963 963
               this.goodTypeList.push(response.data.data.goodType[i])
964 964
             }
965
- 
965
+
966 966
             for (let i = 0; i < response.data.data.goodType.length; i++) {
967 967
               if (response.data.data.goodType[i].type == 1) {
968 968
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
@@ -1498,7 +1498,7 @@
1498 1498
        getInitializtion().then(response=>{
1499 1499
          if(response.data.state == 1){
1500 1500
            var goodKindList = response.data.data.goodKindList;
1501
-           
1501
+
1502 1502
            this.goodKindList = goodKindList
1503 1503
            var medicalInsuranceLevelList =  response.data.data.medicalInsuranceLevelList
1504 1504
            console.log("医保等级",medicalInsuranceLevelList)
@@ -1509,16 +1509,16 @@
1509 1509
       exportList(){
1510 1510
         import('@/vendor/Export2Excel').then(excel => {
1511 1511
          console.log("this.table",this.goodInfo.goodInfoData)
1512
-         
1512
+
1513 1513
          for(let i=0;i<this.goodInfo.goodInfoData.length;i++){
1514 1514
            for(let j=0;j<this.goodKindList.length;j++){
1515 1515
               if(this.goodInfo.goodInfoData[i].good_kind == this.goodKindList[j].value){
1516
-                 this.goodInfo.goodInfoData[i].good_kind_name = this.goodKindList[i].name
1516
+                 this.goodInfo.goodInfoData[i].good_kind_name = this.goodKindList[j].name
1517 1517
               }
1518 1518
            }
1519
-           for(let z=0;z<this.goodInfo.goodInfoDialog.formValue.goodType;z++){
1520
-              if(this.goodInfo.goodInfoDialog.formValue[z].id == this.goodInfo.goodInfoData[i].good_type_id){
1521
-                 this.goodInfo.goodInfoData[i].good_type_name = this.goodInfo.goodInfoDialog.formValue[z].name
1519
+           for(let z=0;z<this.goodInfo.goodInfoDialog.formValue.goodType.length;z++){
1520
+              if(this.goodInfo.goodInfoDialog.formValue.goodType[z].id == this.goodInfo.goodInfoData[i].good_type_id){
1521
+                 this.goodInfo.goodInfoData[i].good_type_name = this.goodInfo.goodInfoDialog.formValue.goodType[z].type_name
1522 1522
               }
1523 1523
            }
1524 1524
 
@@ -1533,26 +1533,26 @@
1533 1533
                 this.goodInfo.goodInfoData[i].manufacturer_name =  this.manufacturers[s].manufacturer_name
1534 1534
              }
1535 1535
            }
1536
-          
1536
+
1537 1537
           for(let a=0;a<this.dealers.length;a++){
1538 1538
              if(this.dealers[a].id == this.goodInfo.goodInfoData[i].dealer){
1539
-                 this.goodInfo.goodInfoData[i].dealer_name = this.dealers[a].dealer_name 
1540
-             } 
1539
+                 this.goodInfo.goodInfoData[i].dealer_name = this.dealers[a].dealer_name
1540
+             }
1541 1541
           }
1542 1542
          }
1543
-        
1543
+
1544 1544
          const tHeader = ['耗材名称','耗材种类','耗材类型','医保等级','规格型号','生产厂商','单位','零价','库存警戒','经销商','最新进价','医保编码','社保目录编码']
1545
-         const filterVal = ['good_name', 'good_kind_name','good_type_name','medical_insurance_level_name','specification_name','manufacturer_name','packing_unit','packing_price','stock_warn_count','dealer_name','buy_price','medical_insurance_number','social_security_directory_code'] 
1546
-         
1545
+         const filterVal = ['good_name', 'good_kind_name','good_type_name','medical_insurance_level_name','specification_name','manufacturer_name','packing_unit','packing_price','stock_warn_count','dealer_name','buy_price','medical_insurance_number','social_security_directory_code']
1546
+
1547 1547
          const data = this.formatJson(filterVal,this.goodInfo.goodInfoData)
1548
-     
1548
+
1549 1549
          excel.export_json_to_excel({
1550 1550
            header: tHeader,
1551 1551
            data,
1552 1552
            filename: '耗材信息'
1553 1553
          })
1554 1554
           this.downloadLoading = false
1555
-    
1555
+
1556 1556
         })
1557 1557
        },
1558 1558
        formatJson(filterVal, jsonData) {

+ 21 - 15
src/xt_pages/data/components/drugs.vue View File

@@ -97,7 +97,7 @@
97 97
           </div>
98 98
         </template>
99 99
       </el-table-column>
100
-  
100
+
101 101
       <el-table-column prop="date" label="进货价" width="100" align="center">
102 102
         <template slot-scope="scope">
103 103
           <div>{{scope.row.last_price}}</div>
@@ -699,7 +699,7 @@
699 699
                  this.formValue.drug_classify = ""
700 700
               }
701 701
 
702
-              
702
+
703 703
 
704 704
               this.$refs.addDrugs.show(id, this.formValue)
705 705
 
@@ -964,7 +964,7 @@
964 964
            console.log("isHasMinUnit",isHasMinUnit)
965 965
           var isHasPackingUnit = header.includes('*包装单位')
966 966
           console.log("isHasPackingUnit",isHasPackingUnit)
967
-        
967
+
968 968
           var isHasDrugType =  header.includes('*药品类型');
969 969
           console.log("isHasDrugType",isHasDrugType)
970 970
           var isHasDrugStockLimit =  header.includes('*库存警戒');
@@ -973,14 +973,14 @@
973 973
           console.log("isHasDrugOriginPlace",isHasDrugOriginPlace)
974 974
           var isHasDrugDosageForm = header.includes('*药品剂型');
975 975
           console.log("isHasDrugDosageForm",isHasDrugDosageForm)
976
-         
976
+
977 977
           var isHasRetailPrice = header.includes('*拆零零售价');
978 978
           console.log("isHasRetailPrice",isHasRetailPrice)
979 979
           var isHasPackingPrice= header.includes('*包装零售价');
980 980
           console.log("isHasLastPrice",isHasPackingPrice)
981 981
           var isHasLastPrice = header.includes('*进货价');
982 982
           console.log("进货价",isHasLastPrice)
983
-          
983
+
984 984
           var isHasDrugClassifye = header.includes('*药物分类');
985 985
          console.log("isHasDrugClassifye",isHasDrugClassifye)
986 986
          var isHasManufacturer = header.includes('*生产厂商');
@@ -991,7 +991,7 @@
991 991
          console.log("isDrugDoseUnit",isDrugDoseUnit)
992 992
           if (!(isHasDrugName  && isHasDosage && isHasMaxUnit && isHasUnval && isHasMinUnit && isHasPackingUnit && isHasDrugType &&  isHasDrugStockLimit && isHasDrugOriginPlace &&
993 993
           isHasDrugDosageForm &&  isHasRetailPrice && isHasPackingPrice && isHasLastPrice && isHasDrugClassifye && isHasManufacturer && isHasDrugDose && isDrugDoseUnit)) {
994
-           
994
+
995 995
             this.dialogVisible = true;
996 996
             return
997 997
           }
@@ -1031,7 +1031,7 @@
1031 1031
            }
1032 1032
 
1033 1033
 
1034
-  
1034
+
1035 1035
           if (results[i]['*拆零'] === undefined) {
1036 1036
                 obj['min_number'] = ''
1037 1037
               } else {
@@ -1409,7 +1409,7 @@
1409 1409
           'drugs':tableData
1410 1410
         };
1411 1411
         console.log("params222222222",params)
1412
-        
1412
+
1413 1413
         postDrugInformation(params).then(response=>{
1414 1414
            if(response.data.state == 1){
1415 1415
              var msg =  response.data.data.msg;
@@ -1479,15 +1479,15 @@
1479 1479
 
1480 1480
       exportList(){
1481 1481
          import('@/vendor/Export2Excel').then(excel => {
1482
-         
1483
-        
1482
+
1483
+
1484 1484
          console.log("this.table",this.list)
1485 1485
 
1486 1486
          for(let i=0;i<this.list.length;i++){
1487 1487
           for(let j=0;j<this.drugCategoryList.length;j++){
1488 1488
               if(this.list[i].drug_category == this.drugCategoryList[j].value){
1489 1489
                  this.list[i].drug_category_name = this.drugCategoryList[j].name
1490
-              }  
1490
+              }
1491 1491
           }
1492 1492
            for(let z=0;z<this.drugDosageFormList.length;z++){
1493 1493
               if(this.list[i].drug_dosage_form == this.drugDosageFormList[z].value){
@@ -1509,21 +1509,27 @@
1509 1509
                this.list[i].dealer_name = this.dealer[s].dealer_name
1510 1510
              }
1511 1511
            }
1512
+           for(let b=0;b<this.getDataConfig('hemodialysis','units').length;b++){
1513
+             if(this.list[i].drug_dose_unit == this.getDataConfig('hemodialysis','units')[b].id){
1514
+               this.list[i].drug_dose_unit_name = this.getDataConfig('hemodialysis','units')[b].name
1515
+
1516
+             }
1517
+           }
1512 1518
           this.list[i].specification_name = this.list[i].dose + this.list[i].dose_unit + this.list[i].min_number + this.list[i].min_unit + "/"+this.list[i].max_unit
1513 1519
          }
1514 1520
 
1515 1521
          const tHeader = ['药品名称','药品规格','剂量','剂量单位','拆零','拆零单位','包装单位','药品类型','库存警戒','产地','药品剂型','拆零零售价','包装零售价','进货价','药物分类','默认单次用量','默认单次用量单位','生产厂商','经销商','医保编码','社保目录编码']
1516
-         const filterVal = ['drug_name', 'specification_name','dose','dose_unit','min_number','min_unit','max_unit','drug_category_name','drug_stock_limit','drug_origin_place','drug_dosage_form_name','min_price','retail_price','last_price','drug_classify_name','drug_dose','drug_dose_unit','manufacturer_name','dealer_name','medical_insurance_number','social_security_directory_code'] 
1517
-         
1522
+         const filterVal = ['drug_name', 'specification_name','dose','dose_unit','min_number','min_unit','max_unit','drug_category_name','drug_stock_limit','drug_origin_place','drug_dosage_form_name','min_price','retail_price','last_price','drug_classify_name','drug_dose','drug_dose_unit','manufacturer_name','dealer_name','medical_insurance_number','social_security_directory_code']
1523
+
1518 1524
          const data = this.formatJson(filterVal,this.list)
1519
-     
1525
+
1520 1526
          excel.export_json_to_excel({
1521 1527
            header: tHeader,
1522 1528
            data,
1523 1529
            filename: '药品信息'
1524 1530
          })
1525 1531
           this.downloadLoading = false
1526
-    
1532
+
1527 1533
         })
1528 1534
        },
1529 1535
        formatJson(filterVal, jsonData) {