Преглед изворни кода

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

XMLWAN пре 2 година
родитељ
комит
cc2e305d16

+ 13 - 13
src/router/modules/dialysis.js Прегледај датотеку

480
       }
480
       }
481
     },
481
     },
482
     {
482
     {
483
-      path: '/dialysis/print/batch/twentyFive',                            
483
+      path: '/dialysis/print/batch/twentyFive',
484
       component: () =>
484
       component: () =>
485
         import('@/xt_pages/dialysis/batch_print/batch_print_order_twentyFive'),
485
         import('@/xt_pages/dialysis/batch_print/batch_print_order_twentyFive'),
486
       hidden: true,
486
       hidden: true,
491
         noCache: true
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
       path: '/dialysis/print/batch/twentyEight',
507
       path: '/dialysis/print/batch/twentyEight',
508
       component: () =>
508
       component: () =>

+ 31 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue Прегледај датотеку

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

+ 4 - 4
src/xt_pages/dialysis/dialysisPrintOrder.vue Прегледај датотеку

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

+ 2 - 1
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Прегледај датотеку

1004
    }
1004
    }
1005
   },
1005
   },
1006
    open(){
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
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1009
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1009
     this.houseList= []
1010
     this.houseList= []
1010
     this.drugTypeList = []
1011
     this.drugTypeList = []

+ 2 - 1
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue Прегледај датотеку

1016
   },
1016
   },
1017
    open(){
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
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1021
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
1021
     this.houseList= []
1022
     this.houseList= []
1022
     this.drugTypeList = []
1023
     this.drugTypeList = []

+ 69 - 37
src/xt_pages/stock/drugs/drugStockOutOrder.vue Прегледај датотеку

303
             <template slot-scope="scope">
303
             <template slot-scope="scope">
304
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
304
                <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
305
                   <td style="border-right: none; border-inline-end:none;text-align: center">
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
                     <span v-if="is_sys == 0">{{getBatchNumberOne(item.batch_number)}}</span>
310
                     <span v-if="is_sys == 0">{{getBatchNumberOne(item.batch_number)}}</span>
308
                   </td>
311
                   </td>
309
                </tr>
312
                </tr>
1218
           if (is_sys == 1) {
1221
           if (is_sys == 1) {
1219
             if (drugFlowList.length > 0) {
1222
             if (drugFlowList.length > 0) {
1220
               for (let i = 0; i < drugFlowList.length; i++) {
1223
               for (let i = 0; i < drugFlowList.length; i++) {
1224
+                 drugFlowList[i].childOne = []
1221
                  drugFlowList[i].child = []
1225
                  drugFlowList[i].child = []
1222
                 if (drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.max_unit) {
1226
                 if (drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.max_unit) {
1223
                    drugFlowList[i].count =drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number;
1227
                    drugFlowList[i].count =drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number;
1227
                 }
1231
                 }
1228
                 for(let j=0;j<drugListOne.length;j++){
1232
                 for(let j=0;j<drugListOne.length;j++){
1229
                    if(drugFlowList[i].drug_id == drugListOne[j].drug_id){
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
             this.drugFlowList = drugFlowList;
1240
             this.drugFlowList = drugFlowList;
1237
           }
1241
           }
1238
 
1242
 
1240
             var flowlist = response.data.data.flowlist;
1244
             var flowlist = response.data.data.flowlist;
1241
             this.drugFlowList = [];
1245
             this.drugFlowList = [];
1242
             for (let i = 0; i < flowlist.length; i++) {
1246
             for (let i = 0; i < flowlist.length; i++) {
1247
+               flowlist[i].childOne = []
1243
                flowlist[i].child = []
1248
                flowlist[i].child = []
1244
               if (flowlist[i].count_unit == flowlist[i].max_unit) {
1249
               if (flowlist[i].count_unit == flowlist[i].max_unit) {
1245
                 flowlist[i].count = flowlist[i].count * flowlist[i].min_number;
1250
                 flowlist[i].count = flowlist[i].count * flowlist[i].min_number;
1248
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1253
               if (flowlist[i].count_unit == flowlist[i].min_unit) {
1249
                 flowlist[i].count = flowlist[i].count;
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
             this.drugFlowList = flowlist;
1257
             this.drugFlowList = flowlist;
1268
-            console.log("数据我的喔喔喔喔喔喔",this.drugFlowList)
1269
           }
1258
           }
1270
 
1259
 
1271
           for (let i = 0; i < list.length; i++) {
1260
           for (let i = 0; i < list.length; i++) {
1277
               list[i].number = "";
1266
               list[i].number = "";
1278
             }
1267
             }
1279
             list[i].child = []
1268
             list[i].child = []
1269
+            list[i].childOne = []
1280
             if(list[i].is_sys == 1 ){
1270
             if(list[i].is_sys == 1 ){
1281
               for(let j=0;j<drugListOne.length;j++){
1271
               for(let j=0;j<drugListOne.length;j++){
1282
                 if(list[i].drug_id == drugListOne[j].drug_id){
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
             if(list[i].is_sys == 0 || list[i].is_sys == 5  || list[i].is_sys == 12){
1277
             if(list[i].is_sys == 0 || list[i].is_sys == 5  || list[i].is_sys == 12){
1288
               for(let j=0;j<drugListTwo.length;j++){
1278
               for(let j=0;j<drugListTwo.length;j++){
1289
                 if(list[i].drug_id == drugListTwo[j].drug_id){
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
           this.tableList = list;
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
           this.manufacturerList = response.data.data.manufacturerList;
1533
           this.manufacturerList = response.data.data.manufacturerList;
1489
           this.dealerList = response.data.data.dealerList;
1534
           this.dealerList = response.data.data.dealerList;
1490
           this.outInfoList = response.data.data.outInfoList
1535
           this.outInfoList = response.data.data.outInfoList
1491
-          console.log("outInfoList2233232232",this.outInfoList)
1492
         }
1536
         }
1493
       });
1537
       });
1494
     },
1538
     },
1495
     toExport() {
1539
     toExport() {
1496
-      console.log("exportlist23323232233",this.exportList)
1540
+
1497
       if (this.order_id == "") {
1541
       if (this.order_id == "") {
1498
         this.$message.error("请勾选出库单");
1542
         this.$message.error("请勾选出库单");
1499
         return;
1543
         return;
1656
       var total = 0
1700
       var total = 0
1657
       var max_str = ""
1701
       var max_str = ""
1658
       var min_str = ""
1702
       var min_str = ""
1659
-      console.log("outlist",this.outList)
1660
-      console.log("warehouse_info_id",warehouse_info_id)
1661
       for(let j=0;j<this.outList.length;j++){
1703
       for(let j=0;j<this.outList.length;j++){
1662
         if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
1704
         if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
1663
            arr.push(this.outList[j])
1705
            arr.push(this.outList[j])
1664
         }
1706
         }
1665
       }
1707
       }
1666
-       console.log("arr23322332",arr)
1667
       if(arr.length > 0){
1708
       if(arr.length > 0){
1668
         for(let i=0;i<arr.length;i++){
1709
         for(let i=0;i<arr.length;i++){
1669
            total +=arr[i].count
1710
            total +=arr[i].count
1692
       var total = 0
1733
       var total = 0
1693
       var max_str = ""
1734
       var max_str = ""
1694
       var min_str = ""
1735
       var min_str = ""
1695
-      console.log("outlist",this.outList)
1696
-      console.log("warehouse_info_id",warehouse_info_id)
1697
       for(let j=0;j<this.outList.length;j++){
1736
       for(let j=0;j<this.outList.length;j++){
1698
         if(this.outList[i].count_unit == max_unit){
1737
         if(this.outList[i].count_unit == max_unit){
1699
            this.outList[i].count = this.outList[i].count * min_number
1738
            this.outList[i].count = this.outList[i].count * min_number
1702
            arr.push(this.outList[j])
1741
            arr.push(this.outList[j])
1703
         }
1742
         }
1704
       }
1743
       }
1705
-       console.log("arr23322332",arr)
1706
       if(arr.length > 0){
1744
       if(arr.length > 0){
1707
         for(let i=0;i<arr.length;i++){
1745
         for(let i=0;i<arr.length;i++){
1708
 
1746
 
1912
            arr.push(this.tabList[j])
1950
            arr.push(this.tabList[j])
1913
         }
1951
         }
1914
       }
1952
       }
1915
-      console.log("Arr233322332",arr) 
1916
       if(arr.length > 0){
1953
       if(arr.length > 0){
1917
         for(let i=0;i<arr.length;i++){
1954
         for(let i=0;i<arr.length;i++){
1918
            total +=arr[i].count
1955
            total +=arr[i].count
1919
          }
1956
          }
1920
       }
1957
       }
1921
       price = retail_price
1958
       price = retail_price
1922
-      console.log("price",price)
1923
       if (total < min_number) {
1959
       if (total < min_number) {
1924
         min_str = total
1960
         min_str = total
1925
       }
1961
       }
1935
           min_str = (total % min_number)
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
       if(max_unit!=min_unit){
1976
       if(max_unit!=min_unit){
1944
         all_price = max_str  * price + min_str * price
1977
         all_price = max_str  * price + min_str * price
1946
       if(max_unit == min_unit){
1979
       if(max_unit == min_unit){
1947
          all_price = max_str * price + min_str * price
1980
          all_price = max_str * price + min_str * price
1948
       }
1981
       }
1949
-      console.log("arr_pirce",all_price)
1950
       if(all_price > 0){
1982
       if(all_price > 0){
1951
         return all_price.toFixed(2)
1983
         return all_price.toFixed(2)
1952
       }else{
1984
       }else{

+ 2 - 1
src/xt_pages/stock/query/purchaseNewStockQuery.vue Прегледај датотеку

682
     }
682
     }
683
    },
683
    },
684
    open(){
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
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
687
     this.end_time = moment(new Date()).add('year',0).format("YYYY-MM-DD")
687
     this.houseList = []
688
     this.houseList = []
688
     this.goodTypeList= []
689
     this.goodTypeList= []

+ 29 - 4
src/xt_pages/stock/stockOutOrder.vue Прегледај датотеку

281
             </template>
281
             </template>
282
           </el-table-column> -->
282
           </el-table-column> -->
283
 
283
 
284
-          <el-table-column label="出库数量" align="center">
284
+          <el-table-column label="仓库名称" align="center">
285
             <template slot-scope="scope">
285
             <template slot-scope="scope">
286
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
286
                <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
287
                   <td style="border-right: none; border-inline-end: none;text-align: center">
287
                   <td style="border-right: none; border-inline-end: none;text-align: center">
1446
           this.tableShow = true;
1446
           this.tableShow = true;
1447
           var list = response.data.data.list;
1447
           var list = response.data.data.list;
1448
           this.flowList = response.data.data.stockFlowList
1448
           this.flowList = response.data.data.stockFlowList
1449
+          console.log("出库数据233223232323wo",this.flowList)
1449
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1450
           this.stockFlowListGroup = response.data.data.stockFlowListGroup
1451
+          console.log("分组2332223233wode",this.stockFlowListGroup)
1450
           var cancelInfolist = response.data.data.cancelInfolist
1452
           var cancelInfolist = response.data.data.cancelInfolist
1451
           this.cancelInfoList = cancelInfolist
1453
           this.cancelInfoList = cancelInfolist
1452
     
1454
     
1453
           this.tableList = [];
1455
           this.tableList = [];
1456
+          var tableArr = []
1454
           for (let i = 0; i < list.length; i++) {
1457
           for (let i = 0; i < list.length; i++) {
1455
             list[i].child= []
1458
             list[i].child= []
1456
             list[i].childOne = []
1459
             list[i].childOne = []
1460
+            list[i].childTwo= []
1457
             for(let z=0;z<this.stockFlowListGroup.length;z++){
1461
             for(let z=0;z<this.stockFlowListGroup.length;z++){
1458
               if(list[i].good_id == this.stockFlowListGroup[z].good_id){
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
             for(let j=0;j<this.flowList.length;j++){
1466
             for(let j=0;j<this.flowList.length;j++){
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
     },