Browse Source

新分支

28169 8 months ago
parent
commit
0f34825d84

+ 45 - 1
src/api/drug/drug.js View File

@@ -731,7 +731,7 @@ export function getSelfDrugWarehouseInfoById(id,params){
731 731
 export function ModifySelfDrugWarehouse(data,patient_id,warehousing_time,warehousing_id){
732 732
  
733 733
   return request({
734
-    url:"/api/drug/modifyselfdrugwarehouse?patient_id="+patient_id+"warehousing_time="+warehousing_time+"&warehousing_id="+warehousing_id,
734
+    url:"/api/drug/modifyselfdrugwarehouse?patient_id="+patient_id+"&warehousing_time="+warehousing_time+"&warehousing_id="+warehousing_id,
735 735
     method:"post",
736 736
     data:data,
737 737
   })
@@ -827,4 +827,48 @@ export function getSelfDrugQuery(params){
827 827
     method:"get",
828 828
     params:params
829 829
   })
830
+}
831
+
832
+export function checkSelfOutDrugQuery(params){
833
+  
834
+  return request({
835
+    url:"/api/drug/checkselfdrugoutquery",
836
+    method:"Get",
837
+    params:params
838
+  })
839
+}
840
+
841
+export function returnCheckSelfOutDrugQuery(params){
842
+  
843
+   return request({
844
+    url:"/api/drug/returncheckselfoutdrugquery",
845
+    method:"get",
846
+    params:params,
847
+   })
848
+}
849
+
850
+export function returnSelfCheckWarehouse(params){
851
+ 
852
+  return request({
853
+    url:"/api/drug/returnselfcheckwarehouse",
854
+    method:"get",
855
+    params:params,
856
+  })
857
+}
858
+
859
+export function getSelfDrugFlow(params){
860
+  return request({
861
+    url:"/api/drug/getselfdrugflow",
862
+    method:"Get",
863
+    params:params,
864
+  })
865
+}
866
+
867
+export function getSelfDrugBatchNumberList(params){
868
+ 
869
+  return request({
870
+    url:"/api/drug/getselfdrugbatchnumberlist",
871
+    method:"Get",
872
+    params:params
873
+  })
830 874
 }

+ 18 - 0
src/router/modules/selfPreparedMedicine.js View File

@@ -74,6 +74,24 @@ export default {
74 74
       hidden: true,
75 75
       is_menu: false,
76 76
     },
77
+
78
+    {
79
+      path: '/stock/selfwarehouse/selfdrugflow',
80
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/selfDrugFlow'),
81
+      name: 'selfdrugflow',
82
+      meta: { title: '自备药流水', noCache: true },
83
+      hidden: true,
84
+      is_menu: false,
85
+    },
86
+
87
+    {
88
+      path: '/stock/selfwarehouse/selfdrugbatchnumber',
89
+      component: () => import('@/xt_pages/stock/selfPreparedMedicine/selfDrugBatchNumber'),
90
+      name: 'selfdrugflow',
91
+      meta: { title: '自备药批次', noCache: true },
92
+      hidden: true,
93
+      is_menu: false,
94
+    },
77 95
     
78 96
     {
79 97
       path: '/stock/selfPreparedMedicineIndex',

+ 12 - 9
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

@@ -400,7 +400,7 @@
400 400
                         血管通路:
401 401
                         <div
402 402
                           class="under_line"
403
-                          style="width: 200px; text-align: center"
403
+                          style="width: 280px; text-align: center"
404 404
                         >
405 405
                           {{
406 406
                             record.assessment_before_dislysis &&
@@ -408,15 +408,10 @@
408 408
                               .blood_access_part_id
409 409
                               ? record.assessment_before_dislysis
410 410
                                   .blood_access_part_id
411
-                              : 0
411
+                              :  ""
412 412
                           }}
413 413
                           {{
414
-                            record.assessment_before_dislysis &&
415
-                            record.assessment_before_dislysis
416
-                              .blood_access_part_opera_name
417
-                              ? record.assessment_before_dislysis
418
-                                  .blood_access_part_opera_name
419
-                              : ""
414
+                            bloodAccessParOperaName(record.assessment_before_dislysis.blood_access_part_opera_id)
420 415
                           }}
421 416
                         </div>
422 417
                       </div>
@@ -3014,7 +3009,7 @@
3014 3009
                         实际超滤量:
3015 3010
                         <div
3016 3011
                           class="under_line"
3017
-                          style="width: 100px; text-align: center"
3012
+                          style="width: 80px; text-align: center"
3018 3013
                         >
3019 3014
                           {{
3020 3015
                             record.assessment_after_dislysis &&
@@ -3798,10 +3793,12 @@ export default {
3798 3793
     };
3799 3794
   },
3800 3795
   created() {
3796
+   
3801 3797
     var bloodAccessParOpera = getDataConfig(
3802 3798
       "hemodialysis",
3803 3799
       "vascular_access_desc"
3804 3800
     );
3801
+    this.bloodAccessParOpera = bloodAccessParOpera
3805 3802
     this.way_arr = getDataConfig("hemodialysis", "way");
3806 3803
     this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
3807 3804
     this.appetite_arr = getDataConfig("hemodialysis", "appetite");
@@ -4427,6 +4424,12 @@ export default {
4427 4424
       }
4428 4425
       return displace_liqui_part_name;
4429 4426
     },
4427
+    bloodAccessParOperaName(id) {
4428
+      if (id in this.bloodAccessParOpera) {
4429
+        return this.bloodAccessParOpera[id].name;
4430
+      }
4431
+      return "";
4432
+    },
4430 4433
   },
4431 4434
 };
4432 4435
 </script>

+ 14 - 7
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -13,8 +13,9 @@
13 13
            
14 14
             <span style="position: absolute;left: 20%;top: 3%">
15 15
               透前称重:{{predialysis&&predialysis.weight_before?predialysis.weight_before:"" }} kg
16
-            
17 16
             </span>
17
+
18
+          
18 19
            
19 20
             <span style="position: absolute;left: 30%;top: 3%">
20 21
               干体重:{{predialysis&&predialysis.dry_weight?predialysis.dry_weight:""}}kg
@@ -23,22 +24,28 @@
23 24
               衣物重:{{predialysis&&predialysis.additional_weight?predialysis.additional_weight:""}}kg
24 25
             </span> -->
25 26
             <span style="position: absolute;left:38%;top: 3%">
26
-              上次透后体重:{{last_record&&last_record.weight_after?last_record.weight_after:""}}kg
27
+              上次透后体重:
28
+               <span v-if="this.$store.getters.xt_user.template_info.org_id!=0 && this.$store.getters.xt_user.template_info.org_id!=10702">{{last_record&&last_record.weight_after?last_record.weight_after:""}}kg</span> 
29
+               <span v-if="this.$store.getters.xt_user.template_info.org_id==0 || this.$store.getters.xt_user.template_info.org_id==10702">{{last_record&&(last_record.weight_after-last_record.additional_weight).toFixed(2)?(last_record.weight_after-last_record.additional_weight).toFixed(2):""}}kg</span> 
27 30
             </span>
28 31
 
29
-            <span style="position: absolute;left:50%;top: 3%">
32
+            <span style="position: absolute;left:51%;top: 3%">
30 33
               4小时超滤量上限(5%):
31 34
               <span v-if="predialysis!=null && ((predialysis.dry_weight)*0.05) >0 "></span> {{(predialysis.dry_weight*0.05).toFixed(2)}}
32 35
               kg
33 36
             </span>
34
-            <span style="position: absolute;left: 70%;top: 3%">
37
+            <span style="position: absolute;left: 70%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id!=0&&this.$store.getters.xt_user.template_info.org_id!=10702">
35 38
               透前血压:  {{predialysis&&predialysis.systolic_blood_pressure?predialysis.systolic_blood_pressure:""  }} / {{ predialysis&&predialysis.diastolic_blood_pressure?predialysis.diastolic_blood_pressure:"" }} mmHg
36 39
             </span>
37 40
 
38
-            <!-- <span style="position: absolute;left: 20%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id ==10702">
39
-              透前体重:{{predialysis&&(predialysis.weight_before - predialysis.additional_weight).toFixed(2)?(predialysis.weight_before-predialysis.additional_weight).toFixed(2):"" }} kg
41
+            <span style="position: absolute;left: 70%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id==0||this.$store.getters.xt_user.template_info.org_id==10702">
42
+             衣物重:{{predialysis&&predialysis.additional_weight?predialysis.additional_weight:"" }} kg
43
+            </span>
44
+
45
+            <span style="position: absolute;left: 80%;top: 3%" v-if="this.$store.getters.xt_user.template_info.org_id == 0 || this.$store.getters.xt_user.template_info.org_id ==10702">
46
+              体重增长:{{predialysis&&((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2)?((predialysis.weight_before - predialysis.additional_weight)-(last_record.weight_after-last_record.additional_weight)).toFixed(2):"" }} kg
40 47
             
41
-            </span> -->
48
+            </span>
42 49
             <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
43 50
             <el-form
44 51
                     ref="dialysisPrescription"

+ 4 - 5
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

@@ -73,11 +73,10 @@
73 73
           {{ scope.row.index }}
74 74
         </template>
75 75
       </el-table-column>
76
-<!--      <el-table-column align="center" label="处方日期">-->
77
-<!--        <template slot-scope="scope">{{-->
78
-<!--          getTime(scope.row.record_date)-->
79
-<!--        }}</template>-->
80
-<!--      </el-table-column>-->
76
+     <el-table-column align="center" label="处方日期">
77
+        <template slot-scope="scope">
78
+          {{getTime(scope.row.record_date)}}</template>
79
+      </el-table-column>
81 80
       <el-table-column align="center" label="费用编码">
82 81
         <template slot-scope="scope">
83 82
           {{ scope.row.number }}

+ 2 - 2
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

@@ -73,13 +73,13 @@
73 73
           {{ scope.$index + 1 }}
74 74
         </template>
75 75
       </el-table-column>
76
-      <el-table-column align="center" label="处方日期">
76
+      <!-- <el-table-column align="center" label="处方日期">
77 77
         <template slot-scope="scope">
78 78
           <span v-if="scope.row.record_date > 0"
79 79
             >{{ getTimes(scope.row.record_date) }}
80 80
           </span>
81 81
         </template>
82
-      </el-table-column>
82
+      </el-table-column> -->
83 83
       <el-table-column align="center" label="费用分类">
84 84
         <template slot-scope="scope">
85 85
           <span v-if="scope.row.type == 1">

+ 1 - 23
src/xt_pages/stock/selfPreparedMedicine/addWarehouseInfo.vue View File

@@ -969,29 +969,7 @@
969 969
            }
970 970
         })
971 971
       },
972
-      toReturnCheck(){
973
-         const loading = this.$loading({
974
-          lock: true,
975
-          text: "Loading",
976
-          spinner: "el-icon-loading",
977
-          background: "rgba(0, 0, 0, 0.7)",
978
-        });
979
-          var params = {
980
-            warehousing_id:this.warehousing_id,
981
-          }
982
-        toReturnCheckWarehousing(params).then(response=>{
983
-           if(response.data.state == 1){
984
-            var list = response.data.data.list
985
-             this.$message.success("反审核成功!")
986
-             this.showCheck = true
987
-             this.showReturnCheck = false
988
-             loading.close()
989
-           }else{
990
-            this.$message.error("反审核失败!")
991
-            loading.close()
992
-           }
993
-        })
994
-      },
972
+    
995 973
       changeUnit(val,index){
996 974
     
997 975
       },

+ 30 - 2
src/xt_pages/stock/selfPreparedMedicine/addWarehouseOut.vue View File

@@ -351,7 +351,7 @@
351 351
   import BreadCrumb from "../../components/bread-crumb";
352 352
   import { getDataConfig, getDictionaryDataConfig } from "@/utils/data";
353 353
   import { getAllDrugList, postSearchDrugList } from "@/api/data";
354
-    import { getallPatientList,postSearchSelfDrugList,postSelfDrugWarehouseOut,getSelfDrugBatchNumber} from "@/api/drug/drug"
354
+  import { getallPatientList,postSearchSelfDrugList,postSelfDrugWarehouseOut,getSelfDrugBatchNumber,checkSelfOutDrugQuery} from "@/api/drug/drug"
355 355
   export default {
356 356
     components: { BreadCrumb },
357 357
     name: "stockIn",
@@ -1162,7 +1162,35 @@
1162 1162
         }
1163 1163
         return total;
1164 1164
       },
1165
-    
1165
+      toCheck(){
1166
+         var params = {
1167
+            warehouse_out_id:this.warehouse_out_id,
1168
+            patient_id:this.patient_id,
1169
+         }
1170
+        checkSelfOutDrugQuery(params).then(response=>{
1171
+          if(response.data.state ==1){
1172
+            var warehousingOutInfoList = response.data.data.warehousingOutInfoList
1173
+              var msg =response.data.data.msg
1174
+              if(msg == 1){
1175
+                this.$message.success("审核成功!")
1176
+                this.showCheck = false
1177
+                this.showReturnCheck = true
1178
+                this.$router.back(-1)
1179
+              }
1180
+              if(msg == 2){
1181
+                var drug_name = response.data.data.drug_name
1182
+                var dose = response.data.data.dose
1183
+                var dose_unit = response.data.data.dose_unit
1184
+                var min_number = response.data.data.min_number
1185
+                var min_unit = response.data.data.min_unit
1186
+                var max_unit = response.data.data.max_unit
1187
+                var str = drug_name +" " +dose +dose_unit +"*" + min_number + min_unit +"/" + max_unit;
1188
+                this.$message.error(str+"库存不足,审核失败!")
1189
+              }
1190
+              loading.close()
1191
+          }
1192
+        })
1193
+      }
1166 1194
     
1167 1195
     },
1168 1196
     created() {

+ 39 - 19
src/xt_pages/stock/selfPreparedMedicine/editWarehouseInfo.vue View File

@@ -23,6 +23,14 @@
23 23
             class="filter-item"
24 24
             >审核</el-button
25 25
           >
26
+
27
+          <el-button
28
+            size="small"
29
+            type="primary"
30
+           v-if="is_check == 1 && parseInt(this.$route.query.is_sys) == 0"
31
+            @click="toReturnCheck()"
32
+            class="filter-item"
33
+            >反审核</el-button>
26 34
         </div>
27 35
       </div>
28 36
       <div class="app-container" v-loading="loading">
@@ -340,13 +348,11 @@
340 348
   import { uParseTime } from "@/utils/tools";
341 349
   import {
342 350
     GetAllDrugInfoByID,
343
-    toCheckWarehousingInfo,
344
-    toReturnCheckWarehousing,
345 351
   } from "@/api/drug/drug_stock";
346 352
   import BreadCrumb from "../../components/bread-crumb";
347 353
   import { getDataConfig, getDictionaryDataConfig } from "@/utils/data";
348 354
   import { getAllDrugList } from "@/api/data";
349
-  import { getallPatientList,postSearchSelfDrugList,ModifySelfDrugWarehouse,getSelfDrugWarehouseInfoById,deleteSelfWarehouseInfo} from "@/api/drug/drug"
355
+  import { getallPatientList,postSearchSelfDrugList,ModifySelfDrugWarehouse,getSelfDrugWarehouseInfoById,deleteSelfWarehouseInfo,toCheckSelfWarehousingInfo,returnSelfCheckWarehouse} from "@/api/drug/drug"
350 356
   export default {
351 357
     components: { BreadCrumb },
352 358
     name: "stockIn",
@@ -468,6 +474,8 @@
468 474
         showReturnCheck:false,
469 475
         patientList:[],
470 476
         id:0,
477
+        is_check:0,
478
+        is_sys:0,
471 479
       };
472 480
     },
473 481
     methods: {
@@ -739,6 +747,9 @@
739 747
               stockIn: this.recordInfo.recordData,
740 748
             };
741 749
             console.log("params=---------------",params)
750
+            console.log("patinet_id-----------",this.patient_id)
751
+            console.log("warehousing_time-----------",this.warehousing_time)
752
+            console.log("warehousing_id--------------",this.warehousing_id)
742 753
             ModifySelfDrugWarehouse(
743 754
               params,
744 755
               this.patient_id,
@@ -752,6 +763,8 @@
752 763
               } else {
753 764
                 this.loading = false;
754 765
                 this.$message.success("保存成功");
766
+                this.showCheck = true
767
+                this.showReturnCheck = false
755 768
                 this.listLoading = false;
756 769
                 var list = response.data.data.list
757 770
                 var manufacturerList = response.data.data.manufacturerList
@@ -795,8 +808,7 @@
795 808
                 this.recordInfo.recordData = []
796 809
                 console.log("list========================",list)
797 810
                 this.recordInfo.recordData = list
798
-                this.showCheck = true
799
-                this.showReturnCheck = false
811
+               
800 812
               }
801 813
             });
802 814
           } else {
@@ -929,8 +941,10 @@
929 941
         });
930 942
          var params = {
931 943
            warehousing_id:this.warehousing_id,
944
+           patient_id:this.patient_id
932 945
          }
933
-        toCheckWarehousingInfo(params).then(response=>{
946
+         console.log("praams------",params)
947
+        toCheckSelfWarehousingInfo(params).then(response=>{
934 948
            if(response.data.state == 1){
935 949
              var list = response.data.data.list
936 950
              this.$message.success("审核成功!")
@@ -953,8 +967,9 @@
953 967
         });
954 968
           var params = {
955 969
             warehousing_id:this.warehousing_id,
970
+            patient_id:this.patient_id,
956 971
           }
957
-        toReturnCheckWarehousing(params).then(response=>{
972
+        returnSelfCheckWarehouse(params).then(response=>{
958 973
            if(response.data.state == 1){
959 974
             var list = response.data.data.list
960 975
              this.$message.success("反审核成功!")
@@ -967,18 +982,21 @@
967 982
            }
968 983
         })
969 984
       },
970
-      changeUnit(val,index){
971
-    
972
-      },
973
-       
974
-
975 985
       //新
976 986
       getSelfDrugWarehouseInfoById(id){
977 987
         getSelfDrugWarehouseInfoById(id).then(response=>{
978 988
            if(response.data.state == 1){
979 989
              var info = response.data.data.info
990
+             if(info.is_check == 2){
991
+               this.showCheck = true
992
+               this.showReturnCheck = false
993
+             }
994
+             if(info.is_check == 1){
995
+                this.showCheck = false
996
+                this.showReturnCheck = true
997
+             }
980 998
              this.patient_id = info.patient_id
981
-             this.warehousing_time  =this.getTime(info.record_date)
999
+             this.warehousing_time  =this.getTimeOne(info.record_date)
982 1000
              this.manufacturerList = response.data.data.manufacturerList
983 1001
              this.dealerList = response.data.data.dealerList
984 1002
              this.drugTypeList = response.data.data.drugTypeList
@@ -990,9 +1008,9 @@
990 1008
              tempObj["drug_name"] = info.drug.drug_name;
991 1009
              tempObj["max_unit"] = info.max_unit;
992 1010
              tempObj["min_unit"] = info.min_unit,
993
-             tempObj["product_date"] = this.getTime(info.product_date);
994
-             tempObj["expiry_date"] = this.getTime(info.expiry_date);
995
-             tempObj["warehousing_count"] = info.warehousing_count;
1011
+             tempObj["product_date"] = this.getTimeOne(info.product_date);
1012
+             tempObj["expiry_date"] = this.getTimeOne(info.expiry_date);
1013
+             tempObj["warehousing_count"] = info.warehousing_count.toString();
996 1014
              tempObj["remark"] = info.remark;
997 1015
              tempObj["dealer"] =this.getDealer(info.dealer) 
998 1016
              tempObj["manufacturer"] = this.getManufacturer(info.manufacturer);
@@ -1033,14 +1051,16 @@
1033 1051
             }
1034 1052
             return name
1035 1053
       },
1054
+      
1036 1055
     },
1037 1056
     created() {
1038 1057
       var id =  this.$route.query.id
1039 1058
       var is_sys = this.$route.query.is_sys
1059
+      this.is_sys = is_sys
1060
+      console.log("is_check-=------------------------------------",is_sys)
1040 1061
       var is_check = this.$route.query.is_check
1041
-      console.log("id",id)
1042
-      console.log("is_sys",is_sys)
1043
-      console.log("is_check",is_check)
1062
+      console.log("is_check-=------------------------------------",is_check)
1063
+      this.is_check= is_check
1044 1064
       this.drugTypeList = getDictionaryDataConfig("system", "drug_type");
1045 1065
       this.getallPatientList() 
1046 1066
       this.getSelfDrugWarehouseInfoById(id)

+ 60 - 2
src/xt_pages/stock/selfPreparedMedicine/editWarehouseOut.vue View File

@@ -23,6 +23,15 @@
23 23
             class="filter-item"
24 24
             >审核</el-button
25 25
           >
26
+
27
+          <el-button
28
+          size="small"
29
+          type="primary"
30
+          v-if="is_check == 1 && parseInt(this.$route.query.is_sys) == 0"
31
+          @click="toReturnCheck"
32
+          class="filter-item"
33
+          >反 审 核</el-button
34
+        >
26 35
        
27 36
         </div>
28 37
       </div>
@@ -346,12 +355,11 @@
346 355
   import {
347 356
     GetAllConfig,
348 357
     GetAllDrugInfoByID,
349
-    postDrugWarehouse,
350 358
   } from "@/api/drug/drug_stock";
351 359
   import BreadCrumb from "../../components/bread-crumb";
352 360
   import { getDataConfig, getDictionaryDataConfig } from "@/utils/data";
353 361
   import { getAllDrugList, postSearchDrugList } from "@/api/data";
354
-    import { getallPatientList,postSearchSelfDrugList,modifySelfDrugWarehouseOut,getSelfDrugBatchNumber,getSelfDrugWarehouseOutById} from "@/api/drug/drug"
362
+  import { getallPatientList,postSearchSelfDrugList,modifySelfDrugWarehouseOut,getSelfDrugBatchNumber,getSelfDrugWarehouseOutById,checkSelfOutDrugQuery,returnCheckSelfOutDrugQuery} from "@/api/drug/drug"
355 363
   export default {
356 364
     components: { BreadCrumb },
357 365
     name: "stockIn",
@@ -1237,6 +1245,56 @@
1237 1245
             }
1238 1246
             return name
1239 1247
       },
1248
+
1249
+      toCheck(){
1250
+         var params = {
1251
+            warehouse_out_id:this.warehouse_out_id,
1252
+            patient_id:this.patient_id,
1253
+         }
1254
+        checkSelfOutDrugQuery(params).then(response=>{
1255
+          if(response.data.state ==1){
1256
+            var warehousingOutInfoList = response.data.data.warehousingOutInfoList
1257
+              var msg =response.data.data.msg
1258
+              if(msg == 1){
1259
+                this.$message.success("审核成功!")
1260
+                this.showCheck = false
1261
+                this.showReturnCheck = true
1262
+                this.$router.back(-1)
1263
+              }
1264
+              if(msg == 2){
1265
+                var drug_name = response.data.data.drug_name
1266
+                var dose = response.data.data.dose
1267
+                var dose_unit = response.data.data.dose_unit
1268
+                var min_number = response.data.data.min_number
1269
+                var min_unit = response.data.data.min_unit
1270
+                var max_unit = response.data.data.max_unit
1271
+                var str = drug_name +" " +dose +dose_unit +"*" + min_number + min_unit +"/" + max_unit;
1272
+                this.$message.error(str+"库存不足,审核失败!")
1273
+              }
1274
+              loading.close()
1275
+          }
1276
+        })
1277
+      },
1278
+      toReturnCheck(){
1279
+         var params = {
1280
+           warehouse_out_id:this.warehouse_out_id,
1281
+           patient_id:this.patient_id,
1282
+         }
1283
+        returnCheckSelfOutDrugQuery(params).then(response=>{
1284
+           if(response.data.state ==1){
1285
+            var out = response.data.data.out
1286
+            this.$message.success("反审核成功!")
1287
+            this.showCheck = true
1288
+            this.showReturnCheck = false
1289
+            loading.close()
1290
+            this.$router.back(-1)
1291
+           }else{
1292
+            this.$message.error(response.data.msg)
1293
+            loading.close()
1294
+            this.$router.back(-1);
1295
+           }
1296
+        })
1297
+      }
1240 1298
     
1241 1299
     
1242 1300
     },

+ 23 - 57
src/xt_pages/stock/selfPreparedMedicine/warehouseInfo.vue View File

@@ -37,7 +37,7 @@
37 37
           style="width: 200px"
38 38
           v-model.trim="searchKey"
39 39
           class="filter-item"
40
-          placeholder="单据编码/制单人/药品名称"
40
+          placeholder="药品名称"
41 41
         />
42 42
         <el-button
43 43
           size="small"
@@ -191,6 +191,7 @@
191 191
 
192 192
         <el-table-column label="生产厂家" align="center">
193 193
           <template slot-scope="scope">
194
+           
194 195
             {{ getManufacturer(scope.row.manufacturer) }}
195 196
           </template>
196 197
         </el-table-column>
@@ -207,6 +208,13 @@
207 208
           </template>
208 209
         </el-table-column>
209 210
 
211
+        <el-table-column label="审核状态" align="center">
212
+          <template slot-scope="scope">
213
+             <span v-if="scope.row.is_check ==1">已审核</span>
214
+             <span v-if="scope.row.is_check ==2">未审核</span>
215
+          </template>
216
+        </el-table-column>
217
+
210 218
         <el-table-column label="备注" align="center">
211 219
           <template slot-scope="scope">
212 220
              {{ scope.row.remark }}
@@ -274,7 +282,6 @@ import {
274 282
   exportDrugList,
275 283
 
276 284
 } from "@/api/drug/drug_stock";
277
-import { getAllDrugList } from "@/api/data";
278 285
 import { getDictionaryDataConfig } from "@/utils/data";
279 286
 import BreadCrumb from "../../components/bread-crumb";
280 287
   import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouseInfo} from "@/api/drug/drug"
@@ -368,7 +375,6 @@ export default {
368 375
       patient_id:0,
369 376
       patientList:[],
370 377
       tableList:[],
371
-      manufacturerList:[],
372 378
       dealerList:[],
373 379
       drugTypeList:[],
374 380
     };
@@ -384,9 +390,9 @@ export default {
384 390
         getAllSelfDrugWarehouseInfoList(params).then(response=>{
385 391
           if(response.data.state ==1){
386 392
             var infoList  =  response.data.data.infoList
387
-            console.log("infolist22222222222222",infoList)
388 393
             this.tableList = infoList
389 394
             this.manufacturerList = response.data.data.manufacturerList
395
+            console.log("infolist22222222222222",this.manufacturerList)
390 396
             this.dealerList = response.data.data.dealerList
391 397
             this.drugTypeList = response.data.data.drugTypeList
392 398
 
@@ -517,39 +523,18 @@ export default {
517 523
     },
518 524
     handleSearch(id) {
519 525
       this.WarehouseInfo.warehouseInfoDate = [];
520
-      this.GetOrderDetail(id);
521 526
       this.dialogVisible = true;
522 527
     },
523
-    GetOrderDetail(order_id) {
524
-      const params = {
525
-        id: order_id,
526
-      };
527
-
528
-      this.WarehouseInfo.warehouseInfoDate = [];
529
-      getDrugWarehouseInfoList(params).then((response) => {
530
-        if (response.data.state == 0) {
531
-          this.$message.error(response.data.msg);
532
-          return false;
533
-        } else {
534
-          var obj = {total_count:0,is_total:1}
535
-          for (let i = 0; i < response.data.data.info.length; i++) {
536
-            response.data.data.info[i].is_total = 0
537
-            this.showOne = true;
538
-            this.WarehouseInfo.warehouseInfoDate.push(
539
-              response.data.data.info[i]
540
-            );
541
-            obj.total_count += (response.data.data.info[i].warehousing_count *response.data.data.info[i].price)
542
-          }
543
-          this.WarehouseInfo.warehouseInfoDate.push(obj)
544
-        
545
-          this.WarehouseInfo.warehouse = response.data.data.warehousing;
546
-          this.getAllDrugList();
547
-        }
548
-      });
549
-    },
550 528
     handleDelete: function (index, row) {
551
-
552
-        this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
529
+        if(row.is_check ==1){
530
+          this.$message.error("该药品已经审核,不能删除!")
531
+          return false
532
+        }
533
+        if(row.is_sys ==1){
534
+          this.$message.error("该药瓶自动入库,不能删除!")
535
+          return false
536
+        }
537
+        this.$confirm('确定删除吗?', '提示', {
553 538
           confirmButtonText: '确定',
554 539
           cancelButtonText: '取消',
555 540
           type: 'warning'
@@ -650,7 +635,7 @@ export default {
650 635
         .catch(() => {});
651 636
     },
652 637
     handleCurrentChangeOne(val) {
653
-      this.GetOrderDetail(val.id);
638
+     
654 639
     },
655 640
     getTime(val) {
656 641
       if (val < 0) {
@@ -671,18 +656,12 @@ export default {
671 656
       }
672 657
       return name;
673 658
     },
674
-    getAllDrugList() {
675
-      getAllDrugList().then((response) => {
676
-        if (response.data.state == 1) {
677
-          var manufacturerList = response.data.data.manufacturerList;
678
-          this.manufacturerList = manufacturerList;
679
-          this.dealerList = response.data.data.dealerList;
680
-        }
681
-      });
682
-    },
659
+    
683 660
     getManufacturer(id) {
684 661
       var name = "";
662
+      console.log("manufacturerList-=------",this.manufacturerList)
685 663
       for (let i = 0; i < this.manufacturerList.length; i++) {
664
+
686 665
         if (id == this.manufacturerList[i].id) {
687 666
           name = this.manufacturerList[i].manufacturer_name;
688 667
         }
@@ -734,9 +713,6 @@ export default {
734 713
       });
735 714
     },
736 715
 
737
-    lili(){
738
-      console.log("exportList",this.exportList)
739
-    },
740 716
     toExport() {
741 717
       if (this.order_id == "") {
742 718
         this.$message.error("请勾选入库单");
@@ -853,7 +829,6 @@ export default {
853 829
         getallPatientList().then(response=>{
854 830
           if(response.data.state ==1){
855 831
             var patient = response.data.data.patient
856
-            console.log("patient====",patient)
857 832
             this.patientList = []
858 833
             var obj = {id:0,name:"全部"}
859 834
             this.patientList.push(obj)
@@ -872,15 +847,6 @@ export default {
872 847
         }
873 848
         return name
874 849
       },
875
-      getManufacturer(id){
876
-         var manufacturer_name = ""
877
-         for(let i=0;i<this.manufacturerList.length;i++){
878
-           if(id == this.manufacturerList[i].id){
879
-            manufacturer_name = this.manufacturerList[i].manufacturer_name
880
-           }
881
-         }
882
-         return
883
-      },
884 850
       getDealerName(id){
885 851
         var dealer_name = ""
886 852
         for(let i=0;i<this.dealerList.length;i++){

+ 13 - 13
src/xt_permission.js View File

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //   store.dispatch('VerifyConfigList', []).then(() => {
17
-  //     next()
18
-  //   })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //     next()
23
-  //   })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))