|
@@ -3,11 +3,11 @@
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="searchForm">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="创建时间">
|
|
<a-form-item label="创建时间">
|
|
- <rangeDate :allowClear="false" ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
|
|
|
+ <rangeDate :allowClear="false" :hasDisabledAreaTime="false" ref="rangeDate" :value="time" @change="dateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -23,12 +23,12 @@
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="审核时间">
|
|
<a-form-item label="审核时间">
|
|
- <rangeDate :allowClear="false" ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
|
|
|
|
|
|
+ <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="出库时间">
|
|
<a-form-item label="出库时间">
|
|
- <rangeDate :allowClear="false" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
|
|
|
|
|
|
+ <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -88,7 +88,7 @@
|
|
</template>
|
|
</template>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<span class="table-page-search-submitButtons">
|
|
- <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
|
|
|
+ <a-button type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
|
|
<a-button style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
<a-button style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -229,6 +229,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import { downloadExcel } from '@/libs/JGPrint.js'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
|
+import moment from 'moment'
|
|
export default {
|
|
export default {
|
|
name: 'SalesList',
|
|
name: 'SalesList',
|
|
components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList, stateIcon },
|
|
components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList, stateIcon },
|
|
@@ -242,15 +243,15 @@ export default {
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
openModal: false, // 选择客户弹框是否显示
|
|
openModal: false, // 选择客户弹框是否显示
|
|
time: [
|
|
time: [
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
|
- getDate.getCurrMonthDays().endtime
|
|
|
|
|
|
+ getDate.getMonthDays(12).starttime,
|
|
|
|
+ getDate.getMonthDays(12).endtime
|
|
],
|
|
],
|
|
auditTime: [],
|
|
auditTime: [],
|
|
outWareTime: [],
|
|
outWareTime: [],
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
|
|
|
+ beginDate: getDate.getMonthDays(12).starttime,
|
|
|
|
+ endDate: getDate.getMonthDays(12).endtime,
|
|
auditBeginDate: '',
|
|
auditBeginDate: '',
|
|
auditEndDate: '',
|
|
auditEndDate: '',
|
|
outWarehouseBeginDate: '',
|
|
outWarehouseBeginDate: '',
|
|
@@ -437,6 +438,16 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ searchForm () {
|
|
|
|
+ const a = moment(this.queryParam.beginDate)
|
|
|
|
+ const b = moment(this.queryParam.endDate)
|
|
|
|
+ console.log(b.diff(a, 'years'))
|
|
|
|
+ if (b.diff(a, 'years') > 2) {
|
|
|
|
+ this.$message.info('最多只能选择2年的时间区间')
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.resetData()
|
|
this.resetData()
|
|
@@ -445,8 +456,8 @@ export default {
|
|
// 重置数据
|
|
// 重置数据
|
|
resetData (flag) {
|
|
resetData (flag) {
|
|
this.$refs.rangeDate.resetDate(flag ? '' : this.time)
|
|
this.$refs.rangeDate.resetDate(flag ? '' : this.time)
|
|
- this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
|
|
|
|
- this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
|
|
|
|
|
|
+ this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(12).starttime
|
|
|
|
+ this.queryParam.endDate = flag ? '' : getDate.getMonthDays(12).endtime
|
|
this.$refs.auditRangeDate.resetDate('')
|
|
this.$refs.auditRangeDate.resetDate('')
|
|
this.queryParam.auditBeginDate = ''
|
|
this.queryParam.auditBeginDate = ''
|
|
this.queryParam.auditEndDate = ''
|
|
this.queryParam.auditEndDate = ''
|