caojunjie il y a 3 ans
Parent
commit
439c40cac6

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

@@ -111,3 +111,10 @@ export function confirmCompletion(data) {
         params:data
     })
 }
+//获取车队司机信息
+export function fleetList() {
+    return request({
+        url: '/api/blade-client/land-vehicle/vehicle-list',
+        method: 'get'
+    })
+}

+ 28 - 18
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -59,14 +59,15 @@
           ref="crudContact"
           :option="entrustOptionTwoT"
           @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
-          @row-update="rowSaveT">
-<!--        <template slot-scope="{type,size,row}" slot="menu">-->
-<!--          <el-button icon="el-icon-edit" :size="size" :type="type" @click="designate(row)">指派</el-button>-->
-<!--        </template>-->
+          @row-update="rowSaveWell">
+        <!--        <template slot-scope="{type,size,row}" slot="menu">-->
+        <!--          <el-button icon="el-icon-edit" :size="size" :type="type" @click="designate(row)">指派</el-button>-->
+        <!--        </template>-->
         <template slot-scope="{row,index}" slot="menu">
           <el-button
               type="text"
               size="small"
+              v-if="row.status===0"
               @click="rowSaveT(row,index)"
           >{{ row.$cellEdit ? '保 存' : '修 改' }}
           </el-button>
@@ -75,13 +76,15 @@
               type="text"
               @click="designate(row, index)"
               v-if="row.status === 0"
-          >调 度</el-button>
+          >调 度
+          </el-button>
           <el-button
               size="small"
               type="text"
               @click="cancelDesignate(row, index)"
               v-if="row.status===1"
-          >取消调度</el-button>
+          >取消调度
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -260,8 +263,8 @@ export default {
         index: true,
         cellBtn: false,
         addBtn: false,
-        cancelBtn:false,
-        editBtn:false,
+        cancelBtn: false,
+        editBtn: false,
         addRowBtn: false,
         delBtn: false,
         showSummary: true,
@@ -296,7 +299,7 @@ export default {
             },
             dataType: "string",
             prop: 'status'
-          },{
+          }, {
             label: '车队',
             width: 200,
             type: 'select',
@@ -343,9 +346,14 @@ export default {
             cell: true,
             prop: 'landAmountC'
           }, {
-            label: '备注',
-            cell: true,
+            label: '委托备注',
             prop: 'remarks'
+          }, {
+            label: '车队备注',
+            prop: 'fleetRemarks'
+          }, {
+            label: '司机备注',
+            prop: 'driverRemarks'
           }
         ]
       },
@@ -628,7 +636,7 @@ export default {
   },
   methods: {
     //刷新数据
-    refreshData(){
+    refreshData() {
       detailDelegationList({id: this.id, kind: '2'}).then(res => {
         this.goodsForm = res.data.data
         this.tableData = res.data.data.orderAddressList
@@ -658,17 +666,19 @@ export default {
     //箱信息保存
     rowSaveT(row, index, done, loading) {
       this.$refs.crudContact.rowCell(row, index)
+    },
+    rowSaveWell(row, index, done, loading) {
       done()
     },
     //箱信息调度
-    designate(row){
-      if (row.fleetId){
+    designate(row) {
+      if (row.fleetId) {
         this.$confirm('是否确定调度', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          dispatchCollection(row).then(res=>{
+          dispatchCollection(row).then(res => {
             this.$message.success('操作成功');
             this.refreshData()
           })
@@ -678,18 +688,18 @@ export default {
             message: '已取消'
           });
         });
-      }else {
+      } else {
         this.$message.warning('请选择车队');
       }
     },
     //取消调度
-    cancelDesignate(row){
+    cancelDesignate(row) {
       this.$confirm('是否确定取消调度', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        cancelDispatchCollection({id:row.id}).then(res=>{
+        cancelDispatchCollection({id: row.id}).then(res => {
           this.$message.success('操作成功');
           this.refreshData()
         })

+ 153 - 136
src/views/landTransportation/driver/index.vue

@@ -1,89 +1,98 @@
 <template>
   <div>
     <basic-container>
-            <avue-crud
-                :data="goodsList"
-                :option="goodsOptionCrud"
-                :table-loading="loading"
-                :page.sync="page"
-                ref="crudContact"
-                @on-load="onLoad"
-                @search-change="searchChange"
-                @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
-                @row-update="rowSave">
-              <template slot-scope="{row,index}" slot="menu">
-                <el-button
-                    type="text"
-                    size="small"
-                    v-if="row.status === 2"
-                    @click="rowSaveT(row,index)"
-                >{{ row.$cellEdit ? '保 存' : '修 改' }}
-                </el-button>
-                <el-button
-                    size="small"
-                    type="text"
-                    @click="designate(row, index)"
-                    v-if="row.status===2"
-                >受 理</el-button>
-                <el-button
-                    size="small"
-                    type="text"
-                    @click="cancelDesignate(row, index)"
-                    v-if="row.status===3"
-                >取消受理</el-button>
-                <el-button
-                    size="small"
-                    type="text"
-                    @click="confirmCompletion(row, index)"
-                    v-if="row.status === 3"
-                >确认完工</el-button>
-              </template>
-            </avue-crud>
+      <avue-crud
+          :data="goodsList"
+          :option="goodsOptionCrud"
+          :table-loading="loading"
+          :page.sync="page"
+          ref="crudContact"
+          @on-load="onLoad"
+          @search-change="searchChange"
+          @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
+          @row-update="rowSave">
+        <template slot-scope="{row,index}" slot="menu">
+          <el-button
+              type="text"
+              size="small"
+              v-if="row.status === 2"
+              @click="rowSaveT(row,index)"
+          >{{ row.$cellEdit ? '保 存' : '修 改' }}
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
+              @click="designate(row, index)"
+              v-if="row.status===2"
+          >受 理
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
+              @click="cancelDesignate(row, index)"
+              v-if="row.status===3"
+          >取消受理
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
+              @click="confirmCompletion(row, index)"
+              v-if="row.status === 3"
+          >确认完工
+          </el-button>
+        </template>
+      </avue-crud>
     </basic-container>
   </div>
 </template>
 
 <script>
-import {driverQueryCollection, acceptanceCollection, acceptanceDispatchCollection,confirmCompletion} from "@/api/landTransportation";
+import {
+  driverQueryCollection,
+  acceptanceCollection,
+  acceptanceDispatchCollection,
+  confirmCompletion,
+  fleetList
+} from "@/api/landTransportation";
 
 export default {
   name: "index",
-  data(){
-    return{
-      form:{},
-      loading:false,
+  data() {
+    return {
+      form: {},
+      loading: false,
       page: {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,50,100,200,300]
+        pageSizes: [10, 50, 100, 200, 300]
       },
-      roleName:localStorage.getItem("roleName").split(',')[0],
-      goodsList:[],
+      roleName: localStorage.getItem("roleName").split(',')[0],
+      goodsList: [],
       goodsOptionCrud: {
-        index:true,
-        addBtn:false,
-        delBtn:false,
+        index: true,
+        addBtn: false,
+        delBtn: false,
         cellBtn: false,
-        cancelBtn:false,
-        editBtn:false,
+        cancelBtn: false,
+        editBtn: false,
         addRowBtn: false,
-        searchMenuPosition:"right",
-        searchMenuSpan:6,
-        align:'center',
-        height:"auto",
+        searchMenuPosition: "right",
+        searchMenuSpan: 6,
+        align: 'center',
+        height: "auto",
         showSummary: true,
         summaryText: "合计",
         sumColumnList: [
           {
             name: 'landWeight',
             type: 'sum',
-            decimals:6
-          },{
+            decimals: 6
+          }, {
             name: 'landAmountC',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'ctnQuantity',
             type: 'count'
           }],
@@ -98,82 +107,87 @@ export default {
           },
           dataType: "string",
           prop: 'status'
-        },{
+        }, {
           label: '车队',
           width: 200,
-          search:true,
+          search: true,
           type: 'select',
+          cascader: ['plateNo'],
           dicUrl: "/api/blade-client/corpsdesc/fleet-list",
           props: {
             label: "cname",
             value: "id"
           },
           prop: 'fleetId'
-        },{
-            label: '尺寸箱型',
-            width: 100,
-            search:true,
-            prop: 'ctnType'
-          },{
-            label: '箱量',
-            width: 50,
-            prop: 'ctnQuantity'
-          }, {
-            label: '重量',
-            width: 160,
-            prop: 'landWeight',
-            controls: false,
-            precision: 6,
-            type: 'number'
-          }, {
-            label: '车号',
-            width: 150,
-            cell: true,
-            prop: 'plateNo'
-          }, {
-            label: '司机',
-            width: 115,
-            search:true,
-            cell: true,
-            prop: 'driverId'
-          }, {
-            label: '电话',
-            width: 160,
-            cell: true,
-            prop: 'tel'
-          }, {
-            label: '箱号',
-            cell: true,
-            prop: 'ctnNo'
-          }, {
-            label: '陆运费(C)',
-            prop: 'landAmountC'
-          }, {
-            label: '是否派车',
-            cell: true,
-            prop: 'sex'
-          }, {
-            label: '备注',
-            cell: true,
-            prop: 'remarks'
+        }, {
+          label: '尺寸箱型',
+          width: 100,
+          search: true,
+          prop: 'ctnType'
+        }, {
+          label: '箱量',
+          width: 50,
+          prop: 'ctnQuantity'
+        }, {
+          label: '重量',
+          width: 160,
+          prop: 'landWeight',
+          controls: false,
+          precision: 6,
+          type: 'number'
+        }, {
+          label: '车号',
+          width: 150,
+          prop: 'vehicleId',
+          type: 'select',
+          dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
+          props: {
+            label: "plateNo",
+            value: "id"
           }
+        }, {
+          label: '司机',
+          width: 115,
+          search: true,
+          prop: 'driverName'
+        }, {
+          label: '电话',
+          width: 160,
+          prop: 'tel'
+        }, {
+          label: '箱号',
+          cell: true,
+          prop: 'ctnNo'
+        }, {
+          label: '陆运费(C)',
+          prop: 'landAmountC'
+        }, {
+          label: '委托备注',
+          prop: 'remarks'
+        }, {
+          label: '车队备注',
+          prop: 'fleetRemarks'
+        }, {
+          label: '司机备注',
+          cell: true,
+          prop: 'driverRemarks'
+        }
         ]
       },
     }
   },
-  methods:{
+  methods: {
     //箱信息保存
-    rowSave(row,index,done,loading) {
-      row.$cellEdit = false
+    rowSave(row, index, done, loading) {
       done()
     },
     //箱信息选择车队
-    getfleetIdT(data,row){
-      this.$set(row,'fleetName',data.cname)
+    getfleetIdT(data, row) {
+      this.$set(row, 'fleetName', data.cname)
     },
     //搜索
-    searchChange(params,done) {
-      this.onLoad(this.page,params)
+    searchChange(params, done) {
+      this.onLoad(this.page, params)
       done();
     },
     //查询
@@ -181,7 +195,7 @@ export default {
       let queryParams = {
         size: page.pageSize,
         current: page.currentPage,
-        tag:'4',
+        tag: '4',
         ...params
       }
       this.loading = true;
@@ -195,34 +209,37 @@ export default {
     //箱信息保存
     rowSaveT(row, index, done, loading) {
       this.$refs.crudContact.rowCell(row, index)
-      done()
     },
     //箱信息派车
-    designate(row){
-      this.$confirm('是否确定派车', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        acceptanceCollection(row).then(res=>{
-          this.$message.success('操作成功');
-          this.onLoad(this.page)
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消'
+    designate(row) {
+      if (row.fleetId) {
+        this.$confirm('是否确定派车', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          acceptanceCollection(row).then(res => {
+            this.$message.success('操作成功');
+            this.onLoad(this.page)
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
         });
-      });
+      } else {
+        this.$message.warning('未选择车队,请选择');
+      }
     },
     //取消派车
-    cancelDesignate(row){
+    cancelDesignate(row) {
       this.$confirm('是否确定取消派车', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        acceptanceDispatchCollection({id:row.id}).then(res=>{
+        acceptanceDispatchCollection({id: row.id}).then(res => {
           this.$message.success('操作成功');
           this.onLoad(this.page)
         })
@@ -233,13 +250,13 @@ export default {
         });
       });
     },
-    confirmCompletion(){
+    confirmCompletion() {
       this.$confirm('是否确定完工', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        confirmCompletion({id:row.id}).then(res=>{
+        confirmCompletion({id: row.id}).then(res => {
           this.$message.success('操作成功');
           this.onLoad(this.page)
         })

+ 138 - 104
src/views/landTransportation/motorcadeDriver/index.vue

@@ -19,19 +19,20 @@
               @click="rowSaveT(row,index)"
           >{{ row.$cellEdit ? '保 存' : '修 改' }}
           </el-button>
-          {{row.status}}
           <el-button
               size="small"
               type="text"
               @click="designate(row, index)"
               v-if="row.status===1"
-          >派 车</el-button>
+          >派 车
+          </el-button>
           <el-button
               size="small"
               type="text"
               @click="cancelDesignate(row, index)"
               v-if="row.status===2"
-          >取消派车</el-button>
+          >取消派车
+          </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -39,51 +40,56 @@
 </template>
 
 <script>
-import {sendACarCollection, sendACarDispatchCollection, driverQueryCollection} from "@/api/landTransportation";
+import {
+  sendACarCollection,
+  sendACarDispatchCollection,
+  driverQueryCollection,
+  fleetList
+} from "@/api/landTransportation";
 
 export default {
   name: "index",
-  data(){
-    return{
-      form:{},
-      loading:false,
+  data() {
+    return {
+      form: {},
+      loading: false,
       page: {
         pageSize: 10,
         currentPage: 1,
         total: 0,
-        pageSizes: [10,50,100,200,300]
+        pageSizes: [10, 50, 100, 200, 300]
       },
-      roleName:localStorage.getItem("roleName").split(',')[0],
-      goodsList:[],
+      roleName: localStorage.getItem("roleName").split(',')[0],
+      goodsList: [],
       entrustOptionTwoT: {
         align: 'center',
         menuAlign: 'center',
-        index:true,
-        addBtn:false,
-        delBtn:false,
+        index: true,
+        addBtn: false,
+        delBtn: false,
         cellBtn: false,
-        cancelBtn:false,
-        editBtn:false,
+        cancelBtn: false,
+        editBtn: false,
         addRowBtn: false,
-        searchMenuPosition:"right",
-        searchMenuSpan:6,
-        height:"auto",
+        searchMenuPosition: "right",
+        searchMenuSpan: 6,
+        height: "auto",
         showSummary: true,
         summaryText: "合计",
         sumColumnList: [
           {
             name: 'landWeight',
             type: 'sum',
-            decimals:6
-          },{
+            decimals: 6
+          }, {
             name: 'landAmountC',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'landAmountD',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'ctnQuantity',
             type: 'count'
           }],
@@ -98,76 +104,101 @@ export default {
           },
           dataType: "string",
           prop: 'status'
-        },{
-            label: '车队',
-            width: 200,
-            search:true,
-            cell: true,
-            type: 'select',
-            dicUrl: "/api/blade-client/corpsdesc/fleet-list",
-            props: {
-              label: "cname",
-              value: "id"
-            },
-            prop: 'fleetId'
-          }, {
-            label: '尺寸箱型',
-            width: 100,
-            search:true,
-            prop: 'ctnType'
-          }, {
-            label: '箱量',
-            width: 50,
-            prop: 'ctnQuantity'
-          }, {
-            label: '重量',
-            width: 160,
-            prop: 'landWeight',
-            controls: false,
-            precision: 6,
-            type: 'number'
-          }, {
-            label: '车号',
-            width: 150,
-            prop: 'plateNo'
-          }, {
-            label: '司机',
-            width: 115,
-            search:true,
-            prop: 'driverId'
-          }, {
-            label: '电话',
-            width: 160,
-            prop: 'tel'
-          }, {
-            label: '陆运费(D)',
-            prop: 'landAmountD'
-          }, {
-            label: '陆运费(C)',
-            cell: true,
-            prop: 'landAmountC'
-          }, {
-            label: '备注',
-            cell: true,
-            prop: 'remarks'
-          }
+        }, {
+          label: '车队',
+          width: 200,
+          search: true,
+          type: 'select',
+          cascader: ['plateNo'],
+          dicUrl: "/api/blade-client/corpsdesc/fleet-list",
+          props: {
+            label: "cname",
+            value: "id"
+          },
+          prop: 'fleetId'
+        }, {
+          label: '尺寸箱型',
+          width: 100,
+          search: true,
+          prop: 'ctnType'
+        }, {
+          label: '箱量',
+          width: 50,
+          prop: 'ctnQuantity'
+        }, {
+          label: '重量',
+          width: 160,
+          prop: 'landWeight',
+          controls: false,
+          precision: 6,
+          type: 'number'
+        }, {
+          label: '车号',
+          width: 150,
+          cell: true,
+          prop: 'vehicleId',
+          type: 'select',
+          dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
+          props: {
+            label: "plateNo",
+            value: "id"
+          },
+          change: (data) => {
+            console.log(data)
+            fleetList().then(res => {
+              for (let item in res.data.data) {
+                if (data.value === res.data.data[item].id) {
+                  this.goodsList[data.index].driverId = res.data.data[item].driverId
+                  this.goodsList[data.index].driverName = res.data.data[item].driverName
+                  this.goodsList[data.index].tel = res.data.data[item].tel
+                }
+              }
+            })
+          },
+        }, {
+          label: '司机',
+          width: 115,
+          search: true,
+          // prop: 'driverId'
+          prop: 'driverName'
+        }, {
+          label: '电话',
+          width: 160,
+          prop: 'tel'
+        }, {
+          label: '陆运费(D)',
+          prop: 'landAmountD'
+        }, {
+          label: '陆运费(C)',
+          cell: true,
+          prop: 'landAmountC'
+        }, {
+          label: '委托备注',
+          prop: 'remarks'
+        }, {
+          label: '车队备注',
+          cell: true,
+          prop: 'fleetRemarks'
+        }, {
+          label: '司机备注',
+          prop: 'driverRemarks'
+        }
         ]
       },
     }
   },
-  methods:{
+  methods: {
     //箱信息保存
-    rowSave(row,index,done,loading) {
-      row.$cellEdit = false
+    rowSave(row, index, done, loading) {
       done()
     },
     //箱信息选择车队
-    getfleetIdT(data,row){
-      this.$set(row,'fleetName',data.cname)
+    getfleetIdT(data, row) {
+      this.$set(row, 'fleetName', data.cname)
     },
     //搜索
-    searchChange(params,done) {
-      this.onLoad(this.page,params)
+    searchChange(params, done) {
+      this.onLoad(this.page, params)
       done();
     },
     //查询
@@ -175,7 +206,7 @@ export default {
       let queryParams = {
         size: page.pageSize,
         current: page.currentPage,
-        tag:'3',
+        tag: '3',
         ...params
       }
       this.loading = true;
@@ -189,34 +220,37 @@ export default {
     //箱信息保存
     rowSaveT(row, index, done, loading) {
       this.$refs.crudContact.rowCell(row, index)
-      done()
     },
     //箱信息派车
-    designate(row){
-      this.$confirm('是否确定派车', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        sendACarCollection(row).then(res=>{
-          this.$message.success('操作成功');
-          this.onLoad(this.page)
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消'
+    designate(row) {
+      if (row.vehicleId) {
+        this.$confirm('是否确定派车', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          sendACarCollection(row).then(res => {
+            this.$message.success('操作成功');
+            this.onLoad(this.page)
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
         });
-      });
+      } else {
+        this.$message.warning('未选择车号,请选择');
+      }
     },
     //取消派车
-    cancelDesignate(row){
+    cancelDesignate(row) {
       this.$confirm('是否确定取消派车', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        sendACarDispatchCollection({id:row.id}).then(res=>{
+        sendACarDispatchCollection({id: row.id}).then(res => {
           this.$message.success('操作成功');
           this.onLoad(this.page)
         })

+ 175 - 160
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -45,9 +45,10 @@
             v-if="goodsForm.status !== 1"
             width="40">
           <template slot-scope="scope">
-            <el-tooltip className="item" v-if="scope.$index === tableData.length-1" effect="dark" content="增加途径地址" placement="top">
+            <el-tooltip className="item" v-if="scope.$index === tableData.length-1" effect="dark" content="增加途径地址"
+                        placement="top">
               <el-button type="primary" icon="el-icon-plus" size="mini" circle @click="addAddress"
-              style="margin-right: 1.25rem;"></el-button>
+                         style="margin-right: 1.25rem;"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -65,7 +66,8 @@
             <span v-else>
               <el-button v-if="goodsForm.status === 1" type="success" 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-button type="danger" icon="el-icon-delete" size="mini" circle
+                             @click="deleteAddress(scope)"></el-button>
               </el-tooltip>
             </span>
           </template>
@@ -95,7 +97,8 @@
             align="center"
             label="详细地址">
           <template slot-scope="scope">
-            <el-input v-model="scope.row.address" :disabled="goodsForm.status === 1" size="small" placeholder="请输入内容"></el-input>
+            <el-input v-model="scope.row.address" :disabled="goodsForm.status === 1" size="small"
+                      placeholder="请输入内容"></el-input>
           </template>
         </el-table-column>
       </el-table>
@@ -130,6 +133,7 @@
       <avue-form :option="goodsOptionForm" v-model="goodsForm">
         <template slot-scope="scope" slot="corpId">
           <crop-select
+              :disabled="goodsForm.status === 1"
               v-model="goodsForm.corpId"
           ></crop-select>
         </template>
@@ -155,7 +159,7 @@
               v-model="row.corpId"
               @getCorpData="(data)=>{getfleetId(data,row)}"
           ></crop-select>
-          <span v-else>{{row.corpName}}</span>
+          <span v-else>{{ row.corpName }}</span>
         </template>
         <template slot-scope="{row}" slot="feeId">
           <breakdown-select
@@ -173,12 +177,14 @@
               size="small"
               :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
               @click="rowCell(row,index)"
-          >{{row.$cellEdit?'保存':'编辑'}}</el-button>
+          >{{ row.$cellEdit ? '保存' : '编辑' }}
+          </el-button>
           <el-button type="text"
                      icon="el-icon-delete"
                      size="small"
                      @click="$refs.collection.rowDel(row,index)"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
         <template slot="menuLeft">
           <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>
@@ -199,7 +205,7 @@
               v-model="row.corpId"
               @getCorpData="(data)=>{getfleetId(data,row)}"
           ></crop-select>
-          <span v-else>{{row.corpName}}</span>
+          <span v-else>{{ row.corpName }}</span>
         </template>
         <template slot-scope="{row}" slot="feeId">
           <breakdown-select
@@ -217,12 +223,14 @@
               size="small"
               :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
               @click="paymentRowCell(row,index)"
-          >{{row.$cellEdit?'保存':'编辑'}}</el-button>
+          >{{ row.$cellEdit ? '保存' : '编辑' }}
+          </el-button>
           <el-button type="text"
                      icon="el-icon-delete"
                      size="small"
                      @click="$refs.payment.rowDel(row,index)"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
         <template slot="menuLeft">
           <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>
@@ -240,7 +248,7 @@
 
 <script>
 import {getLazyTree} from "@/api/base/region";
-import {saveDelegationList, detailDelegationList,removeCollection,saveSaveList} from "@/api/landTransportation";
+import {saveDelegationList, detailDelegationList, removeCollection, saveSaveList} from "@/api/landTransportation";
 
 export default {
   props: {
@@ -250,21 +258,21 @@ export default {
   },
   data() {
     return {
-      activeIndex:'1',
+      activeIndex: '1',
       goodsForm: {},
-      orderFilesList:[],
-      roleName:localStorage.getItem("roleName").split(',')[0],
-      breakConfiguration:{
-        multipleChoices:false,
-        multiple:false,
-        disabled:false,
-        searchShow:true,
-        collapseTags:false,
-        clearable:true,
-        placeholder:'请点击右边按钮选择',
-        dicData:[]
+      orderFilesList: [],
+      roleName: localStorage.getItem("roleName").split(',')[0],
+      breakConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        clearable: true,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
       },
-      advantageProjectData:[],
+      advantageProjectData: [],
       treeOption: {
         label: 'title',
         value: 'id',
@@ -288,92 +296,71 @@ export default {
       entrustOptionTwoT: {
         align: 'center',
         menuAlign: 'center',
-        index:true,
-        cellBtn:true,
-        addBtn:false,
-        addRowBtn:false,
-        delBtn:false,
+        index: true,
+        cellBtn: true,
+        addBtn: false,
+        addRowBtn: false,
+        delBtn: false,
         showSummary: true,
         summaryText: "合计",
         sumColumnList: [
           {
             name: 'landWeight',
             type: 'sum',
-            decimals:6
-          },{
+            decimals: 6
+          }, {
             name: 'landAmountC',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'landAmountD',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'ctnQuantity',
             type: 'count'
           }],
-        column: [
-          {
-            label: '车队',
-            width: 200,
-            slot:true,
-            prop: 'fleetId'
-          }, {
-            label: '尺寸箱型',
-            width: 100,
-            prop: 'ctnType'
-          }, {
-            label: '箱量',
-            width: 50,
-            prop: 'ctnQuantity'
-          }, {
-            label: '重量',
-            width: 160,
-            prop: 'landWeight',
-            controls: false,
-            precision: 6,
-            type: 'number'
-          }, {
-            label: '车号',
-            width: 150,
-            prop: 'plateNo'
-          }, {
-            label: '司机',
-            width: 115,
-            prop: 'driverId'
-          }, {
-            label: '电话',
-            width: 160,
-            prop: 'tel'
-          }, {
-            label: '陆运费(D)',
-            prop: 'landAmountD'
-          }, {
-            label: '陆运费(C)',
-            cell: true,
-            prop: 'landAmountC'
-          }, {
-            label: '备注',
-            cell: true,
-            prop: 'remarks'
-          }
+        column: [{
+          label: '尺寸箱型',
+          width: 100,
+          prop: 'ctnType'
+        }, {
+          label: '箱量',
+          width: 50,
+          prop: 'ctnQuantity'
+        }, {
+          label: '重量',
+          width: 160,
+          prop: 'landWeight',
+          controls: false,
+          precision: 6,
+          type: 'number'
+        }, {
+          label: '陆运费(D)',
+          prop: 'landAmountD'
+        }, {
+          label: '备注',
+          cell: true,
+          prop: 'remarks'
+        }
         ]
       },
       entrustList: [],
       goodsOptionForm: {
         menuBtn: false,
+        disabled: false,
         column: [{
           label: '客户名称',
           formslot: true,
           prop: 'corpId'
-        },{
+        }, {
           label: '所属公司',
           formslot: true,
           prop: 'belongCompany'
         }, {
           label: '订单号',
           prop: 'id',
-          disabled:true
+          disabled: true
         }, {
           label: '提单号',
           prop: 'billNo'
@@ -401,7 +388,7 @@ export default {
       entrustOptionTwo: {
         align: 'center',
         menuAlign: 'center',
-        addBtnText:'录入箱信息',
+        addBtnText: '录入箱信息',
         index: true,
         cellBtn: true,
         addBtn: false,
@@ -412,22 +399,22 @@ export default {
           {
             name: 'landWeight',
             type: 'sum',
-            decimals:6
-          },{
+            decimals: 6
+          }, {
             name: 'landAmountD',
             type: 'sum',
-            decimals:2
-          },{
+            decimals: 2
+          }, {
             name: 'ctnQuantity',
             type: 'sum',
-            decimals:1
+            decimals: 1
           }],
         column: [{
           label: '尺寸箱型',
           cell: true,
           prop: 'ctnType',
           type: 'select',
-          width:100,
+          width: 100,
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
           props: {
             label: "dictValue",
@@ -439,22 +426,22 @@ export default {
           prop: 'ctnQuantity',
           controls: false,
           precision: 0,
-          width:100,
+          width: 100,
           type: 'number'
         }, {
           label: '总重量(吨)',
           cell: true,
           prop: 'landWeight',
           controls: false,
-          width:200,
+          width: 200,
           precision: 6,
           type: 'number'
-        },{
+        }, {
           label: '陆运费(D)',
           cell: true,
           prop: 'landAmountD',
           controls: false,
-          width:200,
+          width: 200,
           precision: 2,
           type: 'number'
         }, {
@@ -469,35 +456,35 @@ export default {
         align: 'center',
         menuAlign: 'center',
         index: true,
-        cancelBtn:false,
-        editBtn:false,
-        delBtn:false,
-        cellBtn:false,
+        cancelBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
         addBtn: false,
         addRowBtn: false,
         showSummary: true,
-        addBtnText:'录入明细',
+        addBtnText: '录入明细',
         summaryText: "合计",
         sumColumnList: [{
-            name: 'price',
-            type: 'sum',
-            decimals:2
-          },{
-            name: 'amount',
-            type: 'sum',
-            decimals:2
-          },{
-            name: 'quantity',
-            type: 'sum',
-            decimals:1
-          }],
+          name: 'price',
+          type: 'sum',
+          decimals: 2
+        }, {
+          name: 'amount',
+          type: 'sum',
+          decimals: 2
+        }, {
+          name: 'quantity',
+          type: 'sum',
+          decimals: 1
+        }],
         column: [{
           label: '客户名称',
-          slot:true,
+          slot: true,
           prop: 'corpId'
         }, {
           label: '费用名称',
-          slot:true,
+          slot: true,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -543,35 +530,35 @@ export default {
         align: 'center',
         menuAlign: 'center',
         index: true,
-        cancelBtn:false,
-        editBtn:false,
-        delBtn:false,
-        cellBtn:false,
+        cancelBtn: false,
+        editBtn: false,
+        delBtn: false,
+        cellBtn: false,
         addBtn: false,
         addRowBtn: false,
         showSummary: true,
-        addBtnText:'录入明细',
+        addBtnText: '录入明细',
         summaryText: "合计",
         sumColumnList: [{
           name: 'price',
           type: 'sum',
-          decimals:2
-        },{
+          decimals: 2
+        }, {
           name: 'amount',
           type: 'sum',
-          decimals:2
-        },{
+          decimals: 2
+        }, {
           name: 'quantity',
           type: 'sum',
-          decimals:1
+          decimals: 1
         }],
         column: [{
           label: '客户名称',
-          slot:true,
+          slot: true,
           prop: 'corpId'
         }, {
           label: '费用名称',
-          slot:true,
+          slot: true,
           prop: 'feeId'
         }, {
           label: '计价单位',
@@ -615,64 +602,91 @@ export default {
     };
   },
   created() {
-    if (this.id){
+    if (this.id) {
       detailDelegationList({id: this.id, kind: '1'}).then(res => {
         this.goodsForm = res.data.data
         this.tableData = res.data.data.orderAddressList
         this.entrustList = res.data.data.orderItemList
         this.goodsList = res.data.data.orderItemList
-        if (res.data.data.orderFeeList.length > 0){
-          res.data.data.orderFeeList.forEach(item=>{
-            if (item.type == 1){
+        if (res.data.data.orderFeeList.length > 0) {
+          res.data.data.orderFeeList.forEach(item => {
+            if (item.type == 1) {
               this.collectionList.push(item)
-            }else {
+            } else {
               this.paymentList.push(item)
             }
           })
         }
+        this.goodsOptionForm.disabled = this.goodsForm.status === 1
         delete this.goodsForm.orderAddressList
         delete this.goodsForm.orderItemList
         delete this.goodsForm.orderFeeList
-        this.tableData.forEach(item=>{
+        this.tableData.forEach(item => {
           if (item.region) item.region = item.region.split(',')
         })
       })
-    }else {
+    } else {
       this.tableData = [{
-        region:[],
-        address:''
-      },{
-        region:[],
-        address:''
+        region: [],
+        address: ''
+      }, {
+        region: [],
+        address: ''
       }]
-      this.entrustList=[{$cellEdit:true}]
+      this.entrustList = [{$cellEdit: true}]
     }
   },
   methods: {
+    //刷新数据
+    refreshData() {
+      detailDelegationList({id: this.id, kind: '1'}).then(res => {
+        this.goodsForm = res.data.data
+        this.tableData = res.data.data.orderAddressList
+        this.entrustList = res.data.data.orderItemList
+        this.goodsList = res.data.data.orderItemList
+        if (res.data.data.orderFeeList.length > 0) {
+          res.data.data.orderFeeList.forEach(item => {
+            if (item.type == 1) {
+              this.collectionList.push(item)
+            } else {
+              this.paymentList.push(item)
+            }
+          })
+        }
+        this.goodsOptionForm.disabled = this.goodsForm.status === 1
+        delete this.goodsForm.orderAddressList
+        delete this.goodsForm.orderItemList
+        delete this.goodsForm.orderFeeList
+        this.tableData.forEach(item => {
+          if (item.region) item.region = item.region.split(',')
+        })
+      })
+    },
     //提交委托
-    submit(){
+    submit() {
       saveDelegationList({
-        id:this.goodsForm.id
+        id: this.goodsForm.id
       }).then(res => {
         this.$message.success('提交成功');
+        this.refreshData()
       })
     },
     //切换收付费
-    handleSelect(tab, event){
+    handleSelect(tab, event) {
       this.activeIndex = tab.name
     },
     //箱信息保存
-    rowSaveT(row,index,done,loading) {
+    rowSaveT(row, index, done, loading) {
       row.$cellEdit = false
       done()
     },
     //箱信息选择车队
-    getfleetIdT(data,row){
-      this.$set(row,'fleetName',data.cname)
+    getfleetIdT(data, row) {
+      this.$set(row, 'fleetName', data.cname)
     },
     //地址新增
     addAddress() {
-      this.tableData.splice(this.tableData.length-1,0,{leas:1111})
+      this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
     },
     //返回主列表
     backToList() {
@@ -684,7 +698,7 @@ export default {
       this.tableData.splice(scope.$index, 1);
     },
     //箱信息保存
-    rowSave(row,index,done,loading) {
+    rowSave(row, index, done, loading) {
       row.$cellEdit = false
       done()
     },
@@ -720,34 +734,35 @@ export default {
         kind: '1',
         orderAddressList: data,
         orderItemList: this.entrustList,
-        orderFeeList:this.collectionList.concat(this.paymentList)
+        orderFeeList: this.collectionList.concat(this.paymentList)
       }).then(res => {
         this.$message.success('保存成功');
+        this.refreshData()
       })
     },
     //收费新增
-    addRowCollection(){
-      this.$refs.collection.rowCellAdd( {
-        currency:'1',
-        type:'1',
-        $cellEdit:true
+    addRowCollection() {
+      this.$refs.collection.rowCellAdd({
+        currency: '1',
+        type: '1',
+        $cellEdit: true
       });
     },
     //付费新增
-    addRowPayment(){
-      this.$refs.payment.rowCellAdd( {
-        currency:'1',
-        type:'2',
-        $cellEdit:true
+    addRowPayment() {
+      this.$refs.payment.rowCellAdd({
+        currency: '1',
+        type: '2',
+        $cellEdit: true
       });
     },
     //选择费用
-    selectValue(value,row){
-      this.$set(row,'feeName',value.cname)
+    selectValue(value, row) {
+      this.$set(row, 'feeName', value.cname)
     },
     //选择客户信息触发
-    getfleetId(data,row){
-      this.$set(row,'corpName',data.cname)
+    getfleetId(data, row) {
+      this.$set(row, 'corpName', data.cname)
     },
     //收款信息移除
     makeDel(row, index) {