luobang 2 年之前
父節點
當前提交
b4a6f2c969

+ 1 - 1
build/utils.js

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

+ 118 - 2
src/views/queue/components/qmsEnFacotory/queueFJumpLine.vue

@@ -127,6 +127,43 @@
             </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="handleSelectionChange"
+            max-height="500px"
+          >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            </el-table-column>
+            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
+            <el-table-column prop="resultStartTime" label="排队开始时间">
+            </el-table-column>
+            <el-table-column
+              prop="listNodeOrder"
+              label="序号"
+            ></el-table-column>
+            <el-table-column prop="materialName" label="物资名称">
+            </el-table-column>
+            <el-table-column prop="materialSpecification" label="物资规格">
+            </el-table-column>
+            <el-table-column prop="materialModel" label="物资型号">
+            </el-table-column>
+            <el-table-column prop="materialNumber" label="物资件数">
+            </el-table-column>
+            <el-table-column prop="driverTel" label="司机电话号码">
+            </el-table-column>
+            <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column>
+            <el-table-column prop="resultInsertTime" label="插队时间">
+            </el-table-column>
+            <el-table-column prop="sureTime" label="可进厂确认时间">
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
         <el-tab-pane label="多拼车辆排队链表" name="second">
           <el-table
             :data="tableData"
@@ -183,8 +220,10 @@ export default {
       activeName: 'first',
       tableData: [],
       tableData1: [],
+      tableData2: [],
       //存放每一行记录的合并数
       spanArr: [],
+      spanArr1: [],
       maplist: [],
       id: null,
       option: [],
@@ -206,6 +245,7 @@ export default {
   mounted() {
     this.getSpellingArray()
     this.getNoSpellingArray()
+    this.getSpellingArrayTwo()
   },
   methods: {
     rowDbClick(row) {
@@ -282,6 +322,29 @@ export default {
         }
       }
     },
+    //记录每一行的合并数
+    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 ||
@@ -301,11 +364,35 @@ export default {
         }
       }
     },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        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() {
       if (this.activeName == 'first') {
         this.getNoSpellingArray()
-      } else {
+      } else if (this.activeName == 'second') {
         this.getSpellingArray()
+      } else {
+        this.getSpellingArrayTwo()
       }
     },
     getNoSpellingArray() {
@@ -327,6 +414,19 @@ export default {
           this.getSpanArr(this.tableData)
         })
     },
+    getSpellingArrayTwo() {
+      this.axios
+        .post(
+          '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
+            new Date()
+        )
+        .then(res => {
+          this.tableData2 = res.data.data
+          this.isQueryCapacity = null
+          console.log(this.tableData2)
+          this.getSpanArr1(this.tableData2)
+        })
+    },
     onclick() {
       if (this.activeName == 'first') {
         this.axios
@@ -337,10 +437,11 @@ export default {
               this.capacityNo
           )
           .then(res => {
+            this.isQueryCapacity = 1
             this.tableData1 = res.data.data
           })
         console.log('wzxxx')
-      } else {
+      } else if (this.activeName == second) {
         this.axios
           .post(
             '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
@@ -349,9 +450,23 @@ export default {
               this.capacityNo
           )
           .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
+          )
+          .then(res => {
+            this.isQueryCapacity = 1
+            this.tableData2 = res.data.data
+            this.getSpanArr1(this.tableData2)
+          })
       }
     },
     handleSelectionChange(selection) {
@@ -383,6 +498,7 @@ export default {
           this.$message.success('插队成功,等待放行')
           this.getNoSpellingArray()
           this.getSpellingArray()
+          this.getSpellingArrayTwo()
         }
       })
     }

+ 223 - 77
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -115,6 +115,8 @@
             style="width: 100%; margin-top: 20px"
             @selection-change="handleSelectionChange"
             max-height="500px"
+            @cell-click="cellClikSingle"
+            :cell-style="cellStyleSingle"
           >
             <!-- 是否可以勾选:selectable="selectInit" -->
             <el-table-column
@@ -123,11 +125,18 @@
               reserve-selection
               :selectable="selectInit"
             ></el-table-column>
-            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              align="center"
+            >
             </el-table-column>
             <el-table-column
               prop="listNodeOrder"
               label="序号"
+              align="center"
+              width="80"
             ></el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
             </el-table-column>
@@ -135,11 +144,25 @@
             </el-table-column>
             <el-table-column prop="materialName" label="物资名称">
             </el-table-column>
-            <el-table-column prop="steelMeter" label="钢材长度">
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="center"
+              width="80px"
+            >
             </el-table-column>
-            <el-table-column prop="materialSpecification" label="规格型号">
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="materialNumber" label="物资件数">
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="80px"
+            >
             </el-table-column>
             <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
@@ -163,8 +186,8 @@
             <el-table-column prop="sureTime" label="可进厂确认时间">
             </el-table-column>
 
-            <el-table-column prop="gatepostName" label="进厂门岗">
-            </el-table-column>
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗" width="80">
+            </el-table-column> -->
             <el-table-column fixed="right" label="操作" width="180">
               <template slot-scope="scope">
                 <el-button
@@ -191,6 +214,7 @@
             :row-key="getRowKey"
             max-height="500px"
             ref="twoSpellData"
+            :cell-style="cellStyleTwoSpelling"
           >
             <el-table-column
               type="selection"
@@ -198,23 +222,48 @@
               reserve-selection
               :selectable="selectInitSplleing"
             ></el-table-column>
-            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              align="center"
+            >
             </el-table-column>
             <el-table-column
               prop="listNodeOrder"
               label="序号"
+              align="center"
+              width="80"
             ></el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
             </el-table-column>
             <el-table-column prop="consigneeName" label="客户" fit>
             </el-table-column>
-            <el-table-column prop="materialName" label="物资名称">
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="steelMeter" label="钢材长度">
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="center"
+              width="80"
+            >
             </el-table-column>
-            <el-table-column prop="materialSpecification" label="规格型号">
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="materialNumber" label="物资件数">
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="80px"
+            >
             </el-table-column>
             <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
@@ -233,14 +282,20 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
-            <el-table-column prop="driverTel" label="司机电话号码">
+            <el-table-column
+              prop="grid"
+              label="拼数"
+              fit
+              align="center"
+              width="80"
+            >
             </el-table-column>
-            <el-table-column prop="gatepostName" label="进厂门岗">
+            <el-table-column prop="driverTel" label="司机电话号码">
             </el-table-column>
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗" width="100">
+            </el-table-column> -->
             <el-table-column prop="sureTime" label="可进厂确认时间">
             </el-table-column>
-
             <el-table-column fixed="right" label="操作" width="180">
               <template slot-scope="scope">
                 <el-button
@@ -267,6 +322,7 @@
             :row-key="getRowKey"
             max-height="500px"
             ref="spellData"
+            :cell-style="cellStyleSpelling"
           >
             <el-table-column
               type="selection"
@@ -274,23 +330,52 @@
               reserve-selection
               :selectable="selectInitSplleing"
             ></el-table-column>
-            <el-table-column prop="capacityNumber" label="车牌号" fit>
+            <el-table-column
+              prop="capacityNumber"
+              label="车牌号"
+              fit
+              align="center"
+            >
             </el-table-column>
             <el-table-column
               prop="listNodeOrder"
               label="序号"
+              width="80"
+              align="center"
             ></el-table-column>
-            <el-table-column prop="resultStartTime" label="排队开始时间">
+            <el-table-column
+              prop="resultStartTime"
+              label="排队开始时间"
+              align="center"
+            >
             </el-table-column>
             <el-table-column prop="consigneeName" label="客户" fit>
             </el-table-column>
-            <el-table-column prop="materialName" label="物资名称">
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="steelMeter" label="钢材长度">
+            <el-table-column
+              prop="steelMeter"
+              label="钢材长度"
+              align="cenetr"
+              width="80"
+            >
             </el-table-column>
-            <el-table-column prop="materialSpecification" label="规格型号">
+            <el-table-column
+              prop="materialSpecification"
+              label="规格型号"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="materialNumber" label="物资件数">
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="80"
+            >
             </el-table-column>
             <el-table-column label="装货点" width="100">
               <template slot-scope="scope">
@@ -309,11 +394,18 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="grid" label="拼数" fit> </el-table-column>
-            <el-table-column prop="driverTel" label="司机电话号码">
+            <el-table-column
+              prop="grid"
+              label="拼数"
+              fit
+              width="80"
+              align="center"
+            >
             </el-table-column>
-            <el-table-column prop="gatepostName" label="进厂门岗">
+            <el-table-column prop="driverTel" label="司机电话号码">
             </el-table-column>
+            <!-- <el-table-column prop="gatepostName" label="进厂门岗">
+            </el-table-column> -->
             <el-table-column prop="sureTime" label="可进厂确认时间">
             </el-table-column>
 
@@ -427,6 +519,40 @@ export default {
     }
   },
   methods: {
+    //单拼样式调整
+    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,
@@ -494,27 +620,53 @@ export default {
       return row.ROW_ID
     },
     selectInit(row) {
-      if (this.maplist.length == 0) {
-        if (row.ROW_ID == 1) {
-          return true
-        } else {
-          return false
+      //单拼的可勾选控制功能在这
+      //过滤出处在同一个网格上的数据
+      let gridData = this.tableData1.filter(e => {
+        return e.gridId === row.gridId
+      })
+      //处理下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 {
-        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
-        }
+        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.maplist.length == 0) {
@@ -540,6 +692,16 @@ export default {
       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 =
@@ -555,6 +717,7 @@ export default {
     },
     //返回选中的物资信息
     selectionChange2(selection) {
+      8
       this.materialList1 = []
       this.materialList1 = selection
       this.materialList = this.materialList.concat(this.materialList1)
@@ -792,45 +955,28 @@ export default {
     handleSelectionChange(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].ROW_ID + 1 != this.maplist[i + 1].ROW_ID) {
-            this.$refs.mutiData.clearSelection()
-            this.$refs.spellData.clearSelection()
-          }
-        }
-      }
-      // 限制只取第一个去掉
-      if (
-        !this.maplist.some(e => {
-          return e.ROW_ID == 1
-        })
-      ) {
-        this.$refs.mutiData.clearSelection()
-      }
     },
     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()
-      }
+      // 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)