Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 8 months ago
parent
commit
dbc2e5290d

+ 54 - 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,57 @@ 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
+  })
874
+}
875
+
876
+export function getAllSelfDrugWarehouse(params){
877
+  
878
+  return request({
879
+    url:"/api/drug/getallselfdrugwarehouse",
880
+    method:"get",
881
+    params:params,
882
+  })
830 883
 }

+ 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"

+ 3 - 3
src/xt_pages/outpatientCharges/summary.vue View File

@@ -145,7 +145,7 @@
145 145
           <!--          </el-button-->
146 146
           <!--          >-->
147 147
 
148
-          <el-button size="small" type="primary" @click="export_detail_three" v-if="$store.getters.xt_user.org_id == 10265">报表下载12</el-button>
148
+          <el-button size="small" type="primary" @click="export_detail_three" v-if="$store.getters.xt_user.org_id == 10265 || $store.getters.xt_user.org_id == 0">报表下载12</el-button>
149 149
           <el-button size="small" type="primary" @click="accounts_click()">门诊结账</el-button>
150 150
           <!-- <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
151 151
           <!-- <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
@@ -626,7 +626,7 @@
626 626
                   <td>{{item.number}}</td>
627 627
                   <td>{{item.certno}}</td>
628 628
                   <td>{{item.psn_name}}</td>
629
-                  <td>{{item.age}}</td>
629
+                  <td>{{item.patient.age}}</td>
630 630
                   <td v-if="item.gend == 1">男</td>
631 631
                   <td v-if="item.gend != 1">女</td>
632 632
                   <td>{{item.medfee_sumamt}}</td>
@@ -1658,7 +1658,7 @@ export default {
1658 1658
       let params = {
1659 1659
         start_time: this.start_time,
1660 1660
         end_time: this.end_time,
1661
-        org_id: this.$store.getters.xt_user.org_id,
1661
+        org_id: 10265,
1662 1662
       }
1663 1663
       getHisDataThree(params).then((response) => {
1664 1664
         if (response.data.state == 0) {

+ 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">

+ 2 - 24
src/xt_pages/stock/selfPreparedMedicine/addWarehouseInfo.vue View File

@@ -760,7 +760,7 @@
760 760
             const params = {
761 761
               stockIn: this.recordInfo.recordData,
762 762
             };
763
-            console.log("params=---------------",params)
763
+          
764 764
             postSelfDrugWarehouse(
765 765
               params,
766 766
               this.patient_id,
@@ -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
     },

+ 448 - 0
src/xt_pages/stock/selfPreparedMedicine/newDrugQuery.vue View File

@@ -0,0 +1,448 @@
1
+<template>
2
+    <div class="main-contain">
3
+       <div class="app-container" style="padding-left:0px;margin: 0px;"
4
+          v-loading="loading"
5
+          element-loading-text="拼命加载中">
6
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入药品名称" ></el-input>
7
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
8
+             <el-table
9
+              :row-style="{ color: '#303133' }"
10
+              :header-cell-style="{
11
+                backgroundColor: 'rgb(245, 247, 250)',
12
+                color: '#606266'
13
+              }"
14
+              :data="tableList"
15
+              :class="signAndWeighBoxPatients"
16
+              border
17
+             :cell-class-name="cellStyle"
18
+            >
19
+            <el-table-column label="药品名称" align="center">
20
+                <template slot-scope="scope">
21
+                  {{ scope.row.drug.drug_name }}
22
+                </template>
23
+              </el-table-column>
24
+              <el-table-column label="规格&单位" align="center">
25
+                <template slot-scope="scope">
26
+                  {{ scope.row.drug.dose}}{{ scope.row.drug.dose_unit }} * {{ scope.row.drug.min_number }}{{ scope.row.drug.min_unit }} /{{ scope.row.drug.max_unit }}
27
+                </template>
28
+              </el-table-column>
29
+              <el-table-column label="生产厂家" align="center">
30
+                <template slot-scope="scope">
31
+                   {{ getManufacturName(scope.row.drug.manufacturer) }}
32
+                </template>
33
+              </el-table-column>
34
+      
35
+              <el-table-column label="入库数量" align="center">
36
+                <template slot-scope="scope">
37
+                  {{scope.row.sum_in_count}} {{scope.row.drug.min_unit }}
38
+                 </template>
39
+              </el-table-column>
40
+            
41
+              <el-table-column label="出库数量" align="center">
42
+                <template slot-scope="scope">
43
+                  {{scope.row.sum_act_out_count}} {{scope.row.drug.min_unit }}
44
+               </template>
45
+              </el-table-column>
46
+  
47
+              <el-table-column label="退库数量" align="center">
48
+                <template slot-scope="scope">
49
+                    {{scope.row.sum_cancel_count}} {{scope.row.drug.min_unit }}
50
+                </template>
51
+              </el-table-column>
52
+  
53
+               <el-table-column label="实际出库" align="center">
54
+                <template slot-scope="scope">
55
+                  <span>
56
+                    {{scope.row.sum_out_count}} {{scope.row.drug.min_unit }}
57
+                 </span>
58
+               </template>
59
+              </el-table-column>
60
+  
61
+              <el-table-column label="剩余库存" align="center">
62
+                <template slot-scope="scope">
63
+                  <span>
64
+                    {{ scope.row.flush_count }} {{scope.row.drug.min_unit }}
65
+                  </span>
66
+                </template>
67
+              </el-table-column>
68
+  
69
+          
70
+             
71
+              <el-table-column label="操作" align="center" width="200px">
72
+               
73
+                <template slot-scope="scope">
74
+                  <el-button
75
+                    size="small"
76
+                    type="primary"
77
+                    @click="toClick(scope.row)"
78
+                  >库存流水
79
+                  </el-button>
80
+                  <el-button
81
+                    size="small"
82
+                    type="primary"
83
+                    @click="toClickOne(scope.row)"
84
+                  >批次
85
+                  </el-button>
86
+  
87
+                
88
+                 </template>
89
+              </el-table-column>
90
+            </el-table>
91
+             <el-pagination
92
+              @size-change="handleSizeChange"
93
+              @current-change="handleCurrentChange"
94
+              :page-sizes="[10, 50, 100,200,300,400,500,1000]"
95
+              :page-size="10"
96
+              background
97
+              align="right"
98
+              style="margin-top:20px;"
99
+              layout="total, sizes, prev, pager, next, jumper"
100
+              :total="total"
101
+            >
102
+              </el-pagination>
103
+       </div>
104
+  
105
+  
106
+  
107
+   
108
+  
109
+  
110
+   
111
+  
112
+    </div>
113
+  </template>
114
+  <script>
115
+  import { getSelfDrugQuery,getGoodWarehouseOutInfoById,toSendGoodInfomation,getCheckGoodBatchList } from "@/api/drug/drug"
116
+  import {
117
+    getStockDrugCount
118
+  } from "@/api/stock";
119
+  import { uParseTime } from '@/utils/tools'
120
+  const moment = require('moment')
121
+  export default {
122
+  
123
+    data(){
124
+      return{
125
+       tableList:[],
126
+       goodList:[
127
+        {id:1,name:"全部耗材"},
128
+        {id:2,name:"库存预警"},
129
+        {id:3,name:"库存为零"},
130
+        {id:4,name:"库存不为零"},
131
+       ],
132
+       houseList:[],
133
+       storehouse_id:0,
134
+       good_type:1,
135
+       multipleSelection: [],
136
+       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
137
+       manufacturerList:[],
138
+       page:1,
139
+       total:0,
140
+       limit:10,
141
+       pageone:1,
142
+       totalone:0,
143
+       keyword:"",
144
+       goodTypeList:[],
145
+       start_time:"",
146
+       end_time:"",
147
+       countList:[],
148
+       outCountList:[],
149
+       autoCountList:[],
150
+       cancelCountList:[],
151
+       org_id:this.$store.getters.xt_user.org_id,
152
+       dialogVisible:false,
153
+       start_first_time:moment().startOf('month').format("YYYY-MM-DD"),
154
+       end_first_time:moment().endOf('month').format("YYYY-MM-DD"),
155
+       tableData:[],
156
+       good_id:0,
157
+       patientList:[],
158
+       good_name:"",
159
+       specification_name:"",
160
+       loading:false,
161
+       warehouseInfoByList:[],
162
+       cancelStockInfoByList:[],
163
+       warehouseOutByList:[],
164
+       flushList:[],
165
+       type_name:0,
166
+       storehouseId:0,
167
+       dealerList:[],
168
+       checkdialogVisible:false,
169
+       checkData:[],
170
+       outData:[],
171
+       total:0,
172
+       manufacturerList:[],
173
+       dealerList:[],
174
+      }
175
+    
176
+    },
177
+    methods:{
178
+    
179
+      changeGoodName(){
180
+        this.getlist()
181
+      },
182
+      toClick(val){
183
+       
184
+         var manufacturer_name = ""
185
+         var specification_name = ""
186
+         for(let i=0;i<this.manufacturerList.length;i++){
187
+            if(val.drug.manufacturer == this.manufacturerList[i].id){
188
+              manufacturer_name = this.manufacturerList[i].manufacturer_name
189
+            }
190
+         }
191
+        specification_name = val.drug.specification_name + "/" + val.drug.packing_unit
192
+       
193
+        this.$router.push({path:"/stock/selfwarehouse/selfdrugflow?drug_id="+val.drug_id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.drug.packing_unit+"&overCount="+val.flush_count})
194
+      },
195
+      toClickOne(val){
196
+        var manufacturer_name = ""
197
+         var specification_name = ""
198
+         for(let i=0;i<this.manufacturerList.length;i++){
199
+            if(val.drug.manufacturer == this.manufacturerList[i].id){
200
+              manufacturer_name = this.manufacturerList[i].manufacturer_name
201
+            }
202
+         }
203
+        specification_name = val.drug.specification_name + "/" + val.drug.packing_unit
204
+
205
+        this.$router.push({path:"/stock/selfwarehouse/selfdrugbatchnumber?drug_id="+val.drug_id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.drug.packing_unit+"&overCount="+val.flush_count})
206
+      },
207
+    
208
+      open(){
209
+       
210
+        this.getlist()
211
+      },
212
+      getlist(){
213
+          var params = {
214
+             limit:this.limit,
215
+             page:this.page,
216
+             keyword :this.keyword,
217
+          }
218
+        getSelfDrugQuery(params).then(response=>{
219
+           if(response.data.state == 1){
220
+              var list = response.data.data.list
221
+              
222
+              this.tableList =list
223
+              var total =  response.data.data.total
224
+              this.total = total
225
+              this.manufacturerList = response.data.data.manufacturerList
226
+              this.dealerList =response.data.data.dealerList
227
+              this.total = response.data.data.total
228
+              this.loading = false
229
+             
230
+             
231
+           }
232
+        })
233
+      },
234
+      getManufacturName(id){
235
+        var manufacturer_name = ""
236
+        for(let i=0;i<this.manufacturerList.length;i++){
237
+          if(id == this.manufacturerList[i].id){
238
+             manufacturer_name = this.manufacturerList[i].manufacturer_name
239
+          }
240
+        }
241
+        return manufacturer_name
242
+      },
243
+      getDearName(id){
244
+        var dear_name = ""
245
+        for(let i=0;i<this.dealerList.length;i++){
246
+          if(id == this.dealerList[i].id){
247
+            dear_name = this.dealerList[i].dealer_name
248
+          }
249
+        }
250
+        return dear_name
251
+      },
252
+      handleSizeChange(val) {
253
+        this.limit = val;
254
+        this.getlist()
255
+      },
256
+      handleCurrentChange(val) {
257
+        this.page = val;
258
+        this.getlist()
259
+      },
260
+      handleSizeChangeOne(val) {
261
+        this.limitone = val;
262
+        this.toDialogClick(this.good_id,this.good_name,this.specification_name,this.storehouseId)
263
+      },
264
+      handleCurrentChangeOne(val) {
265
+        this.pageone = val;
266
+        this.toDialogClick(this.good_id,this.good_name,this.specification_name,this.storehouseId)
267
+      },
268
+     seach(){
269
+      this.getlist()
270
+     },
271
+     startFirstTimeChange(){
272
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name,this.storehouseId)
273
+     },
274
+     endEndTimeChange(){
275
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name,this.storehouseId)
276
+     },
277
+    getTime(val) {
278
+      if(val < 0){
279
+        return ""
280
+      }
281
+     if(val == ""){
282
+       return ""
283
+     }else {
284
+      return uParseTime(val, '{y}-{m}-{d}')
285
+     }
286
+     },
287
+     getTimeOne(val) {
288
+      if(val < 0){
289
+        return ""
290
+      }
291
+     if(val == ""){
292
+       return ""
293
+     }else {
294
+      return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
295
+     }
296
+     },
297
+    getName(id){
298
+      var name = ""
299
+      for(let i=0;i<this.patientList.length;i++){
300
+        if(id == this.patientList[i].id){
301
+          name = this.patientList[i].name
302
+        }
303
+      }
304
+      return name
305
+    },
306
+
307
+     // 合并单元格样式
308
+    cellStyle({ row, column, rowIndex, columnIndex }) {
309
+      let arr = [5,6, 7, 8, 9,10,11];
310
+      if (arr.indexOf(columnIndex) > -1) {
311
+        return "spanClass";
312
+      }
313
+     },
314
+     exportList(){
315
+        import('@/vendor/Export2Excel').then(excel => {
316
+        
317
+          if(this.org_id!=0 && this.org_id!=9956){
318
+            if(this.tableList!=null && this.tableList.length > 0){
319
+            for(let i=0;i<this.tableList.length;i++){
320
+              this.tableList[i].index = i+1
321
+              this.tableList[i].type_name =  this.getGoodTypeName(this.tableList[i].good_type_id)
322
+              this.tableList[i].spec = this.tableList[i].specification_name +"/"+ this.tableList[i].packing_unit
323
+              this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
324
+              this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
325
+              this.tableList[i].stock_in_count = this.GetExportStockInCount(this.tableList[i].xt_good_stock,this.tableList[i].id)
326
+              this.tableList[i].stock_out_count =this.getExportStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
327
+              this.tableList[i].stock_cancel_count = this.getExportCancelStockInfo(this.tableList[i].xt_good_stock,this.tableList[i].id)
328
+              this.tableList[i].act_out_count  = this.getExportActStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
329
+              this.tableList[i].over_count = this.getExportOverCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
330
+              this.tableList[i].sum_count =  this.getOverCount(this.tableList[i].xt_warehouse_info) 
331
+  
332
+            }
333
+           }
334
+           
335
+  
336
+           const tHeader = ['序号','耗材类型', '耗材名称', '规格&单位','生产厂商','经销商','批准文号','国家编码','入库数量','出库数量','退库数量','实际出库','剩余库存','总库存']
337
+           const filterVal = ['index','type_name', 'good_name', 'spec','manufacturer_name','dealer_name','number','social_security_directory_code','stock_in_count','act_out_count','stock_cancel_count','stock_out_count','over_count','sum_count']
338
+          
339
+           const data = this.formatJson(filterVal, this.tableList)
340
+           
341
+           excel.export_json_to_excel({
342
+             header: tHeader,
343
+             data,
344
+             filename: '库存查询'
345
+           })
346
+            this.downloadLoading = false
347
+          }
348
+  
349
+          if(this.org_id == 0 || this.org_id == 9956){
350
+           
351
+            if(this.tableList!=null && this.tableList.length > 0){
352
+            for(let i=0;i<this.tableList.length;i++){
353
+              this.tableList[i].index = i+1
354
+              this.tableList[i].type_name =  this.getGoodTypeName(this.tableList[i].good_type_id)
355
+              this.tableList[i].spec = this.tableList[i].specification_name +"/"+ this.tableList[i].packing_unit
356
+              this.tableList[i].manufacturer_name = this.getManufacturName(this.tableList[i].manufacturer)
357
+              this.tableList[i].dealer_name = this.getDearName(this.tableList[i].dealer)
358
+              this.tableList[i].stock_in_count = this.GetExportStockInCount(this.tableList[i].xt_good_stock,this.tableList[i].id)
359
+              this.tableList[i].stock_out_count =this.getExportStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
360
+              this.tableList[i].stock_cancel_count = this.getExportCancelStockInfo(this.tableList[i].xt_good_stock,this.tableList[i].id)
361
+              this.tableList[i].act_out_count  = this.getExportActStockOutCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
362
+              this.tableList[i].over_count = this.getExportOverCount(this.tableList[i].xt_good_stock,this.tableList[i].id) 
363
+              this.tableList[i].sum_count =  this.getOverCount(this.tableList[i].xt_warehouse_info) 
364
+  
365
+            }
366
+           }
367
+           
368
+  
369
+           const tHeader = ['序号','耗材编码','耗材类型', '耗材名称', '规格&单位','生产厂商','经销商','批准文号','国家编码','入库数量','出库数量','退库数量','实际出库','剩余库存','总库存']
370
+           const filterVal = ['index','good_number','type_name', 'good_name', 'spec','manufacturer_name','dealer_name','number','social_security_directory_code','stock_in_count','act_out_count','stock_cancel_count','stock_out_count','over_count','sum_count']
371
+          
372
+           const data = this.formatJson(filterVal, this.tableList)
373
+           
374
+           excel.export_json_to_excel({
375
+             header: tHeader,
376
+             data,
377
+             filename: '库存查询'
378
+           })
379
+            this.downloadLoading = false
380
+          }
381
+     
382
+         })
383
+        },
384
+        formatJson(filterVal, jsonData) {
385
+          return jsonData.map(v => filterVal.map(j => v[j]));
386
+        },
387
+        toPrint(){
388
+          this.$router.push("/good/new/query/print?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keyword+"&storehouse_id="+this.storehouse_id+"&page="+this.page+"&limit="+this.limit+"&good_type="+this.good_type)
389
+        },
390
+    },
391
+    created(){
392
+      this.getlist()
393
+    
394
+   
395
+    }
396
+  }
397
+  </script>
398
+  
399
+  <style>
400
+  .app-container{
401
+    /* padding-left: 0;
402
+    margin-left: 0; */
403
+  }
404
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
405
+    font-size: 12px;
406
+  }
407
+  
408
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
409
+    background: #6fb5fa;
410
+  }
411
+  
412
+  .count {
413
+    color: #bd2c00;
414
+  }
415
+  
416
+  .el-table td,
417
+  .el-table th.is-leaf,
418
+  .el-table--border,
419
+  .el-table--group {
420
+    border-color: #d0d3da;
421
+  }
422
+  
423
+  .el-table--border::after,
424
+  .el-table--group::after,
425
+  .el-table::before {
426
+    background-color: #d0d3da;
427
+  }
428
+  
429
+  /* 合并表格线样式 */
430
+  .spanClass .cell {
431
+    padding: 0 !important;
432
+  }
433
+  
434
+  .spanClass .cell tr {
435
+    display: inline-block;
436
+    width: 100%;
437
+  }
438
+  
439
+  .spanClass .cell tr td {
440
+    padding: 10px 0;
441
+    border-bottom: 1px solid #ebeef5;
442
+    display: block;
443
+    width: 100%;
444
+  }
445
+  .spanClass .cell tr:last-of-type td {
446
+    border-bottom: none;
447
+  }
448
+  </style>

+ 0 - 0
src/xt_pages/stock/selfPreparedMedicine/patientDrugQuery.vue View File


+ 301 - 0
src/xt_pages/stock/selfPreparedMedicine/selfDrugBatchNumber.vue View File

@@ -0,0 +1,301 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      </div>
6
+      <div class="app-container ">
7
+        <div class="cell clearfix">
8
+         药品名称:<span>{{getName(this.$route.query.drug_id)}}</span>&nbsp;
9
+         库存: {{this.$route.query.over_plus}}
10
+         规格:<span>{{drug.dose}}{{drug.dose_unit}}*{{drug.min_number}}{{drug.min_unit}}/{{drug.max_unit}}</span>&nbsp;
11
+         厂家:<span>{{this.$route.query.manufacturer}}</span>&nbsp;
12
+        </div>
13
+        <div class="cell clearfix">
14
+          <span>日期查询:</span>
15
+          <el-date-picker
16
+              size="small"
17
+              v-model="start_time"
18
+              prefix-icon="el-icon-date"
19
+              :editable="false"
20
+              style="width: 196px;"
21
+              type="date"
22
+              placeholder="选择日期时间"
23
+              align="right"
24
+              format="yyyy-MM-dd"
25
+              value-format="yyyy-MM-dd"
26
+              @change="startTimeChange"
27
+             ></el-date-picker>-
28
+              <el-date-picker
29
+                size="small"
30
+                v-model="end_time"
31
+                prefix-icon="el-icon-date"
32
+                :editable="false"
33
+                style="width: 196px;margin-right:10px;"
34
+                type="date"
35
+                placeholder="选择日期时间"
36
+                align="right"
37
+                format="yyyy-MM-dd"
38
+                value-format="yyyy-MM-dd"
39
+                @change="endTimeChange"
40
+            ></el-date-picker>
41
+  
42
+          <span>出入库方式:</span>
43
+          <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
44
+              <el-option
45
+                v-for="(item,index) in stockType"
46
+                :key="index"
47
+                :label="item.name"
48
+                :value="item.id">
49
+              </el-option>
50
+          </el-select>
51
+          
52
+          <!-- <span>
53
+            <el-button type="primary" size="small" @click="toExprot">导出</el-button>
54
+  
55
+            <el-button type="primary" size="small" @click="toTongBu">同步</el-button>
56
+          </span> -->
57
+          
58
+        </div>
59
+        
60
+         <el-table
61
+          :data="tableList"
62
+          border
63
+          style="width: 100%">
64
+          <el-table-column prop="date" label="序号" width="180" align="center">
65
+             <template  slot-scope="scope">
66
+                {{scope.$index + 1}}
67
+             </template>
68
+          </el-table-column>
69
+          <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
70
+             <template slot-scope="scope">
71
+               <span v-if="scope.row.consumable_type == 1">手动入库</span>
72
+               <span v-if="scope.row.consumable_type == 2">手动出库</span>
73
+               <span v-if="scope.row.consumable_type == 3">自动出库</span>
74
+               <span v-if="scope.row.consumable_type == 4">手动退库</span>
75
+               <span v-if="scope.row.consumable_type == 7">自动退库</span>
76
+               <span v-if="scope.row.consumable_type == 5">报损数量</span>
77
+               <span v-if="scope.row.consumable_type == 10">盘盈</span>
78
+               <span v-if="scope.row.consumable_type == 11">盘亏</span>
79
+               <span v-if="scope.row.consumable_type == 12">调拨出库</span>
80
+               <span v-if="scope.row.consumable_type == 13">调拨入库</span>
81
+               <span v-if="scope.row.consumable_type == 15">结算出库</span>
82
+             </template>
83
+          </el-table-column>
84
+          <el-table-column prop="drug_name" label="入库单据编码" align="center">
85
+             <template slot-scope="scope">
86
+               <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
87
+                <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 12 || scope.row.consumable_type == 15">{{scope.row.warehouse_out_order_number}}</span>
88
+                <span v-if="scope.row.consumable_type == 4 || scope.row.consumable_type == 7">{{scope.row.cancel_order_number}}</span>
89
+                <span v-if="scope.row.consumable_type == 5">{{scope.row.warehouse_out_order_number}}</span>
90
+                <span v-if="scope.row.consumable_type == 10 || scope.row.consumable_type == 11 || scope.row.consumable_type == 13">{{scope.row.warehousing_order}}</span>
91
+             </template>
92
+          </el-table-column>
93
+          <el-table-column prop="drug_name" label="入库日期" align="center">
94
+             <template slot-scope="scope">
95
+               {{getTime(scope.row.ctime,"{y}-{h}-{d}")}}
96
+             </template>
97
+          </el-table-column>
98
+          <el-table-column prop="drug_name" label="操作日期" align="center">
99
+             <template slot-scope="scope">
100
+               {{getTime(scope.row.operate_time,"{y}-{h}-{d}")}}
101
+             </template>
102
+          </el-table-column>
103
+        
104
+          <el-table-column prop="drug_name" label="入库数量&单位" align="center">
105
+             <template slot-scope="scope">
106
+                <span v-if="scope.row.consumable_type != 2 &&  scope.row.consumable_type != 3 && scope.row.consumable_type != 5 && scope.row.consumable_type != 7">{{scope.row.count}}{{scope.row.max_unit}}</span>
107
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && parseInt(scope.row.count/scope.row.BaseDrugLib.min_number) >0">{{parseInt(scope.row.count/scope.row.BaseDrugLib.min_number)}}{{scope.row.BaseDrugLib.max_unit}}</span>
108
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && scope.row.count%scope.row.BaseDrugLib.min_number >0">{{scope.row.count%scope.row.BaseDrugLib.min_number}}{{scope.row.BaseDrugLib.min_unit}}</span>
109
+             </template>
110
+          </el-table-column>
111
+  
112
+       
113
+        
114
+           <el-table-column prop="drug_name" label="有效期" align="center">
115
+             <template slot-scope="scope">
116
+                {{getTime(scope.row.expire_date,"{y}-{h}-{d}")}}
117
+              
118
+             </template>
119
+          </el-table-column>
120
+         
121
+   
122
+          <el-table-column prop="drug_name" label="剩余库存" align="center">
123
+             <template slot-scope="scope">
124
+           
125
+                 {{ scope.row.over_count }} {{ drug.min_unit }}
126
+             </template>
127
+          </el-table-column>
128
+          <el-table-column prop="remark" label="备注" align="center">
129
+             <template slot-scope="scope">
130
+               <span > {{scope.row.remark}}</span>
131
+             </template>
132
+          </el-table-column>
133
+         </el-table>
134
+         
135
+        <el-pagination
136
+          @size-change="handleSizeChange"
137
+          @current-change="handleCurrentChange"
138
+          :page-sizes="[10, 50, 100,500,1000]"
139
+          :page-size="10"
140
+          background
141
+          align="right"
142
+          style="margin-top:20px;"
143
+          layout="total, sizes, prev, pager, next, jumper"
144
+          :total="total"
145
+        >
146
+        </el-pagination>
147
+      </div>
148
+  
149
+      <setting-dialog
150
+        ref="dialog"
151
+      ></setting-dialog>
152
+  
153
+    </div>
154
+  </template>
155
+
156
+  <script>
157
+
158
+  import { uParseTime } from '@/utils/tools'
159
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
160
+  import { getSelfDrugBatchNumberList }  from '@/api/drug/drug'
161
+  export default {
162
+    components: {
163
+      BreadCrumb
164
+    },
165
+    data(){
166
+      return{
167
+        crumbs: [
168
+          { path: false, name: '库存管理' },
169
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' },
170
+          { path:'/drugstock/in/drugstockflow',name:'库存流水'}
171
+        ],
172
+        keywords: '',
173
+        total: 0,
174
+        multipleSelection: [],
175
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
176
+        start_time: '',
177
+        end_time: '',
178
+        page: 1,
179
+        limit: 10,
180
+        goodType: [],
181
+        goodInfo: [],
182
+        tempArr: [],
183
+        sameRowArr: [],
184
+        WarehouseInfo: {
185
+          loading: false,
186
+          warehouseInfoDate: []
187
+        },
188
+        tableData:[],
189
+        drug_category:0,
190
+        stock_type:0,
191
+        drugCategory:[
192
+          {id:0,name:"全部"}
193
+        ],
194
+        drugTypeList:[],
195
+        tableList:[],
196
+        manufacturerList:[],
197
+        list:[],
198
+        stockType:[
199
+          {id:0,name:"全部"},
200
+          {id:1,name:"手动入库"},
201
+          {id:2,name:"手动出库"},
202
+          {id:3,name:"自动出库"},
203
+          {id:4,name:"手动退库"},
204
+          {id:10,name:"盘盈"},
205
+          {id:11,name:"盘亏"},
206
+          {id:12,name:"调拨出库"},
207
+          {id:13,name:"调拨入库"},
208
+          {id:15,name:"结算出库"}
209
+        ],
210
+        outList:[],
211
+        countList:[],
212
+        outCountList:[],
213
+        autoCountList:[],
214
+        drugOutList:[],
215
+        total:0,
216
+        houseList:[],
217
+        patientList:[],
218
+        drug:{},
219
+        patients:[]
220
+      }
221
+    },
222
+    created(){
223
+      this.getlist()
224
+    },
225
+    methods:{
226
+      startTimeChange: function(val) {
227
+      this.tableList = []
228
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
229
+      
230
+      if (time > 0) {
231
+        this.$message.error("开始时间不能大于结束时间");
232
+        this.start_time = "";
233
+      } else {
234
+         
235
+         this.getlist()
236
+     
237
+      }
238
+    },
239
+    endTimeChange: function(val) {
240
+      this.tableList = []
241
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
242
+      if (time < 0) {
243
+        this.$message.error("结束时间不能小于开始时间");
244
+        this.end_time = "";
245
+      } else {
246
+        this.getlist()
247
+      }
248
+     },
249
+     changeDrug(val){
250
+       this.tableList= []
251
+       this.stock_type = val
252
+       this.getlist()
253
+      },
254
+      handleSizeChange(val) {
255
+        this.limit = val
256
+        this.getlist()
257
+      },
258
+      handleCurrentChange(val) {
259
+        this.page = val
260
+        this.getlist()
261
+      },
262
+      getlist(){
263
+        var params = {
264
+             drug_id:this.$route.query.drug_id,
265
+             start_time:this.start_time,
266
+             end_time:this.end_time,
267
+             page:this.page,
268
+             limit:this.limit,
269
+         }
270
+        getSelfDrugBatchNumberList(params).then(response=>{
271
+           if(response.data.state ==1){
272
+              var list = response.data.data.list
273
+              this.tableList =list
274
+              var total =  response.data.data.total
275
+              this.total = total
276
+              this.drug =response.data.data.drug
277
+            
278
+           }
279
+        })
280
+      },
281
+      getName(drug_id){
282
+        var name = ""
283
+        if(drug_id == this.drug.id){
284
+           name = this.drug.drug_name
285
+        }
286
+        return name
287
+     },
288
+     getTime(val) {
289
+      if(val < 0){
290
+          return ""
291
+      }
292
+      if(val == ""){
293
+        return ""
294
+      }else {
295
+        return uParseTime(val, '{y}-{m}-{d}')
296
+      }
297
+     },
298
+    
299
+    }
300
+  }
301
+</script>

+ 313 - 0
src/xt_pages/stock/selfPreparedMedicine/selfDrugFlow.vue View File

@@ -0,0 +1,313 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      </div>
6
+      <div class="app-container ">
7
+        <div class="cell clearfix">
8
+         药品名称:<span>{{getName(this.$route.query.drug_id)}}</span>&nbsp;
9
+         库存: {{this.$route.query.over_plus}}
10
+         规格:<span>{{drug.dose}}{{drug.dose_unit}}*{{drug.min_number}}{{drug.min_unit}}/{{drug.max_unit}}</span>&nbsp;
11
+         厂家:<span>{{this.$route.query.manufacturer}}</span>&nbsp;
12
+        </div>
13
+        <div class="cell clearfix">
14
+          <span>日期查询:</span>
15
+          <el-date-picker
16
+              size="small"
17
+              v-model="start_time"
18
+              prefix-icon="el-icon-date"
19
+              :editable="false"
20
+              style="width: 196px;"
21
+              type="date"
22
+              placeholder="选择日期时间"
23
+              align="right"
24
+              format="yyyy-MM-dd"
25
+              value-format="yyyy-MM-dd"
26
+              @change="startTimeChange"
27
+             ></el-date-picker>-
28
+              <el-date-picker
29
+                size="small"
30
+                v-model="end_time"
31
+                prefix-icon="el-icon-date"
32
+                :editable="false"
33
+                style="width: 196px;margin-right:10px;"
34
+                type="date"
35
+                placeholder="选择日期时间"
36
+                align="right"
37
+                format="yyyy-MM-dd"
38
+                value-format="yyyy-MM-dd"
39
+                @change="endTimeChange"
40
+            ></el-date-picker>
41
+  
42
+          <span>出入库方式:</span>
43
+          <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
44
+              <el-option
45
+                v-for="(item,index) in stockType"
46
+                :key="index"
47
+                :label="item.name"
48
+                :value="item.id">
49
+              </el-option>
50
+          </el-select>
51
+          
52
+          <!-- <span>
53
+            <el-button type="primary" size="small" @click="toExprot">导出</el-button>
54
+  
55
+            <el-button type="primary" size="small" @click="toTongBu">同步</el-button>
56
+          </span> -->
57
+          
58
+        </div>
59
+        
60
+         <el-table
61
+          :data="tableList"
62
+          border
63
+          style="width: 100%">
64
+          <el-table-column prop="date" label="序号" width="180" align="center">
65
+             <template  slot-scope="scope">
66
+                {{scope.$index + 1}}
67
+             </template>
68
+          </el-table-column>
69
+          <el-table-column prop="drug_type" label="出入库方式" width="180" align="center">
70
+             <template slot-scope="scope">
71
+               <span v-if="scope.row.consumable_type == 1">手动入库</span>
72
+               <span v-if="scope.row.consumable_type == 2">手动出库</span>
73
+               <span v-if="scope.row.consumable_type == 3">自动出库</span>
74
+               <span v-if="scope.row.consumable_type == 4">手动退库</span>
75
+               <span v-if="scope.row.consumable_type == 7">自动退库</span>
76
+               <span v-if="scope.row.consumable_type == 5">报损数量</span>
77
+               <span v-if="scope.row.consumable_type == 10">盘盈</span>
78
+               <span v-if="scope.row.consumable_type == 11">盘亏</span>
79
+               <span v-if="scope.row.consumable_type == 12">调拨出库</span>
80
+               <span v-if="scope.row.consumable_type == 13">调拨入库</span>
81
+               <span v-if="scope.row.consumable_type == 15">结算出库</span>
82
+             </template>
83
+          </el-table-column>
84
+          <el-table-column prop="drug_name" label="出/入库单据编码" align="center">
85
+             <template slot-scope="scope">
86
+               <span v-if="scope.row.consumable_type == 1">{{scope.row.warehousing_order}}</span>
87
+                <span v-if="scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 12 || scope.row.consumable_type == 15">{{scope.row.warehouse_out_order_number}}</span>
88
+                <span v-if="scope.row.consumable_type == 4 || scope.row.consumable_type == 7">{{scope.row.cancel_order_number}}</span>
89
+                <span v-if="scope.row.consumable_type == 5">{{scope.row.warehouse_out_order_number}}</span>
90
+                <span v-if="scope.row.consumable_type == 10 || scope.row.consumable_type == 11 || scope.row.consumable_type == 13">{{scope.row.warehousing_order}}</span>
91
+             </template>
92
+          </el-table-column>
93
+          <el-table-column prop="drug_name" label="出库日期" align="center">
94
+             <template slot-scope="scope">
95
+               {{getTime(scope.row.ctime,"{y}-{h}-{d}")}}
96
+             </template>
97
+          </el-table-column>
98
+          <el-table-column prop="drug_name" label="操作日期" align="center">
99
+             <template slot-scope="scope">
100
+               {{getTime(scope.row.operate_time,"{y}-{h}-{d}")}}
101
+             </template>
102
+          </el-table-column>
103
+        
104
+          <el-table-column prop="drug_name" label="数量&单位" align="center">
105
+             <template slot-scope="scope">
106
+                <span v-if="scope.row.consumable_type != 2 &&  scope.row.consumable_type != 3 && scope.row.consumable_type != 5 && scope.row.consumable_type != 7">{{scope.row.count}}{{scope.row.max_unit}}</span>
107
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && parseInt(scope.row.count/scope.row.BaseDrugLib.min_number) >0">{{parseInt(scope.row.count/scope.row.BaseDrugLib.min_number)}}{{scope.row.BaseDrugLib.max_unit}}</span>
108
+                <span v-if="(scope.row.consumable_type == 2 || scope.row.consumable_type == 3 || scope.row.consumable_type == 5 || scope.row.consumable_type == 7) && scope.row.count%scope.row.BaseDrugLib.min_number >0">{{scope.row.count%scope.row.BaseDrugLib.min_number}}{{scope.row.BaseDrugLib.min_unit}}</span>
109
+             </template>
110
+          </el-table-column>
111
+  
112
+       
113
+        
114
+           <el-table-column prop="drug_name" label="有效期" align="center">
115
+             <template slot-scope="scope">
116
+                {{getTime(scope.row.expire_date,"{y}-{h}-{d}")}}
117
+              
118
+             </template>
119
+          </el-table-column>
120
+         
121
+          <el-table-column prop="drug_name" label="使用人" align="center">
122
+             <template slot-scope="scope">
123
+               <span > {{getPatientName(scope.row.patient_id)}}</span>
124
+             </template>
125
+          </el-table-column>
126
+          <el-table-column prop="drug_name" label="剩余库存" align="center">
127
+             <template slot-scope="scope">
128
+               <!-- <span > {{getDrugCount(scope.row.over_count,scope.row.BaseDrugLib.max_unit,scope.row.BaseDrugLib.min_unit,scope.row.BaseDrugLib.min_number)}}</span> -->
129
+                 {{ scope.row.over_count }} {{ drug.min_unit }}
130
+             </template>
131
+          </el-table-column>
132
+          <el-table-column prop="remark" label="备注" align="center">
133
+             <template slot-scope="scope">
134
+               <span > {{scope.row.remark}}</span>
135
+             </template>
136
+          </el-table-column>
137
+         </el-table>
138
+         
139
+        <el-pagination
140
+          @size-change="handleSizeChange"
141
+          @current-change="handleCurrentChange"
142
+          :page-sizes="[10, 50, 100,500,1000]"
143
+          :page-size="10"
144
+          background
145
+          align="right"
146
+          style="margin-top:20px;"
147
+          layout="total, sizes, prev, pager, next, jumper"
148
+          :total="total"
149
+        >
150
+        </el-pagination>
151
+      </div>
152
+  
153
+      <setting-dialog
154
+        ref="dialog"
155
+      ></setting-dialog>
156
+  
157
+    </div>
158
+  </template>
159
+
160
+  <script>
161
+
162
+  import { uParseTime } from '@/utils/tools'
163
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
164
+  import { getSelfDrugFlow }  from '@/api/drug/drug'
165
+  export default {
166
+    components: {
167
+      BreadCrumb
168
+    },
169
+    data(){
170
+      return{
171
+        crumbs: [
172
+          { path: false, name: '库存管理' },
173
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' },
174
+          { path:'/drugstock/in/drugstockflow',name:'库存流水'}
175
+        ],
176
+        keywords: '',
177
+        total: 0,
178
+        multipleSelection: [],
179
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
180
+        start_time: '',
181
+        end_time: '',
182
+        page: 1,
183
+        limit: 10,
184
+        goodType: [],
185
+        goodInfo: [],
186
+        tempArr: [],
187
+        sameRowArr: [],
188
+        WarehouseInfo: {
189
+          loading: false,
190
+          warehouseInfoDate: []
191
+        },
192
+        tableData:[],
193
+        drug_category:0,
194
+        stock_type:0,
195
+        drugCategory:[
196
+          {id:0,name:"全部"}
197
+        ],
198
+        drugTypeList:[],
199
+        tableList:[],
200
+        manufacturerList:[],
201
+        list:[],
202
+        stockType:[
203
+          {id:0,name:"全部"},
204
+          {id:1,name:"手动入库"},
205
+          {id:2,name:"手动出库"},
206
+          {id:3,name:"自动出库"},
207
+          {id:4,name:"手动退库"},
208
+          {id:10,name:"盘盈"},
209
+          {id:11,name:"盘亏"},
210
+          {id:12,name:"调拨出库"},
211
+          {id:13,name:"调拨入库"},
212
+          {id:15,name:"结算出库"}
213
+        ],
214
+        outList:[],
215
+        countList:[],
216
+        outCountList:[],
217
+        autoCountList:[],
218
+        drugOutList:[],
219
+        total:0,
220
+        houseList:[],
221
+        patientList:[],
222
+        drug:{},
223
+        patients:[]
224
+      }
225
+    },
226
+    created(){
227
+      this.getlist()
228
+    },
229
+    methods:{
230
+      startTimeChange: function(val) {
231
+      this.tableList = []
232
+      var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
233
+      
234
+      if (time > 0) {
235
+        this.$message.error("开始时间不能大于结束时间");
236
+        this.start_time = "";
237
+      } else {
238
+         
239
+         this.getlist()
240
+     
241
+      }
242
+    },
243
+    endTimeChange: function(val) {
244
+      this.tableList = []
245
+      var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
246
+      if (time < 0) {
247
+        this.$message.error("结束时间不能小于开始时间");
248
+        this.end_time = "";
249
+      } else {
250
+        this.getlist()
251
+      }
252
+     },
253
+     changeDrug(val){
254
+       this.tableList= []
255
+       this.stock_type = val
256
+       this.getlist()
257
+      },
258
+      handleSizeChange(val) {
259
+        this.limit = val
260
+        this.getlist()
261
+      },
262
+      handleCurrentChange(val) {
263
+        this.page = val
264
+        this.getlist()
265
+      },
266
+      getlist(){
267
+        var params = {
268
+             drug_id:this.$route.query.drug_id,
269
+             start_time:this.start_time,
270
+             end_time:this.end_time,
271
+             page:this.page,
272
+             limit:this.limit,
273
+         }
274
+        getSelfDrugFlow(params).then(response=>{
275
+           if(response.data.state ==1){
276
+              var list = response.data.data.list
277
+              this.tableList =list
278
+              var total =  response.data.data.total
279
+              this.total = total
280
+              this.drug =response.data.data.drug
281
+              this.patients= response.data.data.patients
282
+           }
283
+        })
284
+      },
285
+      getName(drug_id){
286
+        var name = ""
287
+        if(drug_id == this.drug.id){
288
+           name = this.drug.drug_name
289
+        }
290
+        return name
291
+     },
292
+     getTime(val) {
293
+      if(val < 0){
294
+          return ""
295
+      }
296
+      if(val == ""){
297
+        return ""
298
+      }else {
299
+        return uParseTime(val, '{y}-{m}-{d}')
300
+      }
301
+     },
302
+     getPatientName(id){
303
+       var name = ""
304
+       for(let i=0;i<this.patientList.length;i++){
305
+          if(id == this.patientList[i].id){
306
+              name = this.patientList[i].name
307
+          }
308
+       }
309
+       return name
310
+     },
311
+    }
312
+  }
313
+</script>

+ 141 - 0
src/xt_pages/stock/selfPreparedMedicine/selfDrugQuery.vue View File

@@ -0,0 +1,141 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+       
6
+      </div>
7
+       <div class="app-container ">
8
+          <el-tabs v-model="activeName" @tab-click="handleClick">
9
+              <el-tab-pane label="库存查询" name="first">
10
+                <new-drug-query></new-drug-query>
11
+              </el-tab-pane>
12
+            
13
+              <el-tab-pane label="患者查询" name="sencode">
14
+                  <patient-drug-query ref="mychildtwo"></patient-drug-query>
15
+              </el-tab-pane>
16
+          </el-tabs>
17
+       </div>
18
+    </div>
19
+  </template>
20
+  
21
+  <script>
22
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
23
+  import newDrugQuery from "@/xt_pages/stock/selfPreparedMedicine/newDrugQuery"
24
+  import patientDrugQuery from  "@/xt_pages/stock/selfPreparedMedicine/patientDrugQuery"
25
+  export default {
26
+    name: "stockNewQuery",
27
+    
28
+    components: {
29
+      BreadCrumb,
30
+      newDrugQuery,
31
+      patientDrugQuery
32
+    },
33
+    data() {
34
+      return {
35
+        crumbs: [
36
+          { path: false, name: "库存管理" },
37
+          { path: "/stock/query", name: "库存查询" }
38
+        ],
39
+        multipleSelection: [],
40
+        signAndWeighBoxPatients: "sign-and-weigh-box-patients",
41
+        activeName: 'first',
42
+        org_id:0,
43
+      };
44
+    },
45
+    methods:{
46
+      handleClick(val){
47
+        if(val.name == "first"){
48
+          this.$refs.mychild.open()
49
+        }
50
+        if(val.name == "second"){
51
+         this.$refs.mychildtwo.open()
52
+        }   
53
+       
54
+      }
55
+    },
56
+    created(){
57
+      this.org_id = this.$store.getters.xt_user.template_info.org_id
58
+    }
59
+  };
60
+  </script>
61
+  
62
+  <style rel="stylesheet/css" lang="scss" scoped>
63
+  .information {
64
+    border: 1px #dcdfe6 solid;
65
+    padding: 30px 20px 30px 20px;
66
+  
67
+    .border {
68
+      border-bottom: 1px #dcdfe6 solid;
69
+      margin: 0px 0 20px 0;
70
+    }
71
+  }
72
+  
73
+  /deep/ .el-tabs .el-tabs__header{
74
+    margin: 0;
75
+  }
76
+  
77
+  .title {
78
+    background: #409eff;
79
+    height: 44px;
80
+    line-height: 44px;
81
+    padding: 0 0 0 10px;
82
+    color: #fff;
83
+    margin: 0 0 10px 0;
84
+  }
85
+  
86
+  .edit_separater {
87
+    border-top: 1px solid rgb(233, 233, 233);
88
+    margin-top: 15px;
89
+    margin-bottom: 15px;
90
+  }
91
+  </style>
92
+  
93
+  <style>
94
+  .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
95
+    font-size: 12px;
96
+  }
97
+  
98
+  .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
99
+    background: #6fb5fa;
100
+  }
101
+  
102
+  .count {
103
+    color: #bd2c00;
104
+  }
105
+  .el-table td,
106
+  .el-table th.is-leaf,
107
+  .el-table--border,
108
+  .el-table--group {
109
+    border-color: #d0d3da;
110
+  }
111
+  .el-table--border::after,
112
+  .el-table--group::after,
113
+  .el-table::before {
114
+    background-color: #d0d3da;
115
+  }
116
+  
117
+  /* 合并表格线样式 */
118
+  
119
+  .spanClass .cell {
120
+    padding: 0 !important;
121
+  }
122
+  
123
+  .spanClass .cell tr {
124
+    display: inline-block;
125
+    width: 100%;
126
+    /* height: 44px; */
127
+  }
128
+  
129
+  .spanClass .cell tr td {
130
+    padding: 10px 0;
131
+    border-bottom: 1px solid #ebeef5;
132
+    display: block;
133
+    width: 100%;
134
+    min-height: 44px;
135
+  }
136
+  .spanClass .cell tr:last-of-type td{
137
+    border-bottom: none;
138
+  }
139
+  
140
+  </style>
141
+  

+ 41 - 62
src/xt_pages/stock/selfPreparedMedicine/warehouseInfo.vue View File

@@ -15,7 +15,7 @@
15 15
 
16 16
     <div class="app-container">
17 17
       <div class="cell clearfix">
18
-        <label class="title"><span class="name">患者</span> :</label>
18
+        <!-- <label class="title"><span class="name">患者</span> :</label>
19 19
         <el-select
20 20
           size="small"
21 21
           v-model="patient_id"
@@ -31,13 +31,13 @@
31 31
             :value="option.id"
32 32
           >
33 33
           </el-option>
34
-        </el-select>
34
+        </el-select> -->
35 35
         <el-input
36 36
           size="small"
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"
@@ -117,7 +117,7 @@
117 117
             size="small"
118 118
             v-model="check_type"
119 119
             filterable
120
-            placeholder="请选择仓库"
120
+            placeholder="请选择"
121 121
             style="width: 200px"
122 122
             @change="changeCheckType"
123 123
           >
@@ -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,10 +282,9 @@ 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
-  import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouseInfo} from "@/api/drug/drug"
287
+import { getallPatientList,getAllSelfDrugWarehouseInfoList,deleteSelfWarehouseInfo,getAllSelfDrugWarehouse} from "@/api/drug/drug"
281 288
 export default {
282 289
   name: "drugStockInOrder",
283 290
   components: { BreadCrumb },
@@ -311,6 +318,7 @@ export default {
311 318
       "-" +
312 319
       (nowDay < 10 ? "0" + nowDay : nowDay);
313 320
 
321
+    this.getAllSelfDrugWarehouse()  
314 322
     this.getallPatientList() 
315 323
 
316 324
     this.getAllSelfDrugWarehouseInfoList()
@@ -368,14 +376,25 @@ export default {
368 376
       patient_id:0,
369 377
       patientList:[],
370 378
       tableList:[],
371
-      manufacturerList:[],
372 379
       dealerList:[],
373 380
       drugTypeList:[],
374 381
     };
375 382
   },
376 383
 
377 384
   methods: {
378
-    
385
+    getAllSelfDrugWarehouse(){
386
+      var params = {
387
+          keyword:this.searchKey,
388
+          start_time:this.start_time,
389
+          end_time:this.end_time,
390
+          check_type:this.check_type,
391
+          limit:this.limit,
392
+          page:this.page,
393
+        }
394
+      getAllSelfDrugWarehouse(params).then(response=>{
395
+
396
+      })
397
+    },
379 398
     getAllSelfDrugWarehouseInfoList(){
380 399
         var params = {
381 400
           keyword:this.searchKey,
@@ -384,9 +403,9 @@ export default {
384 403
         getAllSelfDrugWarehouseInfoList(params).then(response=>{
385 404
           if(response.data.state ==1){
386 405
             var infoList  =  response.data.data.infoList
387
-            console.log("infolist22222222222222",infoList)
388 406
             this.tableList = infoList
389 407
             this.manufacturerList = response.data.data.manufacturerList
408
+            console.log("infolist22222222222222",this.manufacturerList)
390 409
             this.dealerList = response.data.data.dealerList
391 410
             this.drugTypeList = response.data.data.drugTypeList
392 411
 
@@ -517,39 +536,18 @@ export default {
517 536
     },
518 537
     handleSearch(id) {
519 538
       this.WarehouseInfo.warehouseInfoDate = [];
520
-      this.GetOrderDetail(id);
521 539
       this.dialogVisible = true;
522 540
     },
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 541
     handleDelete: function (index, row) {
551
-
552
-        this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
542
+        if(row.is_check ==1){
543
+          this.$message.error("该药品已经审核,不能删除!")
544
+          return false
545
+        }
546
+        if(row.is_sys ==1){
547
+          this.$message.error("该药瓶自动入库,不能删除!")
548
+          return false
549
+        }
550
+        this.$confirm('确定删除吗?', '提示', {
553 551
           confirmButtonText: '确定',
554 552
           cancelButtonText: '取消',
555 553
           type: 'warning'
@@ -650,7 +648,7 @@ export default {
650 648
         .catch(() => {});
651 649
     },
652 650
     handleCurrentChangeOne(val) {
653
-      this.GetOrderDetail(val.id);
651
+     
654 652
     },
655 653
     getTime(val) {
656 654
       if (val < 0) {
@@ -671,18 +669,12 @@ export default {
671 669
       }
672 670
       return name;
673 671
     },
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
-    },
672
+    
683 673
     getManufacturer(id) {
684 674
       var name = "";
675
+      console.log("manufacturerList-=------",this.manufacturerList)
685 676
       for (let i = 0; i < this.manufacturerList.length; i++) {
677
+
686 678
         if (id == this.manufacturerList[i].id) {
687 679
           name = this.manufacturerList[i].manufacturer_name;
688 680
         }
@@ -734,9 +726,6 @@ export default {
734 726
       });
735 727
     },
736 728
 
737
-    lili(){
738
-      console.log("exportList",this.exportList)
739
-    },
740 729
     toExport() {
741 730
       if (this.order_id == "") {
742 731
         this.$message.error("请勾选入库单");
@@ -853,7 +842,6 @@ export default {
853 842
         getallPatientList().then(response=>{
854 843
           if(response.data.state ==1){
855 844
             var patient = response.data.data.patient
856
-            console.log("patient====",patient)
857 845
             this.patientList = []
858 846
             var obj = {id:0,name:"全部"}
859 847
             this.patientList.push(obj)
@@ -872,15 +860,6 @@ export default {
872 860
         }
873 861
         return name
874 862
       },
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 863
       getDealerName(id){
885 864
         var dealer_name = ""
886 865
         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))