Redeem 1 year ago
parent
commit
08002a9437

+ 3 - 3
build/utils.js

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

+ 3 - 1
src/config/routerBefore.js

@@ -23,7 +23,9 @@ const whiteList = [
   '/printScan3',
   '/printReceipt3',
   '/printScan4',
-  '/printReceipt4'
+  '/printReceipt4',
+  '/printScan6',
+  '/printReceipt6'
 ]
 
 /**

+ 8 - 1
src/views/OYE/components/oYeInbound.vue

@@ -123,7 +123,8 @@ export default {
       endTime: generateEndDate(),
       apiId: '529',
       orgCode: null,
-      loginName: null
+      loginName: null,
+      inboundWarehouse: null
     }
   },
   created() {
@@ -136,6 +137,11 @@ export default {
       if (this.orgCode == 'shouhuokehu') {
         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
@@ -157,6 +163,7 @@ export default {
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
       queryMap['consigneeName'] = this.loginName
+      queryMap['inboundWarehouse'] = this.inboundWarehouse
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {

+ 5 - 1
src/views/OYE/components/oYeOutbound.vue

@@ -64,7 +64,6 @@
 </template>
 <script>
 import { getCookie, formatDate } from '@/utils/util.js'
-
 export default {
   data() {
     const generateStartDate = _ => {
@@ -133,6 +132,10 @@ export default {
       if (this.orgCode == 'shouhuokehu') {
         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
@@ -154,6 +157,7 @@ export default {
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
       queryMap['consigneeName'] = this.loginName
+      queryMap['inboundWarehouse'] = this.inboundWarehouse
 
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },

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

@@ -114,6 +114,10 @@ export default {
       if (this.orgCode == 'shouhuokehu') {
         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
@@ -131,6 +135,8 @@ export default {
       queryMap[this.screen] = this.con
       queryMap[this.screen1] = this.con1
       queryMap['consigneeName'] = this.loginName
+      queryMap['inboundWarehouse'] = this.inboundWarehouse
+
       this.options.requestQuery = JSON.parse(JSON.stringify(queryMap))
     },
     search() {

+ 42 - 15
src/views/OYE/components/oYeTransPlan.vue

@@ -57,7 +57,12 @@
         <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">审核</el-button>
+          <el-button
+            type="primary"
+            @click="approve"
+            v-privilege="activeMenu + 'approve'"
+            >审核</el-button
+          >
           <el-button type="danger" @click="deleteOrder">删除</el-button>
         </el-form-item>
       </el-form>
@@ -72,6 +77,9 @@
             @selection-change="approvingOptionsSelectionChange"
             :pageSize="200"
             :max-height="500"
+            :showSummaryList="showSummaryList"
+            :isshowSummary="true"
+            :showIndex="false"
           >
           </dilTable>
         </el-tab-pane>
@@ -83,6 +91,9 @@
             :pageSize="200"
             :max-height="500"
             @selection-change="approvingOptionsSelectionChange"
+            :showSummaryList="showSummaryList"
+            :isshowSummary="true"
+            :showIndex="false"
           >
           </dilTable>
         </el-tab-pane>
@@ -477,7 +488,7 @@
           >
         </div>
       </el-dialog>
-      <el-dialog title="实时库存信息" :visible.sync="drawer" width="60%">
+      <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;"
@@ -516,6 +527,7 @@
         <dilTable
           v-bind.sync="realTimeInventoryOptions"
           @selection-change="selectionChange"
+          :showIndex="false"
         ></dilTable>
       </el-dialog>
     </div>
@@ -540,22 +552,19 @@ export default {
       return endTime.getTime()
     }
     return {
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
       drawer: false,
       dialogVisible: false,
       activeName: 'first',
       selectOptions: [
         {
-          value: 'consigneeName',
+          value: 'consigneeCompanyName',
           label: '客户'
         },
         {
-          value: 'saleArea',
+          value: 'saleRemark',
           label: '片区'
         },
-        {
-          value: 'inboundArea',
-          label: '仓库大类'
-        },
         {
           value: 'inboundWarehouse',
           label: '装货仓库'
@@ -565,7 +574,7 @@ export default {
           label: '物资名称'
         },
         {
-          value: 'materialSpe',
+          value: 'specificationModel',
           label: '规格'
         }
       ],
@@ -601,7 +610,8 @@ export default {
       saleMans: [],
       planForm: {
         shipperName: '四川省达州钢铁集团有限责任公司',
-        shipperId: 1
+        shipperId: 1,
+        filterFlag: 1
       },
       title: '新增转运计划',
       materialList1: [],
@@ -731,7 +741,8 @@ export default {
       countyList: [],
       approvingList: [],
       loginName: '',
-      orgCode: ''
+      orgCode: '',
+      showSummaryList: ['materialNumber', 'materialWeight']
     }
   },
   created() {
@@ -749,6 +760,7 @@ export default {
     },
     receiveCompanyId(val) {
       console.log(val, 'vval')
+      this.planForm.consigneeId = val
       this.getOyeSaleArea({ consigneeId: val })
     },
     province(val) {
@@ -759,6 +771,19 @@ export default {
     },
     county(val) {
       this.onchangeCounty(val)
+    },
+    dialogVisible(val) {
+      if (val) {
+        this.getOyeConsigneeId()
+        this.getOyeSaleArea()
+      } else {
+        this.planForm.receiveId = ''
+        this.planForm.consigneeId = ''
+        this.planForm.saleArea = ''
+        this.materialList = []
+        this.materialList1 = []
+        this.selectionList = []
+      }
     }
   },
   computed: {
@@ -791,8 +816,8 @@ export default {
         '&endTime=' +
         this.endTime
       let queryOp = {}
-      queryOp[this.screen] = this.con
-      queryOp[this.screen1] = this.con1
+      queryOp[this.screen] = [this.con]
+      queryOp[this.screen1] = [this.con1]
       this.approvingOptions.requestQuery = {
         orderStatus: 0,
         deleted: 0,
@@ -914,10 +939,11 @@ export default {
     },
     checkRealTimeInventory() {
       this.realTimeInventoryOptions.requestUrl =
-        '/api/v1/wms/getOyeRealTimeResult?apiId=531&i=' + new Date()
+        '/api/v1/wms/getOyeRealTimeResult?apiId=538&i=' + new Date()
       this.realTimeInventoryOptions.requestQuery = JSON.parse(
         JSON.stringify(this.planForm)
       )
+
       this.drawer = true
     },
     onclickRealTimeInventory() {
@@ -1300,7 +1326,6 @@ export default {
       console.log(this.planForm, 'pl')
       console.log(this.selectionList, 'se')
       let data = { ...this.planForm }
-      data.shipperId = data.receiveId
       data.salerId = data.saleMan
       data.mapList = this.selectionList
       data.isSelfMention = '否'
@@ -1323,6 +1348,8 @@ export default {
         map.orderStatus = 4
         map.saleOrderId = item.saleOrderId
         map.deleted = 0
+        map.orderPlanWeight = item.materialNumber
+        map.inventoryId = item.inventoryId
         return map
       })
       this.$confirm('确认审核选中的转运计划', '提示', {

+ 123 - 46
src/views/OYE/components/oYeTransResult.vue

@@ -90,12 +90,19 @@
           </el-button>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="checkTrans()"
+          <el-button
+            type="primary"
+            @click="checkTrans()"
+            v-privilege="activeMenu + 'checkTrans'"
             ><i class="el-icon-truck"></i>轨迹</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="operation()">
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="operation"
+            v-privilege="activeMenu + 'operation'"
+          >
             <i class="el-icon-edit"></i>更改
             <span>
               <!-- || orgCode!='chengyunshang' -->
@@ -111,37 +118,48 @@
           > -->
           <el-button
             type="primary"
-            @click="checkPoint()"
-            v-if="!notRoutList.includes('checkPoint')"
+            @click="checkPoint"
+            v-privilege="activeMenu + 'checkPoint'"
             ><i class="el-icon-map-location"></i>实时路径</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="openReceive()">
+        <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 v-if="isShowOperate">
+        <el-form-item>
           <el-button
             type="primary"
-            @click="batchCarrier()"
-            v-if="!notRoutList.includes('batchCarrier')"
+            @click="batchCarrier"
+            v-privilege="activeMenu + 'batchCarrier'"
           >
             <i class="el-icon-share"></i>批量</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperateYeWuYuan">
-          <el-button type="primary" @click="mergeSplit()">
+        <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"
+          ><el-button
+            type="primary"
+            @click="confirmInbound"
+            v-privilege="activeMenu + 'confirmInbound'"
             ><i class="el-icon-check"></i>出库确认</el-button
           ></el-form-item
         >
-        <el-form-item v-if="isShowOperate">
+        <el-form-item v-privilege="activeMenu + 'more'">
           <el-dropdown>
             <el-button type="primary">
               更多<i class="el-icon-arrow-down el-icon--right"></i>
@@ -149,16 +167,8 @@
             <el-dropdown-menu slot="dropdown">
               <el-button
                 type="primary"
-                @click="mergeSplit()"
-                v-if="!notRoutList.includes('mergeSplit')"
-              >
-                <i class="el-icon-pie-chart"></i>
-                合并或拆分
-              </el-button>
-              <el-button
-                type="primary"
-                @click="showSaleLog()"
-                v-if="!notRoutList.includes('saleLog')"
+                @click="showSaleLog"
+                v-privilege="activeMenu + 'saleLog'"
               >
                 <i class="el-icon-pie-chart"></i>
                 操作日志
@@ -173,9 +183,9 @@
 
         <el-form-item>
           <span style="width: auto;font-size: 16px;line-height: auto;"
-            >车数/件数/磅重/取消: {{ totalCapacity }}/{{ totalNumber }}/{{
+            >车数/件数/磅重: {{ totalCapacity }}/{{ totalNumber }}/{{
               totalNetWeight
-            }}/{{ quxiaoCapacityNum }}
+            }}
           </span>
         </el-form-item>
       </el-form>
@@ -237,6 +247,29 @@
           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="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"
@@ -330,9 +363,9 @@
         >
         </el-table-column>
         <el-table-column
-          prop="materialMeter"
-          column-key="materialMeter"
-          key="materialMeter"
+          prop="steelMeters"
+          column-key="steelMeters"
+          key="steelMeters"
           label="米数"
           align="center"
           width="50px"
@@ -360,15 +393,25 @@
         >
         </el-table-column>
         <el-table-column
-          prop="materialThoWeight"
-          column-key="materialThoWeight"
-          key="materialThoWeight"
-          label="理重"
+          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="addressPlace"
           label="收货地址"
@@ -445,16 +488,6 @@
           v-if="!columnNoRoutList.includes('拼数')"
         >
         </el-table-column>
-        <el-table-column
-          prop="loadTime"
-          column-key="loadTime"
-          key="loadTime"
-          label="装货时间"
-          width="130px"
-          show-overflow-tooltip
-          v-if="!columnNoRoutList.includes('装货时间')"
-        >
-        </el-table-column>
         <el-table-column
           prop="isPrintDelivery"
           column-key="isPrintDelivery"
@@ -1532,6 +1565,7 @@ export default {
       return startDate
     }
     return {
+      activeMenu: window.top.localStorage.getItem('activeMenu'),
       confireInboundVisible: false,
       toggleRowIds: [],
       capacityNo: null,
@@ -1878,6 +1912,16 @@ export default {
           value: '正常'
         }
       ],
+      filterWarehouse: [
+        {
+          text: '欧冶鑫宏中心库',
+          value: '欧冶鑫宏中心库'
+        },
+        {
+          text: '欧冶巨昌中心库',
+          value: '欧冶巨昌中心库'
+        }
+      ],
       filterMap: {
         consigneeNameList: [],
         truckRemarkList: [],
@@ -1977,7 +2021,8 @@ export default {
       schemeMap: {},
       statusNumData: [],
       oYeWarehouseList: [],
-      columnShowDialog: false
+      columnShowDialog: false,
+      inboundWarehouse: null
     }
   },
   created() {
@@ -2042,6 +2087,9 @@ export default {
     if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
       this.isShowOperateYeWuYuan = true
     }
+    if (getCookie('orgCode') == 'ouyechangwaiku') {
+      this.inboundWarehouse = getCookie('loginName')
+    }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     this.updateCapacityDebounce = this.debounce(() => {
       this.updateCapacity()
@@ -2218,6 +2266,7 @@ export default {
     confireInboundToWms(data) {
       this.axios
         .post('/api/v1/wms/insertOyeOutboundResult', {
+          orderId: data[0].orderId,
           mapList: data
         })
         .then(res => {
@@ -3565,6 +3614,23 @@ export default {
         )
         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 (obj)
       this.onclick(this.filterMap)
     },
@@ -3753,8 +3819,9 @@ export default {
       if (typeof row === 'undefined') {
         row = this.steelMap
       }
-      if (row.outGateTime == null) {
-        this.$message.error('该车还未出厂,暂无轨迹')
+      console.log(row)
+      if (row.saleMakeDate == null) {
+        this.$message.error('该车还未出库,暂无轨迹')
         return
       }
       let that = this
@@ -4795,6 +4862,7 @@ export default {
       let easPrimaryId = null
       let consigneeLoginName = null
       let receiveAddress = null
+      let inboundWarehouse = null
       obj.receiveAddress = null
       obj.saleNo = null
       obj.receiveCustomer = null
@@ -4813,6 +4881,10 @@ export default {
           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 == '承运商') {
@@ -5014,6 +5086,7 @@ export default {
       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)
@@ -5031,6 +5104,10 @@ export default {
         // 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 == '承运商') {

+ 6 - 0
src/views/OYE/components/oYeWarehouse.vue

@@ -15,6 +15,12 @@
           <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

+ 1269 - 0
src/views/OYE/components/queueStart.vue

@@ -0,0 +1,1269 @@
+// 排队开始
+<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
+        }
+        // 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/getSteelWarehouse').then(res => {
+        console.log(res.data)
+        this.option = res.data
+      })
+    },
+    //记录每一行的合并数
+    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() {
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' + new Date(),
+          { oYeFlag: 1 }
+        )
+        .then(res => {
+          this.tableData1 = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData1)
+        })
+    },
+    getSpellingArray() {
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
+            new Date(),
+          { oYeFlag: 1 }
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData)
+          this.getSpanArr(this.tableData)
+        })
+    },
+    getSpellingArrayTwo() {
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
+            new Date(),
+          { oYeFlag: 1 }
+        )
+        .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() {
+      if (this.activeName == 'first') {
+        this.axios
+          .post(
+            '/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' +
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo,
+            { oYeFlag: 1 }
+          )
+          .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 }
+          )
+          .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 }
+          )
+          .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)
+        if (warehouse && warehouse.carQueue >= this.allowMaxNum) {
+          this.$message({
+            message: `该仓库已经有${this.allowMaxNum}辆车在排队,不允许放行!或重新调整限制`,
+            type: 'error',
+            duration: 2000,
+            center: true,
+            offset: 100
+          })
+          return
+        }
+        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>

+ 455 - 0
src/views/OYE/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/OYE/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>

+ 22 - 0
src/views/OYE/router/index.js

@@ -13,6 +13,10 @@ const oYeRealTimeInventory = () =>
   import('@/views/OYE/components/oYeRealTimeInventory.vue')
 const oYeTransPlan = () => import('@/views/OYE/components/oYeTransPlan.vue')
 const oYeTransResult = () => import('@/views/OYE/components/oYeTransResult.vue')
+const queueStart = () => import('@/views/OYE/components/queueStart.vue')
+const steelTransportReport = () =>
+  import('@/views/OYE/components/steelTransportReport.vue')
+const yawnReport = () => import('@/views/OYE/components/yawnReport.vue')
 
 Vue.use(Router)
 const constantRouterMap = [
@@ -64,6 +68,24 @@ const constantRouterMap = [
         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
       }
     ]
   }

+ 410 - 0
src/views/index/components/printReceipt6.vue

@@ -0,0 +1,410 @@
+<template>
+  <div class="tableAllDate">
+    <div class="button-box">
+      <!--v-print="'#pdfDom1'"-->
+      <el-button
+        type="primary"
+        @click="print1()"
+        style="width: 500px;height: 120px;font-size: 100px"
+        id="printReceipt"
+        v-show="false"
+      >
+        <!--class="el-icon-printer"-->
+        <!---->
+        打印
+      </el-button>
+    </div>
+    <div id="pdfDom1">
+      <div id="pdfDom" v-for="(item, index) in dataList" :key="index">
+        <div class="blank"></div>
+        <div class="title" style="margin: auto">
+          <h5 align="center">{{ shippername }}</h5>
+          <div style="height: 10px"></div>
+          <span style="margin-left: 450px">物资送货单</span>
+        </div>
+        <div style="height: 20px"></div>
+        <div>
+          <!-- tablePart0 -->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin:auto; font-size: 20px"
+            width="1000px"
+            class="tablePart0"
+          >
+            <tr>
+              <th style="width: 14.5%">运输订单号:</th>
+              <td style="width: 85.5%">{{ orderNumber }}</td>
+            </tr>
+          </table>
+        </div>
+        <div class="tableBody">
+          <!-- tablePart1 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin-top: 10px; text-align: center"
+            width="1000px"
+            class="tablePart1"
+          >
+            <tr style="height: 35px">
+              <th style="width: 5%; text-align: center">序号</th>
+              <th style="width: 22.5%; text-align: center">物资名称</th>
+              <th style="width: 17.5%; text-align: center">规格型号</th>
+              <th style="width: 5%">件数</th>
+              <th style="width: 6%">重量</th>
+              <th style="width: 12%" v-if="orderTimeFlag != null">订单日期</th>
+              <th style="width: 18%" v-else>过磅时间</th>
+              <th style="width: 16%">出库库房</th>
+              <th style="width: 18%">摘要</th>
+              <!--              <th style="width: 21%">订单日期</th>-->
+            </tr>
+            <tr
+              style="height: 35px"
+              v-for="(item, index) in deliveryOrderMaterialList"
+              :key="index"
+            >
+              <td>{{ index + 1 }}</td>
+              <td>{{ item.materialName }}</td>
+              <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
+              <td>{{ item.materialNumber }}</td>
+              <td>{{ item.materialWeight }}</td>
+              <td v-if="orderTimeFlag != null">{{ item.orderDate }}</td>
+              <td v-else>{{ item.netWeightTime }}</td>
+              <td>{{ item.inboundWarehouse }}</td>
+              <td>{{ item.saleRemark }}</td>
+              <!--              <td>{{ item.makeDate }}</td>-->
+            </tr>
+          </table>
+
+          <!-- tablePart2 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px;height: 40px"
+            width="1000px"
+            class="tablePart2"
+          >
+            <tr>
+              <th style="width: 27.5%">收货地点</th>
+              <td style="width: 72.5%">
+                {{ province }}{{ district }}{{ town }}{{ deliveryAddress }}
+              </td>
+            </tr>
+          </table>
+
+          <!-- tablePart3 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px;height: 40px"
+            width="1000px"
+            class="tablePart3"
+          >
+            <tr>
+              <th style="width: 27.5%">收货人</th>
+              <td style="width: 23.5%">{{ consignee }}</td>
+              <th style="width: 14%">电话</th>
+              <td style="width: 35%">{{ consigneeTel }}</td>
+            </tr>
+          </table>
+
+          <!-- tablePart4 -->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px;height: 40px"
+            width="1000px"
+            class="tablePart4"
+          >
+            <tr>
+              <th style="width: 27.5%">承运商</th>
+              <td style="width: 37.5%">{{ carrierName }}</td>
+              <th style="width: 14%">车牌号</th>
+              <td style="width: 35%">{{ capacityNumber }}</td>
+            </tr>
+          </table>
+
+          <!-- tablePart9 -->
+          <!-- <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px;height: 45px"
+            width="1000px"
+            class="tablePart9"
+          >
+            <tr>
+              <th style="width: 28.5%">备注</th>
+              <td style="width: 71.5%">{{ note }}</td>
+            </tr>
+          </table> -->
+        </div>
+
+        <div>
+          <!-- tablePart6 margin-top: 10px-->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto; font-size: 20px;height: 45px"
+            width="1000px"
+            class="tablePart6"
+          >
+            <tr>
+              <th style="width: 8.25%">发货单位:</th>
+              <td style="width: 30.5%">{{ shippername }}</td>
+              <th style="width: 8.25%">收货单位:</th>
+              <td style="width: 30.5%">{{ consigeeName }}</td>
+            </tr>
+          </table>
+        </div>
+
+        <!--          <div>
+        &lt;!&ndash; tablePart6 &ndash;&gt;
+        <table
+          border="0"
+          cellpadding="10"
+          cellspacing="0"
+          style="margin: auto; font-size: 20px; margin-top: 10px"
+          width="1000px"
+          class="tablePart6"
+        >
+          <tr>
+            <th style="width: 6.25%">收货单位:</th>
+            <td style="width: 53.5%">{{ consigeeName }}</td>
+          </tr>
+        </table>
+      </div>-->
+        <div>
+          <!-- tablePart6 margin-top: 10px-->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin:auto; font-size: 20px;height: 40px"
+            width="1000px"
+            class="tablePart6"
+          >
+            <tr>
+              <th style="width: 28.5%;">
+                注:此单据共计三联,需签字返回两联。
+              </th>
+              <th style="width: 14.5%;text-align: left">签收人及签收时间:</th>
+            </tr>
+          </table>
+        </div>
+        <!--      <div>
+        &lt;!&ndash; tablePart6 &ndash;&gt;
+        <table
+          border="0"
+          cellpadding="10"
+          cellspacing="0"
+          style="margin: auto; font-size: 20px; margin-top: 10px"
+          width="1000px"
+          class="tablePart6"
+        >
+          <tr>
+            <th style="width: 14.5%">签收时间:</th>
+          </tr>
+        </table>
+      </div>-->
+        <!--设置分页符-->
+        <div style="page-break-after:always"></div>
+      </div>
+    </div>
+    <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
+        <i class="el-icon-download"></i>导出(pdf)
+      </el-button> -->
+    <!--    <el-button type="primary" @click="backScan()">
+      <i class="el-icon-back"></i>返回
+    </el-button>-->
+  </div>
+</template>
+
+<script>
+import table from '@/components/DilCommonUI/packages/table/src/table.vue'
+export default {
+  components: { table },
+  name: 'Login',
+  data() {
+    return {
+      orderTimeFlag: null,
+      orderNumber: '',
+      consignee: '',
+      town: '',
+      consigneeTel: '',
+      sendDate: '',
+      receiptDate: '',
+      consigeeName: '',
+      saleNo: '',
+      deliveryOrderMaterialList: [
+        {
+          materialName: '',
+          materialSpe: '',
+          materialModel: '',
+          materialNumber: 0,
+          materialWeight: 0,
+          makeDate: ''
+        }
+      ],
+      carrierName: '',
+      province: '',
+      deliveryAddress: '',
+      district: '',
+      capacityNumber: '',
+      shippername: '',
+      year: new Date().getFullYear(),
+      month: new Date().getMonth() + 1,
+      date: new Date().getDate(),
+      htmlTitle: '客户换票送货单',
+      note: '',
+      dataList: ['1', '2', '3'],
+      timer1: '',
+      //分页数据
+      page: ''
+    }
+  },
+  created() {
+    this.getDeliveryOrder()
+  },
+  mounted() {
+    /*this.timer1 = setTimeout(this.print,2000);*/
+    // 六十秒不操作,自动返回扫码页面
+    const timer = setInterval(() => {
+      this.backScan()
+    }, 30000)
+    this.$once('hook:beforeDestroy', () => {
+      clearInterval(timer)
+      /*clearTimeout(this.timer1)*/
+    })
+  },
+  methods: {
+    async getDeliveryOrder() {
+      let orderNumber = this.$route.query.orderNumber
+      //空对象设置为null值
+      var deliver = {}
+      await this.axios
+        .post('/api/v1/tms/getDeliveryOrder?orderNumber=' + orderNumber)
+        .then(res => {
+          console.log('查询出来的数据')
+          console.log(res.data)
+          this.orderNumber = res.data.orderNumber
+          this.carrierName = res.data.carrierName
+          this.capacityNumber = res.data.capacityNumber
+          this.consigeeName = res.data.consigeeName
+          this.consignee = res.data.consignee
+          this.consigneeTel = res.data.consigneeTel
+          this.sendDate = res.data.sendDate
+          this.saleNo = res.data.saleNo
+          this.shippername = res.data.shippername
+          this.province = res.data.province
+          this.district = res.data.district
+          this.town = res.data.town
+          this.deliveryAddress = res.data.deliveryAddress
+          this.deliveryOrderMaterialList = res.data.deliveryOrderMaterialList
+          this.note = res.data.note
+          this.orderTimeFlag = res.data.orderTimeFlag || null
+          //console.log("数据的长度"+res.data.deliveryOrderMaterialList.length)
+          console.log('进入了这个方法')
+          // if (res.data.deliveryOrderMaterialList.length > 2){
+          //   this.page=true
+          // }else if (res.data.deliveryOrderMaterialList.length ==1){
+          //   this.deliveryOrderMaterialList.push(deliver)
+          //   console.log(this.deliveryOrderMaterialList)
+          // }
+        })
+      document.getElementById('printReceipt').click()
+    },
+    // print() {
+    //   console.log('调用了吗')
+    //   let newstr = document.getElementById('pdfDom1').innerHTML
+    //   let oldstr = document.body.innerHTML
+    //   document.body.innerHTML = newstr
+    //   window.print()
+    //   /*document.body.innerHTML=oldstr*/
+    //   // let orderNumber = this.$route.query.orderNumber
+    //   // this.axios.post('/api/v1/tms/changeNumber?orderNumber=' + orderNumber)
+    // },
+    print1() {
+      console.log('进入了打印页面')
+      let orderNumber = this.$route.query.orderNumber
+      window.print()
+      this.axios.post('/api/v1/tms/changeNumber?orderNumber=' + orderNumber)
+      this.$router.push({ name: 'printScan6', params: { index: '1' } })
+      //this.backScan()
+    },
+    backScan() {
+      this.$router.go(-1)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#id {
+  width: 1500px;
+  height: 700px;
+}
+.title {
+  font-size: 25px;
+}
+.tableBody {
+  table,
+  th,
+  td {
+    border: 1px solid black;
+    font-size: 20px;
+    margin: auto;
+    text-align: center;
+  }
+  .tablePart1 th {
+    border-top: 1px solid black;
+    text-align: center;
+  }
+  .tablePart2 td,
+  th {
+    border-top: 0px;
+    text-align: center;
+  }
+  .tablePart3 td,
+  th {
+    border-top: 0px;
+    text-align: center;
+  }
+  .tablePart4 td,
+  th {
+    border-top: 0px;
+    text-align: center;
+  }
+  .tablePart9 td,
+  th {
+    border-top: 0px;
+    text-align: center;
+  }
+}
+.blank {
+  width: 100%;
+  height: 50px;
+}
+.button-box {
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+@media print {
+  // 打印样式,去除页眉页脚
+  @page {
+    margin-top: 0;
+    margin-bottom: 0;
+  }
+}
+</style>

+ 271 - 0
src/views/index/components/printScan6.vue

@@ -0,0 +1,271 @@
+<template xmlns="http://www.w3.org/1999/html">
+  <div class="saleSelfMachine">
+    <div class="background">
+      <img :src="backgroundImgURL" width="100%" height="100%" />
+    </div>
+    <el-button @click.native="fullScreen" id="full" v-show="false"></el-button>
+    <div class="orderNumberData">
+      <!--v-show="false" disabled="!isEdit"-->
+      <el-input
+        placeholder="请将二维码放置在扫描区"
+        v-model="orderNumber"
+        :focus="true"
+        ref="inputs"
+      >
+      </el-input>
+      <!--style="display:block;width:120px"-->
+      <div v-show="false">
+        手动输入开关:
+      </div>
+      <!--      <i class="el-icon-full-screen" @click="fullScreen"
+      v-show="edit1"></i>-->
+      <!--      <el-switch
+=======
+      <i class="el-icon-full-screen" @click="fullScreen" v-show="edit1"></i>
+      <el-switch
+        :disabled="!isEdit"
+        v-show="false"
+      >
+      </el-input>style="display:block;width:120px"-->
+      <div v-show="false">
+        手动输入开关:
+      </div>
+      <i class="el-icon-full-screen" @click="fullScreen" v-show="edit1"></i>
+      <!--      <el-switch
+        v-model="isEdit"
+        active-color="#66ccff"
+        inactive-color="#ffffff"
+      >
+      </el-switch>-->
+    </div>
+    <!--    <div class="tip">
+      手机二维码对准下方摄像头<br />
+      <div class="arrowDown">⇩</div>
+      &lt;!&ndash; <i
+        class="el-icon-bottom"
+        style="padding-left: 450px;font-size: 300px;color: red"
+      ></i> &ndash;&gt;
+    </div>-->
+    <div class="emg"><span style="">紧急联系人:0818-2521703</span></div>
+  </div>
+</template>
+<script>
+import screenfull from 'screenfull'
+export default {
+  data() {
+    return {
+      orderNumber: null,
+      isEdit: true,
+      edit1: true,
+      backgroundImgURLList: [
+        require('@/assets/saleSelfMachine/00.png'),
+        require('@/assets/saleSelfMachine/01.png'),
+        require('@/assets/saleSelfMachine/02.png'),
+        require('@/assets/saleSelfMachine/03.png')
+      ],
+      backgroundImgURL: require('@/assets/saleSelfMachine/00.png')
+    }
+  },
+  created() {
+    localStorage.setItem(
+      'onlyKey',
+      Math.floor(Math.random() * 60 * 24 * 60) + 'huabao'
+    )
+    this.changfouce()
+  },
+  // watch:{
+  //    data:"toSaleSelfMachine"
+  // },
+  methods: {
+    //打印函数
+    printing() {
+      console.log('进入了打印方法')
+      this.backgroundImgURL = this.backgroundImgURLList[2]
+      setTimeout(() => {
+        console.log('进入了第一层定时器')
+        this.backgroundImgURL = this.backgroundImgURLList[3]
+        setTimeout(() => {
+          console.log('进入了第二层定时器')
+          this.backgroundImgURL = this.backgroundImgURLList[0]
+          this.$route.params.index = 0
+        }, 2000)
+      }, 30000)
+    },
+    //全屏函数
+    fullScreen() {
+      // screenfull.request()
+      // console.log('wbei')
+      // // documentElement 属性以一个元素对象返回一个文档的文档元素
+      // // var el = document.documentElement
+      // // el.requestFullscreen ||
+      // // el.mozRequestFullScreen ||
+      // // el.webkitRequestFullscreen ||
+      // // el.msRequestFullScreen
+      // //   ? el.requestFullscreen() ||
+      // //     el.mozRequestFullScreen() ||
+      // //     el.webkitRequestFullscreen() ||
+      // //     el.msRequestFullscreen()
+      // //   : null
+      var wscript = new ActiveXObject('WScript.Shell') //创建ActiveX
+      if (wscript !== null) {
+        //创建成功
+        wscript.SendKeys('{F11}') //触发f11
+      }
+    },
+    //输入框自动聚焦
+    changfouce() {
+      this.$nextTick(x => {
+        this.$refs.inputs.focus()
+      })
+    },
+    /*fullScreen() {
+      if (screenfull.isEnabled && !screenfull.isFullscreen) {
+        screenfull.request()
+        this.edit1 = false
+      }
+    },*/
+    /*async querynumber(){
+      console.log(this.orderNumber)
+      let orderNumber=this.orderNumber
+      let i=0
+      await this.axios.post("/api/v1/tms/queryNumber?orderNumber=" + orderNumber)
+        .then((res)=>{
+          console.log("查找出来的数据")
+          console.log(res.data)
+          console.log("-------------------------")
+          if (res.data.printnumber==1){
+            i=1
+          }
+        })
+      console.log(i)
+      return i
+        this.edit1 = false;
+      }
+    },*/
+    async querynumber() {
+      console.log(this.orderNumber)
+      console.log(this.orderNumber)
+      let orderNumber = this.orderNumber
+      let i = 0
+      await this.axios
+        .post('/api/v1/tms/queryNumber?orderNumber=' + orderNumber)
+        .then(res => {
+          console.log('查找出来的数据')
+          console.log(res.data)
+          console.log('-------------------------')
+          if (res.data.printnumber == 1) {
+            i = 1
+          }
+        })
+      console.log(i)
+      return i
+    }
+    //失去焦点后自动执行获得焦点事件
+    // onInputBlur(){
+    //     console.log("获取焦点")
+    //     this.changfouce();
+    // }
+    // toSaleSelfMachine(){
+    //      this.$router.push({
+    //         path:'/saleSelfMachine',
+    //     })
+    // }
+  },
+  mounted() {
+    document.getElementById('full').click()
+    console.log(screenfull.isFullscreen)
+    console.log(this.$route.params.index)
+    if (this.$route.params.index == 1) {
+      this.printing()
+    }
+    /*const timer1 = setInterval(async ()=>{
+      this.backgroundImgURL=this.backgroundImgURLList[0]
+    },3000)*/
+    const timer = setInterval(async () => {
+      // if(this.$refs.inputs.focus==false){
+      //     console.log("false")
+      this.changfouce()
+      //}
+      if (
+        this.orderNumber != null &&
+        this.orderNumber != '' &&
+        this.orderNumber.length == 21
+      ) {
+        if (
+          this.orderNumber.startsWith('WYSDD') == true ||
+          this.orderNumber.startsWith('wysdd') == true
+        ) {
+          let promise = await this.querynumber(this.orderNumber)
+          console.log(promise)
+          if (promise == 1) {
+            this.backgroundImgURL = this.backgroundImgURLList[1]
+            this.orderNumber = null
+            setTimeout(() => {
+              this.backgroundImgURL = this.backgroundImgURLList[0]
+              console.log('进入该方法了')
+            }, 4000)
+            return
+          }
+          this.$router.push({
+            path: '/printReceipt6?orderNumber=' + this.orderNumber
+          })
+        }
+      } else if (
+        this.orderNumber != null &&
+        this.orderNumber != '' &&
+        this.orderNumber.length > 21
+      ) {
+        //清空输入框,免得一次多个重复订单还无法删除
+        this.orderNumber = null
+      }
+    }, 3000)
+    this.$once('hook:beforeDestroy', () => {
+      clearInterval(timer)
+    })
+  }
+}
+</script>
+<style lang="scss">
+.saleSelfMachine {
+  width: 100vh;
+  height: 100vh;
+  .background {
+    width: 100%;
+    height: 100%;
+    margin-top: 30px;
+    z-index: -1;
+    position: absolute;
+    overflow: hidden;
+  }
+  .orderNumberData {
+    width: 100%;
+    color: #fff;
+    position: absolute;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .tip {
+    width: 1800px;
+    height: 600px;
+    font-size: 100px;
+    padding-left: 350px;
+    padding-top: 500px;
+    color: #4cc9e9;
+    .arrowDown {
+      margin-top: 150px;
+      padding-left: 450px;
+      font-size: 300px;
+      color: red;
+    }
+  }
+  .emg {
+    position: fixed;
+    right: 20px;
+    bottom: 20px;
+    font-size: 30px;
+    color: red;
+    font-weight: 500;
+  }
+}
+</style>

+ 17 - 0
src/views/index/router/index.js

@@ -18,9 +18,13 @@ import luckDraw from '@/views/index/components/luckDraw.vue'
 
 import printScan1 from '../components/printScan1'
 import printScan2 from '../components/printScan2'
+import printScan6 from '../components/printScan6'
+
 import printReceipt from '../components/printReceipt'
 import printReceipt1 from '../components/printReceipt1'
 import printReceipt2 from '../components/printReceipt2'
+import printReceipt6 from '../components/printReceipt6'
+
 //记录打印日志
 import printScan3 from '../components/printScan3'
 import printReceipt3 from '../components/printReceipt3'
@@ -120,6 +124,19 @@ export const constantRouterMap = [
     name: 'printReceipt4',
     component: printReceipt4
   },
+  {
+    path: '/printScan6',
+    name: 'printScan6',
+    meta: {
+      title: '下载'
+    },
+    component: printScan6
+  },
+  {
+    path: '/printReceipt6',
+    name: 'printReceipt6',
+    component: printReceipt6
+  },
 
   {
     path: '/login',

+ 55 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -351,6 +351,17 @@
                 :filters="filterCarrierList"
               >
               </el-table-column>
+              <el-table-column
+                prop="outBoundWarehouse"
+                label="出库库房"
+                align="center"
+                width="80px"
+                column-key="outBoundWarehouse"
+                key="outBoundWarehouse"
+                show-overflow-tooltip
+                :filters="filterOutBoundWarehouse"
+              >
+              </el-table-column>
               <el-table-column
                 prop="addressPlace"
                 label="下货地点"
@@ -501,12 +512,18 @@
             >
               <el-table-column
                 type="selection"
+                key="selection"
+                column-key="selection"
+                align="center"
                 width="30"
                 label="选择"
               ></el-table-column>
               <el-table-column
                 width="50"
                 label="序号"
+                type="index"
+                key="index"
+                column-key="index"
                 align="center"
                 :resizable="false"
               >
@@ -632,6 +649,17 @@
                 :filters="filterCarrierList"
               >
               </el-table-column>
+              <el-table-column
+                prop="outBoundWarehouse"
+                label="出库库房"
+                align="center"
+                width="80px"
+                column-key="outBoundWarehouse"
+                key="outBoundWarehouse"
+                show-overflow-tooltip
+                :filters="filterOutBoundWarehouse"
+              >
+              </el-table-column>
               <el-table-column
                 prop="addressPlace"
                 label="下货地点"
@@ -1606,6 +1634,20 @@ export default {
       isShowOperate: false,
       filterConsigneeList: [],
       filterCarrierList: [],
+      filterOutBoundWarehouse: [
+        {
+          text: '厂内库',
+          value: '厂内库'
+        },
+        {
+          text: '欧冶鑫宏中心库',
+          value: '欧冶鑫宏中心库'
+        },
+        {
+          text: '欧冶巨昌中心库',
+          value: '欧冶巨昌中心库'
+        }
+      ],
       filterCapacityList: [],
       filtermaterialNameList: [],
       filterSaleAreaList: [],
@@ -2993,6 +3035,18 @@ export default {
       if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length == 0) {
         delete this.filterMap.saleRemarkList
       }
+      if (
+        typeof obj.outBoundWarehouse != 'undefined' &&
+        obj.outBoundWarehouse.length > 0
+      ) {
+        this.filterMap.outBoundWarehouseList = obj.outBoundWarehouse
+      }
+      if (
+        typeof obj.outBoundWarehouse != 'undefined' &&
+        obj.outBoundWarehouse.length == 0
+      ) {
+        delete this.filterMap.outBoundWarehouseList
+      }
       // if (obj)
       this.onclick(this.filterMap)
     },
@@ -3070,6 +3124,7 @@ export default {
       this.filtermaterialSpe = []
       this.filterSaleOrderStatus = []
       this.filterSaleRemark = []
+
       Array.from(new Set(consigneeNameList)).forEach(e => {
         let map = {}
         map.text = e

+ 57 - 17
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -90,12 +90,19 @@
           </el-button>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="checkTrans()"
+          <el-button
+            type="primary"
+            @click="checkTrans()"
+            v-privilege="activeMenu + 'checkTrans'"
             ><i class="el-icon-truck"></i>轨迹</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="operation()">
+        <el-form-item>
+          <el-button
+            type="primary"
+            @click="operation()"
+            v-privilege="activeMenu + 'operation'"
+          >
             <i class="el-icon-edit"></i>更改
             <span>
               <!-- || orgCode!='chengyunshang' -->
@@ -112,30 +119,42 @@
           <el-button
             type="primary"
             @click="checkPoint()"
-            v-if="!notRoutList.includes('checkPoint')"
+            v-privilege="activeMenu + 'checkPoint'"
             ><i class="el-icon-map-location"></i>实时路径</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="openReceive()">
+        <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 v-if="isShowOperate">
+        <el-form-item>
           <el-button
             type="primary"
-            @click="batchCarrier()"
-            v-if="!notRoutList.includes('batchCarrier')"
+            @click="batchCarrier"
+            v-privilege="activeMenu + 'batchCarrier'"
           >
             <i class="el-icon-share"></i>批量</el-button
           >
         </el-form-item>
-        <el-form-item v-if="isShowOperateYeWuYuan">
-          <el-button type="primary" @click="exceptionHandle()">
+        <el-form-item v-privilege="activeMenu + 'more'">
+          <el-button
+            type="primary"
+            @click="exceptionHandle"
+            v-privilege="activeMenu + 'exceptionHandle'"
+          >
             <i class="el-icon-s-open"></i>
             异常处理
           </el-button>
-          <el-button type="primary" @click="mergeSplit()">
+          <el-button
+            type="primary"
+            @click="mergeSplit"
+            v-privilege="activeMenu + 'mergeSplit'"
+          >
             <i class="el-icon-pie-chart"></i>
             合并或拆分
           </el-button>
@@ -2347,7 +2366,8 @@ export default {
         { text: '已进厂', value: '已进厂' },
         { text: '已出厂', value: '已出厂' },
         { text: '已完成', value: '已完成' },
-        { text: '已关闭', value: '已关闭' }
+        { text: '已关闭', value: '已关闭' },
+        { text: '已入库', value: '已入库' }
       ],
       filterIsContinue: [
         { text: '是', value: '是' },
@@ -2784,10 +2804,22 @@ export default {
           )
           .then(res => {
             this.steelMap = res.data.data
-            console.log(this.steelMap, 'steelMap')
-            this.steelMap.userName = getCookie('loginName')
-            this.confireInboundVisible = true
-            this.getSpanArr1(res.data.data.mapList)
+            if (
+              this.steelMap.outGateTime != null ||
+              this.steelMap.orderStatus == '已完成'
+            ) {
+              console.log(this.steelMap, 'steelMap')
+              this.steelMap.userName = getCookie('loginName')
+              this.confireInboundVisible = true
+              this.getSpanArr1(res.data.data.mapList)
+            } else {
+              this.$message({
+                type: 'error',
+                message: '该车尚未出厂,无法入库',
+                duration: 2000
+              })
+              return
+            }
           })
       }
     },
@@ -5472,6 +5504,7 @@ export default {
       obj.receiveAddress = null
       obj.saleNo = null
       obj.receiveCustomer = null
+      let inboundWarehouse = null
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)
         endTime = sjTime(this.endTime)
@@ -5487,6 +5520,10 @@ export default {
           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 == '承运商') {
@@ -5705,6 +5742,9 @@ export default {
         // JSON.parse(getCookie('userInfo')).userCode
         this.filterMap.consigneeLoginName = consigneeLoginName
       }
+      if (getCookie('orgCode') == 'ouyechangwaiku') {
+        this.filterMap.inboundWarehouse = getCookie('loginName')
+      }
       if (this.screen == '客户') {
         consigneeName = this.input
       } else if (this.screen == '承运商') {