Преглед на файлове

麻柳新厂厂外库功能

xiaosonghong преди 4 седмици
родител
ревизия
bb90b47b66

+ 2 - 0
src/views/OYE/components/oYeInbound.vue

@@ -187,6 +187,7 @@ export default {
         queryMap['saler'] = getCookie('loginName')
       }
       queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '欧冶库'
       this.axios
         .post(
           '/api/v1/wms/getOyeInboundResult' +
@@ -262,6 +263,7 @@ export default {
       if (this.orgCode == 'ouyechangwaiku') {
         queryMap['inboundWarehouse'] = this.inboundWarehouse
       }
+      queryMap.inboundAreaSide = '欧冶库'
       if (Object.keys(this.queryMap).length > 0) {
         queryMap = { ...queryMap, ...this.queryMap }
       }

+ 2 - 0
src/views/OYE/components/oYeOutbound.vue

@@ -175,6 +175,7 @@ export default {
         queryMap['saler'] = getCookie('loginName')
       }
       queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '欧冶库'
       this.axios
         .post(
           '/api/v1/wms/getOyeOutboundResult' +
@@ -252,6 +253,7 @@ export default {
       if (this.orgCode == 'ouyechangwaiku') {
         queryMap['inboundWarehouse'] = this.inboundWarehouse
       }
+      queryMap.inboundAreaSide = '欧冶库'
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {

+ 2 - 0
src/views/OYE/components/oYeRealTimeInventory.vue

@@ -894,6 +894,7 @@ export default {
         queryMap['saler'] = getCookie('loginName')
       }
       queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '欧冶库'
       this.axios
         .post('/api/v1/wms/getOyeRealTimeResult', queryMap)
         .then(res => {
@@ -1012,6 +1013,7 @@ export default {
       if (this.orgCode == 'xiaoshouyewuyuan') {
         queryMap['saler'] = getCookie('loginName')
       }
+      queryMap.inboundAreaSide = '欧冶库'
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {

+ 3 - 1
src/views/OYE/components/oYeTransPlan.vue

@@ -818,7 +818,7 @@ export default {
       console.log(val, 'val')
       this.getOyeConsigneeId({ saleArea: val })
       this.getDirectlyCity(val)
-      this.updateAddress(val)
+      //this.updateAddress(val)
     },
     receiveCompanyId(val) {
       console.log(val, 'vval')
@@ -1097,6 +1097,7 @@ export default {
     checkRealTimeInventory() {
       this.realTimeInventoryOptions.requestUrl =
         '/api/v1/wms/getOyeRealTimeResult?apiId=538&i=' + new Date()
+      this.planForm.inboundAreaSide = '欧冶库'  
       this.realTimeInventoryOptions.requestQuery = JSON.parse(
         JSON.stringify(this.planForm)
       )
@@ -1104,6 +1105,7 @@ export default {
       this.drawer = true
     },
     onclickRealTimeInventory() {
+      this.planForm.inboundAreaSide = '欧冶库'
       this.realTimeInventoryOptions.requestQuery = JSON.parse(
         JSON.stringify({
           ...this.planForm,

+ 21 - 0
src/views/SIDEWMS/app.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta content="智慧物流平台" name="keywords">
+    <meta content="智慧物流平台" name="description">
+    <title>厂边库-客户方 - 智慧物流平台</title>
+    <link href="../static/css/common.css" rel="stylesheet"/>
+    <link href="../static/img/favicon.ico" rel="shortcut icon"/>
+    <script src="../static/lib/jquery/jquery.min.js" type="text/javascript"></script>
+    <script src="../static/lib/jquery/jquery.PrintArea.js" type="text/javascript"></script>
+    <script src="../static/lib/qrcode.min.js" type="text/javascript"></script>
+    <script src='../static/lib/XLSX/xlsx.core.min.js' type='text/javascript'></script>
+    <script src="../static/js/common.js" type="text/javascript"></script>
+  </head>
+  <body>
+    <div id="app"></div>
+  </body>
+</html>

+ 136 - 0
src/views/SIDEWMS/app.js

@@ -0,0 +1,136 @@
+// The Vue build version to load with the `import` command
+// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
+import Vue from 'vue'
+import App from '@/components/App.vue'
+// include
+import '@/config/include.js'
+
+// 通用store
+import store from '@/store/index.js'
+
+// router
+import router from './router/index.js'
+
+import VueApollo from 'vue-apollo'
+
+import apollo from '@/config/apolloConfig.js'
+
+// 注册表格的全局组件
+import DilCommonUI from '@/components/DilCommonUI'
+Vue.use(DilCommonUI)
+
+// 导出Excel全局组件
+import tableToExcel from '@/components/exportExcel/exportExcel'
+Vue.use(tableToExcel)
+
+import htmlToPdf from '@/components/exportPdfs/exportPdfs'
+Vue.use(htmlToPdf)
+
+import elDivider from '@/components/el-divider'
+Vue.use(elDivider)
+//导出PDF组件
+import 'xe-utils'
+import VXETable from 'vxe-table'
+import 'vxe-table/lib/style.css'
+Vue.use(VXETable)
+Vue.prototype.$XModal = VXETable.modal
+
+import AMap from 'vue-amap'
+window._AMapSecurityConfig = {
+  securityJsCode: '6a75ec7300ae4ba9f385d1bb452ffd21'
+}
+Vue.use(AMap)
+AMap.initAMapApiLoader({
+  key: '168d3d854afba86848eac1b055d53ca3',
+  plugin: [
+    'AMap.Autocomplete', // 输入提示插件
+    'AMap.PlaceSearch', // POI搜索插件
+    'AMap.Scale', // 右下角缩略图插件 比例尺
+    'AMap.OverView', // 地图鹰眼插件
+    'AMap.ToolBar', // 地图工具条
+    'AMap.MapType', // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
+    'AMap.PolyEditor', // 编辑 折线多,边形
+    'AMap.CircleEditor', // 圆形编辑器插件
+    'AMap.Geolocation', // 定位控件,用来获取和展示用户主机所在的经纬度位置
+    'AMap.ControlBar', // 缩放、尺寸控制器
+    'AMap.Geocoder'
+  ],
+  // 默认高德 sdk 版本为 1.4.4
+  v: '1.4.15',
+  uiVersion: '1.1.1'
+})
+
+import Share from 'vue-social-share'
+Vue.use(Share)
+
+import 'view-design/dist/styles/iview.css'
+import ViewUI from 'view-design'
+Vue.use(ViewUI)
+// 关闭生产模式下给出的提示
+Vue.config.productionTip = false
+
+Vue.use(VueApollo)
+
+const apolloProvider = new VueApollo({
+  defaultClient: apollo
+})
+
+//把时间戳改为正常可读的时间
+export function renderTime(date) {
+  if (date !== null) {
+    let dateee = new Date(date).toJSON()
+    return new Date(+new Date(dateee) + 8 * 3600 * 1000)
+      .toISOString()
+      .replace(/T/g, ' ')
+      .replace(/\.[\d]{3}Z/, '')
+  }
+  return null
+}
+//把毫秒数转换分
+export function getDuration(my_time) {
+  if (my_time !== null) {
+    return Math.floor(my_time / 1000 / 60)
+  }
+  return null
+}
+export function sjTime(orderPlanInTime) {
+  var stringTime = renderTime(orderPlanInTime)
+  var timestamp1 = stringTime.replace(/-/g, '/')
+  return new Date(timestamp1).getTime()
+}
+//验证电话号码
+export function VerifyPhoneNumber(Phone) {
+  var myreg = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/
+  if (!myreg.test(Phone)) {
+    return false
+  } else {
+    return true
+  }
+}
+export function isNumber(value) {
+  //验证是否为数字
+  var patrn = /^(-)?\d+(\.\d+)?$/
+  if (patrn.exec(value) == null || value == '') {
+    return false
+  } else {
+    return true
+  }
+}
+export function isIntegerNumber(value) {
+  //验证是否为整数
+  var patrn = /^\+?[1-9][0-9]*$/g
+  if (patrn.exec(value) == null || value == '') {
+    return false
+  } else {
+    return true
+  }
+}
+/* eslint-disable no-new */
+new Vue({
+  el: '#app',
+  router,
+  store,
+  components: { App },
+  provide: apolloProvider.provide(),
+  template: '<App/>'
+})

+ 425 - 0
src/views/SIDEWMS/components/currentLocation.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="container">
+    <!-- 实时路径 -->
+    <div class="btnx">
+      <el-button type="primary" class="" @click="openInfo"
+        >打开信息窗体</el-button
+      >
+      <el-button type="primary" class="" @click="closeinfo"
+        >关闭信息窗口</el-button
+      >
+    </div>
+    <div id="amap-container"></div>
+  </div>
+</template>
+<script>
+import { shallowRef } from '@vue/reactivity'
+import { lazyAMapApiLoaderInstance } from 'vue-amap'
+import Slider from './slider.vue'
+Vue.use(Slider)
+import Vue from 'vue'
+var infoWindow
+export default {
+  name: 'currentLocation',
+  props: {
+    carNumber: ''
+  },
+  setup() {
+    const map = shallowRef(null)
+    return {
+      map
+    }
+  },
+  watch: {
+    speedVal: {
+      deep: true,
+      handler(val, oldVal) {
+        let that = this
+        if (that.pathNavigator != null) {
+          that.pathNavigator.setSpeed(100 * val)
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      //查询车牌号
+      //开始时间和结束时间
+      startTime: '',
+      endTime: '',
+      //地图组件
+      map: null,
+      path: [],
+      pointmarker: null,
+      //定时器
+      timer: null,
+      //是否关闭信息窗体
+      infoClose: false
+    }
+  },
+  created() {
+    let that = this
+    this.initData()
+    this.initTimer()
+    that.initMap(105.602725, 37.076636)
+  },
+  mounted() {},
+  methods: {
+    //初始化数据
+    initData() {
+      let that = this
+      let regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$)/
+      if (that.carNumber == '') {
+        this.$message.error('车牌号不能为空!')
+        //清除旧的定时器
+        clearTimeout(this.timer)
+        return
+      } else if (!regExp.test(that.carNumber)) {
+        this.$message.error('请输入正确的车牌号!')
+        //清除旧的定时器
+        clearTimeout(this.timer)
+        return
+      }
+      that.axios
+        .get('/api/v1/otms/getCurrentLocation?capcityNumber=' + that.carNumber)
+        .then(res => {
+          console.log(res.data.data)
+          if (res.data.data == '-1') {
+            this.$message.error('运输订单未关闭,自提车辆无权查看!')
+          } else if (res.data.data.status != '1006') {
+            that.map.setCenter([
+              res.data.data.result.lon,
+              res.data.data.result.lat
+            ])
+            //画车
+            that.initMarkes(
+              45,
+              60,
+              require('@/assets/img/car1.png'),
+              res.data.data.result.lon,
+              res.data.data.result.lat,
+              '现在所在位置'
+            )
+            //给路径加点
+            let point = new AMap.LngLat(
+              res.data.data.result.lon,
+              res.data.data.result.lat
+            )
+            if (
+              that.path.length <= 0 ||
+              !that.path[that.path.length - 1].equals(point)
+            ) {
+              that.path.push(point)
+            }
+            console.log(that.path)
+            //初始化轨迹
+            that.initPolyline()
+            //显示窗体
+            if (this.infoClose == false) {
+              that.initCustomMarkes(
+                that.carNumber,
+                res.data.data.result.adr,
+                res.data.data.result.lon,
+                res.data.data.result.lat
+              )
+            }
+            this.lon = res.data.data.result.lon
+            this.lat = res.data.data.result.lat
+          } else {
+            this.$message.error('车辆暂时无GPS')
+            //清除定时器
+            clearTimeout(this.timer)
+          }
+        })
+    },
+
+    //初始化地图
+    initMap(lon, lat) {
+      lazyAMapApiLoaderInstance.load().then(() => {
+        let that = this
+        that.map = new AMap.Map('amap-container', {
+          //设置地图容器id
+          viewMode: '2D', //是否为2D地图模式
+          zoom: 18, //初始化地图级别
+          center: [lon, lat] //初始化地图中心点位置105.602725,37.076636
+        })
+      })
+    },
+
+    //创建简单的标记
+    initMarkes(weight, height, image, lon, lat, title) {
+      let that = this
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(2, 10), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      })
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      })
+      // 将创建的点标记添加到已有的地图实例:
+      that.pointmarker = pointmarker
+      that.map.add(pointmarker)
+    },
+    initPoint(weight, height, image, lon, lat, title) {
+      let that = this
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        //size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 10), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      })
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title,
+        label: {
+          direction: 'top',
+          content: title,
+          offset: new AMap.Pixel(-2, 10)
+        }
+      })
+      // 将创建的点标记添加到已有的地图实例:
+      that.pointmarker = pointmarker
+      that.map.add(pointmarker)
+    },
+    //初始化轨迹
+    initPolyline() {
+      let that = this
+      // 创建一个 Polyline 实例:
+      var polyline = new AMap.BezierCurve({
+        path: that.path,
+        borderWeight: 2, // 线条宽度,默认为 1
+        strokeColor: '#18BFA6', // 线条颜色
+        lineJoin: 'round' // 折线拐点连接处样式
+      })
+      // 将创建的线路添加到已有的线路中去:
+      that.map.add(polyline)
+    },
+    //时间格式转换
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + '').substr(4 - RegExp.$1.length)
+        )
+      }
+      let o = {
+        'M+': date.getMonth() + 1,
+        'd+': date.getDate(),
+        'h+': date.getHours(),
+        'm+': date.getMinutes(),
+        's+': date.getSeconds()
+      }
+      for (let k in o) {
+        if (new RegExp(`(${k})`).test(fmt)) {
+          let str = o[k] + ''
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : ('00' + str).substr(str.length)
+          )
+        }
+      }
+      return fmt
+    },
+    //定时取得当前位置并加入轨迹中去,点击查询时触发,同时清除path和旧的定时器
+    initTimer() {
+      let that = this
+      //清除旧的定时器
+      clearTimeout(this.timer)
+      that.startTime = that.formatDate(new Date(), 'yyyy年MM月dd日 hh:mm:ss')
+      that.endTime = that.formatDate(new Date(), 'yyyy年MM月dd日 hh:mm:ss')
+      console.log(that.startTime + '至' + that.endTime)
+      //清除path
+      that.path = []
+      //清除所有覆盖物
+      // that.map.clearMap()
+      //设置所有的门岗和汽车衡
+      that.setPoints()
+      //设置定时器
+      that.timer = setInterval(() => {
+        //清除之前车的图标
+        that.map.remove(that.pointmarker)
+        that.initData()
+        that.endTime = that.formatDate(new Date(), 'yyyy年MM月dd日 hh:mm:ss')
+      }, 5000)
+    },
+    //初始化厂内标记点
+    setPoints() {
+      //请求所有汽车衡和门岗
+      let that = this
+      that.axios.get('/api/v1/otms/mapvertexs/findSelections').then(res => {
+        if (res.data.data) {
+          res.data.data.forEach(vertex => {
+            that.initPoint(
+              20,
+              25,
+              require('@/assets/img/map_site.png'),
+              vertex.longitude,
+              vertex.latitude,
+              vertex.addressName
+            )
+          })
+        }
+      })
+    },
+    //初始化窗体
+    initCustomMarkes(title, details, lon, lat) {
+      let that = this
+      //自定义窗体内容
+      var content = [
+        "<div  style='top:1px;width: 180px; background-color:rgba(22, 160, 133, 1);' ><font color='white'>" +
+          title +
+          '</font>',
+        "<div style='background-color:rgba(22, 160, 133, 1);'><font color='white'>" +
+          details +
+          '<br>' +
+          '时间范围:' +
+          that.startTime +
+          '至' +
+          that.endTime +
+          '<br>' +
+          '</font></div></div>'
+      ]
+      // 创建 infoWindow 实例
+      infoWindow = new AMap.InfoWindow({
+        content: content.join('<br>'), //传入 dom 对象,或者 html 字符串
+        offset: new AMap.Pixel(0, -20) //修改信息差窗体偏移
+      })
+      // 打开信息窗体
+      infoWindow.open(that.map, [lon, lat])
+    },
+    // 关闭信息窗口
+    closeinfo() {
+      this.infoClose = true
+      infoWindow.close()
+    },
+    openInfo() {
+      console.log(this.lon)
+      console.log(this.lat)
+      this.infoClose = false
+      infoWindow.open(this.map, [this.lon, this.lat])
+    }
+  }
+}
+</script>
+<style>
+.inputStyle {
+  position: absolute;
+  width: 200px;
+  left: 50px;
+}
+
+.controller {
+  width: 100%;
+  height: 70px;
+  background: white;
+  position: absolute;
+  z-index: 99;
+  top: 0;
+  left: 0;
+}
+.in_transit_information {
+  width: 320px;
+  float: left;
+  height: 40px;
+}
+
+.container {
+  width: 100%;
+  height: 100%;
+}
+span.item_details2 {
+  position: relative;
+  top: 20px;
+}
+.date_picker_style {
+  position: relative;
+  left: 50px;
+}
+.item_details {
+  position: relative;
+  top: 5px;
+  height: 0px;
+  left: 0px;
+}
+#amap-container {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  margin: 0;
+  font-family: '微软雅黑';
+}
+
+/* 进度条 */
+.mySlider {
+  width: 150px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
+}
+/* 进度条 */
+.mySlider2 {
+  width: 400px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
+}
+.play {
+  position: relative;
+  left: 28px;
+}
+.quickly {
+  float: right;
+  position: relative;
+  left: -20px;
+  top: 10px;
+}
+.pause {
+  position: relative;
+  left: 28px;
+}
+.passed-time {
+  position: relative;
+  left: 5px;
+}
+.end-time {
+  position: relative;
+  left: 5px;
+}
+.map-times {
+  position: relative;
+  width: 40px;
+}
+.searchstyle {
+  position: relative;
+  left: 45px;
+}
+.map-control {
+  float: left;
+  width: 270px;
+}
+.driving_information {
+  height: 40px;
+  width: 240px;
+  float: left;
+}
+</style>
+<style lang="scss" scoped>
+.btnx {
+  z-index: 1000;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+}
+</style>

+ 364 - 0
src/views/SIDEWMS/components/exportTranPlan.js

@@ -0,0 +1,364 @@
+import { sjTime, isNumber } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
+export default {
+  data() {
+    return {
+      tableData: [],
+      shipperName: '四川省达州钢铁有限责任公司',
+      //销售订单主表数据
+      saleOrderList: [
+        'receiveName',
+        'isSelfMention',
+        'saleRemark',
+        'saleOrderReceiveCustomer',
+        'salerName',
+        'saleOrderNo',
+        'saleArea'
+      ],
+      saleOrderMapList: [
+        'cxh',
+        'province',
+        'district',
+        'town',
+        'truckRemark',
+        'place',
+        'saleOrderConsigneeTel',
+        'saleDateOfReceipt',
+        'materialName',
+        'materialSpecification',
+        'materialModel',
+        'orderPlanWeight',
+        'meterNumber',
+        'isPoundSale',
+        'inboundWarehouse',
+        'inboundArea'
+      ]
+    }
+  },
+  methods: {
+    importExcel(file) {
+      let that = this
+      if (!file) {
+        that.$message({
+          message: '文件错误!',
+          type: 'warning'
+        })
+        return
+      }
+      this.tableData = []
+      var reader = new FileReader()
+      var data = null
+      var workbook = null
+      //设置读取操作
+      reader.onload = function(e) {
+        data = e.target.result
+        workbook = XLSX.read(data, {
+          type: 'binary'
+        })
+        let rows = XLSX.utils.sheet_to_json(
+          workbook.Sheets[workbook.SheetNames[0]]
+        ) //只取第一页
+        console.log(rows, 'rows')
+        let uuid = Math.floor(Math.random() * 60 * 24)
+        Array.from(rows).forEach((e, index) => {
+          let map = {}
+          try {
+            Object.keys(e).forEach(e1 => {
+              console.log(e1, 'e1')
+              if (e1.includes('转运计划编号')) {
+                map.saleOrderNo = e[e1]
+              }
+              if (e1.includes('物资名称')) {
+                map.materialName = e[e1]
+                if (
+                  e[e1].includes('盘螺') ||
+                  e[e1].includes('乱尺') ||
+                  e[e1].includes('盘元') ||
+                  e[e1].includes('盘圆')
+                ) {
+                  map.isPoundSale = 0
+                } else {
+                  map.isPoundSale = 1
+                }
+                //确定更改的物资有无米数
+                if (e[e1].includes('米')) {
+                  map.meterNumber = Number(e[e1].replace(/[^0.0-9.0]/gi, ''))
+                } else {
+                  map.meterNumber = null
+                }
+              }
+              if (e1.includes('规格型号')) {
+                // console.log(e[e1])
+                let str = e[e1]
+                let regex = /\((.+?)\)/g
+                if (str.match(regex) != null) {
+                  let spa = str.replace(str.match(regex)[0], '')
+                  let model = str
+                    .match(regex)[0]
+                    .replace('(', '')
+                    .replace(')', '')
+                  map.materialModel = model
+                  if ((spa + '').includes('Φ')) {
+                    map.materialSpecification = spa
+                  } else {
+                    map.materialSpecification = 'Φ' + spa
+                  }
+                } else {
+                  map.materialSpecification = e[e1]
+                  map.model = null
+                }
+              }
+              if (e1.includes('下单客户')) {
+                map.receiveName = e[e1]
+              }
+              if (
+                e1.includes('米数') &&
+                (map.meterNumber == null || map.meterNumber != '')
+              ) {
+                map.meterNumber = e[e1]
+              }
+              if (e1.includes('物资规格') && !e1.includes('规格型号')) {
+                if ((e[e1] + '').includes('Φ')) {
+                  map.materialSpecification = e[e1]
+                } else {
+                  map.materialSpecification = 'Φ' + e[e1]
+                }
+              }
+              if (e1.includes('物资型号') && !e1.includes('规格型号')) {
+                map.materialModel = e[e1]
+              }
+              if (e1.includes('物资件数')) {
+                if (isNumber(e[e1])) {
+                  map.orderPlanWeight = e[e1]
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“物资件数”错误,请核实后再输入(件数输入整数)`
+                  )
+                }
+              }
+              if (e1.includes('车序号')) {
+                if (typeof e[e1] != 'undefined' && isNumber(e[e1])) {
+                  map.cxh = e[e1]
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“车序号”错误,请核实后再输入(车序号输入正整数)`
+                  )
+                }
+              }
+              // if (e1.includes('收款公司')) {
+              //   if (that.receivingCompany.indexOf(e[e1]) === -1) {
+              //     throw new Error(
+              //       `该Excel第--${index + 2}--行-“收款公司”错误,请核实后再输入`
+              //     )
+              //   } else {
+              //     map.saleOrderReceiveCustomer = e[e1]
+              //   }
+              // }
+              if (e1.includes('业务员')) {
+                map.salerName = e[e1]
+              }
+              if (e1.includes('摘要')) {
+                map.saleRemark = e[e1]
+                if (typeof map.saleRemark === 'string') {
+                  // 首先中文逗号转英文逗号
+                  map.saleRemark = map.saleRemark.replace(',', ',')
+                  let reg = /钢材.*组/g
+                  let reg1 = /直发.*(,|\s){0,1}/
+                  let saleAreaList = map.saleRemark.match(reg)
+                  let directlyList = map.saleRemark.match(reg1)
+                  if (saleAreaList != null && saleAreaList.length > 0) {
+                    map.saleRemark = saleAreaList[0]
+                  } else {
+                    throw new Error(
+                      `该Excel第--${index +
+                        2}--行-“摘要填写”错误,请核实后再输入(应为“钢材某某组”)`
+                    )
+                  }
+                  if (directlyList != null && directlyList.length > 0) {
+                    map.saleRemark = map.saleRemark + ',' + directlyList[0]
+                  }
+                }
+              }
+              if (e1.includes('省')) {
+                map.province = e[e1]
+              }
+              if (e1.includes('市')) {
+                map.district = e[e1]
+              }
+              if (e1.includes('县/区')) {
+                map.town = e[e1]
+              }
+              if (e1.includes('具体收货地址')) {
+                map.place = e[e1]
+              }
+              if (e1.includes('收货客户电话')) {
+                map.saleOrderConsigneeTel = e[e1]
+              }
+              if (e1.includes('备注')) {
+                map.truckRemark = e[e1]
+              }
+              if (e1.includes('出库库房')) {
+                map.inboundWarehouse = e[e1]
+              }
+              if (e1.includes('是否自提')) {
+                if (e[e1] === '是' || e[e1] === '否') {
+                  map.isSelfMention = e[e1]
+                } else {
+                  map.isSelfMention = '否'
+                }
+              }
+            })
+            map.shipperName = that.shipperName
+            if (typeof map.isSelfMention === 'undefined') {
+              map.isSelfMention = '否'
+            }
+            if (typeof map.cxh === 'undefined') {
+              map.cxh = Number(
+                `${Math.floor(
+                  Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    Math.random() *
+                    new Date().getTime() *
+                    10000000
+                )}${uuid}`
+              )
+            }
+            map.inboundArea = '厂外库'
+            if (map.saleRemark && map.receiveName && map.materialName) {
+              that.tableData.push(map)
+            }
+          } catch (es) {
+            that.$message.error(es.message)
+          }
+        })
+        that.addExcelInport()
+        return
+      }
+      reader.readAsBinaryString(file.raw) //以二进制方式读取
+    },
+    addExcelInport() {
+      //加载虚拟
+      const loading = this.$loading({
+        lock: true,
+        text: '正在快马加鞭为您生成销售订单,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      //遍历数组,根据摘要和下单客户自动给出销售订单编号
+      for (let i = 0; i < this.tableData.length; i++) {
+        if (i === 0) {
+          this.tableData[i].saleOrderNo = 1
+        } else {
+          let sortArr = this.tableData
+            .filter(e => {
+              return (
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
+                isNumber(e.saleOrderNo)
+              )
+            })
+            .map(e => {
+              if (
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
+                isNumber(e.saleOrderNo)
+              ) {
+                return e.saleOrderNo
+              }
+            })
+            .sort((a, b) => {
+              return a - b
+            })
+          //当大于0的时候,需要遍历整个数组,与之相等的有哪些
+          for (let j = 0; j < i; j++) {
+            if (
+              this.tableData[i].saleRemark === this.tableData[j].saleRemark &&
+              this.tableData[i].receiveName === this.tableData[j].receiveName &&
+              this.tableData[i].inboundWarehouse ===
+                this.tableData[j].inboundWarehouse
+            ) {
+              this.tableData[i].saleOrderNo = this.tableData[j].saleOrderNo
+              break
+            } else {
+              if (j == i - 1) {
+                this.tableData[i].saleOrderNo = sortArr[sortArr.length - 1] + 1
+              }
+            }
+          }
+        }
+      }
+      // this.tableData = this.tableData.sort(this.compare("saleOrderNo"));
+      // debugger;
+      //需要遍历数组,以销售订单编号为分类
+      const map1 = this.tableData.reduce((result, item) => {
+        result[item.saleOrderNo] = result[item.saleOrderNo] || []
+        result[item.saleOrderNo].push(item)
+        return result
+      }, {})
+      // result即为所求
+      let result = Object.values(map1)
+      console.log(result, 'resilt')
+      //遍历数组
+      let saleOrderListMap = []
+      result.forEach((saleOrderList, index) => {
+        let map = {}
+        let arr = []
+        saleOrderList.forEach(e => {
+          let mapMaterial = {}
+          Object.keys(e).forEach(e1 => {
+            if (this.saleOrderList.includes(e1)) {
+              map[e1] = e[e1]
+            }
+            if (this.saleOrderMapList.includes(e1)) {
+              mapMaterial[e1] = e[e1]
+            }
+          })
+          arr.push(mapMaterial)
+        })
+        map.shipperId = 1
+        map.userName = getCookie('loginName')
+        map.businessType = '500'
+        map.mapList = arr
+        saleOrderListMap.push(map)
+      })
+      if (saleOrderListMap.length > 0) {
+        console.log(saleOrderListMap, 'saleOrderListMap')
+        this.axios
+          .post('/api/v1/ams/addTransPlanList', saleOrderListMap)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.getRequestUrl()
+              this.tableData = []
+              loading.close()
+              this.$message.success('新增转运计划成功!')
+            } else {
+              console.log(res.data.data)
+              this.$message.error(res.data.data)
+              this.getRequestUrl()
+              loading.close()
+              this.tableData = []
+            }
+          })
+          .catch(e => {
+            loading.close()
+            this.$message.error(e)
+            this.tableData = []
+          })
+      } else {
+        this.$message({
+          type: 'error',
+          duration: 3500,
+          offset: 250,
+          message:
+            '该Excel系统未识别到订单,请仔细检查格式。(销售订单必须在第一个sheet,且必须遵循导入模板!)'
+        })
+        this.tableData = []
+        loading.close()
+      }
+    }
+  }
+}

+ 872 - 0
src/views/SIDEWMS/components/mapTest.vue

@@ -0,0 +1,872 @@
+<template>
+  <div class="container">
+    <div id="amap-container"></div>
+    <div class="mapcontroller">
+      <div class="in_transit_information">
+        <label class="item_details">起点:{{ startPointName }}</label>
+        <br />
+        <label class="item_details">收货地址:{{ endPointName }}</label>
+        <br />
+      </div>
+      <div class="driving_information2">
+        <label class="item_details">时间:{{ runRoute.gtm }}</label>
+        <br />
+        <label class="item_details">车速:{{ runRoute.spd }}千米/小时</label>
+        <br />
+        <br />
+        <!--控制条-->
+        <div class="map-control" v-show="isActual">
+          <!--播放暂停按钮-->
+          <Icon
+            v-if="!isPlay"
+            class="play-icon play"
+            type="ios-play"
+            @click="
+              isPlay = true
+              play()
+              navgControl(playIcon)
+            "
+          />
+          <Icon
+            v-else
+            class="play-icon pause"
+            type="ios-pause"
+            @click="
+              isPlay = false
+              stop()
+              navgControl('pause')
+            "
+          />
+          <Icon class="play-icon quickly" type="ios-play" @click="addIndex()" />
+          <!--已播放时间-->
+          <!--进度条-->
+          <div class="mySlider">
+            <Slider
+              class="map-slider"
+              v-model="sliderVal"
+              :tip-format="hideFormat"
+              :step="0.0001"
+            ></Slider>
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-row>
+      <el-button type="primary" @click="slow">慢速</el-button>
+      <el-button type="success" @click="middle">中速</el-button>
+      <el-button type="danger" @click="fast">快速</el-button>
+      <el-button type="success" @click="addIndex" plain>快进</el-button>
+      <el-button type="danger" @click="stop" plain>暂停</el-button>
+      <el-button type="success" @click="play" plain>开始</el-button>
+      <el-select
+        style="width:100px"
+        @change="changeParkingTime"
+        v-model="parkingTime"
+        placeholder="停车"
+      >
+        <el-option
+          v-for="item in parkingOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+      <el-select
+        style="width:100px"
+        @change="changeLeaveTime"
+        v-model="leaveTime"
+        placeholder="离线"
+      >
+        <el-option
+          v-for="item in parkingOptions"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+    </el-row>
+    <div class="btnx">
+      <el-button type="primary" class="" @click="openInfo"
+        >打开信息窗体</el-button
+      >
+      <el-button type="primary" class="" @click="closeinfo"
+        >关闭信息窗口</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import { shallowRef } from '@vue/reactivity'
+import { lazyAMapApiLoaderInstance } from 'vue-amap'
+import Slider from './slider.vue'
+import { getCookie } from '@/utils/util.js'
+Vue.use(Slider)
+import Vue from 'vue'
+var infoWindow
+export default {
+  name: 'PathView',
+  props: {
+    orderNumber: '',
+    capacityNumber: '',
+    startPointName: '',
+    endPointName: '',
+    statusCode: ''
+  },
+  setup() {
+    const map = shallowRef(null)
+    return {
+      map
+    }
+  },
+  watch: {
+    //监听车牌号变化
+    orderNumber: {
+      deep: true,
+      handler(val, oldVal) {
+        console.log(val)
+        this.initData(val)
+      }
+    }
+  },
+  data() {
+    return {
+      ///che
+      isTimesChoose: false,
+      isActual: true,
+      isPlay: false,
+      passedTime: '12:02:10',
+      sliderVal: 0,
+      times: 1,
+      totalTime: '11',
+      speed: 10000,
+      startTime: '',
+      endTime: '',
+      //选择停车时长
+      parkingTime: null,
+      //停车时长选择区间
+      parkingOptions: [
+        {
+          value: 600000,
+          label: '10分钟'
+        },
+        {
+          value: 1200000,
+          label: '20分钟'
+        },
+        {
+          value: 1800000,
+          label: '30分钟'
+        },
+        {
+          value: 2400000,
+          label: '40分钟'
+        },
+        {
+          value: 3000000,
+          label: '50分钟'
+        },
+        {
+          value: 3600000,
+          label: '60分钟'
+        },
+        {
+          value: 36000000,
+          label: '关闭'
+        }
+      ],
+      //离线图标
+      leaveMark: [],
+      //停车图标
+      parkMark: [],
+      //选择离线时长
+      leaveTime: null,
+      //离线时长选择区间
+      leaveOptions: [
+        {
+          value: 600000,
+          label: '10分钟'
+        },
+        {
+          value: 1200000,
+          label: '20分钟'
+        },
+        {
+          value: 1800000,
+          label: '30分钟'
+        },
+        {
+          value: 2400000,
+          label: '40分钟'
+        },
+        {
+          value: 3000000,
+          label: '50分钟'
+        },
+        {
+          value: 3600000,
+          label: '60分钟'
+        },
+        {
+          value: 36000000,
+          label: '关闭'
+        }
+      ],
+      //已行驶轨迹
+      runRoute: {
+        agl: '',
+        gtm: '',
+        hgt: '',
+        lat: '',
+        lon: '',
+        mil: '',
+        spd: ''
+      },
+      point: '',
+      pointNext: '',
+      loading: null,
+      navgtrSpeed: 1,
+      //地图中心位置
+      centerPoint: {
+        pointLat: '',
+        pointLon: ''
+      },
+      //自定义窗体信息
+      ctmarkes: {
+        lat: '33.015888071433764',
+        lon: '115.96995235868168',
+        title: '豫SE8888',
+        details: '安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米'
+      },
+      //运输详情
+      transportDetail: {
+        //车牌号
+        capacityNumber: '',
+        //规划路线
+        estimateRoute: [
+          {
+            lat: '33.015888071433764',
+            lon: '115.96995235868168'
+          }
+        ],
+        //规划线路
+        estimatePath: [[114.03046212985384, 32.49786984660489]],
+        //已行驶轨迹
+        runRoute: [
+          {
+            agl: '44',
+            gtm: '2022年03月09日 16:47:24',
+            hgt: '13',
+            lat: '32.906411535084985',
+            lon: '115.76177868692135',
+            mil: '429409.2',
+            spd: '17.0'
+          }
+        ],
+        runPath: [[114.03922119568348, 32.49746162481379]],
+        //当前位置
+        currentPointName: '中国达州市通川区',
+        //当前位置经纬度
+        currentPoint: {
+          lat: '',
+          lon: ''
+        },
+        //起点位置
+        startPointName: '中国达州市通川区',
+        //起点位置经纬度
+        startPoint: {
+          lon: '114.03922119568348',
+          lat: '32.49746162481379'
+        },
+        //终点位置
+        endPointName: '中国成都萧山',
+        //终点位置经纬度
+        endPoint: {
+          lon: '115.96995737755431',
+          lat: '33.01595479752097'
+        },
+        //自定义标记
+        content: [],
+        //异常位置
+        abnormalLocation: []
+      },
+      listPath: [],
+      //组件
+      pathSimplifierIns: {},
+      pathNavigator: {},
+      //地图解析
+      geocoder: null,
+      currentPointName: ''
+    }
+  },
+  created() {
+    let that = this
+    that.initData(that.orderNumber)
+  },
+  mounted() {},
+  methods: {
+    //停车时间改变
+    changeParkingTime() {
+      let that = this
+      //清除之前的停车点
+      that.hideParkingMark()
+      //计算时间的点
+      let calculationPoint = null
+      that.listPath[0].runRoute.forEach(function(item, indexOf) {
+        if (indexOf + 1 < that.listPath[0].runRoute.length) {
+          //判断calculationPoint是否为空,如果是空的说明当前没有在计算停车时间
+          if (calculationPoint == null && item.spd == '0.0') {
+            calculationPoint = item
+          } else if (calculationPoint != null && item.spd != '0.0') {
+            let beforeTime = that.stringToDate(calculationPoint.gtm)
+            let item2 = that.listPath[0].runRoute[indexOf]
+            let afterTime = that.stringToDate(item2.gtm)
+            let second = afterTime - beforeTime
+            if (second > that.parkingTime) {
+              let message = '停车:' + second / 60000
+              that.initParkingMarkes(
+                20,
+                35,
+                require('@/assets/img/park.png'),
+                calculationPoint.lon,
+                calculationPoint.lat,
+                message.split('.')[0] + '分钟'
+              )
+            }
+            calculationPoint = null
+          }
+        }
+      })
+    },
+    //字符串转为Date
+    stringToDate(dateString) {
+      console.log(dateString)
+      let dateStr = dateString
+        .replace('年', '-')
+        .replace('月', '-')
+        .replace('日', '')
+      return Date.parse(dateStr)
+    },
+    //停车所有离线图标
+    hideParkingMark() {
+      let that = this
+
+      that.parkMark.forEach(function(item, indexOf) {
+        item.hide()
+      })
+    },
+    //离线时间改变时获得超过时间的点信息
+    changeLeaveTime() {
+      let that = this
+      //关闭所有图标
+      that.hideLeaveMark()
+      that.listPath[0].runRoute.forEach(function(item, indexOf) {
+        if (indexOf + 1 < that.listPath[0].runRoute.length) {
+          let beforeTime = that.stringToDate(item.gtm)
+          let item2 = that.listPath[0].runRoute[indexOf + 1]
+          let afterTime = that.stringToDate(item2.gtm)
+          let second = afterTime - beforeTime
+          if (second > that.leaveTime) {
+            let message = '离线:' + second / 60000
+            that.initLeaveMarkes(
+              20,
+              35,
+              require('@/assets/img/leave.png'),
+              item2.lon,
+              item2.lat,
+              message.split('.')[0] + '分钟'
+            )
+          }
+        }
+      })
+    },
+    //关闭所有离线图标
+    hideLeaveMark() {
+      let that = this
+      that.leaveMark.forEach(function(item, indexOf) {
+        item.hide()
+      })
+    },
+    slow() {
+      console.log('slow')
+      let that = this
+      that.pathNavigator.setSpeed(1000)
+    },
+    middle() {
+      console.log('middle')
+      let that = this
+      that.pathNavigator.setSpeed(10000)
+    },
+    fast() {
+      console.log('fast')
+      let that = this
+      that.pathNavigator.setSpeed(100000)
+    },
+    play() {
+      let that = this
+      that.pathNavigator.resume()
+    },
+    stop() {
+      let that = this
+      that.pathNavigator.pause()
+    },
+    addIndex() {
+      let that = this
+      let increment = that.listPath[0].runPath.length * 0.1
+      let result = that.point + increment
+      if (result < that.listPath[0].runPath.length) {
+        that.pathNavigator.start(that.point + increment)
+      } else {
+        that.pathNavigator.start(that.listPath[0].runPath.length - 1)
+      }
+    },
+    ///che
+    navgControl() {},
+    hideFormat(value) {
+      let that = this
+      that.sliderVal = value
+    },
+    initParkingMarkes(weight, height, image, lon, lat, title) {
+      let that = this
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      })
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      })
+      that.parkMark.push(pointmarker)
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker)
+    },
+    //创建离线和停车的标记
+    initLeaveMarkes(weight, height, image, lon, lat, title) {
+      let that = this
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      })
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      })
+      that.leaveMark.push(pointmarker)
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker)
+    },
+    initData(orderNumber) {
+      let that = this
+      if (this.map) {
+        this.map.destroy()
+      }
+      that.axios
+        .post('/api/v1/otms/fullPath?orderNumber=' + orderNumber)
+        .then(res => {
+          console.log(res.data)
+          if (res.data.data == '-1') {
+            this.$message.error('运输订单未关闭的自提车辆无权查看!')
+          } else if (res.data.data.startAndEndRoutes != null) {
+            that.listPath = res.data.data.startAndEndRoutes
+            that.startTime = res.data.data.startAndEndRoutes[0].runRoute[0].gtm
+            that.endTime =
+              res.data.data.startAndEndRoutes[0].runRoute[
+                res.data.data.startAndEndRoutes[0].runRoute.length - 1
+              ].gtm
+            that.initMap()
+          } else {
+            that.listPath = []
+            this.$message.error('车辆没有开启GPS')
+          }
+        })
+    },
+    endline() {
+      let that = this
+      that.initPolyline(that.listPath[0].estimatePath, '#FF0000')
+    },
+    //创建起点终点当前点
+    threeMarker() {
+      let that = this
+      that.listPath.forEach((element, index) => {
+        //开始标记点
+        if (element.startPoint.lon != '' && element.startPoint.lat != '') {
+          that.initMarkes(
+            20,
+            35,
+            require('@/assets/img/start.png'),
+            element.startPoint.lon,
+            element.startPoint.lat,
+            '起点'
+          )
+        }
+        //当前点
+        that.getCurrentPointName([
+          element.runRoute[element.runRoute.length - 1].lon,
+          element.runRoute[element.runRoute.length - 1].lat
+        ])
+        //结束标记点
+        // if (element.endPoint.lon != '' && element.endPoint.lat != '') {
+        //   that.initMarkes(
+        //     20,
+        //     35,
+        //     require('@/assets/img/end.png'),
+        //     element.endPoint.lon,
+        //     element.endPoint.lat,
+        //     '终点'
+        //   )
+        // }
+      })
+    },
+    //获得结束地址
+    getCurrentPointName(lnglatXY) {
+      let that = this
+      that.geocoder.getAddress(lnglatXY, function(status, result) {
+        if (status === 'complete' && result.info === 'OK') {
+          that.currentPointName = result.regeocode.formattedAddress
+          let content =
+            that.statusCode +
+            ':' +
+            that.currentPointName +
+            '<br/>' +
+            '距离:' +
+            that.listPath[0].miled +
+            '<br/>' +
+            '时间范围:' +
+            that.startTime +
+            ' 至 ' +
+            that.endTime
+          if (
+            getCookie('orgCode') != 'wuliuyunshubu' &&
+            getCookie('orgCode') != 'shichangxinxibu' &&
+            getCookie('orgCode') != 'caiwubu'
+          ) {
+            content =
+              that.statusCode +
+              ':' +
+              that.currentPointName +
+              '<br/>' +
+              '时间范围:' +
+              that.startTime +
+              ' 至 ' +
+              that.endTime
+          }
+          that.initCustomMarkes(
+            that.capacityNumber,
+            content,
+            lnglatXY[0],
+            lnglatXY[1]
+          )
+        }
+      })
+    },
+    //defualt数据
+    defaultDate() {
+      // let that=this;
+      // that.pathNavigator.start(that.listPath[0].runPath.length)
+      // that.pathNavigator.pause();
+    },
+    //初始化地图
+    initMap() {
+      lazyAMapApiLoaderInstance.load().then(() => {
+        let that = this
+        that.map = new AMap.Map('amap-container', {
+          //设置地图容器id
+          viewMode: '2D', //是否为2D地图模式
+          zoom: 10, //初始化地图级别
+          center: [105.602725, 37.076636] //初始化地图中心点位置
+        })
+        that.initGeocoder()
+        that.initPathSimplifier()
+        that.threeMarker()
+        //that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
+        //that.endline()//预估路径
+      })
+    },
+    initCustomMarkes(title, details, lon, lat) {
+      let that = this
+      //自定义窗体内容
+      var content = [
+        "<div  style='top:1px;width: 200px; background-color: rgba(22, 160, 133, 1);' ><font color='white'>" +
+          title +
+          '</font>',
+        "<div style='background-color:(22, 160, 133, 1); ;'><font color='white'>" +
+          details +
+          '</font></div></div>'
+      ]
+      // 创建 infoWindow 实例
+      infoWindow = new AMap.InfoWindow({
+        content: content.join('<br>') //传入 dom 对象,或者 html 字符串
+      })
+      // 打开信息窗体
+      infoWindow.open(that.map, [lon, lat])
+    },
+    // 关闭信息窗口
+    closeinfo() {
+      infoWindow.close()
+    },
+    openInfo() {
+      let lon = null
+      let lat = null
+      console.log(this.listPath)
+      this.listPath.forEach(e => {
+        if (e.endPoint != {} && e.endPoint != '' && e.endPoint != null) {
+          lon = e.endPoint.lon
+          lat = e.endPoint.lat
+        } else {
+          lon = e.runRoute[e.runRoute.length - 1].lon
+          lat = e.runRoute[e.runRoute.length - 1].lat
+        }
+      })
+      infoWindow.open(this.map, [lon, lat])
+    },
+    initPolyline(path, color) {
+      let that = this
+      //预计轨迹
+      var endLine = new AMap.Polyline({
+        map: that.map,
+        path: path,
+        isOutline: true,
+        outlineColor: color,
+        borderWeight: 0,
+        strokeColor: '#FF0000',
+        strokeOpacity: 1,
+        strokeWeight: 5,
+        // 折线样式还支持 'dashed'
+        strokeStyle: 'solid',
+        // strokeStyle是dashed时有效
+        strokeDasharray: [10, 5],
+        lineJoin: 'round',
+        lineCap: 'round',
+        zIndex: 50
+      })
+      that.map.setFitView([[endLine]])
+    },
+    //创建简单的标记
+    initMarkes(weight, height, image, lon, lat, title) {
+      let that = this
+      //图标标记点
+      let pointicon = new AMap.Icon({
+        size: new AMap.Size(weight, height), // 图标尺寸
+        image: image, // Icon的图像
+        imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
+        imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+      })
+      // 创建一个 Marker 实例:
+      var pointmarker = new AMap.Marker({
+        position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+        icon: pointicon,
+        title: title
+      })
+      // 将创建的点标记添加到已有的地图实例:
+      that.map.add(pointmarker)
+    },
+    //创建轨迹和巡航器
+    initPathSimplifier() {
+      let that = this
+      // ...你的操作
+      new AMapUI.load(['ui/misc/PathSimplifier'], PathSimplifier => {
+        if (!PathSimplifier.supportCanvas) {
+          alert('当前环境不支持 Canvas!')
+          return
+        }
+        //创建轨迹和巡航器
+        // 创建组件实例
+        that.pathSimplifierIns = new PathSimplifier({
+          map: that.map,
+          zIndex: 100, // 图层叠加顺序
+          data: that.listPath, // 巡航路径
+          // 获取巡航路径中的路径坐标数组
+          getPath: (pathData, pathIndex) => {
+            return pathData.runPath
+          },
+          //鼠标悬浮停时显示消息
+          getHoverTitle: function(pathData, pathIndex, pointIndex) {
+            //返回鼠标悬停时显示的信息
+            if (pointIndex >= 0) {
+              if (pathData.runRoute[pointIndex].gtm !== 'undefined') {
+                //鼠标悬停在某个轨迹节点上
+                return (
+                  pathData.runRoute[pointIndex].gtm +
+                  ',速度' +
+                  pathData.runRoute[pointIndex].spd +
+                  '千米/小时'
+                )
+              }
+            }
+          },
+          //设置轨迹样式
+          renderOptions: {
+            //轨迹线的样式
+            pathLineStyle: {
+              strokeStyle: 'black',
+              lineWidth: 6,
+              dirArrowStyle: true
+            }
+          }
+        })
+        // 创建巡航器
+        that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
+          loop: false, // 是否循环
+          speed: that.speed, // 速度(km/h)
+          pathNavigatorStyle: {
+            width: 20,
+            height: 40,
+            content: PathSimplifier.Render.Canvas.getImageContent(
+              require('@/assets/img/smallcar.png'),
+              onload,
+              onerror
+            ),
+            strokeStyle: null,
+            fillStyle: null
+          }
+        })
+        //开启巡航
+        that.pathNavigator.start()
+        that.defaultDate()
+
+        //开始事件
+        that.pathNavigator.on('start resume', function() {
+          // that.navgtr._startTime = Date.now();
+          // that.navgtr._startDist = this.getMovedDistance();
+        })
+        //暂停
+        that.pathNavigator.on('stop pause', function() {
+          // that.navgtr._movedTime = Date.now() - that.navgtr._startTime;
+          // that.navgtr._movedDist = this.getMovedDistance() - that.navgtr._startDist;
+        })
+        that.pathNavigator.on('move', function(data, value) {
+          that.updateLable(value)
+        })
+      })
+    },
+    updateLable(value) {
+      let that = this
+      that.point = value.dataItem.pointIndex
+      that.runRoute = value.dataItem.pathData.runRoute[that.point]
+      that.sliderVal =
+        (value.dataItem.pointIndex / value.dataItem.pathData.runRoute.length) *
+        100
+    },
+    changeSpeed(value) {
+      // console.log(value)
+      // let that=this;
+      // that.times=value;
+    },
+    playIcon() {
+      console.log('nihoa')
+    },
+    //逆解码函数
+    initGeocoder() {
+      let that = this
+      console.log('initGeocoder')
+      AMap.plugin('AMap.Geocoder', function() {
+        that.geocoder = new AMap.Geocoder({
+          radius: 1000,
+          extensions: 'all'
+        })
+
+        console.log(that.geocoder)
+      })
+    }
+  }
+}
+</script>
+<style>
+.mapcontroller {
+  width: 250px;
+  height: 260px;
+  background: white;
+  position: absolute;
+  z-index: 99;
+  top: 0;
+  left: 0;
+}
+.container {
+  width: 100%;
+  height: 100%;
+}
+.item_details {
+  display: block;
+  margin-top: 20px;
+  position: relative;
+  left: 30px;
+  width: 200px;
+  height: 0px;
+}
+#amap-container {
+  position: relative;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  margin: 0;
+  font-family: '微软雅黑';
+}
+.driving_information2 {
+  position: relative;
+  top: 70px;
+}
+.driving_information3 {
+  position: absolute;
+  z-index: 99;
+  top: 0;
+  left: 0;
+  position: relative;
+  top: 50px;
+}
+
+/* 进度条 */
+.mySlider {
+  width: 150px;
+  height: 20px;
+  display: inline-block;
+  position: relative;
+  left: 32px;
+}
+.play {
+  position: relative;
+  left: 28px;
+}
+.quickly {
+  float: right;
+  position: relative;
+  left: -20px;
+  top: 10px;
+}
+.pause {
+  position: relative;
+  left: 28px;
+}
+.passed-time {
+  position: relative;
+  left: 5px;
+}
+.end-time {
+  position: relative;
+  left: 5px;
+}
+.map-times {
+  position: relative;
+  background-color: red;
+  width: 40px;
+}
+</style>
+<style lang="scss" scoped>
+.btnx {
+  z-index: 1000;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+}
+</style>

+ 293 - 0
src/views/SIDEWMS/components/oYeInbound.vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="oYeInbound">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item v-if="Object.keys(queryMap).length > 0">
+          <span style="color: #409EFF;font-size: 18px;font-weight: 700;"
+            >入库明细</span
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="入库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="入库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-button type="primary" @click="exportExcel">导出</el-button>
+        <el-button
+          type="primary"
+          @click="back"
+          v-if="Object.keys(queryMap).length > 0"
+        >
+          返回</el-button
+        >
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <dilTable
+        @func="func"
+        v-bind.sync="options"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '35px' }"
+        :cell-style="returnClassName"
+      ></dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie, formatDate } from '@/utils/util.js'
+export default {
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      options: {
+        requestUrl: '',
+        requestQuery: {}
+      },
+      selectOptions: [
+        {
+          value: 'consigneeName',
+          label: '客户'
+        },
+        {
+          value: 'capacityNumber',
+          label: '车牌号'
+        },
+        {
+          value: 'saleArea',
+          label: '片区'
+        },
+        {
+          value: 'inboundArea',
+          label: '仓库大类'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '具体仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'materialSpe',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      apiId: '529',
+      orgCode: null,
+      loginName: null,
+      inboundWarehouse: null,
+      showSummaryList: [
+        'materialNumber',
+        'netWeight',
+        'theoryWeight',
+        'orderNetWeight'
+      ],
+      queryMap: {},
+      tableData: [],
+      tableTop: []
+    }
+  },
+  created() {
+    if (Object.keys(this.$route.query).length > 0) {
+      this.queryMap = this.$route.query
+      this.startTime = this.queryMap.startTime
+      this.endTime = this.queryMap.endTime
+    } else {
+      this.queryMap = {}
+    }
+    this.getInfo()
+    this.getRequestUrl()
+  },
+  methods: {
+    func(res) {
+      console.log(res, 'res')
+      this.tableTop = res.columnData
+    },
+    exportExcel() {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let data = []
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '厂外库'
+      this.axios
+        .post(
+          '/api/v1/wms/getOyeInboundResult' +
+            '?startTime=' +
+            this.startTime +
+            '&endTime=' +
+            this.endTime,
+          queryMap
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.tableData.forEach((item, index) => {
+            let temp = {}
+            this.tableTop.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '厂外库入库实绩')
+          //导出
+          XLSX.writeFile(wb, '厂外库入库实绩' + '.xlsx')
+        })
+    },
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    back() {
+      this.$router.go(-1)
+    },
+    getInfo() {
+      this.orgCode = getCookie('orgCode')
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
+        this.apiId = 537
+        this.loginName = getCookie('loginName')
+      } else if (this.orgCode == 'ouyechangwaiku') {
+        this.apiId = 529
+        this.loginName = null
+        console.log(getCookie('loginName'), 'loginName')
+        this.inboundWarehouse = getCookie('loginName')
+      } else {
+        this.apiId = 529
+        this.loginName = null
+      }
+    },
+    getRequestUrl() {
+      this.options.requestUrl =
+        '/api/v1/wms/getOyeInboundResult?apiId=' +
+        this.apiId +
+        '&con=' +
+        this.con +
+        '&i=' +
+        new Date() +
+        '&startTime=' +
+        this.startTime +
+        '&endTime=' +
+        this.endTime
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      if (this.orgCode == 'ouyechangwaiku') {
+        queryMap['inboundWarehouse'] = this.inboundWarehouse
+      }
+      queryMap.inboundAreaSide = '厂外库'
+      if (Object.keys(this.queryMap).length > 0) {
+        queryMap = { ...queryMap, ...this.queryMap }
+      }
+      this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
+    },
+    search() {
+      this.getRequestUrl()
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.oYeInbound {
+  .search {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
+}
+</style>

+ 280 - 0
src/views/SIDEWMS/components/oYeOutbound.vue

@@ -0,0 +1,280 @@
+<template>
+  <div class="oYeOutbound">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item v-if="Object.keys(queryMap).length > 0">
+          <span style="color: #409EFF;font-size: 18px;font-weight: 700;"
+            >出库明细</span
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="出库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="出库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable> </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-button type="primary" @click="exportExcel">导出</el-button>
+
+        <el-button
+          type="primary"
+          @click="back"
+          v-if="Object.keys(queryMap).length > 0"
+          >返回</el-button
+        >
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '35px' }"
+        :cell-style="returnClassName"
+        @func="func"
+      ></dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie, formatDate } from '@/utils/util.js'
+export default {
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      options: {
+        requestUrl: '',
+        requestQuery: {}
+      },
+      selectOptions: [
+        {
+          value: 'consigneeName',
+          label: '客户'
+        },
+        {
+          value: 'saleArea',
+          label: '片区'
+        },
+        {
+          value: 'inboundArea',
+          label: '仓库大类'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '具体仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'materialSpe',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      apiId: '530',
+      orgCode: null,
+      loginName: null,
+      showSummaryList: ['materialNumber', 'netWeight', 'theoryWeight'],
+      queryMap: {},
+      tableData: [],
+      tableTop: []
+    }
+  },
+  created() {
+    if (Object.keys(this.$route.query).length > 0) {
+      this.queryMap = this.$route.query
+      this.startTime = this.queryMap.startTime
+      this.endTime = this.queryMap.endTime
+    }
+    this.getInfo()
+    this.getRequestUrl()
+  },
+  methods: {
+    func(res) {
+      console.log(res, 'res')
+      this.tableTop = res.columnData
+    },
+    exportExcel() {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let data = []
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '厂外库'
+      this.axios
+        .post(
+          '/api/v1/wms/getOyeOutboundResult' +
+            '?startTime=' +
+            this.startTime +
+            '&endTime=' +
+            this.endTime,
+          queryMap
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.tableData.forEach((item, index) => {
+            let temp = {}
+            this.tableTop.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '厂外库出库实绩')
+          //导出
+          XLSX.writeFile(wb, '厂外库出库实绩' + '.xlsx')
+        })
+    },
+    back() {
+      this.$router.go(-1)
+    },
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    getInfo() {
+      this.orgCode = getCookie('orgCode')
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
+        this.apiId = 536
+        this.loginName = getCookie('loginName')
+      } else if (this.orgCode == 'ouyechangwaiku') {
+        this.apiId = 530
+        this.loginName = null
+        this.inboundWarehouse = getCookie('loginName')
+      } else {
+        this.apiId = 530
+        this.loginName = null
+      }
+    },
+    getRequestUrl() {
+      this.options.requestUrl =
+        '/api/v1/wms/getOyeOutboundResult?apiId=' +
+        this.apiId +
+        '&con=' +
+        this.con +
+        '&i=' +
+        new Date() +
+        '&startTime=' +
+        this.startTime +
+        '&endTime=' +
+        this.endTime
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      if (Object.keys(this.queryMap).length > 0) {
+        queryMap = { ...queryMap, ...this.queryMap }
+      }
+      if (this.orgCode == 'ouyechangwaiku') {
+        queryMap['inboundWarehouse'] = this.inboundWarehouse
+      }
+      queryMap.inboundAreaSide = '厂外库'
+      this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
+    },
+    search() {
+      this.getRequestUrl()
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.oYeOutbound {
+  .search {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
+}
+</style>

+ 1207 - 0
src/views/SIDEWMS/components/oYeRealTimeInventory.vue

@@ -0,0 +1,1207 @@
+<template>
+  <div class="oYeRealTimeInventory">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-button type="primary" @click="exportExcel">导出</el-button>
+        <!--<el-button type="primary" @click="exportExcelBefore"
+          >下载点前Excel</el-button
+        >-->
+        <el-button
+          type="primary"
+          @click="addEditTime"
+          v-privilege="activeMenu + 'addEditTime'"
+          >划分实时库存
+        </el-button>
+        <el-button
+          type="primary"
+          @click="addEditTimeWeight"
+          v-privilege="activeMenu + 'addEditTime'"
+          >划分库存重量
+        </el-button>
+
+        <el-button
+          type="primary"
+          @click="newFactoryPutStorage"
+          v-privilege="activeMenu + 'addEditTime'"
+          >新厂钢材入库
+        </el-button>
+
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <dilTable
+        @func="func"
+        v-bind.sync="options"
+        @radio-change="radioChange"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+        :showIndex="false"
+        :row-style="{ height: '30px' }"
+        :cell-style="returnClassName"
+      ></dilTable>
+    </div>
+    <!--件数划分-->
+    <div class="updateInsertForm">
+      <el-dialog :visible.sync="updateInsertVisible">
+        <div style="color: #000000;font-size: 16px;font-weight: 700;">
+          原有实时库存数据:
+        </div>
+        <el-form label-position="left">
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.saleArea
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="inventoryId">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >库存ID:</span
+            >
+            <span
+              style="color: hsl(184, 80%, 38%);font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.inventoryId }}</span
+            >
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:red;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t,{{
+                selectedRowData.materialNumber
+              }}件,理重为{{ selectedRowData.theoryWeight }}t,净重为{{
+                selectedRowData.netWeight
+              }}t</span
+            >
+          </el-form-item>
+        </el-form>
+        <div style="color: #000000;font-size: 16px;font-weight: 700;">
+          新增实时库存数据:
+        </div>
+        <el-form label-position="left">
+          
+          <el-form-item>
+            <el-button type="primary" @click="browse">浏览</el-button>
+          </el-form-item>
+          
+          <el-form-item prop="newInventoryId">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >库存ID:</span
+            >
+            <span
+              style="color: hsl(184, 80%, 38%);font-size: 16px;font-weight: 500;"
+              >{{ updateInsertForm.newInventoryId }}</span
+            >
+          </el-form-item>
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区:</span
+            >
+            <el-input
+              v-model="updateInsertForm.saleArea"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              updateInsertForm.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:red;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t</span
+            >
+          </el-form-item>
+          <el-form-item prop="materialNumber">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资件数:</span
+            >
+            <el-input
+              v-model.number="updateInsertForm.materialNumber"
+              type="number"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="theoryWeight">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资理重:</span
+            >
+            <el-input
+              v-model="updateInsertForm.theoryWeight"
+              disabled
+              style="width:250px"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <div style="display: flex;justify-content: center;align-items: center;">
+          <el-button
+            type="primary"
+            @click="makeSureMaterial"
+            style="margin-right: 20px;"
+            >保存</el-button
+          >
+          <el-button @click="updateInsertVisible = false">取消</el-button>
+        </div>
+      </el-dialog>
+      <el-dialog title="浏览" :visible.sync="browseVisible" width="80%">
+        <el-button type="primary" @click="sureMake">确定</el-button>
+        <dilTable
+          @func="func"
+          v-bind.sync="options1"
+          @radio-change="radioChange1"
+          :showIndex="false"
+          :row-style="{ height: '30px' }"
+          :cell-style="returnClassName"
+        ></dilTable>
+      </el-dialog>
+    </div>
+    <!-- 划分吨位 -->
+    <div class="updateInsertForm">
+      <el-dialog :visible.sync="updateWeightVisible">
+        <div style="color: #000000;font-size: 24px;font-weight: 700;">
+          原有实时库存数据:
+        </div>
+        <el-form label-position="left">
+          <el-form-item prop="inventoryId">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >库存ID:</span
+            >
+            <span
+              style="color: hsl(184, 80%, 38%);font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.inventoryId }}</span
+            >
+          </el-form-item>
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.saleArea
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              selectedRowData.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:red;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t,{{
+                selectedRowData.materialNumber
+              }}件,理重为{{ selectedRowData.theoryWeight }}t,净重为{{
+                selectedRowData.netWeight
+              }}t</span
+            >
+          </el-form-item>
+        </el-form>
+        <div style="color: #000000;font-size: 24px;font-weight: 700;">
+          新增实时库存数据:
+        </div>
+        <el-form label-position="left">
+        <!-- 查询条件 -->
+          <el-form-item prop="qconsigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户</span
+            >
+            <el-input
+              v-model="queryWeightForm.consigneeName"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="qsaleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区</span
+            >
+            <el-input
+              v-model="queryWeightForm.saleArea"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="qinboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库</span
+            >
+            <el-input
+              v-model="queryWeightForm.inboundWarehouse"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="browseWeight">浏览</el-button>
+          </el-form-item>
+        <!-- 查询条件end -->
+          <el-form-item prop="newInventoryId">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >库存ID:</span
+            >
+            <span
+              style="color: hsl(184, 80%, 38%);font-size: 16px;font-weight: 500;"
+              >{{ updateWeightForm.newInventoryId }}</span
+            >
+          </el-form-item>
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              updateWeightForm.consigneeName
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="saleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区:</span
+            >
+            <el-input
+              v-model="updateWeightForm.saleArea"
+              @input="saleAreaChange"
+              style="width: 250px;"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;">{{
+              updateWeightForm.inboundWarehouse
+            }}</span>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ selectedRowData.materialName }}-{{
+                selectedRowData.materialSpe
+              }}-{{ selectedRowData.materialModel }};</span
+            ><span style="color:#000000;font-size: 16px;font-weight: 500;"
+              >物资单重为{{ selectedRowData.singleWeight }}t</span
+            >
+          </el-form-item>
+          <el-form-item prop="materialWeight">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >当前重量:</span>
+              <span style="color:red;font-size: 16px;font-weight: 500;"
+              >{{
+                updateWeightForm.materialNumber
+              }}件,理重为{{ updateWeightForm.theoryWeight }}t,净重为{{
+                updateWeightForm.netWeight
+              }}t</span>
+          </el-form-item>
+          <el-form-item prop="materialNumberEdit">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >划拨件数:</span>
+            <el-input-number
+              v-model="updateWeightForm.materialNumberEdit"
+              style="width:250px"
+              :min="0" :max="100"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item prop="theoryWeightEdit">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >划拨理重:</span>
+            <el-input-number
+              v-model="updateWeightForm.theoryWeightEdit"
+              style="width:250px"
+              :precision="3" :step="0.001" :min="0" :max="1000"
+            ></el-input-number>
+          </el-form-item>
+          <el-form-item prop="netWeightEdit">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >划拨净重:</span>
+            <el-input-number
+              v-model="updateWeightForm.netWeightEdit"
+              style="width:250px"
+              :precision="3" :step="0.001" :min="0" :max="1000"
+            ></el-input-number>
+          </el-form-item>
+        </el-form>
+        <div style="display: flex;justify-content: center;align-items: center;">
+          <el-button
+            type="primary"
+            @click="makeSureMaterialWeight"
+            style="margin-right: 20px;"
+            >保存</el-button
+          >
+          <el-button @click="updateWeightVisible = false">取消</el-button>
+        </div>
+      </el-dialog>
+      <!-- 浏览框 -->
+      <el-dialog title="浏览" :visible.sync="browseVisibleWeight" width="80%">
+        <el-button type="primary" @click="sureMakeWeight">确定</el-button>
+        <dilTable
+          @func="func"
+          v-bind.sync="options2"
+          @radio-change="radioChange2"
+          :showIndex="false"
+          :row-style="{ height: '30px' }"
+          :cell-style="returnClassName"
+        ></dilTable>
+      </el-dialog>
+    </div>
+
+    <!--新厂钢材入库-->
+    <div class="updateInsertForm">
+      <el-dialog :visible.sync="newFactoryAddView" 
+      width="80%"
+      fullscreen>
+      <div style="display: grid; place-items: center; height: 100%;">
+        <div style="color: #000000;font-size: 24px;font-weight: 700;">
+          新增新厂钢材入库数据:
+        </div>
+        <el-form label-position="left">
+          <el-form-item prop="consigneeName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >客户:</span>
+            <el-autocomplete
+              class="inline-input"
+              v-model="newFactoryPutForm.consigneeName"
+              :fetch-suggestions="querySearchConsignee"
+              :trigger-on-focus="false"
+              @select="handleSelectConsignee"
+              style="width: 250px;"
+              placeholder="请输入客户名称"
+              clearable
+            >
+              <template slot-scope="{ item }">
+                <div class="name">{{ item.consigneeCompanyName }}</div>
+              </template>
+            </el-autocomplete>
+          </el-form-item>
+
+          <el-form-item prop="qsaleArea">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >片区:</span
+            >
+            <el-input
+              v-model="newFactoryPutForm.saleArea"
+              style="width: 250px;"
+              clearable
+            ></el-input>
+          </el-form-item>
+
+          <el-form-item prop="inboundWarehouse">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >仓库:</span
+            >
+            <el-select
+              v-model="newFactoryPutForm.inboundWarehouse"
+              style="width: 250px;"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in inboundWarehouseList"
+                :key="item.label"
+                :label="item.label"
+                :value="item.label"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="addMaterial">选择物资</el-button>
+          </el-form-item>
+          <el-form-item prop="materialName">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >物资信息:</span
+            >
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >{{ newFactoryPutForm.materialNameView }}</span>
+          </el-form-item>
+
+          <el-form-item prop="materialMeter" v-if="isDisabledMeter">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >米数:</span>
+            <el-input-number 
+              v-model="newFactoryPutForm.meter"
+              style="width:250px"
+              :min="0" :max="30"
+            ></el-input-number>
+          </el-form-item>
+          
+          <el-form-item prop="materialNumberEdit">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >入库件数:</span>
+            <el-input-number
+              v-model="newFactoryPutForm.materialNumber"
+              style="width:250px"
+              :min="0" :max="10000"
+            ></el-input-number>
+          </el-form-item>
+
+          <el-form-item prop="singleWeightEdit" v-if="isDisabledsingleWeight">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >单件理重:</span>
+            <el-input-number
+              v-model="newFactoryPutForm.singleWeight"
+              style="width:250px"
+              :precision="3" :step="0.001" :min="0" :max="100"
+            ></el-input-number>
+          </el-form-item>
+
+          <el-form-item prop="theoryWeightEdit" v-if="false">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >入库理重:</span>
+            <el-input-number
+              v-model="newFactoryPutForm.theoryWeight"
+              style="width:250px"
+              disabled
+              :precision="3" :step="0.001" :min="0" :max="100000"
+            ></el-input-number>
+          </el-form-item>
+
+          <el-form-item prop="netWeightEdit">
+            <span style="color: #000000;font-size: 16px;font-weight: 500;"
+              >入库净重:</span>
+            <el-input-number
+              v-model="newFactoryPutForm.netWeight"
+              style="width:250px"
+              :precision="3" :step="0.001" :min="0" :max="100000"
+            ></el-input-number>
+          </el-form-item>
+        </el-form>
+        <div style="display: flex;justify-content: center;align-items: center;">
+          <el-button
+            type="primary"
+            @click="putNewFactory"
+            style="margin-right: 20px;"
+            >保存</el-button
+          >
+          <el-button @click="newFactoryAddView = false">取消</el-button>
+        </div>
+      </div>
+      </el-dialog>
+      <!-- 物资选择模态框 -->
+      <el-drawer
+      title="选择物资信息"
+      :visible.sync="materialTable"
+      size="80%"
+      :show-close="true"
+      >
+      <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
+            placeholder="请输入物资名称或型号"
+            v-model="materialNameText"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;">规格</label>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            placeholder="请输入内容"
+            v-model="materialSpecificationText"
+            clearable
+            ><template slot="prepend">Φ</template></el-input
+          >
+        </el-form-item>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick"
+          style="margin-left: 4px;"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <el-button type="primary" @click="makeSelectMaterial"
+          ><i class="el-icon-check"></i>确定</el-button
+        >
+      </el-form>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable
+          v-bind.sync="option2"
+          @radio-change="selectionChange"
+        >
+        </dilTable>
+      </div>
+    </el-drawer>
+    </div>
+    <!--新厂钢材入库end-->
+
+    <div class="exportExcelBefore">
+      <el-dialog title="下载点前Excel" :visible.sync="exportExcelBeforeVisible">
+        <el-date-picker
+          v-model="excelTime"
+          type="date"
+          placeholder="选择日期"
+          style="width:140px"
+        >
+        </el-date-picker>
+
+        <el-button type="primary" size="middle" @click="downLoadFile"
+          >下载</el-button
+        >
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getCookie,
+  formatDate,
+  accAdd,
+  accMul,
+  accSub,
+  accDiv
+} from '@/utils/util.js'
+
+export default {
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      excelTime: new Date(),
+      exportExcelBeforeVisible: false,
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
+      options: {
+        requestUrl: '',
+        requestQuery: {},
+        selectionType: 'radio'
+      },
+      options1: {
+        requestUrl: '',
+        requestQuery: {},
+        selectionType: 'radio'
+      },
+      selectOptions: [
+        {
+          value: 'consigneeName',
+          label: '客户'
+        },
+        {
+          value: 'saleArea',
+          label: '片区'
+        },
+        {
+          value: 'inboundArea',
+          label: '仓库大类'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '具体仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'materialSpe',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      apiId: '531',
+      orgCode: null,
+      loginName: null,
+      selectedRowData: {},
+      selectedRowData1: {},
+      selectedRowData2: {},
+      updateInsertVisible: false,
+      updateInsertForm: {},
+      showSummaryList: ['materialNumber', 'netWeight', 'theoryWeight'],
+      tableData: [],
+      tableTop: [],
+      browseVisible: false,
+      updateWeightVisible: false,
+      updateWeightForm: {
+        saleArea:''
+      },
+      queryWeightForm: {},
+      browseVisibleWeight: false,
+      options2: {
+        requestUrl: '',
+        requestQuery: {},
+        selectionType: 'radio'
+      },
+      newFactoryAddView: false,
+      newFactoryPutForm:{
+
+      },
+      inboundWarehouseList: [],
+      materialTable: false,
+      materialNameText:"",
+      materialSpecificationText:"",
+      option2: {
+        // 表格请求数据的地址
+        requestUrl: '/api/v1/uc/getSteelMaterial?apiId=244',
+        // 控制显示多选列
+        selectionType: 'radio'
+      },
+      isDisabledMeter: false,
+      isDisabledtheoryWeight: false,
+      isDisabledsingleWeight: false,
+      newFactoryPutFormmaterialNumber:null,
+      newFactoryPutFormsingleWeight:null,
+      newFactoryPutFormtheoryWeight:null,
+      newFactoryPutFormnetWeight:null,
+    }
+  },
+  computed: {
+    materialNumber() {
+      return this.updateInsertForm.materialNumber
+    }
+  },
+  watch: {
+    materialNumber(val) {
+      if (val == this.selectedRowData.materialNumber) {
+        this.updateInsertForm.theoryWeight = this.selectedRowData.theoryWeight
+        this.updateInsertForm.netWeight = this.selectedRowData.netWeight
+      } else {
+        this.updateInsertForm.theoryWeight = accMul(
+          val,
+          this.updateInsertForm.singleWeight
+        )
+        this.updateInsertForm.netWeight = accMul(
+          accDiv(
+            this.selectedRowData.netWeight,
+            this.selectedRowData.materialNumber
+          ),
+          val
+        )
+      }
+    },
+    updateInsertVisible(val) {
+      if (!val) {
+        this.selectedRowData = {}
+        this.updateInsertForm = {}
+      }
+    },
+    updateWeightVisible(val) {
+      if (!val) {
+        this.selectedRowData = {}
+        this.updateWeightForm = {
+          saleArea:''
+        }
+        this.selectedRowData2 = {}
+      }
+    },
+  },
+  created() {
+    this.getInfo()
+    this.getRequestUrl()
+    this.getInboundWarehouseList()
+  },
+  methods: {
+    getInboundWarehouseList(){
+      this.axios.get('/api/v1/uc/getInboundWarehouseList').then(res => {
+        this.inboundWarehouseList = res.data
+      })
+    },
+    exportExcelBefore() {
+      this.exportExcelBeforeVisible = true
+    },
+    downLoadFile() {
+      const ele = document.createElement('a')
+      const url =
+        'https://wl.dasteel.cn:32322/api/v1/uc/getFile?path=/data/' +
+        'dil-wms-api/' +
+        formatDate(this.excelTime, 'yyyy-MM-dd') +
+        '.xlsx'
+      ele.setAttribute('href', url) //设置下载文件的url地址
+      ele.setAttribute('download', 'download') //用于设置下载文件的文件名
+      ele.click()
+    },
+    sureMake() {
+      this.updateInsertForm.newInventoryId = this.selectedRowData1.inventoryId
+      this.updateInsertForm.saleArea = this.selectedRowData1.saleArea
+      this.browseVisible = false
+    },
+    browse() {
+      let map = JSON.parse(JSON.stringify(this.selectedRowData))
+      this.options1.requestUrl =
+        '/api/v1/wms/getOyeRealTimeResult?apiId=' +
+        this.apiId +
+        '&con=' +
+        this.con +
+        '&i=' +
+        new Date()
+      this.options1.requestQuery = map
+      this.browseVisible = true
+    },
+    func(res) {
+      console.log(res, 'res')
+      this.tableTop = res.columnData
+    },
+    browseWeight() {
+      this.queryWeightForm.materialId = this.selectedRowData.materialId
+      this.queryWeightForm.materialName = this.selectedRowData.materialName
+      this.queryWeightForm.materialSpe = this.selectedRowData.materialSpe
+      this.queryWeightForm.materialModel = this.selectedRowData.materialModel
+      this.queryWeightForm.inboundAreaSide = '厂外库'
+      let map = JSON.parse(JSON.stringify(this.queryWeightForm))
+      console.log(map, 'res')
+      this.options2.requestUrl =
+        '/api/v1/wms/getOyeRealTimeResult?apiId=' +
+        this.apiId +
+        '&con=' +
+        this.con +
+        '&i=' +
+        new Date()
+      this.options2.requestQuery = map
+      this.browseVisibleWeight = true
+    },
+    sureMakeWeight() {
+      this.updateWeightForm.newInventoryId = this.selectedRowData2.inventoryId
+      this.updateWeightForm.consigneeId = this.selectedRowData2.consigneeId
+      this.updateWeightForm.consigneeName = this.selectedRowData2.consigneeName
+      this.updateWeightForm.inboundWarehouse = this.selectedRowData2.inboundWarehouse
+      this.updateWeightForm.saleArea = this.selectedRowData2.saleArea
+      this.updateWeightForm.materialId = this.selectedRowData2.materialId
+      this.updateWeightForm.materialName = this.selectedRowData2.materialName
+      this.updateWeightForm.materialSpe = this.selectedRowData2.materialSpe
+      this.updateWeightForm.materialModel = this.selectedRowData2.materialModel
+      this.updateWeightForm.singleWeight = this.selectedRowData2.singleWeight
+      this.updateWeightForm.meter = this.selectedRowData2.meter
+      this.updateWeightForm.materialNumber = this.selectedRowData2.materialNumber
+      this.updateWeightForm.theoryWeight = this.selectedRowData2.theoryWeight
+      this.updateWeightForm.netWeight = this.selectedRowData2.netWeight
+      this.browseVisibleWeight = false
+    },
+    saleAreaChange(){
+      if(this.updateWeightForm.saleArea != this.selectedRowData2.saleArea){
+        this.updateWeightForm.newInventoryId = '';
+      } else {
+        this.updateWeightForm.newInventoryId = this.selectedRowData2.inventoryId
+      }
+    },
+    exportExcel() {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let data = []
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      queryMap.isExcel = 1
+      queryMap.inboundAreaSide = '厂外库'
+      this.axios
+        .post('/api/v1/wms/getOyeRealTimeResult', queryMap)
+        .then(res => {
+          this.tableData = res.data.data
+          this.tableData.forEach((item, index) => {
+            let temp = {}
+            this.tableTop.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '欧冶实时库存')
+          //导出
+          XLSX.writeFile(wb, '欧冶实时库存' + '.xlsx')
+        })
+    },
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    addEditTime() {
+      if (Object.keys(this.selectedRowData).length == 0) {
+        this.$message({
+          type: 'error',
+          message: '请选择实时库存数据'
+        })
+        return
+      }
+      this.updateInsertForm.consigneeName = this.selectedRowData.consigneeName
+      this.updateInsertForm.oldSaleArea = this.selectedRowData.saleArea
+      this.updateInsertForm.inboundWarehouse = this.selectedRowData.inboundWarehouse
+      this.updateInsertForm.consigneeId = this.selectedRowData.consigneeId
+      this.updateInsertForm.materialId = this.selectedRowData.materialId
+      this.updateInsertForm.materialName = this.selectedRowData.materialName
+      this.updateInsertForm.materialSpe = this.selectedRowData.materialSpe
+      this.updateInsertForm.materialModel = this.selectedRowData.materialModel
+      this.updateInsertForm.inventoryId = this.selectedRowData.inventoryId
+      this.updateInsertForm.singleWeight = this.selectedRowData.singleWeight
+      this.updateInsertForm.meter = this.selectedRowData.meter
+      this.updateInsertForm.inboundArea = '欧冶库'
+      this.updateInsertVisible = true
+    },
+    addEditTimeWeight(){
+      if (Object.keys(this.selectedRowData).length == 0) {
+        this.$message({
+          type: 'error',
+          message: '请选择实时库存数据'
+        })
+        return
+      }
+      if(this.selectedRowData.materialName.indexOf('定尺') !== -1){
+        this.$message({
+          type: 'error',
+          message: '定尺类钢材无法划拨重量'
+        })
+        return
+      }
+      this.updateWeightForm.inventoryId = this.selectedRowData.inventoryId
+      this.updateWeightForm.inboundArea = '厂外库'
+      this.updateWeightForm.oldConsigneeId = this.selectedRowData.consigneeId
+      this.updateWeightForm.oldConsigneeName = this.selectedRowData.consigneeName
+      this.updateWeightForm.oldInboundWarehouse = this.selectedRowData.inboundWarehouse
+      this.updateWeightForm.oldSaleArea = this.selectedRowData.saleArea
+      this.updateWeightForm.materialNumberEdit = 0
+      this.updateWeightForm.theoryWeightEdit = 0
+      this.updateWeightForm.netWeightEdit = 0
+      this.updateWeightVisible = true
+    },
+    //新厂钢材入库
+    newFactoryPutStorage(){
+      this.newFactoryAddView = true
+    },
+    radioChange(row) {
+      this.selectedRowData = row
+    },
+    radioChange1(row) {
+      this.selectedRowData1 = row
+    },
+    radioChange2(row) {
+      this.selectedRowData2 = row
+    },
+    getInfo() {
+      this.orgCode = getCookie('orgCode')
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
+        this.apiId = 534
+        this.loginName = getCookie('loginName')
+      } else if (this.orgCode == 'ouyechangwaiku') {
+        this.apiId = 531
+        this.loginName = null
+        this.inboundWarehouse = getCookie('loginName')
+      } else {
+        this.apiId = 531
+        this.loginName = null
+      }
+    },
+    getRequestUrl() {
+      this.options.requestUrl =
+        '/api/v1/wms/getOyeRealTimeResult?apiId=' +
+        this.apiId +
+        '&con=' +
+        this.con +
+        '&i=' +
+        new Date()
+      let queryMap = {}
+      queryMap[this.screen] = this.con
+      queryMap[this.screen1] = this.con1
+      if (this.loginName != null) {
+        queryMap['consigneeName'] = this.loginName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryMap['saler'] = getCookie('loginName')
+      }
+      queryMap.inboundAreaSide = '厂外库'
+      this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
+    },
+    search() {
+      this.getRequestUrl()
+    },
+    makeSureMaterial() {
+      this.updateInsertForm.saleArea = this.updateInsertForm.saleArea.replace(
+        ',',
+        ','
+      )
+      this.updateInsertForm.userName = getCookie('loginName')
+      this.$confirm('确定保存吗?', '提示', {
+        type: 'warning'
+      }).then(() => {
+        this.axios
+          .post('/api/v1/wms/updateInsertRealTime', this.updateInsertForm)
+          .then(res => {
+            if (res.data.status == 'succeed') {
+              this.$message({
+                type: 'success',
+                message: '保存成功'
+              })
+              this.updateInsertVisible = false
+              this.getRequestUrl()
+            }
+          })
+      })
+    },
+    makeSureMaterialWeight() {
+      this.updateWeightForm.saleArea = this.updateWeightForm.saleArea.replace(
+        ',',
+        ','
+      )
+      this.updateWeightForm.userName = getCookie('loginName')
+      if(this.selectedRowData.materialId !== this.updateWeightForm.materialId){
+        this.$message({
+          type: 'error',
+          message: '必须选择同一物资才能进行重量划拨'
+        })
+        return
+      }
+      this.$confirm('确定保存吗?', '提示', {
+        type: 'warning'
+      }).then(() => {
+        this.axios
+          .post('/api/v1/wms/updateInsertRealTimeWeight', this.updateWeightForm)
+          .then(res => {
+            if (res.data.status == 'succeed') {
+              this.$message({
+                type: 'success',
+                message: '保存成功'
+              })
+              this.updateWeightVisible = false
+              this.getRequestUrl()
+            } else if (res.data.status == 'failed') {
+              this.$message({
+                type: 'error',
+                message: res.data.data
+              })
+            }
+          })
+      })
+    },
+    //以下是发货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      this.axios
+        .post('/api/v1/uc/getConsigneeByLike?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            console.log(res)
+            var restaurantsConsignee = res.data.data
+            var results = queryString
+              ? restaurantsConsignee.filter(
+                  this.createFilterConsignee(queryString)
+                )
+              : restaurantsConsignee
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    //收货单位弹出层
+    handleSelectConsignee(item) {
+      this.newFactoryPutForm.consigneeId = item.consigneeId
+      item.consigneeCompanyName = this.newFactoryPutForm.consigneeCompanyName
+    },
+    createFilterConsignee(queryString) {
+      return restaurantsConsignee => {
+        return (
+          restaurantsConsignee.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        )
+      }
+    },
+    addMaterial() {
+      this.option2.requestUrl =
+        '/api/v1/uc/getSteelMaterial?apiId=244&i=' + new Date()
+      this.materialNameText = null
+      this.materialSpecificationText = null
+      this.materialTable = true
+    },
+    //物资模态框查询
+    onclick() { 
+      this.option2.requestUrl =
+        '/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=' +
+        this.materialNameText +
+        '&materialSpecificationText=' +
+        this.materialSpecificationText
+    },
+    makeSelectMaterial(){
+      if(!this.newFactoryPutForm.materialId || this.newFactoryPutForm.materialId == null || this.newFactoryPutForm.materialId == ''){
+        this.$message({
+                type: 'error',
+                message: '请选择物资!'
+              })
+      } else {
+        this.materialTable = false
+      }
+    },
+    selectionChange(row){
+      this.newFactoryPutForm.materialId = row.materialId
+      this.newFactoryPutForm.materialName = row.materialName
+      this.newFactoryPutForm.materialSpecification = row.materialSpecification
+      this.newFactoryPutForm.materialModel = row.materialModel
+      this.newFactoryPutForm.materialCode = row.materialCode
+      this.newFactoryPutForm.materialNameView = ''
+      if(this.newFactoryPutForm.materialId && this.newFactoryPutForm.materialId != null && this.newFactoryPutForm.materialId != ''){
+        this.newFactoryPutForm.materialNameView = this.newFactoryPutForm.materialName + this.newFactoryPutForm.materialSpecification +
+          '(' + this.newFactoryPutForm.materialModel + ')';
+        this.newFactoryPutForm.materialNumber = null;
+        this.newFactoryPutForm.singleWeight = null;
+        this.newFactoryPutForm.theoryWeight = null;
+        this.newFactoryPutForm.netWeight = null;
+      }
+      if(this.newFactoryPutForm.materialName != null && this.newFactoryPutForm.materialName.indexOf("定尺") > 0){
+        this.isDisabledMeter = true;
+        this.isDisabledsingleWeight = true;
+      } else {
+        this.isDisabledMeter = false;
+        this.isDisabledsingleWeight = false;
+      }
+    },
+    putNewFactory(){
+      this.$confirm('确定保存入库吗?', '提示', {
+        type: 'warning'
+      }).then(() => {
+        this.newFactoryPutForm.userId = getCookie('userId')
+        //this.newFactoryPutForm.materialNumber = this.newFactoryPutFormmaterialNumber
+        //this.newFactoryPutForm.singleWeight = this.newFactoryPutFormsingleWeight
+        //this.newFactoryPutForm.theoryWeight = this.newFactoryPutFormtheoryWeight
+        //this.newFactoryPutForm.netWeight = this.newFactoryPutFormnetWeight
+        this.axios
+          .post('/api/v1/wms/putNewFactory', this.newFactoryPutForm)
+          .then(res => {
+            if (res.data.status == 'succeed') {
+              this.$message({
+                type: 'success',
+                message: '保存成功'
+              })
+              this.newFactoryAddView = false
+              this.getRequestUrl()
+            } else if (res.data.status == 'failed') {
+              this.$message({
+                type: 'error',
+                message: res.data.data
+              })
+            }
+          })
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.oYeRealTimeInventory {
+  .search {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
+}
+</style>

+ 1652 - 0
src/views/SIDEWMS/components/oYeTransPlan.vue

@@ -0,0 +1,1652 @@
+<template>
+  <div class="oYeTransPlan">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="制单时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="制单时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+
+        <el-form-item
+          ><el-button type="primary" @click="search">查询</el-button>
+          <el-button type="primary" @click="insert">新增</el-button>
+          <el-button
+            type="primary"
+            @click="approve"
+            v-privilege="activeMenu + 'submit'"
+            >提交</el-button
+          >
+          <el-button
+            type="primary"
+            @click="approve"
+            v-privilege="activeMenu + 'approve'"
+            >审核</el-button
+          >
+          <el-button type="danger" @click="deleteOrder">删除</el-button>
+          <el-button type="primary">
+            <el-upload
+              class="upload-excel"
+              action=""
+              :on-change="importExcel"
+              :show-file-list="false"
+              accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+              :auto-upload="false"
+            >
+              导入Excel</el-upload
+            >
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 未上报 -->
+        <el-tab-pane label="待审核" name="first">
+          <dilTable
+            v-bind.sync="approvingOptions"
+            ref="excelDom"
+            @selection-change="approvingOptionsSelectionChange"
+            :pageSize="200"
+            :max-height="500"
+            :showSummaryList="showSummaryList"
+            :isshowSummary="true"
+            :showIndex="false"
+          >
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已审批 -->
+        <el-tab-pane label="已审核" name="two">
+          <dilTable
+            v-bind.sync="approvedOptions"
+            ref="table"
+            :pageSize="200"
+            :max-height="500"
+            @selection-change="approvingOptionsSelectionChange"
+            :showSummaryList="showSummaryList"
+            :isshowSummary="true"
+            :showIndex="false"
+          >
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <div class="dialog">
+      <el-dialog
+        :title="title"
+        :visible.sync="dialogVisible"
+        width="80%"
+        fullscreen
+      >
+        <el-divider>计划主体信息</el-divider>
+        <el-form :model="planForm" ref="form" :inline="true">
+          <el-form-item label="发货单位">
+            <el-input v-model="planForm.shipperName" disabled></el-input>
+          </el-form-item>
+          <el-form-item label="收货单位" prop="receiveId">
+            <el-select
+              v-model="planForm.receiveId"
+              style="width:auto"
+              clearable
+            >
+              <el-option
+                v-for="item in consigneeInfo"
+                :label="item.label"
+                :value="item.value"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="片区" prop="saleRemark">
+            <el-select
+              v-model="planForm.saleRemark"
+              style="width:auto"
+              :disabled="planForm.receiveId == null ? true : false"
+              clearable
+            >
+              <el-option
+                v-for="item in saleAreaInfo"
+                :label="item.label"
+                :value="item.value"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="业务员">
+            <el-select v-model="planForm.saleMan" style="width:auto" clearable>
+              <el-option
+                v-for="item in saleMans"
+                :label="item.label"
+                :value="item.value"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="是否自提">
+            <el-select
+              v-model="planForm.isSelfMention"
+              style="width:auto"
+              clearable
+            >
+              <el-option label="是" value="是" :key="1"> </el-option>
+              <el-option label="否" value="否" :key="0"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              @click="checkRealTimeInventory"
+              :disabled="
+                planForm.receiveId == null || planForm.saleRemark == null
+                  ? true
+                  : false
+              "
+              >浏览实时库存</el-button
+            >
+          </el-form-item>
+        </el-form>
+        <el-divider>客户详细信息</el-divider>
+        <el-form :inline="true">
+          <el-form-item label="省">
+            <el-select
+              v-model="planForm.province"
+              filterable
+              placeholder="请选择"
+              @change="onchangeProvince"
+              :disabled="planForm.saleRemark == null"
+              no-data-text="无匹配项,请维护片区与直发城市对应关系"
+              no-match-text="请维护片区与该城市对应关系"
+            >
+              <el-option
+                v-for="item in provinceList"
+                :key="item.id"
+                :label="item.addressProvince"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="市">
+            <el-select
+              v-model="planForm.city"
+              filterable
+              placeholder="请选择"
+              @change="onchangeCity"
+              :disabled="planForm.province == null ? true : false"
+              no-data-text="无匹配项,请维护片区与直发城市对应关系"
+              no-match-text="请维护片区与该城市对应关系"
+            >
+              <el-option
+                v-for="item in cityList"
+                :key="item.id"
+                :label="item.addressDistrict"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="县">
+            <el-select
+              v-model="planForm.county"
+              filterable
+              placeholder="请选择"
+              @change="onchangeCounty"
+              :disabled="planForm.city == null ? true : false"
+              no-data-text="请维护片区与直发城市对应关系"
+              no-match-text="请维护片区与该城市对应关系"
+            >
+              <el-option
+                v-for="item in countyList"
+                :key="item.id"
+                :label="item.addressTown"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="详细地址">
+            <el-autocomplete
+              class="inline-input"
+              v-model="planForm.place"
+              :fetch-suggestions="querySearch1"
+              placeholder="请输入具体收货地址"
+              :trigger-on-focus="false"
+              :disabled="planForm.county == null ? true : false"
+            >
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item label="收货客户电话">
+            <el-input
+              style="width: 150px"
+              v-model="planForm.saleOrderConsigneeTel"
+              placeholder="(非必填)"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="备注">
+            <el-input
+              style="width: 150px"
+              v-model="planForm.truckRemark"
+              placeholder="(非必填)"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <el-divider>物资信息</el-divider>
+        <el-table
+          :data="materialList"
+          border
+          style="width: 100%"
+          highlight-current-row
+          ref="materialTableTop"
+          id="table"
+        >
+          <el-table-column
+            v-for="(item, i) in materialTableTop"
+            :key="i"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+          >
+            <!-- 插入输入框 -->
+            <template slot-scope="scope">
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput111"
+                  type="number"
+                  v-model.number="scope.row.orderPlanWeight"
+                  placeholder="(必填)"
+                ></el-input>
+              </template>
+              <!-- 米数 -->
+              <template v-else-if="item.prop == 'meterNumber'">
+                <el-input
+                  v-if="scope.row.haveMeter == 1"
+                  class="textinput111"
+                  v-model="scope.row.meterNumber"
+                  placeholder="(必填)"
+                  :disabled="scope.row.isDisable == 1"
+                ></el-input>
+              </template>
+              <!-- 分装车数 -->
+              <template v-else-if="item.prop == 'carNumber'">
+                <el-input
+                  v-if="materialList.length == 1"
+                  class="textinput111"
+                  v-model.number="scope.row.carNumber"
+                  placeholder="(非必填)"
+                ></el-input>
+              </template>
+              <!-- 是否磅重销售 -->
+              <template v-else-if="item.prop == 'isPound'">
+                <el-select
+                  v-model="scope.row.isPound"
+                  placeholder="请选择"
+                  style="width:65px"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.values2"
+                    :label="item.label2"
+                    :value="item.values2"
+                  >
+                  </el-option>
+                </el-select>
+              </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.native.prevent="
+                  deleteMaterialRow(scope.$index, materialList)
+                "
+                type="text"
+                icon="el-icon-close"
+                size="big"
+              ></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div
+          style="display: flex;justify-content: space-around;align-items: center;margin-top: 10px;"
+        >
+          <el-button type="primary" class="btn" @click="singleDistribute"
+            >单拼分配到每车</el-button
+          >
+          <el-button type="primary" class="btn" @click="createACar"
+            >添加到订单</el-button
+          >
+        </div>
+        <el-divider>排车信息</el-divider>
+        <el-table
+          :data="selectionList"
+          border
+          style="width: 100%"
+          :span-method="cellMerge"
+          highlight-current-row
+        >
+          <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="scope">
+              <template v-if="item.slot">
+                <!-- 物资名称 -->
+                <template v-if="item.prop == 'materialName'">
+                  <el-input
+                    style="width: 200px"
+                    v-model="scope.row.materialName"
+                    disabled
+                  >
+                  </el-input>
+                  <!--更改-->
+                </template>
+                <!--规格型号-->
+                <template v-if="item.prop == 'Specification'">
+                  <el-input
+                    style="width: 120px"
+                    class="textinput"
+                    v-model.number="scope.row.Specification"
+                  ></el-input>
+                </template>
+                <!-- 物资件数 -->
+                <template v-if="item.prop == 'orderPlanWeight'">
+                  <el-input
+                    class="textinput"
+                    v-model.number="scope.row.orderPlanWeight"
+                  ></el-input>
+                </template>
+                <!-- 米数 -->
+                <template v-if="item.prop == 'meterNumber'">
+                  <el-input
+                    v-if="scope.row.haveMeter == 1"
+                    class="textinput"
+                    v-model="scope.row.meterNumber"
+                    :disabled="scope.row.isDisable == 1"
+                  ></el-input>
+                </template>
+                <!-- 是否磅重销售 -->
+                <template v-if="item.prop == 'isPound'">
+                  <el-select
+                    v-model="scope.row.isPound"
+                    placeholder="请选择"
+                    style="width:65px"
+                  >
+                    <el-option
+                      v-for="item in options2"
+                      :key="item.values2"
+                      :label="item.label2"
+                      :value="item.values2"
+                    >
+                    </el-option>
+                  </el-select>
+                </template>
+                <!-- 收货地址id -->
+                <template v-if="item.prop == 'saleShipperAddressName'">
+                  <el-input
+                    style="width: 250px"
+                    v-model="scope.row.saleShipperAddressName"
+                    disabled
+                  >
+                  </el-input>
+                  <!--增加-->
+                </template>
+                <!-- 收货客户电话号码 -->
+                <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                  <el-input
+                    class="textinput5"
+                    placeholder="(必填)"
+                    v-model.number="scope.row.saleOrderConsigneeTel"
+                    @change="batchUpdateValue(scope.row, scope.$index)"
+                  ></el-input>
+                </template>
+                <template v-if="item.prop == 'truckRemark'">
+                  <el-input
+                    class="textinput5"
+                    placeholder="(非必填)"
+                    v-model.number="scope.row.truckRemark"
+                    @change="batchUpdateValue(scope.row, scope.$index)"
+                  ></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.native.prevent="deleteRow(scope.$index, selectionList)"
+                type="text"
+                icon="el-icon-close"
+                size="big"
+              ></el-button>
+              <el-button
+                @click.native.prevent="copyRow(scope.$index, scope.row)"
+                type="text"
+                size="big"
+                >复制为一车</el-button
+              >
+              <el-button
+                @click.native.prevent="copyRowflu(scope.$index, scope.row)"
+                type="text"
+                size="big"
+                >复制为分录</el-button
+              >
+            </template>
+          </el-table-column>
+          <el-table-column fixed="right" width="80">
+            <template slot-scope="scope">
+              <el-button
+                @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
+                type="text"
+                size="big"
+                >复制整车</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+        <div
+          style="display: flex;justify-content: center;align-items: center;margin-top: 10px;"
+        >
+          <el-button type="primary" @click="makeSureAddOrder"
+            >确定新增</el-button
+          >
+        </div>
+      </el-dialog>
+      <el-dialog title="实时库存信息" :visible.sync="drawer" width="80%">
+        <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
+              placeholder="请输入物资名称或型号"
+              v-model="materialNameText"
+              clearable
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">规格</label>
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder="请输入内容"
+              v-model="materialSpecificationText"
+              clearable
+              ><template slot="prepend">Φ</template></el-input
+            >
+          </el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclickRealTimeInventory"
+            style="margin-left: 4px;"
+            ><i class="el-icon-search"></i>查询</el-button
+          >
+          <el-button type="primary" @click="makeSureMaterial"
+            ><i class="el-icon-check"></i>确定</el-button
+          >
+        </el-form>
+        <dilTable
+          v-bind.sync="realTimeInventoryOptions"
+          @selection-change="selectionChange"
+          :showIndex="false"
+        ></dilTable>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie, formatDate } from '@/utils/util.js'
+import exportTranPlan from './exportTranPlan.js'
+import { sjTime, isIntegerNumber } from '@/utils/sharedJsFile'
+export default {
+  extends: exportTranPlan,
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
+      drawer: false,
+      dialogVisible: false,
+      activeName: 'first',
+      selectOptions: [
+        {
+          value: 'consigneeCompanyName',
+          label: '客户'
+        },
+        {
+          value: 'saleRemark',
+          label: '片区'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '装货仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'specificationModel',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      approvingOptions: {
+        requestUrl: '',
+        requestQuery: {
+          orderStatus: 0,
+          deleted: 0
+        },
+        selectionType: 'select'
+      },
+      approvedOptions: {
+        requestUrl: '',
+        requestQuery: {
+          orderStatus: 4,
+          deleted: 0
+        },
+        selectionType: 'select'
+      },
+      realTimeInventoryOptions: {
+        requestUrl: '',
+        requestQuery: {},
+        selectionType: 'select'
+      },
+      consigneeInfo: [],
+      saleAreaInfo: [],
+      saleMans: [],
+      planForm: {
+        shipperName: '四川省达州钢铁集团有限责任公司',
+        shipperId: 1,
+        filterFlag: 1,
+        receiveId: null
+      },
+      title: '新增转运计划',
+      materialList1: [],
+      materialNameText: '',
+      materialSpecificationText: '',
+      materialList: [],
+      materialTableTop: [
+        {
+          prop: 'inboundWarehouse',
+          label: '装货仓库'
+        },
+
+        {
+          prop: 'materialName',
+          label: '物资名称'
+        },
+        {
+          prop: 'meterNumber',
+          label: '米数'
+        },
+        {
+          prop: 'Specification',
+          label: '规格型号'
+        },
+        {
+          prop: 'orderPlanWeight',
+          label: '件数',
+          slot: true
+        },
+        {
+          prop: 'inventoryNumber',
+          label: '库存件数'
+        },
+        {
+          prop: 'singleWeight',
+          label: '单重'
+        },
+        {
+          prop: 'carNumber',
+          label: '分装车数',
+          slot: true
+        },
+        {
+          prop: 'isPound',
+          label: '是否磅重销售',
+          slot: true
+        }
+      ],
+      tableTop: [
+        {
+          prop: 'cxh',
+          label: '车序号',
+          width: '50px'
+        },
+        {
+          prop: 'singleWeight',
+          label: '单重'
+        },
+        {
+          prop: 'inboundWarehouse',
+          label: '装货仓库'
+        },
+        {
+          prop: 'materialName',
+          label: '物资名称',
+          width: '300px',
+          slot: true
+        },
+        {
+          prop: 'meterNumber',
+          label: '米数',
+          width: '60px',
+          slot: true
+        },
+        {
+          prop: 'Specification',
+          label: '规格型号',
+          width: '140px',
+          slot: true
+        },
+        {
+          prop: 'orderPlanWeight',
+          label: '件数',
+          width: '60px',
+          slot: true
+        },
+        {
+          prop: 'inventoryNumber',
+          label: '库存件数'
+        },
+        {
+          prop: 'isPound',
+          label: '是否磅重销售',
+          width: '80px',
+          slot: true
+        },
+        {
+          prop: 'saleShipperAddressName',
+          label: '收货地址',
+          width: '400px',
+          slot: true
+        },
+        {
+          prop: 'saleOrderConsigneeTel',
+          label: '收货客户电话',
+          width: '120px',
+          slot: true
+        },
+        {
+          prop: 'truckRemark',
+          label: '备注',
+          slot: true
+        }
+      ],
+      //是否磅重销售
+      options2: [
+        {
+          values2: 0,
+          label2: '是'
+        },
+        {
+          values2: 1,
+          label2: '否'
+        }
+      ],
+      selectionList: [],
+      spanArr: [],
+      //最大车序号数
+      maxCxh: 1,
+      //所有省
+      provinceList: [],
+      //所有市
+      cityList: [],
+      //所有的县(区)
+      countyList: [],
+      approvingList: [],
+      loginName: '',
+      orgCode: '',
+      showSummaryList: ['materialNumber', 'materialWeight'],
+      userId: '',
+      userName: '',
+      directlyCityList: [],
+      directlyProvinceList: [],
+      directlyTownList: []
+    }
+  },
+  created() {
+    this.getInfo()
+    this.getOyeConsigneeId()
+    this.getOyeSaleArea()
+    this.getAllsaleMan()
+    this.getAllProvince()
+    this.getRequestUrl()
+  },
+  watch: {
+    saleRemark(val) {
+      console.log(val, 'val')
+      this.getOyeConsigneeId({ saleArea: val })
+      this.getDirectlyCity(val)
+      //this.updateAddress(val)
+    },
+    receiveCompanyId(val) {
+      console.log(val, 'vval')
+      this.planForm.consigneeId = val
+      this.planForm.receiveCompanyId = val
+      this.getOyeSaleArea({ consigneeId: val })
+    },
+    province(val) {
+      this.onchangeProvince(val)
+    },
+    city(val) {
+      this.onchangeCity(val)
+    },
+    county(val) {
+      this.onchangeCounty(val)
+    },
+    dialogVisible(val) {
+      if (val) {
+        this.getOyeConsigneeId(this.planForm)
+        this.getOyeSaleArea()
+      } else {
+        this.planForm.receiveId = ''
+        this.planForm.consigneeId = ''
+        this.planForm.saleArea = ''
+        this.materialList = []
+        this.materialList1 = []
+        this.selectionList = []
+      }
+    },
+    directlyProvinceListLength(val) {
+      this.getAllProvince()
+    },
+    directlyCityListLength(val) {
+      this.onchangeProvince()
+    },
+    directlyTownListLength(val) {
+      this.onchangeCity()
+    }
+  },
+  computed: {
+    saleRemark() {
+      return this.planForm.saleRemark
+    },
+    receiveCompanyId() {
+      return this.planForm.receiveId
+    },
+    province() {
+      return this.planForm.province
+    },
+    city() {
+      return this.planForm.city
+    },
+    county() {
+      return this.planForm.county
+    },
+    directlyProvinceListLength() {
+      return this.directlyProvinceList.length
+    },
+    directlyCityListLength() {
+      return this.directlyCityList.length
+    },
+    directlyTownListLength() {
+      return this.directlyTownList.length
+    }
+  },
+  methods: {
+    getDirectlyCity(val) {
+      if (val == '' || val == null) {
+        return
+      }
+      this.axios
+        .post('/api/v1/rms/getDirectlySentCity?con=' + val)
+        .then(res => {
+          console.log(res, 'res')
+          this.directlyProvinceList = res.data.data
+            .map(item => {
+              return item.addressProvince
+            })
+            .filter(item => {
+              return item != '' && item != null && item != undefined
+            })
+          this.directlyCityList = res.data.data
+            .map(item => {
+              return item.addressDistrict
+            })
+            .filter(item => {
+              return item != '' && item != null && item != undefined
+            })
+          this.directlyTownList = res.data.data
+            .map(item => {
+              return item.addressTown
+            })
+            .filter(item => {
+              return item != '' && item != null && item != undefined
+            })
+          console.log(
+            this.directlyProvinceList,
+            this.directlyCityList,
+            this.directlyTownList
+          )
+        })
+    },
+    getInfo() {
+      this.loginName = getCookie('loginName')
+      this.orgCode = getCookie('orgCode')
+      this.userId = getCookie('userId')
+      this.userName = JSON.parse(getCookie('userInfo')).userName
+    },
+    getRequestUrl() {
+      this.approvingOptions.requestUrl =
+        '/api/v1/ams/getTransPlan?apiId=533&startTime=' +
+        this.startTime +
+        '&endTime=' +
+        this.endTime
+      let queryOp = {}
+      queryOp[this.screen] = [this.con]
+      queryOp[this.screen1] = [this.con1]
+      if (this.orgCode == 'shouhuokehu') {
+        queryOp['consigneeName'] = this.userName
+      }
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        queryOp['saler'] = this.loginName
+      }
+      this.approvingOptions.requestQuery = {
+        orderStatus: 0,
+        deleted: 0,
+        businessType: '500',
+        ...queryOp
+      }
+      this.approvedOptions.requestUrl =
+        '/api/v1/ams/getTransPlan?apiId=533&startTime=' +
+        this.startTime +
+        '&endTime=' +
+        this.endTime
+      this.approvedOptions.requestQuery = {
+        orderStatus: 4,
+        deleted: 0,
+        businessType: '500',
+        ...queryOp
+      }
+    },
+    search() {
+      this.getRequestUrl()
+    },
+    handleClick() {},
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      if (this.planForm.shipperAddressId != null) {
+        this.axios
+          .post(
+            '/api/v1/ams/getRealAddressByLike?addressId=' +
+              this.planForm.shipperAddressId +
+              '&index=' +
+              queryString
+          )
+          .then(res => {
+            this.isNiTui = 0
+            if (res.data.code == '200') {
+              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
+        )
+      }
+    },
+    selectionChange(selection) {
+      console.log(selection, 'selection')
+      this.materialList1 = []
+      this.materialList1 = [].concat(JSON.parse(JSON.stringify(selection)))
+    },
+    insert() {
+      this.dialogVisible = true
+      this.title = '新增转运计划'
+    },
+    getOyeConsigneeId(data = {}) {
+      if (this.orgCode == 'shouhuokehu') {
+        data.consigneeName = this.userName
+      }
+      this.axios.post('/api/v1/uc/getOyeConsigneeId', data).then(res => {
+        if (res.data.data.length == 1) {
+          this.planForm.receiveId = res.data.data[0].id
+        }
+        this.consigneeInfo = res.data.data || []
+      })
+    },
+    getOyeSaleArea(data = {}) {
+      console.log(data, 'data')
+      this.axios.post('/api/v1/uc/getOyeSaleArea', data).then(res => {
+        this.saleAreaInfo = res.data.data || []
+      })
+    },
+    //获取所有的业务员数据
+    getAllsaleMan() {
+      this.axios.get('/api/v1/uc/getSalerList').then(res => {
+        this.saleMans = res.data.data
+        if (this.orgCode == 'xiaoshouyewuyuan') {
+          this.saleMans = this.saleMans.filter(item => {
+            return item.label == this.loginName
+          })
+          if (this.saleMans.length == 1) {
+            this.planForm.saleMan = this.saleMans[0].value
+          }
+        }
+      })
+    },
+    //获取所有省数据
+    getAllProvince() {
+      this.axios
+        .post('/api/v1/uc/getAllProvince', {
+          directlyProvinceList: this.directlyProvinceList
+        })
+        .then(res => {
+          this.provinceList = res.data.data
+        })
+    },
+    //省改变
+    onchangeProvince(val) {
+      this.axios
+        .post(
+          '/api/v1/uc/getDistrictByProvince?addressProvince=' +
+            val +
+            '&i=' +
+            new Date(),
+          {
+            directlyCityList: this.directlyCityList
+          }
+        )
+        .then(res => {
+          this.cityList = res.data.data
+        })
+    },
+    //市改变
+    onchangeCity(val) {
+      this.axios
+        .post(
+          '/api/v1/uc/getTownByDistrict?addressDistrict=' +
+            val +
+            '&i=' +
+            new Date(),
+          {
+            directlyTownList: this.directlyTownList
+          }
+        )
+        .then(res => {
+          this.countyList = res.data.data
+        })
+    },
+    //县(区)改变
+    onchangeCounty() {
+      let mapValue = {
+        addressProvince: this.planForm.province,
+        addressDistrict: this.planForm.city,
+        addressTown: this.planForm.county
+      }
+      this.axios.post('/api/v1/uc/getPlaceByAllAddress', mapValue).then(res => {
+        if (res.data.data.length > 0) {
+          this.planForm.shipperAddressId = res.data.data[0].addressId
+        } else {
+          this.$message({
+            type: 'error',
+            message: '省市县区域不存在,请联系管理员维护'
+          })
+        }
+      })
+    },
+    checkRealTimeInventory() {
+      this.realTimeInventoryOptions.requestUrl =
+        '/api/v1/wms/getOyeRealTimeResult?apiId=538&i=' + new Date()
+      this.planForm.inboundAreaSide = '厂外库'
+      this.realTimeInventoryOptions.requestQuery = JSON.parse(
+        JSON.stringify(this.planForm)
+      )
+
+      this.drawer = true
+    },
+    onclickRealTimeInventory() {
+      this.planForm.inboundAreaSide = '厂外库'
+      this.realTimeInventoryOptions.requestQuery = JSON.parse(
+        JSON.stringify({
+          ...this.planForm,
+          ...{
+            materialNameText: this.materialNameText,
+            materialSpe: this.materialSpecificationText
+          }
+        })
+      )
+    },
+    //删除物资行数据
+    deleteMaterialRow(index, rows) {
+      rows.splice(index, 1)
+    },
+    //确认新增物资
+    makeSureMaterial() {
+      //记录是理重还是磅重
+      let getisPound = 1
+      this.materialList1.forEach(e => {
+        if (!e.materialSpecification) {
+          e.materialSpecification = ''
+        }
+        if (!e.materialModel) {
+          e.materialModel = ''
+        }
+        //判断物资是否为盘螺或非定尺
+        if (
+          e.materialName.includes('盘螺') ||
+          e.materialName.includes('乱尺') ||
+          e.materialName.includes('盘元') ||
+          e.materialName.includes('盘圆')
+        ) {
+          getisPound = 0
+        } else {
+          getisPound = 1
+        }
+        //若物资为带有盘螺、盘圆、盘元,默认无米数
+        let map = {}
+        map = JSON.parse(JSON.stringify(e))
+        map.isPound = getisPound
+        map.meterNumber = e.meter
+        map.inventoryNumber = e.materialNumber
+        map.Specification = `${e.materialSpe}(${e.materialModel})`
+        map.orderPlanWeight = null
+        map.carNumber = null
+
+        this.materialList.push(map)
+      })
+      console.log(this.materialList, 'materialList')
+      this.drawer = false
+      this.materialList1 = []
+      this.table1 = false
+      //初始化查询数据
+      this.materialNameText = null
+      this.materialSpecificationText = null
+      this.materialModelText = null
+    },
+    singleDistribute() {
+      console.log(this.materialList)
+      let ml = this.materialList.length
+      if (this.planForm.shipperAddressId == null) {
+        this.$message.error('请先选择收货地址')
+        return
+      }
+      if (ml == 0) {
+        this.$message.warning('请至少填入一车物资')
+        return
+      }
+      let singleArr = this.materialList
+      this.$confirm(
+        `以上${ml}车物资将分配到不同的${ml}车,确定继续分配?`,
+        '提醒',
+        {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          center: true
+        }
+      ).then(() => {
+        this.creatArtSingle(singleArr)
+      })
+      this.isNiTui = 0
+    },
+    async creatArtSingle(singleArr) {
+      let i = 0
+      singleArr.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null
+          i++
+        }
+      })
+      if (i != 0) {
+        this.$message.error('件数必填且请输入正整数')
+        return
+      }
+      this.addMaterialToSaleOrderSingle()
+    },
+    createACar() {
+      let i = 0
+      if (this.planForm.shipperAddressId == null) {
+        this.$message.error('请先选择收货地址')
+        return
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null
+          i++
+        }
+      })
+      if (i != 0) {
+        this.$message.error('件数必填且请输入正整数')
+        return
+      }
+      this.materialList.forEach(e => {
+        if (e.materialName.includes('定尺')) {
+          if (!e.meterNumber) {
+            i++
+          }
+        }
+      })
+      if (i != 0) {
+        this.$message.error('定尺必须填写米数')
+        return
+      }
+      if (
+        !this.saleOrderConsigneeTel &&
+        this.ignoreSaleOrderConsigneeTel == 0
+      ) {
+        this.$confirm(
+          '收货客户电话未填写会导致无法接收车辆发货短信, 是否继续?',
+          '提示',
+          {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }
+        )
+          .then(() => {
+            this.ignoreSaleOrderConsigneeTel = 1
+            this.addMaterialToSaleOrder()
+          })
+          .catch(() => {
+            this.$message.info('已取消!')
+          })
+      } else {
+        this.addMaterialToSaleOrder()
+      }
+      this.isNiTui = 0
+    },
+    addMaterialToSaleOrderSingle() {
+      this.materialList.forEach(e => {
+        console.log(e, 'e')
+        var addmap = {
+          cxh: this.maxCxh,
+          materialName: e.materialName,
+          Specification: e.Specification,
+          materialCode: e.materialCode,
+          orderPlanWeight: e.orderPlanWeight,
+          meterNumber: e.meterNumber,
+          isPound: e.isPound,
+          saleShipperAddressId: this.planForm.shipperAddressId,
+          inventoryNumber: e.inventoryNumber,
+          inboundWarehouse: e.inboundWarehouse,
+          inventoryId: e.inventoryId,
+          singleWeight: e.singleWeight,
+          shipperAddressId: this.planForm.shipperAddressId,
+          place: this.planForm.place,
+          saleShipperAddressName:
+            this.planForm.province +
+            this.planForm.city +
+            this.planForm.county +
+            this.planForm.place,
+          saleOrderConsigneeTel: this.planForm.saleOrderConsigneeTel,
+          truckRemark: this.planForm.truckRemark,
+          materialId: e.materialId
+        }
+        console.log(addmap)
+        this.selectionList.push(addmap)
+        //最大车序号加1
+        this.maxCxh += 1
+      })
+      this.materialList = []
+      this.getSpanArr(this.selectionList)
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1)
+          this.pos = 0
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].cxh === data[i - 1].cxh) {
+            this.spanArr[this.pos] += 1
+            this.spanArr.push(0)
+          } else {
+            this.spanArr.push(1)
+            this.pos = i
+          }
+        }
+      }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+      // if (columnIndex === 6) {
+      //   const _row = this.spanArr[rowIndex]
+      //   const _col = _row > 0 ? 1 : 0
+      //   return {
+      //     rowspan: _row,
+      //     colspan: _col
+      //   }
+      // }
+      // if (columnIndex === 7) {
+      //   const _row = this.spanArr[rowIndex]
+      //   const _col = _row > 0 ? 1 : 0
+      //   return {
+      //     rowspan: _row,
+      //     colspan: _col
+      //   }
+      // }
+      // if (columnIndex === 8) {
+      //   const _row = this.spanArr[rowIndex]
+      //   const _col = _row > 0 ? 1 : 0
+      //   return {
+      //     rowspan: _row,
+      //     colspan: _col
+      //   }
+      // }
+      // if (columnIndex === 10) {
+      //   const _row = this.spanArr[rowIndex]
+      //   const _col = _row > 0 ? 1 : 0
+      //   return {
+      //     rowspan: _row,
+      //     colspan: _col
+      //   }
+      // }
+    },
+    addMaterialToSaleOrder() {
+      console.log(this.materialList)
+      if (this.materialList.length == 0) {
+        this.$message.warning('请至少为这一车添加一个物资!')
+      } else if (!this.saleShipperAddressName && this.values == 'no') {
+        this.$message.warning('收货地址未填写!')
+      } else if (
+        this.materialList.length == 1 &&
+        this.materialList[0].carNumber != null
+      ) {
+        var eachOrderPlanWeight =
+          this.materialList[0].orderPlanWeight / this.materialList[0].carNumber
+        if (isIntegerNumber(eachOrderPlanWeight)) {
+          var e = this.materialList[0]
+          for (var i = 0; i < this.materialList[0].carNumber; i++) {
+            var addmap = {
+              cxh: this.maxCxh,
+              materialName: e.materialName,
+              Specification: e.Specification,
+              materialCode: e.materialCode,
+              orderPlanWeight: eachOrderPlanWeight,
+              meterNumber: e.meterNumber,
+              isPound: e.isPound,
+              saleShipperAddressId: this.planForm.saleShipperAddressId,
+              shipperAddressId: this.planForm.shipperAddressId,
+              inboundWarehouse: e.inboundWarehouse,
+              singleWeight: e.singleWeight,
+              inventoryId: e.inventoryId,
+              inventoryNumber: e.inventoryNumber,
+              place: this.planForm.place,
+              saleShipperAddressName:
+                this.planForm.province +
+                this.planForm.city +
+                this.planForm.county +
+                this.planForm.place,
+              saleOrderConsigneeTel: this.planForm.saleOrderConsigneeTel,
+              truckRemark: this.planForm.truckRemark,
+              materialId: e.materialId
+            }
+            this.selectionList.push(addmap)
+            //最大车序号加1
+            this.maxCxh += 1
+          }
+          //清空materialList
+          this.materialList = []
+          //调用记录每一行的合并数的方法
+          this.getSpanArr(this.selectionList)
+        } else {
+          this.$message.warning('分配件数不是整数!')
+        }
+      } else {
+        this.materialList.forEach(e => {
+          var addmap = {
+            cxh: this.maxCxh,
+            materialName: e.materialName,
+            Specification: e.Specification,
+            materialCode: e.materialCode,
+            orderPlanWeight: e.orderPlanWeight,
+            meterNumber: e.meterNumber,
+            isPound: e.isPound,
+            saleShipperAddressId: this.planForm.saleShipperAddressId,
+            shipperAddressId: this.planForm.shipperAddressId,
+            inboundWarehouse: e.inboundWarehouse,
+            singleWeight: e.singleWeight,
+            inventoryId: e.inventoryId,
+            inventoryNumber: e.inventoryNumber,
+            place: this.planForm.place,
+            saleShipperAddressName:
+              this.planForm.province +
+              this.planForm.city +
+              this.planForm.county +
+              this.planForm.place,
+            saleOrderConsigneeTel: this.planForm.saleOrderConsigneeTel,
+            truckRemark: this.planForm.truckRemark,
+            materialId: e.materialId
+          }
+          console.log(addmap)
+          this.selectionList.push(addmap)
+        })
+        //清空materialList
+        this.materialList = []
+        //最大车序号加1
+        this.maxCxh += 1
+        //调用记录每一行的合并数的方法
+        this.getSpanArr(this.selectionList)
+      }
+    },
+    //删除一车数据
+    deleteRow(index, rows) {
+      //删除车序号相同的行
+      if (this.spanArr[index] == 1) {
+        //动态调整车序号
+        rows.forEach(e => {
+          if (rows[index].cxh < e.cxh) {
+            e.cxh -= 1
+          }
+        })
+        //最大车序号减1
+        this.maxCxh -= 1
+      }
+      rows.splice(index, 1)
+      //调用记录每一行的合并数的方法
+      this.getSpanArr(this.selectionList)
+    },
+    copyRow(index, row) {
+      let copyRow = new Object()
+      Object.keys(row).forEach(key => {
+        copyRow[key] = row[key]
+      })
+      copyRow.cxh = this.maxCxh
+      this.selectionList.push(copyRow)
+      this.getSpanArr(this.selectionList)
+      this.maxCxh++
+    },
+    copyRowflu(index, row) {
+      console.log(index)
+      let copyRowflu = new Object()
+      Object.keys(row).forEach(key => {
+        copyRowflu[key] = row[key]
+      })
+      this.selectionList.splice(index + 1, 0, copyRowflu)
+      // this.selectionList.push(copyRowflu);
+      this.getSpanArr(this.selectionList)
+    },
+    copyRowfluAll(index, row) {
+      let arr = []
+      //复制整车,根据车序号去寻找相同的列
+      arr = this.selectionList.concat([]).filter((item, index) => {
+        return item.cxh == row.cxh
+      })
+      arr.forEach(e => {
+        let copyRow = new Object()
+        Object.keys(e).forEach(key => {
+          copyRow[key] = e[key]
+        })
+        copyRow.cxh = this.maxCxh
+        this.selectionList.push(copyRow)
+      })
+      this.getSpanArr(this.selectionList)
+      this.maxCxh++
+    },
+    makeSureAddOrder() {
+      console.log(this.planForm, 'pl')
+      console.log(this.selectionList, 'se')
+      if (this.selectionList.length == 0) {
+        this.$message.warning('请至少添加一车数据!')
+        return
+      }
+      let data = { ...this.planForm }
+      data.salerId = data.saleMan
+      data.mapList = this.selectionList
+      data.userName = getCookie('loginName')
+      data.businessType = '500'
+      this.axios.post('/api/v1/ams/addTransPlan', data).then(res => {
+        if (res.data.status == 'succeed') {
+          this.$message.success('添加成功!')
+          this.selectionList = []
+          this.getRequestUrl()
+          this.dialogVisible = false
+        } else {
+          this.$message.error(res.data.data)
+        }
+      })
+    },
+    approvingOptionsSelectionChange(section) {
+      this.approvingList = [].concat(section)
+    },
+    approve() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
+      let arr = this.approvingList.map(item => {
+        let map = {}
+        map.orderStatus = 4
+        map.saleOrderId = item.saleOrderId
+        map.deleted = 0
+        map.orderPlanWeight = item.materialNumber
+        map.inventoryId = item.inventoryId
+        map.userName = getCookie('loginName')
+        return map
+      })
+      this.$confirm('确认审核选中的转运计划', '提示', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定'
+      }).then(res => {
+        if (res == 'confirm') {
+          this.axios
+            .post('/api/v1/ams/approveTransPlan', {
+              userName: getCookie('loginName'),
+              mapList: arr
+            })
+            .then(res => {
+              if (res.data.status == 'succeed') {
+                this.$message.success('审核成功!')
+                this.approvingList = []
+                this.getRequestUrl()
+              } else {
+                this.$message.error(res.data.msg)
+              }
+            })
+        }
+      })
+    },
+    deleteOrder() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
+      console.log(this.approvingList, 'arr')
+      let arr = this.approvingList.map(item => {
+        let map = {}
+        map.userName = getCookie('loginName')
+        map.orderStatus = this.activeName == 'first' ? 0 : 4
+        map.saleOrderId = item.saleOrderId
+        map.deleted = 1
+        map.saleMaterialId = item.saleMaterialId
+        return map
+      })
+      this.$confirm('确认删除选中的转运计划', '提示', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定'
+      }).then(res => {
+        if (res == 'confirm') {
+          this.axios
+            .post('/api/v1/ams/approveTransPlan', {
+              userName: getCookie('loginName'),
+              mapList: arr
+            })
+            .then(res => {
+              if (res.data.status == 'succeed') {
+                this.$message.success('删除成功!')
+                this.approvingList = []
+                this.getRequestUrl()
+              } else {
+                this.$message.error(res.data.msg)
+              }
+            })
+        }
+      })
+    },
+    submit() {
+      if (this.approvingList.length == 0) {
+        this.$message.warning('请至少选择一条数据!')
+        return
+      }
+      let arr = this.approvingList.map(item => {
+        let map = {}
+        map.orderStatus = 1
+        map.saleOrderId = item.saleOrderId
+        map.deleted = 0
+        map.orderPlanWeight = item.materialNumber
+        map.inventoryId = item.inventoryId
+        map.userName = getCookie('loginName')
+
+        return map
+      })
+      this.$confirm('确认提交选中的转运计划', '提示', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定'
+      }).then(res => {
+        if (res == 'confirm') {
+          this.axios
+            .post('/api/v1/ams/approveTransPlan', {
+              userName: getCookie('loginName'),
+              mapList: arr
+            })
+            .then(res => {
+              if (res.data.status == 'succeed') {
+                this.$message.success('提交成功!')
+                this.getRequestUrl()
+              } else {
+                this.$message.error(res.data.msg)
+              }
+            })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.oYeTransPlan {
+  .search {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  /deep/ .el-divider--horizontal {
+    margin: 10px 0;
+  }
+}
+</style>

+ 5541 - 0
src/views/SIDEWMS/components/oYeTransResult.vue

@@ -0,0 +1,5541 @@
+//钢材统计报表
+<template>
+  <div class="saleSteelReports">
+    <div class="tableTop">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width:90px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:150px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width:90px"
+          >
+            <el-option
+              v-for="item in options1"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:150px"
+            v-model="input1"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select v-model="dateType" placeholder="请选择" style="width:90px">
+            <el-option label="计划日期" value="1" key="1"></el-option>
+            <el-option label="出库日期" value="2" key="2"></el-option>
+          </el-select>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width:200px"
+            :picker-options="pickerOptions"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width:200px"
+            :picker-options="pickerOptions1"
+          >
+          </el-date-picker>
+          <el-button type="primary" class="btn" @click="onclick(filterMap)">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            >下载Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="clearFilter"
+            >清除所有筛选</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="checkTrans()"
+            v-privilege="activeMenu + 'checkTrans'"
+            ><i class="el-icon-truck"></i>轨迹</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="operation()"
+            v-privilege="activeMenu + 'operation'"
+          >
+            <i class="el-icon-edit"></i>更改
+            <span>
+              <!-- || orgCode!='chengyunshang' -->
+              <el-badge
+                :value="taskAllNum"
+                :max="99"
+                :hidden="taskAllNum < 1"
+              ></el-badge>
+            </span>
+          </el-button>
+          <!-- <el-button type="primary" @click="batchoperation()"
+            ><i class="el-icon-edit"></i>批量更改</el-button
+          > -->
+          <el-button
+            type="primary"
+            @click="checkPoint()"
+            v-privilege="activeMenu + 'checkPoint'"
+            ><i class="el-icon-map-location"></i>实时路径</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="openReceive()"
+            v-privilege="activeMenu + 'openReceive'"
+          >
+            <i class="el-icon-document"></i>签收抵达</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="batchCarrier()"
+            v-privilege="activeMenu + 'batchCarrier'"
+          >
+            <i class="el-icon-share"></i>批量</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="mergeSplit()"
+            v-privilege="activeMenu + 'mergeSplit'"
+          >
+            <i class="el-icon-pie-chart"></i>
+            合并或拆分
+          </el-button>
+        </el-form-item>
+        <el-form-item
+          ><el-button
+            type="primary"
+            @click="confirmInbound"
+            v-privilege="activeMenu + 'confirmInbound'"
+            ><i class="el-icon-check"></i>出库确认</el-button
+          ></el-form-item
+        >
+        <el-form-item
+          ><el-button
+            type="primary"
+            @click="reConfirmInbound"
+            v-privilege="activeMenu + 'reConfirmInbound'"
+            ><i class="el-icon-check"></i>重新出库</el-button
+          ></el-form-item
+        >
+        <el-form-item v-privilege="activeMenu + 'more'">
+          <el-dropdown>
+            <el-button type="primary">
+              更多<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-button
+                type="primary"
+                @click="showSaleLog()"
+                v-privilege="activeMenu + 'saleLog'"
+              >
+                <i class="el-icon-pie-chart"></i>
+                操作日志
+              </el-button>
+              <el-button type="primary" @click="ctrlColumnShow">
+                <i class="el-icon-pie-chart"></i>
+                控制列显隐
+              </el-button>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-form-item>
+
+        <el-form-item>
+          <span style="width: auto;font-size: 16px;line-height: auto;"
+            >车数/件数/磅重: {{ totalCapacity }}/{{ totalNumber }}/{{
+              totalNetWeight
+            }}
+          </span>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="visibleList"
+        :span-method="objectSpanMethod"
+        ref="tableRef"
+        border
+        style="width: 100%; margin-top: 20px"
+        id="salesLogisticsStat_saleSteelReports_table"
+        :height="maxHeight"
+        :max-height="maxHeight"
+        :row-class-name="tableRowClassName"
+        @cell-click="cellClik"
+        @cell-mouse-enter="cellMouse1"
+        @cell-mouse-leave="cellLeave1"
+        @row-click="rowClick"
+        :cell-style="cellStyle"
+        @filter-change="filterChange"
+        :key="saleSteelKey"
+        @select="selectOne"
+        @selection-change="handleSelectionChange()"
+        :header-cell-style="headCellStyle"
+      >
+        <el-table-column
+          type="selection"
+          width="50"
+          label="选择"
+          align="center"
+          column-key="select"
+          key="select"
+          v-if="
+            !notRoutList.includes('select') ||
+              !columnNoRoutList.includes('选择')
+          "
+        ></el-table-column>
+
+        <el-table-column
+          width="50"
+          label="序号"
+          align="center"
+          column-key="group"
+          key="group"
+          :resizable="false"
+          v-if="!columnNoRoutList.includes('序号')"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="orderTime"
+          label="计划日期"
+          width="110px"
+          align="center"
+          column-key="orderTime"
+          key="orderTime"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('计划日期')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleMakeDate"
+          label="出库日期"
+          width="110px"
+          align="center"
+          column-key="saleMakeDate"
+          key="saleMakeDate"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('出库日期')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="outboundStatus"
+          label="出库状态"
+          width="110px"
+          align="center"
+          column-key="outboundStatus"
+          key="outboundStatus"
+          show-overflow-tooltip
+          :filters="filterOutboundStatus"
+          v-if="!columnNoRoutList.includes('是否出库')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="inventoryWarehouse"
+          label="出库库房"
+          width="110px"
+          align="center"
+          column-key="inventoryWarehouse"
+          key="inventoryWarehouse"
+          :filters="filterWarehouse"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('出库库房')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderStatus"
+          column-key="saleOrderStatus"
+          key="saleOrderStatus"
+          label="计划状态"
+          width="110px"
+          align="center"
+          :filters="filterSaleOrderStatus"
+          sortable
+          v-if="!columnNoRoutList.includes('计划状态')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="收货单位"
+          width="250px"
+          align="center"
+          column-key="consigneeName"
+          key="consigneeName"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('收货单位')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderStatus"
+          column-key="orderStatus"
+          key="orderStatus"
+          label="运单状态"
+          align="center"
+          :filters="filterorderStatus"
+          v-if="!columnNoRoutList.includes('运单状态')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderStatusActually"
+          column-key="orderStatusActually"
+          key="orderStatusActually"
+          label="订单实际状态"
+          align="center"
+          width="100"
+          :filters="filterorderStatusActually"
+          v-if="!columnNoRoutList.includes('订单实际状态')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrierName"
+          label="承运商"
+          align="center"
+          width="80px"
+          column-key="carrierList"
+          key="carrierList"
+          sortable
+          show-overflow-tooltip
+          :filters="filterCarrierList"
+          v-if="!columnNoRoutList.includes('承运商')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityNo"
+          column-key="capacityNo"
+          key="capacityNo"
+          label="车牌号"
+          align="center"
+          width="90px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('车牌号')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          column-key="materialNameList"
+          key="materialNameList"
+          label="物资名称"
+          align="center"
+          width="150px"
+          v-if="!columnNoRoutList.includes('物资名称')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpe"
+          label="物资规格"
+          column-key="materialSpe"
+          key="materialSpe"
+          align="center"
+          width="120px"
+          v-if="!columnNoRoutList.includes('物资规格')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          column-key="materialNum"
+          key="materialNum"
+          label="物资件数"
+          align="center"
+          width="50px"
+          v-if="!columnNoRoutList.includes('物资件数')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="steelMeters"
+          column-key="steelMeters"
+          key="steelMeters"
+          label="米数"
+          align="center"
+          width="50px"
+          v-if="!columnNoRoutList.includes('米数')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="singleWeight"
+          column-key="singleWeight"
+          key="singleWeight"
+          label="单重"
+          align="center"
+          width="50px"
+          v-if="!columnNoRoutList.includes('单重')"
+        >
+        </el-table-column>
+
+        <el-table-column
+          prop="materialWeight"
+          column-key="materialWeight"
+          key="materialWeight"
+          label="出库理重"
+          align="center"
+          width="50px"
+          v-if="!columnNoRoutList.includes('出库理重')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="netWeight"
+          column-key="netWeight"
+          key="netWeight"
+          label="出库净重"
+          align="center"
+          width="50px"
+          v-if="!columnNoRoutList.includes('出库净重')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleRemark"
+          column-key="saleRemark"
+          key="saleRemark"
+          label="摘要"
+          width="180px"
+          show-overflow-tooltip
+          align="center"
+          v-if="!columnNoRoutList.includes('摘要')"
+          :render-header="renderHeader"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="addressPlace"
+          label="收货地址"
+          width="250px"
+          column-key="addressPlace"
+          key="addressPlace"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('收货地址')"
+          :render-header="renderHeader"
+        >
+          <template slot-scope="scope">
+            <span
+              v-if="scope.row.addressPlace != null && scope.row.addressPlace.indexOf('新地址') >= 0"
+              style="color:red"
+              >{{ scope.row.addressPlace }}</span
+            >
+            <span v-show="scope.row.addressPlace == null || scope.row.addressPlace.indexOf('新地址') < 0">{{
+              scope.row.addressPlace
+            }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="queueStartTime"
+          column-key="queueStartTime"
+          key="queueStartTime"
+          label="排队开始时间"
+          width="130px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('排队开始时间')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="allowEnfactoryTime"
+          column-key="allowEnfactoryTime"
+          key="allowEnfactoryTime"
+          label="钢材科放行时间"
+          width="130px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('钢材科放行时间')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeTel"
+          column-key="consigneeTel"
+          key="consigneeTel"
+          label="收货客户电话"
+          width="120px"
+          align="center"
+          v-if="!columnNoRoutList.includes('收货客户电话')"
+        >
+        </el-table-column>
+
+        <el-table-column
+          prop="truckRemark"
+          column-key="truckRemark"
+          key="truckRemark"
+          label="备注"
+          width="150"
+          align="center"
+          :render-header="renderHeader"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('备注')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityTel"
+          column-key="capacityTel"
+          key="capacityTel"
+          label="司机电话"
+          width="120px"
+          align="center"
+          v-if="!columnNoRoutList.includes('司机电话')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="spellNum"
+          column-key="spellNum"
+          key="spellNum"
+          label="拼数"
+          width="120px"
+          align="center"
+          :filters="filterSpellNum"
+          v-if="!columnNoRoutList.includes('拼数')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="isPrintDelivery"
+          column-key="isPrintDelivery"
+          key="isPrintDelivery"
+          label="送货单打印"
+          align="center"
+          width="100px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('送货单打印')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="smsResultId"
+          column-key="smsResultId"
+          key="smsResultId"
+          label="短信发送"
+          width="100px"
+          align="center"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('短信发送')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="arrivalAddress"
+          column-key="arrivalAddress"
+          key="arrivalAddress"
+          label="抵达地址"
+          width="280px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('抵达地址')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="arrivalTime"
+          column-key="arrivalTime"
+          key="arrivalTime"
+          label="抵达时间"
+          width="150px"
+          v-if="!columnNoRoutList.includes('抵达时间')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="receiptAddress"
+          column-key="receiptAddress"
+          key="receiptAddress"
+          label="签收地址"
+          width="280px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('签收地址')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="receiptTime"
+          column-key="receiptTime"
+          key="receiptTime"
+          label="签收时间"
+          width="150px"
+          v-if="!columnNoRoutList.includes('签收时间')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderNo"
+          column-key="orderNo"
+          key="orderNo"
+          label="运输订单号"
+          width="180px"
+          align="center"
+          v-if="!columnNoRoutList.includes('运输订单号')"
+        >
+        </el-table-column>
+
+        <el-table-column
+          prop="saler"
+          column-key="saler"
+          key="saler"
+          label="业务员"
+          align="center"
+          v-if="!columnNoRoutList.includes('业务员')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="shipperName"
+          column-key="shipperName"
+          key="shipperName"
+          label="发货单位"
+          width="170px"
+          align="center"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('发货单位')"
+        >
+        </el-table-column>
+
+        <el-table-column
+          prop="isSelfMention"
+          column-key="isSelfMention"
+          key="isSelfMention"
+          label="是否自提"
+          align="center"
+          v-if="!columnNoRoutList.includes('是否自提')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleMaterialId"
+          column-key="saleMaterialId"
+          key="saleMaterialId"
+          label="分录ID"
+          width="200px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderNo"
+          column-key="saleOrderNo"
+          key="saleOrderNo"
+          label="转运计划号"
+          width="200px"
+          align="center"
+          v-if="!columnNoRoutList.includes('转运计划号')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderInsertUpdateRemark"
+          column-key="orderInsertUpdateRemark"
+          key="orderInsertUpdateRemark"
+          label="运输订单变更记录"
+          width="120px"
+          show-overflow-tooltip
+          v-if="!columnNoRoutList.includes('运输订单变更记录')"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialPlanNumber"
+          column-key="materialPlanNumber"
+          key="materialPlanNumber"
+          label="理论件数"
+          align="center"
+          v-if="!columnNoRoutList.includes('理论件数')"
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+    <div>
+      <vxe-modal
+        width="80%"
+        height="80%"
+        v-model="isShow3"
+        show-footer
+        show-zoom
+        class="vxeModal"
+      >
+        <div class="demo-image__preview" v-for="(item, i) in srcList" :key="i">
+          <span>{{ item.title }}</span>
+          <el-image
+            :src="item.src"
+            fit="fill"
+            :previewSrcList="previewSrcList"
+            @click.prevent.right="receiveClick(item.src, '抵达')"
+          >
+            <div slot="error" class="image-slot">
+              <span>司机未上传图片</span>
+            </div>
+          </el-image>
+        </div>
+      </vxe-modal>
+      <vxe-modal width="80%" height="80%" v-model="isShow4" show-zoom>
+        <div class="demo-image__preview" v-for="(item, i) in srcList2" :key="i">
+          <el-image
+            :src="item.src"
+            fit="fill"
+            :previewSrcList="previewSrcList2"
+            @click.prevent.right="receiveClick(item.src, '签收')"
+          >
+            <div slot="error" class="image-slot">
+              <span>司机未上传图片</span>
+            </div>
+          </el-image>
+        </div>
+      </vxe-modal>
+    </div>
+    <div class="dialog">
+      <el-dialog
+        title="运单详情"
+        :visible.sync="centerDialogVisible"
+        width="90%"
+        center
+      >
+        <div class="steelMapClass">
+          <div class="steelMapClass1">
+            <div class="steelMapClass12">
+              <span>转运计划号:</span>
+              <span>{{ steelMap.saleOrderNo }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>订单状态:</span>
+              <span>{{ steelMap.saleOrderStatus }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>业务员:</span>
+              <span>{{ steelMap.saler }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>收货单位:</span>
+              <span>{{ steelMap.consigneeName }}</span>
+            </div>
+            <div
+              class="steelMapClass13"
+              v-if="!notRoutList.includes('closeOrder')"
+            >
+              <span>车辆备注:</span>
+              <span
+                ><el-input
+                  v-model="steelMap.truckRemark"
+                  width="250px"
+                ></el-input
+              ></span>
+              <!-- <span>{{ steelMap.truckRemark }}</span> -->
+            </div>
+          </div>
+          <div class="steelMapClass2">
+            <div class="steelMapClass22">
+              <span>收货地址:</span>
+              <el-select
+                v-model="steelMap.addressProvince"
+                filterable
+                placeholder="请选择"
+                @change="onchangeProvince"
+                style="width:120px"
+                :disabled="notRoutList.includes('province')"
+              >
+                <el-option
+                  v-for="item in provinceList"
+                  :key="item.id"
+                  :label="item.addressProvince"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-select
+                v-model="steelMap.addressDistrict"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCity"
+                style="width:120px"
+                :disabled="notRoutList.includes('city')"
+              >
+                <el-option
+                  v-for="item in cityList"
+                  :key="item.id"
+                  :label="item.addressDistrict"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-select
+                v-model="steelMap.addressTown"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCounty"
+                style="width:120px"
+                :disabled="notRoutList.includes('country')"
+              >
+                <el-option
+                  v-for="item in countyList"
+                  :key="item.id"
+                  :label="item.addressTown"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-autocomplete
+                class="inline-input"
+                v-model="steelMap.place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+                style="width:250px"
+                :disabled="notRoutList.includes('place')"
+              >
+              </el-autocomplete>
+              <el-button
+                type="success"
+                circle
+                @click="addAddressClick"
+                v-if="!notRoutList.includes('addressClick')"
+                >提交</el-button
+              >
+            </div>
+            <div
+              class="steelMapClass23"
+              v-if="
+                (steelMap.carStatus == 4 ||
+                  steelMap.carStatus == 5 ||
+                  steelMap.carStatus == null) &&
+                  !notRoutList.includes('closeOrder')
+              "
+            ></div>
+            <div
+              class="steelMapClass23"
+              v-if="
+                steelMap.carStatus == 7 && !notRoutList.includes('closeOrder')
+              "
+            >
+              <el-button type="danger" round @click="reverseCloseOrder"
+                >反关闭运单</el-button
+              >
+            </div>
+            <div v-if="!notRoutList.includes('closeOrder')">
+              <el-button round @click="resetPrintNumber"
+                >重置打印次数</el-button
+              >
+            </div>
+          </div>
+          <div class="steelMapClass3">
+            <div class="steelMapClass32">
+              <span>收货客户电话:</span>
+              <el-input
+                v-model="steelMap.consigneeTel"
+                style="width:150px"
+                :disabled="notRoutList.includes('consigeeTel')"
+              ></el-input>
+              <el-button
+                type="success"
+                circle
+                @click="updateconsigneeTel"
+                v-if="!notRoutList.includes('consigeeTel')"
+                >提交</el-button
+              >
+            </div>
+            <div class="steelMapClass33">
+              <span>承运商:</span>
+              <el-autocomplete
+                style="width:120px"
+                v-model="steelMap.carrierName"
+                :fetch-suggestions="querySearchCarrier"
+                placeholder="请输入承运商"
+                @select="handleSelectCarrier"
+                :disabled="notRoutList.includes('carrierName')"
+              >
+              </el-autocomplete>
+              <el-button
+                type="success"
+                circle
+                @click="updateTruckCarrierDebounce"
+                v-if="!notRoutList.includes('carrierName')"
+                >提交</el-button
+              >
+            </div>
+            <div class="steelMapClass33">
+              <span>车牌号:</span>
+              <el-autocomplete
+                style="width:120px"
+                v-model="steelMap.capacityNo"
+                :fetch-suggestions="querySearch"
+                placeholder="请输入车牌号"
+                @select="handleSelect()"
+                :disabled="
+                  notRoutList.includes('capacityNo') &&
+                    steelMap.capacityId != null &&
+                    steelMap.capacityNoFlag != null
+                "
+              ></el-autocomplete>
+              <el-button
+                type="success"
+                circle
+                @click="updateCapacityDebounce"
+                v-if="
+                  !(
+                    notRoutList.includes('capacityNo') &&
+                    steelMap.capacityId != null &&
+                    steelMap.capacityNoFlag != null
+                  )
+                "
+                >提交</el-button
+              >
+              <span v-show="orgCode != 'chengyunshang'">是否校验GPS:</span>
+              <el-switch
+                v-model="isCheckGPS"
+                v-show="orgCode != 'chengyunshang'"
+                :disabled="orgCode == 'chengyunshang'"
+              >
+              </el-switch>
+            </div>
+            <div class="steelMapClass33">
+              <span>司机电话:</span>
+              <el-input
+                style="width:120px"
+                v-model="steelMap.capacityTel"
+                placeholder="请输入电话号码"
+              ></el-input>
+              <el-button type="success" circle @click="updateDriverTel"
+                >提交</el-button
+              >
+            </div>
+          </div>
+          <div class="steelMapClass4">
+            <div class="steelMapClass42" v-if="steelMap.orderNo != null">
+              <span>运输订单号:</span>
+              <span>{{ steelMap.orderNo }}</span>
+            </div>
+            <div class="steelMapClass43">
+              <span>运单状态:</span>
+              <span>{{ steelMap.orderStatus }}</span>
+            </div>
+            <div
+              class="steelMapClass43"
+              v-if="steelMap.orderStatusTime != null"
+            >
+              <span>状态更新时间:</span>
+              <span>{{ steelMap.orderStatusTime }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass9">
+            <div
+              class="steelMapClass92"
+              v-if="
+                steelMap.orderNo != null && !notRoutList.includes('closeOrder')
+              "
+            >
+              <el-form :inline="true">
+                <el-form-item>
+                  <el-input
+                    v-model="steelMap.remark"
+                    placeholder="填写备注"
+                    class="steelMapClass921"
+                    type="textarea"
+                    autosize
+                  >
+                    <!-- <template slot="prepend">备注</template>
+                <template slot="prefix">
+                  {{ steelMap.remark }}
+                </template> -->
+                  </el-input></el-form-item
+                >
+                <el-form-item>
+                  <el-button @click="openRemarkPic" type="primary"
+                    >备注图片</el-button
+                  >
+                </el-form-item>
+              </el-form>
+            </div>
+          </div>
+          <div class="steelMapClass5">
+            <div class="steelMapClass52" v-if="steelMap.arrivalAddress != null">
+              <span>抵达地址:</span>
+              <span>{{ steelMap.arrivalAddress }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass6">
+            <div class="steelMapClass62" v-if="steelMap.receiptAddress != null">
+              <span>签收地址:</span>
+              <span>{{ steelMap.receiptAddress }}</span>
+            </div>
+          </div>
+        </div>
+        <div class="table1">
+          <el-table
+            :data="steelMap.mapList"
+            border
+            style="width: 100%; margin-top: 20px"
+            :span-method="objectSpanMethod1"
+          >
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+              width="150px"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpe"
+              label="物资规格"
+              align="center"
+              sortable
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialNum"
+              label="物资件数"
+              align="center"
+              width="200px"
+            >
+              <template slot-scope="scope">
+                <button
+                  type="primary"
+                  @click="scope.row.materialNumber--"
+                  style="height:40px"
+                  v-privilege="activeMenu + 'editMaterialNum'"
+                >
+                  -
+                </button>
+                <input
+                  v-model="scope.row.materialNumber"
+                  style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
+                  :disabled="true"
+                />
+                <button
+                  type="primary"
+                  @click="scope.row.materialNumber++"
+                  style="height:40px"
+                  v-privilege="activeMenu + 'editMaterialNum'"
+                >
+                  +
+                </button>
+                <el-button
+                  type="primary"
+                  @click="updateBillOrder(scope.row)"
+                  v-privilege="activeMenu + 'editMaterialNum'"
+                  >提交</el-button
+                >
+              </template>
+            </el-table-column>
+            <el-table-column prop="loadTime" label="装货时间" width="130px">
+            </el-table-column>
+            <el-table-column prop="saleRemarkByasm" label="摘要" width="100px">
+            </el-table-column>
+          </el-table>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="centerDialogVisible = false">返 回</el-button>
+          <el-button @click="submitSteelDebounce(steelMap)">确定</el-button>
+        </span>
+        <div>
+          <vxe-modal
+            width="549px"
+            height="731px"
+            v-model="isShow"
+            show-zoom
+            show-footer
+            class="vxeModal"
+            title="抵达上传照片"
+          >
+            <div class="demo-image__preview">
+              <div
+                class="demo-image__preview"
+                v-for="(item, index) in srcList"
+                :key="index"
+              >
+                <span>{{ item.title }}</span>
+                <el-image
+                  style="height:731px;text-align:center"
+                  :src="item.src"
+                >
+                  <div slot="error" class="image-slot">
+                    <span>司机未上传抵达图片</span>
+                  </div>
+                </el-image>
+              </div>
+            </div>
+          </vxe-modal>
+          <vxe-modal
+            width="549px"
+            height="731px"
+            v-model="isShow2"
+            show-zoom
+            show-footer
+            title="签收上传照片"
+          >
+            <div
+              class="demo-image__preview"
+              v-for="(item, index) in srcList2"
+              :key="index"
+            >
+              <span>{{ item.title }}</span>
+              <el-image style="height:731px;text-align:center" :src="item.src">
+                <div slot="error" class="image-slot">
+                  <span>司机未上传签收图片</span>
+                </div>
+              </el-image>
+            </div>
+          </vxe-modal>
+        </div>
+      </el-dialog>
+    </div>
+    <div style="height: 100%">
+      <vxe-modal
+        width="1237"
+        height="731"
+        v-model="value7"
+        show-zoom
+        resize
+        title="轨迹查询"
+      >
+        <template #default>
+          <PathView v-bind.sync="pathOption"></PathView>
+        </template>
+      </vxe-modal>
+    </div>
+    <div style="height:100%">
+      <vxe-modal
+        width="1237"
+        height="731"
+        v-model="value8"
+        show-zoom
+        resize
+        title="实时路径"
+        ><currentLocation :carNumber="carNumber"></currentLocation
+      ></vxe-modal>
+    </div>
+    <el-dialog
+      title="抵达签收"
+      :visible.sync="arrivalReceiving"
+      :before-close="closeUpload"
+    >
+      <el-form style="margin-left:20%">
+        <el-form-item label="车牌号码">
+          <el-input
+            v-model="capacityNumber"
+            disabled
+            style="width:300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="签收地址">
+          <el-input
+            v-model="location"
+            style="width:400px"
+            :disabled="orgCode != 'wuliuyunshubu'"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="抵达时间">
+          <el-date-picker
+            v-model="arrivalTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="签收时间">
+          <el-date-picker
+            v-model="receiptTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="抵达图片(车头、满货箱)" style="">
+          <el-upload
+            ref="arrival"
+            list-type="picture-card"
+            :file-list="arriavlList"
+            action="/api/v1/otms/addtmstruckArrivalResult"
+            :limit="12"
+            :on-change="fileChange1"
+            :on-remove="fileChange1"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="签收图片(空货箱、质保书、签收单)">
+          <el-upload
+            ref="receive"
+            list-type="picture-card"
+            :file-list="receiveList"
+            action="null"
+            :limit="11"
+            :on-change="fileChange2"
+            :on-remove="fileChange2"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <el-button
+        type="primary"
+        @click="arrivalAndReceive"
+        :loading="isLoading"
+        style="margin-left:40%"
+        >确定</el-button
+      >
+    </el-dialog>
+    <el-dialog
+      title="备注图片(图片暂存后需要点击全局确定才会保存)"
+      :visible.sync="remarkPic"
+      :before-close="closeUpload2"
+    >
+      <el-form style="margin-left:20%">
+        <el-form-item>
+          <el-upload
+            ref="remarkPic"
+            list-type="picture-card"
+            :file-list="remarkPicList"
+            action="null"
+            :limit="11"
+            :on-change="fileChange3"
+            :on-remove="fileChange3"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <el-button
+        type="primary"
+        @click="uploadRemarkPic"
+        :loading="isLoading"
+        style="margin-left:40%"
+        >暂存</el-button
+      >
+    </el-dialog>
+    <el-dialog :visible.sync="dialogVisible" width="80%">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+    <el-dialog :visible.sync="batchCarrierVisible" width="55%" center>
+      <div class="batchCarrierClass">
+        <el-form :inline="true">
+          <span>批量授权承运商</span>
+          <el-form-item>
+            <el-autocomplete
+              style="width:250px"
+              v-model="batchCarrierName"
+              :fetch-suggestions="querySearchCarrier"
+              placeholder="请输入承运商"
+              @select="handleSelectCarrier"
+            >
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="batchCarrierVisible = false">取 消</el-button>
+            <el-button type="primary" @click="batchCarrierMakeSure"
+              >确 定</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="batchCapacityClass">
+        <el-form :inline="true">
+          <span>批量修改车牌号</span>
+          <el-form-item>
+            <el-autocomplete
+              style="width:250px"
+              v-model="capacityNo"
+              :fetch-suggestions="querySearch"
+              placeholder="请输入车牌号"
+              @select="batchCapacitySelect"
+            >
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="batchCarrierVisible = false">取 消</el-button>
+            <el-button type="primary" @click="batchEditCapacity"
+              >确 定</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="steelMapClass22">
+        <span>收货地址:</span>
+        <el-select
+          v-model="steelMap.addressProvince"
+          filterable
+          placeholder="请选择"
+          @change="onchangeProvince"
+          style="width:120px"
+          :disabled="notRoutList.includes('province')"
+        >
+          <el-option
+            v-for="item in provinceList"
+            :key="item.id"
+            :label="item.addressProvince"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+        <el-select
+          v-model="steelMap.addressDistrict"
+          filterable
+          placeholder="请选择"
+          @change="onchangeCity"
+          style="width:120px"
+          :disabled="notRoutList.includes('city')"
+        >
+          <el-option
+            v-for="item in cityList"
+            :key="item.id"
+            :label="item.addressDistrict"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+        <el-select
+          v-model="steelMap.addressTown"
+          filterable
+          placeholder="请选择"
+          @change="onchangeCounty"
+          style="width:120px"
+          :disabled="notRoutList.includes('country')"
+        >
+          <el-option
+            v-for="item in countyList"
+            :key="item.id"
+            :label="item.addressTown"
+            :value="item.id"
+          ></el-option>
+        </el-select>
+        <el-autocomplete
+          class="inline-input"
+          v-model="steelMap.place"
+          :fetch-suggestions="querySearch1"
+          placeholder="请输入具体收货地址"
+          :trigger-on-focus="false"
+          @select="handleSelect1"
+          style="width:250px"
+          :disabled="notRoutList.includes('place')"
+        >
+        </el-autocomplete>
+        <el-button
+          type="success"
+          circle
+          @click="batchUpdateCarAddress"
+          v-if="!notRoutList.includes('addressClick')"
+          >提交</el-button
+        >
+      </div>
+      <div class="batchCapacityClass" style="margin:30px">
+        <el-form :inline="true">
+          <el-form-item>
+            <span>批量修改收货客户电话:</span>
+            <el-input
+              v-model="consigneeTel"
+              style="width:150px"
+              :disabled="notRoutList.includes('consigeeTel')"
+            ></el-input>
+            <el-button
+              type="success"
+              circle
+              @click="batchUpdateconsigneeTel"
+              v-if="!notRoutList.includes('consigeeTel')"
+              >提交</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="切换列的显示与隐藏"
+      :visible.sync="columnShowDialog"
+      width="50%"
+      center
+      class="columnShowDialogClass"
+    >
+      <el-tabs
+        v-model="schemeMap.activeName"
+        type="card"
+        editable
+        @edit="handleTabsEdit"
+        @tab-click="columnShowTabClick"
+        tab-position="left"
+      >
+        <el-tab-pane
+          :key="index"
+          v-for="(item, index) in schemeMap.schemeList"
+          :label="item.title"
+          :name="item.name"
+        >
+          <el-form :inline="true">
+            <el-form-item>
+              <div style="border:2px,solid,green">
+                <div
+                  style="margin-left: 50%;margin-bottom: 15px;font-size: 16px;"
+                >
+                  {{ schemeMap.activeName }}
+                </div>
+                <el-transfer
+                  style="text-align: left; display: inline-block"
+                  v-model="item.columnHiddenData"
+                  :data="item.columnAllData"
+                  :titles="['显示的列', '隐藏的列']"
+                  :button-texts="['至显示列', '至隐藏列']"
+                ></el-transfer>
+              </div>
+            </el-form-item>
+          </el-form>
+          <el-form :inline="true">
+            <el-form-item>
+              <el-button @click="columnShowDialog = false">取 消</el-button>
+              <el-button type="primary" @click="columnShowOperation(item)"
+                >启用</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+      </el-tabs>
+    </el-dialog>
+    <div class="cofirmInbound">
+      <el-dialog :visible.sync="confireInboundVisible" width="90%">
+        <div
+          style="font-size: 20px;font-weight:500;display: flex;justify-content: center;align-items: center;"
+        >
+          <span>出库确认</span>
+        </div>
+        <div class="steelMapClass">
+          <div class="steelMapClass1">
+            <div
+              class="steelMapClass12"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>转运计划号:</span>
+              <span>{{ steelMap.saleOrderNo }}</span>
+            </div>
+            <div
+              class="steelMapClass12"
+              style="font-size: 18px;font-weight:500"
+            >
+              <span>订单状态:</span>
+              <span>{{ steelMap.saleOrderStatus }}</span>
+            </div>
+            <div
+              class="steelMapClass12"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>业务员:</span>
+              <span>{{ steelMap.saler }}</span>
+            </div>
+            <div
+              class="steelMapClass12"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>收货单位:</span>
+              <span>{{ steelMap.consigneeName }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass2">
+            <div
+              class="steelMapClass22"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>收货地址:</span>
+              <span>{{ steelMap.addressProvince }}</span>
+              <span>{{ steelMap.addressDistrict }}</span>
+              <span>{{ steelMap.addressTown }}</span>
+              <span>{{ steelMap.place }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass3">
+            <div
+              class="steelMapClass33"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>承运商:</span>
+              <span>{{ steelMap.carrierName }}</span>
+            </div>
+            <div
+              class="steelMapClass33"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>车牌号:</span>
+              <span>{{ steelMap.capacityNo }}</span>
+            </div>
+            <div
+              class="steelMapClass33"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>司机电话:</span>
+              <span>{{ steelMap.capacityTel }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass4">
+            <div
+              class="steelMapClass42"
+              v-if="steelMap.orderNo != null"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>运输订单号:</span>
+              <span>{{ steelMap.orderNo }}</span>
+            </div>
+            <div
+              class="steelMapClass43"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>运单状态:</span>
+              <span>{{ steelMap.orderStatus }}</span>
+            </div>
+            <div
+              class="steelMapClass43"
+              style="font-size: 16px;font-weight:500"
+            >
+              <span>厂外库</span>
+            </div>
+          </div>
+        </div>
+        <div class="table1">
+          <el-table
+            :data="steelMap.mapList"
+            border
+            style="width: 100%; margin-top: 20px"
+            :span-method="objectSpanMethod1"
+          >
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+              width="150px"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpe"
+              label="物资规格"
+              align="center"
+              sortable
+            >
+            </el-table-column>
+            <el-table-column prop="materialNum" label="物资件数" align="center">
+            </el-table-column>
+            <el-table-column prop="meter" label="米数" align="center">
+            </el-table-column>
+            <el-table-column prop="singleWeight" label="单重" align="center">
+            </el-table-column>
+            <el-table-column
+              prop="saleRemarkByasm"
+              label="摘要"
+              width="180px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column label="具体仓库名称">
+              <template slot-scope="scope">
+                <el-select v-model="scope.row.inboundWarehouse">
+                  <el-option
+                    v-for="(item, index) in oYeWarehouseList"
+                    :label="item.label"
+                    :value="item.value"
+                    :key="index"
+                  ></el-option
+                ></el-select>
+              </template>
+            </el-table-column>
+            <el-table-column label="出库净重">
+              <template slot-scope="scope">
+                <el-input
+                  v-model.number="scope.row.inboundNetWeight"
+                  type="number"
+                ></el-input>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <span
+          slot="footer"
+          class="dialog-footer"
+          style="display: flex;justify-content: center;align-items: center;"
+        >
+          <el-button @click="confireInboundVisible = false">返 回</el-button>
+          <el-button @click="confireInboundTo(steelMap)">确定</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
+import { getCookie, accMul, formatDate } from '@/utils/util.js'
+import PathView from './mapTest.vue'
+import currentLocation from './currentLocation.vue'
+import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
+export default {
+  components: {
+    PathView,
+    currentLocation
+  },
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      dateType: '1',
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
+      confireInboundVisible: false,
+      toggleRowIds: [],
+      capacityNo: null,
+      capacityId: null,
+      consigneeTel: null,
+      batchCapacityList: [],
+      batchCapacityVisible: false,
+      isShowSaleLog: false,
+      optionSaleLog: {
+        maxHeight: 400,
+        requestUrl: '/api/v1/ams/selectAllLog?apiId=522',
+        requestQuery: {
+          con: null
+        }
+      },
+      isCheckGPS: true,
+      userId: null,
+      orgCode: null,
+      taskAllNum: 0,
+      noticeInterval: null,
+      exceptionHandleVisible: false,
+      batchCarrierName: null,
+      batchCarrierVisible: false,
+      visibleList: [],
+      itemHeight: 30,
+      scrollTop: 0,
+      debounceS: false,
+      carNumber: '',
+      //弹出框
+      centerDialogVisible: false,
+      //根据车序号查询的值
+      steelMap: {},
+      //钢材子表数据
+      drawer: false,
+      isShow3: false,
+      isShow4: false,
+      input: null,
+      screen: '',
+      options: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        },
+        {
+          value: '收货地址',
+          lable: '收货地址'
+        },
+        {
+          value: '转运计划号',
+          lable: '转运计划号'
+        }
+      ],
+      input1: null,
+      screen1: '',
+      options1: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        },
+        {
+          value: '收货地址',
+          lable: '收货地址'
+        },
+        {
+          value: '转运计划号',
+          lable: '转运计划号'
+        }
+      ],
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()
+        },
+        shortcuts: [
+          {
+            text: '今天',
+            onClick(picker) {
+              picker.$emit('pick', new Date())
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '一周前',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '元年',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(0)
+              picker.$emit('pick', date)
+            }
+          }
+        ]
+      },
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()
+        },
+        shortcuts: [
+          {
+            text: '今天',
+            onClick(picker) {
+              picker.$emit('pick', new Date())
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '一周前',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '元年',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(0)
+              picker.$emit('pick', date)
+            }
+          }
+        ]
+      },
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      //取消车数
+      quxiaoCapacityNum: 0,
+      //合计吨位
+      totalNetWeight: 0,
+      tableTitle: '销售统计报表',
+      capacityList: [],
+      carrierList: [],
+      tableData: [],
+      spanArr: [],
+      pos: 0,
+      spanArr1: [],
+      spanArr2: [],
+      spanArr3: [],
+      mergeListBatch: [
+        '净重',
+        '皮重时间',
+        '皮重',
+        '毛重时间',
+        '毛重',
+        '异常操作',
+        '具体仓库名称'
+      ],
+      pos2: 0,
+      pos3: 0,
+      pos1: 0,
+      //需要合并列的名称
+      mergeList: [
+        '选择',
+        '序号',
+        '整车操作',
+        '销售订单状态',
+        '销售订单号',
+        '发货单位',
+        '司机电话',
+        '运输订单号',
+        '签收地址',
+        '签收时间',
+        '抵达地址',
+        '抵达时间',
+        '出厂时间',
+        '进厂时间',
+        '车牌号',
+        '承运商',
+        '客户',
+        '收货地址',
+        '业务员',
+        '送货单打印',
+        '收货客户电话',
+        '是否自提',
+        '订单日期',
+        '短信发送',
+        '销售片区',
+        '抵达时间',
+        '签收时间',
+        // '摘要',
+        '排队开始时间',
+        '钢材科放行时间',
+        '备注',
+        '订单变更时间',
+        '异地库接收标志',
+        '销售订单变更记录',
+        '运输订单变更记录',
+        '拼数',
+        '是否继续装',
+        '订单上传时间',
+        '收款公司'
+      ],
+      //钢材多拼车辆线路ID
+      //索引从1-10为1-10拼路线ID
+      lineSpelling: [
+        0,
+        279973,
+        279974,
+        279975,
+        279976,
+        279977,
+        279978,
+        279979,
+        279980,
+        279981,
+        279982,
+        279983
+      ],
+      tableTitle: '厂外库转运出库统计报表',
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
+      //地址输入框的值
+      addresText: '',
+      //已选中省市县
+      //具体地址
+      //省市县Id
+      addressId: null,
+      addressRow: {},
+      srcList: [],
+      previewSrcList2: [],
+      src: '',
+      isShow: false,
+      srcList2: [],
+      previewSrcList2: [],
+      isShow2: false,
+      maxHeight: 700,
+      //轨迹窗口
+      value7: false,
+      //实时路径窗口
+      value8: false,
+      pathOption: {
+        orderNumber: '',
+        capacityNumber: '',
+        startPointName: '',
+        endPointName: '',
+        statusCode: '位置'
+      },
+      saleSteelKey: false,
+      tableRowIndex: '',
+      isRowClick: 0,
+      orgCodeList: [
+        'wuliuyunshubu',
+        'dagangadmin',
+        'zidonghuabu',
+        'chengyunshang'
+      ],
+      isShowOperate: false,
+      filterConsigneeList: [],
+      filterCarrierList: [],
+      filterCapacityList: [],
+      filtermaterialNameList: [],
+      filterorderStatusActually: [],
+      filterorderStatus: [
+        { text: '未派发', value: '未派发' },
+        { text: '已派单', value: '已派单' },
+        { text: '已接单', value: '已接单' },
+        { text: '排队中', value: '排队中' },
+        { text: '已完成', value: '已完成' },
+        { text: '已关闭', value: '已关闭' }
+      ],
+      filterIsContinue: [
+        { text: '是', value: '是' },
+        { text: '否', value: '否' }
+      ],
+      filterUploadTime: [],
+      filterSpellNum: [
+        { text: '0', value: '0' },
+        { text: '1', value: '1' },
+        { text: '2', value: '2' },
+        { text: '3', value: '3' },
+        { text: '4', value: '4' },
+        { text: '5', value: '5' },
+        { text: '6', value: '6' },
+        { text: '7', value: '7' },
+        { text: '8', value: '8' },
+        { text: '9', value: '9' }
+      ],
+      filteraddressPlace: [],
+      filtermaterialSpe: [],
+      filterSaleRemark: [],
+      filterTruckRemark: [],
+      filterSaleOrderStatus: [
+        { text: '待审核', value: '待审核' },
+        { text: '已审核', value: '已审核' }
+      ],
+      filterFlStatus: [
+        {
+          text: '关闭',
+          value: '关闭'
+        },
+        {
+          text: '正常',
+          value: '正常'
+        }
+      ],
+      filterWarehouse: [
+        {
+          text: '欧冶鑫宏中心库',
+          value: '欧冶鑫宏中心库'
+        },
+        {
+          text: '欧冶巨昌中心库',
+          value: '欧冶巨昌中心库'
+        }
+      ],
+      filterOutboundStatus: [
+        {
+          text: '未出库',
+          value: '未出库'
+        },
+        {
+          text: '已出库',
+          value: '已出库'
+        }
+      ],
+      filterMap: {
+        consigneeNameList: [],
+        truckRemarkList: [],
+        saleRemarkList: [],
+        saleOrderStatusList: [],
+        materialSpeList: [],
+        addressPlaceList: [],
+        orderStatusList: [],
+        saleAreaList: [],
+        materialNameList: [],
+        carrierList: [],
+        capacityList: [],
+        orderStatusActuallyList: [],
+        outboundStatusList: []
+      },
+      //权限控制
+      notRoutList: [],
+      remarkPic: false,
+      remarkPicList: [],
+      location: null,
+      orderNumber: null,
+      capacityNumber: null,
+      arrivalReceiving: false,
+      arriavlList: [],
+      receiveList: [],
+      fileListArrival: [],
+      fileListReceive: [],
+      dialogImageUrl: '',
+      dialogVisible: false,
+      isLoading: false,
+      arrivalTime: null,
+      receiptTime: null,
+      dialogFormVisible: false,
+      addresText: null,
+      originalPriceValue: null,
+      originalAddress: null,
+      aaadrawer: false,
+      downloadCapacityNo: null,
+      batchCarrierList: [],
+      columnNoRoutList: [],
+      salerExportExcelList: [
+        '计划日期',
+        '出库库房',
+        '出库理重',
+        '出库日期',
+        '订单日期',
+        '客户',
+        '收货单位',
+        '物资名称',
+        '物资规格',
+        '物资件数',
+        '理重',
+        '出库净重',
+        '收货地址',
+        '收货客户电话',
+        '摘要',
+        '备注',
+        '车牌号',
+        '司机电话',
+        '制单日期',
+        '销售订单状态',
+        '运单状态',
+        '承运商',
+        '排队开始时间',
+        '钢材科放行时间',
+        '进厂时间',
+        '皮重时间',
+        '皮重',
+        '装货时间',
+        '毛重时间',
+        '毛重',
+        '送货单打印',
+        '出厂时间',
+        '短信发送',
+        '抵达地址',
+        '抵达时间',
+        '签收地址',
+        '签收时间',
+        '实际运价',
+        '实际运费',
+        '异地库接收标志',
+        '运输订单号',
+        '业务员',
+        '发货单位',
+        '是否自提',
+        '销售订单号',
+        '金蝶分录ID',
+        '订单变更时间',
+        '销售订单变更记录',
+        '运输订单变更记录',
+        '收款公司',
+        '理论件数'
+      ],
+      scrollUpdateSelectFlag: 0,
+      scrollLeft: 0,
+      scrollLeftFlag: 0,
+      isShowOperateYeWuYuan: false,
+      headColumnList: [],
+      columnAllData: [],
+      columnHiddenData: [],
+      consigneeCheckList: [],
+      showPopover: false,
+      schemeMap: {},
+      statusNumData: [],
+      oYeWarehouseList: [],
+      columnShowDialog: false,
+      inboundWarehouse: null
+    }
+  },
+  created() {
+    if (this.$route.query.str) {
+      let filterMap = JSON.parse(this.$route.query.str)
+      if (filterMap) {
+        this.filterMap = filterMap
+        this.startTime = filterMap.startTime
+        this.endTime = filterMap.endTime
+      }
+    }
+    this.getSteelReport = this.debounce(() => {
+      this.getSteelReportDebounce()
+    }, 100)
+    this.orgCode = getCookie('orgCode')
+    this.userId = getCookie('userId')
+    if (getCookie('orgCode') == 'chengyunshang') {
+      this.noticeInterval = setInterval(() => {
+        this.getinformation()
+      }, 1000 * 180)
+    }
+    this.getSteelReport()
+    if (getCookie('orgCode') == 'shouhuokehu') {
+      //如果是收货客户,则查询
+      this.axios
+        .post('/api/v1/uc/getColumnNoRoutList', {
+          orgCode: getCookie('orgCode'),
+          userName: getCookie('loginName'),
+          tableName: '厂外库转运报表'
+        })
+        .then(res => {
+          this.columnNoRoutList = res.data
+        })
+      this.notRoutList = ['select']
+    } else {
+      this.getColumShowHideScheme()
+    }
+    if (getCookie('orgCode') == 'ouyechangwaiku') {
+      this.inboundWarehouse = getCookie('loginName')
+    }
+    //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
+    this.updateCapacityDebounce = this.debounce(() => {
+      this.updateCapacity()
+    }, 1500)
+    this.updateTruckCarrierDebounce = this.debounce(() => {
+      this.updateTruckCarrier()
+    }, 1500)
+    this.cellMouse1 = this.debounce((row, column, cell) => {
+      this.cellMouse(row, column, cell)
+    }, 200)
+    this.cellLeave1 = this.debounce((row, column, cell) => {
+      this.cellLeave(row, column, cell)
+    }, 200)
+    this.exceptionHandleMakeSure = this.debounce(() => {
+      this.exceptionHandleMakeSure1()
+    }, 500)
+    this.submitSteelDebounce = this.debounce(obj => {
+      this.submitSteel(obj)
+    })
+  },
+  watch: {
+    visibleList: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        let standList = this.$store.state.saleSteelToggleIds
+        this.$nextTick(() => {
+          this.visibleList.forEach(e => {
+            if (standList.includes(e.saleOrderMaterialId))
+              this.$refs.tableRef.toggleRowSelection(e, true)
+          })
+        })
+      }
+    },
+    maxHeight() {
+      this.visibleList = this.tableData.slice(
+        0,
+        Math.floor(this.maxHeight / 30)
+      )
+      this.getSpanArr(this.visibleList)
+      document.querySelector(
+        '.el-table__body-wrapper .el-table__body'
+      ).style.transform = `translateY(${0}px)`
+    },
+    scrollTop: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.$nextTick(() => {
+          if (
+            val >=
+            this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight -
+              20
+          ) {
+            val =
+              this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight
+          }
+          if (val <= 0) {
+            val = 0
+          }
+          const start = Math.floor(val / 30)
+          this.visibleList = this.tableData.slice(
+            start,
+            start + Math.floor(this.maxHeight / 30)
+          )
+          this.getSpanArr(this.visibleList)
+          document.querySelector(
+            '.el-table__body-wrapper .el-table__body'
+          ).style.transform = `translateY(${val}px)`
+          this.debounceS = false
+        })
+      }
+    },
+    scrollLeft: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        this.scrollLeftFlag = 1
+      }
+    }
+  },
+  destroyed() {
+    clearInterval(this.noticeInterval)
+  },
+  computed: {},
+  mounted() {
+    this.$nextTick(() => {
+      const that = this
+      window.onresize = () => {
+        return (() => {
+          console.log('我触发了表格分辨率变化的时间')
+          that.$nextTick(() => {
+            that.maxHeight =
+              window.innerHeight -
+              document.querySelector('.tableTop').offsetHeight -
+              40
+          })
+        })()
+      }
+    })
+    this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
+      if (this.scrollLeftFlag == 1 && this.debounceS == true) {
+        this.debounceS = false
+      }
+      if (this.debounceS) return
+      this.debounceS = true
+      this.scrollTop = e.target.scrollTop
+      this.scrollLeft = e.target.scrollLeft
+      this.scrollUpdateSelectFlag = 1
+    })
+    //基础数据查询
+    this.getAllProvince()
+    //欧冶仓库
+    this.getOyeWarehouse()
+  },
+  activated() {
+    this.maxHeight =
+      window.innerHeight - document.querySelector('.tableTop').offsetHeight - 40
+  },
+  methods: {
+    getOyeWarehouse() {
+      this.axios
+        .post(
+          '/api/v1/ams/getOyeWarehouseSide?apiId=532&pageNum=1&pageSize=100&i=' +
+            new Date()
+        )
+        .then(res => {
+          this.oYeWarehouseList = res.data.data.list.map(item => {
+            let map = {}
+            map.label = item.warehouseName
+            map.value = item.warehouseName
+
+            return map
+          })
+          if (getCookie('orgCode') == 'ouyechangwaiku') {
+            this.oYeWarehouseList = this.oYeWarehouseList.filter(item => {
+              return item.remark == JSON.parse(getCookie('userInfo')).userName
+            })
+            this.steelMap.inboundWarehouse = getCookie('loginName')
+          }
+        })
+    },
+    confireInboundTo(item) {
+      console.log(item, 'item')
+      let flag = 1
+      let arr = item.mapList.map(e => {
+        let map = {}
+        map = JSON.parse(JSON.stringify(e))
+        map.capacityId = item.capacityId
+        map.capacityNumber = item.capacityNo
+        map.consigneeId = e.consigneeId
+        map.saleNo = item.saleOrderNo
+        map.inboundWarehouse = e.inboundWarehouse
+        map.inboundArea = '厂外库'
+        map.orderId = item.orderId
+        map.meter = e.meter
+        map.netWeight = e.inboundNetWeight
+        map.materialNumber = e.materialNumber
+        if (e.isPoundSale == 1) {
+          let theoryWeight = accMul(map.materialNumber, e.singleWeight)
+          map.theoryWeight = theoryWeight
+        }
+        map.materialId = e.materialId
+        map.saleMaterialId = e.saleMaterialId
+        map.saleArea = e.saleRemarkByasm
+        console.log(map.saleRemarkByasm, 'map.saleRemarkByasm ')
+        map.userName = getCookie('loginName')
+        map.isPoundSale = e.isPoundSale
+        map.inventoryId = e.inventoryId
+        if (map.isPoundSale == 0) {
+          //为0则为磅重销售,则将净重转为理重
+          map.theoryWeight = e.inboundNetWeight
+        }
+        return map
+      })
+      console.log(arr, 'arr')
+      this.confireInboundToWms(arr)
+    },
+    confireInboundToWms(data) {
+      this.axios
+        .post('/api/v1/wms/insertOyeOutboundResult', {
+          orderId: data[0].orderId,
+          reUpdateOutBound: this.steelMap.reUpdateOutBound,
+          mapList: data
+        })
+        .then(res => {
+          if (res.data.status == 'succeed') {
+            this.$message({
+              type: 'success',
+              message: res.data.data
+            })
+            this.confireInboundVisible = false
+            this.onclick(this.filterMap)
+          } else {
+            this.$message({
+              type: 'error',
+              message: res.data.data
+            })
+          }
+        })
+    },
+    confirmInbound() {
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      // 将中文逗号替换为英文逗号
+      if (Object.keys(this.steelMap).length > 0) {
+        this.axios
+          .post(
+            '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
+              this.steelMap.saleOrderMaterialId
+          )
+          .then(res => {
+            this.steelMap = res.data.data
+            if (this.steelMap.queueStartTime == null) {
+              this.$message.error('未放行无法出库')
+              return
+            }
+            console.log(this.steelMap, 'this.steelMap')
+            if (getCookie('orgCode') == 'ouyechangwaiku') {
+              let inboundWarehouse = getCookie('loginName')
+              /**
+              this.steelMap.mapList = this.steelMap.mapList.filter(item => {
+                return item.inboundWarehouse == inboundWarehouse
+              })
+              */
+            }
+            this.steelMap.userName = getCookie('loginName')
+            this.confireInboundVisible = true
+            this.getSpanArr1(res.data.data.mapList)
+          })
+      }
+    },
+    reConfirmInbound() {
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      // 将中文逗号替换为英文逗号
+      if (Object.keys(this.steelMap).length > 0) {
+        this.axios
+          .post(
+            '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
+              this.steelMap.saleOrderMaterialId
+          )
+          .then(res => {
+            this.steelMap = res.data.data
+            if (getCookie('orgCode') == 'ouyechangwaiku') {
+              let inboundWarehouse = getCookie('loginName')
+              this.steelMap.mapList = this.steelMap.mapList.filter(item => {
+                return item.inboundWarehouse == inboundWarehouse
+              })
+            }
+            this.steelMap.userName = getCookie('loginName')
+            this.steelMap.reUpdateOutBound = 1
+            this.confireInboundVisible = true
+            this.getSpanArr1(res.data.data.mapList)
+          })
+      }
+    },
+    openBlank() {
+      let page = this.$router.resolve({
+        name: 'saleSteelReports',
+        query: { id: 0, e: 0 },
+        meta: {
+          title: '销售钢材报表'
+        }
+      })
+      window.open(page.href, '_blank')
+    },
+    getColumShowHideScheme() {
+      this.axios
+        .post('/api/v1/uc/getColumShowHideScheme', {
+          userName: getCookie('loginName'),
+          orgCode: getCookie('orgCode'),
+          tableName: '厂外库转运报表'
+        })
+        .then(res => {
+          this.schemeMap = res.data.data
+          this.columnNoRoutList = this.schemeMap.columnHiddenData
+        })
+        .catch(() => {
+          this.columnNoRoutList = []
+        })
+    },
+    columnShowTabClick(e) {
+      this.schemeMap.activeName = e.paneName
+    },
+    //动态渲染列的显示方案
+    handleTabsEdit(targetName, action) {
+      if (action === 'add') {
+        this.$confirm('请输入方案名称', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'info',
+          showInput: true,
+          center: true
+        })
+          .then(mes => {
+            let newTabName = mes.value
+            this.schemeMap.schemeList.push({
+              title: newTabName,
+              name: newTabName,
+              columnAllData: this.schemeMap.columnAllData,
+              columnHiddenData: []
+            })
+            this.schemeMap.activeName = newTabName
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              message: '用户取消操作'
+            })
+          })
+      }
+      if (action === 'remove') {
+        let map = {}
+        map.columnHiddenData = []
+        map.name = targetName || this.schemeMap.activeName
+        this.columnShowOperation(map)
+      }
+    },
+    //动态渲染表头
+    renderHeader(h, { column }) {
+      let renderColumnFilterList = []
+      let filterVal = ''
+      let optionList = []
+      if (column.label === '收货单位') {
+        filterVal = 'consigneeNameList'
+        renderColumnFilterList = this.filterConsigneeList
+      } else if (column.label === '车牌号') {
+        filterVal = 'capacityList'
+        renderColumnFilterList = this.filterCapacityList
+      } else if (column.label === '收货地址') {
+        filterVal = 'addressPlaceList'
+        renderColumnFilterList = this.filteraddressPlace
+      } else if (column.label === '摘要') {
+        filterVal = 'saleRemarkList'
+        renderColumnFilterList = this.filterSaleRemark
+      } else if (column.label === '备注') {
+        filterVal = 'truckRemarkList'
+        renderColumnFilterList = this.filterTruckRemark
+      } else if (column.label === '物资名称') {
+        filterVal = 'materialNameList'
+        renderColumnFilterList = this.filtermaterialNameList
+      } else if (column.label === '物资规格') {
+        filterVal = 'materialSpeList'
+        renderColumnFilterList = this.filtermaterialSpe
+      }
+      if (filterVal == '') {
+        return h('div', column.label, {})
+      }
+      return h(
+        'div',
+        {
+          style: {
+            height: 'auto',
+            color: this.filterMap[filterVal].length > 0 ? '#409EFF' : '#ffff',
+            fontWeight: this.filterMap[filterVal].length > 0 ? '700' : '400',
+            fontSize: '12px'
+          }
+        },
+        [
+          h(
+            'el-popover',
+            {
+              props: {
+                placement: 'bottom',
+                trigger: 'click',
+                value: this.showPopover
+              },
+              style: {
+                width: 'auto'
+              },
+              on: {
+                show: _ => {
+                  this.$nextTick(() => {
+                    this.$refs.filterSelectRef.focus()
+                  })
+                }
+              }
+            },
+            [
+              h('span', {
+                slot: 'reference',
+                style: 'margin-top:20px',
+                domProps: {
+                  innerHTML:
+                    column.label + '  ' + '<i class="el-icon-search""/>'
+                }
+              }),
+              this.$createElement(
+                'el-select',
+                {
+                  ref: `filterSelectRef`,
+                  style: {
+                    'margin-bottom': '10px',
+                    'border-bottom': '1px solid #efefef',
+                    'padding-bottom': '10px',
+                    width: '250px'
+                  },
+                  props: {
+                    placeholder: '请输入查询',
+                    reserveKeyword: true,
+                    filterable: true,
+                    filterMethod: e => {
+                      this.filterMethodChange(
+                        e,
+                        filterVal,
+                        renderColumnFilterList
+                      )
+                    },
+                    multiple: true,
+                    collapseTags: true,
+                    value: this.filterMap[filterVal]
+                  },
+                  on: {
+                    change: val => {
+                      if (val) {
+                        this.filterMap[filterVal] = [...new Set(val)]
+                      } else {
+                        let i = this.filterMap[filterVal].findIndex(
+                          row => row == val
+                        )
+                        this.filterMap[filterVal].splice(i, 1)
+                      }
+                    }
+                  }
+                },
+                [
+                  renderColumnFilterList.map((item, index) => {
+                    return h('el-option', {
+                      props: {
+                        label: item.text,
+                        value: item.text,
+                        key: item.text
+                      }
+                    })
+                  })
+                ]
+              ),
+              h('el-button', {
+                props: {
+                  size: 'mini'
+                },
+                on: {
+                  click: e => {
+                    this.filterMap[filterVal] = []
+                    this.onclick(this.filterMap)
+                  }
+                },
+                domProps: {
+                  innerHTML: '重置'
+                }
+              }),
+              h('el-button', {
+                props: {
+                  size: 'mini',
+                  type: 'primary'
+                },
+                on: {
+                  click: _ => {
+                    this.onclick(this.filterMap)
+                  }
+                },
+                domProps: {
+                  innerHTML: '筛选'
+                }
+              })
+            ]
+          )
+        ]
+      )
+    },
+    filterMethodChange(e, filterVal, renderColumnFilterList) {
+      this.filterMap[filterVal] = [e]
+    },
+    ctrlColumnShow() {
+      this.columnShowDialog = true
+    },
+    columnShowOperation(item) {
+      this.axios
+        .post('/api/v1/uc/updateColumnShowHidden', {
+          userName: getCookie('loginName'),
+          orgCode: getCookie('orgCode'),
+          tableName: '销售钢材报表',
+          columnHiddenData: item.columnHiddenData,
+          schemeName: item.name
+        })
+        .then(res => {
+          this.$message({
+            type: 'success',
+            message: '切换成功',
+            offset: '250'
+          })
+          this.$router.go(0)
+        })
+      this.columnShowDialog = false
+    },
+    headCellStyle({ row, column, rowIndex, columnIndex }) {
+      // console.log(row, 'row')
+      // console.log('headCellStyle column.property: ', column.property)
+      if (column.property && this.headColumnList.includes(column.property)) {
+        return { fontWeight: 700, fontSize: '15px' }
+        //return {}
+      }
+      return {}
+    },
+    clearFilter() {
+      this.$refs.tableRef.clearFilter()
+      this.headColumnList = []
+      this.filterMap = {
+        consigneeNameList: [],
+        truckRemarkList: [],
+        saleRemarkList: [],
+        saleOrderStatusList: [],
+        materialSpeList: [],
+        addressPlaceList: [],
+        orderStatusList: [],
+        saleAreaList: [],
+        materialNameList: [],
+        carrierList: [],
+        capacityList: [],
+        isContinueList: [],
+        spellNumList: []
+      }
+      this.onclick(this.filterMap)
+    },
+    submitSteel(obj) {
+      this.$confirm('该操作会修改全部改动的内容,请确认核实后点击!', '提醒', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确认',
+        center: true
+      }).then(() => {
+        let map = obj
+        map.userName = getCookie('loginName')
+        map.shipperAddressId = this.addressId
+        this.axios.post('/api/v1/uc/submitSteel', this.steelMap).then(res => {
+          let _this = this
+          if (res.data.responseMapFailed.length > 0) {
+            let responseFailTitle = res.data.responseMapFailed.join(';')
+            this.$message({
+              type: 'error',
+              duration: 2500,
+              offset: '250',
+              message: responseFailTitle
+            })
+          }
+          if (res.data.response.length == 0) {
+            setTimeout(() => {
+              _this.$message({
+                type: 'success',
+                duration: 1500,
+                offset: '250',
+                message: '未发现任何修改成功的记录!'
+              })
+            }, 2500)
+          } else {
+            let responseTitle = res.data.response.join(';')
+            setTimeout(() => {
+              _this.$message({
+                type: 'success',
+                duration: 2500,
+                offset: '250',
+                message: responseTitle
+              })
+            }, 2500)
+          }
+          this.operation(this.steelMap)
+          this.onclick(this.filterMap)
+        })
+      })
+    },
+    resetPrintNumber() {
+      this.axios
+        .post('/api/v1/bp/resetPrintNumber', this.steelMap)
+        .then(res => {
+          if (res.data.status == 'succeed') {
+            this.$message.success('重置成功!')
+          } else {
+            this.$message.error('重置失败!')
+          }
+        })
+    },
+    showBatchCapacity() {
+      this.capacityNo = null
+      this.capacityId = null
+      this.batchCapacityList = []
+      console.log(this.$refs.tableRef.selection)
+      //按照saleOrderMaterialId查询物资数量size,用于确定派车的线路ID
+      this.$refs.tableRef.selection.forEach(item1 => {
+        item1.size = this.visibleList.filter(item2 => {
+          return item1.saleOrderMaterialId == item2.saleOrderMaterialId
+        }).length
+      })
+      this.batchCapacityList = this.$refs.tableRef.selection
+      console.log(this.batchCapacityList)
+      // if (this.batchCapacityList.length > 0) {
+      //   this.batchCapacityVisible = true
+      // } else {
+      //   this.$message({
+      //     type: 'warning',
+      //     message: '请选择要批量更改车牌号的订单',
+      //     offset: '250',
+      //     duration: '2500'
+      //   })
+      // }
+    },
+    batchCapacitySelect(selection) {
+      this.capacityNo = selection.capacityNumber
+      this.capacityId = selection.capacityId
+    },
+    //批量修改车牌号
+    batchEditCapacity() {
+      if (this.capacityId && this.capacityNo) {
+        if (
+          !(
+            isVehicleNumber(this.capacityNo) ||
+            this.capacityNo == '取消' ||
+            this.capacityNo == '待定' ||
+            this.capacityNo == '空白'
+          )
+        ) {
+          this.$message.error('请输入正确格式的车牌号!')
+          return
+        }
+        console.log('this.batchCapacityList', this.batchCapacityList)
+        this.batchCapacityList.forEach(row => {
+          row.capacityId = this.capacityId
+          row.capacityNumber = this.capacityNo
+          row.capacityNo = this.capacityNo
+          //是否校验GPS
+          row.isCheckGPS = this.isCheckGPS
+          row.userId = getCookie('userId')
+          if (row.carrierIds == 0) {
+            this.$message.error('请先授权承运商!')
+            return
+          }
+          if (row.capacityIds == 0) {
+            row.lineId = this.lineSpelling[row.size]
+          }
+        })
+        let map = {
+          list: this.batchCapacityList
+        }
+        this.axios.post('/api/v1/ams/batchUpdateCapacity', map).then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('派车成功!')
+          } else {
+            this.$message.error(res.data.data)
+          }
+        })
+        this.batchCarrierVisible = false
+        this.onclick(this.filterMap)
+      } else {
+        this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
+      }
+    },
+    showSaleLog() {
+      this.isShowSaleLog = true
+      if (this.steelMap) {
+        this.optionSaleLog.requestQuery.con = this.steelMap.orderNo
+      }
+    },
+    //删除计量实绩
+    linkageDeleteTransportOrder(row, steelMap) {
+      console.log(row, 'row')
+      debugger
+      if (row.netWeight != null && row.netWeight != '') {
+        //如果净重不为空
+        let arr = []
+        let map = {
+          orderNumber: row.orderNo,
+          good: row.materialName,
+          goodspa: `${row.materialSpecification}(${row.materialModel})`,
+          resultCrossWeightTime: row.grossWeightTime,
+          saleMaterialId: row.saleMaterialId,
+          weightBatchId: row.weightBatchId,
+          userName: getCookie('loginName')
+        }
+        arr.push(map)
+        this.axios
+          .post('/api/v1/uc/linkageDeleteTransportOrder', arr)
+          .then(res => {
+            this.$message({
+              message: '删除计量实绩成功',
+              type: 'success',
+              offset: '250',
+              duration: '2500'
+            })
+            this.exceptionHandleVisible = false
+            this.onclick(this.filterMap)
+          })
+      }
+    },
+    mergeSplit() {
+      if (this.$refs.tableRef.selection.length == 1) {
+        this.$confirm(
+          `尊敬的用户${getCookie(
+            'loginName'
+          )},系统温馨提示您进行拆分操作前,请确认所拆分的订单将不会在金蝶进行提交,审核等操作!`,
+          '提醒',
+          {
+            confirmButtonText: '我已确认',
+            cancelButtonText: '我再想想',
+            center: true,
+            type: 'warning'
+          }
+        )
+          .then(() => {
+            this.splitOrder()
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              duration: '2500',
+              message: '操作取消',
+              offset: '250'
+            })
+          })
+      } else if (this.$refs.tableRef.selection.length > 1) {
+        this.$confirm(
+          `尊敬的用户${getCookie(
+            'loginName'
+          )},系统温馨提示您进行合并操作前,请确认所合并的订单将不会在金蝶进行提交,审核等操作!`,
+          '提醒',
+          {
+            confirmButtonText: '我已确认',
+            cancelButtonText: '我再想想',
+            center: true,
+            type: 'warning'
+          }
+        )
+          .then(() => {
+            this.mergeOrder()
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              duration: '2500',
+              message: '操作取消',
+              offset: '250'
+            })
+          })
+      } else {
+        this.$message({
+          type: 'warning',
+          message: '请勾选/点击需要操作的行',
+          offset: '250',
+          duration: '2300'
+        })
+      }
+    },
+    splitOrder() {
+      this.$confirm(
+        `勾选了${this.$refs.tableRef.selection.length}条运单将执行拆分操作`,
+        '提醒',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          center: true
+        }
+      )
+        .then(() => {
+          let mapList = this.$refs.tableRef.selection.map(e => {
+            let map = {}
+            map.saleOrderMaterialId = e.saleOrderMaterialId
+            return map
+          })
+          let map = {
+            mapList: mapList,
+            userName: getCookie('loginName')
+          }
+          this.axios
+            .post('/api/v1/ams/splitOrder', map)
+            .then(res => {
+              if (res.data.code == '200') {
+                this.onclick(this.filterMap)
+                this.$message({
+                  type: 'success',
+                  message: '拆分成功',
+                  offset: '250',
+                  duration: '2500'
+                })
+              } else {
+                this.$message({
+                  type: 'error',
+                  message: res.data.data,
+                  offset: '250',
+                  duration: '2500'
+                })
+              }
+            })
+            .catch(() => {
+              this.$message({
+                type: 'error',
+                message: '拆分失败',
+                offset: '250',
+                duration: '2500'
+              })
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            duration: '2500',
+            message: '操作取消',
+            offset: '250'
+          })
+        })
+    },
+    mergeOrder() {
+      this.$confirm(
+        `勾选了${this.$refs.tableRef.selection.length}条运单将执行合并操作,此操作不可逆!`,
+        '提醒',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          center: true
+        }
+      )
+        .then(() => {
+          let mapList = this.$refs.tableRef.selection.map(e => {
+            let map = {}
+            map.saleOrderMaterialId = e.saleOrderMaterialId
+            map.orderId = e.orderId
+            map.saleOrderId = e.saleOrderId
+            map.orderNo = e.orderNo
+            map.capacityNo = e.capacityNo
+            map.userName = getCookie('loginName')
+            return map
+          })
+          let map = {
+            mapList: mapList,
+            userName: getCookie('loginName')
+          }
+          this.axios
+            .post('/api/v1/ams/mergeOrder', map)
+            .then(res => {
+              if (res.data.code == '200') {
+                this.onclick(this.filterMap)
+                this.$message({
+                  type: 'success',
+                  message: '合并成功,请提醒驾驶员!',
+                  offset: '250',
+                  duration: '3000'
+                })
+              } else {
+                this.$message({
+                  type: 'error',
+                  message: res.data.data,
+                  offset: '250',
+                  duration: '2500'
+                })
+              }
+            })
+            .catch(() => {
+              this.$message({
+                type: 'error',
+                message: '合并失败',
+                offset: '250',
+                duration: '2500'
+              })
+            })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            duration: '2500',
+            message: '操作取消',
+            offset: '250'
+          })
+        })
+    },
+    //获取通知数量
+    getinformation() {
+      this.axios
+        .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
+        .then(res => {
+          let taskAllNum = 0
+          res.data.data.forEach(e => {
+            if (e.insertusername == '销售审核' && e.status == 0) {
+              taskAllNum++
+            }
+          })
+          this.taskAllNum = taskAllNum
+          console.log('未接收数目:', this.taskAllNum)
+        })
+    },
+    readAll() {
+      this.axios
+        .post('/api/v1/ams/readAll', {
+          userId: this.userId,
+          insertUserName: '销售审核'
+        })
+        .then(res => {
+          this.taskAllNum = 0
+        })
+    },
+    deleteRow(index, rows) {
+      if (rows.length > 1) {
+        rows.splice(index, 1)
+      }
+    },
+    copyRowflu(index, row) {
+      console.log(index)
+      let copyRowflu = new Object()
+      Object.keys(row).forEach(key => {
+        copyRowflu[key] = row[key]
+      })
+      delete copyRowflu.materialId
+      delete copyRowflu.netWeight
+      delete copyRowflu.grossWeight
+      delete copyRowflu.grossWeightTime
+      delete copyRowflu.tareWeight
+      delete copyRowflu.tareWeightTime
+      delete copyRowflu.loadTime
+      delete copyRowflu.closeEntryId
+      this.steelMap.mapList.splice(index + 1, 0, copyRowflu)
+    },
+    exceptionHandleMakeSure1() {
+      console.log(this.steelMap)
+      this.$confirm(
+        `该操作会将${this.steelMap.capacityNo}下未出净重的分录关闭,并重新上传金蝶,确认操作?`,
+        '提示',
+        {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          center: true
+        }
+      )
+        .then(() => {
+          let saleDateOfReceipt = null
+          let loadTime1 = new Date(
+            new Date(new Date().toLocaleDateString()).getTime() +
+              (3600 * 1000 * 8 - 1)
+          ) // 当天8点前
+          let loadTime2 = new Date(
+            new Date(new Date().toLocaleDateString()).getTime() +
+              (3600 * 1000 * 32 - 1)
+          ) // 次天8点前
+          if (new Date().getTime() - loadTime1 > 0) {
+            saleDateOfReceipt = loadTime2
+          } else {
+            saleDateOfReceipt = loadTime1
+          }
+          let closeEntryList = []
+          let map = this.steelMap
+          map.mapList.forEach(e => {
+            let map = {}
+            e.saleDateOfReceipt = sjTime(saleDateOfReceipt)
+            map.saleMaterialId = e.saleMaterialId
+            map.closeEntryId = e.closeEntryId
+            map.number = e.saleOrderNo
+            closeEntryList.push(map)
+          })
+          let mapList = map.mapList.filter(e => {
+            if (typeof e.netWeight == 'undefined' || e.netWeight == null) {
+              return e
+            }
+          })
+          if (mapList.length == 0) {
+            this.$message({
+              type: 'info',
+              message: '所有分录包含净重,退出!',
+              offset: '250',
+              duration: '2500'
+            })
+            return
+          }
+          map.mapList = mapList
+          map.isUploadEas = 1
+          this.axios
+            .post('/api/v1/ams/addSteelSaleOrder', map, {
+              timeout: 3 * 60 * 1000
+            })
+            .then(res => {
+              if (res.data.code == '200') {
+                this.axios
+                  .post('/api/v1/ams/closingEntries', closeEntryList, {
+                    timeout: 3 * 60 * 1000
+                  })
+                  .then(res => {
+                    if (res.data.code == '200') {
+                      this.onclick(this.filterMap)
+                      this.$message({
+                        type: 'success',
+                        offset: '250',
+                        message: '生成订单成功,关闭分录成功',
+                        duration: 2000
+                      })
+                      this.exceptionHandleVisible = false
+                    }
+                  })
+                  .catch(e => {})
+              } else {
+                this.$message({
+                  type: 'error',
+                  offset: '250',
+                  duration: '2500',
+                  message: '新增失败'
+                })
+              }
+            })
+        })
+        .catch(e => {
+          this.$message({
+            type: 'info',
+            message: '取消操作',
+            offset: '200',
+            duration: 2500
+          })
+        })
+    },
+    exceptionHandle() {
+      if (this.$refs.tableRef.selection.length == 1) {
+        console.log(this.$refs.tableRef.selection[0])
+        this.axios
+          .post(
+            '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
+              this.$refs.tableRef.selection[0].saleOrderMaterialId
+          )
+          .then(res => {
+            this.steelMap = res.data.data
+            this.exceptionHandleVisible = true
+            this.getSpanArr1(this.steelMap.mapList)
+          })
+      } else {
+        this.$message({
+          message: '异常处理单次仅能勾选一辆车',
+          offset: '250',
+          duration: '2500',
+          type: 'warning'
+        })
+      }
+    },
+    batchCarrierMakeSure() {
+      let batchCarrierId = null
+      this.carrierList.forEach(item => {
+        if (item.carrierName == this.batchCarrierName) {
+          batchCarrierId = item.carrierId
+        }
+      })
+      this.batchCarrierList.forEach(e => {
+        e.carrierId = batchCarrierId
+      })
+      const loading = this.$loading({
+        lock: true,
+        text: '正在批量授权承运商',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      this.axios
+        .post('/api/v1/ams/dispatchToCarrier', this.batchCarrierList)
+        .then(res => {
+          if (res.data.code == '0') {
+            this.$message.success('授权承运商成功')
+            this.batchCarrierList = []
+            this.batchCarrierVisible = false
+            this.batchCarrierName = null
+            this.onclick(this.filterMap)
+            loading.close()
+          } else {
+            this.$message.error('授权失败,请联系管理员')
+            this.batchCarrierList = []
+            this.batchCarrierVisible = false
+            this.batchCarrierName = null
+            this.onclick(this.filterMap)
+            loading.close()
+          }
+        })
+        .catch(() => {
+          this.$message.error('授权失败,请联系管理员')
+          this.batchCarrierList = []
+          this.batchCarrierVisible = false
+          this.onclick(this.filterMap)
+          loading.close()
+        })
+    },
+    batchCarrier() {
+      if (this.batchCarrierList.length > 0) {
+        this.batchCarrierVisible = true
+        this.showBatchCapacity()
+        this.onchangeProvince()
+        this.onchangeCity()
+        this.addressId = this.steelMap.shipperAddressId
+        this.consigneeTel = this.steelMap.consigneeTel
+      } else {
+        this.$message({
+          type: 'warning',
+          message: '请选择要批量授权的订单',
+          offset: '250',
+          duration: '2500'
+        })
+      }
+    },
+    selectOne(selection, row) {
+      console.log('selection:', row)
+      this.rowClick(row)
+    },
+    handleSelectionChange() {
+      console.log(this.$refs.tableRef.selection, 'selection')
+      this.batchCarrierList = []
+      this.batchCarrierList = this.$refs.tableRef.selection.map(e => {
+        let map = {}
+        map.saleOrderMaterialId = e.saleOrderMaterialId
+        return map
+      })
+      console.log(this.scrollUpdateSelectFlag)
+      if (this.scrollUpdateSelectFlag == 0) {
+        let arr = []
+        arr = Array.from(
+          this.$refs.tableRef.selection.map(e => {
+            return e.saleOrderMaterialId
+          })
+        )
+        let [...arr2] = arr
+        this.toggleRowIds = arr2
+        this.$store.commit('updateSaleSteelToggleIds', {
+          saleSteelToggleIds: arr
+        })
+      }
+    },
+    receiveClick(src, title) {
+      // this.dialogImageUrl = src
+      downloadFile(src, `${this.downloadCapacityNo}${title}照片`, 'jpg')
+      // this.dialogVisible = true
+    },
+    openRemarkPic() {
+      //获取图片到本地
+      this.axios.post('/api/v1/uc/getPicture', this.steelMap).then(res => {
+        console.log(res)
+        if (res.data) {
+          let remarkPicList = []
+          res.data.forEach((e, index) => {
+            creatImageFile(e, 'file2-' + index).then(res => {
+              remarkPicList.push({
+                name: 'file' + index,
+                raw: res,
+                url: e
+              })
+            })
+          })
+          this.remarkPicList = remarkPicList
+        } else {
+          this.remarkPicList = []
+        }
+        this.remarkPic = true
+      })
+    },
+    uploadRemarkPic() {
+      if (this.remarkPicList.length <= 0) {
+        this.$message.error('请上传图片!')
+        return
+      }
+      //上传备注图片
+      let formData = new window.FormData()
+      this.remarkPicList.forEach((item, index) => {
+        formData.append('file' + index, item.raw)
+      })
+      let options = {
+        url: '/api/v1/uc/uploadPic',
+        data: formData,
+        method: 'post',
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }
+      this.axios(options).then(res => {
+        console.log(res)
+        this.$message.success('暂存成功!')
+        this.remarkPic = false
+        this.steelMap.urls = res.data
+        this.closeUpload2()
+      })
+    },
+    closeUpload2() {
+      this.remarkPic = false
+      this.isLoading = false
+      this.$refs.remarkPic.clearFiles()
+    },
+    openReceive() {
+      this.fileListArrival = []
+      this.fileListReceive = []
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.warning('请选择需要补录的实绩')
+        return
+      }
+      let row = this.steelMap
+      if (row.arrivalAddress) {
+        //优先获取抵达地址
+        this.location = row.arrivalAddress
+      } else {
+        //其次获取车辆定位
+        this.axios
+          .get(
+            '/api/v1/otms/getCurrentLocation?capcityNumber=' + row.newCapacityNo
+          )
+          .then(res => {
+            if (
+              res.data.status == 'succeed' &&
+              res.data.data.result.status != 1001
+            ) {
+              this.location = res.data.data.result.adr
+            } else {
+              this.location = null
+              this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
+            }
+          })
+      }
+      this.orderNumber = row.orderNo
+      this.capacityNumber = row.capacityNo
+      this.arrivalTime = row.arrivalTime
+      this.receiptTime = row.receiptTime
+      this.arrivalReceiving = true
+      //抵达图片
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log('arrivalPhoto:', res)
+          if (res.data) {
+            this.arriavlList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file1-' + index).then(res => {
+                this.arriavlList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListArrival = this.arriavlList
+          }
+        })
+      //签收图片
+      this.axios
+        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNo)
+        .then(res => {
+          if (res.data) {
+            this.receiveList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file2-' + index).then(res => {
+                this.receiveList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListReceive = this.receiveList
+          }
+        })
+    },
+    arrivalAndReceive() {
+      console.log(this.fileListReceive, 'fileListReceive')
+      if (!this.location) {
+        this.$message.warning(
+          '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
+        )
+        return
+      }
+      if (this.fileListArrival.length < 3) {
+        this.$message.warning('抵达图至少三张')
+        return
+      }
+      if (this.fileListReceive.length < 2) {
+        this.$message.warning('签收图最少两张')
+        return
+      }
+      this.isLoading = true
+      //上传抵达
+      let formData = new window.FormData()
+      this.fileListArrival.forEach((item, index) => {
+        formData.append('file' + index, item.raw)
+      })
+      formData.append('orderNumber', this.orderNumber)
+      formData.append('resultArrivalAddress', this.location)
+      if (this.arrivalTime) {
+        formData.append('arrivalTime', sjTime(this.arrivalTime))
+      }
+      formData.append('userName', getCookie('loginName'))
+      let options = {
+        // 设置axios的参数
+        url: '/api/v1/otms/addtmstruckArrivalResult',
+        data: formData,
+        method: 'post',
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }
+      this.axios(options).then(res => {
+        this.fileListArrival = []
+        console.log('arrivalRes:', res)
+        //上传签收
+        let formData = new window.FormData()
+        let request = ''
+        this.fileListReceive.forEach((item, index) => {
+          formData.append('file' + index, item.raw)
+        })
+        formData.append('orderNumber', this.orderNumber)
+        formData.append('resultArrivalAddress', this.location)
+        if (this.receiptTime) {
+          formData.append('receiptTime', sjTime(this.receiptTime))
+        }
+        formData.append('num', request.length)
+        let options = {
+          url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
+          data: formData,
+          method: 'post',
+          headers: {
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        this.axios(options).then(res => {
+          console.log('receiveRes:', res)
+          this.$message.success('上传成功!')
+          this.steelMap.arrivalAddress = this.location
+          this.closeUpload()
+          this.refresh()
+          this.tableRowIndex = ''
+          this.fileListReceive = []
+        })
+      })
+    },
+    fileChange1(file, fileList) {
+      this.fileListArrival = fileList
+    },
+    fileChange2(file, fileList) {
+      this.fileListReceive = fileList
+    },
+    fileChange3(file, fileList) {
+      this.remarkPicList = fileList
+    },
+    exceed() {
+      this.$message.warning('超出上传数量!')
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
+    },
+    closeUpload() {
+      this.location = null
+      this.arrivalTime = null
+      this.receiptTime = null
+      this.arrivalReceiving = false
+      this.isLoading = false
+      this.$refs.arrival.clearFiles()
+      this.$refs.receive.clearFiles()
+    },
+    //防抖函数--防止用户重复点击
+    debounce(func, delay) {
+      let timer = null
+      return function(...args) {
+        if (timer !== null) {
+          clearTimeout(timer)
+        }
+        timer = setTimeout(function() {
+          func.apply(this, args)
+        }, delay)
+      }
+    },
+    //筛选
+    filterChange(obj) {
+      //承运商筛选,后续有待优化
+      console.log(obj, 'filterChange obj', arguments)
+      if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
+        this.headColumnList.push('carrierName')
+        this.filterMap.carrierList = obj.carrierList
+      }
+      if (
+        typeof obj.carrierList != 'undefined' &&
+        obj.carrierList.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('carrierName'),
+          1
+        )
+        delete this.filterMap.carrierList
+      }
+      //物资名称筛选,后续有待优化
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length > 0
+      ) {
+        this.headColumnList.push('materialName')
+        this.filterMap.materialNameList = obj.materialNameList
+      }
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('materialName'),
+          1
+        )
+        delete this.filterMap.materialNameList
+      }
+      //车牌号筛选,后续有待优化
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
+        this.filterMap.capacityList = obj.capacityNo
+        this.headColumnList.push('capacityNo')
+      }
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
+        this.headColumnList.splice(this.headColumnList.indexOf('capacityNo'), 1)
+        delete this.filterMap.capacityList
+      }
+      //客户筛选,后续有待优化
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length > 0
+      ) {
+        this.headColumnList.push('consigneeName')
+        this.filterMap.consigneeNameList = obj.consigneeName
+      }
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('consigneeName'),
+          1
+        )
+        delete this.filterMap.consigneeNameList
+      }
+      //销售片区筛选,后续有待优化
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length > 0
+      ) {
+        this.filterMap.saleAreaList = obj.saleAreaList
+      }
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length == 0
+      ) {
+        delete this.filterMap.saleAreaList
+      }
+      //物资规格筛选
+      if (typeof obj.materialSpe != 'undefined' && obj.materialSpe.length > 0) {
+        this.headColumnList.push('materialSpe')
+        this.filterMap.materialSpeList = obj.materialSpe
+      }
+      if (
+        typeof obj.materialSpe != 'undefined' &&
+        obj.materialSpe.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('materialSpe'),
+          1
+        )
+        delete this.filterMap.materialSpeList
+      }
+      //收货地址筛选
+      if (
+        typeof obj.addressPlace != 'undefined' &&
+        obj.addressPlace.length > 0
+      ) {
+        this.headColumnList.push('addressPlace')
+        this.filterMap.addressPlaceList = obj.addressPlace
+      }
+      if (
+        typeof obj.addressPlace != 'undefined' &&
+        obj.addressPlace.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('addressPlace'),
+          1
+        )
+        delete this.filterMap.addressPlaceList
+      }
+      if (typeof obj.orderStatus != 'undefined' && obj.orderStatus.length > 0) {
+        this.headColumnList.push('orderStatus')
+        // this.reset()
+        this.filterMap.orderStatusList = obj.orderStatus
+      }
+      if (
+        typeof obj.orderStatus != 'undefined' &&
+        obj.orderStatus.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('orderStatus'),
+          1
+        )
+        delete this.filterMap.orderStatusList
+      }
+      if (
+        typeof obj.saleOrderStatus != 'undefined' &&
+        obj.saleOrderStatus.length > 0
+      ) {
+        this.headColumnList.push('saleOrderStatus')
+        this.filterMap.saleOrderStatusList = obj.saleOrderStatus
+      }
+      if (
+        typeof obj.saleOrderStatus != 'undefined' &&
+        obj.saleOrderStatus.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('saleOrderStatus'),
+          1
+        )
+        delete this.filterMap.saleOrderStatusList
+      }
+      if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length > 0) {
+        this.headColumnList.push('saleRemark')
+        this.filterMap.saleRemarkList = obj.saleRemark
+      }
+      if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length == 0) {
+        this.headColumnList.splice(this.headColumnList.indexOf('saleRemark'), 1)
+        delete this.filterMap.saleRemarkList
+      }
+      if (typeof obj.truckRemark != 'undefined' && obj.truckRemark.length > 0) {
+        this.headColumnList.push('truckRemark')
+        this.filterMap.truckRemarkList = obj.truckRemark
+      }
+      if (
+        typeof obj.truckRemark != 'undefined' &&
+        obj.truckRemark.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('truckRemark'),
+          1
+        )
+        delete this.filterMap.truckRemarkList
+      }
+      if (typeof obj.isContinue != 'undefined' && obj.isContinue.length > 0) {
+        this.headColumnList.push('isContinue')
+        this.filterMap.isContinueList = obj.isContinue
+      }
+      if (typeof obj.isContinue != 'undefined' && obj.isContinue.length == 0) {
+        this.headColumnList.splice(this.headColumnList.indexOf('isContinue'), 1)
+        delete this.filterMap.isContinueList
+      }
+      if (typeof obj.spellNum != 'undefined' && obj.spellNum.length > 0) {
+        this.headColumnList.push('spellNum')
+        this.filterMap.spellNumList = obj.spellNum
+      }
+      if (typeof obj.spellNum != 'undefined' && obj.spellNum.length == 0) {
+        this.headColumnList.splice(this.headColumnList.indexOf('spellNum'), 1)
+        delete this.filterMap.spellNumList
+      }
+      if (typeof obj.flStatus != 'undefined' && obj.flStatus.length > 0) {
+        this.headColumnList.push('flStatus')
+        this.filterMap.flStatusList = obj.flStatus
+      }
+      if (typeof obj.flStatus != 'undefined' && obj.flStatus.length == 0) {
+        this.headColumnList.splice(this.headColumnList.indexOf('flStatus'), 1)
+        delete this.filterMap.flStatusList
+      }
+      if (
+        typeof obj.orderStatusActually != 'undefined' &&
+        obj.orderStatusActually.length > 0
+      ) {
+        this.headColumnList.push('orderStatusActually')
+        this.filterMap.orderStatusActuallyList = obj.orderStatusActually
+      }
+      if (
+        typeof obj.orderStatusActually != 'undefined' &&
+        obj.orderStatusActually.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('orderStatusActually'),
+          1
+        )
+        delete this.filterMap.orderStatusActuallyList
+      }
+      if (
+        typeof obj.inventoryWarehouse != 'undefined' &&
+        obj.inventoryWarehouse.length > 0
+      ) {
+        this.headColumnList.push('inventoryWarehouse')
+        this.filterMap.inventoryWarehouseList = obj.inventoryWarehouse
+      }
+      if (
+        typeof obj.inventoryWarehouse != 'undefined' &&
+        obj.inventoryWarehouse.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('inventoryWarehouse'),
+          1
+        )
+        delete this.filterMap.inventoryWarehouseList
+      }
+      //出库状态筛选
+      if (
+        typeof obj.outboundStatus != 'undefined' &&
+        obj.outboundStatus.length > 0
+      ) {
+        this.headColumnList.push('outboundStatus')
+        this.filterMap.outboundStatusList = obj.outboundStatus
+      }
+      if (
+        typeof obj.outboundStatus != 'undefined' &&
+        obj.outboundStatus.length == 0
+      ) {
+        this.headColumnList.splice(
+          this.headColumnList.indexOf('outboundStatus'),
+          1
+        )
+        delete this.filterMap.outboundStatusList
+      }
+      // if (obj)
+      this.onclick(this.filterMap)
+    },
+    //控制筛选数组变化
+    // filterListChange() {
+    //   //客户筛选数组
+    //   // let consigneeNameList = this.tableData
+    //   //   .map(e => {
+    //   //     return e.consigneeName
+    //   //   })
+    //   //   .sort()
+    //   //承运商筛选数组
+    //   // let carrierNameList = this.tableData
+    //   //   .map(e => {
+    //   //     return e.carrierName
+    //   //   })
+    //   //   .sort()
+    //   //车牌号筛选数组
+    //   // let capacityList = this.tableData
+    //   //   .map(e => {
+    //   //     return e.newCapacityNo
+    //   //   })
+    //   //   .sort()
+    //   //物资筛选数组
+    //   // let materialNameList = this.tableData
+    //   //   .map(e => {
+    //   //     return e.materialName
+    //   //   })
+    //   //   .filter(e => {
+    //   //     return e != null
+    //   //   })
+    //   //   .sort()
+    //   //销售片区筛选数组
+    //   let saleAreaList = this.tableData
+    //     .map(e => {
+    //       return e.areaName
+    //     })
+    //     .filter(e => {
+    //       return e != null
+    //     })
+    //   let addressPlaceList = this.tableData
+    //     .map(e => {
+    //       return e.addressPlace
+    //     })
+    //     .filter(e => {
+    //       return e != null
+    //     })
+    //     .sort()
+    //   let orderStatusList = this.tableData
+    //     .map(e => {
+    //       return e.orderStatus
+    //     })
+    //     .filter(e => {
+    //       return e != null
+    //     })
+    //   let materialSpeList = this.tableData
+    //     .map(e => {
+    //       return e.materialSpe
+    //     })
+    //     .filter(e => {
+    //       return e != null
+    //     })
+    //     .sort()
+    //   let saleOrderStatusList = this.tableData.map(e => {
+    //     return e.saleOrderStatus
+    //   })
+    //   let saleRemarkList = this.tableData
+    //     .map(e => {
+    //       return e.saleRemark
+    //     })
+    //     .sort()
+    //   // this.filterConsigneeList = []
+    //   // this.filterCarrierList = []
+    //   // this.filterCapacityList = []
+    //   // this.filtermaterialNameList = []
+    //   this.filterSaleAreaList = []
+    //   this.filterorderStatus = []
+    //   this.filteraddressPlace = []
+    //   this.filtermaterialSpe = []
+    //   this.filterSaleOrderStatus = []
+    //   this.filterSaleRemark = []
+    //   // Array.from(new Set(consigneeNameList)).forEach(e => {
+    //   //   let map = {}
+    //   //   map.text = e
+    //   //   map.value = e
+    //   //   this.filterConsigneeList.push(map)
+    //   // })
+    //   Array.from(new Set(carrierNameList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterCarrierList.push(map)
+    //   })
+    //   Array.from(new Set(capacityList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterCapacityList.push(map)
+    //   })
+    //   Array.from(new Set(materialNameList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filtermaterialNameList.push(map)
+    //   })
+    //   Array.from(new Set(saleAreaList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterSaleAreaList.push(map)
+    //   })
+    //   Array.from(new Set(addressPlaceList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filteraddressPlace.push(map)
+    //   })
+    //   Array.from(new Set(orderStatusList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterorderStatus.push(map)
+    //   })
+    //   Array.from(new Set(materialSpeList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filtermaterialSpe.push(map)
+    //   })
+    //   Array.from(new Set(saleOrderStatusList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterSaleOrderStatus.push(map)
+    //   })
+    //   Array.from(new Set(saleRemarkList)).forEach(e => {
+    //     let map = {}
+    //     map.text = e
+    //     map.value = e
+    //     this.filterSaleRemark.push(map)
+    //   })
+    // },
+    cellStyle({ row, column, rowIndex, columnIndex }) {
+      if (
+        column.property == 'arrivalAddress' ||
+        column.property == 'receiptAddress'
+      ) {
+        return { color: 'blue', height: '30px' }
+      } else {
+        return { height: '30px' }
+      }
+    },
+    rowClick(row, column, event) {
+      this.steelMap = {}
+      this.tableRowIndex = row.group
+      this.isRowClick = 1
+      this.steelMap = row
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
+        return 'warning-row'
+      }
+    },
+    cellMouse(row, column, cell, event) {
+      if (this.isRowClick == 0) {
+        this.tableRowIndex = row.group
+      }
+    },
+    cellLeave(row, column, cell, event) {
+      if (this.isRowClick == 0) {
+        this.tableRowIndex = ''
+      }
+    },
+    reset() {
+      var that = this
+      that.$nextTick(() => {
+        that.saleSteelKey = !that.saleSteelKey
+      })
+    },
+    checkTrans(row) {
+      this.isRowClick = 0
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要查看轨迹的行!')
+        return
+      }
+      if (typeof row === 'undefined') {
+        row = this.steelMap
+      }
+      console.log(row)
+      if (row.saleMakeDate == null) {
+        this.$message.error('该车还未出库,暂无轨迹')
+        return
+      }
+      let that = this
+      that.axios
+        .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNo)
+        .then(res => {
+          console.log(res.data)
+          if (res.data.data == '-1') {
+            this.$message.error('运输订单未关闭的自提车辆无权查看!')
+          } else if (res.data.data.startAndEndRoutes != null) {
+            that.pathOption.orderNumber = row.orderNo
+            that.pathOption.capacityNumber = row.capacityNo
+            that.pathOption.startPointName = '达钢集团小东门'
+            that.pathOption.endPointName = row.receiptAddress
+            that.value7 = true
+            if (row.orderStatus == '已完成') {
+              that.pathOption.statusCode = '位置'
+            } else {
+              that.pathOption.statusCode = '当前位置'
+            }
+          } else {
+            this.$message.error('车辆没有开启GPS')
+          }
+        })
+    },
+    cellClik(row, column, cell, event) {
+      if (column.property == 'arrivalAddress') {
+        if (row.orderNo && row.arrivalAddress) {
+          this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
+          this.toPhotoClick(row.orderNo, 1)
+        }
+      }
+      if (column.property == 'receiptAddress') {
+        if (row.orderNo && row.receiptAddress) {
+          this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
+          this.receipctPhotoClick(row.orderNo, 1)
+        }
+      }
+    },
+    //反关闭运单
+    reverseCloseOrder() {
+      this.steelMap.oYeFlag = 1
+      this.axios
+        .post('/api/v1/ams/reverseCloseOrder', this.steelMap)
+        .then(res => {
+          this.operation(this.steelMap)
+          this.onclick(this.filterMap)
+        })
+    },
+    //筛选
+    //筛选客户
+    //点击操作弹出框
+    operation(row) {
+      // this.isRowClick = 0
+      this.isCheckGPS = true
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      if (typeof row === 'undefined') {
+        row = this.steelMap
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
+          this.steelMap = res.data.data
+
+          this.steelMap.userName = getCookie('loginName')
+          this.addressId = row.shipperAddressId
+          this.getAllProvince()
+          this.onchangeProvince()
+          this.onchangeCity()
+          this.centerDialogVisible = true
+
+          this.getSpanArr1(res.data.data.mapList)
+        })
+    },
+    //查看抵达图
+    toPhotoClick(orderNo, num) {
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + orderNo)
+        .then(res => {
+          this.srcList = []
+          this.previewSrcList = res.data
+          console.log(res.data, 'sd')
+          res.data.forEach(e => {
+            this.srcList.push({
+              title: '',
+              src: e
+            })
+          })
+          // this.srcList.push({
+          //   title: '车头照片',
+          //   src: res.data[0]
+          // })
+          // this.srcList.push({
+          //   title: '满货箱照片',
+          //   src: res.data[1]
+          // })
+          if (num == 1) {
+            this.isShow3 = true
+          } else {
+            this.isShow = true
+          }
+        })
+    },
+    //查看实时路径
+    checkPoint() {
+      if (this.input || this.input1 || this.steelMap.capacityNo) {
+        this.carNumber = this.input || this.input1 || this.steelMap.capacityNo
+        this.value8 = true
+      } else {
+        this.$message.error('请输入或者点击有车牌号的行查询车牌号的实时路径')
+      }
+    },
+    //查看签收图
+    receipctPhotoClick(orderNo, num) {
+      this.axios
+        .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + orderNo)
+        .then(res => {
+          console.log(res.data)
+          if (num == 1) {
+            this.isShow4 = true
+          } else {
+            this.isShow2 = true
+          }
+          this.srcList2 = []
+          this.previewSrcList2 = res.data
+          if (res.data && res.data.length > 0) {
+            res.data.forEach(item => {
+              this.srcList2.push({
+                title: '',
+                src: item
+              })
+            })
+          }
+        })
+    },
+    //销售钢材报表导出excel
+    exportAllReportToExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在导出Excel',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      var title = this.tableTitle
+      let tHeader = []
+      let filterVal = []
+      if (
+        getCookie('orgCode') == 'shouhuokehu' ||
+        getCookie('orgCode') == 'xiaoshouyewuyuan'
+      ) {
+        tHeader = []
+        filterVal = []
+        let tHeader1 = this.salerExportExcelList.filter(e => {
+          if (this.columnNoRoutList.indexOf(e) == -1) {
+            return e
+          }
+        })
+        console.log(tHeader1)
+        let arr = this.$refs.tableRef.$children
+        for (var i = 0; i < tHeader1.length; i++) {
+          for (var j = 0; j < arr.length; j++) {
+            if (arr[j].label === tHeader1[i]) {
+              if (tHeader.indexOf(arr[j].label) === -1) {
+                tHeader.push(arr[j].label)
+              }
+              if (filterVal.indexOf(arr[j].prop) === -1) {
+                filterVal.push(arr[j].prop)
+              }
+            }
+          }
+        }
+      } else {
+        this.$refs.tableRef.$children.forEach(item => {
+          if (item.label != undefined && item.prop != undefined) {
+            if (tHeader.indexOf(item.label) === -1) {
+              tHeader.push(item.label)
+            }
+            if (filterVal.indexOf(item.prop) === -1) {
+              filterVal.push(item.prop)
+            }
+          }
+        })
+      }
+      this.downloadLoading = true
+      tHeader.unshift('车序号')
+      filterVal.unshift('saleOrderMaterialId')
+
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.disposeDataToExcel(this.tableData).map(v =>
+          filterVal.map(j => v[j])
+        ) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+      loading.close()
+    },
+    disposeDataToExcel(data) {
+      //如果批次相同,只允许一条磅重和运费置为0
+      //首先找出批次相同的数组元素
+      data.reduce((prev, item) => {
+        if (item.weightBatchId) {
+          //如果有批次则走这个方法
+          if (prev.length > 0) {
+            let hash = prev[prev.length - 1]
+            //如果处理后的数组长度大于0,那么判断处理后的数组的最后一个元素里面的批次是否与当前批次相等,如果相等
+            if (
+              item.weightBatchId &&
+              hash.weightBatchId &&
+              item.weightBatchId == hash.weightBatchId
+            ) {
+              prev[prev.length - 1].netWeight = 0
+              prev[prev.length - 1].detailsAmount = 0
+            }
+          }
+          prev.push(item)
+          return prev
+        } else {
+          prev.push(item)
+          return prev
+        }
+      }, [])
+      return data
+    },
+    changeScreen() {},
+    //承运商弹出层
+    handleSelectCarrier() {
+      this.carrierList.forEach(item => {
+        if (item.carrierName == this.steelMap.carrierName) {
+          this.steelMap.newCarrierId = item.carrierId
+          this.steelMap.carrierId = item.carrierId
+        }
+      })
+    },
+    //承运商边输边查
+    querySearchCarrier(queryString, cb) {
+      if (queryString != null && queryString != '' && queryString.length > 1) {
+        this.axios
+          .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.carrierList = []
+              if (res.data.data.length == 0) {
+                this.$message.info('承运商不存在,请前往注册')
+                return
+              }
+              var restaurants = res.data.data
+              this.carrierList = res.data.data
+              var results = queryString
+                ? restaurants.filter(this.createFilterCarrier(queryString))
+                : restaurants
+              cb(results)
+            }
+          })
+      }
+    },
+    createFilterCarrier(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        )
+      }
+    },
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb) {
+      console.log(queryString)
+      if (
+        (queryString != null && queryString != '' && queryString.length > 3) ||
+        queryString == '取消' ||
+        queryString == '待定' ||
+        queryString == '空白'
+      ) {
+        this.axios
+          .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
+          .then(res => {
+            this.capacityList = []
+            if (res.data.code == '200') {
+              if (res.data.data.length == 0) {
+                this.$message.info('车牌号不存在,请前往注册')
+                return
+              }
+              var restaurants = res.data.data
+              this.capacityList = 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
+        )
+      }
+    },
+    //车牌号弹出层
+    handleSelect() {
+      this.capacityList.forEach(item => {
+        if (item.capacityNumber === this.steelMap.capacityNo) {
+          this.steelMap.newsCapacityId = item.capacityId
+        }
+      })
+    },
+    updateCapacity() {
+      console.log('我只想测')
+      this.steelMap.capacityId = this.steelMap.newsCapacityId
+      this.steelMap.driverTel = this.steelMap.capacityTel
+      this.steelMap.userId = getCookie('userId')
+      if (this.steelMap.newsCapacityId == null) {
+        this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
+        return
+      }
+      if (
+        !(
+          isVehicleNumber(this.steelMap.capacityNo) ||
+          this.steelMap.capacityNo == '取消' ||
+          this.steelMap.capacityNo == '待定' ||
+          this.steelMap.capacityNo == '空白'
+        )
+      ) {
+        this.$message.error('请输入正确格式的车牌号!')
+        return
+      }
+      //是否校验GPS
+      this.steelMap.isCheckGPS = this.isCheckGPS
+      if (this.steelMap.capacityIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: '正在变更车牌号',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        })
+        this.steelMap.oYeFlag = 1
+        this.axios
+          .post('/api/v1/ams/updateCapacityNumberInFactory', this.steelMap)
+          .then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: 'success',
+                message: '变更车号成功,请通知驾驶员',
+                duration: 2500,
+                offset: '250'
+              })
+              this.operation(this.steelMap)
+              this.onclick(this.filterMap)
+              loading.close()
+            } else {
+              this.$alert(res.data.data, '提示', {
+                confirmButtonText: '确定',
+                center: true,
+                type: 'warning',
+                callback: action => {
+                  this.onclick(this.filterMap)
+                  this.operation(this.steelMap)
+                }
+              })
+              loading.close()
+            }
+          })
+          .catch(() => {
+            this.$message.success('变更失败,请联系管理员')
+            loading.close()
+          })
+      } else {
+        if (this.steelMap.carrierIds == 0) {
+          this.$message.error('请先选择承运商!')
+          return
+        }
+        this.steelMap.lineId = this.lineSpelling[this.steelMap.mapList.length]
+        this.steelMap.driverTel = this.steelMap.capacityTel
+        this.steelMap.capacityNumber = this.steelMap.capacityNo
+        this.steelMap.oYeFlag = 1
+        let arr = []
+        arr.push(this.steelMap)
+        const loading = this.$loading({
+          lock: true,
+          text: '正在派车,请稍候',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        })
+        this.axios
+          .post('/api/v1/ams/dispatchSteelOrder', arr)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message.success('派车成功!')
+              this.operation(this.steelMap)
+              this.axios
+                .post(
+                  '/api/v1/ams/matchingDriverTelRecently?capacityNumber=' +
+                    this.steelMap.capacityNo
+                )
+                .then(res => {
+                  // if (res.data.data != null) {
+                  //   this.steelMap.capacityTel = res.data.data
+                  //   this.updateDriverTel()
+                  // }
+                })
+              this.onclick(this.filterMap)
+              loading.close()
+            } else {
+              loading.close()
+              this.$alert(res.data.data, '提示', {
+                confirmButtonText: '确定',
+                center: true,
+                callback: action => {
+                  this.onclick(this.filterMap)
+                  this.operation(this.steelMap)
+                }
+              })
+            }
+          })
+          .catch(() => {
+            this.$message.error(res.data.data)
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          })
+      }
+    },
+    //修改司机电话号码
+    updateDriverTel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '修改电话号码中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      if (
+        this.steelMap.capacityTel == null ||
+        this.steelMap.capacityTel == ''
+      ) {
+        this.$message.error('电话号码不能为空')
+        loading.close()
+        return
+      }
+      var regex = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/
+      if (!regex.test(this.steelMap.capacityTel)) {
+        this.$message.error('电话号码不符合规则')
+        loading.close()
+        return
+      }
+      this.axios
+        .post('/api/v1/uc/updateDriverTel', {
+          orderId: parseInt(this.steelMap.orderId),
+          saleOrderMaterialId: parseInt(this.steelMap.saleOrderMaterialId),
+          driverTel: this.steelMap.capacityTel,
+          oYeFlag: 1
+        })
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message({
+              type: 'success',
+              duration: 2000,
+              message: '修改电话号码成功',
+              offset: 250
+            })
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          } else {
+            this.$message.error('修改失败')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          }
+        })
+        .catch(() => {
+          this.$message.error('修改失败')
+          this.operation(this.steelMap)
+          this.onclick(this.filterMap)
+          loading.close()
+        })
+    },
+    //修改收货客户电话
+    updateconsigneeTel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '修改电话号码中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      if (
+        this.steelMap.consigneeTel == null ||
+        this.steelMap.consigneeTel == ''
+      ) {
+        this.$message.error('电话号码不能为空')
+        return
+      }
+      this.axios
+        .post('/api/v1/ams/updateConsigneeTel', {
+          saleOrderNo: this.steelMap.saleOrderNo,
+          saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
+          consigneeTel: this.steelMap.consigneeTel
+        })
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改成功')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          } else {
+            this.$message.error('修改失败')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          }
+        })
+        .catch(() => {
+          this.$message.error('修改失败')
+          this.operation(this.steelMap)
+          this.onclick(this.filterMap)
+          loading.close()
+        })
+    },
+    //批量修改收货客户电话
+    batchUpdateconsigneeTel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '修改电话号码中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      if (!this.consigneeTel) {
+        this.$message.error('电话号码不能为空')
+        loading.close()
+        return
+      }
+      this.batchCapacityList.forEach(row => {
+        this.axios
+          .post('/api/v1/ams/updateConsigneeTel', {
+            saleOrderNo: row.saleOrderNo,
+            saleOrderMaterialId: row.saleOrderMaterialId,
+            consigneeTel: this.consigneeTel,
+            oYeFlag: 1
+          })
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message.success('修改成功')
+            } else {
+              this.$message.error('修改失败')
+            }
+          })
+          .catch(() => {
+            this.$message.error('修改失败')
+          })
+      })
+      this.onclick(this.filterMap)
+      loading.close()
+      this.batchCarrierVisible = false
+    },
+    //修改承运商授权
+    updateTruckCarrier() {
+      if (this.steelMap.newCarrierId == null) {
+        this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
+        this.onclick(this.filterMap)
+        return
+      }
+      if (this.steelMap.carrierIds != 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: '正在修改承运商授权',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        })
+        this.steelMap.oYeFlag = 1
+        this.axios
+          .post('/api/v1/ams/updateTruckNoCarrier', this.steelMap)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message.success('修改承运商授权成功')
+              this.operation(this.steelMap)
+              this.onclick(this.filterMap)
+              loading.close()
+            } else {
+              this.$message.error('修改失败,请联系管理员!')
+              this.operation(this.steelMap)
+              this.onclick(this.filterMap)
+              loading.close()
+            }
+          })
+          .catch(() => {
+            this.$message.error('修改失败,请联系管理员!')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          })
+      } else {
+        //授权承运商
+        let arr = []
+        this.steelMap.oYeFlag = 1
+        arr.push(this.steelMap)
+        const loading = this.$loading({
+          lock: true,
+          text: '正在授权承运商',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        })
+        this.axios
+          .post('/api/v1/ams/dispatchToCarrier', arr)
+          .then(res => {
+            if (res.data.code == '0') {
+              this.$message.success('授权承运商成功')
+              this.operation(this.steelMap)
+              this.onclick(this.filterMap)
+              loading.close()
+            } else {
+              this.$message.error('授权失败,请联系管理员')
+              this.operation(this.steelMap)
+              this.onclick(this.filterMap)
+              loading.close()
+            }
+          })
+          .catch(() => {
+            this.$message.error('授权失败,请联系管理员')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          })
+      }
+    },
+    updateAddress(row) {
+      this.drawer = true
+      this.addressRow = row
+      this.province = row.addressProvince
+      this.city = row.addressDistrict
+      this.county = row.addressTown
+      this.addressId = row.shipperAddressId
+      this.getAllProvince()
+      this.onchangeProvince()
+      this.onchangeCity()
+    },
+    //获取所有省数据
+    getAllProvince() {
+      // this.provinceList = []
+      // return
+      this.axios
+        .post('/api/v1/uc/getAllProvince')
+        .then(res => {
+          // console.log(res.data.data)
+          this.provinceList = res.data.data
+        })
+        .catch(e => {
+          console.log(e)
+        })
+    },
+    //省改变
+    onchangeProvince() {
+      this.axios
+        .post(
+          '/api/v1/uc/getDistrictByProvince?addressProvince=' +
+            this.steelMap.addressProvince +
+            '&i=' +
+            new Date()
+        )
+        .then(res => {
+          this.cityList = res.data.data
+          // this.city = "";
+          // this.county = "";
+        })
+    },
+    //市改变
+    onchangeCity() {
+      this.axios
+        .post(
+          '/api/v1/uc/getTownByDistrict?addressDistrict=' +
+            this.steelMap.addressDistrict +
+            '&i=' +
+            new Date()
+        )
+        .then(res => {
+          this.countyList = res.data.data
+        })
+    },
+    //县(区)改变
+    onchangeCounty() {
+      let mapValue = {
+        addressProvince: this.steelMap.addressProvince,
+        addressDistrict: this.steelMap.addressDistrict,
+        addressTown: this.steelMap.addressTown
+      }
+      this.axios.post('/api/v1/uc/getPlaceByAllAddress', mapValue).then(res => {
+        this.addressId = res.data.data[0].addressId
+      })
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log('获取所有下拉值!')
+    },
+    //以下是收货地址边输边查搜索
+    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
+        )
+      }
+    },
+    //修改收货地址
+    addAddressClick() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在修改收货地址',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let map = this.steelMap
+      map.isCloseEas = Number(1)
+      map.isNewCar = Number(1)
+      map.userName = getCookie('loginName')
+      map.shipperAddressId = this.addressId
+      map.oYeFlag = 1
+      this.axios
+        .post('/api/v1/ams/updateCarAddress', map)
+        .then(res => {
+          if (res.data.code == '200') {
+            // this.$message.success('修改收货地址成功!')
+            this.$message({
+              type: 'success',
+              message:
+                '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
+              offset: '250',
+              duration: 2500
+            })
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          } else {
+            this.$message.error('修改失败,请联系管理员!')
+            this.operation(this.steelMap)
+            this.onclick(this.filterMap)
+            loading.close()
+          }
+        })
+        .catch(() => {
+          this.$message.error('修改失败,请联系管理员!')
+          this.operation(this.steelMap)
+          this.onclick(this.filterMap)
+          loading.close()
+        })
+    },
+    //批量修改收货地址
+    batchUpdateCarAddress() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在修改收货地址',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      this.batchCapacityList.forEach(row => {
+        let map = row
+        map.place = this.steelMap.place
+        map.isCloseEas = Number(1)
+        map.isNewCar = Number(1)
+        map.shipperAddressId = this.addressId
+        map.userName = getCookie('loginName')
+        map.oYeFlag = 1
+        this.axios
+          .post('/api/v1/ams/updateCarAddress', map)
+          .then(res => {
+            if (res.data.code == '200') {
+              this.$message({
+                type: 'success',
+                message:
+                  '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
+                offset: '250',
+                duration: 2500
+              })
+            } else {
+              this.$message.error('修改失败,请联系管理员!')
+            }
+          })
+          .catch(() => {
+            this.$message.error('修改失败,请联系管理员!')
+          })
+      })
+      this.onclick(this.filterMap)
+      loading.close()
+      this.batchCarrierVisible = false
+    },
+    //将序号确定下来
+    // getNodeNum(data) {
+    //   for (var i = 0; i < data.length; i++) {
+    //     if (i === 0) {
+    //       data[i].group = i
+    //       data[i].rowKey = i
+    //     } else {
+    //       // 判断当前元素与上一个元素是否相同
+    //       if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+    //         data[i].group = data[i - 1].group
+    //         data[i].rowKey = i
+    //       } else {
+    //         data[i].group = data[i - 1].group + 1
+    //         data[i].rowKey = i
+    //       }
+    //     }
+    //   }
+    // },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = []
+      this.spanArr2 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1)
+          this.spanArr2.push(1)
+          // data[i].group = i
+          this.pos = 0
+          this.pos2 = 0
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            this.spanArr[this.pos] += 1
+            // data[i].group = data[i - 1].group
+            this.spanArr.push(0)
+
+            if (
+              data[i].weightBatchId &&
+              data[i].weightBatchId === data[i - 1].weightBatchId
+            ) {
+              //批次合并
+              this.spanArr2[this.pos2] += 1
+              this.spanArr2.push(0)
+            } else {
+              this.spanArr2.push(1)
+              this.pos2 = i
+            }
+          } else {
+            this.spanArr.push(1)
+            this.pos = i
+            // data[i].group = data[i - 1].group + 1
+            this.spanArr2.push(1)
+            this.pos2 = i
+          }
+        }
+      }
+    },
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = []
+      this.spanArr3 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1)
+          this.spanArr3.push(1)
+          // data[i].group = i
+          this.pos1 = 0
+          this.pos3 = 0
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            this.spanArr1[this.pos] += 1
+            // data[i].group = data[i - 1].group
+            this.spanArr1.push(0)
+            if (
+              data[i].weightBatchId &&
+              data[i].weightBatchId === data[i - 1].weightBatchId
+            ) {
+              //批次合并
+              this.spanArr3[this.pos3] += 1
+              this.spanArr3.push(0)
+            } else {
+              this.spanArr3.push(1)
+              this.pos3 = i
+            }
+          } else {
+            this.spanArr1.push(1)
+            this.pos1 = i
+            this.spanArr3.push(1)
+            this.pos3 = i
+            // data[i].group = data[i - 1].group + 1
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.indexOf(column.label) != -1) {
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      } else if (this.mergeListBatch.indexOf(column.label) != -1) {
+        const _row = this.spanArr2[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.indexOf(column.label) != -1) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      } else if (this.mergeListBatch.indexOf(column.label) != -1) {
+        const _row = this.spanArr3[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.indexOf(column.label) != -1) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      } else if (this.mergeListBatch.indexOf(column.label) != -1) {
+        const _row = this.spanArr3[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    //计算总件数和总车数
+    // getTotalNum(data) {
+    //   //通过车序号的个数来计算车数
+    //   let arr = []
+    //   arr = data.map(e => {
+    //     if (
+    //       e.capacityNo != '取消' &&
+    //       e.saleOrderStatus != '反审批' &&
+    //       e.orderStatus != '已关闭'
+    //     ) {
+    //       return e.saleOrderMaterialId
+    //     }
+    //   })
+    //   this.totalCapacity = Array.from(new Set(arr)).length
+    //   this.totalNumber = data.reduce(function(prev, item) {
+    //     return prev + item.materialNum
+    //   }, 0)
+    // },
+    //减少物资件数
+    updateBillOrder(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: '修改物资件数中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let map = {
+        materialId: row.materialId,
+        materialNum: row.materialNumber,
+        oYeFlag: 1
+      }
+      let arr = []
+      arr.push(map)
+      let updateMap = {
+        orderId: this.steelMap.orderId,
+        saleOrderId: this.steelMap.saleOrderId,
+        saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
+        mapList: arr,
+        oYeFlag: 1
+      }
+      this.axios
+        .post('/api/v1/oms/updateMaterialMes', updateMap)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('修改物资数量成功')
+            this.onclick(this.filterMap)
+            loading.close()
+          } else {
+            this.$message.error('修改物资数量失败,请联系管理员')
+            this.onclick(this.filterMap)
+            loading.close()
+          }
+        })
+        .catch(() => {
+          this.$message.error('修改物资数量失败,请联系管理员')
+          this.onclick(this.filterMap)
+          loading.close()
+        })
+    },
+    getStatusNum(data) {
+      //未派发、取消
+    },
+    //查询,输入查询条件
+    onclick(obj) {
+      this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
+      this.isRowClick = 0
+      this.showPopover = false
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let startTime = null
+      let endTime = null
+      let carrierSsoId = null
+      let carrierName = null
+      let consigneeName = null
+      let capacityNo = null
+      let remark = null
+      let saler = null
+      let easPrimaryId = null
+      let consigneeLoginName = null
+      let receiveAddress = null
+      let inboundWarehouse = null
+      obj.receiveAddress = null
+      obj.saleNo = null
+      obj.receiveCustomer = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      if (getCookie('orgCode') == 'shouhuokehu') {
+        consigneeLoginName =
+          JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
+        obj.consigneeLoginName = consigneeLoginName
+      }
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      obj.inboundWarehouse = inboundWarehouse
+      if (this.screen == '客户') {
+        consigneeName = this.input
+      } else if (this.screen == '承运商') {
+        carrierName = this.input
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input
+      } else if (this.screen == '分录ID') {
+        easPrimaryId = this.input
+      } else if (this.screen == '收货地址') {
+        receiveAddress = this.input
+        obj.receiveAddress = receiveAddress
+      } else if (this.screen == '销售订单号') {
+        obj.saleNo = this.input
+      } else if (this.screen == '收款公司') {
+        obj.receiveCustomer = this.input
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '客户' && this.input1 != null && this.input1 != '') {
+        consigneeName = this.input1
+      } else if (
+        this.screen1 == '承运商' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        carrierName = this.input1
+      } else if (
+        this.screen1 == '车牌号' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        capacityNo = this.input1
+      } else if (
+        this.screen1 == '分录ID' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        easPrimaryId = this.input1
+      } else if (
+        this.screen1 == '收货地址' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        receiveAddress = this.input1
+        obj.receiveAddress = receiveAddress
+      } else if (
+        this.screen1 == '销售订单号' &&
+        this.input1 != null &&
+        this.input1 != ''
+      ) {
+        obj.saleNo = this.input1
+      } else if (this.screen1 == '收款公司') {
+        obj.receiveCustomer = this.input1
+      } else if (this.input1 != null && this.input1 != '') {
+        remark = this.input1
+      }
+      obj.dateType = this.dateType
+      this.axios
+        .post(
+          '/api/v1/tms/getOyeSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo +
+            '&saler=' +
+            saler +
+            '&easPrimaryId=' +
+            encodeURIComponent(easPrimaryId),
+          obj,
+          {
+            timeout: 10 * 60 * 1000
+          }
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          if (res.data.data.length > 0) {
+            this.totalNumber = `${res.data.data[0].totalNumber}件`
+            this.totalCapacity = `${res.data.data[0].totalCapacity}车`
+            this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
+            this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
+            console.log(obj, 'obj')
+            if (this.filterMap) {
+              this.filterRefreshCtrl(res.data.data, this.filterMap)
+            }
+          }
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
+          let a = 1
+          if (
+            this.visibleList.length > 0 &&
+            this.visibleList.length < this.tableData.length
+          ) {
+            a = this.visibleList[0].rowKey
+          }
+          this.visibleList = []
+          this.visibleList = this.tableData.slice(
+            0,
+            Math.floor(this.maxHeight / this.itemHeight) + 1
+          )
+          this.getSpanArr(this.visibleList)
+          this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
+          // this.getTotalNum(this.tableData)
+          loading.close()
+        })
+        .catch(() => {
+          loading.close()
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
+          this.$message.error('查询失败')
+        })
+    },
+    filterRefreshCtrl(data, obj) {
+      if (!obj.truckRemarkList || obj.truckRemarkList.length === 0) {
+        this.filterTruckRemark = data[0].filterTruckRemark
+      }
+      if (!obj.saleRemarkList || obj.saleRemarkList.length === 0) {
+        this.filterSaleRemark = data[0].filterSaleRemark
+      }
+      if (!obj.consigneeNameList || obj.consigneeNameList.length === 0) {
+        this.filterConsigneeList = data[0].filterConsigneeList
+      }
+      if (!obj.addressPlaceList || obj.addressPlaceList.length === 0) {
+        this.filteraddressPlace = data[0].filteraddressPlace
+      }
+      if (!obj.materialSpeList || obj.materialSpeList.length === 0) {
+        this.filtermaterialSpe = data[0].filtermaterialSpe
+      }
+      if (!obj.capacityList || obj.capacityList.length === 0) {
+        this.filterCapacityList = data[0].filterCapacityList
+      }
+      if (!obj.materialNameList || obj.materialNameList.length === 0) {
+        this.filtermaterialNameList = data[0].filtermaterialNameList
+      }
+      if (!obj.carrierList || obj.carrierList.length === 0) {
+        this.filterCarrierList = data[0].filterCarrierList
+      }
+      if (!obj.orderStatusList || obj.orderStatusList.length === 0) {
+        this.filterorderStatus = data[0].filterorderStatus
+      }
+      if (!obj.areaNameList || obj.areaNameList.length === 0) {
+        this.filterAreaName = data[0].filterAreaName
+      }
+      if (
+        !obj.orderStatusActuallyList ||
+        obj.orderStatusActuallyList.length === 0
+      ) {
+        this.filterorderStatusActually = data[0].filterorderStatusActually
+      }
+    },
+    //重新获取表格数据
+    refresh() {
+      this.filterMap = {
+        consigneeNameList: [],
+        truckRemarkList: [],
+        saleRemarkList: [],
+        saleOrderStatusList: [],
+        materialSpeList: [],
+        addressPlaceList: [],
+        orderStatusList: [],
+        saleAreaList: [],
+        materialNameList: [],
+        carrierList: [],
+        capacityList: []
+      }
+      this.visibleList = []
+      this.getSteelReport()
+    },
+    //获取钢材统计报表
+    getSteelReportDebounce() {
+      this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
+      console.log('---------------------------1111')
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      // this.isRowClick = 0
+      let startTime = null
+      let endTime = null
+      let carrierSsoId = null
+      let carrierName = null
+      let consigneeName = null
+      let consigneeLoginName = null
+      let capacityNo = null
+      let remark = null
+      let saler = null
+      let inboundWarehouse = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      if (getCookie('orgCode') == 'shouhuokehu') {
+        consigneeLoginName =
+          JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
+        // console.log('userinfo')
+        // JSON.parse(getCookie('userInfo')).userCode
+        this.filterMap.consigneeLoginName = consigneeLoginName
+      }
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      this.filterMap.inboundWarehouse = inboundWarehouse
+      if (this.screen == '客户') {
+        consigneeName = this.input
+      } else if (this.screen == '承运商') {
+        carrierName = this.input
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '客户') {
+        consigneeName = this.input1
+      } else if (this.screen1 == '承运商') {
+        carrierName = this.input1
+      } else if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
+      } else {
+        remark = this.input1
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      this.filterMap.dateType = this.dateType
+      this.filterMap.businessType = '500'
+      this.axios
+        .post(
+          '/api/v1/tms/getOyeSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&saler=' +
+            saler +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo,
+          this.filterMap,
+          { timeout: 6000000 }
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          if (res.data.data.length > 0) {
+            this.totalNumber = `${res.data.data[0].totalNumber}件`
+            this.totalCapacity = `${res.data.data[0].totalCapacity}车`
+            this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
+            this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
+            this.filterConsigneeList = res.data.data[0].filterConsigneeList
+            this.filterCarrierList = res.data.data[0].filterCarrierList
+            this.filterCapacityList = res.data.data[0].filterCapacityList
+            this.filtermaterialNameList =
+              res.data.data[0].filtermaterialNameList
+            // this.filterorderStatus = res.data.data[0].filterorderStatus
+            this.filteraddressPlace = res.data.data[0].filteraddressPlace
+            this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
+            this.filterSaleRemark = res.data.data[0].filterSaleRemark
+            this.filterTruckRemark = res.data.data[0].filterTruckRemark
+            this.filterorderStatusActually =
+              res.data.data[0].filterorderStatusActually
+          }
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
+          let a = 1
+          if (
+            this.visibleList.length > 0 &&
+            this.visibleList.length < this.tableData.length
+          ) {
+            a = this.visibleList[0].rowKey
+          }
+          this.visibleList = []
+          // this.getNodeLNum(this.tableData)
+          this.visibleList = this.tableData.slice(
+            0,
+            Math.floor(this.maxHeight / this.itemHeight) + 1
+          )
+
+          this.getSpanArr(this.visibleList)
+          this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
+          loading.close()
+        })
+        .catch(() => {
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
+          loading.close()
+        })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.saleSteelReports {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+    // height: ;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+    /deep/ .el-tooltip {
+      width: auto !important;
+    }
+    /deep/ .el-table__body {
+      overflow-y: auto;
+      position: absolute !important;
+      tr:hover > td {
+        background-color: #fff;
+      }
+    }
+
+    ::-webkit-scrollbar {
+      height: 20px;
+      width: 10px;
+      background-color: transparent;
+    }
+
+    /deep/ .scrollBarClass {
+      max-height: 200px;
+      width: 220px;
+    }
+  }
+  /deep/ .el-tabs__new-tab {
+    font-size: 20px;
+    line-height: 20px;
+    font-weight: 700 !important;
+    color: #000;
+  }
+
+  .batchCarrierClass {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .batchCapacityClass {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .dialog {
+    .exceptionHandleClass {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 20px;
+      margin-top: 20px;
+      margin-bottom: 20px;
+    }
+    .steelMapClass {
+      .steelMapClass1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass12 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass13 {
+          display: flex;
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass2 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass22 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .el-select {
+            .el-input .el-input--suffix {
+              .el-input__inner {
+                border: 0px solid !important;
+              }
+            }
+          }
+        }
+      }
+      .steelMapClass3 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass32 {
+          margin-left: 50px;
+          // margin-right: 10px;
+        }
+        .steelMapClass33 {
+          margin-left: 20px;
+          // margin-right: 10px;
+        }
+      }
+      .steelMapClass4 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass42 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass43 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass44 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass5 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass52 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .steelMapClass521 {
+            margin-left: 20px;
+          }
+        }
+      }
+      .steelMapClass9 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass92 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .steelMapClass921 {
+            text-align: start;
+            min-width: 350px;
+            .el-textarea {
+              width: auto;
+            }
+            // /deep/ .el-input__prefix {
+            //   display: inline-block;
+            //   position: relative;
+            //   border: 1px solid #dcdfe6;
+            //   box-sizing: border-box;
+            //   color: #606266;
+            //   font-size: inherit;
+            //   height: 40px;
+            //   line-height: 40px;
+            //   padding: 0 30px;
+            //   transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+            //   padding-left: 30px;
+            //   left: 0;
+            //   visibility: hidden;
+            // }
+            // /deep/ .el-textarea__inner {
+            //   position: absolute;
+            // }
+          }
+        }
+      }
+      .steelMapClass6 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass62 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+
+      .steelMapClass7 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass72 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+    }
+    .table1 {
+      margin-left: 20px;
+      margin-top: 20px;
+      .el-tooltip {
+        width: auto !important;
+      }
+    }
+    .columnShowDialogClass {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 65 - 0
src/views/SIDEWMS/components/oYeWaitInbound.vue

@@ -0,0 +1,65 @@
+<!-- 等待入库界面 -->
+<template>
+  <div class="waitInbound">
+    <div class="search">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="入库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="入库时间"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px"></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table"></div>
+  </div>
+</template>
+<script>
+export default {}
+</script>
+<style lang="scss" scoped></style>

+ 83 - 0
src/views/SIDEWMS/components/oYeWarehouse.vue

@@ -0,0 +1,83 @@
+<template>
+  <div class="oYeWarehouse">
+    <div class="search">
+      <el-button type="primary" @click="insert">新增</el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options"></dilTable>
+    </div>
+    <div class="dialog">
+      <el-dialog append-to-body title="新增" :visible.sync="dialogVisible">
+        <el-form>
+          <el-form-item label="厂外库大类" prop="warehouseArea">
+            <el-input v-model="insertForm.warehouseArea"></el-input>
+          </el-form-item>
+          <el-form-item label="具体仓库" prop="warehouseArea">
+            <el-input v-model="insertForm.warehouseName"></el-input>
+          </el-form-item>
+          <el-form-item label="承运商" prop="warehouseArea">
+            <el-input
+              v-model="insertForm.carrierName"
+              placeholder="请复制承运商名称"
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="makeSureInsertForm"
+              >确定</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      options: {
+        requestUrl: '/api/v1/ams/getOyeWarehouseSide?apiId=532'
+      },
+      con: '',
+      insertForm: {
+        warehouseArea: '厂外库',
+        warehouseName: ''
+      }
+    }
+  },
+  methods: {
+    insert() {
+      this.dialogVisible = true
+    },
+    makeSureInsertForm() {
+      console.log(this.insertForm, 'insertForm')
+      this.axios
+        .post('/api/v1/ams/insertOyeWarehouseSide', this.insertForm)
+        .then(res => {
+          if (res.data.status == 'succeed') {
+            this.dialogVisible = false
+            this.$message.success('新增成功')
+            this.options.requestUrl =
+              '/api/v1/ams/getOyeWarehouseSide?apiId=532&i=' + new Date()
+          } else {
+            this.$message.error('新增失败')
+          }
+        })
+      // this.dialogVisible = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.oYeWarehouse {
+  .search {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+}
+</style>

+ 1278 - 0
src/views/SIDEWMS/components/queueStart.vue

@@ -0,0 +1,1278 @@
+// 排队开始
+<template>
+  <div class="sale">
+    <div class="top">
+      <el-form :inline="true" style="margin-top: 1rem;">
+        <el-form-item>
+          <el-input
+            v-model.trim="capacityNo"
+            style="width:250px"
+            placeholder="输入车牌号查询"
+            clearable
+          >
+          </el-input>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclick"
+            style="margin-left: 4px;"
+            clearable
+            ><i class="el-icon-search"></i>查询车辆</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclickMaterial"
+            style="margin-left: 4px;"
+            clearable
+            ><i class="el-icon-search"></i>查询物资</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-badge :value="redDotNum" class="item">
+            <el-button type="primary" class="btn" @click="refresh">
+              <i class="el-icon-refresh"></i>刷新
+            </el-button>
+          </el-badge>
+        </el-form-item>
+        <el-form-item
+          ><el-button type="primary" class="btn" @click="allow">
+            <i class="el-icon-d-arrow-right"></i>放行
+          </el-button></el-form-item
+        >
+        <el-form-item
+          ><el-button type="primary" class="btn" disabled>
+            厂内钢材车辆总数
+          </el-button>
+          <el-input disabled style="width:100px" v-model="steelOrderNum">
+          </el-input>
+        </el-form-item>
+        <el-form-item
+          ><el-button type="primary" class="btn" disabled>
+            各仓库允许放行数
+          </el-button>
+          <el-input style="width:100px" v-model.number="allowMaxNum">
+          </el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 物资选择模态框 -->
+    <el-drawer
+      title="选择物资信息"
+      :visible.sync="table1"
+      direction="rtl"
+      size="90%"
+      :show-close="true"
+    >
+      <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
+            placeholder="请输入内容"
+            v-model="materialNameText"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;">规格</label>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            placeholder="请输入内容"
+            v-model="materialSpecificationText"
+            clearable
+            ><template slot="prepend">Φ</template></el-input
+          >
+        </el-form-item>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclickMaterial1"
+          style="margin-left: 4px;"
+          ><i class="el-icon-search"></i>查询</el-button
+        >
+        <el-button type="primary" @click="makeSureMaterial"
+          ><i class="el-icon-check"></i>确定</el-button
+        >
+      </el-form>
+      <div class="tablecls">
+        <!-- 查询所有的物资 -->
+        <dilTable
+          v-bind.sync="optionMa"
+          @selection-change="selectionChange2"
+          @rowDbClick="rowDbClick"
+        >
+        </dilTable>
+      </div>
+    </el-drawer>
+    <div class="tabs">
+      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+        <el-tab-pane label="单拼车辆排队链表" name="first">
+          <el-table
+            ref="mutiData"
+            :data="tableData1"
+            border
+            :row-key="getRowKey"
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChange"
+            max-height="500px"
+            @cell-click="cellClikSingle"
+            :cell-style="cellStyleSingle"
+          >
+            <!-- 是否可以勾选:selectable="selectInit" -->
+            <el-table-column
+              type="selection"
+              width="30"
+              reserve-selection
+              align="center"
+              :selectable="selectInit"
+            ></el-table-column>
+            <el-table-column label="装货点" width="100">
+              <template slot-scope="scope">
+                <el-select
+                  size="mini"
+                  v-model="scope.row.id"
+                  @change="changePriority(scope.row)"
+                >
+                  <el-option
+                    v-for="item in option"
+                    :key="item.id"
+                    :label="item.value"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              width="120"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+              align="center"
+              width="30"
+            ></el-table-column>
+            <el-table-column
+              prop="resultStartTime"
+              label="排队开始时间"
+              align="center"
+              width="150"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="consigneeName"
+              label="客户"
+              fit
+              show-overflow-tooltip
+              width="170"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              min-width="180"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="center"
+              width="55"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              min-width="160"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="60"
+            >
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码" width="120">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间" width="150">
+            </el-table-column>
+
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗" width="80">
+            </el-table-column> -->
+            <el-table-column fixed="right" label="操作" width="150">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="ctrlZQueueAllow(scope)"
+                >
+                  撤销放行
+                </el-button>
+                <el-button type="text" size="mini" @click="updateBill(scope)">
+                  修改提货单
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="两拼车辆排队链表" name="fourth">
+          <el-table
+            :data="tableData2"
+            :span-method="objectSpanMethod1"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChangeSpelling"
+            :row-key="getRowKey"
+            max-height="500px"
+            ref="twoSpellData"
+            :cell-style="cellStyleTwoSpelling"
+          >
+            <el-table-column
+              type="selection"
+              width="30"
+              align="center"
+              reserve-selection
+              :selectable="selectInitSplleing"
+            ></el-table-column>
+            <el-table-column label="装货点" width="100">
+              <template slot-scope="scope">
+                <el-select
+                  size="mini"
+                  v-model="scope.row.id"
+                  @change="changePriority(scope.row)"
+                >
+                  <el-option
+                    v-for="item in option"
+                    :key="item.id"
+                    :label="item.value"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              align="center"
+              width="120"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+              align="center"
+              width="30"
+            ></el-table-column>
+            <el-table-column
+              prop="resultStartTime"
+              label="排队开始时间"
+              width="150"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="consigneeName"
+              label="客户"
+              fit
+              width="170"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              min-width="180"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="center"
+              width="60"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              min-width="160"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="60"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="grid"
+              label="拼数"
+              fit
+              align="center"
+              width="50"
+            >
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码" width="120">
+            </el-table-column>
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗" width="100">
+            </el-table-column> -->
+            <el-table-column prop="sureTime" label="可进厂确认时间" width="150">
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="150">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="ctrlZQueueAllow(scope)"
+                >
+                  撤销放行
+                </el-button>
+                <el-button type="text" size="mini" @click="updateBill(scope)">
+                  修改提货单
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="多拼车辆排队链表" name="second">
+          <el-table
+            :data="tableData"
+            :span-method="objectSpanMethod"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChangeSpelling"
+            :row-key="getRowKey"
+            max-height="500px"
+            ref="spellData"
+            :cell-style="cellStyleSpelling"
+          >
+            <el-table-column
+              type="selection"
+              width="30"
+              align="center"
+              reserve-selection
+              :selectable="selectInitSplleing"
+            ></el-table-column>
+            <el-table-column label="装货点" width="100">
+              <template slot-scope="scope">
+                <el-select
+                  size="mini"
+                  v-model="scope.row.id"
+                  @change="changePriority(scope.row)"
+                >
+                  <el-option
+                    v-for="item in option"
+                    :key="item.id"
+                    :label="item.value"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              align="center"
+              width="120"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+              width="30"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="resultStartTime"
+              label="排队开始时间"
+              align="center"
+              width="150"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="consigneeName"
+              label="客户"
+              fit
+              width="170"
+              show-overflow-tooltip
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+              min-width="180"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="cenetr"
+              width="60"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              align="center"
+              min-width="160"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="60"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="grid"
+              label="拼数"
+              fit
+              width="60"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码" width="120">
+            </el-table-column>
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column> -->
+            <el-table-column prop="sureTime" label="可进厂确认时间" width="150">
+            </el-table-column>
+            <el-table-column fixed="right" label="操作" width="150">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="ctrlZQueueAllow(scope)"
+                >
+                  撤销放行
+                </el-button>
+                <el-button type="text" size="mini" @click="updateBill(scope)">
+                  修改提货单
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+        <el-tab-pane label="仓库排队列表" name="third">
+          <el-table
+            :data="tableData3"
+            border
+            style="width: 100%; margin-top: 20px"
+            max-height="500px"
+          >
+            <el-table-column
+              prop="warehouseName"
+              label="仓库"
+              fit
+            ></el-table-column>
+            <el-table-column prop="carQueue" label="排队车辆"></el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie } from '@/utils/util.js'
+import { isNumber } from '@/utils/sharedJsFile.js'
+export default {
+  data() {
+    return {
+      capacityNo: '',
+      inputText: '',
+      option1: {
+        // 表格请求数据的地址
+        requestUrl: '',
+        selectionType: 'select'
+      },
+      optionMa: {
+        // 表格请求数据的地址
+        requestUrl: '',
+        // 控制显示多选列
+        selectionType: 'select'
+      },
+      activeName: 'first',
+      tableData: [],
+      tableData1: [],
+      tableData2: [],
+      tableData3: [],
+      //存放每一行记录的合并数
+      spanArr: [],
+      spanArr1: [],
+      maplist: [],
+      id: null,
+      option: [],
+      filterArr1: [],
+      table1: false,
+      //物资选中表格
+      materialList: [],
+      //物资选中暂存
+      materialList1: [],
+      //物资信息查询内容
+      materialNameText: null,
+      materialSpecificationText: null,
+      materialModelText: null,
+      timer: null,
+      totalQueueNum: null,
+      redDotNum: null,
+      i: 0,
+      totalQueueNumFirst: null,
+      //厂内钢材车辆总数
+      steelOrderNum: 0,
+      isQueryCapacity: null,
+      //排队放行限制
+      releaseFlag: false,
+      allowMaxNum: localStorage.getItem('allowMaxNum') || 30
+    }
+  },
+  created() {
+    this.i = 0
+
+    this.infomation()
+    this.getReleaseFlag()
+    this.getSpellingArray()
+    this.getNoSpellingArray()
+    this.getStoreArray()
+    this.getSteelOrderNum()
+    this.wantEnfactory()
+    this.start()
+    localStorage.setItem('allowMaxNum', 30)
+  },
+  mounted() {},
+  computed: {
+    wantS() {
+      return this.totalQueueNum
+    }
+  },
+  beforeDestroy() {
+    this.timer
+  },
+  watch: {
+    wantS() {
+      if (this.totalQueueNum - this.totalQueueNumFirst > 0) {
+        this.redDotNum = this.totalQueueNum - this.totalQueueNumFirst
+      }
+    },
+    allowMaxNum() {
+      localStorage.setItem('allowMaxNum', this.allowMaxNum)
+    }
+  },
+  methods: {
+    //获取放行限制标志
+    getReleaseFlag() {
+      this.axios
+        .get('/api/v1/uc/getReleaseFlag')
+        .then(res => {
+          this.releaseFlag = res.data
+          console.log(res.data, 'res')
+        })
+        .catch(e => {
+          this.releaseFlag = false
+        })
+    },
+    //单拼样式调整
+    cellStyleSingle({ row, column, rowIndex, columnIndex }) {
+      if (
+        column.property == 'capacityNumber' ||
+        column.property == 'materialName' ||
+        column.property == 'materialSpecification'
+      ) {
+        return { fontSize: '16px', fontWeight: '600' }
+      } else {
+        return { fontSize: '15px' }
+      }
+    },
+    cellStyleTwoSpelling({ row, column, rowIndex, columnIndex }) {
+      if (
+        column.property == 'capacityNumber' ||
+        column.property == 'materialName' ||
+        column.property == 'materialSpecification'
+      ) {
+        return { fontSize: '16px', fontWeight: '600' }
+      } else {
+        return { fontSize: '15px' }
+      }
+    },
+    cellStyleSpelling({ row, column, rowIndex, columnIndex }) {
+      if (
+        column.property == 'capacityNumber' ||
+        column.property == 'materialName' ||
+        column.property == 'materialSpecification'
+      ) {
+        return { fontSize: '16px', fontWeight: '600' }
+      } else {
+        return { fontSize: '15px' }
+      }
+    },
+    ctrlZQueueAllow(scope) {
+      let map = {
+        listId: scope.row.listId,
+        resultTotalId: scope.row.resultTotalId
+      }
+      console.log(map)
+      this.axios.post('/api/v1/qms/ctrlZQueueAllow', map).then(res => {
+        if (res.data.code == 200) {
+          this.$message({
+            message: '撤销成功',
+            type: 'success',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+          this.getNoSpellingArray()
+          this.getSpellingArray()
+          this.getSpellingArrayTwo()
+        } else {
+          this.$message({
+            message: '撤销失败',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+        }
+      })
+    },
+    wantEnfactory() {
+      this.axios.get('/api/v1/uc/getQueueCount').then(res => {
+        this.totalQueueNum = res.data.data
+        console.log(this.totalQueueNum, 'totalQueueNum')
+        if (this.i == 0) {
+          this.totalQueueNumFirst = this.totalQueueNum
+        }
+        this.i++
+      })
+    },
+    start() {
+      this.timer = setInterval(this.wantEnfactory, 60000)
+    },
+    refresh() {
+      this.getReleaseFlag()
+      this.getSpellingArray()
+      this.getNoSpellingArray()
+      this.getSpellingArrayTwo()
+      this.getSteelOrderNum()
+      this.getStoreArray()
+      this.redDotNum = null
+      this.totalQueueNum = null
+      this.totalQueueNumFirst = null
+      this.isQueryCapacity = null
+      this.maplist = []
+      this.filterArr1 = []
+      this.i = 0
+      clearInterval(this.timer)
+      this.start()
+    },
+    getSteelOrderNum() {
+      this.axios.get('/api/v1/uc/getSteelOrderNum').then(res => {
+        this.steelOrderNum = res.data.data
+      })
+    },
+    getRowKey(row) {
+      return row.ROW_ID
+    },
+    selectInit(row) {
+      if (!this.releaseFlag) {
+        return true
+      }
+      //单拼的可勾选控制功能在这
+      //过滤出处在同一个网格上的数据
+      let gridData = this.tableData1.filter(e => {
+        return e.gridId === row.gridId && e.sureTime == null
+      })
+      //处理下maplist里面的数据
+      let reallyMaplist = this.maplist.map(e => {
+        return e.resultTotalId
+      })
+      //在maplist里面的不能进入到gridData里面来,遍历gridData移除在maplist里面的
+      let reallyGridData = gridData.filter(e => {
+        if (!reallyMaplist.includes(e.resultTotalId)) {
+          return e
+        }
+      })
+      //判断当前行是不是在reallyGridData的第一行,如果是就允许勾选,反之不行
+      if (
+        (reallyGridData.length > 0 &&
+          (row.resultTotalId === reallyGridData[0].resultTotalId ||
+            row.resultInsertTime != null)) ||
+        reallyMaplist.includes(row.resultTotalId)
+      ) {
+        return true
+      } else {
+        return false
+      }
+      // if (this.maplist.length == 0) {
+      //   if (row.ROW_ID == 1) {
+      //     return true
+      //   } else {
+      //     return false
+      //   }
+      // } else {
+      //   if (
+      //     this.maplist.some(e => {
+      //       return (
+      //         e.ROW_ID == row.ROW_ID ||
+      //         e.ROW_ID + 1 == row.ROW_ID ||
+      //         typeof row.ROW_ID == 'undefined'
+      //       )
+      //     })
+      //   ) {
+      //     return true
+      //   } else {
+      //     return false
+      //   }
+      // }
+    },
+    selectInitSplleing(row) {
+      if (!this.releaseFlag) {
+        return true
+      }
+      if (this.maplist.length == 0) {
+        if (row.group + 1 == 1) {
+          return true
+        } else {
+          return false
+        }
+      } else {
+        if (
+          this.maplist.some(e => {
+            return e.group == row.group || e.group + 1 == row.group
+          })
+        ) {
+          return true
+        } else {
+          return false
+        }
+      }
+    },
+    rowDbClick(row) {
+      this.materialList = []
+      this.materialList.push(row)
+      this.makeSureMaterial()
+    },
+    cellClikSingle(row, column, cell, event) {
+      if (
+        column.property == 'materialSpecification' ||
+        column.property == 'materialName'
+      ) {
+        this.materialList = []
+        this.materialList.push(row)
+        this.makeSureMaterial()
+      }
+    },
+    //物资模态框查询
+    onclickMaterial1() {
+      this.optionMa.requestUrl =
+        '/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=' +
+        this.materialNameText +
+        '&materialSpecificationText=' +
+        this.materialSpecificationText
+    },
+    onclickMaterial() {
+      this.table1 = true
+      this.optionMa.requestUrl =
+        '/api/v1/uc/getSteelMaterial?apiId=244&i=' + new Date()
+    },
+    //返回选中的物资信息
+    selectionChange2(selection) {
+      8
+      this.materialList1 = []
+      this.materialList1 = selection
+      this.materialList = this.materialList.concat(this.materialList1)
+    },
+    makeSureMaterial() {
+      if (this.materialList.length > 0) {
+        console.log(this.materialList)
+        var materialIdList = []
+        this.materialList.forEach(e => {
+          if (materialIdList.indexOf(e.materialId) == -1) {
+            materialIdList.push(e.materialId)
+          }
+        })
+        let map = {
+          materialList: materialIdList,
+          oYeFlag: 1,
+          businessType: '500'
+        }
+        // this.materialList = []
+        // this.materialList1 = []
+        if (this.activeName == 'first') {
+          this.axios
+            .post('/api/v1/qms/getQueueListByQueueUp?isSpelling=0', map)
+            .then(res => {
+              this.tableData1 = res.data.data
+            })
+        }
+        this.table1 = false
+      }
+    },
+    infomation() {
+      this.axios.get('/api/v1/uc/getSteelWarehouseSide').then(res => {
+        console.log(res.data)
+        this.option = res.data
+        console.log(this.option, 'this.option')
+      })
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1)
+          this.pos = 0
+          data[i].group = i
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
+            this.spanArr[this.pos] += 1
+            this.spanArr.push(0)
+            data[i].group = data[i - 1].group
+          } else {
+            this.spanArr.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
+          }
+        }
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1)
+          this.pos = 0
+          data[i].group = i
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
+            this.spanArr1[this.pos] += 1
+            this.spanArr1.push(0)
+            data[i].group = data[i - 1].group
+          } else {
+            this.spanArr1.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 10 ||
+        columnIndex === 11 ||
+        columnIndex === 12 ||
+        columnIndex === 13 ||
+        columnIndex === 14 ||
+        columnIndex === 15
+      ) {
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 10 ||
+        columnIndex === 11 ||
+        columnIndex === 12 ||
+        columnIndex === 13 ||
+        columnIndex === 14 ||
+        columnIndex === 15
+      ) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    handleClick() {
+      this.redDotNum = null
+      this.totalQueueNum = null
+      this.totalQueueNumFirst = null
+      this.i = 0
+      if (this.activeName == 'first') {
+        this.getNoSpellingArray()
+      } else if (this.activeName == 'second') {
+        this.getSpellingArray()
+      } else if (this.activeName == 'fourth') {
+        this.getSpellingArrayTwo()
+      } else {
+        this.getStoreArray()
+      }
+    },
+    getNoSpellingArray() {
+      let inboundWarehouse = null
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' + new Date(),
+          { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+        )
+        .then(res => {
+          this.tableData1 = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData1)
+        })
+    },
+    getSpellingArray() {
+      let inboundWarehouse = null
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
+            new Date(),
+          { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData)
+          this.getSpanArr(this.tableData)
+        })
+    },
+    getSpellingArrayTwo() {
+      let inboundWarehouse = null
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
+            new Date(),
+          { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+        )
+        .then(res => {
+          this.tableData2 = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData2)
+          this.getSpanArr1(this.tableData2)
+        })
+    },
+    getStoreArray() {
+      this.axios.post('/api/v1/qms/getStoreQueueList').then(res => {
+        this.tableData3 = res.data.data
+        console.log('getStoreArray ' + JSON.stringify(this.tableData3))
+      })
+    },
+    onclick() {
+      let inboundWarehouse = null
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        inboundWarehouse = getCookie('loginName')
+      }
+      if (this.activeName == 'first') {
+        this.axios
+          .post(
+            '/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' +
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo,
+            { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+          )
+          .then(res => {
+            this.isQueryCapacity = 1
+            this.tableData1 = res.data.data
+          })
+        console.log('wzxxx')
+      } else if (this.activeName == 'second') {
+        this.axios
+          .post(
+            '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo,
+            { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+          )
+          .then(res => {
+            this.isQueryCapacity = 1
+            this.tableData = res.data.data
+            this.getSpanArr(this.tableData)
+          })
+      } else if (this.activeName == 'fourth') {
+        this.axios
+          .post(
+            '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo,
+            { oYeFlag: 1, inboundWarehouse: inboundWarehouse, businessType: '500' }
+          )
+          .then(res => {
+            this.isQueryCapacity = 1
+            this.tableData2 = res.data.data
+            this.getSpanArr1(this.tableData2)
+          })
+      }
+    },
+    handleSelectionChange(selection) {
+      this.maplist = []
+      this.maplist = selection
+    },
+    handleSelectionChangeSpelling(selection) {
+      this.maplist = []
+      this.maplist = selection
+      // console.log(selection)
+      // for (let i = 0; i < this.maplist.length; i++) {
+      //   if (i + 1 < this.maplist.length) {
+      //     if (this.maplist[i].group + 1 != this.maplist[i + 1].group) {
+      //       this.$refs.spellData.clearSelection()
+      //       this.$refs.twoSpellData.clearSelection()
+      //     }
+      //   }
+      // }
+      // // 限制只取第一个去掉
+      // if (
+      //   !this.maplist.some(e => {
+      //     return e.group == 0
+      //   })
+      // ) {
+      //   this.$refs.spellData.clearSelection()
+      //   this.$refs.twoSpellData.clearSelection()
+      // }
+    },
+    updateBill(scope) {
+      console.log(scope.row.capacityId)
+      this.$router.push(
+        `/editBill/${scope.row.capacityId}/${scope.row.capacityNumber}`
+      )
+    },
+    filterArr(resultId) {
+      console.log('fdhjsaj')
+      this.filterArr1 = []
+      if (this.activeName == 'first') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData1.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'second') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'fourth') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData2.filter(ele => ele.resultId == resultId)
+        )
+      }
+    },
+    allow() {
+      if (this.maplist.length == 0) {
+        this.$message({
+          message: '请选择需要放行的车辆',
+          type: 'error',
+          duration: 2000,
+          center: true,
+          offset: 100
+        })
+        return
+      }
+      for (let i = 0; i < this.maplist.length; i++) {
+        console.log(typeof this.maplist[i].id)
+        if (
+          typeof this.maplist[i].id == 'undefined' ||
+          this.maplist[i].id == null ||
+          this.maplist[i].id == 'null'
+        ) {
+          this.$message({
+            message: '请选择装货点',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+          return
+        }
+        let warehouse = this.tableData3.find(
+          value => value.materialPriority === this.maplist[i].id
+        )
+        console.log('warehouse', warehouse)
+        this.filterArr(this.maplist[i].resultId)
+      }
+      console.log(this.filterArr1, 'this.fil')
+      var filterArr2 = []
+      this.filterArr1.forEach(e => {
+        if (filterArr2.indexOf(e) === -1) {
+          filterArr2.push(e)
+        }
+      })
+      let map = {
+        ssoId: getCookie('userId'),
+        mapList: filterArr2,
+        isQueryCapacity: this.isQueryCapacity
+      }
+      if (this.activeName == 'first') {
+        map.mapList = this.maplist
+      }
+      console.log('勾选的数据')
+      console.log(map)
+      this.axios
+        .post('/api/v1/qms/allowEnFactory', map)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message({
+              message: '放行成功,等待进厂',
+              type: 'success',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.filterArr1 = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            // this.getNoSpellingArray()
+            this.makeSureMaterial()
+            this.getSpellingArray()
+            this.getSpellingArrayTwo()
+            this.getStoreArray()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          } else {
+            this.$message({
+              message: '请按顺序勾选',
+              type: 'error',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.filterArr1 = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            // this.getNoSpellingArray()
+            this.makeSureMaterial()
+            this.getSpellingArray()
+            this.getStoreArray()
+            this.getSpellingArrayTwo()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          }
+        })
+        .catch(e => {
+          console.log(e)
+          this.maplist = []
+          this.filterArr1 = []
+          this.$refs.mutiData.clearSelection()
+          this.$refs.spellData.clearSelection()
+          this.$refs.twoSpellData.clearSelection()
+          this.getNoSpellingArray()
+          this.getSpellingArray()
+          this.getStoreArray()
+          this.getSpellingArrayTwo()
+          this.redDotNum = null
+          this.totalQueueNum = null
+          this.totalQueueNumFirst = null
+          this.i = 0
+          clearInterval(this.timer)
+          this.start()
+        })
+    },
+    changePriority(row) {
+      console.log('装货点:' + row.id)
+      console.log('订单id' + row.orderId)
+      console.log('物资ID' + row.materialId)
+      let map = {
+        id: row.id,
+        orderId: row.orderId,
+        materialId: row.materialId
+      }
+      this.axios.post('/api/v1/qms/modifyLoadWarehouse', map).then(res => {
+        console.log(res)
+        if (res.data.code == '200') {
+          this.$message({
+            message: '更新装货点成功',
+            type: 'success',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+        } else {
+          this.$message({
+            message: '更新装货点失败',
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+        }
+      })
+      //this.axios.post("")
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.sale {
+  .top {
+    width: 100%;
+    height: 80px;
+    display: flex;
+    align-items: center;
+    padding-left: 40px;
+    .el-form {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-form-item__label {
+        align-items: center;
+        line-height: 80px;
+      }
+    }
+  }
+  .input {
+    width: 250px;
+    margin-right: 20px;
+  }
+  .tabs {
+    margin-left: 20px;
+    margin-top: 10px;
+    .tabs /deep/ .el-tabs__nav {
+      font-size: 40px;
+    }
+  }
+}
+</style>

+ 354 - 0
src/views/SIDEWMS/components/sendReceiveReport.vue

@@ -0,0 +1,354 @@
+<template>
+  <div class="sendReceiveReport">
+    <div class="top">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="日期"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="日期"
+            style="width: 180px;"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="选择条件"
+            style="width:180px"
+            clearable
+          >
+            <el-option
+              v-for="(item, index) in selectOptions"
+              :label="item.label"
+              :key="index"
+              :value="item.value"
+            ></el-option>
+          </el-select>
+          <el-input v-model="con1" style="width:200px" clearable></el-input>
+        </el-form-item>
+        <el-button type="primary" @click="search">查询</el-button>
+        <el-button type="primary" @click="exportToExcel">导出</el-button>
+
+        <el-form-item></el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        border
+        highlight-current-row
+        max-height="680px"
+        :summary-method="getSummaries"
+        :show-summary="true"
+        :row-style="{ height: '30px' }"
+        :cell-style="returnClassName"
+        @cell-dblclick="cellDbClick"
+      >
+        <el-table-column
+          v-for="item in tableTop"
+          :prop="item.prop"
+          :key="item.prop"
+          :label="item.label"
+          :column-key="item.prop"
+          :width="item.width"
+          show-overflow-tooltip
+          align="center"
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie, formatDate, accAdd } from '@/utils/util.js'
+export default {
+  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.getTime()
+    }
+    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.getTime()
+    }
+    return {
+      options: {
+        requestUrl: '',
+        requestQuery: {},
+        isPagination: false,
+        pageSize: 500,
+        pageNum: 1
+      },
+      selectOptions: [
+        {
+          value: 'companyName',
+          label: '客户'
+        },
+        {
+          value: 'saleArea',
+          label: '片区'
+        },
+        {
+          value: 'inboundWarehouse',
+          label: '具体仓库'
+        },
+        {
+          value: 'materialName',
+          label: '物资名称'
+        },
+        {
+          value: 'materialSpe',
+          label: '规格'
+        }
+      ],
+      con: '',
+      con1: '',
+      screen: '',
+      screen1: '',
+      startTime: generateStartDate(),
+      endTime: generateEndDate(),
+      loginName: null,
+      userName: null,
+      inboundWarehouse: null,
+      showSummaryList: [
+        'materialWeight',
+        'materialNumber',
+        'inboundMaterialNumber',
+        'inboundMaterialWeight',
+        'outboundMaterialNumber',
+        'outboundMaterialWeight',
+        'currentInboundMaterialNumber',
+        'currentInboundTheoryWeight',
+        'currentOutboundMaterialNumber',
+        'currentOutboundTheoryWeight',
+        'currentInboundTheoryWeight'
+      ],
+      tableData: [],
+      tableTop: [
+        { label: '客户', prop: 'companyName', width: '250px' },
+        { label: '片区', prop: 'saleArea', width: '250px' },
+        { label: '出库库房', prop: 'inboundWarehouse', width: '180px' },
+        { label: '物资名称', prop: 'materialName', width: '180px' },
+        { label: '规格', prop: 'materialSpe', width: '100px' },
+        { label: '型号', prop: 'materialModel', width: '100px' },
+        { label: '米数', prop: 'meter', width: '80px' },
+        { label: '单重', prop: 'singleWeight', width: '80px' },
+        { label: '总入库件数', prop: 'inboundMaterialNumber', width: '100px' },
+        { label: '总入库重量', prop: 'inboundMaterialWeight', width: '100px' },
+        { label: '总出库件数', prop: 'outboundMaterialNumber', width: '100px' },
+        { label: '总出库重量', prop: 'outboundMaterialWeight', width: '100px' },
+        {
+          label: '当前入库数量',
+          prop: 'currentInboundMaterialNumber',
+          width: '100px'
+        },
+        {
+          label: '当前入库重量',
+          prop: 'currentInboundTheoryWeight',
+          width: '100px'
+        },
+        {
+          label: '当前出库数量',
+          prop: 'currentOutboundMaterialNumber',
+          width: '100px'
+        },
+        {
+          label: '当前出库重量',
+          prop: 'currentOutboundTheoryWeight',
+          width: '100px'
+        },
+        { label: '库存件数', prop: 'materialNumber', width: '100px' },
+        { label: '库存重量', prop: 'materialWeight', width: '100px' }
+      ]
+    }
+  },
+  created() {
+    console.log('我在这里')
+    this.getInfo()
+    this.getRequestUrl()
+  },
+  mounted() {},
+  methods: {
+    cellDbClick(row, column, cell, event) {
+      console.log(row)
+      console.log(column)
+      let map = {}
+      map.startTime = this.startTime
+      map.endTime = this.endTime
+      map.consigneeName = row.companyName
+      map.saleArea = row.saleArea
+      map.inboundWarehouse = row.inboundWarehouse
+      map.materialName = row.materialName
+      map.materialSpe = row.materialSpe
+      map.materialModel = row.materialModel
+      if (column.label.includes('当日入库')) {
+        this.$router.push({
+          path: '/oYeInbound',
+          query: map
+        })
+      }
+      if (column.label.includes('当日出库')) {
+        this.$router.push({
+          path: '/oYeOutbound',
+          query: map
+        })
+      }
+      if (column.label.includes('总出库')) {
+        map.startTime = null
+        map.endTime = null
+        this.$router.push({
+          path: '/oYeOutbound',
+          query: map
+        })
+      }
+      if (column.label.includes('总入库')) {
+        map.startTime = null
+        map.endTime = null
+        this.$router.push({
+          path: '/oYeInbound',
+          query: map
+        })
+      }
+      console.log(map)
+    },
+    getInfo() {
+      this.orgCode = getCookie('orgCode')
+      if (this.orgCode == 'shouhuokehu' || this.orgCode == 'chengyunshang') {
+        this.loginName = getCookie('loginName')
+      } else if (this.orgCode == 'ouyechangwaiku') {
+        this.loginName = null
+        this.inboundWarehouse = getCookie('loginName')
+      } else {
+        this.loginName = null
+      }
+    },
+    getRequestUrl() {
+      let optionsQuery = {}
+      optionsQuery[this.screen] = this.con
+      optionsQuery[this.screen1] = this.con1
+      if (this.loginName != null) {
+        optionsQuery['companyName'] = this.loginName
+      }
+
+      optionsQuery['startTime'] = this.startTime
+      optionsQuery['endTime'] = this.endTime
+      if (this.orgCode == 'xiaoshouyewuyuan') {
+        optionsQuery['saler'] = getCookie('loginName')
+      }
+      this.axios
+        .post('/api/v1/wms/receiveSendReport', optionsQuery)
+        .then(res => {
+          this.tableData = res.data.data || []
+        })
+    },
+    search() {
+      this.getRequestUrl()
+    },
+    //表尾合计行
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        if (this.showSummaryList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return accAdd(prev, curr)
+              } else {
+                return prev
+              }
+            }, 0)
+            // sums[index] = sums[index]
+          } else {
+            sums[index] = 'N/A'
+          }
+        }
+        //遍历数组,找到符合条件的列
+      })
+
+      return sums
+    },
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      return {
+        fontWeight: '500 !important',
+        fontSize: '14px !important',
+        width: 'auto !important'
+        // backgroundColor: '#FFFF01'
+      }
+    },
+    exportToExcel(tableTitle = '欧冶出入库台账') {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let data = []
+      this.tableData.forEach((item, index) => {
+        let temp = {}
+        this.tableTop.forEach(col => {
+          temp[col.label] = item[col.prop]
+        })
+        data.push(temp)
+      })
+      //将json数组转换成sheet
+      let table_sheet = XLSX.utils.json_to_sheet(data)
+      //为工作簿添加sheet
+      XLSX.utils.book_append_sheet(wb, table_sheet, '欧冶出入库台账')
+      //导出
+      XLSX.writeFile(wb, '欧冶出入库台账' + '.xlsx')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.sendReceiveReport {
+  .top {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .table {
+    margin-left: 10px;
+    margin-right: 10px;
+  }
+  /deep/ .el-table__footer-wrapper {
+    font-weight: 700 !important;
+    font-size: 16px !important;
+  }
+}
+</style>

+ 151 - 0
src/views/SIDEWMS/components/slider.vue

@@ -0,0 +1,151 @@
+<template>
+  <div class="slider" ref="slider">
+    <div class="process" :style="{ width }"></div>
+    <div class="thunk" ref="trunk" :style="{ left }">
+      <div class="block"></div>
+      <div class="tips">
+        <span>{{ scale * 100 }}</span>
+        <i class="fas fa-caret-down"></i>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+/*
+ * min 进度条最小值
+ * max 进度条最大值
+ * v-model 对当前值进行双向绑定实时显示拖拽进度
+ * */
+export default {
+  name: 'slider',
+  props: ['min', 'max', 'value'],
+  data() {
+    return {
+      slider: null, //滚动条DOM元素
+      thunk: null, //拖拽DOM元素
+      per: this.value //当前值
+    }
+  },
+  //渲染到页面的时候
+  mounted() {
+    this.slider = this.$refs.slider
+    this.thunk = this.$refs.trunk
+    var _this = this
+    this.thunk.onmousedown = function(e) {
+      var width = parseInt(_this.width)
+      var disX = e.clientX
+      document.onmousemove = function(e) {
+        // value, left, width
+        // 当value变化的时候,会通过计算属性修改left,width
+
+        // 拖拽的时候获取的新width
+        var newWidth = e.clientX - disX + width
+        // 拖拽的时候得到新的百分比
+        var scale = newWidth / _this.slider.offsetWidth
+        _this.per = Math.ceil((_this.max - _this.min) * scale + _this.min)
+        _this.per = Math.max(_this.per, _this.min)
+        _this.per = Math.min(_this.per, _this.max)
+        _this.$emit('input', _this.per)
+      }
+      document.onmouseup = function() {
+        document.onmousemove = document.onmouseup = null
+      }
+      return false
+    }
+  },
+  computed: {
+    // 设置一个百分比,提供计算slider进度宽度和trunk的left值
+    // 对应公式为  当前值-最小值/最大值-最小值 = slider进度width / slider总width
+    // trunk left =  slider进度width + trunk宽度/2
+    scale() {
+      return (this.per - this.min) / (this.max - this.min)
+    },
+    width() {
+      if (this.slider) {
+        return this.slider.offsetWidth * this.scale + 'px'
+      } else {
+        return 0 + 'px'
+      }
+    },
+    left() {
+      if (this.slider) {
+        return (
+          this.slider.offsetWidth * this.scale -
+          this.thunk.offsetWidth / 2 +
+          'px'
+        )
+      } else {
+        return 0 + 'px'
+      }
+    }
+  }
+}
+</script>
+<style>
+.box {
+  margin: 100px auto 0;
+  width: 80%;
+}
+.clear:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.slider {
+  position: relative;
+  margin: 20px 0;
+  width: 400px;
+  height: 10px;
+  background: #e4e7ed;
+  border-radius: 5px;
+  cursor: pointer;
+}
+.slider .process {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 112px;
+  height: 10px;
+  border-radius: 5px;
+  background: #409eff;
+}
+.slider .thunk {
+  position: absolute;
+  left: 100px;
+  top: -7px;
+  width: 20px;
+  height: 20px;
+}
+.slider .block {
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  border: 2px solid #409eff;
+  background: rgba(255, 255, 255, 1);
+  transition: 0.2s all;
+}
+.slider .tips {
+  position: absolute;
+  left: -7px;
+  bottom: 30px;
+  min-width: 15px;
+  text-align: center;
+  padding: 4px 8px;
+  background: #000;
+  border-radius: 5px;
+  height: 24px;
+  color: #fff;
+}
+.slider .tips i {
+  position: absolute;
+  margin-left: -5px;
+  left: 50%;
+  bottom: -9px;
+  font-size: 16px;
+  color: #000;
+}
+.slider .block:hover {
+  transform: scale(1.1);
+  opacity: 0.6;
+}
+</style>

+ 455 - 0
src/views/SIDEWMS/components/steelTransportReport.vue

@@ -0,0 +1,455 @@
+<template>
+  <div class="steelTransportReport">
+    <div class="top">
+      <el-form :inline="true">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >订单日期:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:140px"
+            :picker-options="pickerOptions"
+          >
+          </el-date-picker>
+          <!-- <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:140px"
+            :picker-options="pickerOptions1"
+          >
+          </el-date-picker> -->
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportToExcel('钢材运输情况统计表')"
+            >下载Excel</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="main" id="excelDom">
+      <table class="title">
+        <th>{{ titleTXT }}钢材运输情况统计表</th>
+      </table>
+      <div class="null"></div>
+      <el-table
+        :data="tableData"
+        id="tableRef"
+        ref="tableRef"
+        border
+        :row-style="{ height: '30px' }"
+      >
+        <el-table-column
+          prop="carrierDirection"
+          label="承运方向"
+          align="center"
+          width="100"
+          column-key="carrierDirection"
+          key="carrierDirection"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrierLine"
+          label="承运线路"
+          width="300"
+          align="center"
+          column-key="carrierLine"
+          key="carrierLine"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrier"
+          label="承运商"
+          align="center"
+          width="100"
+          column-key="carrier"
+          key="carrier"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="noUploadPlanTruckNumber"
+          label="待审核计划"
+          align="center"
+          column-key="noUploadPlanTruckNumber"
+          width="110"
+          key="noUploadPlanTruckNumber"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="processPlanTruckNumber"
+          label="已审核计划"
+          align="center"
+          column-key="processPlanTruckNumber"
+          width="90"
+          key="processPlanTruckNumber"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="unArragePlanTruckNumber"
+          label="未派发"
+          align="center"
+          column-key="unArragePlanTruckNumber"
+          key="unArragePlanTruckNumber"
+          width="80"
+        >
+        </el-table-column>
+        <el-table-column label="安排运力" align="center">
+          <el-table-column
+            prop="arrageTruckNumber"
+            label="已安排"
+            align="center"
+            column-key="arrageTruckNumber"
+            key="arrageTruckNumber"
+            width="80"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="dispatchOrderEd"
+            label="未接收"
+            align="center"
+            column-key="dispatchOrderEd"
+            key="dispatchOrderEd"
+            width="80"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="receivedOrder"
+            label="已接单"
+            align="center"
+            column-key="receivedOrder"
+            key="receivedOrder"
+            width="80"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="queueOrder"
+            label="排队中"
+            align="center"
+            column-key="queueOrder"
+            key="queueOrder"
+            width="80"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="outBoundEd"
+            label="已出库"
+            align="center"
+            column-key="outBoundEd"
+            key="outBoundEd"
+            width="80"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="finishEd"
+            label="已完成(签收)"
+            align="center"
+            column-key="finishEd"
+            key="finishEd"
+            width="80"
+          >
+          </el-table-column>
+        </el-table-column>
+        <!-- <el-table-column
+          prop="remark"
+          label="备注"
+          align="center"
+          column-key="remark"
+          key="remark"
+
+        >
+        </el-table-column> -->
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from '@/utils/sharedJsFile'
+import FileSaver from 'file-saver'
+export default {
+  data() {
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()
+        },
+        shortcuts: [
+          {
+            text: '今天',
+            onClick(picker) {
+              picker.$emit('pick', new Date())
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '一周前',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', date)
+            }
+          }
+        ]
+      },
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() > Date.now()
+        },
+        shortcuts: [
+          {
+            text: '今天',
+            onClick(picker) {
+              picker.$emit('pick', new Date())
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24)
+              picker.$emit('pick', date)
+            }
+          },
+          {
+            text: '一周前',
+            onClick(picker) {
+              const date = new Date()
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', date)
+            }
+          }
+        ]
+      },
+      startTime: new Date(),
+      // endTime: new Date(),
+      titleTXT: null,
+      tableData: [],
+      sumList: [
+        'noUploadPlanTruckNumber',
+        'processPlanTruckNumber',
+        'arrageTruckNumber',
+        'unArragePlanTruckNumber',
+        'finishEd',
+        'outBoundEd',
+        'dispatchOrderEd',
+        'receivedOrder',
+        'queueOrder'
+      ],
+      spanArr: [],
+      mergeList: ['carrierDirection', 'carrier']
+    }
+  },
+  created() {
+    this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+      1}月${this.startTime.getDate()}日08:00 - ${new Date(
+      sjTime(this.startTime) + 86400000
+    ).getFullYear()}年${new Date(sjTime(this.startTime) + 86400000).getMonth() +
+      1}月${new Date(sjTime(this.startTime) + 86400000).getDate()}日08:00`
+    this.steelTransportReport()
+  },
+  watch: {
+    startTime() {
+      this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+        1}月${this.startTime.getDate()}日08:00 - ${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getFullYear()}年${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getMonth() + 1}月${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getDate()}日08:00`
+      this.steelTransportReport()
+    }
+    // tableData: {
+    //   immediate: true,
+    //   handler() {
+    //     this.$nextTick(() => {
+    //       const tds = this.$refs.tableRef.$el
+    //         .querySelector('.el-table__footer-wrapper')
+    //         .querySelector('.el-table__footer')
+    //       console.log(tds)
+    //       let cell = tds.rows[0].cells
+    //       cell[1].style.display = 'none'
+    //       cell[2].style.display = 'none'
+    //       console.log(cell, 'cell')
+    //       cell[0].colSpan = '3'
+    //     })
+    //   }
+    // }
+  },
+  mounted() {
+    this.showSummariesPosition()
+  },
+  methods: {
+    showSummariesPosition() {
+      // const table = document.querySelector('.main')
+      // const footer = document.querySelector('.main .el-table__footer-wrapper')
+      // const footerTable = document.querySelector(
+      //   '.main .el-table__footer-wrapper .el-table__footer .has-gutter'
+      // )
+      // console.log(footerTable, 'footerTable')
+      // console.log(footer, 'foo')
+      // footer.style.border = '1px,solid,#000'
+      // footer.style.fontWeight = 700
+      // console.log(footer.style, 'foo')
+      // table.removeChild(footer); // 移除表格最下方的合计行
+      // table.insertBefore(footer, body); // 把合计行插入到表格body的上面
+    },
+    onclick() {
+      this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+        1}月${this.startTime.getDate()}日08:00 - ${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getFullYear()}年${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getMonth() + 1}月${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getDate()}日08:00`
+      this.steelTransportReport()
+    },
+    exportToExcel(tableTitle = '表格标题') {
+      let tables = document.getElementById('tableRef') //此处是拿表格document元素,也可以取父div的ref
+      let table_book = XLSX.utils.table_to_book(tables)
+      var table_write = XLSX.write(table_book, {
+        bookType: 'xlsx',
+        bookSST: true,
+        type: 'array'
+      })
+      try {
+        FileSaver.saveAs(
+          new Blob([table_write], { type: 'application/octet-stream' }),
+          tableTitle + '.xlsx'
+        )
+      } catch (e) {
+        if (typeof console !== 'undefined') console.log(e, table_write)
+      }
+      return table_write
+    },
+
+    steelTransportReport() {
+      this.axios
+        .post(
+          '/api/v1/tms/oYeSteelTransportReport?startTime=' +
+            sjTime(this.startTime) +
+            '&endTime=' +
+            sjTime(this.startTime)
+        )
+        .then(res => {
+          let summaryRow = {
+            carrierDirection: '合计',
+            finishEd: 0,
+            outBoundEd: 0,
+            queueOrder: 0,
+            receivedOrder: 0,
+            dispatchOrderEd: 0,
+            arrageTruckNumber: 0,
+            unArragePlanTruckNumber: 0,
+            processPlanTruckNumber: 0,
+            noUploadPlanTruckNumber: 0
+          }
+          res.data.data.forEach(item => {
+            summaryRow.finishEd += item.finishEd
+            summaryRow.outBoundEd += item.outBoundEd
+            summaryRow.enFactoryEd += item.enFactoryEd
+            summaryRow.queueOrder += item.queueOrder
+            summaryRow.receivedOrder += item.receivedOrder
+            summaryRow.dispatchOrderEd += item.dispatchOrderEd
+            summaryRow.arrageTruckNumber += item.arrageTruckNumber
+            summaryRow.unArragePlanTruckNumber += item.unArragePlanTruckNumber
+            summaryRow.processPlanTruckNumber += item.processPlanTruckNumber
+            summaryRow.noUploadPlanTruckNumber += item.noUploadPlanTruckNumber
+          })
+          this.tableData = res.data.data
+          this.tableData.push(summaryRow)
+        })
+    },
+    cellStyle({ row, column, rowIndex, columnIndex }) {
+      return { border: '1px,solid,#000' }
+    },
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        console.log(column, index)
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = '合计'
+          return
+        }
+        if (index === 1) {
+          return
+        }
+        if (this.sumList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+            sums[index] = sums[index]
+            // console.log("sums");
+            // console.log(sums[index]);
+          } else {
+            sums[index] = 'N/A'
+          }
+        }
+        //遍历数组,找到符合条件的列
+      })
+      return sums
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.steelTransportReport {
+  .top {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .main {
+    .title {
+      display: flex;
+      justify-content: left;
+      align-items: center;
+      margin-left: 40px;
+      font-size: 30px;
+      font-weight: 700;
+      color: #000;
+    }
+
+    // /deep/ .el-table__body {
+    //   overflow-y: auto;
+    //   position: absolute !important;
+    //   tr:hover > td {
+    //     background-color: #fff;
+    //   }
+    // }
+
+    /deep/ .el-table__row > td {
+      // overflow-y: auto;
+      // position: absolute !important;
+
+      border: 1px, solid, #000 !important;
+    }
+
+    .null {
+      height: 20px;
+    }
+  }
+}
+</style>

+ 529 - 0
src/views/SIDEWMS/components/yawnReport.vue

@@ -0,0 +1,529 @@
+<template>
+  <!-- 万州港装船作业报表 -->
+  <div style="width:100%;">
+    <div style="height:100%;width:100%">
+      <div style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+        <el-date-picker
+          style="margin: 10px;"
+          v-model="map.startTime"
+          type="date"
+          placeholder="起始日期"
+        ></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="search"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="exportToExcel('钢材欠运力报表.xlsx')"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-download"></i>导出excel
+        </el-button>
+      </div>
+      <!-- 装车出库详情 -->
+      <div
+        ref="yawnReport"
+        style="width:100%;height:500px;float:left;margin-left:5px"
+      >
+        <table class="title">
+          <th>{{ titleTXT }}钢材欠运力统计表</th>
+        </table>
+        <div class="table">
+          <el-table
+            ref="yawnReportData"
+            highlight-current-row
+            border
+            fit
+            :data="yawnReportData"
+            :span-method="objectSpanMethod"
+            :row-style="{ height: '30px' }"
+            :cell-style="returnClassName"
+            height="680px"
+            style="width: 100%;font-size: 18px"
+          >
+            <el-table-column
+              align="center"
+              prop="target"
+              label="方向"
+              width="120px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="carrierName"
+              label="承运商"
+              width="100px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="planNum"
+              label="审核计划"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="orderNum"
+              label="已派计划"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="notSendNum"
+              label="未派车"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="unReceiveNum"
+              label="未接收"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="receivedNum"
+              label="已接单"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="queueNum"
+              label="排队中"
+              width="80px"
+            >
+            </el-table-column>
+            <!-- <el-table-column
+              align="center"
+              prop="notEnNum"
+              label="未进厂数"
+              width="100px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="EnNum"
+              label="进厂待装数"
+              width="100px"
+            >
+            </el-table-column> -->
+            <el-table-column
+              align="center"
+              prop="percent"
+              label="派车率"
+              width="110px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="numGong"
+              label="工地"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="numCang"
+              label="库房"
+              width="80px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="totalNet"
+              label="磅重"
+              width="100px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="materialThoWeight"
+              label="理重"
+              width="110px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="unloadThoWeight"
+              label="未装(理重)"
+              width="110px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="trainWeight"
+              label="车皮(磅重)"
+              width="100px"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="trainThoWeight"
+              label="车皮(理重)"
+              width="100px"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from '@/components/Page/Title'
+import { sjTime } from '@/utils/sharedJsFile'
+import { accAdd } from '@/utils/util.js'
+import FileSaver from 'file-saver'
+import BigNumber from 'bignumber.js'
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      count: 0,
+      yawnReportData: [],
+      map: {
+        input: '',
+        startTime: null,
+        endTime: null
+      },
+      spanArr: [], // 用于存放需要合并的行的个数
+      spanIndex: 0, // 记录spanArr数组的下标
+      titleTXT: '',
+      startTime: new Date()
+    }
+  },
+  created() {
+    let endTime = new Date()
+    endTime.setHours(8)
+    endTime.setMinutes(0)
+    endTime.setSeconds(0)
+    let startTime = new Date(endTime.getTime())
+    this.map.startTime = startTime
+    this.map.endTime = endTime
+    this.startTime = startTime
+    this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+      1}月${this.startTime.getDate()}日08:00 - ${new Date(
+      sjTime(this.startTime) + 86400000
+    ).getFullYear()}年${new Date(sjTime(this.startTime) + 86400000).getMonth() +
+      1}月${new Date(sjTime(this.startTime) + 86400000).getDate()}日08:00`
+  },
+  mounted() {
+    this.search()
+  },
+  watch: {
+    startTime() {
+      console.log(this.startTime, 'this.startTime')
+      this.titleTXT = `${this.startTime.getFullYear()}年${this.startTime.getMonth() +
+        1}月${this.startTime.getDate()}日08:00 - ${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getFullYear()}年${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getMonth() + 1}月${new Date(
+        sjTime(this.startTime) + 86400000
+      ).getDate()}日08:00`
+    }
+  },
+  methods: {
+    returnClassName({ row, column, rowIndex, columnIndex }) {
+      if (row.flag == 1) {
+        console.log(row.carrierName)
+        return {
+          fontWeight: '700 !important',
+          backgroundColor: '#FFFF01'
+        }
+      }
+      if (row.daySumFlag == 1) {
+        return {
+          fontWeight: '700 !important',
+          backgroundColor: '#BFBFBF'
+        }
+      }
+      if (row.monthFlag == 1) {
+        return {
+          fontWeight: '700 !important',
+          backgroundColor: '#91D054'
+        }
+      }
+      if (row.onlyRowFlag == 1 && column.label != '方向') {
+        console.log(column.prop, 'BFBFBF')
+        return {
+          fontWeight: '700 !important',
+          backgroundColor: '#FFFF01'
+        }
+      }
+    },
+    //查询装车数据
+    search() {
+      //时间校验
+      if (this.map.startTime && this.map.endTime) {
+        // if (this.map.startTime >= this.map.endTime) {
+        //   this.$message({
+        //     message: '结束日期必须大于起始日期!',
+        //     type: 'warning',
+        //     duration: 2000
+        //   })
+        //   return
+        // }
+        this.startTime = this.map.startTime
+        this.map.startTime = sjTime(this.map.startTime)
+        this.map.endTime = sjTime(this.map.endTime)
+      } else {
+        this.$message({
+          message: '起止日期错误!',
+          type: 'warning',
+          duration: 2000
+        })
+        return
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      this.axios.post('/api/v1/tms/oYeYawnReport', this.map).then(res => {
+        if (res.data.code == '200') {
+          let countRow = {
+            EnNum: 0,
+            carrierName: '',
+            no: -1,
+            notEnNum: 0,
+            notSendNum: 0,
+            numCang: 0,
+            numGong: 0,
+            orderNum: 0,
+            percent: '',
+            planNum: 0,
+            unReceiveNum: 0,
+            receivedNum: 0,
+            queueNum: 0,
+            totalNet: 0,
+            materialThoWeight: 0,
+            unloadThoWeight: 0,
+            target: '合计'
+          }
+          res.data.data.forEach(item => {
+            if (item.target != '月合计') {
+              countRow.notSendNum += item.notSendNum
+              countRow.numCang += item.numCang
+              countRow.numGong += item.numGong
+              countRow.orderNum += item.orderNum
+              countRow.planNum += item.planNum
+              countRow.unReceiveNum += item.unReceiveNum
+              countRow.receivedNum += item.receivedNum
+              countRow.queueNum += item.queueNum
+              // countRow.totalNet =
+              //   (countRow.totalNet * 10000 + item.totalNet * 10000) / 10000
+              // countRow.materialThoWeight =
+              //   (countRow.materialThoWeight * 10000 +
+              //     item.materialThoWeight * 10000) /
+              //   10000
+              countRow.totalNet = accAdd(countRow.totalNet, item.totalNet)
+              countRow.materialThoWeight = accAdd(
+                countRow.materialThoWeight,
+                item.materialThoWeight
+              )
+              countRow.unloadThoWeight = accAdd(
+                countRow.unloadThoWeight,
+                item.unloadThoWeight
+              )
+
+              // countRow.unloadThoWeight =
+              //   (countRow.unloadThoWeight * 10000 +
+              //     item.unloadThoWeight * 10000) /
+              //   10000
+              // countRow.trainWeight =
+              //   (item.trainWeight * 10000 + countRow.trainWeight * 10000) /
+              //   10000
+              // countRow.trainThoWeight =
+              //   (item.trainThoWeight * 10000 +
+              //     countRow.trainThoWeight * 10000) /
+              //   10000
+            }
+          })
+          if (countRow.planNum) {
+            countRow.percent =
+              (
+                (countRow.orderNum / (countRow.planNum - countRow.quxiaoNum)) *
+                100
+              ).toFixed(2) + '%'
+          } else {
+            countRow.percent = 'NAL'
+          }
+          countRow.daySumFlag = 1
+          res.data.data.splice(res.data.data.length - 1, 0, countRow)
+          res.data.data[res.data.data.length - 1].monthFlag = 1
+          const map1 = res.data.data.reduce((result, item) => {
+            result[item.target] = result[item.target] || []
+            result[item.target].push(item)
+            return result
+          }, {})
+          let result = Object.values(map1)
+          result.forEach(arrayList => {
+            if (arrayList.length > 1) {
+              let countRow1 = {
+                carrierName: '',
+                no: -1,
+                notSendNum: 0,
+                numCang: 0,
+                numGong: 0,
+                orderNum: 0,
+                percent: '',
+                planNum: 0,
+                unReceiveNum: 0,
+                receivedNum: 0,
+                queueNum: 0,
+                totalNet: 0,
+                materialThoWeight: 0,
+                unloadThoWeight: 0,
+                carrierName: '合计',
+                target: arrayList[0].target,
+                flag: 1
+              }
+              arrayList.forEach(item => {
+                if (!item.target.includes('合计')) {
+                  countRow1.notSendNum += item.notSendNum
+                  countRow1.numCang += item.numCang
+                  countRow1.numGong += item.numGong
+                  countRow1.orderNum += item.orderNum
+                  countRow1.planNum += item.planNum
+                  countRow1.unReceiveNum += item.unReceiveNum
+                  countRow1.receivedNum += item.receivedNum
+                  countRow1.queueNum += item.queueNum
+                  // countRow1.totalNet =
+                  //   (countRow1.totalNet * 1000 + item.totalNet * 1000) / 1000
+                  // countRow1.materialThoWeight =
+                  //   (countRow1.materialThoWeight * 1000 +
+                  //     item.materialThoWeight * 1000) /
+                  //   1000
+                  // countRow1.unloadThoWeight =
+                  //   (countRow1.unloadThoWeight * 1000 +
+                  //     item.unloadThoWeight * 1000) /
+                  //   1000
+                  countRow1.totalNet = accAdd(countRow1.totalNet, item.totalNet)
+                  countRow1.materialThoWeight = accAdd(
+                    countRow1.materialThoWeight,
+                    item.materialThoWeight
+                  )
+                  countRow1.unloadThoWeight = accAdd(
+                    countRow1.unloadThoWeight,
+                    item.unloadThoWeight
+                  )
+
+                  // countRow1.trainWeight += item.trainWeight
+                  // countRow1.trainThoWeight += item.trainThoWeight
+                }
+              })
+              countRow1.percent =
+                (
+                  (countRow1.orderNum /
+                    (countRow1.planNum - countRow1.quxiaoNum)) *
+                  100
+                ).toFixed(2) + '%'
+              arrayList.push(countRow1)
+            } else {
+              arrayList[0].onlyRowFlag = 1
+            }
+          })
+          // console.log(result, 'result')
+          res.data.data = result.flat(1)
+          // res.data.data.push(countRow)
+          this.getSpanArr(res.data.data)
+          this.yawnReportData = res.data.data
+          loading.close()
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.data.data
+          })
+          loading.close()
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+      this.spanArr = []
+      for (let i = 0; i < data.length; i++) {
+        if (i == 0) {
+          this.spanArr.push(1)
+          this.spanIndex = 0
+        } else {
+          // 判断当前行与前一行内容是否相同
+          if (data[i].target == data[i - 1].target) {
+            this.spanArr[this.spanIndex] += 1 // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+            this.spanArr.push(0) // 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+          } else {
+            this.spanArr.push(1) // 否则,依旧是一行
+            this.spanIndex = i
+          }
+        }
+      }
+    },
+    //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        const _row = this.spanArr[rowIndex] // 行数
+        const _col = _row > 0 ? 1 : 0 // 列数
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    exportToExcel(tableTitle) {
+      let tables = this.$refs.yawnReport
+      let table_book = XLSX.utils.table_to_book(tables)
+      var table_write = XLSX.write(table_book, {
+        bookType: 'xlsx',
+        bookSST: true,
+        type: 'array'
+      })
+      try {
+        FileSaver.saveAs(
+          new Blob([table_write], { type: 'application/octet-stream' }),
+          tableTitle
+        )
+      } catch (e) {
+        if (typeof console !== 'undefined') console.log(e, table_write)
+      }
+      return table_write
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.table {
+  /deep/ .el-table__row > td {
+    // overflow-y: auto;
+    // position: absolute !important;
+
+    border: 1px, solid, #000 !important;
+  }
+}
+.title {
+  display: flex;
+  justify-content: left;
+  align-items: center;
+  margin-left: 40px;
+  font-size: 30px;
+  font-weight: 700;
+  color: #000;
+}
+</style>

+ 110 - 0
src/views/SIDEWMS/router/index.js

@@ -0,0 +1,110 @@
+import Vue from 'vue'
+import Router from 'vue-router'
+
+import routerBefore from '@/config/routerBefore.js'
+// 主要
+import main from '@/components/main.vue'
+
+const oYeWarehouse = () => import('@/views/SIDEWMS/components/oYeWarehouse.vue')
+const oYeWaitInbound = () => import('@/views/SIDEWMS/components/oYeWaitInbound.vue')
+const oYeInbound = () => import('@/views/SIDEWMS/components/oYeInbound.vue')
+const oYeOutbound = () => import('@/views/SIDEWMS/components/oYeOutbound.vue')
+const oYeRealTimeInventory = () =>
+  import('@/views/SIDEWMS/components/oYeRealTimeInventory.vue')
+const oYeTransPlan = () => import('@/views/SIDEWMS/components/oYeTransPlan.vue')
+const oYeTransResult = () => import('@/views/SIDEWMS/components/oYeTransResult.vue')
+const queueStart = () => import('@/views/SIDEWMS/components/queueStart.vue')
+const steelTransportReport = () =>
+  import('@/views/SIDEWMS/components/steelTransportReport.vue')
+const yawnReport = () => import('@/views/SIDEWMS/components/yawnReport.vue')
+const sendReceiveReport = () =>
+  import('@/views/SIDEWMS/components/sendReceiveReport.vue')
+
+Vue.use(Router)
+const constantRouterMap = [
+  {
+    path: '/',
+    name: 'main',
+    meta: { title: '首页', code: 'xtpzgl' },
+    component: main,
+    redirect: { name: 'oYeWarehouse' },
+    children: [
+      {
+        path: 'oYeWarehouse',
+        name: 'oYeWarehouse',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeWarehouse
+      },
+      {
+        path: 'oYeWaitInbound',
+        name: 'oYeWaitInbound',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeWaitInbound
+      },
+      {
+        path: 'oYeInbound',
+        name: 'oYeInbound',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeInbound
+      },
+      {
+        path: 'oYeOutbound',
+        name: 'oYeOutbound',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeOutbound
+      },
+      {
+        path: 'oYeRealTimeInventory',
+        name: 'oYeRealTimeInventory',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeRealTimeInventory
+      },
+      {
+        path: 'oYeTransPlan',
+        name: 'oYeTransPlan',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeTransPlan
+      },
+      {
+        path: 'oYeTransResult',
+        name: 'oYeTransResult',
+        meta: { code: 'xtpzgl-jggl' },
+        component: oYeTransResult
+      },
+      {
+        path: 'queueStart',
+        name: 'queueStart',
+        meta: { code: 'xtpzgl-jggl' },
+        component: queueStart
+      },
+      {
+        path: 'yawnReport',
+        name: 'yawnReport',
+        meta: { code: 'xtpzgl-jggl' },
+        component: yawnReport
+      },
+      {
+        path: 'steelTransportReport',
+        name: 'steelTransportReport',
+        meta: { code: 'xtpzgl-jggl' },
+        component: steelTransportReport
+      },
+      {
+        path: 'sendReceiveReport',
+        name: 'sendReceiveReport',
+        meta: { code: 'xtpzgl-jggl' },
+        component: sendReceiveReport
+      }
+    ]
+  }
+]
+
+const router = new Router({
+  routes: constantRouterMap
+})
+//  before
+routerBefore(router, constantRouterMap)
+
+export default router
+//  constantRouterMap
+export const routes = constantRouterMap