luobang 2 лет назад
Родитель
Сommit
885d695b2e

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 let devModules = ['all']
-// let devModules = ['index', 'statisticalReport', 'appoint']
+// let devModules = ['index', 'statisticalReport', 'inward', 'appoint']
 // let devModules = ['index', 'ADMINISTRATORS']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 70 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -57,6 +57,7 @@
             type="date"
             placeholder="选择日期"
             style="width:150px"
+            :picker-options="pickerOptions"
           >
           </el-date-picker>
           <span>至</span>
@@ -65,6 +66,7 @@
             type="date"
             placeholder="选择日期"
             style="width:150px"
+            :picker-options="pickerOptions1"
           >
           </el-date-picker>
           <el-button type="primary" class="btn" @click="onclick">
@@ -1598,6 +1600,64 @@ export default {
           lable: '车牌号'
         }
       ],
+      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(),
       //合计净重
@@ -3836,7 +3896,16 @@ export default {
         .then(res => {
           this.tableData = res.data.data
           this.totalHeight += this.itemHeight
-          this.visibleList = res.data.data
+          this.totalHeight += this.itemHeight
+          this.visibleList = []
+          this.maxHeight = window.innerHeight - 130
+          this.visibleList = this.tableData.slice(
+            0,
+            Math.floor(this.maxHeight / this.itemHeight) + 1
+          )
+          console.log(this.visibleList)
+          console.log(this.maxHeight, 'this.maxHeight')
+          loading.close()
           console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)