QuKatie %!s(int64=3) %!d(string=hai) anos
pai
achega
bccd545fdf

+ 2 - 2
src/api/landTransportation/index.js

@@ -52,7 +52,7 @@ export function detailDelegationList(data) {
 // 单据新增
 export function removeCollection(data) {
     return request({
-        url: '/api/blade-land/orderfee/remove?ids='+data,
+        url: '/api/blade-land/order-fee/remove?ids='+data,
         method: 'post'
     })
 }
@@ -294,7 +294,7 @@ export function changeVehicle(data) {
 //查询车号
 export function queryVehicle(data) {
     return request({
-        url: '/api/blade-land/order-item/plate-no',
+        url: '/api/blade-land/order-fee/plate-no',
         method: 'get',
         params:data
     })

+ 5 - 1
src/enums/column-name.js

@@ -539,8 +539,12 @@ const columnName = [{
   },
   {
     code: 140,
-    name: '国内贸易-采购合同-政策'
+    name: '首页-今日业务'
   },
+  {
+    code: 141,
+    name: '国内贸易-采购合同-政策'
+  }
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 2 - 2
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -167,7 +167,7 @@
       "overHidden": true
     },
     {
-      "label": "出库数量",
+      "label": "订单数量",
       "prop": "actualQuantity",
       "index": 10,
       "width":100,
@@ -177,7 +177,7 @@
       "rules": [
         {
           "required": false,
-          "message": "请输入出库数量",
+          "message": "请输入订单数量",
           "trigger": "blur"
         }
       ]

+ 1 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -75,7 +75,7 @@
             type="text"
             icon="el-icon-delete"
             size="small"
-            :disabled="scope.row.deliveryStatus === '已发货'"
+            :disabled="scope.row.deliveryStatus === '已发货' || scope.row.deliveryStatus === '已到货'"
             @click.stop="rowDel(scope.row,scope.index)"
           >删除
           </el-button>

+ 1 - 1
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -15,7 +15,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 130,
+  "menuWidth": 210,
   "dialogClickModal": false,
   "searchLabelWidth": 100,
   "searchIcon": true,

+ 50 - 1
src/views/businessManagement/salesOrder/index.vue

@@ -100,6 +100,12 @@
           >生成采购</el-button>
           <el-button
             type="text"
+            size="small"
+            @click="customerReceipt(scope.row)"
+            :disabled="!scope.row.status || scope.row.status < 3 || scope.row.createFreight == 1"
+          >客户收货</el-button>
+          <el-button
+            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -121,7 +127,9 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails, saveSell,detail} from "@/api/basicData/configuration"
+import {customerList,
+  typeSave, deleteDetails,
+  saveSell,detail, generateShipment} from "@/api/basicData/configuration"
 import detailPage from "./detailsPageEdit";
 import search from "../../../page/index/search";
 import { defaultDate } from "@/util/date";
@@ -588,6 +596,47 @@ export default {
         })
       })
     },
+    customerReceipt(row) {
+      if (this.$store.getters.inStatus) {
+        this.$alert("客户收货存在,请保存客户收货再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+          }
+        });
+      } else {
+        let arr = []
+        this.openFullScreen(false, '正在生成客户收货...');
+        detail(row.id).then(res => {
+          arr = res.data.data.orderItemsList? res.data.data.orderItemsList: [];
+          if (arr.length === 0) return this.$message.error('该单子明细为空,不能生成客户收货')
+          let ids = [];
+          arr.forEach(item => ids.push(item.id));
+          generateShipment({id: row.id, orderItemIds: ids}).then(res => {
+            this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
+            this.$router.push({
+              path: "/businessManagement/deliveryNotice/index",
+              query: {
+                form: JSON.stringify(res.data.data),
+                pageType: "Generate",
+              },
+            });
+          }).finally(() => {
+            this.openFullScreen(true);
+          })
+        })
+      }
+    },
+    //遮罩层
+    openFullScreen(res, text) {
+      const loading = this.$loading({
+        lock: true,
+        text: text,
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      if (res === true) loading.close();
+    },
   }
 }
 </script>

+ 138 - 84
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -372,6 +372,9 @@
         <template slot="plateNoHeader" slot-scope="{column}">
           {{ column.label }}<span style="color:#F56C6C">*</span>
         </template>
+        <template slot="feeIdHeader" slot-scope="{column}">
+          {{ column.label }}<span style="color:#F56C6C">*</span>
+        </template>
         <template slot-scope="{row}" slot="feeId">
           <breakdown-select
               v-if="row.$cellEdit"
@@ -429,6 +432,12 @@
           ></crop-select>
           <span v-else>{{ row.corpName }}</span>
         </template>
+        <template slot="plateNoHeader" slot-scope="{column}">
+          {{ column.label }}<span style="color:#F56C6C">*</span>
+        </template>
+        <template slot="feeIdHeader" slot-scope="{column}">
+          {{ column.label }}<span style="color:#F56C6C">*</span>
+        </template>
         <template slot-scope="{row}" slot="feeId">
           <breakdown-select
               v-if="row.$cellEdit"
@@ -1320,19 +1329,19 @@ export default {
           label: '单价',
           cell: true,
           type: 'number',
-          controls:false,
+          controls: false,
           prop: 'price'
         }, {
           label: '数量',
           cell: true,
-          controls:false,
+          controls: false,
           type: 'number',
           prop: 'quantity'
         }, {
           label: '金额',
           cell: true,
           type: 'number',
-          controls:false,
+          controls: false,
           prop: 'amount'
         }, {
           label: '税率',
@@ -1381,66 +1390,91 @@ export default {
         }],
         column: [{
           label: '客户名称',
-          slot: true,
-          width: 300,
-          prop: 'corpId'
-        }, {
-          label: '车号',
           cell: true,
-          prop: 'plateNo',
+          width: 300,
+          prop: 'fleetId',
           type: "select",
+          cascader: ['plateNo'],
+          dicUrl: "/api/blade-land/order-fee/fleet?orderId=" + this.id,
           props: {
-            label: "label",
-            value: "label"
+            label: "fleetName",
+            value: "fleetId"
           },
-        }, {
-          label: '费用名称',
-          slot: true,
-          width: 200,
-          prop: 'feeId'
-        }, {
-          label: '计价单位',
-          cell: true,
-          prop: 'unit',
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
+          change:(data)=>{
+            data.row.plateNo = ''
           }
-        }, {
-          label: '单价',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'price',
-        }, {
-          label: '数量',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'quantity'
-        }, {
-          label: '金额',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'amount'
-        }, {
-          label: '税率',
-          cell: true,
-          prop: 'taxRate'
-        }, {
-          label: '币别',
-          cell: true,
-          prop: 'currency',
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          },
         },
+          //   {
+          //   label: '客户名称',
+          //   slot: true,
+          //   width: 300,
+          //   prop: 'corpId'
+          // },
+          {
+            label: '车号',
+            cell: true,
+            prop: 'plateNo',
+            dicUrl: "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}',
+            type: "select",
+            props: {
+              label: "label",
+              value: "label"
+            },
+            dicFormatter:(data)=>{
+              let list = []
+              data.data.forEach(ele=>{
+                list.push({label:ele})
+              })
+              return list
+            }
+          }, {
+            label: '费用名称',
+            slot: true,
+            width: 200,
+            prop: 'feeId'
+          }, {
+            label: '计价单位',
+            cell: true,
+            prop: 'unit',
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            }
+          }, {
+            label: '单价',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'price',
+          }, {
+            label: '数量',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'quantity'
+          }, {
+            label: '金额',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'amount'
+          }, {
+            label: '税率',
+            cell: true,
+            prop: 'taxRate'
+          }, {
+            label: '币别',
+            cell: true,
+            prop: 'currency',
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+          },
         ]
       }
     };
@@ -1452,22 +1486,22 @@ export default {
     // price
     // quantity
     this.findObject(this.collectionOption.column, "price").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.collectionOption.column, "quantity").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.paymentOption.column, "price").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.paymentOption.column, "quantity").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
@@ -1498,15 +1532,22 @@ export default {
     }
     queryVehicle({orderId: this.id}).then(res => {
       const column = this.findObject(this.collectionOption.column, "plateNo");
-      const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
       column.dicData = []
-      columnTwo.dicData = []
       res.data.data.forEach(item => {
         column.dicData.push({label: item})
-        columnTwo.dicData.push({label: item})
       })
       this.key++
     });
+    // this.findObject(this.paymentOption.column, "plateNo").change = (data) => {
+    //   const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
+    //   columnTwo.dicData = []
+    //   queryVehicle({orderId: this.id,fleetId:data.row.fleetId}).then(res => {
+    //     res.data.data.forEach(item => {
+    //       columnTwo.dicData.push({label: item})
+    //     })
+    //   });
+    //   this.key++
+    // }
     this.$refs.other.show = false
     // 非租户模式默认加载管理组数据
     if (!website.tenantMode) {
@@ -1770,11 +1811,11 @@ export default {
     },
     //返回主列表
     backToList(value) {
-      if (value === 0){
+      if (value === 0) {
         this.$emit('backToList')
-      }else if(value === 1){
-        this.$emit('backToList',true)
-      }else if (value === 2){
+      } else if (value === 1) {
+        this.$emit('backToList', true)
+      } else if (value === 2) {
         this.$router.push({
           path: '/landTransportation/reportAnalysis/index'
         });
@@ -1792,11 +1833,15 @@ export default {
     rowCell(row, index) {
       if (row.$cellEdit) {
         if (row.plateNo) {
-          incidentalSubmit(row).then(res => {
-            this.$refs.collection.rowCell(row, index)
-            row = res.data.data
-            this.$message.success("保存成功");
-          })
+          if (row.feeId){
+            incidentalSubmit(row).then(res => {
+              this.$refs.collection.rowCell(row, index)
+              row = res.data.data
+              this.$message.success("保存成功");
+            })
+          }else {
+            this.$message.error("请选择费用名称");
+          }
         } else {
           this.$message.error("请选择车号");
         }
@@ -1806,12 +1851,21 @@ export default {
     },
     paymentRowCell(row, index) {
       if (row.$cellEdit) {
-        incidentalSubmit(row).then(res => {
-          row = res.data.data
-          this.$message.success("保存成功");
-        })
+        if (row.plateNo) {
+          if (row.feeId){
+            incidentalSubmit(row).then(res => {
+              row = res.data.data
+              this.$message.success("保存成功");
+            })
+          }else {
+            this.$message.error("请选择费用名称");
+          }
+        } else {
+          this.$message.error("请选择车号");
+        }
+      } else {
+        this.$refs.payment.rowCell(row, index)
       }
-      this.$refs.payment.rowCell(row, index)
     },
     //箱信息移除
     rowDel(row, index) {
@@ -1850,10 +1904,10 @@ export default {
         this.$refs.collection.rowCellAdd({
           currency: '1',
           type: '1',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
           unit: '件数',
-          corpId: '1526835847238901762',
-          quantity:1,
+          corpId: this.goodsForm.corpId,
+          quantity: 1,
           orderId: this.id,
           $cellEdit: true
         });
@@ -1865,10 +1919,10 @@ export default {
         this.$refs.payment.rowCellAdd({
           currency: '1',
           type: '2',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
           unit: '件数',
-          quantity:1,
-          corpId: '1526835847238901762',
+          quantity: 1,
+          // corpId: '1526835847238901762',
           orderId: this.id,
           $cellEdit: true
         });

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

@@ -240,6 +240,19 @@ export default {
             })
           }
         }, {
+          label: '状态',
+          overHidden: true,
+          width: 100,
+          type: 'select',
+          index: 14,
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          },
+          dataType: "string",
+          prop: 'status'
+        }, {
           label: "司机",
           prop: "driverId",
           type: 'select',
@@ -665,19 +678,6 @@ export default {
             index: 31,
             width: 140,
             search: true,
-          }, {
-            label: '状态',
-            overHidden: true,
-            width: 100,
-            type: 'select',
-            index: 32,
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dataType: "string",
-            prop: 'status'
           }
         ]
       },

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

@@ -1702,7 +1702,7 @@ export default {
       }else if(value === 1){
         this.goodsForm = {}
         this.$emit('backToList',true)
-      }else if (value === 1){
+      }else if (value === 2){
         this.$router.push({
           path: '/wel/index'
         });

+ 27 - 0
src/views/landTransportation/reportAnalysis/index.vue

@@ -51,6 +51,18 @@
             <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.addressDetail }}</div>
           </el-tooltip>
         </template>
+        <template slot="extraAmountItemC" slot-scope="{ row,index}">
+          <el-tooltip class="item" effect="dark" placement="top">
+            <div v-html="ToBreak(row.extraAmountItemC)" slot="content"></div>
+            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.extraAmountItemC }}</div>
+          </el-tooltip>
+        </template>
+        <template slot="extraAmountItemD" slot-scope="{ row,index}">
+          <el-tooltip class="item" effect="dark" placement="top">
+            <div v-html="ToBreak(row.extraAmountItemD)" slot="content"></div>
+            <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ row.extraAmountItemD }}</div>
+          </el-tooltip>
+        </template>
       </avue-crud>
       <el-dialog
           title="杂费明细"
@@ -384,6 +396,11 @@ export default {
             overHidden: true,
             index: 13,
             prop: 'remarks'
+          }, {
+            label: '应收杂费明细',
+            width: 100,
+            index: 17,
+            prop: 'extraAmountItemD'
           }]
       },
       totalData: {}
@@ -417,6 +434,11 @@ export default {
           index: 16,
           type: 'number',
           prop: 'profit'
+        }, {
+          label: '应付杂费明细',
+          width: 100,
+          index: 18,
+          prop: 'extraAmountItemC'
         })
       }else {
         return this.goodsOptionCrud.menu = false;
@@ -521,6 +543,11 @@ export default {
             index: 16,
             type: 'number',
             prop: 'profit'
+          }, {
+            label: '应付杂费明细',
+            width: 100,
+            index: 18,
+            prop: 'extraAmountItemC'
           })
         }else {
           return this.goodsOptionCrud.menu = false

+ 15 - 1
src/views/wel/home/landTransportation/components/quick-launch.vue

@@ -57,6 +57,7 @@ export default {
     return {
       enclosure:false,
       data:[],
+      roleName: localStorage.getItem("roleName").split(','),
       option:{
         align:'center',
         dialogWidth:'85%',
@@ -87,12 +88,25 @@ export default {
           label: '保险日期',
           prop: 'insuranceExpired',
         }]
-      }
+      },
+      entrust:false,
+      dispatch:false,
     };
   },
   props: {
     sysType: Number
   },
+  mounted() {
+    if (this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('业务员') !== -1){
+      // 委托、台账
+      this.entrust = true
+    }
+    if (this.roleName.indexOf('总调度') !== -1 || this.roleName.indexOf('分管调度') !== -1){
+      // 调度、台账、到期提醒
+      this.dispatch = true
+    }
+    if (this.roleName.indexOf('车队') !== -1){}
+  },
   methods: {
     inPage(type) {
       switch (type) {

+ 204 - 172
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -15,178 +15,31 @@
           </span>
         </div>
         <div class="content" v-loading="loading">
-          <el-table
-              :data="tableData"
-              stripe
-              size="mini"
-              height="420"
-              header-row-style="color: #000"
-              style="width: 100%;">
-            <el-table-column
-                type="index"
-                label="序号"
-                align="center"
-                width="50">
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="货运日期"
-              width="150"
-              show-overflow-tooltip
-              prop="arrivalTime"
-            >
-              <template slot-scope="scope">
-                {{scope.row.arrivalTime?scope.row.arrivalTime.slice(0,16):''}}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="业务员"
-              width="60"
-              show-overflow-tooltip
-              prop="salesmanName"
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="货运地点"
-              prop="addressDetail"
-            >
-              <template slot-scope="{ row,index}">
-                <el-tooltip class="item" effect="dark" placement="top">
-                  <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
-                  <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="票据号"
-              prop="receiptNo"
-            >
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="提单号"
-              width="130"
-              show-overflow-tooltip
-              prop="billNo">
-              <template slot-scope="{row}">
+          <avue-crud :data="tableData" :option="option" :key="key" ref="crud" @resetColumn="resetColumn" @saveColumn="saveColumn">
+            <template slot="billNo" slot-scope="{row}">
                 <span class="el-button--text" style="cursor: pointer"
                       @click="openTrack(row,0)">{{ row.billNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="场站"
-              show-overflow-tooltip
-              prop="station"
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="箱型箱量"
-              show-overflow-tooltip
-              prop="ctnDetail"
-            ></el-table-column>
-            <el-table-column
-                align="center"
-                label="车队"
-                width="190"
-                show-overflow-tooltip
-                prop="fleetShortName"
-            ></el-table-column>
-            <el-table-column
-                align="center"
-                label="车号"
-                width="100"
-                show-overflow-tooltip
-                prop="billNo">
-              <template slot-scope="{row}">
+            </template>
+            <template slot="plateNo" slot-scope="{row}">
                 <span class="el-button--text" style="cursor: pointer"
                       @click="openTrack(row,1)">{{ row.plateNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="运费"
-              show-overflow-tooltip
-              prop="landAmountD"
-            ></el-table-column>
-<!--            <el-table-column-->
-<!--              align="center"-->
-<!--              label="其他费用(总)"-->
-<!--              width="100"-->
-<!--              show-overflow-tooltip-->
-<!--              prop="allFeeD"-->
-<!--            ></el-table-column>-->
-            <el-table-column
-              align="center"
-              label="应付杂费"
-              v-if="roleName.indexOf('平台') !== -1"
-              show-overflow-tooltip
-              prop="extraAmountC"
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="应收杂费"
-              show-overflow-tooltip
-              prop="extraAmountD"
-            ></el-table-column>
-            <el-table-column
-                width="100"
-                label="状态"
-                show-overflow-tooltip
-                prop="status">
-              <template slot-scope="{row}">
-                <span v-if="row.status == 0" style="color: #E45656;">未调度</span>
-                <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>
-                <span v-if="row.status == 2" style="color: #F1A532;">未受理</span>
-                <span v-if="row.status == 3" style="color: #53C21D;">未完工</span>
-                <span v-if="row.status == 5" style="color: #F56C6C;">未到厂</span>
-                <span v-if="row.status == 4" style="color: #3C9CFF;">工单关闭</span>
-                <span v-if="row.status == 6" style="color: #3C9CFF;">已提箱</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-                align="center"
-                label="客户名称"
-                width="190"
-                show-overflow-tooltip
-                prop="corpShortName"
-            ></el-table-column>
-            <el-table-column
-                align="center"
-                label="备注"
-                width="190"
-                show-overflow-tooltip
-                prop="remarks"
-            ></el-table-column>
-<!--            <el-table-column-->
-<!--                width="120"-->
-<!--                align="center"-->
-<!--                prop="plateNo">-->
-<!--              <template slot-scope="{row}">-->
-<!--                <span class="el-button&#45;&#45;text" style="cursor: pointer"-->
-<!--                      @click="openTrack(row)">{{ row.plateNo }}</span>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-<!--            <el-table-column-->
-<!--                width="100"-->
-<!--                prop="status">-->
-<!--              <template slot-scope="{row}">-->
-<!--                <span v-if="row.status == 0" style="color: #E45656;">未调度</span>-->
-<!--                <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>-->
-<!--                <span v-if="row.status == 2" style="color: #F1A532;">未受理</span>-->
-<!--                <span v-if="row.status == 3" style="color: #53C21D;">未完工</span>-->
-<!--                <span v-if="row.status == 5" style="color: #F56C6C;">未到厂</span>-->
-<!--                <span v-if="row.status == 4" style="color: #3C9CFF;">工单关闭</span>-->
-<!--                <span v-if="row.status == 6" style="color: #3C9CFF;">已提箱</span>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
-<!--            <el-table-column-->
-<!--                show-overflow-tooltip-->
-<!--                prop="corpName">-->
-<!--            </el-table-column>-->
-          </el-table>
+            </template>
+            <template slot="addressDetail" slot-scope="{ row,index}">
+              <el-tooltip class="item" effect="dark" placement="top">
+                <div v-html="ToBreak(row.addressDetail)" slot="content"></div>
+                <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{row.addressDetail}}</div>
+              </el-tooltip>
+            </template>
+            <template slot="status" slot-scope="{row}">
+              <span v-if="row.status == 0" style="color: #E45656;">未调度</span>
+              <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>
+              <span v-if="row.status == 2" style="color: #F1A532;">未受理</span>
+              <span v-if="row.status == 3" style="color: #53C21D;">未完工</span>
+              <span v-if="row.status == 5" style="color: #F56C6C;">未到厂</span>
+              <span v-if="row.status == 4" style="color: #3C9CFF;">工单关闭</span>
+              <span v-if="row.status == 6" style="color: #3C9CFF;">未提箱</span>
+            </template>
+          </avue-crud>
         </div>
       </div>
     </el-card>
@@ -233,16 +86,191 @@ export default {
       tableData: [],
       map: null,
       marker: null,
-      lineArr: []
+      lineArr: [],
+      key:0,
+      option:{},
+      optionList:{
+        stripe:true,
+        index:true,
+        menu:false,
+        refreshBtn:false,
+        addBtn:false,
+        height:390,
+        align:'center',
+        column:[
+          {
+            label:'货运日期',
+            prop:'arrivalTime',
+            type: "date",
+            format: "yyyy-MM-dd HH:mm",
+            index:1,
+            width:150,
+            overHidden: true,
+          },
+          {
+            label:'业务员',
+            prop:'salesmanName',
+            index:2,
+            width:60,
+            overHidden: true,
+          },
+          {
+            label:'货运地点',
+            prop:'addressDetail',
+            index:3,
+            width:100
+          },
+          {
+            label:'票据号',
+            prop:'receiptNo',
+            index:4,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'提单号',
+            prop:'billNo',
+            index:5,
+            width:130,
+            overHidden: true,
+          },
+          {
+            label:'场站',
+            prop:'station',
+            index:6,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'箱型箱量',
+            prop:'ctnDetail',
+            index:7,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'车队',
+            prop:'fleetShortName',
+            index:8,
+            width:190,
+            overHidden: true,
+          },
+          {
+            label:'车号',
+            prop:'plateNo',
+            index:9,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'状态',
+            prop:'status',
+            type: 'select',
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dataType: "string",
+            index:10,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'运费',
+            prop:'landAmountD',
+            index:11,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'应收杂费',
+            prop:'extraAmountD',
+            index:13,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'客户名称',
+            prop:'corpShortName',
+            index:14,
+            width:100,
+            overHidden: true,
+          },
+          {
+            label:'备注',
+            prop:'remarks',
+            index:15,
+            width:100,
+            overHidden: true,
+          },
+        ]
+      },
     };
   },
-  mounted() {
+  async mounted() {
+    this.option = await this.getColumnData(this.getColumnName(140), this.optionList);
+    this.key++
     this.init();
+    for (let item of this.option.column){
+      if (item.prop === 'extraAmountC') return
+    }
+    if (this.roleName.indexOf('平台') !== -1){
+      this.option.column.push(
+          {
+            label:'应付杂费',
+            prop:'extraAmountC',
+            index:12,
+            width:100,
+            overHidden: true
+          }
+      )
+    }
   },
   beforeDestroy() {
     this.map && this.map.destroy();
   },
   methods: {
+    //自定义列保存
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(140), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumn() {
+      this.option = this.optionList;
+      const inSave = await this.delColumnData(this.getColumnName(140), this.optionList);
+      if (inSave) {
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        for (let item of this.option.column){
+          if (item.prop === 'extraAmountC') return false
+        }
+        if (this.roleName.indexOf('平台') !== -1){
+          console.log(this.option.column)
+          this.option.column.push(
+              {
+                label:'应付杂费',
+                prop:'extraAmountC',
+                index:12,
+                width:100,
+                overHidden: true
+              }
+          )
+        }
+        this.key++
+      }
+    },
     openTrack(row,index){
       if (index == 0){
         this.$router.push({
@@ -253,7 +281,10 @@ export default {
         gaude({itemId: row.id,plateNo:row.plateNo}).then(res => {
           this.lineArr = res.data.data
           this.dialogVisible = true
-          this.initMap();
+          let this_=this
+          setTimeout(function(){
+            this_.initMap();
+          },100)
         })
         location({itemId: row.id,plateNo:'陕YH0008'}).then(res => {
           // console.log(res.data.data)
@@ -264,7 +295,7 @@ export default {
     initMap() {
       this.map = new AMap.Map("container", {
         resizeEnable: true,
-        center: [120.382891,36.066460],
+        center: this.lineArr.length >0 ?this.lineArr[this.lineArr.length - 1]:[120.382891,36.066460],
         zoom: 17
       });
       let icon = new AMap.Icon({
@@ -282,6 +313,7 @@ export default {
         autoRotation: true,
         angle: -15
       });
+      return
       // 绘制轨迹
       let polyline = new AMap.Polyline({
         map: this.map,