瀏覽代碼

8月15日

XMLWAN 2 年之前
父節點
當前提交
31f9574e98

+ 2 - 2
config/index.js 查看文件

@@ -27,10 +27,10 @@ module.exports = {
27 27
     // can be overwritten by process.env.HOST
28 28
     // if you want dev by ip, please set host: '0.0.0.0'
29 29
 
30
-    // host: 'xt.test.sgjyun.com',
30
+    host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32 32
    // host: 'xt.test.sgjyun.com',
33
-   host: 'localhost',
33
+  //  host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 8 - 9
src/xt_pages/stock/stockInOrderAdd.vue 查看文件

@@ -7,12 +7,12 @@
7 7
 
8 8
       <div style="float:right;">
9 9
         <el-button size="small" @click="back()" class="filter-item">取 消</el-button>
10
-        <el-button size="small" type="primary" @click="submit()" class="filter-item"  v-loading="loading">保 存</el-button>
10
+        <el-button size="small" type="primary" @click="submit()" class="filter-item" v-loading="loading">保 存</el-button>
11 11
         <el-button size="small" type="primary" v-show="showCheck" @click="toCheck()" class="filter-item">审 核</el-button>
12 12
         <!-- <el-button size="small" type="primary" v-show="showReturnCheck" @click="toReturnCheck()" class="filter-item">反 审 核</el-button> -->
13 13
       </div>
14 14
     </div>
15
-    <div class="app-container">
15
+    <div class="app-container" v-loading="loading">
16 16
 
17 17
       <stock-in-dialog ref="dialog" :propForm="propForm"
18 18
                        :visibility="isVisibility"
@@ -697,12 +697,6 @@
697 697
         this.$refs['tableForm'].validate((valid) => {
698 698
           if (valid) {
699 699
             this.loading = true
700
-            const loading = this.$loading({
701
-              lock: true,
702
-              text: 'Loading',
703
-              spinner: 'el-icon-loading',
704
-              background: 'rgba(0, 0, 0, 0.7)'
705
-            })
706 700
             const array = this.recordInfo.recordData
707 701
             if(this.storehouse_id == 0){
708 702
               this.$message.error("仓库不能为空!")
@@ -742,7 +736,12 @@
742 736
               }
743 737
               this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString()
744 738
             }
745
-        
739
+            const loading = this.$loading({
740
+              lock: true,
741
+              text: 'Loading',
742
+              spinner: 'el-icon-loading',
743
+              background: 'rgba(0, 0, 0, 0.7)'
744
+            })
746 745
             const params = {
747 746
               'stockIn': this.recordInfo.recordData
748 747
             }

+ 1 - 2
src/xt_pages/stock/stockInOrderEdit.vue 查看文件

@@ -21,7 +21,6 @@
21 21
           v-if="is_check == 2"
22 22
           v-loading="loading"
23 23
           class="filter-item"
24
-          v-loading="loading"
25 24
           >保 存</el-button
26 25
         >
27 26
         <el-button
@@ -43,7 +42,7 @@
43 42
       </div>
44 43
     </div>
45 44
 
46
-    <div class="app-container">
45
+    <div class="app-container" v-loading="loading">
47 46
       <stock-in-dialog
48 47
         ref="dialog"
49 48
         :propForm="propForm"

+ 69 - 8
src/xt_pages/workforce/components/template_table.vue 查看文件

@@ -32,7 +32,6 @@
32 32
         :row-style="{ color: '#303133' }"
33 33
         style="width: 100%"
34 34
 
35
-
36 35
         border
37 36
       >
38 37
         <el-table-column label="姓名" width="120">
@@ -101,7 +100,6 @@
101 100
                 :summary-method="getSummaries"
102 101
                 row-class-name="table-row-new-class schedule-table-row" @cell-click="itemClick"
103 102
                 sum-text="总数"
104
-                >
105 103
       >
106 104
         <el-table-column label="分区" width="80" align="center" fixed
107 105
                          style="width: 100px; background-color: red; display: block;">
@@ -469,24 +467,32 @@
469 467
       //     }
470 468
       // },
471 469
       makeDeviceNumbers: function(device_numbers) {
472
-
470
+        console.log("device_numbers",device_numbers)
471
+        var arr = []
472
+        for(let i=0;i<device_numbers.length;i++){
473
+          arr.push(device_numbers[i])
474
+        }
475
+        arr.sort(this.arraySort('sort'))
476
+        console.log("Arr2332232332",arr)
473 477
         var maked_device_numbers = []
474 478
         var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
475 479
         var time_types = [1, 2, 3] // 上下晚
476
-        for (let index = 0; index < device_numbers.length; index++) {
477
-          const device_number = device_numbers[index]
480
+        for (let index = 0; index < arr.length; index++) {
481
+          const device_number = arr[index]
478 482
           if(device_number.zone!=null){
479 483
             var zone = {
480 484
               id: device_number.zone.id,
481 485
               name: device_number.zone.name,
482
-              type: device_number.zone.type
486
+              type: device_number.zone.type,
487
+              sort:device_number.sort
483 488
             }
484 489
             var device = {
485 490
               id: device_number.id,
486 491
               number: device_number.number,
487 492
               group_id: device_number.group_id,
488 493
               zone_id: device_number.zone_id,
489
-              zone: zone
494
+              zone: zone,
495
+              sort:device_number.sort
490 496
             }
491 497
           }
492 498
 
@@ -511,7 +517,7 @@
511 517
           maked_device_numbers.push(device)
512 518
         }
513 519
 
514
-        console.log(maked_device_numbers)
520
+        console.log("数据源23232233223232322323我",maked_device_numbers)
515 521
         return maked_device_numbers
516 522
       },
517 523
       spanMethod({ row, column, rowIndex, columnIndex }) {
@@ -777,6 +783,61 @@
777 783
           this.saving = false
778 784
           this.is_editing = false
779 785
         })
786
+      },
787
+      getSummaries(param) {
788
+
789
+        const { columns, data } = param;
790
+        const sums = [];
791
+        columns.forEach((column, index) => {
792
+          if (index === 0 || index === 25) {
793
+            sums[index] = "总数";
794
+            return;
795
+          }
796
+          if (index === 1 || index === 24) {
797
+            sums[index] = data.length;
798
+            return;
799
+          }
800
+
801
+          const values = data.map(item => item[column.property]);
802
+
803
+          if (index === 23) {
804
+            sums[index] = values.reduce((prev, curr) => {
805
+              const value = Number(curr);
806
+              if (!isNaN(value)) {
807
+                return prev + curr;
808
+              } else {
809
+                return prev;
810
+              }
811
+            }, 0);
812
+            sums[index];
813
+            return;
814
+          }
815
+
816
+          sums[index] = values.reduce((prev, curr) => {
817
+            if (typeof curr["treat_mode_id"] === "undefined") {
818
+              return prev;
819
+            }
820
+            const value = Number(curr["treat_mode_id"]);
821
+            if (!isNaN(value) && value > 0) {
822
+              return prev + 1;
823
+            } else {
824
+              return prev;
825
+            }
826
+          }, 0);
827
+          sums[index];
828
+        });
829
+        this.$nextTick(() => {
830
+          this.$refs.table.doLayout();
831
+        });
832
+
833
+        return sums;
834
+      },
835
+      arraySort(property) {
836
+        return function (a, b) {
837
+          var value1 = a[property]
838
+          var value2 = b[property]
839
+          return value1 - value2
840
+        }
780 841
       }
781 842
     }
782 843
   }