Browse Source

修改报表

luobang 2 years ago
parent
commit
ac3bac4683

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

+ 53 - 52
src/components/main.vue

@@ -341,7 +341,11 @@
                 >通知信息</el-button
               >
             </el-badge>
-            <div class="Web_Notice" v-show="socketshow" style="z-index: 1 ; overflow-y: scroll">
+            <div
+              class="Web_Notice"
+              v-show="socketshow"
+              style="z-index: 1 ; overflow-y: scroll"
+            >
               <div class="workspace_row-grid_mytask">
                 <div
                   class="workspace_message"
@@ -660,24 +664,20 @@
     </el-dialog>
 
     <!--通知弹窗-->
-    <el-dialog
-      :visible.sync="centerDialogVisible"
-    >
+    <el-dialog :visible.sync="centerDialogVisible">
       <div style="margin-left: 30px; font-size: 20px">
-        <h1>{{noticedata1.noticetitle}}</h1>
+        <h1>{{ noticedata1.noticetitle }}</h1>
       </div>
       <div style="height: 20px"></div>
       <div style="margin-left: 30px">
-        <i class="el-icon-document"></i>{{noticedata1.noticecontent}}
+        <i class="el-icon-document"></i>{{ noticedata1.noticecontent }}
       </div>
       <el-divider></el-divider>
       <div style="margin-left: 30px">
         <i class="el-icon-user-solid"></i>
-        {{noticedata1.insertusername}}
-      </div>
-      <div style="margin-left: 30px">
-        <i></i>{{noticedata1.inserttime}}
+        {{ noticedata1.insertusername }}
       </div>
+      <div style="margin-left: 30px"><i></i>{{ noticedata1.inserttime }}</div>
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="makeSure">确 定</el-button>
       </span>
@@ -763,7 +763,7 @@ export default {
       }
     }
     return {
-      centerDialogVisible:false,
+      centerDialogVisible: false,
       badgeshow: '',
       dutyName: '',
       regular: '', // 密码策略校验正则表达式
@@ -939,13 +939,13 @@ export default {
       taskAllNum: '', //任务数目
       socketshow: false, //通知框的显示
       orgcodezs: '', //cookie中的orgcode
-      userId: '',//cookie中的userId
-      noticedata:[],
+      userId: '', //cookie中的userId
+      noticedata: [],
       noticedata1: {
-        noticeTitle:'ceshi',
-        noticecontent:'ceshi',
-        insertusername:'ceshi',
-        inserttime:'ceshi'
+        noticeTitle: 'ceshi',
+        noticecontent: 'ceshi',
+        insertusername: 'ceshi',
+        inserttime: 'ceshi'
       },
       allowed: []
     }
@@ -1154,22 +1154,25 @@ export default {
   },
   methods: {
     //弹框删除
-    async makeSure(){
-      let noticeid=this.noticedata1.noticeid
+    async makeSure() {
+      let noticeid = this.noticedata1.noticeid
       console.log(this.noticedata1)
-      this.noticedata1=[] ;
-      this.centerDialogVisible=false;
-      await this.axios.post("/api/v1/ams/updateNoticeStatus",
-        {userId:this.userId,
-        noticeId:noticeid}).then((res)=>{
+      this.noticedata1 = []
+      this.centerDialogVisible = false
+      await this.axios
+        .post('/api/v1/ams/updateNoticeStatus', {
+          userId: this.userId,
+          noticeId: noticeid
+        })
+        .then(res => {
           console.log(res.data)
-          if (res.data.data ===0){
-            this.badgeshow=true;
-          }else {
+          if (res.data.data === 0) {
+            this.badgeshow = true
+          } else {
             console.log('进入了小红点标记区')
-            this.taskAllNum=res.data.data;
+            this.taskAllNum = res.data.data
           }
-      })
+        })
     },
     // 判断是否为公司其他平台模块且处于开发模式
     isDev(url) {
@@ -2650,41 +2653,39 @@ export default {
     getinformation() {
       console.log('获取到的userId----------------' + this.userId)
       this.axios
-        .post('/api/v1/ams/getNotice',
-          { userId: this.userId})
+        .post('/api/v1/ams/getNotice', { userId: this.userId })
         .then(res => {
           this.noticedata = res.data.data
           this.taskAllNum = res.data.data[0].taskAllNum
           console.log(this.noticedata)
           console.log(this.taskAllNum)
-          if (this.taskAllNum !=null){
-            if (this.taskAllNum==0){
-              console.log("进入了标记为0")
-              this.badgeshow=true
-            }else{
-              console.log("进入了标记不为0")
-              this.badgeshow=false
+          if (this.taskAllNum != null) {
+            if (this.taskAllNum == 0) {
+              console.log('进入了标记为0')
+              this.badgeshow = true
+            } else {
+              console.log('进入了标记不为0')
+              this.badgeshow = false
             }
-          }else {
-            console.log("进入了标记值为null的值")
-            this.taskAllNum=null
+          } else {
+            console.log('进入了标记值为null的值')
+            this.taskAllNum = null
           }
-
         })
     },
     // 查看待办任务详情
     seeTaskContent(item) {
-      console.log("点击后的事件")
+      console.log('点击后的事件')
       console.log(item)
-      let data={
-        noticetitle:item.noticetitle,
-        noticecontent:item.noticecontent,
-        insertusername:item.insertusername,
-        inserttime:item.inserttime,
-        noticeid:item.noticeId
+      let data = {
+        noticetitle: item.noticetitle,
+        noticecontent: item.noticecontent,
+        insertusername: item.insertusername,
+        inserttime: item.inserttime,
+        noticeid: item.noticeId
       }
-      this.noticedata1=data
-      this.centerDialogVisible=true;
+      this.noticedata1 = data
+      this.centerDialogVisible = true
       console.log(this.noticedata1)
       console.log(this.centerDialogVisible)
       console.log(this.noticedata1.noticetitle)
@@ -2821,7 +2822,7 @@ export default {
   ::-webkit-scrollbar {
     //滚动条宽高,如果不需要显示滚动条可设置宽高为0
     width: 0px;
-    // height: 0px;
+    height: 0px;
   }
   ::-webkit-scrollbar-thumb {
     //滚动条颜色和圆角

+ 3 - 0
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -927,6 +927,7 @@ export default {
               offset: 100
             })
             this.maplist = []
+            this.filterArr1 = []
             this.$refs.mutiData.clearSelection()
             this.$refs.spellData.clearSelection()
             this.$refs.twoSpellData.clearSelection()
@@ -949,6 +950,7 @@ export default {
               offset: 100
             })
             this.maplist = []
+            this.filterArr1 = []
             this.$refs.mutiData.clearSelection()
             this.$refs.spellData.clearSelection()
             this.$refs.twoSpellData.clearSelection()
@@ -967,6 +969,7 @@ export default {
         .catch(e => {
           console.log(e)
           this.maplist = []
+          this.filterArr1 = []
           this.$refs.mutiData.clearSelection()
           this.$refs.spellData.clearSelection()
           this.$refs.twoSpellData.clearSelection()

+ 28 - 24
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -119,7 +119,6 @@
         ref="tableRef"
         border
         style="width: 100%; margin-top: 20px"
-        :max-height="maxHeight"
         :height="maxHeight"
         :row-class-name="tableRowClassName"
         @cell-click="cellClik"
@@ -1332,26 +1331,31 @@ export default {
     },
     scrollTop: {
       immediate: true,
+      deep: true,
       handler(val) {
         this.$nextTick(() => {
+          if (
+            val >=
+            this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight -
+              20
+          ) {
+            val =
+              this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight
+          }
+          if (val <= 0) {
+            val = 0
+          }
+          document.querySelector(
+            '.el-table__body-wrapper .el-table__body'
+          ).style.transform = `translateY(${val}px)`
           const start = Math.floor(val / this.itemHeight)
-          this.visibleList = []
           this.visibleList = this.tableData.slice(
             start,
             start + Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           this.getSpanArr(this.visibleList)
-          this.top = start * this.itemHeight
-          this.$nextTick(() => {
-            window.onresize = () => {
-              return (() => {
-                this.maxHeight = window.innerHeight - 150
-              })()
-            }
-          })
-          this.$refs.tableRef.$el.getElementsByClassName(
-            'el-table__body'
-          )[0].style.top = `${start * this.itemHeight}px`
         })
       }
     }
@@ -1367,12 +1371,13 @@ export default {
       }
     })
     this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
+      // console.log(e)
       if (this.debounceS) return
       this.debounceS = true
       this.scrollTop = e.target.scrollTop
       setTimeout(() => {
         this.debounceS = false
-      }, 50)
+      }, 70)
     })
   },
   activated() {
@@ -1730,7 +1735,7 @@ export default {
       })
       //车牌号筛选数组
       let capacityList = this.tableData.map(e => {
-        return e.capacityNo
+        return e.newCapacityNo
       })
       //物资筛选数组
       let materialNameList = this.tableData
@@ -2160,9 +2165,11 @@ export default {
         return
       }
       if (
-        !isVehicleNumber(this.steelMap.capacityNo) &&
-        (this.steelMap.capacityNo != '取消' ||
-          this.steelMap.capacityNo != '待定')
+        !(
+          isVehicleNumber(this.steelMap.capacityNo) ||
+          this.steelMap.capacityNo == '取消' ||
+          this.steelMap.capacityNo == '待定'
+        )
       ) {
         this.$message.error('请输入正确格式的车牌号!')
         return
@@ -2797,14 +2804,12 @@ export default {
         .then(res => {
           this.tableData = res.data.data
           this.totalHeight += this.itemHeight
-          this.visibleList = []
-          this.visibleList = this.tableData.slice(
-            0,
-            Math.floor(this.maxHeight / this.itemHeight) + 1
-          )
+          this.visibleList = res.data.data
+          console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           loading.close()
+          console.log(this.visibleList)
         })
     },
     //重新获取表格数据
@@ -2925,7 +2930,6 @@ export default {
     }
 
     ::-webkit-scrollbar {
-      // width: 20px;
       height: 20px;
       background-color: transparent;
     }