瀏覽代碼

修改销售钢材报表

luobang 2 年之前
父節點
當前提交
6c6101fecf
共有 3 個文件被更改,包括 373 次插入348 次删除
  1. 47 37
      src/components/main.vue
  2. 148 127
      src/store/index.js
  3. 178 184
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

+ 47 - 37
src/components/main.vue

@@ -338,9 +338,14 @@
               style="margin-right: 20px"
               :hidden="badgeshow"
             >
-              <el-button type="text" size="small" @click="goMyTaskPage" style="padding:3px"
-                > <i class="el-icon-message-solid" style="font-size: 20px;"></i></el-button
+              <el-button
+                type="text"
+                size="small"
+                @click="goMyTaskPage"
+                style="padding:3px"
               >
+                <i class="el-icon-message-solid" style="font-size: 20px;"></i
+              ></el-button>
             </el-badge>
             <div
               class="Web_Notice"
@@ -665,11 +670,12 @@
     </el-dialog>
 
     <!--通知弹窗-->
-    <el-dialog 
-    :visible.sync="centerDialogVisible"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    :show-close="false">
+    <el-dialog
+      :visible.sync="centerDialogVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
       <div style="margin-left: 30px; font-size: 20px">
         <h1>{{ noticedata1.noticetitle }}</h1>
       </div>
@@ -973,9 +979,9 @@ export default {
     console.log(this.$route, 'this.route')
     console.log('获取到的orgCode+++++++++++++' + this.orgcodezs)
     this.getinformation()
-    let timer=setInterval(()=>{
+    let timer = setInterval(() => {
       this.getinformation()
-    },1000*60)
+    }, 1000 * 60)
   },
   destroyed() {
     // 销毁浏览器返回监听
@@ -1869,6 +1875,7 @@ export default {
           $('#menuTabId iframe')
             .eq(that.menuTabIndex)[0]
             .contentWindow.location.reload(true)
+          console.log('------------12')
           this.mainPageList[i].mainPageLoading = false
         }
       }
@@ -1955,11 +1962,12 @@ export default {
       }
       //   console.log('目录', that.selectedMenu, that.tabsData)
       // 左侧菜单点击切换的时候需要重新加载页面
+      /** 
       that.menuTabIndex = that.getTabIndex(menuData.menuId)
       $('#menuTabId iframe').eq(that.menuTabIndex).length &&
         $('#menuTabId iframe')
           .eq(that.menuTabIndex)[0]
-          .contentWindow.location.reload(true)
+          .contentWindow.location.reload(true)*/
     },
     //  是否合部都不是菜单就不用显示
     allNoMenu(items) {
@@ -2651,14 +2659,14 @@ export default {
       })
     },
     updatecss() {
-      console.log("taskAllNum")
+      console.log('taskAllNum')
       console.log(this.taskAllNum)
-      if(!this.taskAllNum){
-        console.log("进入了弹出框的判断1")
+      if (!this.taskAllNum) {
+        console.log('进入了弹出框的判断1')
         this.socketshow = false
-      }else{
-        console.log("进入了弹出框的判断2")
-        this.socketshow=true
+      } else {
+        console.log('进入了弹出框的判断2')
+        this.socketshow = true
       }
       //let height = document.body.clientHeight - 125
       /*this.$nextTick(() => {
@@ -2669,23 +2677,23 @@ export default {
       this.socketshow = false
     },
     getinformation() {
-      this.taskAllNum=0
-      this.noticedata=[]
+      this.taskAllNum = 0
+      this.noticedata = []
       console.log('获取到的userId----------------' + this.userId)
       this.axios
         .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
         .then(res => {
-          console.log("进入了获取数据的方法")
-          res.data.data.forEach((e)=>{
-            console.log("进入了数据的遍历")
-            if(e.status==0&&e.insertusername!='销售审核'){
-              console.log("进入了数据的插入")
-              this.taskAllNum++;
+          console.log('进入了获取数据的方法')
+          res.data.data.forEach(e => {
+            console.log('进入了数据的遍历')
+            if (e.status == 0 && e.insertusername != '销售审核') {
+              console.log('进入了数据的插入')
+              this.taskAllNum++
               this.noticedata.push(e)
             }
           })
           //this.taskAllNum = res.data.data.length
-          console.log("获取到的数据")
+          console.log('获取到的数据')
           console.log(this.noticedata)
           console.log(this.taskAllNum)
           if (this.taskAllNum != null) {
@@ -2695,21 +2703,23 @@ export default {
             } else {
               console.log('进入了标记不为0')
               this.badgeshow = false
-               let data={
-                  noticetitle:this.noticedata[0].noticetitle,
-                  noticecontent:this.noticedata[0].noticecontent,
-                  insertusername:this.noticedata[0].insertusername,
-                  inserttime:this.noticedata[0].inserttime,
-                  noticeid:this.noticedata[0].noticeId
-                }
+              let data = {
+                noticetitle: this.noticedata[0].noticetitle,
+                noticecontent: this.noticedata[0].noticecontent,
+                insertusername: this.noticedata[0].insertusername,
+                inserttime: this.noticedata[0].inserttime,
+                noticeid: this.noticedata[0].noticeId
+              }
               //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
-              if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
-                this.noticedata1=data;
-                this.centerDialogVisible=true;
+              if (
+                window.top.localStorage.getItem('noticeId') != data.noticeid
+              ) {
+                this.noticedata1 = data
+                this.centerDialogVisible = true
                 window.top.localStorage.setItem('noticeId', data.noticeid)
                 // window.top.localStorage.setItem('noticeTime', new Date().getTime())
-              }else{
-                console.log("暂无新的通知,不展示");
+              } else {
+                console.log('暂无新的通知,不展示')
               }
             }
           } else {

+ 148 - 127
src/store/index.js

@@ -1,23 +1,14 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import {
-  setCookie,
-  getCookie,
-  formatDate,
-  dgTree
-} from '@/utils/util.js';
-import {
-  stDev,
-  stProd,
-  proPath
-} from '@/config/config.js';
-import axios from '@/config/axios.js';
+import { setCookie, getCookie, formatDate, dgTree } from '@/utils/util.js'
+import { stDev, stProd, proPath } from '@/config/config.js'
+import axios from '@/config/axios.js'
 
-import index from './index/index.js';
-import system from './system/index.js';
+import index from './index/index.js'
+import system from './system/index.js'
 
 // import { ctx } from '@/config/config.js';
-Vue.use(Vuex);
+Vue.use(Vuex)
 const state = {
   // ctx: process.env.NODE_ENV === 'production' ? ('/' + ctx) : '',
   // 请求地址
@@ -32,12 +23,14 @@ const state = {
   fileDownloadUrl: '',
   // ====================================
   // 面包屑
-  breadcrumb: [{
-    menuId: 1,
-    meta: {
-      'title': '首页'
+  breadcrumb: [
+    {
+      menuId: 1,
+      meta: {
+        title: '首页'
+      }
     }
-  }],
+  ],
   //  登录日期,用于操作时的提交日期 单位毫秒
   loginTime: new Date().getTime(),
   //  路由表
@@ -65,38 +58,49 @@ const state = {
     page: {
       total: 0
     }
+    //选中数据
   },
+  saleSteelToggleIds: [1, 2, 3],
   // 所有权限信息
   allPrivilege: [],
   // 拥有权限信息
   ownPrivilege: [],
   token: '',
   ticketRes: ''
-
-};
+}
 
 const getters = {
   ctx() {
     if (process.env.NODE_ENV === 'development') {
-      return window.location.origin + '/views/';
+      return window.location.origin + '/views/'
     } else {
-      return window.location.origin + '/views/';
+      return window.location.origin + '/views/'
     }
   },
   API() {
     if (process.env.NODE_ENV === 'development') {
-      return stDev;
+      return stDev
     } else {
-      return stProd;
+      return stProd
     }
   },
   //   平台数据权限项目路径名
   proPath() {
-    return proPath;
+    return proPath
   }
 }
 
 const mutations = {
+  //更新用户选中数据钢材报表
+  updateSaleSteelToggleIds(state, saleSteelToggleIdsMap) {
+    if (saleSteelToggleIdsMap.isClear == 1) {
+      state.saleSteelToggleIds = []
+    } else {
+      if (saleSteelToggleIdsMap.saleSteelToggleIds.length > 0) {
+        state.saleSteelToggleIds = saleSteelToggleIdsMap.saleSteelToggleIds
+      }
+    }
+  },
   // //  更新路由表
   addRouters(state, routes) {
     state.routes = routes
@@ -111,171 +115,188 @@ const mutations = {
   },
   //  用户详情
   userInfo(state, userInfo) {
-    state.userInfo = userInfo;
+    state.userInfo = userInfo
   },
   loginInfo(state, loginInfo) {
-    state.loginInfo = loginInfo;
+    state.loginInfo = loginInfo
   },
   //  更新
   pageSize(state, pageSize) {
-    state.table.page.pageSize = pageSize;
-    state.table.form.pageSize = pageSize;
+    state.table.page.pageSize = pageSize
+    state.table.form.pageSize = pageSize
   },
   pageIndex(state, pageIndex) {
-    state.table.form.pageIndex = pageIndex;
+    state.table.form.pageIndex = pageIndex
   },
   total(state, total) {
-    state.table.page.total = total;
+    state.table.page.total = total
   },
   breadcrumb(state, breadcrumb) {
-    state.breadcrumb = breadcrumb;
+    state.breadcrumb = breadcrumb
   },
   setToken(state, options) {
-    state.token = options.token;
+    state.token = options.token
   }
-
 }
 
 const actions = {
+  //获取用户选中
+
   //  取用户信息
-  getUserInfo({
-    commit,
-    state
-  }) {
-    let res = axios.get(proPath + 'v1/sysusers/user/token');
+  getUserInfo({ commit, state }) {
+    let res = axios.get(proPath + 'v1/sysusers/user/token')
     res.then(res => {
       //   放入东西
-      commit('userInfo', res.data);
-    });
-    return res;
+      commit('userInfo', res.data)
+    })
+    return res
   },
   //  取用户信息
-  getLoginInfo({
-    commit,
-    state
-  }) {
-    let res = axios.post(proPath + 'auth/remoteauthentication/token');
+  getLoginInfo({ commit, state }) {
+    let res = axios.post(proPath + 'auth/remoteauthentication/token')
     res.then(res => {
       //   放入东西
-      commit('loginInfo', res.data);
-    });
-    return res;
+      commit('loginInfo', res.data)
+    })
+    return res
   },
-  getAllMenuUrl({
-    commit,
-    state
-  }, obj) {
-    let firstOne = window.top.localStorage.getItem('companys') ? JSON.parse(window.top.localStorage.getItem('companys'))[0].id : '';
-    let companyId = window.top.localStorage.getItem('companyId') ? window.top.localStorage.getItem('companyId') : firstOne;
-    let res = (obj && obj.companyId) ? axios.get(proPath + 'v1/sysmenus/findFunctionMenus?companyId=' + obj.companyId) : axios.get(proPath + 'v1/sysmenus/findFunctionMenus?companyId=' + companyId);
+  getAllMenuUrl({ commit, state }, obj) {
+    let firstOne = window.top.localStorage.getItem('companys')
+      ? JSON.parse(window.top.localStorage.getItem('companys'))[0].id
+      : ''
+    let companyId = window.top.localStorage.getItem('companyId')
+      ? window.top.localStorage.getItem('companyId')
+      : firstOne
+    let res =
+      obj && obj.companyId
+        ? axios.get(
+            proPath + 'v1/sysmenus/findFunctionMenus?companyId=' + obj.companyId
+          )
+        : axios.get(
+            proPath + 'v1/sysmenus/findFunctionMenus?companyId=' + companyId
+          )
     res.then(res => {
       // window.top.localStorage.setItem('allPrivilege', res.data ? JSON.stringify(res.data.list) : '');
       //   放入东西
-      commit('refreshAllPrivilege', res.data ? res.data.list : []);
-    });
-    return res;
+      commit('refreshAllPrivilege', res.data ? res.data.list : [])
+    })
+    return res
   },
-  getOwnMenuUrl({
-    commit,
-    state
-  }, obj) {
-    obj = JSON.parse(JSON.stringify(obj));
-    let firstOne = window.top.localStorage.getItem('companys') ? JSON.parse(window.top.localStorage.getItem('companys'))[0].id : '';
-    let companyId = window.top.localStorage.getItem('companyId') ? window.top.localStorage.getItem('companyId') : firstOne;
-    let res = (obj && obj.companyId) ? axios.get(proPath + 'v1/sysmenus/findFunctionMenusByUserId?companyId=' + obj.companyId) : axios.get(proPath + 'v1/sysmenus/findFunctionMenusByUserId?companyId=' + obj.companyId);
+  getOwnMenuUrl({ commit, state }, obj) {
+    obj = JSON.parse(JSON.stringify(obj))
+    let firstOne = window.top.localStorage.getItem('companys')
+      ? JSON.parse(window.top.localStorage.getItem('companys'))[0].id
+      : ''
+    let companyId = window.top.localStorage.getItem('companyId')
+      ? window.top.localStorage.getItem('companyId')
+      : firstOne
+    let res =
+      obj && obj.companyId
+        ? axios.get(
+            proPath +
+              'v1/sysmenus/findFunctionMenusByUserId?companyId=' +
+              obj.companyId
+          )
+        : axios.get(
+            proPath +
+              'v1/sysmenus/findFunctionMenusByUserId?companyId=' +
+              obj.companyId
+          )
     // let res = (obj && obj.userId && obj.menuId) ? axios.get(proPath + 'v1/sysmenus/findFuncByUAndM?userId=' + obj.userId + '&menuId=' + obj.menuId) : axios.get(proPath + 'v1/sysmenus/findFuncByUAndM?userId=' + obj.userId + '&menuId=' + obj.menuId);
     res.then(res => {
-      window.top.localStorage.setItem('ownPrivilege', JSON.stringify(res.data));
+      window.top.localStorage.setItem('ownPrivilege', JSON.stringify(res.data))
       //   放入东西
-      commit('refreshOwnPrivilege', res.data);
-    });
-    return res;
+      commit('refreshOwnPrivilege', res.data)
+    })
+    return res
   },
   //  取菜单权限信息
-  generateRoutes({
-    commit,
-    state
-  }, obj) {
-    let companyId = window.top.localStorage.getItem('companyId') ? window.top.localStorage.getItem('companyId') : JSON.parse(window.top.localStorage.getItem('companys'))[0].id;
+  generateRoutes({ commit, state }, obj) {
+    let companyId = window.top.localStorage.getItem('companyId')
+      ? window.top.localStorage.getItem('companyId')
+      : JSON.parse(window.top.localStorage.getItem('companys'))[0].id
     // let asyncRouterMap = [{ path: '*', redirect: '/404', hidden: true }];
-    let asyncRouterMap = [];
-    let res = (obj && obj.companyId && obj.appId) ? axios.get(proPath + 'v1/sysmenus/findMenusByUserId?companyId=' + obj.companyId + '&appId=' + obj.appId) : axios.get(proPath + 'v1/sysmenus/findMenusByUserId?companyId=' + companyId + '&appId=' + obj.userInfo.appId);
+    let asyncRouterMap = []
+    let res =
+      obj && obj.companyId && obj.appId
+        ? axios.get(
+            proPath +
+              'v1/sysmenus/findMenusByUserId?companyId=' +
+              obj.companyId +
+              '&appId=' +
+              obj.appId
+          )
+        : axios.get(
+            proPath +
+              'v1/sysmenus/findMenusByUserId?companyId=' +
+              companyId +
+              '&appId=' +
+              obj.userInfo.appId
+          )
     res.then(res => {
       //   处理路由
       if (res.code === '0') {
-        asyncRouterMap = asyncRouterMap.concat(res.data, asyncRouterMap);
-        let menuLeave = getCookie('menuLeave');
+        asyncRouterMap = asyncRouterMap.concat(res.data, asyncRouterMap)
+        let menuLeave = getCookie('menuLeave')
         if (menuLeave) {
-          let temp = [];
+          let temp = []
           for (let i = 0; i < asyncRouterMap.length; i++) {
             if (asyncRouterMap[i].menuLabel.indexOf(menuLeave) > -1) {
               temp.push(asyncRouterMap[i])
             }
           }
-          asyncRouterMap = JSON.parse(JSON.stringify(temp));
+          asyncRouterMap = JSON.parse(JSON.stringify(temp))
         }
         dgTree(asyncRouterMap, 'children', item => {
-          item.name = item.menuLabel;
-          item.url = item.menuUrl;
-        });
+          item.name = item.menuLabel
+          item.url = item.menuUrl
+        })
       } else {
         //  查询失败
         // asyncRouterMap = ;
       }
       //   更新state
-      commit('addRouters', asyncRouterMap);
-    });
-    return res;
+      commit('addRouters', asyncRouterMap)
+    })
+    return res
   },
   //  退出/注销
-  loginOut({
-    commit,
-    state
-  }) {
+  loginOut({ commit, state }) {
     //  清除cookie数据
-    let res = axios.get(proPath + 'logout');
+    let res = axios.get(proPath + 'logout')
     res.then(res => {
-      setCookie('userInfo', '', -1, '/');
-      setCookie('userLogin', '', -1, '/');
-      setCookie('accessToken', '', -1, '/');
-      setCookie('refreshToken', '', -1, '/');
-      setCookie('workDate', '', -1);
-      setCookie('appId', '', -1, '/');
-      setCookie('ticket', '', -1, '/');
-    });
-    return res;
+      setCookie('userInfo', '', -1, '/')
+      setCookie('userLogin', '', -1, '/')
+      setCookie('accessToken', '', -1, '/')
+      setCookie('refreshToken', '', -1, '/')
+      setCookie('workDate', '', -1)
+      setCookie('appId', '', -1, '/')
+      setCookie('ticket', '', -1, '/')
+    })
+    return res
   },
   // 获取apollo用户列表
-  apolloUser({
-    commit,
-    state
-  }) {
-    let res = axios.get(proPath + 'user');
+  apolloUser({ commit, state }) {
+    let res = axios.get(proPath + 'user')
     res.then(res => {
       //   处理路由
-      commit('addUser', res);
-    });
+      commit('addUser', res)
+    })
   },
   // 获取部门列表
-  apolloOrg({
-    commit,
-    state
-  }) {
-    let res = axios.get(proPath + 'organizations');
+  apolloOrg({ commit, state }) {
+    let res = axios.get(proPath + 'organizations')
     res.then(res => {
       // 处理路由
-      commit('addOrg', res);
-    });
+      commit('addOrg', res)
+    })
   },
-  ticketPush({
-    commit,
-    state
-  }) {
-    let res = axios.get(proPath + 'organizations');
+  ticketPush({ commit, state }) {
+    let res = axios.get(proPath + 'organizations')
     res.then(res => {
       // 处理路由
-      commit('ticketRes', res);
-    });
+      commit('ticketRes', res)
+    })
   }
 }
 
@@ -288,4 +309,4 @@ export default new Vuex.Store({
   actions,
   getters,
   mutations
-});
+})

+ 178 - 184
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -2,14 +2,14 @@
 <template>
   <div class="saleSteelReports">
     <div class="tableTop">
-      <el-form :inline="true" style="margin-top :5px">
+      <el-form :inline="true">
         <el-form-item>
           <el-select
             v-model="screen"
             placeholder="请选择需筛选的内容"
             clearable
             @change="changeScreen"
-            style="width:100px"
+            style="width:90px"
           >
             <el-option
               v-for="item in options"
@@ -20,34 +20,12 @@
             </el-option>
           </el-select>
           <el-input
-            style="width:170px"
+            style="width:150px"
             v-model="input"
             placeholder="请输入查询条件"
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item>
-          <el-select
-            v-model="screen1"
-            placeholder="请选择需筛选的内容"
-            clearable
-            style="width:100px"
-          >
-            <el-option
-              v-for="item in options1"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-          <el-input
-            style="width:170px"
-            v-model="input1"
-            placeholder="请输入查询条件"
-            clearable
-          ></el-input>
-        </el-form-item>
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
             >订单日期:</label
@@ -56,7 +34,7 @@
             v-model="startTime"
             type="date"
             placeholder="选择日期"
-            style="width:150px"
+            style="width:140px"
             :picker-options="pickerOptions"
           >
           </el-date-picker>
@@ -65,7 +43,7 @@
             v-model="endTime"
             type="date"
             placeholder="选择日期"
-            style="width:150px"
+            style="width:140px"
             :picker-options="pickerOptions1"
           >
           </el-date-picker>
@@ -121,55 +99,46 @@
             @click="batchCarrier()"
             v-if="!notRoutList.includes('batchCarrier')"
           >
-            <i class="el-icon-share"></i>批量授权</el-button
+            <i class="el-icon-share"></i>批量</el-button
           >
         </el-form-item>
         <el-form-item v-if="isShowOperate">
-          <el-button
-            type="primary"
-            @click="exceptionHandle()"
-            v-if="!notRoutList.includes('exceptionHandle')"
-          >
-            <i class="el-icon-s-open"></i>
-            异常处理
-          </el-button>
-        </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button
-            type="primary"
-            @click="mergeSplit()"
-            v-if="!notRoutList.includes('mergeSplit')"
-          >
-            <i class="el-icon-pie-chart"></i>
-            合并或拆分
-          </el-button>
-        </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button
-            type="primary"
-            @click="showSaleLog()"
-            v-if="!notRoutList.includes('saleLog')"
-          >
-            <i class="el-icon-pie-chart"></i>
-            操作日志
-          </el-button>
-        </el-form-item>
-        <el-form-item v-if="isShowOperate">
-          <el-button
-            type="primary"
-            @click="showBatchCapacity()"
-            v-if="!notRoutList.includes('batchCapacity')"
-          >
-            <i class="el-icon-edit"></i>
-            批量改车
-          </el-button>
+          <el-dropdown>
+            <el-button type="primary">
+              更多<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-button
+                type="primary"
+                @click="exceptionHandle()"
+                v-if="!notRoutList.includes('exceptionHandle')"
+              >
+                <i class="el-icon-s-open"></i>
+                异常处理
+              </el-button>
+              <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')"
+              >
+                <i class="el-icon-pie-chart"></i>
+                操作日志
+              </el-button>
+            </el-dropdown-menu>
+          </el-dropdown>
         </el-form-item>
         <el-form-item>
-          <label
-            class="el-form-item__label"
-            style="width: auto;font-size: 16px;line-height: auto;"
+          <span style="width: auto;font-size: 16px;line-height: auto;"
             >车数/件数: {{ totalCapacity }}/{{ totalNumber }}
-          </label>
+          </span>
         </el-form-item>
       </el-form>
     </div>
@@ -1134,21 +1103,48 @@
       <img width="100%" :src="dialogImageUrl" alt="" />
     </el-dialog>
     <el-dialog :visible.sync="batchCarrierVisible" width="30%" center>
-      <div>批量授权承运商</div>
-      <el-form>
-        <el-form-item>
-          <el-autocomplete
-            style="width:250px"
-            v-model="batchCarrierName"
-            :fetch-suggestions="querySearchCarrier"
-            placeholder="请输入承运商"
-            @select="handleSelectCarrier"
-          >
-          </el-autocomplete>
-        </el-form-item>
-      </el-form>
-      <el-button @click="batchCarrierVisible = false">取 消</el-button>
-      <el-button type="primary" @click="batchCarrierMakeSure">确 定</el-button>
+      <div class="batchCarrierClass">
+        <el-form :inline="true">
+          <span>批量授权承运商</span>
+          <el-form-item>
+            <el-autocomplete
+              style="width:250px"
+              v-model="batchCarrierName"
+              :fetch-suggestions="querySearchCarrier"
+              placeholder="请输入承运商"
+              @select="handleSelectCarrier"
+            >
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="batchCarrierVisible = false">取 消</el-button>
+            <el-button type="primary" @click="batchCarrierMakeSure"
+              >确 定</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="batchCapacityClass">
+        <el-form :inline="true">
+          <span>批量修改车牌号</span>
+          <el-form-item>
+            <el-autocomplete
+              style="width:250px"
+              v-model="capacityNo"
+              :fetch-suggestions="querySearch"
+              placeholder="请输入车牌号"
+              @select="batchCapacitySelect"
+            >
+            </el-autocomplete>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="batchCapacityVisible = false">取 消</el-button>
+            <el-button type="primary" @click="batchEditCapacity"
+              >确 定</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
     </el-dialog>
     <div class="dialog">
       <el-dialog
@@ -1387,23 +1383,6 @@
         <dil-table v-bind.sync="optionSaleLog"></dil-table>
       </el-dialog>
     </div>
-    <el-dialog :visible.sync="batchCapacityVisible" width="30%" center>
-      <div>批量修改车牌号</div>
-      <el-form>
-        <el-form-item>
-          <el-autocomplete
-            style="width:250px"
-            v-model="capacityNo"
-            :fetch-suggestions="querySearch"
-            placeholder="请输入车牌号"
-            @select="batchCapacitySelect"
-          >
-          </el-autocomplete>
-        </el-form-item>
-      </el-form>
-      <el-button @click="batchCapacityVisible = false">取 消</el-button>
-      <el-button type="primary" @click="batchEditCapacity">确 定</el-button>
-    </el-dialog>
   </div>
 </template>
 
@@ -1420,6 +1399,7 @@ export default {
   },
   data() {
     return {
+      toggleRowIds: [],
       capacityNo: null,
       capacityId: null,
       batchCapacityList: [],
@@ -1455,7 +1435,6 @@ export default {
       isShow4: false,
       input: null,
       screen: '',
-      screen1: '',
       options: [
         {
           value: '客户',
@@ -1474,20 +1453,6 @@ export default {
           lable: '分录ID'
         }
       ],
-      options1: [
-        {
-          value: '客户',
-          lable: '客户'
-        },
-        {
-          value: '承运商',
-          lable: '承运商'
-        },
-        {
-          value: '车牌号',
-          lable: '车牌号'
-        }
-      ],
       pickerOptions: {
         disabledDate(time) {
           return time.getTime() > Date.now()
@@ -1635,7 +1600,6 @@ export default {
       isShow: false,
       srcList2: [],
       isShow2: false,
-      input1: '',
       maxHeight: 700,
       //轨迹窗口
       value7: false,
@@ -1739,7 +1703,8 @@ export default {
         '订单变更时间',
         '销售订单变更记录',
         '运输订单变更记录'
-      ]
+      ],
+      scrollUpdateSelectFlag: 0
     }
   },
   created() {
@@ -1808,13 +1773,29 @@ export default {
     this.getSteelReport()
   },
   watch: {
-    // tableData: {
-    //   handler(oldVal, newVal) {
-    //     this.filterListChange()
-    //   },
-    //   deep: true,
-    //   immediate: true
-    // },
+    visibleList: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        let standList = this.$store.state.saleSteelToggleIds
+        this.$nextTick(() => {
+          this.visibleList.forEach(e => {
+            if (standList.includes(e.saleOrderMaterialId))
+              this.$refs.tableRef.toggleRowSelection(e, true)
+          })
+        })
+      }
+    },
+    maxHeight() {
+      this.visibleList = this.tableData.slice(
+        0,
+        Math.floor(this.maxHeight / 30)
+      )
+      this.getSpanArr(this.visibleList)
+      document.querySelector(
+        '.el-table__body-wrapper .el-table__body'
+      ).style.transform = `translateY(${0}px)`
+    },
     scrollTop: {
       immediate: true,
       deep: true,
@@ -1833,10 +1814,11 @@ export default {
           if (val <= 0) {
             val = 0
           }
+          console.log(this.$refs.tableRef.selection, 'selection2')
           const start = Math.floor(val / 30)
           this.visibleList = this.tableData.slice(
             start,
-            start + Math.floor(this.maxHeight / 30) + 1
+            start + Math.floor(this.maxHeight / 30)
           )
           this.getSpanArr(this.visibleList)
           document.querySelector(
@@ -1855,33 +1837,24 @@ export default {
     this.$nextTick(() => {
       window.onresize = () => {
         return (() => {
-          this.maxHeight = window.innerHeight - 146
-          this.getSteelReport()
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
         })()
       }
     })
     this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
       console.log(this.scrollTop, 'scrollTop')
-      // console.log(this.debounceS,'WXSDD-20230112-00067671')
-      // console.log(e)
       if (this.debounceS) return
       this.debounceS = true
       this.scrollTop = e.target.scrollTop
-
-      // let upDownLenght = this.scrollTop - this.scrollTopUpDownLenght
-      // if (upDownLenght < 0) {
-      // } else {
-      //   setTimeout(() => {
-      //     this.debounceS = false
-      //   }, 60)
-      // }
-      // document.querySelector(
-      //   '.el-table__body-wrapper .el-table__body'
-      // ).style.transform = `translateY(0px)`
+      this.scrollUpdateSelectFlag = 1
     })
   },
   activated() {
-    this.maxHeight = window.innerHeight - 146
+    this.maxHeight =
+      window.innerHeight - document.querySelector('.tableTop').offsetHeight - 40
   },
   computed: {},
   methods: {
@@ -1910,7 +1883,6 @@ export default {
       }
     },
     batchCapacitySelect(selection) {
-      console.log(selection)
       this.capacityNo = selection.capacityNumber
       this.capacityId = selection.capacityId
     },
@@ -1960,7 +1932,7 @@ export default {
             })
           }
         })
-        this.batchCapacityVisible = false
+        this.batchCarrierVisible = false
         this.getSteelReport()
       } else {
         this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
@@ -1974,8 +1946,6 @@ export default {
     },
     //删除计量实绩
     linkageDeleteTransportOrder(row, steelMap) {
-      console.log(row, 'row')
-      console.log(steelMap, 'steelMap')
       if (row.netWeight != null && row.netWeight != '') {
         //如果净重不为空
         let arr = []
@@ -2293,7 +2263,6 @@ export default {
       }
     },
     batchCarrierMakeSure() {
-      console.log(this.batchCarrierName)
       let batchCarrierId = null
       this.carrierList.forEach(item => {
         if (item.carrierName == this.batchCarrierName) {
@@ -2356,7 +2325,20 @@ export default {
         map.saleOrderMaterialId = e.saleOrderMaterialId
         return map
       })
-      console.log(this.batchCarrierList)
+      console.log(this.scrollUpdateSelectFlag)
+      if (this.scrollUpdateSelectFlag == 0) {
+        let arr = []
+        arr = Array.from(
+          this.$refs.tableRef.selection.map(e => {
+            return e.saleOrderMaterialId
+          })
+        )
+        let [...arr2] = arr
+        this.toggleRowIds = arr2
+        this.$store.commit('updateSaleSteelToggleIds', {
+          saleSteelToggleIds: arr
+        })
+      }
     },
     receiveClick(src, title) {
       // this.dialogImageUrl = src
@@ -3716,6 +3698,12 @@ export default {
     },
     //查询,输入查询条件
     onclick(obj) {
+      this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
+      // console.table(
+      //   this.$refs.tableRef.bodyWrapper.children[0].children[1].rows[2]
+      //     .offsetHeight
+      // )
+      // return
       this.isRowClick = 0
       const loading = this.$loading({
         lock: true,
@@ -3758,15 +3746,6 @@ export default {
       } else {
         remark = this.input
       }
-      if (this.screen1 == '客户') {
-        consigneeName = this.input1
-      } else if (this.screen1 == '承运商') {
-        carrierName = this.input1
-      } else if (this.screen1 == '车牌号') {
-        capacityNo = this.input1
-      } else {
-        remark = this.input1
-      }
       this.axios
         .post(
           '/api/v1/tms/getSaleSteelReport?startTime=' +
@@ -3795,7 +3774,6 @@ export default {
           }
         )
         .then(res => {
-          debugger
           this.tableData = res.data.data
           if (res.data.data.length > 0) {
             this.totalNumber = res.data.data[0].totalNumber
@@ -3810,8 +3788,10 @@ export default {
             this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
             this.filterSaleRemark = res.data.data[0].filterSaleRemark
           }
-
-          // this.getNodeNum(this.tableData)
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
           if (
             getCookie('orgCode') == 'shouhuokehu' &&
             this.tableData[0].isGcKeHu == '0'
@@ -3828,7 +3808,6 @@ export default {
             a = this.visibleList[0].rowKey
           }
           this.visibleList = []
-          this.maxHeight = window.innerHeight - 146
           this.visibleList = this.tableData.slice(
             0,
             Math.floor(this.maxHeight / this.itemHeight) + 1
@@ -3840,7 +3819,10 @@ export default {
         })
         .catch(() => {
           loading.close()
-          this.maxHeight = window.innerHeight - 146
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
           this.$message.error('查询失败')
         })
     },
@@ -3852,6 +3834,7 @@ export default {
     },
     //获取钢材统计报表
     getSteelReportDebounce() {
+      this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
       const loading = this.$loading({
         lock: true,
         text: '正在获取数据,请稍候',
@@ -3891,15 +3874,6 @@ export default {
       } else {
         remark = this.input
       }
-      if (this.screen1 == '下单客户') {
-        consigneeName = this.input1
-      } else if (this.screen1 == '承运商') {
-        carrierName = this.input1
-      } else if (this.screen1 == '车牌号') {
-        capacityNo = this.input1
-      } else {
-        remark = this.input1
-      }
       if (getCookie('orgCode') == 'chengyunshang') {
         carrierSsoId = getCookie('userId')
       }
@@ -3931,16 +3905,23 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data
-          this.totalNumber = res.data.data[0].totalNumber
-          this.totalCapacity = res.data.data[0].totalCapacity
-          this.filterConsigneeList = res.data.data[0].filterConsigneeList
-          this.filterCarrierList = res.data.data[0].filterCarrierList
-          this.filterCapacityList = res.data.data[0].filterCapacityList
-          this.filtermaterialNameList = res.data.data[0].filtermaterialNameList
-          this.filterorderStatus = res.data.data[0].filterorderStatus
-          this.filteraddressPlace = res.data.data[0].filteraddressPlace
-          this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
-          this.filterSaleRemark = res.data.data[0].filterSaleRemark
+          if (res.data.data.length > 0) {
+            this.totalNumber = res.data.data[0].totalNumber
+            this.totalCapacity = res.data.data[0].totalCapacity
+            this.filterConsigneeList = res.data.data[0].filterConsigneeList
+            this.filterCarrierList = res.data.data[0].filterCarrierList
+            this.filterCapacityList = res.data.data[0].filterCapacityList
+            this.filtermaterialNameList =
+              res.data.data[0].filtermaterialNameList
+            this.filterorderStatus = res.data.data[0].filterorderStatus
+            this.filteraddressPlace = res.data.data[0].filteraddressPlace
+            this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
+            this.filterSaleRemark = res.data.data[0].filterSaleRemark
+          }
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
           if (
             getCookie('orgCode') == 'shouhuokehu' &&
             this.tableData[0].isGcKeHu == '0'
@@ -3957,7 +3938,6 @@ export default {
             a = this.visibleList[0].rowKey
           }
           this.visibleList = []
-          this.maxHeight = window.innerHeight - 130
           // this.getNodeNum(this.tableData)
           this.visibleList = this.tableData.slice(
             0,
@@ -3968,7 +3948,10 @@ export default {
           loading.close()
         })
         .catch(() => {
-          this.maxHeight = window.innerHeight - 130
+          this.maxHeight =
+            window.innerHeight -
+            document.querySelector('.tableTop').offsetHeight -
+            40
           loading.close()
         })
     }
@@ -3981,6 +3964,7 @@ export default {
   .tableTop {
     margin-left: 20px;
     margin-top: 20px;
+    // height: ;
   }
   .table {
     margin-left: 20px;
@@ -4002,6 +3986,16 @@ export default {
     }
   }
 
+  .batchCarrierClass {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .batchCapacityClass {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
   .dialog {
     .exceptionHandleClass {
       display: flex;