Browse Source

提交陆运修改

caojunjie 3 years ago
parent
commit
cb7af1a4c9

+ 0 - 1
src/components/trackPlayback.vue

@@ -116,7 +116,6 @@ export default {
       let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
       let leavel2 = leavel % (3600 * 1000); // 计算剩余小时后剩余的毫秒数
       let minutes = Math.floor(leavel2 / (60 * 1000)); // 计算剩余的分钟数
-      console.log(startTime , endTime)
       if (startTime && endTime){
         return  days + '天' + hours + '时' + minutes + '分'
       }else {

+ 104 - 69
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -121,11 +121,11 @@
             </span>
             <span v-else>
               <el-button type="warning" size="mini" circle>途</el-button>
-<!--              <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>-->
-<!--              <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">-->
-<!--                  <el-button type="danger" icon="el-icon-delete" size="mini" circle-->
-<!--                             @click="deleteAddress(scope)"></el-button>-->
-<!--              </el-tooltip>-->
+              <!--              <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>-->
+              <!--              <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">-->
+              <!--                  <el-button type="danger" icon="el-icon-delete" size="mini" circle-->
+              <!--                             @click="deleteAddress(scope)"></el-button>-->
+              <!--              </el-tooltip>-->
             </span>
           </template>
         </el-table-column>
@@ -198,21 +198,21 @@
           @row-update="rowSaveWell">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
-                     :disabled="selectionList.length === 0" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
+                     :disabled="batchDuling" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
           </el-button>
         </template>
         <template slot="plateNo" slot-scope="{row}" v-if="!row.$cellEdit">
-                <span class="el-button--text" style="cursor: pointer" @click="openTrack(row)">{{ row.plateNo }}</span>
+          <span class="el-button--text" style="cursor: pointer" @click="openTrack(row)">{{ row.plateNo }}</span>
         </template>
-<!--        <template slot-scope="{row}" slot="fleetId">-->
-<!--          <crop-select-->
-<!--              v-if="row.$cellEdit"-->
-<!--              v-model="row.fleetId"-->
-<!--              @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
-<!--              corpType="CD"-->
-<!--          ></crop-select>-->
-<!--          <span v-else>{{ row.fleetName }}</span>-->
-<!--        </template>-->
+        <!--        <template slot-scope="{row}" slot="fleetId">-->
+        <!--          <crop-select-->
+        <!--              v-if="row.$cellEdit"-->
+        <!--              v-model="row.fleetId"-->
+        <!--              @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
+        <!--              corpType="CD"-->
+        <!--          ></crop-select>-->
+        <!--          <span v-else>{{ row.fleetName }}</span>-->
+        <!--        </template>-->
         <template slot-scope="{row,index}" slot="menu">
           <el-button
               type="text"
@@ -428,7 +428,7 @@
           <el-button
               v-if="roleNameTwo.indexOf('总调度') === -1"
               type="primary" icon="el-icon-plus" @click="addRowCollection"
-                     size="small">录入明细
+              size="small">录入明细
           </el-button>
         </template>
       </avue-crud>
@@ -494,7 +494,7 @@
           <el-button
               v-if="roleNameTwo.indexOf('总调度') === -1"
               type="primary" icon="el-icon-plus" @click="addRowPayment"
-                     size="small">录入明细
+              size="small">录入明细
           </el-button>
         </template>
       </avue-crud>
@@ -620,7 +620,7 @@ export default {
     return {
       formData: {},
       enclosure: false,
-      dialogVisibleTwo:false,
+      dialogVisibleTwo: false,
       lineArr: [],
       formAnnex: {},
       key: 0,
@@ -691,6 +691,7 @@ export default {
       selectionList: [],
       roleName: localStorage.getItem("roleName").split(',')[0],
       roleNameTwo: localStorage.getItem("roleName").split(','),
+      batchDuling:true,
       breakConfiguration: {
         multipleChoices: false,
         multiple: false,
@@ -734,7 +735,7 @@ export default {
         refreshBtn: false,
         selection: true,
         selectionWidth: 55,
-        menu:true,
+        menu: true,
         tip: false,
         addBtn: false,
         cancelBtn: false,
@@ -1440,7 +1441,7 @@ export default {
             label: "fleetName",
             value: "fleetId"
           },
-          change:(data)=>{
+          change: (data) => {
             data.row.plateNo = ''
           }
         },
@@ -1517,10 +1518,10 @@ export default {
     this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
     this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
     this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
-    this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data)=>{
+    this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data) => {
       let list = []
-      data.data.forEach(ele=>{
-        list.push({label:ele})
+      data.data.forEach(ele => {
+        list.push({label: ele})
       })
       return list
     }
@@ -1568,7 +1569,7 @@ export default {
         //   if (item.region) item.region = item.region.split(',')
         // })
 
-        if (this.roleNameTwo.indexOf('总调度') !== -1){
+        if (this.roleNameTwo.indexOf('总调度') !== -1) {
           this.entrustOptionTwoT.menu = false
           this.collectionOption.menu = false
           this.paymentOption.menu = false
@@ -1602,26 +1603,26 @@ export default {
     }
   },
   methods: {
-    schedulingFileSaving(){
+    schedulingFileSaving() {
       this.c_button = true
       conserveDispatch({
-        fileList:this.orderFilesList,
-        id:this.goodsForm.id
-      }).then(res=>{
-        checkAttachment({id:this.goodsForm.id}).then(res=>{
+        fileList: this.orderFilesList,
+        id: this.goodsForm.id
+      }).then(res => {
+        checkAttachment({id: this.goodsForm.id}).then(res => {
           this.orderFilesList = res.data.data
           this.c_button = false
         })
       })
     },
-    openTrack(row){
-      gaude({itemId: row.id,plateNo:row.plateNo,tenantId:'234557',color:'2'}).then(res => {
+    openTrack(row) {
+      gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
         this.lineArr = res.data.data.trackArray
         this.dialogVisibleTwo = true
-        let this_=this
-        setTimeout(function(){
+        let this_ = this
+        setTimeout(function () {
           this_.$refs.playback.initMap();
-        },100)
+        }, 100)
       })
       // location({itemId: row.id,plateNo:'陕YH0008'}).then(res => {
       //   // console.log(res.data.data)
@@ -1650,7 +1651,7 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
       }
-      if (this.roleNameTwo.indexOf('总调度') !== -1){
+      if (this.roleNameTwo.indexOf('总调度') !== -1) {
         this.entrustOptionTwoT.menu = false
         this.collectionOption.menu = false
         this.paymentOption.menu = false
@@ -1750,6 +1751,16 @@ export default {
     //多选触发
     selectionChange(list) {
       this.selectionList = list
+      if(this.selectionList.length === 0){
+        return this.batchDuling = true
+      }else {
+        for(let item in this.selectionList){
+          if(this.selectionList[item].status > 0){
+            return this.batchDuling = true
+          }
+        }
+        return this.batchDuling = false
+      }
     },
     //批量调度
     batchScheduling() {
@@ -1831,7 +1842,7 @@ export default {
         if (!row.plateNo) {
           return this.$message.warning('未选择车号,请选择');
         }
-        if (!row.fleetId){
+        if (!row.fleetId) {
           return this.$message.warning('请选择车队');
         }
         this.$confirm('是否确定调度派车', '提示', {
@@ -1851,9 +1862,15 @@ export default {
           });
           this.$refs.crudBoxTwo.rowCell(row, index)
         });
-      }else {
-        this.entrustOptionTwoT.column.forEach(item=>{
-          if (item.prop === 'plateNo'){
+      } else {
+        this.entrustOptionTwoT.column.forEach(item => {
+          if (item.prop === 'plateNo') {
+            item.cell = true
+          }
+          if (item.prop === 'driverName') {
+            item.cell = true
+          }
+          if (item.prop === 'tel') {
             item.cell = true
           }
         })
@@ -1956,13 +1973,13 @@ export default {
     rowCell(row, index) {
       if (row.$cellEdit) {
         if (row.plateNo) {
-          if (row.feeId){
+          if (row.feeId) {
             incidentalSubmit(row).then(res => {
               this.$refs.collection.rowCell(row, index)
               row = res.data.data
               this.$message.success("保存成功");
             })
-          }else {
+          } else {
             this.$message.error("请选择费用名称");
           }
         } else {
@@ -1975,12 +1992,16 @@ export default {
     paymentRowCell(row, index) {
       if (row.$cellEdit) {
         if (row.plateNo) {
-          if (row.feeId){
+          if (row.feeId) {
             incidentalSubmit(row).then(res => {
-              row = res.data.data
+              row = {
+                ...res.data.data,
+                $cellEdit:true
+              }
               this.$message.success("保存成功");
+              this.$refs.payment.rowCell(row, index)
             })
-          }else {
+          } else {
             this.$message.error("请选择费用名称");
           }
         } else {
@@ -2023,33 +2044,47 @@ export default {
     },
     //收费新增
     addRowCollection() {
-      customerList({size: 10, current: 1}).then(res => {
-        this.$refs.collection.rowCellAdd({
-          currency: '1',
-          type: '1',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
-          unit: '件数',
-          corpId: this.goodsForm.corpId,
-          quantity: 1,
-          orderId: this.id,
-          $cellEdit: true
-        });
-      })
+      if (this.selectionList.length == 1) {
+        customerList({size: 10, current: 1}).then(res => {
+          this.$refs.collection.rowCellAdd({
+            currency: '1',
+            type: '1',
+            itemId: this.selectionList[0].id,
+            feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
+            unit: '件数',
+            corpId: this.goodsForm.corpId,
+            quantity: 1,
+            orderId: this.id,
+            $cellEdit: true
+          });
+        })
+      } else if (this.selectionList.length == 0) {
+        this.$message.warning('请选择一条车辆信息')
+      } else if (this.selectionList.length > 0) {
+        this.$message.warning('请选择一条车辆信息')
+      }
     },
     //付费新增
     addRowPayment() {
-      customerList({size: 10, current: 1}).then(res => {
-        this.$refs.payment.rowCellAdd({
-          currency: '1',
-          type: '2',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
-          unit: '件数',
-          quantity: 1,
-          // corpId: '1526835847238901762',
-          orderId: this.id,
-          $cellEdit: true
-        });
-      })
+      if (this.selectionList.length == 1) {
+        customerList({size: 10, current: 1}).then(res => {
+          this.$refs.payment.rowCellAdd({
+            currency: '1',
+            type: '2',
+            itemId: this.selectionList[0].id,
+            feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
+            unit: '件数',
+            quantity: 1,
+            // corpId: '1526835847238901762',
+            orderId: this.id,
+            $cellEdit: true
+          });
+        })
+      } else if (this.selectionList.length == 0) {
+        this.$message.warning('请选择一条车辆信息')
+      } else if (this.selectionList.length > 0) {
+        this.$message.warning('请选择一条车辆信息')
+      }
     },
     //选择费用
     selectValue(value, row) {

+ 17 - 5
src/views/landTransportation/placeAnOrder/index.vue

@@ -237,9 +237,16 @@ export default {
               label: "realName",
               value: "id"
             }
-          },{
+          }, {
             label: '物流运输',
-            prop: 'dispatchDeptName',
+            prop: 'dispatchDept',
+            search: true,
+            dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+            type: "select",
+            props: {
+              label: "deptName",
+              value: "id"
+            },
             overHidden: true,
             index: 2,
             width: 100
@@ -330,8 +337,13 @@ export default {
           //   width: 140,
           //   search: true,
           // }
-          ,
-          {
+          , {
+            label: '制单人',
+            prop: 'createUserName',
+            overHidden: true,
+            index: 14,
+            width: 140,
+          }, {
             label: '制单日期',
             overHidden: true,
             prop: 'createTime',
@@ -369,7 +381,7 @@ export default {
       this.option.menu = false
       this.option.header = false
     }
-    if(!(this.roleName.indexOf('客户') !== -1)){
+    if (!(this.roleName.indexOf('客户') !== -1)) {
       this.option.column.push({
         label: '运输调度',
         prop: 'dispatcherName',

+ 416 - 303
src/views/landTransportation/reportAnalysis/index.vue

@@ -27,7 +27,9 @@
         </template>
         <template slot="billNo" slot-scope="{row,index}">
           <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>
+          <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"
@@ -44,12 +46,19 @@
           ></crop-select>
         </template>
         <template slot-scope="{row,index}" slot="menu">
-          <el-button
-              size="small"
-              type="text"
-              @click="incidentalConfirm(row)"
-          >{{row.confirmStatus == 0?'杂费确认':'杂费取消'}}
-          </el-button>
+          <span v-if="row.extraAmountD>0">
+            <el-button
+                size="small"
+                type="text"
+            >{{ row.confirmStatus !== 0 ? '已确认' : '' }}
+            </el-button>
+            <el-button
+                size="small"
+                type="text"
+                @click="incidentalConfirm(row)"
+            >{{ row.confirmStatus == 0 ? '杂费确认' : '杂费取消' }}
+            </el-button>
+          </span>
         </template>
         <template slot="addressDetail" slot-scope="{ row,index}">
           <el-tooltip class="item" effect="dark" placement="top">
@@ -118,7 +127,8 @@
         </avue-crud>
         <span slot="footer" class="dialog-footer">
           <el-button @click="incidentalType = false" size="small">取 消</el-button>
-          <el-button type="primary" size="small" v-if="collectionList.length>0" @click="incidentalClick">{{confirmStatus == 0?'杂费确认':'杂费取消'}}</el-button>
+          <el-button type="primary" size="small" v-if="collectionList.length>0"
+                     @click="incidentalClick">{{ confirmStatus == 0 ? '杂费确认' : '杂费取消' }}</el-button>
         </span>
       </el-dialog>
       <el-dialog
@@ -138,7 +148,8 @@
           <el-button @click="enclosure = false" size="small">取 消</el-button>
         </span>
       </el-dialog>
-      <track-playback :dialogVisible="dialogVisibleTwo" :parkingPoint="parkingPoint" :lineArr="lineArr" ref="playback"></track-playback>
+      <track-playback :dialogVisible="dialogVisibleTwo" :parkingPoint="parkingPoint" :lineArr="lineArr"
+                      ref="playback"></track-playback>
     </basic-container>
   </div>
 </template>
@@ -167,8 +178,8 @@ export default {
     return {
       key: 0,
       form: {},
-      enclosure:false,
-      dialogVisibleTwo:false,
+      enclosure: false,
+      dialogVisibleTwo: false,
       lineArr: [],
       parkingPoint: [],
       orderList: [],
@@ -220,11 +231,11 @@ export default {
         ]
       },
       collectionOption: {},
-      collectionList:[],
+      collectionList: [],
       dialogVisible: false,
       loading: false,
       incidentalType: false,
-      confirmStatus:0,
+      confirmStatus: 0,
       activeName: '',
       query: {},
       page: {
@@ -249,6 +260,7 @@ export default {
         searchIcon: true,
         searchIndex: 2,
         searchSpan: 8,
+        menuWidth:140,
         menu: true,
         searchMenuPosition: "right",
         searchMenuSpan: 6,
@@ -400,47 +412,45 @@ export default {
     this.goodsOptionCrud = await this.getColumnData(this.getColumnName(88.1), this.optionList);
     this.collectionOption = await this.getColumnData(this.getColumnName(88.2), this.collectionOptionBackup);
     this.key++
-    let i = 0;
-    this.goodsOptionCrud.column.forEach(item => {
-      if (item.search) i++
-    })
-    if (i % 3 !== 0) {
-      const num = 3 - Number(i % 3)
-      this.goodsOptionCrud.searchMenuSpan = num * 8;
-      this.goodsOptionCrud.searchMenuPosition = "right";
-    }
-    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.goodsOptionCrud.menu = false;
       // 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 (this.roleName.indexOf('车队') !== -1) {
+        for (let item of this.goodsOptionCrud.column) {
           if (item.prop === 'dispatchDeptName') return false
         }
-        return this.goodsOptionCrud.column.push(
+        this.goodsOptionCrud.column.push(
             {
               label: '物流运输',
-              prop: 'dispatchDeptName',
+              prop: 'dispatchDept',
+              search: true,
+              dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+              type: "select",
+              props: {
+                label: "deptName",
+                value: "id"
+              },
               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,
@@ -456,11 +466,12 @@ export default {
               index: 18,
               prop: 'extraAmountItemC'
             })
-      }else {
-        for (let item of this.goodsOptionCrud.column){
+        return this.calculateHu()
+      } else {
+        for (let item of this.goodsOptionCrud.column) {
           if (item.prop === 'dispatcherName') return false
         }
-        return this.goodsOptionCrud.column.push(
+        this.goodsOptionCrud.column.push(
             {
               label: '客户名称',
               prop: 'corpShortName',
@@ -468,7 +479,7 @@ export default {
               index: 1,
               width: 140,
               search: true,
-            },{
+            }, {
               label: '运输调度',
               prop: 'dispatcherName',
               overHidden: true,
@@ -477,9 +488,10 @@ export default {
             }, {
               label: '业务员',
               prop: 'salesmanName',
+              search: true,
               index: 2,
               width: 140,
-            },{
+            }, {
               label: '应收运费',
               overHidden: true,
               index: 11,
@@ -494,14 +506,14 @@ export default {
               width: 100,
               index: 17,
               prop: 'extraAmountItemD'
-            },{
+            }, {
               label: '车队',
               width: 100,
               search: true,
               index: 9,
               overHidden: true,
               prop: 'fleetShortName'
-            },{
+            }, {
               label: '应付运费',
               overHidden: true,
               index: 14,
@@ -524,141 +536,193 @@ export default {
               index: 18,
               prop: 'extraAmountItemC'
             })
+        return this.calculateHu()
       }
     }
-    if(this.roleName.indexOf('客户') !== -1){
+    if (this.roleName.indexOf('客户') !== -1) {
       this.goodsOptionCrud.menu = true
-      for (let item of this.goodsOptionCrud.column){
+      for (let item of this.goodsOptionCrud.column) {
         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,
-        prop: 'extraAmountD'
-      }, {
-        label: '应收杂费明细',
-        width: 100,
-        index: 17,
-        prop: 'extraAmountItemD'
-      },{
-        label: '车队',
-        width: 100,
-        search: true,
-        index: 9,
-        overHidden: true,
-        prop: 'fleetShortName'
-      })
+      this.goodsOptionCrud.column.push(
+          {
+            label: '客户名称',
+            prop: 'corpShortName',
+            overHidden: true,
+            index: 1,
+            width: 140,
+            search: true,
+          }, {
+            label: '杂费确认',
+            prop: 'confirmStatus',
+            overHidden: true,
+            index: 1,
+            width: 140,
+            type: "select",
+            hide: true,
+            dicData: [{
+              label: '未确认',
+              value: 0
+            }, {
+              label: '已确认',
+              value: 1
+            }],
+            props: {
+              label: "label",
+              value: "value"
+            },
+            search: true,
+          }, {
+            label: '物流运输',
+            prop: 'dispatchDept',
+            search: true,
+            dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+            type: "select",
+            props: {
+              label: "deptName",
+              value: "id"
+            },
+            overHidden: true,
+            index: 3,
+            width: 140
+          }, {
+            label: '应收运费',
+            overHidden: true,
+            index: 11,
+            prop: 'landAmountD'
+          }, {
+            label: '业务员',
+            prop: 'salesmanName',
+            search: true,
+            index: 2,
+            width: 140,
+          }, {
+            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'
+          })
+      return this.calculateHu()
     }
-    if(this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1 || 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){
+      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: 2,
-        width: 140,
-      }, {
-        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: 100,
-        search: true,
-        index: 9,
-        overHidden: true,
-        prop: 'fleetShortName'
-      })
+      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: 'dispatchDept',
+            search: true,
+            dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+            type: "select",
+            props: {
+              label: "deptName",
+              value: "id"
+            },
+            overHidden: true,
+            index: 3,
+            width: 140
+          }, {
+            label: '业务员',
+            prop: 'salesmanName',
+            search: true,
+            index: 2,
+            width: 140,
+          }, {
+            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: 100,
+            search: true,
+            index: 9,
+            overHidden: true,
+            prop: 'fleetShortName'
+          })
+      return this.calculateHu()
     }
   },
   methods: {
-    openTrack(row){
-      gaude({itemId: row.id,plateNo:row.plateNo,tenantId:'234557',color:'2'}).then(res => {
+    calculateHu() {
+      let i = 0;
+      this.goodsOptionCrud.column.forEach(item => {
+        if (item.search === true) i++
+      })
+      if (i % 3 !== 0) {
+        const num = 3 - Number(i % 3)
+        this.goodsOptionCrud.searchMenuSpan = num * 8;
+        this.goodsOptionCrud.searchMenuPosition = "right";
+      }
+    },
+    openTrack(row) {
+      gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
         this.lineArr = res.data.data.trackArray
         this.parkingPoint = res.data.data.parkArray
         this.dialogVisibleTwo = true
         let this_ = this
-        setTimeout(function(){
+        setTimeout(function () {
           this_.$refs.playback.initMap();
-        },100)
+        }, 100)
       })
     },
     //导出
@@ -723,39 +787,45 @@ export default {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
-
-      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.goodsOptionCrud.menu = false;
         // 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 (this.roleName.indexOf('车队') !== -1) {
+          for (let item of this.goodsOptionCrud.column) {
             if (item.prop === 'dispatchDeptName') return false
           }
-          return this.goodsOptionCrud.column.push(
+          this.goodsOptionCrud.column.push(
               {
                 label: '物流运输',
-                prop: 'dispatchDeptName',
+                prop: 'dispatchDept',
+                search: true,
+                dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+                type: "select",
+                props: {
+                  label: "deptName",
+                  value: "id"
+                },
                 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,
@@ -771,11 +841,12 @@ export default {
                 index: 18,
                 prop: 'extraAmountItemC'
               })
-        }else {
-          for (let item of this.goodsOptionCrud.column){
+          return this.calculateHu()
+        } else {
+          for (let item of this.goodsOptionCrud.column) {
             if (item.prop === 'dispatcherName') return false
           }
-          return this.goodsOptionCrud.column.push(
+          this.goodsOptionCrud.column.push(
               {
                 label: '客户名称',
                 prop: 'corpShortName',
@@ -783,7 +854,7 @@ export default {
                 index: 1,
                 width: 140,
                 search: true,
-              },{
+              }, {
                 label: '运输调度',
                 prop: 'dispatcherName',
                 overHidden: true,
@@ -792,9 +863,10 @@ export default {
               }, {
                 label: '业务员',
                 prop: 'salesmanName',
+                search: true,
                 index: 2,
                 width: 140,
-              },{
+              }, {
                 label: '应收运费',
                 overHidden: true,
                 index: 11,
@@ -809,14 +881,14 @@ export default {
                 width: 100,
                 index: 17,
                 prop: 'extraAmountItemD'
-              },{
+              }, {
                 label: '车队',
                 width: 100,
                 search: true,
                 index: 9,
                 overHidden: true,
                 prop: 'fleetShortName'
-              },{
+              }, {
                 label: '应付运费',
                 overHidden: true,
                 index: 14,
@@ -839,142 +911,183 @@ export default {
                 index: 18,
                 prop: 'extraAmountItemC'
               })
+          return this.calculateHu()
         }
       }
-      if(this.roleName.indexOf('客户') !== -1){
+      if (this.roleName.indexOf('客户') !== -1) {
         this.goodsOptionCrud.menu = true
-        for (let item of this.goodsOptionCrud.column){
+        for (let item of this.goodsOptionCrud.column) {
           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,
-          prop: 'extraAmountD'
-        }, {
-          label: '应收杂费明细',
-          width: 100,
-          index: 17,
-          prop: 'extraAmountItemD'
-        },{
-          label: '车队',
-          width: 100,
-          search: true,
-          index: 9,
-          overHidden: true,
-          prop: 'fleetShortName'
-        })
+        this.goodsOptionCrud.column.push(
+            {
+              label: '客户名称',
+              prop: 'corpShortName',
+              overHidden: true,
+              index: 1,
+              width: 140,
+              search: true,
+            }, {
+              label: '杂费确认',
+              prop: 'confirmStatus',
+              overHidden: true,
+              index: 1,
+              width: 140,
+              type: "select",
+              hide: true,
+              dicData: [{
+                label: '未确认',
+                value: 0
+              }, {
+                label: '已确认',
+                value: 1
+              }],
+              props: {
+                label: "label",
+                value: "value"
+              },
+              search: true,
+            }, {
+              label: '物流运输',
+              prop: 'dispatchDept',
+              search: true,
+              dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+              type: "select",
+              props: {
+                label: "deptName",
+                value: "id"
+              },
+              overHidden: true,
+              index: 3,
+              width: 140
+            }, {
+              label: '应收运费',
+              overHidden: true,
+              index: 11,
+              prop: 'landAmountD'
+            }, {
+              label: '业务员',
+              prop: 'salesmanName',
+              search: true,
+              index: 2,
+              width: 140,
+            }, {
+              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'
+            })
+        return this.calculateHu()
       }
-      if(this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('admin') !== -1 || 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){
+        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: 2,
-          width: 140,
-        }, {
-          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: 100,
-          search: true,
-          index: 9,
-          overHidden: true,
-          prop: 'fleetShortName'
-        })
+        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: 'dispatchDept',
+              search: true,
+              dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
+              type: "select",
+              props: {
+                label: "deptName",
+                value: "id"
+              },
+              overHidden: true,
+              index: 3,
+              width: 140
+            }, {
+              label: '业务员',
+              prop: 'salesmanName',
+              search: true,
+              index: 2,
+              width: 140,
+            }, {
+              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: 100,
+              search: true,
+              index: 9,
+              overHidden: true,
+              prop: 'fleetShortName'
+            })
+        return this.calculateHu()
       }
     },
     //行跳转
     celJump(row, index) {
-      if (this.roleName.indexOf('平台') !== -1){
+      if (this.roleName.indexOf('平台') !== -1) {
         this.$router.push({
           path: '/landTransportation/dispatchingCars/index',
           query: {orderId: row.orderId},
         });
-      }else {
+      } else {
         this.$router.push({
           path: '/landTransportation/placeAnOrder/index',
-          query: {id: '台账'+row.orderId},
+          query: {id: '台账' + row.orderId},
         });
       }
     },
@@ -1015,7 +1128,7 @@ export default {
         size: page.pageSize,
         current: page.currentPage,
         tag: '0',
-        ...params?params:this.query
+        ...params ? params : this.query
       }
       if (queryParams.arrivalTime) {
         queryParams.beginArrivalTime = queryParams.arrivalTime[0]
@@ -1095,10 +1208,10 @@ export default {
       });
     },
     //打开附件
-    annexOpen(row, index){
+    annexOpen(row, index) {
       this.enclosure = true
       this.formAnnex = row
-      getFee({id:row.id}).then(res=>{
+      getFee({id: row.id}).then(res => {
         this.orderList = res.data.data
       })
     },
@@ -1114,27 +1227,27 @@ export default {
     ToBreak(val) {
       if (val) return val.replace(/\n/g, '<br/>')
     },
-    incidentalConfirm(row){
+    incidentalConfirm(row) {
       incidental({
-        orderId:row.orderId,
-        plateNo:row.plateNo,
-        type:'1'
-      }).then(res=>{
+        itemId: row.itemId,
+        plateNo: row.plateNo,
+        type: '1'
+      }).then(res => {
         this.collectionList = res.data.data
         this.incidentalType = true
         this.confirmStatus = row.confirmStatus
       })
     },
-    incidentalClick(){
-      let id = []
-      this.collectionList.forEach(item => id.push(item.id))
-      if (this.confirmStatus == 0){
-        incidentalConfirm({ids:id.join(',')}).then(res=>{
+    incidentalClick() {
+      if (this.confirmStatus == 0) {
+        incidentalConfirm({itemId: this.collectionList[0].itemId}).then(res => {
           this.$message.success("确认成功");
+          this.onLoad(this.page)
         })
-      }else {
-        cancelConfirm({ids:id.join(',')}).then(res=>{
+      } else {
+        cancelConfirm({itemId: this.collectionList[0].itemId}).then(res => {
           this.$message.success("取消成功");
+          this.onLoad(this.page)
         })
       }
       this.incidentalType = false