luobang 2 年之前
父节点
当前提交
9c63780417
共有 2 个文件被更改,包括 45 次插入19 次删除
  1. 1 1
      build/utils.js
  2. 44 18
      src/views/queue/components/qmsEnFacotory/queueFStart.vue

+ 1 - 1
build/utils.js

@@ -15,7 +15,7 @@ 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', 'queue']
+// let devModules = ['index', 'queue']
 let devModules = ['all']
 //let devModules=['index']
 if (pathSrc.indexOf('node_modules') > -1) {

+ 44 - 18
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -123,7 +123,6 @@
               reserve-selection
               :selectable="selectInit"
             ></el-table-column>
-            <el-table-column type="index" width="50"> </el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
@@ -189,13 +188,15 @@
             border
             style="width: 100%; margin-top: 20px"
             @selection-change="handleSelectionChange"
+            :row-key="getRowKey"
             max-height="500px"
+            ref="spellData"
           >
-            <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column
-              width="80"
-              align="center"
-              prop="Nosort"
+              type="selection"
+              width="55"
+              reserve-selection
+              :selectable="selectInitSplleing"
             ></el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
@@ -229,7 +230,6 @@
               </template>
             </el-table-column>
             <el-table-column prop="grid" label="拼数" fit> </el-table-column>
-
             <el-table-column
               prop="listNodeOrder"
               label="序号"
@@ -319,7 +319,8 @@ export default {
       i: 0,
       totalQueueNumFirst: null,
       //厂内钢材车辆总数
-      steelOrderNum: 0
+      steelOrderNum: 0,
+      isQueryCapacity: null
     }
   },
   mounted() {
@@ -397,6 +398,7 @@ export default {
       this.redDotNum = null
       this.totalQueueNum = null
       this.totalQueueNumFirst = null
+      this.isQueryCapacity = null
       this.i = 0
       clearInterval(this.timer)
       this.start()
@@ -428,6 +430,25 @@ export default {
         }
       }
     },
+    selectInitSplleing(row) {
+      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
+          })
+        ) {
+          return true
+        } else {
+          return false
+        }
+      }
+    },
     rowDbClick(row) {
       this.materialList = []
       this.materialList.push(row)
@@ -495,26 +516,23 @@ export default {
         if (i === 0) {
           this.spanArr.push(1)
           this.pos = 0
+          data[i].group = i
+          data[i].ROW_ID = i + 1
         } 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
+            data[i].ROW_ID = data[i - 1].ROW_ID
           } else {
             this.spanArr.push(1)
             this.pos = i
+            data[i].group = data[i - 1].group + 1
+            data[i].ROW_ID = data[i - 1].ROW_ID + 1
           }
         }
       }
-
-      // 表格序号
-      let Nosort = 0
-      for (let n in this.spanArr) {
-        if (this.spanArr[n] > 0) {
-          Nosort += 1
-          this.$set(data[n], 'Nosort', Nosort)
-        }
-      }
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (
@@ -522,7 +540,7 @@ export default {
         columnIndex === 1 ||
         columnIndex === 2 ||
         columnIndex === 3 ||
-        columnIndex === 4 ||
+        columnIndex === 9 ||
         columnIndex === 10 ||
         columnIndex === 11 ||
         columnIndex === 12 ||
@@ -556,6 +574,7 @@ export default {
         .post('/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=' + new Date())
         .then(res => {
           this.tableData1 = res.data.data
+          this.isQueryCapacity = null
           console.log(this.tableData1)
         })
     },
@@ -567,6 +586,7 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
+          this.isQueryCapacity = null
           console.log(this.tableData)
           this.getSpanArr(this.tableData)
         })
@@ -587,6 +607,7 @@ export default {
               this.capacityNo
           )
           .then(res => {
+            this.isQueryCapacity = 1
             this.tableData1 = res.data.data
           })
         console.log('wzxxx')
@@ -599,6 +620,7 @@ export default {
               this.capacityNo
           )
           .then(res => {
+            this.isQueryCapacity = 1
             this.tableData = res.data.data
             this.getSpanArr(this.tableData)
           })
@@ -611,6 +633,7 @@ export default {
         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()
           }
         }
       }
@@ -621,6 +644,7 @@ export default {
         })
       ) {
         this.$refs.mutiData.clearSelection()
+        this.$refs.spellData.clearSelection()
       }
     },
     updateBill(scope) {
@@ -686,7 +710,8 @@ export default {
       })
       let map = {
         ssoId: getCookie('userId'),
-        mapList: filterArr2
+        mapList: filterArr2,
+        isQueryCapacity: this.isQueryCapacity
       }
       if (this.activeName == 'first') {
         map.mapList = this.maplist
@@ -702,6 +727,7 @@ export default {
           })
           this.maplist = []
           this.$refs.mutiData.clearSelection()
+          this.$refs.spellData.clearSelection()
           this.getNoSpellingArray()
           this.getSpellingArray()
           this.getStoreArray()