فهرست منبع

提交陆运修改

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

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

@@ -1108,6 +1108,8 @@ export default {
             trigger: "blur"
           }]
         }, {
+          // dispatchDept: "1123598813738675201"
+          // dispatchDept: "1123598813738675201"
           label: '调度公司',
           prop: 'dispatchDept',
           cascader: ['dispatcher'],

+ 0 - 4
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -1575,10 +1575,6 @@ export default {
         const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
         column.dicData = res.data.data;
       });
-      getDeptTree(tenantId).then(res => {
-        const column = this.findObject(this.goodsOptionForm.column, "dispatchDept");
-        column.dicData = res.data.data;
-      });
     },
     //查询业务员
     salesmanQuery(realName) {

+ 280 - 272
src/views/landTransportation/reportAnalysis/index.vue

@@ -379,13 +379,6 @@ export default {
             overHidden: true,
             prop: 'ctnDetail'
           }, {
-            label: '车队',
-            width: 200,
-            search: true,
-            index: 9,
-            overHidden: true,
-            prop: 'fleetShortName'
-          }, {
             label: '车号',
             width: 150,
             prop: 'plateNo',
@@ -405,139 +398,6 @@ export default {
   async created() {
     this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.1), this.optionList);
     this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
-    this.roleName.forEach(item =>{
-      if (item == '客户'){
-        this.goodsOptionCrud.menu = true
-        for (let item of this.goodsOptionCrud.column){
-          if (item.prop === 'landAmountD') return
-        }
-        return this.goodsOptionCrud.column.push({
-          label: '应收运费',
-          overHidden: true,
-          index: 11,
-          prop: 'landAmountD'
-        }, {
-          label: '应收杂费',
-          overHidden: true,
-          index: 12,
-          prop: 'extraAmountD'
-        }, {
-          label: '应收杂费明细',
-          width: 100,
-          index: 17,
-          prop: 'extraAmountItemD'
-        })
-      }else if (item == '平台') {
-        this.goodsOptionCrud.menu = false
-        for (let item of this.goodsOptionCrud.column){
-          if (item.prop === 'landAmountC') return
-        }
-        return this.goodsOptionCrud.column.push( {
-          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'
-        },{
-          label: '应收运费',
-          overHidden: true,
-          index: 11,
-          prop: 'landAmountD'
-        }, {
-          label: '应收杂费',
-          overHidden: true,
-          index: 12,
-          prop: 'extraAmountD'
-        }, {
-          label: '应收杂费明细',
-          width: 100,
-          index: 17,
-          prop: 'extraAmountItemD'
-        })
-      } else if (item == '调度'){
-        this.goodsOptionCrud.menu = false
-        for (let item of this.goodsOptionCrud.column){
-          if (item.prop === 'landAmountC') return
-        }
-        return this.goodsOptionCrud.column.push( {
-          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'
-        })
-      }else {
-        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
-        }
-        return this.goodsOptionCrud.column.push({
-          label: '调度公司',
-          prop: 'dispatchDeptName',
-          overHidden: true,
-          index: 1,
-          width: 140
-        }, {
-          label: '调度员',
-          prop: 'dispatcherName',
-          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'
-        })
-      }
-    })
     this.key++
     let i = 0;
     this.goodsOptionCrud.column.forEach(item => {
@@ -548,6 +408,154 @@ export default {
       this.goodsOptionCrud.searchMenuSpan = num * 8;
       this.goodsOptionCrud.searchMenuPosition = "right";
     }
+    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)
+        }
+      })
+      for (let item of this.goodsOptionCrud.column){
+        if (item.prop === 'dispatchDeptName') return false
+      }
+      return this.goodsOptionCrud.column.push({
+        label: '调度公司',
+        prop: 'dispatchDeptName',
+        overHidden: true,
+        index: 1,
+        width: 140
+      }, {
+        label: '调度员',
+        prop: 'dispatcherName',
+        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: '应付杂费',
+        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({
+        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'
+      })
+    }
+    if(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: '应付运费',
+        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'
+      },{
+        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'
+      })
+    }
   },
   methods: {
     openTrack(row){
@@ -555,7 +563,7 @@ export default {
         this.lineArr = res.data.data.trackArray
         this.parkingPoint = res.data.data.parkArray
         this.dialogVisibleTwo = true
-        let this_=this
+        let this_ = this
         setTimeout(function(){
           this_.$refs.playback.initMap();
         },100)
@@ -623,139 +631,139 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-      this.roleName.forEach(item =>{
-        if (item == '客户'){
-          this.goodsOptionCrud.menu = true
-          for (let item of this.goodsOptionCrud.column){
-            if (item.prop === 'landAmountD') return
-          }
-          return this.goodsOptionCrud.column.push({
-            label: '应收运费',
-            overHidden: true,
-            index: 11,
-            prop: 'landAmountD'
-          }, {
-            label: '应收杂费',
-            overHidden: true,
-            index: 12,
-            prop: 'extraAmountD'
-          }, {
-            label: '应收杂费明细',
-            width: 100,
-            index: 17,
-            prop: 'extraAmountItemD'
-          })
-        }else if (item == '平台') {
-          this.goodsOptionCrud.menu = false
-          for (let item of this.goodsOptionCrud.column){
-            if (item.prop === 'landAmountC') return
-          }
-          return this.goodsOptionCrud.column.push( {
-            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'
-          },{
-            label: '应收运费',
-            overHidden: true,
-            index: 11,
-            prop: 'landAmountD'
-          }, {
-            label: '应收杂费',
-            overHidden: true,
-            index: 12,
-            prop: 'extraAmountD'
-          }, {
-            label: '应收杂费明细',
-            width: 100,
-            index: 17,
-            prop: 'extraAmountItemD'
-          })
-        } else if (item == '调度'){
-          this.goodsOptionCrud.menu = false
-          for (let item of this.goodsOptionCrud.column){
-            if (item.prop === 'landAmountC') return
-          }
-          return this.goodsOptionCrud.column.push( {
-            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'
-          })
-        }else {
-          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||this.roleName.indexOf('分管调度') !== -1){
+        this.goodsOptionCrud.menu = false;
+        this.goodsOptionCrud.column.forEach((item,index)=>{
+          if (item.prop === 'corpShortName'){
+            this.goodsOptionCrud.column.splice(index, 1)
           }
-          return this.goodsOptionCrud.column.push({
-            label: '调度公司',
-            prop: 'dispatchDeptName',
-            overHidden: true,
-            index: 1,
-            width: 140
-          }, {
-            label: '调度员',
-            prop: 'dispatcherName',
-            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'
-          })
+        })
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'dispatchDeptName') return false
         }
-      })
+        return this.goodsOptionCrud.column.push({
+          label: '调度公司',
+          prop: 'dispatchDeptName',
+          overHidden: true,
+          index: 1,
+          width: 140
+        }, {
+          label: '调度员',
+          prop: 'dispatcherName',
+          overHidden: true,
+          index: 1,
+          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,
+          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({
+          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'
+        })
+      }
+      if(this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('admin') !== -1){
+        this.goodsOptionCrud.menu = false
+        for (let item of this.goodsOptionCrud.column){
+          if (item.prop === 'landAmountC') return
+        }
+        return this.goodsOptionCrud.column.push( {
+          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'
+        },{
+          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'
+        })
+      }
     },
     //行跳转
     celJump(row, index) {