Tiroble 3 年之前
父節點
當前提交
1e18295866
共有 2 個文件被更改,包括 72 次插入98 次删除
  1. 2 2
      build/utils.js
  2. 70 96
      src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

+ 2 - 2
build/utils.js

@@ -15,11 +15,11 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
- let devModules = ['all']
+//  let devModules = ['all']
 // let devModules = ['index','appoint','sale','RMS','statisticalReport'];
 // let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','inward','ADMINISTRATORS']
-// let devModules = ['index','sale']
+let devModules = ['index','sale']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
 // let devModules = ['index','inward','statisticalReport']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']

+ 70 - 96
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -95,14 +95,14 @@
           </template>
       </el-table-column>
       </el-table>
-      <dilTable ref="excelDom" v-bind.sync="option" >
+      <!-- <dilTable ref="excelDom" v-bind.sync="option" >
           <el-table-column fixed="right" label="照片游览" width="120">
           <template slot-scope="scope">
             <el-button @click="toPhotoClick(scope.row.orderNumber)" type="text" size="small" style="font-size: 6px">
                 抵达满货照片</el-button>
           </template>
       </el-table-column>
-      </dilTable>
+      </dilTable> -->
     </div>
     <!-- 分页器 -->
     <el-pagination
@@ -173,100 +173,72 @@ export default {
    
   },
   methods: {
-    //记录每一行的合并数
-    getSpanArr(data) {
-      //每次调用方法初始化
-      this.spanArr = [];
-      for (var i = 0; i < data.length; i++) {
-        if (i === 0) {
-          this.spanArr.push(1);
-          this.pos = 0;
-        } else {
-          // 判断当前元素与上一个元素是否相同
-          if (data[i].cxh === data[i - 1].cxh) {
-            this.spanArr[this.pos] += 1;
-            this.spanArr.push(0);
-          } else {
-            this.spanArr.push(1);
-            this.pos = i;
-          }
-        }
-      }
-    },
-    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (
-        columnIndex!=2||columnIndex!=3||columnIndex!=4||columnIndex!=5
-      ) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
-        return {
-          rowspan: _row,
-          colspan: _col
-        };
-      }
-    },
-    //  objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-    //    let that=this;
-    //    if(columnIndex==2||columnIndex==3||columnIndex==4||columnIndex==5){
-    //         return {
-    //           rowspan: 1,
-    //           colspan: 1
-    //         };
-    //      }else{
-    //        if(row >=that.beforeRow){
-    //          if((that.dataTabel[rowIndex+1].orderNumber==row.orderNumber)){
-    //            for(let i=0;i<that.dataTabel.length-(rowIndex+1);i++){
-    //               if((that.dataTabel[rowIndex+1+i].orderNumber==row.orderNumber)){
-    //                   that.thatrowspan++;
-    //                   that.beforeRow=rowIndex+1+i;
-    //               }else{
-    //                 let myrowspan=that.thatrowspan;
-    //                 that.thatrowspan=1;
-    //                 return {
-    //                   rowspan: myrowspan,
-    //                   colspan: 1
-    //                 };  
-    //               }
-    //            }
-    //          }
-    //        }else{
-    //           return {
-    //             rowspan: 0,
-    //             colspan: 0
-    //         };
-    //      }
-    //   //  if(rowIndex==0){
-    //   //      if(columnIndex==2||columnIndex==3||columnIndex==4||columnIndex==5){
-    //   //       return {
-    //   //         rowspan: 1,
-    //   //         colspan: 1
-    //   //     };
-    //   //    }else{
-    //   //       return {
-    //   //         rowspan: 3,
-    //   //         colspan: 1
-    //   //     };
-    //   //    }
-         
-    //   //  }else{
-    //   //     if(columnIndex==2||columnIndex==3||columnIndex==4||columnIndex==5){
-    //   //       return {
-    //   //         rowspan: 1,
-    //   //         colspan: 1
-    //   //     };
-    //   //    }else if((that.dataTabel[rowIndex-1].orderNumber!=row.orderNumber)){
-    //   //       return {
-    //   //         rowspan: 1,
-    //   //         colspan: 1
-    //   //     };
-    //   //    }else{
-    //   //      return {
-    //   //         rowspan: 0,
-    //   //         colspan: 0
-    //   //     };
-    //   //   }
+    // //记录每一行的合并数
+    // getSpanArr(data) {
+    //   //每次调用方法初始化
+    //   this.spanArr = [];
+    //   for (var i = 0; i < data.length; i++) {
+    //     if (i === 0) {
+    //       this.spanArr.push(1);
+    //       this.pos = 0;
+    //     } else {
+    //       // 判断当前元素与上一个元素是否相同
+    //       if (data[i].cxh === data[i - 1].cxh) {
+    //         this.spanArr[this.pos] += 1;
+    //         this.spanArr.push(0);
+    //       } else {
+    //         this.spanArr.push(1);
+    //         this.pos = i;
+    //       }
+    //     }
+    //   }
+    // },
+    // objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+    //   if (
+    //     columnIndex!=2||columnIndex!=3||columnIndex!=4||columnIndex!=5
+    //   ) {
+    //     const _row = this.spanArr[rowIndex];
+    //     const _col = _row > 0 ? 1 : 0;
+    //     return {
+    //       rowspan: _row,
+    //       colspan: _col
+    //     };
     //   }
     // },
+     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+       let that=this;
+       if(columnIndex==2||columnIndex==3||columnIndex==4||columnIndex==5){
+            return {
+              rowspan: 1,
+              colspan: 1
+            };
+         }else{
+           console.log(row >=that.beforeRow)
+           if(row >=that.beforeRow){
+             
+             if((that.dataTabel[rowIndex+1].orderNumber==row.orderNumber)){
+               for(let i=0;i<that.dataTabel.length-(rowIndex+1);i++){
+                  if((that.dataTabel[rowIndex+1+i].orderNumber==row.orderNumber)){
+                      that.thatrowspan++;
+                      that.beforeRow=rowIndex+1+i;
+                  }else{
+                    let myrowspan=that.thatrowspan;
+                    that.thatrowspan=1;
+                    return {
+                      rowspan: myrowspan,
+                      colspan: 1
+                    };  
+                  }
+               }
+             }
+           }else{
+              return {
+                rowspan: 0,
+                colspan: 0
+            };
+         }
+      }
+    },
     // 参数的值是一个对象,对象的 key 是 column 的 columnKey,对应的 value 为用户选择的筛选条件的数组。
     filterChange(filters) {
       let value = {};
@@ -415,7 +387,8 @@ export default {
       }
       if(startTime && endTime){
         if(startTime < endTime){
-          this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+          this.requestUrl = '/api/v1/otms/getArrivalResult?apiId=470"' + "&startTime=" + startTime + "&endTime=" + endTime + "&i="+"&con="+this.input; 
+          this.requestData(this.option)
         }else{
           this.startTime = null;
           this.endTime = null;
@@ -423,7 +396,8 @@ export default {
         }
       }else{
         console.log(startTime && endTime)
-         this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+         this.requestUrl = '/api/v1/otms/getArrivalResult?apiId=470"' + "&startTime=" + startTime + "&endTime=" + endTime + "&i="+"&con="+this.input; 
+        this.requestData(this.option)
       }
     },
    }