Redeem 1 년 전
부모
커밋
0fc2ee4b6f

+ 2 - 2
build/utils.js

@@ -16,9 +16,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-// let devModules = ['all']
-// let devModules = ['index', 'appoint', 'sale']
 let devModules = ['all']
+// let devModules = ['index', 'appoint', 'sale', 'statisticalReport']
+// let devModules = ['all']
 // let devModules = ['index', 'sale']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 7 - 2
src/views/appoint/components/saleContract/addSaleOrderCoproductSend.vue

@@ -90,7 +90,7 @@
                   :fetch-suggestions="querySearch"
                   placeholder="(必填)"
                   :trigger-on-focus="false"
-                  @select="handleSelect"
+                  @select="handleSelect($event, scope.row)"
                   @blur="checkRelationship(scope.$index)"
                 ></el-autocomplete>
               </template>
@@ -637,7 +637,8 @@ export default {
       console.log('获取所有下拉值!')
     },
     //车牌号弹出层
-    handleSelect(item) {
+    handleSelect(item, row) {
+      row.capacityId = item.capacityId
       if (this.receiveCarrierId != null) {
         let mapValue = {
           capacityNumber: item.capacityNumber,
@@ -786,6 +787,10 @@ export default {
           if (e.capacityNumber) {
             beReady++
           }
+          if (!e.capacityId) {
+            state = false
+            this.$message.error('请选择车牌号')
+          }
         })
         if (state) {
           //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空

+ 16 - 3
src/views/appoint/components/saleContract/addSaleOrderCoproductSendCarrier.vue

@@ -90,7 +90,7 @@
                   :fetch-suggestions="querySearch"
                   placeholder="(必填)"
                   :trigger-on-focus="false"
-                  @select="handleSelect"
+                  @select="handleSelect($event, scope.row)"
                   @blur="checkRelationship(scope.$index)"
                 ></el-autocomplete>
               </template>
@@ -643,7 +643,9 @@ export default {
       console.log('获取所有下拉值!')
     },
     //车牌号弹出层
-    handleSelect(item) {
+    handleSelect(item, row) {
+      console.log(item, 'item')
+      row.capacityId = item.capacityId
       if (this.receiveCarrierId != null) {
         let mapValue = {
           capacityNumber: item.capacityNumber,
@@ -762,15 +764,18 @@ export default {
       //   return;
       // }
       if (true) {
+        debugger
         let state = false
         var beReady = 0
         this.selectionList.forEach(e => {
           if (!isNumber(e.orderPlanWeight)) {
             //判定重量合法
+            state = false
             this.$message.error('重量请输入数字')
           } else if (e.saleOrderConsigneeTel) {
             //判断电话号码合法
             if (!isNumber(e.saleOrderConsigneeTel)) {
+              state = false
               this.$message.error('电话号码请输入数字')
             } else {
               e.saleOrderConsigneeTel = e.saleOrderConsigneeTel + ''
@@ -791,6 +796,10 @@ export default {
           if (e.capacityNumber) {
             beReady++
           }
+          if (!e.capacityId) {
+            state = false
+            this.$message.error('请选择车牌号')
+          }
         })
         if (state) {
           //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -809,7 +818,11 @@ export default {
             }
           }
         } else {
-          this.$message.warning('重量/电话号码请输入数字')
+          this.$message({
+            type: 'warning',
+            duration: 2000,
+            message: '请检查是否有未填写项!如车牌号是否选择弹出层数据'
+          })
         }
       }
     },

+ 116 - 125
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -56,6 +56,9 @@
     </div>
     <div class="buttonModel">
       <div class="operation">
+        <el-button v-if="activeName == 'second'" type="danger" @click="refuse">
+          批量拒绝订单
+        </el-button>
         <el-button
           v-if="activeName == 'five'"
           type="primary"
@@ -708,134 +711,122 @@ export default {
         .then(res => {
           this.tableData1 = res.data.data
         })
-    }
+    },
 
     //接收所有已选中的订单
-    // receive() {
-    //   this.$confirm('是否接收已选中的订单', '提示', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning',
-    //     center: true
-    //   })
-    //     .then(() => {
-    //       //初始化承运商SsoId
-    //       var carrierSsoId = ''
-    //       if (getCookie('orgCode') == 'chengyunshang') {
-    //         carrierSsoId = getCookie('userId')
-    //       } else {
-    //         carrierSsoId = null
-    //       }
-    //       //所有选中的分派Id
-    //       var dispatchIdList = []
-    //       this.selectTruckOrder.forEach(item => {
-    //         //初始化mapItem
-    //         var mapItem = {
-    //           //分派Id
-    //           dispatchId: 0
-    //         }
-    //         mapItem.dispatchId = item.dispatchId
-    //         dispatchIdList.push(mapItem)
-    //       })
-    //       //保存承运商SsoId和所有选中的分派Id
-    //       let map = {
-    //         carrierSsoId: carrierSsoId,
-    //         mapList: dispatchIdList
-    //       }
-    //       //请求后端
-    //       this.axios
-    //         .post('/api/v1/ams/lockDispatchSaleOrderList', map)
-    //         .then(res => {
-    //           if (res.data.code == 200) {
-    //             this.$message({
-    //               type: 'success',
-    //               message: '接收成功!'
-    //             })
-    //             if (getCookie('orgCode') == 'chengyunshang') {
-    //               // this.first.requestUrl =
-    //               //   '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
-    //               //   getCookie('userId') +
-    //               //   '&i=' +
-    //               //   new Date()
-    //             } else {
-    //               // this.first.requestUrl =
-    //               //   '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
-    //               //   this.ssoId +
-    //               //   '&i=' +
-    //               //   new Date()
-    //             }
-    //           } else {
-    //             this.$message({
-    //               message: '接单失败,请联系管理员!',
-    //               type: 'warning'
-    //             })
-    //           }
-    //         })
-    //     })
-    //     .catch(() => {
-    //       this.$message({
-    //         type: 'info',
-    //         message: '接单操作已取消!'
-    //       })
-    //     })
-    // },
+    receive() {
+      this.$confirm('是否接收已选中的订单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
+      })
+        .then(() => {
+          //初始化承运商SsoId
+          var carrierSsoId = ''
+          if (getCookie('orgCode') == 'chengyunshang') {
+            carrierSsoId = getCookie('userId')
+          } else {
+            carrierSsoId = null
+          }
+          //所有选中的分派Id
+          var dispatchIdList = []
+          this.selectTruckOrder.forEach(item => {
+            //初始化mapItem
+            var mapItem = {
+              //分派Id
+              dispatchId: 0
+            }
+            mapItem.dispatchId = item.dispatchId
+            dispatchIdList.push(mapItem)
+          })
+          //保存承运商SsoId和所有选中的分派Id
+          let map = {
+            carrierSsoId: carrierSsoId,
+            mapList: dispatchIdList
+          }
+          //请求后端
+          this.axios
+            .post('/api/v1/ams/lockDispatchSaleOrderList', map)
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: 'success',
+                  message: '接收成功!'
+                })
+                if (getCookie('orgCode') == 'chengyunshang') {
+                  // this.first.requestUrl =
+                  //   '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+                  //   getCookie('userId') +
+                  //   '&i=' +
+                  //   new Date()
+                } else {
+                  // this.first.requestUrl =
+                  //   '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+                  //   this.ssoId +
+                  //   '&i=' +
+                  //   new Date()
+                }
+              } else {
+                this.$message({
+                  message: '接单失败,请联系管理员!',
+                  type: 'warning'
+                })
+              }
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '接单操作已取消!'
+          })
+        })
+    },
     //拒绝所有已选中的订单
-    // refuse() {
-    //   this.$confirm('是否拒绝已选中的订单', '提示', {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning',
-    //     center: true
-    //   })
-    //     .then(() => {
-    //       //所有选中的分派Id
-    //       var mapList = []
-    //       this.selectTruckOrder.forEach(item => {
-    //         //初始化mapItem
-    //         var mapItem = {
-    //           //分派Id
-    //           dispatchId: 0
-    //         }
-    //         mapItem.dispatchId = item.dispatchId
-    //         mapList.push(mapItem)
-    //       })
-    //       //请求后端
-    //       this.axios
-    //         .post('/api/v1/ams/refuseDispatchSaleOrderList', mapList)
-    //         .then(res => {
-    //           if (res.data.code == 200) {
-    //             this.$message({
-    //               type: 'success',
-    //               message: '拒绝成功!'
-    //             })
-    //             if (getCookie('orgCode') == 'chengyunshang') {
-    //               this.first.requestUrl =
-    //                 '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
-    //                 getCookie('userId') +
-    //                 '&i=' +
-    //                 new Date()
-    //             } else {
-    //               this.first.requestUrl =
-    //                 '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
-    //                 this.ssoId +
-    //                 '&i=' +
-    //                 new Date()
-    //             }
-    //           } else {
-    //             this.$message({
-    //               message: '拒绝失败,请联系管理员!',
-    //               type: 'error'
-    //             })
-    //           }
-    //         })
-    //     })
-    //     .catch(() => {
-    //       this.$message({
-    //         type: 'info',
-    //         message: '拒绝操作已取消!'
-    //       })
-    //     })
-    // }
+    refuse() {
+      this.$confirm('是否拒绝已选中的订单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+        center: true
+      })
+        .then(() => {
+          //所有选中的分派Id
+          var mapList = []
+          this.closeList.forEach(item => {
+            //初始化mapItem
+            var mapItem = {
+              //分派Id
+              dispatchId: 0
+            }
+            mapItem.dispatchId = item.dispatchId
+            mapList.push(mapItem)
+          })
+          //请求后端
+          this.axios
+            .post('/api/v1/ams/refuseDispatchSaleOrderList', mapList)
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: 'success',
+                  message: '拒绝成功!'
+                })
+                this.secondGetRequestUrl()
+              } else {
+                this.$message({
+                  message: '拒绝失败,请联系管理员!',
+                  type: 'error'
+                })
+              }
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '拒绝操作已取消!'
+          })
+        })
+    }
   }
 }
 </script>

+ 60 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductFormMonitor.vue

@@ -155,6 +155,9 @@
         <el-button type="primary" @click="closeTransOrder">
           关闭运单
         </el-button>
+        <el-button type="primary" @click="steelOrderDispatch">
+          销售订单派车
+        </el-button>
       </div>
       <div class="search">
         <el-button type="primary" @click="exportToExcel('销售副产品报表')"
@@ -347,6 +350,9 @@
         alt=""
       />
     </el-dialog>
+    <el-dialog title="派车" :visible.sync="dialogVisible3" width="80%">
+      <saleOrderDispatch @cancel="dialogVisible3 = false"></saleOrderDispatch>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -354,13 +360,17 @@ import { sjTime } from '@/utils/sharedJsFile'
 import { getCookie } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
+import saleOrderDispatch from './saleOrderDispatch.vue'
 export default {
   components: {
     PathView,
-    currentLocation
+    currentLocation,
+    saleOrderDispatch
   },
   data() {
     return {
+      dispatchSaleOrderNo: '',
+      dialogVisible3: false,
       condition1: null,
       condition2: null,
       condition3: null,
@@ -397,6 +407,10 @@ export default {
         {
           label: '车辆状态',
           value: 'transportStatus'
+        },
+        {
+          label: '销售订单号',
+          value: 'saleOrderNumber'
         }
       ],
       orderNumber: null,
@@ -477,6 +491,51 @@ export default {
     this.orgCode = getCookie('orgCode')
   },
   methods: {
+    steelOrderDispatch() {
+      this.dialogVisible3 = true
+    },
+    closeTransOrder() {
+      if (!this.selection.orderId) {
+        this.$message({
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
+      } else {
+        this.$confirm('是否关闭运单(出皮无法关闭)', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
+        })
+          .then(() => {
+            //初始化maplist
+            let mapList = []
+            mapList.push(this.selection)
+            this.axios
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
+                  this.$message({
+                    type: 'success',
+                    message: '关闭成功!'
+                  })
+                } else {
+                  this.$message({
+                    type: 'error',
+                    message: '关闭失败!'
+                  })
+                }
+              })
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
+      }
+    },
     exportToExcel(tableTitle = '表格标题') {
       //创建工作簿对象
       let wb = XLSX.utils.book_new()

+ 1207 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleOrderDispatch.vue

@@ -0,0 +1,1207 @@
+<template>
+  <div class="addSaleOrderSend">
+    <div class="saleNo">
+      <el-input
+        v-model="saleNo"
+        placeholder="请输入销售订单号"
+        style="width:250px"
+      ></el-input>
+      <el-button @click="searchSaleOrder">查询</el-button>
+    </div>
+    <!-- 销售订单表的数据 -->
+    <div class="saleOrder">
+      <dilTable
+        v-bind.sync="option"
+        @radio-change="currentRadioChange"
+      ></dilTable>
+    </div>
+    <!-- 表单选择车辆和线路 -->
+    <div class="from">
+      <div class="line">
+        <span class="text">线路</span>
+        <el-input
+          v-model="lineName"
+          placeholder="请选择线路"
+          disabled
+        ></el-input>
+        <el-button type="primary" @click="onClick(1)">浏览</el-button>
+      </div>
+      <div class="sendCar">
+        <span class="text">派车数</span>
+        <el-input v-model="carNumber"></el-input>
+        <span class="text">每车重量</span>
+        <el-input v-model="uniteOrderPlanWeight"></el-input>
+        <span class="text">截止日期</span>
+        <el-date-picker
+          type="date"
+          v-model="uniteSaleDateOfReceipt"
+          style="width:150px"
+        ></el-date-picker>
+        <el-button
+          type="primary"
+          @click="AddTruckClick"
+          style="margin-top: 10px;"
+          >确定</el-button
+        >
+      </div>
+    </div>
+
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '车牌号'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '承运商'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '重量'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输单价'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货人'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户电话号码'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+              <!-- 车牌号 -->
+              <template v-if="item.prop == 'capacityNumber'">
+                <el-autocomplete
+                  class="inline-input"
+                  v-model="scope.row.capacityNumber"
+                  :fetch-suggestions="querySearch"
+                  placeholder="(必填)"
+                  :trigger-on-focus="false"
+                  @select="handleSelect($event, scope.row)"
+                  @blur="checkRelationship(scope.$index)"
+                ></el-autocomplete>
+              </template>
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                <el-select v-model="scope.row.carrierName" placeholder="请选择">
+                  <el-option
+                    v-for="item in carrierNameOptions[scope.$index]"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'">
+                <el-input
+                  style="width: 200px"
+                  v-model="scope.row.priceValue"
+                  disabled
+                >
+                </el-input>
+                <el-button
+                  type="primary"
+                  placeholder="()"
+                  @click="select(scope.$index, 3)"
+                  >浏览</el-button
+                >
+              </template>
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="copyRow(scope.$index, scope.row)"
+              type="text"
+              size="big"
+            >
+              复制
+            </el-button>
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 线路模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
+      @keyup.enter.native="AddClick"
+      modal
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="lineText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectClick"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的路线 -->
+        <dilTable
+          v-bind.sync="line"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 车辆模态框 -->
+    <el-drawer
+      :visible.sync="truckDrawer"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      @keyup.enter.native="AddTruckClick"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="truckText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        @keyup.enter.native="selectTruckClick"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="AddTruckClick"
+        style="margin-left: 5px"
+      >
+        <i class="el-icon-check"></i>确定
+      </el-button>
+      <div class="tablecls">
+        <!-- 查询所有的车辆 -->
+        <dilTable
+          v-bind.sync="truck"
+          @selection-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 运输单价(地址对应)的模态框 -->
+    <el-drawer
+      :visible.sync="addressDrawer"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    >
+      <el-input
+        v-model="addresText"
+        placeholder="请输入内容"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+      ></el-input>
+      <el-button
+        type="primary"
+        @click="selectAddresClick"
+        :loading="selectLineLoading"
+        ><i class="el-icon-search"></i>查询</el-button
+      >
+      <!-- 已选中 省市(区)县 -->
+      <el-form :inline="true" style="margin-top: 0.5rem;">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >已选中省市县(区):</label
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            class="el-form-item__content"
+            v-model="address"
+            placeholder="请输入内容"
+            :disabled="true"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <!-- 具体收货地址 -->
+      <div v-if="address != null">
+        <el-form :inline="true" style="margin-top: 0.5rem;">
+          <el-form-item label="具体收货地址:">
+            <el-autocomplete
+              class="inline-input"
+              v-model="place"
+              :fetch-suggestions="querySearch1"
+              placeholder="请输入具体收货地址"
+              :trigger-on-focus="false"
+              @select="handleSelect1"
+            >
+            </el-autocomplete>
+          </el-form-item>
+
+          <el-button type="primary" @click="addAddressClick">确定</el-button>
+        </el-form>
+      </div>
+
+      <div class="tablecls">
+        <!-- 查询所有的运输单价 -->
+        <dilTable
+          v-bind.sync="Address"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+    </el-drawer>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from '@/components/Page/Title'
+import { getCookie } from '@/utils/util.js'
+import { sjTime, isNumber, isIntegerNumber } from '@/utils/sharedJsFile'
+export default {
+  components: { PageTitle },
+  name: 'saleOrderDispatch',
+  props: {
+    dispatchSaleOrderNo: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      //订单总重量
+      number: null,
+      //预估总重量
+      totalWeight: null,
+      //已选中 省市县(区)
+      address: null,
+      //具体收货地址
+      place: null,
+      //收货地址id
+      addressId: null,
+      //省市县(区)查询值
+      addresText: null,
+      //加载
+      selectLineLoading: false,
+      //承运商下拉框中的值
+      carrierNameOptions: [],
+      //收货客户注册承运商Id
+      receiveCarrierId: null,
+      //收货客户注册承运商名称
+      receiveCarrierName: null,
+      //统一截止日期
+      uniteSaleDateOfReceipt: null,
+      //统一每车重量
+      uniteOrderPlanWeight: null,
+      //线路名称
+      lineName: null,
+      lineId: null,
+      //派车数
+      carNumber: null,
+      //线路表格单选缓存数据的
+      cacheLine: {
+        ROW_ID: 0,
+        lineDesk: '',
+        lineId: 0,
+        lineName: '',
+        lineNo: '',
+        lineType: '',
+        spellNumber: 0
+      },
+      //收货客户
+      consigneeCompanyName: '',
+      //是否自提
+      saleOrderIsselfMention: '',
+      //单价已选数量
+      choosePriceCount: 0,
+      //已经选择车辆物资信息
+      selectionList: [],
+      //销售订单物资信息
+      option: {
+        // 表格请求数据的地址
+        requestUrl: '',
+        // 控制显示当选列
+        selectionType: 'radio',
+        isPagination: false
+      },
+      //当前选中的物资id
+      materialId: null,
+      //当前选中的物资名称
+      materialName: null,
+      //选中的线路名称
+      lineName: null,
+      //选中的线路id
+      lineId: null,
+      //是否打开选择线路的模态框
+      drawer: false,
+      //是否打开选择车辆的模态框
+      truckDrawer: false,
+      //是否打开运输单价的模态框
+      addressDrawer: false,
+      //线路的表格
+      line: {
+        requestUrl:
+          '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=' + '销售',
+        selectionType: 'radio'
+      },
+      //车辆的表格
+      truck: {
+        requestUrl: '',
+        selectionType: 'select'
+      },
+      //运输单价的表格
+      Address: {
+        requestUrl: '/api/v1/ams/getAddressDeliveryAddress?apiId=255',
+        selectionType: 'radio'
+      },
+      addressText: null,
+      //线路表格的框计算输入的值
+      lineText: null,
+      tableTop: [
+        {
+          prop: 'capacityNumber',
+          label: '车牌号',
+          width: '130',
+          slot: true
+        },
+        {
+          prop: 'carrierName',
+          label: '承运商',
+          width: '240',
+          slot: true
+        },
+        {
+          prop: 'materialName',
+          label: '物资名称',
+          width: '140'
+        },
+        {
+          prop: 'lineName',
+          label: '运输线路',
+          width: '220'
+        },
+        {
+          prop: 'orderPlanWeight',
+          label: '重量',
+          width: '140',
+          slot: true
+        },
+        {
+          prop: 'saleDateOfReceipt',
+          label: '截止日期',
+          width: '230',
+          slot: true
+        },
+        {
+          prop: 'priceValue',
+          label: '运输单价',
+          width: '300',
+          slot: true
+        },
+        // {
+        //   prop: "saleShipperAddressName",
+        //   label: "收货地址",
+        //   width: "300",
+        //   slot: true,
+        // },
+        {
+          prop: 'saleOrderConsignee',
+          label: '收货人',
+          width: '150',
+          slot: true
+        },
+        {
+          prop: 'saleOrderConsigneeTel',
+          label: '收货客户电话号码',
+          slot: true,
+          width: '150'
+        }
+      ],
+      truckText: null,
+      //当前多选选中的车辆
+      selectTruck: [],
+      //销售订单与物资表主键
+      saleMaterialId: null,
+      //销售订单主键
+      saleOrderId: null,
+      //记录点击的是哪一个收货地址的浏览
+      addressIndex: null,
+      //缓存当前选中的运输单价
+      // priceMap:{},
+      saleNo: ''
+    }
+  },
+  created() {
+    if (getCookie('orgCode') == 'chengyunshang') {
+      this.truck.requestUrl =
+        '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+        getCookie('userId')
+    } else {
+      this.truck.requestUrl =
+        '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' + null
+    }
+    this.initializeLine()
+  },
+  methods: {
+    searchSaleOrder() {
+      this.option.requestUrl =
+        '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=1&i=' +
+        new Date()
+      this.option.requestQuery = {
+        saleNo: this.saleNo
+      }
+    },
+    onInput(val) {
+      if (!isNumber(val)) {
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //初始化线路
+    initializeLine() {
+      this.axios
+        .post(
+          '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=' +
+            '销售副产品单拼路线'
+        )
+        .then(res => {
+          this.lineName =
+            res.data.data.list[0].lineName +
+            '  ' +
+            res.data.data.list[0].lineDesk
+          this.lineId = res.data.data.list[0].lineId
+        })
+    },
+    //校验是否为车牌
+    isVehicleNumber(vehicleNumber) {
+      var result = false
+      if (vehicleNumber != null) {
+        if (vehicleNumber.length == 7) {
+          var express = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/
+          result = express.test(vehicleNumber)
+        }
+      }
+      return result
+    },
+    //填充承运商下拉框
+    fillCarrier(capacityId) {
+      this.axios
+        .get('/api/v1/uc/getCarrierByCapacityId?capacityId=' + capacityId)
+        .then(res => {
+          var carrierNameList = []
+          carrierNameList = res.data.data
+          this.carrierNameOptions.push(carrierNameList)
+        })
+    },
+    //绑定车牌号和承运商的关系
+    bindRelationship(mapValue) {
+      let RmsCapacity = {
+        capacityTypeId: 1,
+        capacityNumber: mapValue.capacityNumber,
+        capacityCorlor: '黄',
+        capacityOwneris: '否',
+        capacityVip: '否',
+        capacityBlacklist: '否',
+        remark: null,
+        carrierId: mapValue.carrierId,
+        state: mapValue.carrierName
+      }
+      this.$confirm(
+        '车牌号(' +
+          mapValue.capacityNumber +
+          ')与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      )
+        .then(() => {
+          this.axios
+            .post('/api/v1/rms/insertCapacity', RmsCapacity)
+            .then(res => {
+              if (res.data.data == 0) {
+                this.$message.success('该车牌号与承运商绑定关系成功!')
+              }
+            })
+        })
+        .catch(() => {
+          this.$message({ type: 'info', message: '已取消' })
+        })
+    },
+    //失焦事件后确定车牌号与承运商是否有绑定关系
+    checkRelationship(index) {
+      if (this.selectionList[index].carrierId != null) {
+        //暂存车牌号
+        var capacityNumber1
+        if (this.isVehicleNumber(this.selectionList[index].capacityNumber)) {
+          let mapValue = {
+            capacityNumber: this.selectionList[index].capacityNumber,
+            carrierId: this.selectionList[index].carrierId,
+            carrierName: this.selectionList[index].carrierName
+          }
+          this.axios
+            .post('/api/v1/uc/isInCapacityCarrier', mapValue)
+            .then(res => {
+              if (res.data.code == '201') {
+                capacityNumber1 = res.data.data
+                if (capacityNumber1 == null) {
+                  this.selectionList[index].capacityNumber = null
+                  this.$message.error('该车牌号未注册,请先前往注册!')
+                } else {
+                  this.bindRelationship(mapValue)
+                }
+              }
+            })
+        }
+      }
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log('获取所有下拉值!')
+    },
+    //车牌号弹出层
+    handleSelect(item, row) {
+      row.capacityId = item.capacityId
+      if (this.receiveCarrierId != null) {
+        let mapValue = {
+          capacityNumber: item.capacityNumber,
+          carrierId: this.receiveCarrierId,
+          carrierName: this.receiveCarrierName
+        }
+        this.axios
+          .post('/api/v1/uc/isInCapacityCarrier', mapValue)
+          .then(res => {
+            if (res.data.code == '201') {
+              this.bindRelationship(mapValue)
+            } else {
+              this.fillCarrier(item.capacityId)
+            }
+          })
+      } else {
+        this.fillCarrier(item.capacityId)
+      }
+    },
+    //查询全国省市县
+    selectAddresClick() {
+      if (this.addresText) {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+          this.addresText
+      } else {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=' + new Date()
+      }
+    },
+
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurants = res.data.data
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    createFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        )
+      }
+    },
+    //以上是车牌号边输边查搜索
+
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          '/api/v1/ams/getRealAddressByLike?addressId=' +
+            this.addressId +
+            '&index=' +
+            queryString
+        )
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurants = res.data.data
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    createFilter1(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        )
+      }
+    },
+    //以上是收货地址边输边查搜索
+
+    //点击确定按钮的事件
+    makeSure() {
+      //获取当前派车的数量和预估吨位的总和
+      var sendCount = this.selectionList.length * this.uniteOrderPlanWeight
+      //判断是否达到总重量减80吨的重量
+      var canDo = this.number - 80 - (this.totalWeight + sendCount)
+      //判断钒渣剩余数量
+      var fKNum = this.number - (this.totalWeight + sendCount)
+      // if (this.materialName != '钒渣' && canDo < 0 && this.number >= 100) {
+      //   var canSend = Math.floor(
+      //     (this.number - 80 - this.totalWeight) / this.uniteOrderPlanWeight
+      //   )
+      //   if (canSend < 0) {
+      //     canSend = 0
+      //   }
+      //   this.$message.error(
+      //     '当前已派发吨数接近订单总吨数,最多还可派 (' + canSend + ') 辆车!'
+      //   )
+      //   // return;
+      // } else
+      // if (
+      //   this.materialName != '钒渣' &&
+      //   this.number < 100 &&
+      //   this.totalWeight > 20
+      // ) {
+      //   this.$message.error('当前可派发车数已用完!')
+      //   return
+      // } else if (this.materialName == '钒渣' && fKNum < 0) {
+      //   this.$message.error(
+      //     '所派车辆超出订单数量,请减少车辆数,或联系销售重新制单'
+      //   )
+      //   return
+      // } else
+      if (true) {
+        let state = false
+        var beReady = 0
+        this.selectionList.forEach(e => {
+          if (!isNumber(e.orderPlanWeight)) {
+            //判定重量合法
+            this.$message.error('重量请输入数字')
+          } else if (e.saleOrderConsigneeTel) {
+            //判断电话号码合法
+            if (!isNumber(e.saleOrderConsigneeTel)) {
+              this.$message.error('电话号码请输入数字')
+            } else {
+              ;(e.saleOrderConsigneeTel = e.saleOrderConsigneeTel + ''),
+                (state = true)
+            }
+          } else {
+            ;(e.saleOrderConsigneeTel = null), (state = true)
+          }
+          //其他条件
+          if (e.saleDateOfReceipt) {
+            //转化截止日期格式
+            e.saleDateOfReceipt = sjTime(e.saleDateOfReceipt)
+          }
+          if (isIntegerNumber(e.carrierName)) {
+            e.carrierId = e.carrierName
+          }
+          if (e.capacityNumber) {
+            beReady++
+          }
+          if (!e.capacityId) {
+            state = false
+            this.$message.error('请选择车牌号')
+          }
+        })
+        if (state) {
+          //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
+          if (this.saleOrderIsselfMention == '是') {
+            this.selectionList.forEach(e => {
+              e.priceValue = null
+              e.priceId = null
+            })
+            //发送请求
+            this.sendRequest(beReady)
+          } else {
+            //判断是否全部完成运输单价的选择
+            if (this.choosePriceCount == this.selectionList.length) {
+              this.sendRequest(beReady)
+            } else {
+              this.$message.warning('还有运输单价未被选定!')
+            }
+          }
+        } else {
+          this.$message.warning('重量/电话号码请输入数字')
+        }
+      }
+    },
+    //发送请求
+    sendRequest(beReady) {
+      if (beReady == this.selectionList.length) {
+        this.axios
+          .post('/api/v1/ams/dispatchTruckOrderBySale', {
+            saleOrderId: this.saleOrderId,
+            mapList: this.selectionList,
+            userName: getCookie('loginName')
+          })
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message.success('派车成功')
+              this.$emit('cancel', 'ok')
+            } else {
+              this.$message({
+                message:
+                  '该销售订单下:已过磅、已派发未过磅、当前未派发的吨位总和已超过销售订单吨位,请联系销售重新制单;或调节当前未派发吨位。',
+                duration: 3000,
+                offset: '250',
+                center: true
+              })
+            }
+          })
+      } else {
+        this.$message.error('还有车牌号未填写!')
+      }
+    },
+    //点击取消按钮的事件
+    cancel() {
+      this.$emit('cancel', 'cancel')
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index) {
+      this.selectionList.splice(index, 1)
+    },
+    //复制的方法
+    copyRow(index, row) {
+      let arr = []
+      let crr = []
+      for (var i = 0; i < this.selectionList.length; i++) {
+        if (i == index) {
+          //表格数复制
+          arr.push(this.selectionList[i])
+          arr.push({
+            capacityId: row.capacityId,
+            capacityNumber: row.capacityNumber,
+            carrierName: row.carrierName,
+            carrierId: row.carrierId,
+            lineId: row.lineId,
+            lineName: row.lineName,
+            materialId: row.materialId,
+            materialName: row.materialName,
+            orderPlanWeight: row.orderPlanWeight,
+            saleDateOfReceipt: row.saleDateOfReceipt,
+            saleMaterialId: row.saleMaterialId,
+            saleOrderConsignee: row.saleOrderConsignee,
+            saleOrderConsigneeTel: row.saleOrderConsigneeTel,
+            saleShipperAddressId: row.saleShipperAddressId,
+            place: row.place,
+            priceValue: row.priceValue,
+            priceId: row.priceId
+          })
+          //下拉框数据复制
+          crr.push(this.carrierNameOptions[i])
+          crr.push(this.carrierNameOptions[i])
+        } else {
+          arr.push(this.selectionList[i])
+          crr.push(this.carrierNameOptions[i])
+        }
+      }
+      this.selectionList = []
+      this.selectionList = arr
+      this.carrierNameOptions = []
+      this.carrierNameOptions = crr
+    },
+    //收货地址模态窗口的框计算
+    selectAddressClick() {
+      this.Address.requestUrl =
+        '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+        this.addressText
+    },
+
+    //运输单价模态窗口的点击确定事件--------------
+    addAddressClick() {
+      //获取运输单价和运输单价ID
+      let map = {
+        place: this.place,
+        addressId: this.addressId
+      }
+      this.axios.post('/api/v1/ams/getPriceMap', map).then(res => {
+        if (res.data.data.priceId == -1) {
+          this.selectionList[
+            this.addressIndex
+          ].saleShipperAddressId = this.addressId
+          this.selectionList[this.addressIndex].place = this.place
+          this.selectionList[this.addressIndex].priceValue =
+            '该区域尚未录入任何单价!'
+          this.selectionList[this.addressIndex].priceId = 0
+          this.addAddressClickNext()
+        } else {
+          //赋值运输单价和运输单价ID
+          this.selectionList[
+            this.addressIndex
+          ].saleShipperAddressId = this.addressId
+          this.selectionList[this.addressIndex].place = this.place
+          this.selectionList[this.addressIndex].priceValue =
+            res.data.data.priceValue //this.priceMap.priceValue
+          this.selectionList[this.addressIndex].priceId = res.data.data.priceId //this.priceMap.priceId
+          this.addAddressClickNext()
+        }
+      })
+    },
+    //运输单价模态窗口的点击确定事件接续执行方法
+    addAddressClickNext() {
+      this.addressDrawer = false
+      let arr = this.selectionList
+      this.selectionList = []
+      //统计被选中的运输单价数量
+      var count = 0
+      arr.forEach(e => {
+        if (e.priceValue) {
+          count++
+        }
+        this.selectionList.push({
+          //销售订单与物资表主键
+          capacityId: e.capacityId,
+          capacityNumber: e.capacityNumber,
+          carrierName: e.carrierName,
+          carrierId: e.carrierId,
+          lineId: e.lineId,
+          lineName: e.lineName,
+          materialId: e.materialId,
+          materialName: e.materialName,
+          orderPlanWeight: e.orderPlanWeight,
+          saleDateOfReceipt: e.saleDateOfReceipt,
+          saleMaterialId: e.saleMaterialId,
+          saleOrderConsignee: e.saleOrderConsignee,
+          saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+          saleShipperAddressId: e.saleShipperAddressId,
+          place: e.place,
+          priceValue: e.priceValue,
+          priceId: e.priceId
+        })
+      })
+      console.log('this.selectionList222', this.selectionList)
+      //赋值单价已选数量
+      this.choosePriceCount = count
+    },
+
+    //收货地址点击浏览的事件
+    select(index) {
+      this.addressDrawer = true
+      this.addressIndex = index
+    },
+    //收货地址模态框单选选中的事件
+    currentRadioChange2(val) {
+      //若具体地址有值,清空值
+      if (this.place != null) {
+        this.place = null
+      }
+      ;(this.address = val.address), (this.addressId = val.addressId)
+      // this.priceMap = {};
+      // this.priceMap = val;
+    },
+    //派车数确定事件
+    AddTruckClick() {
+      if (!this.materialId) {
+        this.$message.warning('请选择物资后,再点击!')
+      } else if (!this.lineId) {
+        this.$message.warning('请选择线路后,再点击!')
+      } else if (!this.carNumber) {
+        this.$message.warning('请先输入派车数!')
+      } else if (!this.uniteOrderPlanWeight) {
+        this.$message.warning('请先输入每车数量!')
+      } else if (!this.uniteSaleDateOfReceipt) {
+        this.$message.warning('请先输入截止日期!')
+      } else {
+        var i = 0
+        //给自提客户,即(承运商)赋值
+        let mapValue = {
+          isSelfMention: this.saleOrderIsselfMention,
+          consigneeName: this.consigneeCompanyName
+        }
+        this.axios
+          .post('/api/v1/uc/getCarrierByConsignee', mapValue)
+          .then(res => {
+            if (res.data.data == null) {
+              this.receiveCarrierId = null
+              this.receiveCarrierName = null
+              this.$message.warning('该收货单位尚未注册为承运商!')
+            } else {
+              this.receiveCarrierId = res.data.data.carrierId
+              this.receiveCarrierName = res.data.data.carrierName
+            }
+            //若自提客户为四川西南水泥有限公司
+            if (this.receiveCarrierName == '四川西南水泥有限公司') {
+              this.axios.get('/api/v1/uc/getXiNanCarrier').then(res => {
+                //生成下方表单单元格
+                for (i = 0; i < this.carNumber; i++) {
+                  this.selectionList.push({
+                    //销售订单与物资表主键
+                    saleMaterialId: this.saleMaterialId,
+                    capacityId: null,
+                    carrierId: this.receiveCarrierId,
+                    capacityNumber: null,
+                    carrierName: this.receiveCarrierName,
+                    materialName: this.materialName,
+                    materialId: this.materialId,
+                    orderPlanWeight: this.uniteOrderPlanWeight,
+                    saleDateOfReceipt: this.uniteSaleDateOfReceipt,
+                    lineName: this.lineName,
+                    lineId: this.lineId,
+                    priceValue: null,
+                    priceId: null,
+                    saleOrderConsignee: null
+                  })
+                  this.carrierNameOptions.push(res.data.data)
+                }
+                console.log('res.data.data', res.data.data)
+              })
+            } else {
+              //生成下方表单单元格
+              for (i = 0; i < this.carNumber; i++) {
+                this.selectionList.push({
+                  //销售订单与物资表主键
+                  saleMaterialId: this.saleMaterialId,
+                  capacityId: null,
+                  carrierId: this.receiveCarrierId,
+                  capacityNumber: null,
+                  carrierName: this.receiveCarrierName,
+                  materialName: this.materialName,
+                  materialId: this.materialId,
+                  orderPlanWeight: this.uniteOrderPlanWeight,
+                  saleDateOfReceipt: this.uniteSaleDateOfReceipt,
+                  lineName: this.lineName,
+                  lineId: this.lineId,
+                  priceValue: null,
+                  priceId: null,
+                  saleOrderConsignee: null
+                })
+              }
+            }
+          })
+      }
+    },
+    //车辆模态框框计算
+    selectTruckClick() {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.truck.requestUrl =
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+          getCookie('userId') +
+          '&index=' +
+          this.truckText
+      } else {
+        this.truck.requestUrl =
+          '/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId=' +
+          null +
+          '&index=' +
+          this.truckText
+      }
+    },
+    //车辆表格
+    currentRadioChange1(select) {
+      this.selectTruck = []
+      this.selectTruck = select
+    },
+    //主界面表格单选
+    currentRadioChange(row) {
+      this.consigneeCompanyName = row.consigneeCompanyName
+      this.saleOrderIsselfMention = row.saleOrderIsselfMention
+      this.materialId = row.materialId
+      this.materialName = row.materialName
+      this.saleMaterialId = row.saleMaterialId
+      this.saleOrderId = row.saleOrderId
+      this.totalWeight = row.totalWeight
+      this.number = row.number
+    },
+    //线路表格的单选事件
+    currentRadioChange5(row) {
+      //存在lineName,赋值,否则初始化
+      if (row.lineName) {
+        this.cacheLine = row
+      } else {
+        this.cacheLine = {
+          ROW_ID: 0,
+          lineDesk: '',
+          lineId: 0,
+          lineName: '',
+          lineNo: '',
+          lineType: '',
+          spellNumber: 0
+        }
+      }
+    },
+    onClick(num) {
+      if (num == 1) {
+        this.drawer = true
+        this.lineText = null
+      }
+    },
+    //线路表格的框计算
+    selectClick() {
+      this.line.requestUrl =
+        '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=' + this.lineText
+    },
+    //线路表格的确定事件
+    AddClick() {
+      if (this.cacheLine.lineName != '') {
+        this.drawer = false
+        this.lineName = this.cacheLine.lineName + '  ' + this.cacheLine.lineDesk
+        this.lineId = this.cacheLine.lineId
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls {
+    margin-top: 20px;
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button {
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>