Ver código fonte

提交陆运台账

caojunjie 3 anos atrás
pai
commit
4602363b7b
1 arquivos alterados com 235 adições e 154 exclusões
  1. 235 154
      src/views/landTransportation/reportAnalysis/index.vue

+ 235 - 154
src/views/landTransportation/reportAnalysis/index.vue

@@ -312,6 +312,10 @@ export default {
             name: 'profit',
             type: 'sum',
             decimals: 2
+          }, {
+            name: 'extraAmountC',
+            type: 'sum',
+            decimals: 2
           }],
         column: [{
           label: '货运日期',
@@ -397,84 +401,122 @@ export default {
       this.goodsOptionCrud.searchMenuSpan = num * 8;
       this.goodsOptionCrud.searchMenuPosition = "right";
     }
-    if(this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1){
+    if(this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1||this.roleName.indexOf('车队') !== -1){
       this.goodsOptionCrud.menu = false;
       // this.goodsOptionCrud.column.forEach((item,index)=>{
       //   if (item.prop === 'corpShortName'){
       //     this.goodsOptionCrud.column.splice(index, 1)
       //   }
       // })
-      for (let item of this.goodsOptionCrud.column){
-        if (item.prop === 'dispatchDeptName') return false
+      if (this.roleName.indexOf('车队') !== -1){
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'dispatchDeptName') return false
+        }
+        return this.goodsOptionCrud.column.push(
+            {
+              label: '物流运输',
+              prop: 'dispatchDeptName',
+              overHidden: true,
+              index: 3,
+              width: 140
+            },{
+              label: '运输调度',
+              prop: 'dispatcherName',
+              overHidden: true,
+              index: 3,
+              width: 140,
+            },{
+              label: '车队',
+              width: 200,
+              search: true,
+              index: 9,
+              overHidden: true,
+              prop: 'fleetShortName'
+            },{
+              label: '应付运费',
+              overHidden: true,
+              index: 14,
+              prop: 'landAmountC'
+            }, {
+              label: '应付杂费',
+              overHidden: true,
+              index: 15,
+              prop: 'extraAmountC'
+            }, {
+              label: '应付杂费明细',
+              width: 100,
+              index: 18,
+              prop: 'extraAmountItemC'
+            })
+      }else {
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'dispatchDeptName') return false
+        }
+        return this.goodsOptionCrud.column.push(
+            {
+              label: '客户名称',
+              prop: 'corpShortName',
+              overHidden: true,
+              index: 1,
+              width: 140,
+              search: true,
+            },{
+              label: '运输调度',
+              prop: 'dispatcherName',
+              overHidden: true,
+              index: 3,
+              width: 140,
+            }, {
+              label: '业务员',
+              prop: 'salesmanName',
+              index: 2,
+              width: 140,
+            },{
+              label: '应收运费',
+              overHidden: true,
+              index: 11,
+              prop: 'landAmountD'
+            }, {
+              label: '应收杂费',
+              overHidden: true,
+              index: 12,
+              prop: 'extraAmountD'
+            }, {
+              label: '应收杂费明细',
+              width: 100,
+              index: 17,
+              prop: 'extraAmountItemD'
+            },{
+              label: '车队',
+              width: 100,
+              search: true,
+              index: 9,
+              overHidden: true,
+              prop: 'fleetShortName'
+            },{
+              label: '应付运费',
+              overHidden: true,
+              index: 14,
+              prop: 'landAmountC'
+            }, {
+              label: '应付杂费',
+              overHidden: true,
+              index: 15,
+              prop: 'extraAmountC'
+            }, {
+              label: '利润',
+              width: 100,
+              precision: 2,
+              index: 16,
+              type: 'number',
+              prop: 'profit'
+            }, {
+              label: '应付杂费明细',
+              width: 100,
+              index: 18,
+              prop: 'extraAmountItemC'
+            })
       }
-      return this.goodsOptionCrud.column.push({
-        label: '运输调度',
-        prop: 'dispatcherName',
-        overHidden: true,
-        index: 3,
-        width: 140,
-      },{
-        label: '运输调度',
-        prop: 'dispatcherName',
-        overHidden: true,
-        index: 3,
-        width: 140,
-      },{
-        label: '物流运输',
-        prop: 'dispatchDeptName',
-        overHidden: true,
-        index: 3,
-        width: 140
-      }, {
-        label: '业务员',
-        prop: 'salesmanName',
-        index: 2,
-        width: 140,
-      },{
-        label: '应收运费',
-        overHidden: true,
-        index: 11,
-        prop: 'landAmountD'
-      }, {
-        label: '应收杂费',
-        overHidden: true,
-        index: 12,
-        prop: 'extraAmountD'
-      }, {
-        label: '应收杂费明细',
-        width: 100,
-        index: 17,
-        prop: 'extraAmountItemD'
-      },{
-        label: '车队',
-        width: 100,
-        search: true,
-        index: 9,
-        overHidden: true,
-        prop: 'fleetShortName'
-      },{
-        label: '应付运费',
-        overHidden: true,
-        index: 14,
-        prop: 'landAmountC'
-      }, {
-        label: '应付杂费',
-        overHidden: true,
-        index: 15,
-        prop: 'extraAmountC'
-      }, {
-        label: '利润',
-        width: 100,
-        precision: 2,
-        index: 16,
-        type: 'number',
-        prop: 'profit'
-      }, {
-        label: '应付杂费明细',
-        width: 100,
-        index: 18,
-        prop: 'extraAmountItemC'
-      })
     }
     if(this.roleName.indexOf('客户') !== -1){
       this.goodsOptionCrud.menu = true
@@ -536,12 +578,6 @@ export default {
         width: 140,
         search: true,
       },{
-        label: '物流运输',
-        prop: 'dispatchDeptName',
-        overHidden: true,
-        index: 3,
-        width: 140
-      },{
         label: '运输调度',
         prop: 'dispatcherName',
         overHidden: true,
@@ -552,6 +588,12 @@ export default {
         overHidden: true,
         index: 14,
         prop: 'landAmountC'
+      },{
+        label: '物流运输',
+        prop: 'dispatchDeptName',
+        overHidden: true,
+        index: 3,
+        width: 140
       }, {
         label: '业务员',
         prop: 'salesmanName',
@@ -673,84 +715,123 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-      if(this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1){
+
+      if(this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1||this.roleName.indexOf('车队') !== -1){
         this.goodsOptionCrud.menu = false;
         // this.goodsOptionCrud.column.forEach((item,index)=>{
         //   if (item.prop === 'corpShortName'){
         //     this.goodsOptionCrud.column.splice(index, 1)
         //   }
         // })
-        for (let item of this.goodsOptionCrud.column){
-          if (item.prop === 'dispatchDeptName') return false
+        if (this.roleName.indexOf('车队') !== -1){
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'dispatchDeptName') return false
+          }
+          return this.goodsOptionCrud.column.push(
+              {
+                label: '物流运输',
+                prop: 'dispatchDeptName',
+                overHidden: true,
+                index: 3,
+                width: 140
+              },{
+                label: '运输调度',
+                prop: 'dispatcherName',
+                overHidden: true,
+                index: 3,
+                width: 140,
+              },{
+                label: '车队',
+                width: 200,
+                search: true,
+                index: 9,
+                overHidden: true,
+                prop: 'fleetShortName'
+              },{
+                label: '应付运费',
+                overHidden: true,
+                index: 14,
+                prop: 'landAmountC'
+              }, {
+                label: '应付杂费',
+                overHidden: true,
+                index: 15,
+                prop: 'extraAmountC'
+              }, {
+                label: '应付杂费明细',
+                width: 100,
+                index: 18,
+                prop: 'extraAmountItemC'
+              })
+        }else {
+          for (let item of this.goodsOptionCrud.column){
+            if (item.prop === 'dispatchDeptName') return false
+          }
+          return this.goodsOptionCrud.column.push(
+              {
+                label: '客户名称',
+                prop: 'corpShortName',
+                overHidden: true,
+                index: 1,
+                width: 140,
+                search: true,
+              },{
+                label: '运输调度',
+                prop: 'dispatcherName',
+                overHidden: true,
+                index: 3,
+                width: 140,
+              }, {
+                label: '业务员',
+                prop: 'salesmanName',
+                index: 2,
+                width: 140,
+              },{
+                label: '应收运费',
+                overHidden: true,
+                index: 11,
+                prop: 'landAmountD'
+              }, {
+                label: '应收杂费',
+                overHidden: true,
+                index: 12,
+                prop: 'extraAmountD'
+              }, {
+                label: '应收杂费明细',
+                width: 100,
+                index: 17,
+                prop: 'extraAmountItemD'
+              },{
+                label: '车队',
+                width: 100,
+                search: true,
+                index: 9,
+                overHidden: true,
+                prop: 'fleetShortName'
+              },{
+                label: '应付运费',
+                overHidden: true,
+                index: 14,
+                prop: 'landAmountC'
+              }, {
+                label: '应付杂费',
+                overHidden: true,
+                index: 15,
+                prop: 'extraAmountC'
+              }, {
+                label: '利润',
+                width: 100,
+                precision: 2,
+                index: 16,
+                type: 'number',
+                prop: 'profit'
+              }, {
+                label: '应付杂费明细',
+                width: 100,
+                index: 18,
+                prop: 'extraAmountItemC'
+              })
         }
-        return this.goodsOptionCrud.column.push({
-          label: '运输调度',
-          prop: 'dispatcherName',
-          overHidden: true,
-          index: 3,
-          width: 140,
-        },{
-          label: '运输调度',
-          prop: 'dispatcherName',
-          overHidden: true,
-          index: 3,
-          width: 140,
-        },{
-          label: '物流运输',
-          prop: 'dispatchDeptName',
-          overHidden: true,
-          index: 3,
-          width: 140
-        }, {
-          label: '业务员',
-          prop: 'salesmanName',
-          index: 2,
-          width: 140,
-        },{
-          label: '应收运费',
-          overHidden: true,
-          index: 11,
-          prop: 'landAmountD'
-        }, {
-          label: '应收杂费',
-          overHidden: true,
-          index: 12,
-          prop: 'extraAmountD'
-        }, {
-          label: '应收杂费明细',
-          width: 100,
-          index: 17,
-          prop: 'extraAmountItemD'
-        },{
-          label: '车队',
-          width: 100,
-          search: true,
-          index: 9,
-          overHidden: true,
-          prop: 'fleetShortName'
-        },{
-          label: '应付运费',
-          overHidden: true,
-          index: 14,
-          prop: 'landAmountC'
-        }, {
-          label: '应付杂费',
-          overHidden: true,
-          index: 15,
-          prop: 'extraAmountC'
-        }, {
-          label: '利润',
-          width: 100,
-          precision: 2,
-          index: 16,
-          type: 'number',
-          prop: 'profit'
-        }, {
-          label: '应付杂费明细',
-          width: 100,
-          index: 18,
-          prop: 'extraAmountItemC'
-        })
       }
       if(this.roleName.indexOf('客户') !== -1){
         this.goodsOptionCrud.menu = true
@@ -812,12 +893,6 @@ export default {
           width: 140,
           search: true,
         },{
-          label: '物流运输',
-          prop: 'dispatchDeptName',
-          overHidden: true,
-          index: 3,
-          width: 140
-        },{
           label: '运输调度',
           prop: 'dispatcherName',
           overHidden: true,
@@ -828,6 +903,12 @@ export default {
           overHidden: true,
           index: 14,
           prop: 'landAmountC'
+        },{
+          label: '物流运输',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 3,
+          width: 140
         }, {
           label: '业务员',
           prop: 'salesmanName',