|
@@ -16,7 +16,7 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="日期" prop="time">
|
|
<a-form-model-item label="日期" prop="time">
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
|
|
|
+ <rangeDate ref="rangeDate" :showShortcut="false" @change="dateChange" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -96,6 +96,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
|
+import moment from 'moment'
|
|
import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
|
|
import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
|
|
@@ -122,7 +123,7 @@ export default {
|
|
labelCol: { span: 8 },
|
|
labelCol: { span: 8 },
|
|
wrapperCol: { span: 16 },
|
|
wrapperCol: { span: 16 },
|
|
rules: {
|
|
rules: {
|
|
- 'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
|
|
|
|
|
|
+ 'time': [{ required: true, message: '请选择日期(最多查看三个月)', trigger: 'change' }]
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
@@ -198,6 +199,12 @@ export default {
|
|
handleSearch () {
|
|
handleSearch () {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ const a = moment(this.queryParam.beginDate)
|
|
|
|
+ const b = moment(this.queryParam.endDate)
|
|
|
|
+ if (b.diff(a, 'month') > 2) {
|
|
|
|
+ this.$message.info('最多只能查询3个月')
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!')
|
|
console.log('error submit!!')
|