فهرست منبع

提交陆运修改

caojunjie 3 سال پیش
والد
کامیت
4d0f03f2bd

+ 6 - 0
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -749,6 +749,7 @@ export default {
         refreshBtn: false,
         selection: true,
         selectionWidth: 55,
+        menu:true,
         tip: false,
         addBtn: false,
         cancelBtn: false,
@@ -1635,6 +1636,11 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
       }
+      if (this.roleNameTwo.indexOf('总调度') !== -1){
+        this.entrustOptionTwoT.menu = false
+        this.collectionOption.menu = false
+        this.paymentOption.menu = false
+      }
     },
     //自定义列保存
     async saveColumnCollection() {

+ 24 - 22
src/views/landTransportation/dispatchingCars/index.vue

@@ -172,12 +172,6 @@ export default {
               label: "realName",
               value: "id"
             }
-          },{
-            label: '物流运输',
-            prop: 'dispatchDeptName',
-            overHidden: true,
-            index: 2,
-            width: 100
           }, {
             label: '运输调度',
             prop: 'dispatcherName',
@@ -223,17 +217,16 @@ export default {
             index: 8,
             width: 140
           }, {
-            label: '运费',
+            label: '车队',
             index: 9,
             width: 140,
-            prop: 'freight'
+            overHidden: true,
+            prop: 'fleetNameDetail'
           }, {
-            label: '订单号',
-            prop: 'orderNo',
+            label: '运费',
             index: 10,
-            overHidden: true,
-            width: 160,
-            search: true,
+            width: 140,
+            prop: 'freight'
           }, {
             label: '状态',
             prop: 'itemStatusDetail',
@@ -247,6 +240,13 @@ export default {
             index: 12,
             width: 140,
             search: true,
+          }, {
+            label: '订单号',
+            prop: 'orderNo',
+            index: 13,
+            overHidden: true,
+            width: 160,
+            search: true,
           }
           // , {
           //   label: '所属公司',
@@ -264,14 +264,16 @@ export default {
           //   width: 140,
           //   search: true,
           // }
-          , {
-            label: '船名航次',
-            prop: 'factory',
-            overHidden: true,
-            index: 14,
-            width: 140,
-            search: true,
-          }, {
+          // , {
+          //   label: '船名航次',
+          //   prop: 'factory',
+          //   overHidden: true,
+          //   index: 14,
+          //   width: 140,
+          //   search: true,
+          // }
+          ,
+          {
             label: '制单日期',
             overHidden: true,
             prop: 'createTime',
@@ -320,7 +322,7 @@ export default {
           this_.totalData = res.data.data
         })
       }
-    }, 5000)
+    }, 10000)
   },
   beforeDestroy() {
     clearInterval(this.dispatchTimer); //关闭

+ 16 - 4
src/views/landTransportation/driver/index.vue

@@ -260,6 +260,18 @@ export default {
           index: 1,
           width: 140,
           search: true,
+        }, {
+          label: '物流运输',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 1,
+          width: 140,
+        }, {
+          label: '运输调度',
+          prop: 'dispatcherName',
+          overHidden: true,
+          index: 1,
+          width: 140,
         },{
           label: '货运地点',
           index: 2,
@@ -268,7 +280,7 @@ export default {
           prop: 'addressDetail'
         },{
           label: '提单号',
-          width: 100,
+          width: 140,
           index:3,
           search: true,
           overHidden: true,
@@ -362,7 +374,7 @@ export default {
           defaultTime: ['00:00:00', '23:59:59'],
           format: "yyyy-MM-dd HH:mm:ss",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          index: 13,
+          index: 14,
           width: 140
         },{
           label: '受理日期',
@@ -370,7 +382,7 @@ export default {
           format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           width: 200,
-          index: 14,
+          index: 13,
           prop: 'acceptTime'
         },{
           label: '提箱时间',
@@ -378,7 +390,7 @@ export default {
           format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           width: 200,
-          index: 15,
+          index: 13,
           prop: 'acceptTime'
         },{
           label: '完工日期',

+ 15 - 15
src/views/landTransportation/motorcadeDriver/index.vue

@@ -381,6 +381,18 @@ export default {
           width: 145,
           search: true,
         }, {
+          label: '物流运输',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 1,
+          width: 140,
+        }, {
+          label: '运输调度',
+          prop: 'dispatcherName',
+          overHidden: true,
+          index: 1,
+          width: 140,
+        }, {
           label: '货运地点',
           index: 2,
           width: 160,
@@ -388,7 +400,7 @@ export default {
           prop: 'addressDetail'
         }, {
           label: '提单号',
-          width: 100,
+          width: 140,
           index: 3,
           search: true,
           overHidden: true,
@@ -504,7 +516,7 @@ export default {
             defaultTime: ['00:00:00', '23:59:59'],
             format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
-            index: 13,
+            index: 14,
             width: 140
           },{
             label: '受理日期',
@@ -512,7 +524,7 @@ export default {
             format: 'yyyy-MM-dd HH:mm',
             valueFormat: 'yyyy-MM-dd HH:mm:ss',
             width: 200,
-            index: 14,
+            index: 13,
             prop: 'acceptTime'
           },{
             label: '完工日期',
@@ -678,18 +690,6 @@ export default {
             index: 31,
             width: 140,
             search: true,
-          }, {
-            label: '物流运输',
-            prop: 'dispatchDeptName',
-            overHidden: true,
-            index: 32,
-            width: 140,
-          }, {
-            label: '运输调度',
-            prop: 'dispatcherName',
-            overHidden: true,
-            index: 33,
-            width: 140,
           }
         ]
       },

+ 50 - 1
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -20,11 +20,20 @@
         </el-button>
         <el-button
             type="danger"
+            v-if="returnButton"
             style="border: none;background: none;color: red"
             icon="el-icon-arrow-left"
             @click="backToList(2)"
         >返回首页
         </el-button>
+        <el-button
+            type="danger"
+            v-if="!returnButton"
+            style="border: none;background: none;color: red"
+            icon="el-icon-arrow-left"
+            @click="backToList(3)"
+        >返回台账
+        </el-button>
       </div>
       <div>
         <el-button
@@ -553,6 +562,7 @@ export default {
   },
   data() {
     return {
+      returnButton:Boolean,
       dialogVisible: false,
       lineArr: [],
       activeIndex: '1',
@@ -1495,7 +1505,42 @@ export default {
           //查询业务员
           this.salesmanQuery()
         })
-      } else {
+      } else if (this.id.slice(0, 2) === '首页'||this.id.slice(0, 2) === '台账') {
+        if (this.id.slice(0, 2) === '首页'){
+          this.returnButton = true
+        }else {
+          this.returnButton = false
+        }
+        detailDelegationList({id: this.id.slice(2, this.id.length), kind: '1'}).then(res => {
+          this.goodsForm = res.data.data
+          this.tableData = res.data.data.orderAddressList
+          this.entrustList = res.data.data.itemList
+          this.goodsList = res.data.data.itemList
+          this.vehicleList = res.data.data.orderItemList
+          this.orderFilesList = res.data.data.fileList
+          if (res.data.data.orderFeeList.length > 0) {
+            res.data.data.orderFeeList.forEach(item => {
+              if (item.type == 1) {
+                this.collectionList.push(item)
+              } else {
+                this.paymentList.push(item)
+              }
+            })
+          }
+          this.goodsOptionFormTwo.disabled = this.goodsOptionForm.disabled = this.goodsOptionFormC.disabled = this.collectionOption.disabled = this.paymentOption.disabled = this.goodsForm.status !== 0
+          delete this.goodsForm.orderAddressList
+          delete this.goodsForm.itemList
+          delete this.goodsForm.orderFeeList
+          // this.tableData.forEach(item => {
+          //   if (item.region) item.region = item.region.split(',')
+          // })
+          //查询业务员
+          this.salesmanQuery()
+          if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+            this.goodsForm.status = 2
+          }
+        })
+      }else {
         detailDelegationList({id: this.id, kind: '1'}).then(res => {
           this.goodsForm = res.data.data
           this.tableData = res.data.data.orderAddressList
@@ -1766,6 +1811,10 @@ export default {
         this.$router.push({
           path: '/wel/index'
         });
+      } else if (value === 3) {
+        this.$router.push({
+          path: '/landTransportation/reportAnalysis/index'
+        });
       }
     },
     //删除途径地址

+ 28 - 24
src/views/landTransportation/placeAnOrder/index.vue

@@ -244,12 +244,6 @@ export default {
             index: 2,
             width: 100
           }, {
-            label: '运输调度',
-            prop: 'dispatcherName',
-            overHidden: true,
-            index: 2,
-            width: 100,
-          }, {
             label: '货运地点',
             prop: 'addressDetail',
             index: 3,
@@ -293,13 +287,6 @@ export default {
             width: 140,
             prop: 'freight'
           }, {
-            label: '订单号',
-            prop: 'orderNo',
-            index: 10,
-            overHidden: true,
-            width: 160,
-            search: true,
-          }, {
             label: '状态',
             prop: 'itemStatusDetail',
             index: 11,
@@ -307,11 +294,18 @@ export default {
             width: 140
           }, {
             label: '公司名称',
-            prop: 'shortName',
+            prop: 'corpShortName',
             overHidden: true,
             index: 12,
             width: 140,
             search: true,
+          }, {
+            label: '订单号',
+            prop: 'orderNo',
+            index: 13,
+            overHidden: true,
+            width: 160,
+            search: true,
           }
           // , {
           //   label: '所属公司',
@@ -328,15 +322,16 @@ export default {
           //   index: 13,
           //   width: 140,
           //   search: true,
+          // }, {
+          //   label: '船名航次',
+          //   prop: 'factory',
+          //   overHidden: true,
+          //   index: 14,
+          //   width: 140,
+          //   search: true,
           // }
-          , {
-            label: '船名航次',
-            prop: 'factory',
-            overHidden: true,
-            index: 14,
-            width: 140,
-            search: true,
-          }, {
+          ,
+          {
             label: '制单日期',
             overHidden: true,
             prop: 'createTime',
@@ -370,10 +365,19 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
-    if (this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1) {
+    if (this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
       this.option.menu = false
       this.option.header = false
     }
+    if(!(this.roleName.indexOf('客户') !== -1)){
+      this.option.column.push({
+        label: '运输调度',
+        prop: 'dispatcherName',
+        overHidden: true,
+        index: 2,
+        width: 100,
+      })
+    }
     if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
@@ -388,7 +392,7 @@ export default {
           this_.totalData = res.data.data
         })
       }
-    }, 5000)
+    }, 10000)
   },
   beforeDestroy() {
     clearInterval(this.entrustTimer); //关闭

+ 239 - 89
src/views/landTransportation/reportAnalysis/index.vue

@@ -26,7 +26,8 @@
           <span>{{ row.fleetName }}</span>
         </template>
         <template slot="billNo" slot-scope="{row,index}">
-          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{ row.billNo }}</span>
+          <span v-if="roleName.indexOf('车队') !== -1" style="cursor: pointer">{{ row.billNo }}</span>
+          <span class="el-button--text" v-else style="cursor: pointer" @click.stop="celJump(row,index)">{{ row.billNo }}</span>
         </template>
         <template slot="corpName" slot-scope="{row,index}">
           <span class="el-button--text" style="cursor: pointer"
@@ -313,13 +314,6 @@ export default {
             decimals: 2
           }],
         column: [{
-          label: '客户名称',
-          prop: 'corpShortName',
-          overHidden: true,
-          index: 1,
-          width: 140,
-          search: true,
-        }, {
           label: '货运日期',
           prop: 'arrivalTime',
           overHidden: true,
@@ -403,80 +397,142 @@ 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)
+      // this.goodsOptionCrud.column.forEach((item,index)=>{
+      //   if (item.prop === 'corpShortName'){
+      //     this.goodsOptionCrud.column.splice(index, 1)
+      //   }
+      // })
+      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: 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,
+              precision: 2,
+              index: 16,
+              type: 'number',
+              prop: 'profit'
+            }, {
+              label: '应付杂费明细',
+              width: 100,
+              index: 18,
+              prop: 'extraAmountItemC'
+            })
+      }
+    }
+    if(this.roleName.indexOf('客户') !== -1){
+      this.goodsOptionCrud.menu = true
       for (let item of this.goodsOptionCrud.column){
-        if (item.prop === 'dispatchDeptName') return false
+        if (item.prop === 'landAmountD') return
       }
       return this.goodsOptionCrud.column.push({
-        label: '物流运输',
-        prop: 'dispatchDeptName',
-        overHidden: true,
-        index: 1,
-        width: 140
-      }, {
-        label: '运输调度',
-        prop: 'dispatcherName',
+        label: '客户名称',
+        prop: 'corpShortName',
         overHidden: true,
         index: 1,
         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: 200,
         search: true,
-        index: 9,
-        overHidden: true,
-        prop: 'fleetShortName'
       },{
-        label: '应付运费',
-        overHidden: true,
-        index: 14,
-        prop: 'landAmountC'
-      }, {
-        label: '应付杂费',
+        label: '物流运输',
+        prop: 'dispatchDeptName',
         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
-      for (let item of this.goodsOptionCrud.column){
-        if (item.prop === 'landAmountD') return
-      }
-      return this.goodsOptionCrud.column.push({
+        index: 3,
+        width: 140
+      },{
         label: '应收运费',
         overHidden: true,
         index: 11,
@@ -484,7 +540,7 @@ export default {
       }, {
         label: '业务员',
         prop: 'salesmanName',
-        index: 3,
+        index: 2,
         width: 140,
       }, {
         label: '应收杂费',
@@ -505,20 +561,39 @@ export default {
         prop: 'fleetShortName'
       })
     }
-    if(this.roleName.indexOf('平台') !== -1){
+    if(this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('管理员') !== -1){
       this.goodsOptionCrud.menu = false
       for (let item of this.goodsOptionCrud.column){
         if (item.prop === 'landAmountC') return
       }
       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: '应付运费',
         overHidden: true,
         index: 14,
         prop: 'landAmountC'
+      },{
+        label: '物流运输',
+        prop: 'dispatchDeptName',
+        overHidden: true,
+        index: 3,
+        width: 140
       }, {
         label: '业务员',
         prop: 'salesmanName',
-        index: 3,
+        index: 2,
         width: 140,
       }, {
         label: '应付杂费',
@@ -638,27 +713,53 @@ export default {
       }
       if(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)
-          }
-        })
+        // 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
         }
         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: 1,
+          index: 3,
           width: 140
         }, {
-          label: '运输调度',
-          prop: 'dispatcherName',
-          overHidden: true,
-          index: 1,
+          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: 200,
           search: true,
@@ -695,11 +796,29 @@ export default {
           if (item.prop === 'landAmountD') return
         }
         return this.goodsOptionCrud.column.push({
+          label: '客户名称',
+          prop: 'corpShortName',
+          overHidden: true,
+          index: 1,
+          width: 140,
+          search: true,
+        },{
+          label: '物流运输',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 3,
+          width: 140
+        },{
           label: '应收运费',
           overHidden: true,
           index: 11,
           prop: 'landAmountD'
         }, {
+          label: '业务员',
+          prop: 'salesmanName',
+          index: 2,
+          width: 140,
+        }, {
           label: '应收杂费',
           overHidden: true,
           index: 12,
@@ -718,17 +837,41 @@ export default {
           prop: 'fleetShortName'
         })
       }
-      if(this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('admin') !== -1){
+      if(this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1 || this.roleName.indexOf('管理员') !== -1){
         this.goodsOptionCrud.menu = false
         for (let item of this.goodsOptionCrud.column){
           if (item.prop === 'landAmountC') return
         }
         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: 'dispatchDeptName',
+          overHidden: true,
+          index: 3,
+          width: 140
+        },{
           label: '应付运费',
           overHidden: true,
           index: 14,
           prop: 'landAmountC'
         }, {
+          label: '业务员',
+          prop: 'salesmanName',
+          index: 2,
+          width: 140,
+        }, {
           label: '应付杂费',
           overHidden: true,
           index: 15,
@@ -772,10 +915,17 @@ export default {
     },
     //行跳转
     celJump(row, index) {
-      this.$router.push({
-        path: '/landTransportation/dispatchingCars/index',
-        query: {orderId: row.orderId},
-      });
+      if (this.roleName.indexOf('平台') !== -1){
+        this.$router.push({
+          path: '/landTransportation/dispatchingCars/index',
+          query: {orderId: row.orderId},
+        });
+      }else {
+        this.$router.push({
+          path: '/landTransportation/placeAnOrder/index',
+          query: {id: '台账'+row.orderId},
+        });
+      }
     },
     // 获得高度
     searchCriteriaSwitch(type) {

+ 25 - 14
src/views/wel/home/landTransportation/components/quick-launch.vue

@@ -101,22 +101,27 @@ export default {
     sysType: Number
   },
   mounted() {
+    // entrust
+    // 委托
+    // dispatch
+    // 调度
+    // sendACar
+    // 派车
+    // track
+    // 跟踪
+    // sBook
+    // 台账
+    // reminder
+    // 到期提醒
     if (this.roleName.indexOf('平台') !== -1){
       if (this.roleName.indexOf('总调度') !== -1 || this.roleName.indexOf('分管调度') !== -1){
         // 调度、台账、到期提醒
+        this.entrust = true //委托
         this.dispatch = true //调度
         this.sBook = true //台账
         this.reminder = true //到期提醒
       }
     }
-    if (this.roleName.indexOf('admin') !== -1){
-      this.entrust = true
-      this.dispatch = true
-      this.sBook = true
-      this.reminder = true
-      this.sendACar = true
-      this.track = true
-    }
     if (this.roleName.indexOf('客户') !== -1){
       if (this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('业务员') !== -1){
         // 委托、台账
@@ -124,20 +129,26 @@ export default {
         this.sBook = true //台账
       }else {
         this.entrust = true
+        this.sBook = true
         this.dispatch = false
-        this.sBook = false
         this.reminder = false
         this.sendACar = false
         this.track = false
       }
     }
     if (this.roleName.indexOf('车队') !== -1){
-      this.entrust = false
-      this.dispatch = false
-      this.sBook = false
-      this.reminder = false
       this.sendACar = true
-      this.track = false
+      this.track = true
+      this.sBook = true
+      this.reminder = true
+    }
+    if (this.roleName.indexOf('admin') !== -1){
+      this.entrust = true
+      this.dispatch = true
+      this.sBook = true
+      this.reminder = true
+      this.sendACar = true
+      this.track = true
     }
   },
   methods: {

+ 225 - 53
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -89,13 +89,6 @@ export default {
             overHidden: true,
           },
           {
-            label: '业务员',
-            prop: 'salesmanName',
-            index: 2,
-            width: 60,
-            overHidden: true,
-          },
-          {
             label: '货运地点',
             prop: 'addressDetail',
             index: 3,
@@ -128,18 +121,6 @@ export default {
             index: 7,
             width: 100,
             overHidden: true,
-          },{
-            label: '物流运输',
-            prop: 'dispatchDeptName',
-            overHidden: true,
-            index: 9,
-            width: 100
-          }, {
-            label: '运输调度',
-            prop: 'dispatcherName',
-            overHidden: true,
-            index: 10,
-            width: 100,
           },
           {
             label: '车队',
@@ -168,19 +149,37 @@ export default {
             index: 13,
             width: 100,
             overHidden: true,
-          },
-          {
-            label: '运费',
-            prop: 'landAmountD',
-            index: 14,
+          }, {
+            label: '备注',
+            prop: 'remarks',
+            index: 17,
             width: 100,
             overHidden: true,
           },
+        ]
+      },
+    };
+  },
+  async mounted() {
+    this.option = await this.getColumnData(this.getColumnName(140), this.optionList);
+    this.key++
+    this.init();
+    if (this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1) {
+      for (let item of this.option.column) {
+        if (item.prop === 'extraAmountC') return
+      }
+      this.option.column.push(
           {
-            label: '应收杂费',
-            prop: 'extraAmountD',
-            index: 15,
+            label: '运输调度',
+            prop: 'dispatcherName',
+            overHidden: true,
+            index: 10,
             width: 100,
+          }, {
+            label: '业务员',
+            prop: 'salesmanName',
+            index: 2,
+            width: 60,
             overHidden: true,
           },
           {
@@ -189,35 +188,102 @@ export default {
             index: 16,
             width: 100,
             overHidden: true,
-          }, {
-            label: '备注',
-            prop: 'remarks',
-            index: 17,
+          },{
+            label: '应付杂费',
+            prop: 'extraAmountC',
+            index: 14,
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: '应收运费',
+            prop: 'landAmountD',
+            index: 13,
             width: 100,
             overHidden: true,
           },
-        ]
-      },
-    };
-  },
-  async mounted() {
-    this.option = await this.getColumnData(this.getColumnName(140), this.optionList);
-    this.key++
-    this.init();
-    for (let item of this.option.column) {
-      if (item.prop === 'extraAmountC') return
+          {
+            label: '应收杂费',
+            prop: 'extraAmountD',
+            index: 13,
+            width: 100,
+            overHidden: true,
+          }
+      )
     }
-    if (this.roleName.indexOf('平台') !== -1) {
+    if (this.roleName.indexOf('车队') !== -1) {
+      for (let item of this.option.column) {
+        if (item.prop === 'extraAmountC') return
+      }
       this.option.column.push(
           {
+            label: '物流运输',
+            prop: 'dispatchDeptName',
+            overHidden: true,
+            index: 1,
+            width: 100
+          }, {
+            label: '运输调度',
+            prop: 'dispatcherName',
+            overHidden: true,
+            index: 1,
+            width: 100,
+          }, {
+            label: '应付运费',
+            prop: 'landAmountC',
+            index: 13,
+            width: 100,
+            overHidden: true,
+          },{
             label: '应付杂费',
             prop: 'extraAmountC',
-            index: 12,
+            index: 13,
             width: 100,
             overHidden: true
           }
       )
     }
+    if (this.roleName.indexOf('客户') !== -1) {
+      for (let item of this.option.column) {
+        if (item.prop === 'salesmanName') return
+      }
+      this.option.column.push(
+          {
+            label: '物流运输',
+            prop: 'dispatchDeptName',
+            overHidden: true,
+            index: 9,
+            width: 100
+          }, {
+            label: '业务员',
+            prop: 'salesmanName',
+            index: 2,
+            width: 60,
+            overHidden: true,
+          },
+          {
+            label: '客户名称',
+            prop: 'corpShortName',
+            index: 16,
+            width: 100,
+            overHidden: true,
+          },
+          {
+            label: '应收运费',
+            prop: 'landAmountD',
+            index: 14,
+            width: 100,
+            overHidden: true,
+          },
+          {
+            label: '应收杂费',
+            prop: 'extraAmountD',
+            index: 15,
+            width: 100,
+            overHidden: true,
+          }
+      )
+    }
   },
   beforeDestroy() {
     this.map && this.map.destroy();
@@ -245,22 +311,127 @@ export default {
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
-        for (let item of this.option.column) {
-          if (item.prop === 'extraAmountC') return false
+        this.key++
+        if (this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('总调度') !== -1||this.roleName.indexOf('分管调度') !== -1) {
+          for (let item of this.option.column) {
+            if (item.prop === 'extraAmountC') return
+          }
+          this.option.column.push(
+              {
+                label: '运输调度',
+                prop: 'dispatcherName',
+                overHidden: true,
+                index: 10,
+                width: 100,
+              }, {
+                label: '业务员',
+                prop: 'salesmanName',
+                index: 2,
+                width: 60,
+                overHidden: true,
+              },
+              {
+                label: '客户名称',
+                prop: 'corpShortName',
+                index: 16,
+                width: 100,
+                overHidden: true,
+              },{
+                label: '应付杂费',
+                prop: 'extraAmountC',
+                index: 14,
+                width: 100,
+                overHidden: true
+              },
+              {
+                label: '应收运费',
+                prop: 'landAmountD',
+                index: 13,
+                width: 100,
+                overHidden: true,
+              },
+              {
+                label: '应收杂费',
+                prop: 'extraAmountD',
+                index: 13,
+                width: 100,
+                overHidden: true,
+              }
+          )
         }
-        if (this.roleName.indexOf('平台') !== -1) {
-          console.log(this.option.column)
+        if (this.roleName.indexOf('车队') !== -1) {
+          for (let item of this.option.column) {
+            if (item.prop === 'extraAmountC') return
+          }
           this.option.column.push(
               {
+                label: '物流运输',
+                prop: 'dispatchDeptName',
+                overHidden: true,
+                index: 1,
+                width: 100
+              }, {
+                label: '运输调度',
+                prop: 'dispatcherName',
+                overHidden: true,
+                index: 1,
+                width: 100,
+              }, {
+                label: '应付运费',
+                prop: 'landAmountC',
+                index: 13,
+                width: 100,
+                overHidden: true,
+              },{
                 label: '应付杂费',
                 prop: 'extraAmountC',
-                index: 12,
+                index: 13,
                 width: 100,
                 overHidden: true
               }
           )
         }
-        this.key++
+        if (this.roleName.indexOf('客户') !== -1) {
+          for (let item of this.option.column) {
+            if (item.prop === 'salesmanName') return
+          }
+          this.option.column.push(
+              {
+                label: '物流运输',
+                prop: 'dispatchDeptName',
+                overHidden: true,
+                index: 9,
+                width: 100
+              }, {
+                label: '业务员',
+                prop: 'salesmanName',
+                index: 2,
+                width: 60,
+                overHidden: true,
+              },
+              {
+                label: '客户名称',
+                prop: 'corpShortName',
+                index: 16,
+                width: 100,
+                overHidden: true,
+              },
+              {
+                label: '应收运费',
+                prop: 'landAmountD',
+                index: 14,
+                width: 100,
+                overHidden: true,
+              },
+              {
+                label: '应收杂费',
+                prop: 'extraAmountD',
+                index: 15,
+                width: 100,
+                overHidden: true,
+              }
+          )
+        }
       }
     },
     openTrack(row, index) {
@@ -317,7 +488,7 @@ export default {
           + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + plateNo + '</p>'
           + '<p style="padding: 5px 0"><span style="color: #a0a0a0">最后上报时间:</span>' + new Date(Number(data.time) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19) + '</p>'
           + '<div style="width: 150px;float: left;">'
-          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">车辆状态:</span>'+(data.speed>0?'行驶中':'停车')+'</p>'
+          + '<p style="padding: 5px 0"><span style="color: #a0a0a0">车辆状态:</span>' + (data.speed > 0 ? '行驶中' : '停车') + '</p>'
           + '</div>'
           + '<div style="width: 150px;float: right;">'
           + '<p style="padding: 5px 0"><span style="color: #a0a0a0">速度:</span>' + data.speed + 'km/h</p>'
@@ -404,11 +575,12 @@ export default {
   padding: 0 20px 10px 20px !important;
 }
 
-::v-deep .amap-info-close{
-  right: 10px!important;
+::v-deep .amap-info-close {
+  right: 10px !important;
   top: 12px !important;
 }
-::v-deep .amap-info-content{
+
+::v-deep .amap-info-content {
   padding: 5px 5px 5px 5px !important;
 }
 </style>