|
@@ -29,8 +29,8 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="日期" prop="time">
|
|
|
- <rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
+ <a-form-model-item label="日期" prop="auditDate">
|
|
|
+ <a-month-picker v-model="queryParam.auditDate" :allowClear="false" @change="onChange" :defaultValue="moment()" style="width: 100%;" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -113,22 +113,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import moment from 'moment'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
|
import { dealerProductTypeList } from '@/api/dealerProductType'
|
|
|
-import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { linkageReportPageList, linkageReportPageTotal, linkageGroupList } from '@/api/reportData'
|
|
|
export default {
|
|
|
- components: { STable, VSelect, rangeDate },
|
|
|
+ components: { STable, VSelect },
|
|
|
data () {
|
|
|
return {
|
|
|
+ moment,
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
|
tableHeight: 0,
|
|
|
queryParam: { // 查询条件
|
|
|
- time: [],
|
|
|
- beginDate: '',
|
|
|
- endDate: '',
|
|
|
+ auditDate: moment().format('YYYY-MM'),
|
|
|
tenantId: undefined,
|
|
|
productEntity: {
|
|
|
code: '', // 产品编码
|
|
@@ -143,7 +142,7 @@ export default {
|
|
|
wrapperCol: { span: 16 },
|
|
|
rules: {
|
|
|
'tenantId': [{ required: true, message: '请选择连锁店', trigger: 'change' }],
|
|
|
- 'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
|
|
|
+ 'auditDate': [{ required: true, message: '请选择日期', trigger: 'change' }]
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false,
|
|
@@ -172,7 +171,8 @@ export default {
|
|
|
this.disabled = true
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
this.spinning = true
|
|
|
- if (this.queryParam.beginDate && this.queryParam.tenantId) {
|
|
|
+ if (this.queryParam.auditDate && this.queryParam.tenantId) {
|
|
|
+ params.auditDate = this.queryParam.auditDate + '-01'
|
|
|
return linkageReportPageList(params).then(res => {
|
|
|
// 总计
|
|
|
this.getCount(params)
|
|
@@ -209,11 +209,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 时间 change
|
|
|
- dateChange (date) {
|
|
|
- this.queryParam.time = date
|
|
|
- this.queryParam.beginDate = date[0] || ''
|
|
|
- this.queryParam.endDate = date[1] || ''
|
|
|
+ // 月份 change
|
|
|
+ onChange (date, dateString) {
|
|
|
+ this.queryParam.auditDate = dateString || null
|
|
|
},
|
|
|
// 查询
|
|
|
handleSearch () {
|
|
@@ -239,10 +237,7 @@ export default {
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.tenantId = undefined
|
|
|
- this.$refs.rangeDate.resetDate()
|
|
|
- this.queryParam.time = []
|
|
|
- this.queryParam.beginDate = ''
|
|
|
- this.queryParam.endDate = ''
|
|
|
+ this.queryParam.auditDate = moment().format('YYYY-MM')
|
|
|
this.queryParam.productEntity.code = ''
|
|
|
this.queryParam.productEntity.name = ''
|
|
|
this.queryParam.productEntity.productBrandSn = undefined
|