Redeem 1 rok temu
rodzic
commit
e451493d0b

+ 2 - 2
build/utils.js

@@ -17,8 +17,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 
 // let devModules = ['all']
 // let devModules = ['all']
-let devModules = ['index', 'appoint']
-// let devModules = ['all']
+// let devModules = ['index', 'appoint', 'sale', 'statisticalReport']
+let devModules = ['all']
 // let devModules = ['index', 'sale']
 // let devModules = ['index', 'sale']
 
 
 if (pathSrc.indexOf('node_modules') > -1) {
 if (pathSrc.indexOf('node_modules') > -1) {

+ 28 - 22
config/index.js

@@ -10,10 +10,11 @@ let proxyTable = {
   '/icore.icp.web/pass/v1/sysusers/user/token': {
   '/icore.icp.web/pass/v1/sysusers/user/token': {
     //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //https://portal.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
     //target: 'https://portal-dev.steerinfo.com/icore.icp.web/pass/sso/v1/sysusers/user/token',
-    // target: 'http://172.16.33.166:9001/v1/sysusers/user/token',
-    target:
-      'https://wl.dasteel.cn:32322/icore.icp.web/pass/v1/sysusers/user/token',
-    secure: true,
+    target: 'http://172.16.33.166:9001/v1/sysusers/user/token',
+    //以下两行代码为测试环境
+    // target:
+    //   'https://wl.dasteel.cn:32322/icore.icp.web/pass/v1/sysusers/user/token',
+    // secure: true,
 
 
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
@@ -22,9 +23,10 @@ let proxyTable = {
   },
   },
   '/icore.icp.web/pass/v1': {
   '/icore.icp.web/pass/v1': {
     //target: 'http://172.16.33.161:80/v1', //加http
     //target: 'http://172.16.33.161:80/v1', //加http
-    // target: 'http://172.16.33.166:9001/v1',
-    target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/v1',
-    secure: true,
+    target: 'http://172.16.33.166:9001/v1',
+    //以下两行代码为测试环境
+    // target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/v1',
+    // secure: true,
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
       '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
       '^/icore.icp.web/pass/v1': '/' //这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替
@@ -33,9 +35,10 @@ let proxyTable = {
   },
   },
   '/icore.icp.web/pass/auth/login': {
   '/icore.icp.web/pass/auth/login': {
     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
     //target: 'http://sso-dev.steerinfo.com/icore.icp.web/pass/auth/login',
-    // target: 'http://172.16.33.166:9001/auth/login',
-    target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/auth/login',
-    secure: true,
+    target: 'http://172.16.33.166:9001/auth/login',
+    //以下两行代码为测试环境
+    // target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/auth/login',
+    // secure: true,
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
       '^/icore.icp.web/pass/auth/login': ''
       '^/icore.icp.web/pass/auth/login': ''
@@ -49,9 +52,10 @@ let proxyTable = {
     }
     }
   },
   },
   '/icore-api': {
   '/icore-api': {
-    // target: 'http://172.16.33.166:9001',
-    secure: true,
-    target: 'https://wl.dasteel.cn:32322/icore-api',
+    target: 'http://172.16.33.166:9001',
+    //以下两行代码为测试环境
+    // secure: true,
+    // target: 'https://wl.dasteel.cn:32322/icore-api',
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
       '^/icore-api': '/'
       '^/icore-api': '/'
@@ -82,9 +86,10 @@ let proxyTable = {
   },
   },
   // 所有数据的请求域名地址
   // 所有数据的请求域名地址
   '/api/v1': {
   '/api/v1': {
-    // target: 'http://172.16.33.166:80',
-    target: 'https://wl.dasteel.cn:32322/api/v1',
-    secure: false,
+    target: 'http://172.16.33.166:80',
+    //以下两行代码为测试环境
+    // target: 'https://wl.dasteel.cn:32322/api/v1',
+    // secure: false,
     // target: 'http://localhost:8080',
     // target: 'http://localhost:8080',
     // target: 'http://192.168.1.104:8080',
     // target: 'http://192.168.1.104:8080',
     ws: true,
     ws: true,
@@ -94,9 +99,9 @@ let proxyTable = {
     }
     }
   },
   },
   '/views/api/v1': {
   '/views/api/v1': {
-    // target: 'http://172.16.33.166:80',
-    target: 'https://wl.dasteel.cn:32322',
-    secure: false,
+    target: 'http://172.16.33.166:80',
+    // target: 'https://wl.dasteel.cn:32322',
+    // secure: false,
     // target: 'http://localhost:8080',
     // target: 'http://localhost:8080',
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
@@ -104,9 +109,10 @@ let proxyTable = {
     }
     }
   },
   },
   '/icore.icp.web/pass/logout': {
   '/icore.icp.web/pass/logout': {
-    // target: 'http://172.16.33.166:9001/logout',
-    target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/logout',
-    secure: true,
+    target: 'http://172.16.33.166:9001/logout',
+    //以下两行代码为测试环境
+    // target: 'https://wl.dasteel.cn:32322/icore.icp.web/pass/logout',
+    // secure: true,
     changeOrigin: true,
     changeOrigin: true,
     pathRewrite: {
     pathRewrite: {
       '^/icore.icp.web/pass/logout': '/'
       '^/icore.icp.web/pass/logout': '/'

+ 7 - 21
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -65,7 +65,7 @@
           <template slot="scope" v-if="item.label !== '运输单价'">
           <template slot="scope" v-if="item.label !== '运输单价'">
             <span>{{ item.label }}</span>
             <span>{{ item.label }}</span>
           </template>
           </template>
-          <template slot="scope" v-if="item.label !== '截止日期'">
+          <template slot="scope" v-if="item.label !== '订单日期'">
             <span>{{ item.label }}</span>
             <span>{{ item.label }}</span>
           </template>
           </template>
           <template slot="scope" v-if="item.label !== '收货姓名'">
           <template slot="scope" v-if="item.label !== '收货姓名'">
@@ -94,14 +94,6 @@
                   @change="updateArragneCxh(scope.row.cxh)"
                   @change="updateArragneCxh(scope.row.cxh)"
                 ></el-input>
                 ></el-input>
               </template>
               </template>
-              <!-- 订单日期 -->
-              <template v-if="item.prop == 'orderDate'">
-                <el-date-picker
-                  class="textinput3"
-                  type="date"
-                  v-model.number="scope.row.orderDate"
-                ></el-date-picker>
-              </template>
               <template v-if="item.prop == 'carrierName'">
               <template v-if="item.prop == 'carrierName'">
                 <el-autocomplete
                 <el-autocomplete
                   class="textinput1"
                   class="textinput1"
@@ -147,7 +139,7 @@
                   >浏览</el-button
                   >浏览</el-button
                 >
                 >
               </template>
               </template>
-              <!-- 截止日期 -->
+              <!-- 订单日期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
               <template v-if="item.prop == 'saleDateOfReceipt'">
                 <el-date-picker
                 <el-date-picker
                   class="textinput3"
                   class="textinput3"
@@ -363,12 +355,6 @@ export default {
           width: '60',
           width: '60',
           slot: true
           slot: true
         },
         },
-        {
-          prop: 'orderDate',
-          label: '订单日期',
-          width: '60',
-          slot: true
-        },
         {
         {
           prop: 'materialName',
           prop: 'materialName',
           label: '物资名称',
           label: '物资名称',
@@ -393,7 +379,7 @@ export default {
         },
         },
         {
         {
           prop: 'saleDateOfReceipt',
           prop: 'saleDateOfReceipt',
-          label: '截止日期',
+          label: '订单日期',
           width: '230',
           width: '230',
           slot: true
           slot: true
         },
         },
@@ -563,7 +549,7 @@ export default {
       if (!row.saleDateOfReceipt) {
       if (!row.saleDateOfReceipt) {
         this.$message({
         this.$message({
           type: 'error',
           type: 'error',
-          message: '请选择截止日期!'
+          message: '请选择订单日期!'
         })
         })
         return
         return
       }
       }
@@ -780,7 +766,7 @@ export default {
         ) {
         ) {
           this.$message({
           this.$message({
             type: 'error',
             type: 'error',
-            message: '请填入截止日期!'
+            message: '请填入订单日期!'
           })
           })
           return
           return
         }
         }
@@ -838,7 +824,7 @@ export default {
       if (!this.selectionList[0].saleDateOfReceipt) {
       if (!this.selectionList[0].saleDateOfReceipt) {
         this.$message({
         this.$message({
           type: 'error',
           type: 'error',
-          message: '请填入截止日期!'
+          message: '请填入订单日期!'
         })
         })
         return
         return
       }
       }
@@ -855,7 +841,7 @@ export default {
           shippingAddressId: 0,
           shippingAddressId: 0,
           //具体地址
           //具体地址
           place: null,
           place: null,
-          //截止日期
+          //订单日期
           dateOfReceipt: null,
           dateOfReceipt: null,
           //收货方姓名
           //收货方姓名
           orderConsignee: '',
           orderConsignee: '',

+ 55 - 12
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeFormMonitor.vue

@@ -65,16 +65,16 @@
           </el-select>
           </el-select>
           <el-date-picker
           <el-date-picker
             v-model="startTime"
             v-model="startTime"
-            type="datetime"
-            placeholder="派车时间"
+            :type="dateType"
+            placeholder=""
             style="width: 180px;"
             style="width: 180px;"
           >
           >
           </el-date-picker>
           </el-date-picker>
           <span>至</span>
           <span>至</span>
           <el-date-picker
           <el-date-picker
             v-model="endTime"
             v-model="endTime"
-            type="datetime"
-            placeholder="派车时间"
+            :type="dateType"
+            placeholder=""
             style="width: 180px;"
             style="width: 180px;"
           >
           >
           </el-date-picker>
           </el-date-picker>
@@ -158,6 +158,9 @@
         <el-button type="primary" @click="closeTransOrder">
         <el-button type="primary" @click="closeTransOrder">
           关闭运单
           关闭运单
         </el-button>
         </el-button>
+        <el-button type="primary" @click="steelOrderDispatch">
+          销售订单排车
+        </el-button>
       </div>
       </div>
       <div class="search">
       <div class="search">
         <el-button type="primary" @click="exportToExcel('销售化产焦炭报表')"
         <el-button type="primary" @click="exportToExcel('销售化产焦炭报表')"
@@ -366,22 +369,42 @@
         alt=""
         alt=""
       />
       />
     </el-dialog>
     </el-dialog>
+    <el-dialog title="排车" :visible.sync="dialogVisible3" width="80%">
+      <saleOrderArrage @cancel="dialogVisible3 = false"></saleOrderArrage>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
 import { sjTime } from '@/utils/sharedJsFile'
 import { sjTime } from '@/utils/sharedJsFile'
-import { getCookie } from '@/utils/util.js'
+import { getCookie, formatDate } from '@/utils/util.js'
 import PathView from './mapTest.vue'
 import PathView from './mapTest.vue'
 import currentLocation from './currentLocation.vue'
 import currentLocation from './currentLocation.vue'
 import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
 import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
+import saleOrderArrage from './saleOrderArrage'
 export default {
 export default {
   components: {
   components: {
     PathView,
     PathView,
-    currentLocation
+    currentLocation,
+    saleOrderArrage
   },
   },
   data() {
   data() {
+    const generateStartDate = _ => {
+      let startDate = new Date()
+      let startDateStr = formatDate(startDate, 'yyyy-MM-dd')
+      let startTimeStr = startDateStr + ' 00:00:00'
+      let startTime = new Date(startTimeStr)
+      return startTime
+    }
+    const generateEndDate = _ => {
+      let endDate = new Date()
+      let endDateStr = formatDate(endDate, 'yyyy-MM-dd')
+      let endTimeStr = endDateStr + ' 23:59:59'
+      let endTime = new Date(endTimeStr)
+      return endTime
+    }
     return {
     return {
       caseNoVisiable: false,
       caseNoVisiable: false,
+      dialogVisible3: false,
       caseNumber: null,
       caseNumber: null,
       condition1: null,
       condition1: null,
       condition2: null,
       condition2: null,
@@ -439,8 +462,8 @@ export default {
         selectionType: 'radio',
         selectionType: 'radio',
         requestQuery: null
         requestQuery: null
       },
       },
-      startTime: null,
-      endTime: null,
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
       //合计净重
       //合计净重
       totalNumber: 0,
       totalNumber: 0,
       //合计车数
       //合计车数
@@ -476,7 +499,7 @@ export default {
         endPointName: '',
         endPointName: '',
         statusCode: '位置'
         statusCode: '位置'
       },
       },
-      screen: 0,
+      screen: 3,
       timeOptions: [
       timeOptions: [
         {
         {
           label: '派车时间',
           label: '派车时间',
@@ -485,8 +508,10 @@ export default {
         {
         {
           label: '进厂时间',
           label: '进厂时间',
           value: 1
           value: 1
-        }
-      ]
+        },
+        { label: '订单日期', value: 3 }
+      ],
+      dateType: 'date'
     }
     }
   },
   },
   created() {
   created() {
@@ -494,7 +519,15 @@ export default {
       isEnFactoryFlag: this.screen
       isEnFactoryFlag: this.screen
     })
     })
   },
   },
+  watch: {
+    screen(val) {
+      this.dateType = val === 3 ? 'date' : 'datetime'
+    }
+  },
   methods: {
   methods: {
+    steelOrderDispatch() {
+      this.dialogVisible3 = true
+    },
     buLuCaseNo() {
     buLuCaseNo() {
       if (!this.selection) {
       if (!this.selection) {
         this.$message.warning('请选择需要补录箱号的实绩')
         this.$message.warning('请选择需要补录箱号的实绩')
@@ -926,6 +959,9 @@ export default {
     onclick() {
     onclick() {
       let requestQuery = {}
       let requestQuery = {}
       requestQuery.isEnFactoryFlag = this.screen
       requestQuery.isEnFactoryFlag = this.screen
+      if (this.screen == 3) {
+        requestQuery.isOrderDate = 1
+      }
       if (this.startTime && this.endTime) {
       if (this.startTime && this.endTime) {
         requestQuery.startTime = sjTime(this.startTime)
         requestQuery.startTime = sjTime(this.startTime)
         requestQuery.endTime = sjTime(this.endTime)
         requestQuery.endTime = sjTime(this.endTime)
@@ -973,9 +1009,16 @@ export default {
         isEnFactoryFlag: this.screen
         isEnFactoryFlag: this.screen
       }
       }
     ) {
     ) {
+      if (data.isEnFactoryFlag == 3) {
+        data.isOrderDate = 1
+      }
+      if (this.startTime && this.endTime) {
+        data.startTime = sjTime(this.startTime)
+        data.endTime = sjTime(this.endTime)
+      }
       if (getCookie('orgCode') == 'chengyunshang') {
       if (getCookie('orgCode') == 'chengyunshang') {
         this.option.requestUrl =
         this.option.requestUrl =
-          '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
+          '/api/v1/tms/getAllSaleReportByLb?apiId=526&orderType=2&shipperId=2&carrierSsoId=' +
           getCookie('userId') +
           getCookie('userId') +
           '&i=' +
           '&i=' +
           new Date()
           new Date()

+ 993 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleOrderArrage.vue

@@ -0,0 +1,993 @@
+<template>
+  <!-- 添加销售订单排车 -->
+  <div class="addSalePlan">
+    <!-- 销售订单表的数据 -->
+    <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" @func="func"> </dilTable>
+    </div>
+    <div class="button-box">
+      <el-button type="primary" @click="arragne">确定排车</el-button>
+    </div>
+    <!-- 车序号表格 -->
+    <div class="switch" v-if="selectionList.length > 0">
+      <el-tooltip placement="top">
+        <div slot="content">下面表格已有数据,不能进行更改!!!</div>
+        <el-switch
+          v-model="value"
+          active-text="件数"
+          inactive-text="重量"
+          disabled
+        >
+        </el-switch>
+      </el-tooltip>
+    </div>
+    <div class="switch" v-else>
+      <el-tooltip placement="top">
+        <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
+        </el-switch>
+      </el-tooltip>
+    </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" v-if="item.label !== '收货方电话'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                ></el-input>
+              </template>
+              <!-- 车序号 -->
+              <template v-if="item.prop == 'cxh'">
+                <el-input
+                  class="textinput1"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.cxh"
+                  @change="updateArragneCxh(scope.row.cxh)"
+                ></el-input>
+              </template>
+              <template v-if="item.prop == 'carrierName'">
+                <el-autocomplete
+                  class="textinput1"
+                  v-model="scope.row.carrierName"
+                  :fetch-suggestions="querySearchCarrier"
+                  placeholder="请输入承运商名称"
+                  :trigger-on-focus="false"
+                  @select="handleSelectCarrier($event, scope.row)"
+                  style="width:150px"
+                >
+                  <template slot-scope="{ item }">
+                    <div class="name">{{ item.carrierName }}</div>
+                  </template>
+                </el-autocomplete>
+              </template>
+              <!-- 收货地址 -->
+              <template v-if="item.prop == 'saleShipperAddressName'">
+                <el-input
+                  style="width: 200px"
+                  v-model="scope.row.saleShipperAddressName"
+                  disabled
+                >
+                </el-input>
+                <el-button
+                  type="primary"
+                  placeholder="()"
+                  @click="select(scope.$index, 1)"
+                  >浏览</el-button
+                >
+              </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, 2)"
+                  >浏览</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"
+                ></el-input>
+              </template>
+              <!-- 排车数 -->
+              <template v-if="item.prop == 'arragneCount'">
+                <el-input
+                  class="textinput6"
+                  v-model.number="scope.row.arragneCount"
+                ></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="200">
+          <template slot-scope="scope">
+            <el-button
+              @click="copyRow(scope.$index, scope.row)"
+              type="text"
+              size="big"
+            >
+              复制
+            </el-button>
+
+            <el-input
+              style="width: 50px;"
+              v-model.number="scope.row.arragneCount"
+            ></el-input>
+
+            <el-button
+              @click="deleteRow(scope.$index, scope.row)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 运输单价(地址对应)的模态框 -->
+    <el-drawer
+      :visible.sync="addressDrawer"
+      :destroy-on-close="false"
+      direction="rtl"
+      size="40%"
+      :wrapperClosable="false"
+      modal
+      close-on-press-escape
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="addressText"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="selectAddressClick"
+        style="margin-left: 5px"
+      >
+        <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 { sjTime } from '@/utils/sharedJsFile'
+export default {
+  name: 'saleOrderArrage',
+  data() {
+    return {
+      //已选中 省市县(区)
+      address: null,
+      //具体收货地址
+      place: null,
+      //收货地址id
+      addressId: null,
+      //当前是哪一个浏览按钮触发
+      browseButton: null,
+      textInput: '',
+      input: '',
+      //排车数默认
+      arragneCount: 1,
+      //初始化车序号
+      arragneCxh: 1,
+      //是否自提
+      saleOrderIsselfMention: '',
+      //单价已选数量
+      choosePriceCount: 0,
+      option: {
+        // 表格请求数据的地址
+        requestUrl: ''
+
+        // 控制显示多选列
+        // selectionType: 'select'
+      },
+      //是否打开收货地址的模态框
+      addressDrawer: false,
+      //地址的框计算输入的值
+      addressText: null,
+      //收货地址的表格
+      Address: {
+        requestUrl: '/api/v1/ams/getAddressDeliveryAddress?apiId=255',
+        selectionType: 'radio'
+      },
+      //原运输单价的表格
+      // Price: {
+      //   requestUrl: "/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0",
+      //   selectionType: "radio",
+      // },
+      table: false,
+      selectionList: [],
+      selectionList1: [],
+      drawer: false,
+      direction: 'rtl',
+      form1: {},
+      value: false,
+      frist: {
+        requestUrl: '/api/v1/ams/getAddressDeliveryAddress?apiId=255',
+        selectionType: 'radio',
+        mapList: []
+      },
+      options: [
+        {
+          values: 'yes',
+          label: '是'
+        },
+        {
+          values: 'no',
+          label: '否'
+        }
+      ],
+      values: 'yes',
+      tableTop: [
+        {
+          prop: 'cxh',
+          label: '车序号',
+          width: '60',
+          slot: true
+        },
+        {
+          prop: 'materialName',
+          label: '物资名称',
+          width: '140'
+        },
+        {
+          prop: 'Specification',
+          label: '规格型号',
+          width: '80'
+        },
+        {
+          prop: 'carrierName',
+          label: '承运商',
+          width: '180',
+          slot: true
+        },
+        {
+          prop: 'orderPlanWeight',
+          label: '重量',
+          width: '80',
+          slot: true
+        },
+        {
+          prop: 'saleDateOfReceipt',
+          label: '订单日期',
+          width: '230',
+          slot: true
+        },
+        {
+          prop: 'saleShipperAddressName',
+          label: '收货地址',
+          width: '300',
+          slot: true
+        },
+        {
+          prop: 'priceValue',
+          label: '运输单价',
+          width: '300',
+          slot: true
+        },
+        {
+          prop: 'saleOrderConsignee',
+          label: '收货客户',
+          width: '150',
+          slot: true
+        },
+        {
+          prop: 'saleOrderConsigneeTel',
+          label: '收货客户电话号码',
+          width: '150',
+          slot: true
+        },
+        {
+          prop: 'arragneCount',
+          label: '复制数',
+          width: '80',
+          slot: true
+        }
+      ],
+      row: {},
+      //缓存当前选中的运输单价
+      priceMap: {},
+      saleNo: ''
+    }
+  },
+  // mounted() {
+  //   this.dianji();
+  // },
+  watch: {
+    value() {
+      if (this.value) {
+        this.tableTop[3] = {
+          prop: 'orderPlanWeight',
+          label: '件数',
+          slot: true
+        }
+      } else {
+        this.tableTop[3] = {
+          prop: 'orderPlanWeight',
+          label: '重量',
+          slot: true
+        }
+      }
+    }
+  },
+  methods: {
+    searchSaleOrder() {
+      this.option.requestUrl =
+        '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=1&i=' +
+        new Date()
+      this.option.requestQuery = {
+        saleNo: this.saleNo
+      }
+    },
+    createFilterCarrier(queryString) {
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        )
+      }
+    },
+    //承运商搜索
+    querySearchCarrier(queryString, cb) {
+      this.axios
+        .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurantsCarrier = res.data.data
+            console.log(restaurantsCarrier, 'restaurantsCarrier')
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    handleSelectCarrier(item, row) {
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
+      row.carrierId = item.carrierId
+    },
+    func(res) {
+      console.log(res.list, 'res.list')
+      // this.selectionList1 = []
+      let arr = []
+      this.arragneCxh = res.list[0].maxCxh + 1
+      this.selectionList1 = JSON.parse(JSON.stringify(arr.concat(res.list)))
+    },
+    //点击浏览事件
+    ondrawer(row, index) {
+      this.row = row
+      this.row.index = index
+      this.drawer = true
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log('获取所有下拉值!')
+    },
+    //收货地址模态窗口的框计算
+    selectAddressClick() {
+      if (this.addressText) {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' +
+          this.addressText
+      } else {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=' + new Date()
+      }
+    },
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          '/api/v1/ams/getRealAddressByLike?addressId=' +
+            this.addressId +
+            '&index=' +
+            queryString
+        )
+        .then(res => {
+          if (res.data.code == '200') {
+            // console.log(res.data.data);
+            var restaurants = res.data.data
+            // console.log(restaurants, "restaurants");
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    createFilter1(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        )
+      }
+    },
+    //以上是收货地址边输边查搜索
+
+    //修改输入框中的车序号,自动获取车序号最大值
+    updateArragneCxh(cxh) {
+      if (this.arragneCxh < cxh) {
+        this.arragneCxh = ++cxh
+      }
+    },
+    //复制多条的方法
+    copyRow(index, row) {
+      //先做判断,后复制
+      if (row.carrierId == null) {
+        this.$message({
+          type: 'error',
+          message: '请选择承运商!'
+        })
+        return
+      }
+      if (!row.saleDateOfReceipt) {
+        this.$message({
+          type: 'error',
+          message: '请选择订单日期!'
+        })
+        return
+      }
+      let arr = []
+      for (let i = 0; i < this.selectionList.length; i++) {
+        if (i == index) {
+          arr.push(this.selectionList[i])
+          //车序号自增
+          let cxhStart = this.selectionList.reduce((prev, item) => {
+            if (item.cxh > prev) {
+              return item.cxh
+            } else {
+              return prev
+            }
+          }, 0)
+          for (let j = 0; j < this.selectionList[i].arragneCount; j++) {
+            //增加选择单价累加
+            if (row.priceValue) {
+              this.choosePriceCount++
+            }
+            arr.push({
+              Specification: row.Specification,
+              arragneCount: this.arragneCount,
+              cxh: ++cxhStart,
+              materialName: row.materialName,
+              orderPlanWeight: row.orderPlanWeight,
+              saleDateOfReceipt: row.saleDateOfReceipt,
+              saleMaterialId: row.saleMaterialId,
+              saleOrderConsignee: row.saleOrderConsignee,
+              saleOrderConsigneeTel: row.saleOrderConsigneeTel,
+              priceValue: row.priceValue,
+              priceId: row.priceId,
+              saleShipperAddressId: row.saleShipperAddressId,
+              place: row.place,
+              saleShipperAddressName: row.saleShipperAddressName,
+              carrierName: row.carrierName,
+              carrierId: row.carrierId
+            })
+          }
+          //确定车序号最大值并赋值给初始化车序号
+          if (this.arragneCxh < cxhStart) {
+            this.arragneCxh = ++cxhStart
+          }
+        } else {
+          arr.push(this.selectionList[i])
+        }
+      }
+      this.selectionList = []
+      this.selectionList = arr
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index, row) {
+      //统计与当前最大车序号相等的车序号
+      var equalArragneCxh = 0
+      //若为最后一个删除对象,初始化this.arragneCxh的值
+      if (this.selectionList.length == 1) {
+        this.arragneCxh = 1
+      } else {
+        for (var i = 0; i < this.selectionList.length; i++) {
+          if (this.selectionList[i].cxh == this.arragneCxh) {
+            equalArragneCxh++
+          }
+        }
+        //判断是否要减小最大车序号数
+        if (equalArragneCxh == 0) {
+          if (this.arragneCxh - 1 == row.cxh) {
+            this.arragneCxh = row.cxh
+          }
+        }
+      }
+
+      //删除当前点击的对象
+      this.selectionList.splice(index, 1)
+    },
+    //监听模态框点击事件
+    currentRadioChange1(radioList) {
+      this.selectionList[this.row.index].saleShipperAddressId =
+        radioList.addressId
+      this.selectionList[this.row.index].saleShipperAddressName =
+        radioList.address
+    },
+    //运输单价模态窗口的点击事件
+    addAddressClick() {
+      //priceMap
+      // this.selectionList[this.addressIndex].priceValue = this.priceMap.priceValue
+      // this.selectionList[this.addressIndex].priceId = this.priceMap.priceId
+      //获取运输单价和运输单价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) {
+          if (this.browseButton == 1) {
+            this.selectionList[this.addressIndex].saleShipperAddressName =
+              this.address + this.place
+            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
+          if (this.browseButton == 1) {
+            this.selectionList[this.addressIndex].saleShipperAddressName =
+              this.address + this.place
+            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({
+          //销售订单与物资表主键
+          Specification: e.Specification,
+          arragneCount: e.arragneCount,
+          cxh: e.cxh,
+          materialName: e.materialName,
+          orderPlanWeight: e.orderPlanWeight,
+          saleDateOfReceipt: e.saleDateOfReceipt,
+          saleMaterialId: e.saleMaterialId,
+          saleOrderConsignee: e.saleOrderConsignee,
+          saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+          priceValue: e.priceValue,
+          priceId: e.priceId,
+          saleShipperAddressId: e.saleShipperAddressId,
+          place: e.place,
+          saleShipperAddressName: e.saleShipperAddressName
+        })
+      })
+      //赋值单价已选数量
+      this.choosePriceCount = count
+      //缩小运价省市县的范围
+      if (this.browseButton == 1) {
+        this.Address.requestUrl =
+          '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=' + this.address
+      }
+    },
+
+    //收货地址点击浏览的事件---------------------修改点
+    select(index, type) {
+      this.browseButton = type
+      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;
+    },
+    // 框计算
+    // onclick() {
+    //   this.option.requestUrl =
+    //     '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=' +
+    //     this.$route.params.saleOrderId
+    //   //"/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
+    // },
+    // open() {
+    //   if (this.selectionList1.length != 0) {
+    //     this.$confirm('取消会将已选择的数据清空, 是否继续?', '提示', {
+    //       confirmButtonText: '确定',
+    //       cancelButtonText: '取消',
+    //       type: 'warning'
+    //     })
+    //       .then(() => {
+    //         this.selectionList1 = []
+    //         this.table = false
+    //       })
+    //       .catch(() => {})
+    //   } else {
+    //     this.table = false
+    //   }
+    // },
+    // 进行排车
+    arragne() {
+      let preCxh = this.arragneCxh
+      if (this.selectionList.length > 0) {
+        if (!this.selectionList[this.selectionList.length - 1].carrierId) {
+          this.$message({
+            type: 'error',
+            message: '请先选择承运商!'
+          })
+          return
+        }
+        if (
+          !this.selectionList[this.selectionList.length - 1].saleDateOfReceipt
+        ) {
+          this.$message({
+            type: 'error',
+            message: '请填入订单日期!'
+          })
+          return
+        }
+        preCxh =
+          this.selectionList.reduce((prev, item) => {
+            return item.cxh > prev ? item.cxh : prev
+          }, 0) + 1
+      }
+      this.selectionList1.forEach(e => {
+        let addmap = {
+          // materialCode: e.materialCode,
+          cxh: preCxh,
+          materialName: e.materialName,
+          Specification: e.specificationModel,
+          orderPlanWeight: null,
+          saleShipperAddressId: null,
+          saleShipperAddressName: null,
+          saleDateOfReceipt: null,
+          saleOrderConsignee: null,
+          saleOrderConsigneeTel: null,
+          saleMaterialId: e.saleMaterialId,
+          priceValue: e.priceValue,
+          priceId: e.priceId,
+          // materialTheoreticalWeight: e.materialTheoreticalWeight,
+          arragneCount: this.arragneCount
+        }
+        this.selectionList.push(addmap)
+      })
+      //获取是否自提判断
+      this.saleOrderIsselfMention = this.selectionList1[0].saleOrderIsselfMention
+      // this.selectionList1 = []
+      this.table = false
+    },
+    // 返回选中的物资信息
+    selectionChange(selection) {
+      this.selectionList1 = []
+      this.selectionList1 = selection
+    },
+    // 确定
+    makeSure() {
+      if (this.selectionList.length == 0) {
+        this.$message({
+          type: 'error',
+          message: '请先排车!'
+        })
+        return
+      }
+      if (!this.selectionList[0].carrierId) {
+        this.$message({
+          type: 'error',
+          message: '请先选择承运商!'
+        })
+        return
+      }
+      if (!this.selectionList[0].saleDateOfReceipt) {
+        this.$message({
+          type: 'error',
+          message: '请填入订单日期!'
+        })
+        return
+      }
+      //初始化maplist
+      let mapList = []
+      this.selectionList.forEach(item => {
+        //初始化mapItem
+        let mapItem = {
+          //销售订单id
+          saleOrderId: 0,
+          //车序号
+          truckNo: '',
+          //省市县id
+          shippingAddressId: 0,
+          //具体地址
+          place: null,
+          //订单日期
+          dateOfReceipt: null,
+          //收货方姓名
+          orderConsignee: '',
+          //收货方电话
+          orderConsigneeTel: '',
+          //车序号物资ID
+          saleMaterialId: 0,
+          //物资数量
+          materialNumber: 0,
+          //运输单价ID
+          priceId: 0,
+          //承运商ID
+          carrierId: null
+        }
+        mapItem.saleOrderId = this.$route.params.saleOrderId
+        mapItem.truckNo = item.cxh
+        mapItem.shippingAddressId = item.saleShipperAddressId
+        mapItem.place = item.place
+        mapItem.dateOfReceipt = sjTime(item.saleDateOfReceipt)
+        mapItem.orderConsignee = item.saleOrderConsignee
+        mapItem.orderConsigneeTel = item.saleOrderConsigneeTel
+        mapItem.saleMaterialId = item.saleMaterialId
+        mapItem.materialNumber = item.orderPlanWeight
+        mapItem.priceId = item.priceId
+        mapItem.carrierId = item.carrierId
+        mapList.push(mapItem)
+      })
+      //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
+      if (this.saleOrderIsselfMention == '是') {
+        mapList.forEach(e => {
+          e.priceId = null
+        })
+        //发送请求
+        this.axios.post('/api/v1/ams/addTruckNoGreat', mapList).then(res => {
+          if (res.data.code == '200') {
+            // this.$router.go(-1)
+            this.cancel()
+          }
+          this.$message({
+            type: 'success',
+            message: '新增车序号成功!'
+          })
+        })
+      } else {
+        //判断是否全部完成运输单价的选择
+        if (this.choosePriceCount == this.selectionList.length) {
+          //发送请求
+          this.axios.post('/api/v1/ams/addTruckNoGreat', mapList).then(res => {
+            if (res.data.code == '200') {
+              // this.$router.go(-1)
+              this.cancel()
+            }
+            this.$message({
+              type: 'success',
+              message: '新增车序号成功!'
+            })
+          })
+        } else {
+          this.$message.warning('还有运输单价未被选定!')
+        }
+      }
+    },
+    // 取消
+    cancel() {
+      this.$emit('cancel', 'cancel')
+    },
+    //关闭事件
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done()
+        })
+        .catch(_ => {})
+    },
+
+    CloseClick() {}
+  }
+}
+</script>
+<style lang="scss" scoped>
+.addSalePlan {
+  width: 100%;
+}
+.switch {
+  margin-left: 60rem;
+}
+.form-box,
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.button-box {
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+.select {
+  margin-left: -10rem;
+}
+.demo-form-inline {
+  margin-left: 2rem;
+}
+.table_form {
+  margin-left: -16rem;
+}
+.textinput {
+  width: 70px;
+}
+.textinput1 {
+  width: 70px;
+  text-align: center;
+  size: small;
+}
+.textinput2 {
+  width: 50px;
+  margin-right: 30px;
+}
+.textinput3 {
+  width: 240px;
+}
+.textinput4 {
+  width: 120px;
+}
+.textinput5 {
+  width: 120px;
+}
+.textinput6 {
+  width: 70px;
+}
+</style>