瀏覽代碼

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 年之前
父節點
當前提交
7ff38a41df

+ 19 - 0
src/api/landTransportation/index.js

@@ -332,3 +332,22 @@ export function tRemove(data) {
     })
 }
 
+// /blade-land/order/file
+// /blade-land/order/file-list
+//保存附件
+export function conserveDispatch(data) {
+    return request({
+        url: '/api/blade-land/order/file',
+        method: 'post',
+        data
+    })
+}
+//查询附件
+export function checkAttachment(data) {
+    return request({
+        url: '/api/blade-land/order/file-list',
+        method: 'get',
+        params:data
+    })
+}
+

+ 18 - 16
src/components/trackPlayback.vue

@@ -7,20 +7,20 @@
       lock-scroll
       width="80%">
     <div id="container" v-if="dialogVisible"></div>
-    <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-if="this.lineArr.length>0">
-      <h4>轨迹回放控制</h4>
-      <div class="input-item">
-        <input type="button" class="btn" value="开始动画" id="start" @click="startAnimation()"/>
-        <input type="button" class="btn" value="暂停动画" id="pause" @click="pauseAnimation()"/>
-      </div>
-      <div class="input-item">
-        <input type="button" class="btn" value="继续动画" id="resume" @click="resumeAnimation()"/>
-        <input type="button" class="btn" value="停止动画" id="stop" @click="stopAnimation()"/>
-      </div>
-    </div>
-    <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-else>
-      <span style="color: red">暂无该车辆轨迹信息</span>
-    </div>
+<!--    <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-if="this.lineArr.length>0">-->
+<!--      <h4>轨迹回放控制</h4>-->
+<!--      <div class="input-item">-->
+<!--        <input type="button" class="btn" value="开始动画" id="start" @click="startAnimation()"/>-->
+<!--        <input type="button" class="btn" value="暂停动画" id="pause" @click="pauseAnimation()"/>-->
+<!--      </div>-->
+<!--      <div class="input-item">-->
+<!--        <input type="button" class="btn" value="继续动画" id="resume" @click="resumeAnimation()"/>-->
+<!--        <input type="button" class="btn" value="停止动画" id="stop" @click="stopAnimation()"/>-->
+<!--      </div>-->
+<!--    </div>-->
+<!--    <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-else>-->
+<!--      <span style="color: red">暂无该车辆轨迹信息</span>-->
+<!--    </div>-->
   </el-dialog>
 </template>
 
@@ -96,9 +96,10 @@ export default {
             map: this.map
           });
           // (this.parkingPoint[i].ete - this.parkingPoint[i].bte)
-          console.log(this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete));
+          // console.log(this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete));
+          let fun = this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete)==='获取失败'?'':this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete)
           this.marker.content = '<div style="width: 300px;">'
-              + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + this.fun(this.parkingPoint[i].bte, this.parkingPoint[i].ete) + '</p>'
+              + '<p style="font-size: 22px;font-weight: bold;background-color: #2d8cf0;color: #fff;">' + fun + '</p>'
               + '<p style="padding: 5px 0"><span style="color: #a0a0a0">停车时间:</span>' + (new Date(Number(this.parkingPoint[i].bte) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5,19)+'至'+ (new Date(Number(this.parkingPoint[i].ete) + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(0, 19)).slice(5,19)+ '</p>'
               + '<p><span style="color: #a0a0a0">当前位置:</span>' +this.parkingPoint[i].address + '</p>'
               + '</div>'
@@ -115,6 +116,7 @@ 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 {

+ 7 - 6
src/components/upload/index.vue

@@ -17,8 +17,9 @@
               @click="addDetail"
               :disabled="disabled"
               v-if="display"
-          >上传{{display}}
+          >上传
           </el-button>
+          <slot name="c_button"></slot>
         </template>
         <template slot="url" slot-scope="{ row }">
           <el-input
@@ -406,16 +407,16 @@ export default {
     },
     //下载附件
     download(scope) {
-      console.log(scope.row.url);
+      console.log(scope.row.url.substring(scope.row.url.lastIndexOf(".")))
       if (scope.row.url) {
         if (
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".jpg" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".png" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".JPG" ||
-          scope.row.fileName.substring(scope.row.fileName.lastIndexOf(".")) ===
+            scope.row.url.substring(scope.row.url.lastIndexOf(".")) ===
             ".PNG"
         ) {
           this.imgUrl = scope.row.url;

+ 115 - 58
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -201,19 +201,18 @@
                      :disabled="selectionList.length === 0" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
           </el-button>
         </template>
-        <template slot="plateNo" slot-scope="{row}">
-                <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 slot="plateNo" slot-scope="{row}" v-if="!row.$cellEdit">
+                <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,index}" slot="menu">
           <el-button
               type="text"
@@ -223,6 +222,13 @@
           >{{ row.$cellEdit ? '保 存' : '修 改' }}
           </el-button>
           <el-button
+              type="text"
+              size="small"
+              v-if="row.status===0"
+              @click="rowSaveThree(row,index)"
+          >{{ row.$cellEdit ? '确认调度派车' : '调度派车' }}
+          </el-button>
+          <el-button
               size="small"
               type="text"
               @click="designate(row, index)"
@@ -250,6 +256,12 @@
               v-if="row.status > 1"
           >变更记录
           </el-button>
+          <el-button
+              size="small"
+              type="text"
+              @click="annexOpen(row, index)"
+          >附 件
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -491,11 +503,20 @@
     <c-upload
         typeUpload="CD"
         :data="orderFilesList"
-        disabled
-        :display="false"
+        display
         deleteUrl="/api/blade-client/common-file/remove"
         :enumerationValue="86.2"
-    ></c-upload>
+    >
+      <template slot="c_button">
+        <el-button
+            type="primary"
+            size="small"
+            :loading="c_button"
+            @click="schedulingFileSaving"
+        >保存附件
+        </el-button>
+      </template>
+    </c-upload>
     <el-dialog
         title="批量调度"
         :visible.sync="dialogVisible"
@@ -524,6 +545,7 @@
           <crop-select
               v-model="formData.fleetId"
               corpType="CD"
+              :disabled="formData === 4"
               @getCorpData="getCorpData"
           ></crop-select>
         </template>
@@ -577,7 +599,8 @@ import {
   fleetDriverSave,
   recordingDetails,
   changeFleet,
-  incidentalSubmit, saveFile, getFee, fleetList
+  incidentalSubmit, saveFile, getFee, fleetList, conserveDispatch,
+  checkAttachment, sendACarCollection
 } from "@/api/landTransportation";
 import website from "@/config/website";
 import {getDeptTree} from "@/api/system/dept";
@@ -616,45 +639,6 @@ export default {
           precision: 2,
           controls: false,
           type: 'number',
-        }, {
-          label: '应收场站费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'oneFeeD'
-        }, {
-          label: '应收港杂费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'twoFeeD'
-        }, {
-          label: '应收扣款',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'threeFeeD'
-        }, {
-          label: '应收待时费',
-          width: 100,
-          precision: 2,
-          controls: false,
-          type: 'number',
-          prop: 'fourFeeD'
-        }, {
-          label: '应收其他',
-          width: 100,
-          precision: 2,
-          type: 'number',
-          controls: false,
-          prop: 'fiveFeeD'
-        }, {
-          label: '应收费用备注',
-          width: 245,
-          prop: 'feeRemarksD'
         }]
       },
       form: {},
@@ -701,6 +685,7 @@ export default {
       },
       activeIndex: '1',
       dialogVisible: false,
+      c_button: false,
       goodsForm: {},
       orderFilesList: [],
       selectionList: [],
@@ -856,12 +841,29 @@ export default {
           label: '车队',
           width: 200,
           index: 5,
-          prop: 'fleetId'
+          type: 'select',
+          cascader: ['plateNo'],
+          overHidden: true,
+          cell: true,
+          prop: 'fleetId',
+          dicUrl: "/api/blade-client/corpsdesc/list?size=1000&current=1&&corpType=CD",
+          props: {
+            label: "cname",
+            value: "id",
+            res: "data.records"
+          }
         }, {
           label: '车号',
           width: 150,
           index: 6,
-          prop: 'plateNo'
+          cell: false,
+          prop: 'plateNo',
+          type: "select",
+          dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
+          props: {
+            label: "plateNo",
+            value: "plateNo"
+          },
         }, {
           label: '司机',
           width: 115,
@@ -1600,6 +1602,18 @@ export default {
     }
   },
   methods: {
+    schedulingFileSaving(){
+      this.c_button = true
+      conserveDispatch({
+        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 => {
         this.lineArr = res.data.data.trackArray
@@ -1811,6 +1825,41 @@ export default {
       }
       this.$refs.crudBoxTwo.rowCell(row, index)
     },
+    //调度并且派车
+    rowSaveThree(row, index, done, loading) {
+      if (row.$cellEdit) {
+        if (!row.plateNo) {
+          return this.$message.warning('未选择车号,请选择');
+        }
+        if (!row.fleetId){
+          return this.$message.warning('请选择车队');
+        }
+        this.$confirm('是否确定调度派车', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          sendACarCollection(row).then(res => {
+            this.$message.success('操作成功');
+            this.$refs.crudBoxTwo.rowCell(row, index)
+            this.refreshData()
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+          this.$refs.crudBoxTwo.rowCell(row, index)
+        });
+      }else {
+        this.entrustOptionTwoT.column.forEach(item=>{
+          if (item.prop === 'plateNo'){
+            item.cell = true
+          }
+        })
+        this.$refs.crudBoxTwo.rowCell(row, index)
+      }
+    },
     rowSaveWell(row, index, done, loading) {
       done()
     },
@@ -1840,7 +1889,7 @@ export default {
     changeFleetT(row, index) {
       this.formDataList = row
       this.dialogChange = true
-      this.formData = {}
+      this.formData = row
     },
     //打开变更记录
     recordsOfChanges(row, index) {
@@ -1870,6 +1919,14 @@ export default {
     //箱信息选择车队
     getfleetIdT(data, row) {
       this.$set(row, 'fleetName', data.cname)
+      console.log(this.$refs.crudBoxTwo)
+      // this.$refs.crudBoxTwo.handleChange({
+      //   label: '车队',
+      //   width: 200,
+      //   index: 5,
+      //   prop: 'fleetId',
+      //   cascader: ['plateNo'],
+      // },row)
     },
     //地址新增
     addAddress() {

+ 0 - 2
src/views/landTransportation/driver/index.vue

@@ -154,7 +154,6 @@
             :basic="true"
             deleteUrl="/api/blade-client/common-file/remove"
             :data="orderList"
-            :disabled="form.status===4"
             :enumerationValue="76"
         ></c-upload>
         <span slot="footer" class="dialog-footer">
@@ -769,7 +768,6 @@ export default {
       this.dialogVisible = true
       this.form = row
       getAttachment({id:row.id}).then(res=>{
-        console.log(res)
         this.orderList = res.data.data
       })
     },

+ 39 - 6
src/views/landTransportation/motorcadeDriver/index.vue

@@ -133,7 +133,7 @@
               size="small"
               type="text"
               @click="changeFleetT(row, index)"
-              v-if="row.status===3"
+              v-if="row.status !== 0 && row.status !== 1 && row.status !== 2 && row.status !== 4"
           >变 更
           </el-button>
           <el-button
@@ -161,7 +161,6 @@
             :basic="true"
             deleteUrl="/api/blade-client/common-file/remove"
             :data="orderList"
-            :disabled="form.status >= 2"
             :enumerationValue="76"
         ></c-upload>
         <span slot="footer" class="dialog-footer">
@@ -175,7 +174,7 @@
           :visible.sync="dialogChange"
           append-to-body
           width="70%">
-        <avue-form :option="optionData" v-model="formData" ref="saveForm">
+        <avue-form :option="optionData" v-model="formData" v-if="dialogChange" ref="saveForm">
         </avue-form>
         <span slot="footer" class="dialog-footer">
         <el-button @click="dialogChange = false" size="small">关 闭</el-button>
@@ -212,6 +211,7 @@ export default {
     return {
       key: 0,
       query:{},
+      formDataList:{},
       optionData: {
         span: 12,
         menuBtn: false,
@@ -223,7 +223,7 @@ export default {
           filterable: true,
           cascader: ['driverId'],
           type: 'select',
-          dicUrl: "/api/blade-client/land-vehicle/vehicle-list",
+          dicUrl: '',
           props: {
             label: "plateNo",
             value: "plateNo"
@@ -245,12 +245,23 @@ export default {
           width: 100,
           type: 'select',
           index: 14,
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
           props: {
             label: "dictValue",
             value: "dictKey"
           },
-          dataType: "string",
+          dicData:[{
+            dictKey: "2",
+            dictValue: "未受理"
+          },{
+            dictKey: "3",
+            dictValue: "未完工"
+          },{
+            dictKey: "5",
+            dictValue: "未到厂"
+          },{
+            dictKey: "6",
+            dictValue: "已提箱"
+          }],
           prop: 'status'
         }, {
           label: "司机",
@@ -756,8 +767,30 @@ export default {
     },
     //变更信息
     changeFleetT(row, index) {
+      let data = [{
+        dictKey: "2",
+        dictValue: "未受理"
+      },{
+        dictKey: "3",
+        dictValue: "未完工"
+      },{
+        dictKey: "5",
+        dictValue: "未到厂"
+      },{
+        dictKey: "6",
+        dictValue: "已提箱"
+      }]
+      for (let item of data){
+        if (row.status == item.dictKey){
+          this.formData = {
+            status:item.dictKey,
+            $status:item.dictValue
+          }
+        }
+      }
       this.formDataList = row
       this.dialogChange = true
+      this.optionData.column[0].dicUrl = "/api/blade-client/land-vehicle/vehicle-list?fleetId="+this.formDataList.fleetId
     },
     //打开变更记录
     recordsOfChanges(row, index) {

+ 6 - 2
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -41,7 +41,11 @@
             type="warning"
             size="small"
             v-if="goodsForm.status > 0"
-            :disabled="this.roleName.indexOf('平台') !== -1||this.roleName.indexOf('经理') !== -1||this.roleName.indexOf('部门经理') !== -1||this.roleName.indexOf('总经理') !== -1"
+            :disabled="
+            (this.roleName.indexOf('平台') !== -1
+            ||this.roleName.indexOf('经理') !== -1
+            ||this.roleName.indexOf('部门经理') !== -1
+            ||this.roleName.indexOf('总经理') !== -1) && !(this.roleName.indexOf('admin') !== -1)"
             :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
             @click="confirmChange"
         >变更
@@ -508,7 +512,7 @@
         typeUpload="CD"
         deleteUrl="/api/blade-client/common-file/remove"
         :data="orderFilesList"
-        :disabled="goodsForm.status === 1"
+        display
         :enumerationValue="85.6"
     ></c-upload>
 

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

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

+ 1 - 1
src/views/reimbursement/detail.vue

@@ -52,7 +52,7 @@
           type="primary"
           @click="editCustomer"
           size="small"
-          :disabled="form.status !== 0"
+          :disabled="form.status > 0"
           :loading="btnLoading"
         >保存数据</el-button>
       </div>