Browse Source

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 20220812

XMLWAN 2 years ago
parent
commit
cc2e305d16

+ 13 - 13
src/router/modules/dialysis.js View File

@@ -480,7 +480,7 @@ export default {
480 480
       }
481 481
     },
482 482
     {
483
-      path: '/dialysis/print/batch/twentyFive',                            
483
+      path: '/dialysis/print/batch/twentyFive',
484 484
       component: () =>
485 485
         import('@/xt_pages/dialysis/batch_print/batch_print_order_twentyFive'),
486 486
       hidden: true,
@@ -491,18 +491,18 @@ export default {
491 491
         noCache: true
492 492
       }
493 493
     },
494
-    {
495
-      path: '/dialysis/print/batch/twentySeven',
496
-      component: () =>
497
-      import('@/xt_pages/dialysis/batch_print/batch_print_order_twentySeven'),
498
-      hidden: true,
499
-      is_menu: false,
500
-      name: 'dialysis_batch_twentySeven',
501
-      meta: {
502
-        title: '批量打印',
503
-        noCache: true
504
-      }
505
-    },
494
+    // {
495
+    //   path: '/dialysis/print/batch/twentySeven',
496
+    //   component: () =>
497
+    //   import('@/xt_pages/dialysis/batch_print/batch_print_order_twentySeven'),
498
+    //   hidden: true,
499
+    //   is_menu: false,
500
+    //   name: 'dialysis_batch_twentySeven',
501
+    //   meta: {
502
+    //     title: '批量打印',
503
+    //     noCache: true
504
+    //   }
505
+    // },
506 506
     {
507 507
       path: '/dialysis/print/batch/twentyEight',
508 508
       component: () =>

+ 31 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue View File

@@ -573,7 +573,7 @@ import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
573 573
 import { parseTime } from "@/utils";
574 574
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
575 575
 import { getPrintTemplate } from "@/api/data";
576
-
576
+const moment = require('moment')
577 577
 export default {
578 578
   name: "Patient",
579 579
   data() {
@@ -697,6 +697,7 @@ export default {
697 697
       if(search_value != ''){
698 698
         this.patient_search_keyword = search_value
699 699
         this.listQuery.keywords = search_value
700
+       
700 701
         this.getSchedualPatientList();
701 702
         var date = new Date();
702 703
         this.time = date;
@@ -711,9 +712,22 @@ export default {
711 712
         }
712 713
         var nowDate = year + "-" + month + "-" + day;
713 714
         var date = new Date(nowDate + " 00:00:00");
715
+
714 716
         this.listQuery.schedul_time = date.getTime();
715 717
         this.getAllZone();
716 718
         this.getTemplateInfo();
719
+      }else {
720
+        var start_month = moment().startOf('month').format('YYYY-MM-DD')
721
+        var start_time = this.getTimestamp(start_month)
722
+        this.listQuery.start_time = start_time
723
+        var end_month = moment(new Date()).add('year',0).format("YYYY-MM-DD")
724
+        var end_time = this.getTimestamp(end_month)
725
+        this.listQuery.end_time = end_time
726
+        this.getSchedualPatientList()
727
+      
728
+        this.getAllZone();
729
+        this.getTemplateInfo();
730
+
717 731
       }
718 732
     }else {
719 733
       var date = new Date();
@@ -730,6 +744,12 @@ export default {
730 744
       var nowDate = year + "-" + month + "-" + day;
731 745
       var date = new Date(nowDate + " 00:00:00");
732 746
       this.listQuery.schedul_time = date.getTime();
747
+      var start_month = moment().startOf('month').format('YYYY-MM-DD')
748
+      var start_time = this.getTimestamp(start_month)
749
+      this.listQuery.start_time = start_time
750
+      var end_month = moment(new Date()).add('year',0).format("YYYY-MM-DD")
751
+      var end_time = this.getTimestamp(end_month)
752
+      this.listQuery.end_time = end_time
733 753
       this.getAllZone();
734 754
       this.getSchedualPatientList();
735 755
       this.getTemplateInfo();
@@ -778,6 +798,7 @@ export default {
778 798
       this.getSchedualPatientList();
779 799
     },
780 800
     changeStartTime(){
801
+     
781 802
       this.getSchedualPatientList()
782 803
     },
783 804
     changeEndTime(){
@@ -795,12 +816,19 @@ export default {
795 816
         }
796 817
       });
797 818
     },
819
+    getTimestamp(time) { //把时间日期转成时间戳
820
+
821
+      return (new Date(time)).getTime()
822
+    },
798 823
     getSchedualPatientList: function() {
799 824
       this.loading = true;
800 825
       if (this.search_mode == 1) {
801 826
         this.listQuery.keywords = "";
827
+      
828
+
802 829
       } else {
803 830
         this.listQuery.schedul_time = "";
831
+       
804 832
       }
805 833
       console.log("params332322332323232",this.listQuery)
806 834
       this.SchedualPatientsTableData = [];
@@ -892,6 +920,7 @@ export default {
892 920
     changeSearchMode: function() {
893 921
       if (this.search_mode == 1) {
894 922
         this.search_mode = 2;
923
+        
895 924
       } else {
896 925
         this.search_mode = 1;
897 926
         var date = new Date();
@@ -908,6 +937,7 @@ export default {
908 937
         var nowDate = year + "-" + month + "-" + day;
909 938
         var date = new Date(nowDate + " 00:00:00");
910 939
         this.listQuery.schedul_time = date.getTime();
940
+       
911 941
         this.getAllZone();
912 942
         this.getSchedualPatientList();
913 943
         this.getTemplateInfo();

+ 4 - 4
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

@@ -1220,10 +1220,10 @@
1220 1220
           v-bind:childResponse="childResponse"
1221 1221
             v-if="org_template_info.template_id == 62">
1222 1222
           </DialysisPrintOrderSixtyTwo>
1223
-          <DialysisPrintOrderSixtyThree
1223
+          <!-- <DialysisPrintOrderSixtyThree
1224 1224
           v-bind:childResponse="childResponse"
1225 1225
             v-if="org_template_info.template_id == 63">
1226
-          </DialysisPrintOrderSixtyThree>
1226
+          </DialysisPrintOrderSixtyThree> -->
1227 1227
         </div>
1228 1228
       </el-container>
1229 1229
     </div>
@@ -1304,11 +1304,11 @@ import DialysisPrintOrderFiftyNine from "./template/DialysisPrintOrderFiftyNine"
1304 1304
 import DialysisPrintOrderSixty from "./template/DialysisPrintOrderSixty";
1305 1305
 import DialysisPrintOrderSixtyOne from "./template/DialysisPrintOrderSixtyOne"
1306 1306
 import DialysisPrintOrderSixtyTwo from "./template/DialysisPrintOrderSixtyTwo"
1307
-import DialysisPrintOrderSixtyThree from "./template/DialysisPrintOrderSixtyThree"
1307
+// import DialysisPrintOrderSixtyThree from "./template/DialysisPrintOrderSixtyThree"
1308 1308
 export default {
1309 1309
   name: "dialysisPrintOrder",
1310 1310
   components: {
1311
-    DialysisPrintOrderSixtyThree,
1311
+    // DialysisPrintOrderSixtyThree,
1312 1312
     DialysisPrintOrderSixtyTwo,
1313 1313
     DialysisPrintOrderSixtyOne,
1314 1314
     DialysisPrintOrderSixty,

+ 2 - 1
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue View File

@@ -1004,7 +1004,8 @@ export default {
1004 1004
    }
1005 1005
   },
1006 1006
    open(){
1007
-    this.start_time = moment().year(2022).month(10).date(1).format('YYYY-MM-DD')
1007
+    // this.start_time = moment().year(2022).month(10).date(1).format('YYYY-MM-DD')
1008
+    this.start_time = moment().startOf('month').format('YYYY-MM-DD')
1008 1009
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1009 1010
     this.houseList= []
1010 1011
     this.drugTypeList = []

+ 2 - 1
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue View File

@@ -1016,7 +1016,8 @@ export default {
1016 1016
   },
1017 1017
    open(){
1018 1018
    
1019
-    this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
1019
+    // this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
1020
+    this.start_time = moment().startOf('month').format('YYYY-MM-DD')
1020 1021
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1021 1022
     this.houseList= []
1022 1023
     this.drugTypeList = []

+ 69 - 37
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

@@ -303,7 +303,10 @@
303 303
             <template slot-scope="scope">
304 304
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
305 305
                   <td style="border-right: none; border-inline-end:none;text-align: center">
306
-                    <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getBatchNumber(item.warehousing_detail_id)}}</span> 
306
+                    <span v-if="is_sys == 1 || is_sys == 5">
307
+                      {{getBatchNumber(item.warehousing_detail_id)}}
308
+                    </span> 
309
+                     <span v-if="is_sys == 12">{{getBatchNumber(item.warehousing_detail_id)}}</span>
307 310
                     <span v-if="is_sys == 0">{{getBatchNumberOne(item.batch_number)}}</span>
308 311
                   </td>
309 312
                </tr>
@@ -1218,6 +1221,7 @@ export default {
1218 1221
           if (is_sys == 1) {
1219 1222
             if (drugFlowList.length > 0) {
1220 1223
               for (let i = 0; i < drugFlowList.length; i++) {
1224
+                 drugFlowList[i].childOne = []
1221 1225
                  drugFlowList[i].child = []
1222 1226
                 if (drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.max_unit) {
1223 1227
                    drugFlowList[i].count =drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number;
@@ -1227,12 +1231,12 @@ export default {
1227 1231
                 }
1228 1232
                 for(let j=0;j<drugListOne.length;j++){
1229 1233
                    if(drugFlowList[i].drug_id == drugListOne[j].drug_id){
1230
-                       drugFlowList[i].child.push(drugListOne[j])
1234
+                       drugFlowList[i].childOne.push(drugListOne[j])
1231 1235
                    }
1232 1236
                 }
1233 1237
               }
1234 1238
             }
1235
-            console.log("数据元23322323232323322332我的",drugFlowList)
1239
+          
1236 1240
             this.drugFlowList = drugFlowList;
1237 1241
           }
1238 1242
 
@@ -1240,6 +1244,7 @@ export default {
1240 1244
             var flowlist = response.data.data.flowlist;
1241 1245
             this.drugFlowList = [];
1242 1246
             for (let i = 0; i < flowlist.length; i++) {
1247
+               flowlist[i].childOne = []
1243 1248
                flowlist[i].child = []
1244 1249
               if (flowlist[i].count_unit == flowlist[i].max_unit) {
1245 1250
                 flowlist[i].count = flowlist[i].count * flowlist[i].min_number;
@@ -1248,24 +1253,8 @@ export default {
1248 1253
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1249 1254
                 flowlist[i].count = flowlist[i].count;
1250 1255
               }
1251
-              // if(list[i].is_sys == 1){
1252
-              //  for(let j=0;j<drugListOne.length;j++){
1253
-              //   if(flowlist[i].drug_id == drugListOne[j].drug_id){
1254
-              //     flowlist[i].child.push(drugListOne[j])
1255
-              //   }
1256
-              //  }
1257
-              // }
1258
-              // if(list[i].is_sys == 0){
1259
-              //  for(let j=0;j<drugListTwo.length;j++){
1260
-              //   if(flowlist[i].drug_id == drugListTwo[j].drug_id){
1261
-              //     flowlist[i].child.push(drugListTwo[j])
1262
-              //   }
1263
-              //  }
1264
-              // }
1265
-             
1266 1256
             }
1267 1257
             this.drugFlowList = flowlist;
1268
-            console.log("数据我的喔喔喔喔喔喔",this.drugFlowList)
1269 1258
           }
1270 1259
 
1271 1260
           for (let i = 0; i < list.length; i++) {
@@ -1277,23 +1266,79 @@ export default {
1277 1266
               list[i].number = "";
1278 1267
             }
1279 1268
             list[i].child = []
1269
+            list[i].childOne = []
1280 1270
             if(list[i].is_sys == 1 ){
1281 1271
               for(let j=0;j<drugListOne.length;j++){
1282 1272
                 if(list[i].drug_id == drugListOne[j].drug_id){
1283
-                  list[i].child.push(drugListOne[j])
1273
+                  list[i].childOne.push(drugListOne[j])
1284 1274
                 }
1285 1275
              }
1286 1276
             }
1287 1277
             if(list[i].is_sys == 0 || list[i].is_sys == 5  || list[i].is_sys == 12){
1288 1278
               for(let j=0;j<drugListTwo.length;j++){
1289 1279
                 if(list[i].drug_id == drugListTwo[j].drug_id){
1290
-                  list[i].child.push(drugListTwo[j])
1280
+                  list[i].childOne.push(drugListTwo[j])
1291 1281
                 }
1292 1282
                }
1293 1283
             }
1294 1284
           }
1295
-         console.log("list2332323232232323",list)
1285
+
1286
+     
1287
+         
1288
+        console.log("is_sys2332232323wo",is_sys)
1289
+        if(is_sys == 1 || is_sys == 5){
1290
+          for(let i=0;i<list.length;i++){
1291
+            for(let j=0;j<list[i].childOne.length;j++){
1292
+               list[i].childOne[j].over_count_total = this.getOutCountSix(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
1293
+            }
1294
+          }
1295
+
1296
+         for(let i=0;i<list.length;i++){
1297
+            for(let j=0;j<list[i].childOne.length;j++){
1298
+               if(list[i].childOne[j].over_count_total !=""){
1299
+                   list[i].child.push(list[i].childOne[j])
1300
+               } 
1301
+            }
1302
+          }
1296 1303
           this.tableList = list;
1304
+        }
1305
+
1306
+        if(is_sys == 12){
1307
+          for(let i=0;i<list.length;i++){
1308
+            for(let j=0;j<list[i].childOne.length;j++){
1309
+               list[i].childOne[j].over_count_total = this.getOutCountSeven(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
1310
+            }
1311
+          }
1312
+
1313
+         for(let i=0;i<list.length;i++){
1314
+            for(let j=0;j<list[i].childOne.length;j++){
1315
+               if(list[i].childOne[j].over_count_total !=""){
1316
+                   list[i].child.push(list[i].childOne[j])
1317
+               } 
1318
+            }
1319
+          }
1320
+          this.tableList = list;
1321
+        }
1322
+
1323
+        if(is_sys == 0){
1324
+          console.log("list999992332232323",list)
1325
+          for(let i=0;i<list.length;i++){
1326
+            for(let j=0;j<list[i].childOne.length;j++){
1327
+              console.log("hhhahhawiiw",this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id))
1328
+               list[i].childOne[j].over_count_total = this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
1329
+            }
1330
+          }
1331
+
1332
+         for(let i=0;i<list.length;i++){
1333
+            for(let j=0;j<list[i].childOne.length;j++){
1334
+               if(list[i].childOne[j].over_count_total !=""){
1335
+                   list[i].child.push(list[i].childOne[j])
1336
+               } 
1337
+            }
1338
+          }
1339
+          this.tableList = list;
1340
+        }
1341
+        
1297 1342
 
1298 1343
         }
1299 1344
       });
@@ -1488,12 +1533,11 @@ export default {
1488 1533
           this.manufacturerList = response.data.data.manufacturerList;
1489 1534
           this.dealerList = response.data.data.dealerList;
1490 1535
           this.outInfoList = response.data.data.outInfoList
1491
-          console.log("outInfoList2233232232",this.outInfoList)
1492 1536
         }
1493 1537
       });
1494 1538
     },
1495 1539
     toExport() {
1496
-      console.log("exportlist23323232233",this.exportList)
1540
+
1497 1541
       if (this.order_id == "") {
1498 1542
         this.$message.error("请勾选出库单");
1499 1543
         return;
@@ -1656,14 +1700,11 @@ export default {
1656 1700
       var total = 0
1657 1701
       var max_str = ""
1658 1702
       var min_str = ""
1659
-      console.log("outlist",this.outList)
1660
-      console.log("warehouse_info_id",warehouse_info_id)
1661 1703
       for(let j=0;j<this.outList.length;j++){
1662 1704
         if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
1663 1705
            arr.push(this.outList[j])
1664 1706
         }
1665 1707
       }
1666
-       console.log("arr23322332",arr)
1667 1708
       if(arr.length > 0){
1668 1709
         for(let i=0;i<arr.length;i++){
1669 1710
            total +=arr[i].count
@@ -1692,8 +1733,6 @@ export default {
1692 1733
       var total = 0
1693 1734
       var max_str = ""
1694 1735
       var min_str = ""
1695
-      console.log("outlist",this.outList)
1696
-      console.log("warehouse_info_id",warehouse_info_id)
1697 1736
       for(let j=0;j<this.outList.length;j++){
1698 1737
         if(this.outList[i].count_unit == max_unit){
1699 1738
            this.outList[i].count = this.outList[i].count * min_number
@@ -1702,7 +1741,6 @@ export default {
1702 1741
            arr.push(this.outList[j])
1703 1742
         }
1704 1743
       }
1705
-       console.log("arr23322332",arr)
1706 1744
       if(arr.length > 0){
1707 1745
         for(let i=0;i<arr.length;i++){
1708 1746
 
@@ -1912,14 +1950,12 @@ export default {
1912 1950
            arr.push(this.tabList[j])
1913 1951
         }
1914 1952
       }
1915
-      console.log("Arr233322332",arr) 
1916 1953
       if(arr.length > 0){
1917 1954
         for(let i=0;i<arr.length;i++){
1918 1955
            total +=arr[i].count
1919 1956
          }
1920 1957
       }
1921 1958
       price = retail_price
1922
-      console.log("price",price)
1923 1959
       if (total < min_number) {
1924 1960
         min_str = total
1925 1961
       }
@@ -1935,10 +1971,7 @@ export default {
1935 1971
           min_str = (total % min_number)
1936 1972
         }
1937 1973
       }
1938
-      console.log("max_str2323232323",max_str)
1939
-      console.log("min_str",min_str)
1940
-      console.log("max_unit",max_unit)
1941
-      console.log("min",min_unit)
1974
+
1942 1975
 
1943 1976
       if(max_unit!=min_unit){
1944 1977
         all_price = max_str  * price + min_str * price
@@ -1946,7 +1979,6 @@ export default {
1946 1979
       if(max_unit == min_unit){
1947 1980
          all_price = max_str * price + min_str * price
1948 1981
       }
1949
-      console.log("arr_pirce",all_price)
1950 1982
       if(all_price > 0){
1951 1983
         return all_price.toFixed(2)
1952 1984
       }else{

+ 2 - 1
src/xt_pages/stock/query/purchaseNewStockQuery.vue View File

@@ -682,7 +682,8 @@ export default {
682 682
     }
683 683
    },
684 684
    open(){
685
-    this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
685
+    // this.start_time = moment().year(2022).month(10).date(4).format('YYYY-MM-DD')
686
+    this.start_time = moment().startOf('month').format('YYYY-MM-DD')
686 687
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
687 688
     this.houseList = []
688 689
     this.goodTypeList= []

+ 29 - 4
src/xt_pages/stock/stockOutOrder.vue View File

@@ -281,7 +281,7 @@
281 281
             </template>
282 282
           </el-table-column> -->
283 283
 
284
-          <el-table-column label="出库数量" align="center">
284
+          <el-table-column label="仓库名称" align="center">
285 285
             <template slot-scope="scope">
286 286
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
287 287
                   <td style="border-right: none; border-inline-end: none;text-align: center">
@@ -1446,17 +1446,21 @@ export default {
1446 1446
           this.tableShow = true;
1447 1447
           var list = response.data.data.list;
1448 1448
           this.flowList = response.data.data.stockFlowList
1449
+          console.log("出库数据233223232323wo",this.flowList)
1449 1450
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1451
+          console.log("分组2332223233wode",this.stockFlowListGroup)
1450 1452
           var cancelInfolist = response.data.data.cancelInfolist
1451 1453
           this.cancelInfoList = cancelInfolist
1452 1454
     
1453 1455
           this.tableList = [];
1456
+          var tableArr = []
1454 1457
           for (let i = 0; i < list.length; i++) {
1455 1458
             list[i].child= []
1456 1459
             list[i].childOne = []
1460
+            list[i].childTwo= []
1457 1461
             for(let z=0;z<this.stockFlowListGroup.length;z++){
1458 1462
               if(list[i].good_id == this.stockFlowListGroup[z].good_id){
1459
-                 list[i].childOne.push(this.stockFlowListGroup[z])
1463
+                 list[i].childTwo.push(this.stockFlowListGroup[z])
1460 1464
               }
1461 1465
             }
1462 1466
             for(let j=0;j<this.flowList.length;j++){
@@ -1465,9 +1469,30 @@ export default {
1465 1469
               }
1466 1470
             }
1467 1471
            
1468
-            this.tableList.push(list[i]);
1472
+             tableArr.push(list[i]);
1473
+          }
1474
+
1475
+  // {{(getAllStockCount(scope.row.child,item.warehousing_id) - getCancelInfo(item.warehousing_id,item.good_id)) *  getAllStockCountPrice(scope.row.child,item.warehousing_id)}}
1476
+          if(tableArr!=null && tableArr.length>0){
1477
+            for(let i=0;i<tableArr.length;i++){
1478
+              for(let j=0;j<tableArr[i].childTwo.length;j++){
1479
+                tableArr[i].childTwo[j].over_count_total = this.getAllStockCount(tableArr[i].child,tableArr[i].childTwo[j].warehousing_id) - this.getCancelInfo(tableArr[i].childTwo[j].warehousing_id,tableArr[i].childTwo[j].good_id)
1480
+              }
1481
+            }
1469 1482
           }
1470
-          console.log("tablielist2332323",this.tableList)
1483
+
1484
+          for(let i=0;i<tableArr.length;i++){
1485
+            for(let j=0;j<tableArr[i].childTwo.length;j++){
1486
+               if(tableArr[i].childTwo[j].over_count_total >0){
1487
+                 tableArr[i].childOne.push(tableArr[i].childTwo[j])
1488
+               }
1489
+            }
1490
+          }
1491
+          console.log("tableARR",tableArr)
1492
+          console.log("tablielist2332323", this.tableList)
1493
+           this.tableList = tableArr
1494
+        
1495
+
1471 1496
         }
1472 1497
       });
1473 1498
     },