|
@@ -8,11 +8,12 @@
|
|
:model="form">
|
|
:model="form">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="5" :sm="24">
|
|
<a-col :md="5" :sm="24">
|
|
- <a-form-model-item label="选择月份" prop="time">
|
|
|
|
|
|
+ <a-form-model-item label="选择周期" prop="time">
|
|
<div class="monthBox" style="display:flex;align-item:center;">
|
|
<div class="monthBox" style="display:flex;align-item:center;">
|
|
<a-month-picker
|
|
<a-month-picker
|
|
:disabled-date="disabledStartDate"
|
|
:disabled-date="disabledStartDate"
|
|
format="YYYY-MM"
|
|
format="YYYY-MM"
|
|
|
|
+ v-model="startValue"
|
|
placeholder="开始月份"
|
|
placeholder="开始月份"
|
|
@openChange="handleStartOpenChange"
|
|
@openChange="handleStartOpenChange"
|
|
@change="getStartDate"
|
|
@change="getStartDate"
|
|
@@ -21,6 +22,7 @@
|
|
<a-month-picker
|
|
<a-month-picker
|
|
:disabled-date="disabledEndDate"
|
|
:disabled-date="disabledEndDate"
|
|
format="YYYY-MM"
|
|
format="YYYY-MM"
|
|
|
|
+ v-model="endValue"
|
|
placeholder="结束月份"
|
|
placeholder="结束月份"
|
|
:open="endOpen"
|
|
:open="endOpen"
|
|
@openChange="handleEndOpenChange"
|
|
@openChange="handleEndOpenChange"
|
|
@@ -29,14 +31,14 @@
|
|
</div>
|
|
</div>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="5" :sm="24">
|
|
|
|
- <a-form-model-item label="产品名称">
|
|
|
|
- <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
<a-col :md="4" :sm="24">
|
|
<a-col :md="4" :sm="24">
|
|
<a-form-model-item label="产品编码">
|
|
<a-form-model-item label="产品编码">
|
|
- <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
|
|
|
+ <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="5" :sm="24">
|
|
<a-col :md="5" :sm="24">
|
|
@@ -129,8 +131,10 @@ export default {
|
|
queryParam: {
|
|
queryParam: {
|
|
beginDate: undefined,
|
|
beginDate: undefined,
|
|
endDate: undefined,
|
|
endDate: undefined,
|
|
- productCode: '', // 产品编码
|
|
|
|
- productName: '', // 产品名称
|
|
|
|
|
|
+ product: {
|
|
|
|
+ name: '', // 产品名称
|
|
|
|
+ code: ''// 产品编码
|
|
|
|
+ },
|
|
productBrandSn: undefined,
|
|
productBrandSn: undefined,
|
|
productTypeSn1: undefined,
|
|
productTypeSn1: undefined,
|
|
productTypeSn2: undefined,
|
|
productTypeSn2: undefined,
|
|
@@ -149,6 +153,8 @@ export default {
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
endOpen: false,
|
|
endOpen: false,
|
|
showExport: false,
|
|
showExport: false,
|
|
|
|
+ startValue: null,
|
|
|
|
+ endValue: null,
|
|
columns: [
|
|
columns: [
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
@@ -205,14 +211,14 @@ export default {
|
|
},
|
|
},
|
|
// 选择月份限制
|
|
// 选择月份限制
|
|
disabledStartDate (startValue) {
|
|
disabledStartDate (startValue) {
|
|
- const endValue = this.endMonthVal
|
|
|
|
|
|
+ const endValue = this.endValue
|
|
if (!startValue || !endValue) {
|
|
if (!startValue || !endValue) {
|
|
return startValue.valueOf() > this.moment().valueOf()
|
|
return startValue.valueOf() > this.moment().valueOf()
|
|
}
|
|
}
|
|
return startValue.valueOf() >= endValue.valueOf()
|
|
return startValue.valueOf() >= endValue.valueOf()
|
|
},
|
|
},
|
|
disabledEndDate (endValue) {
|
|
disabledEndDate (endValue) {
|
|
- const startValue = this.startMonthVal
|
|
|
|
|
|
+ const startValue = this.startValue
|
|
if (!startValue) {
|
|
if (!startValue) {
|
|
return endValue.valueOf() > this.moment().valueOf()
|
|
return endValue.valueOf() > this.moment().valueOf()
|
|
}
|
|
}
|
|
@@ -226,7 +232,7 @@ export default {
|
|
},
|
|
},
|
|
getStartDate (date, dateString) {
|
|
getStartDate (date, dateString) {
|
|
this.form.time[0] = dateString
|
|
this.form.time[0] = dateString
|
|
- this.queryParam.beginDate = this.moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
|
|
|
+ this.queryParam.beginDate = date ? this.moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00' : ''
|
|
},
|
|
},
|
|
// 结束时间
|
|
// 结束时间
|
|
handleEndOpenChange (open) {
|
|
handleEndOpenChange (open) {
|
|
@@ -234,7 +240,7 @@ export default {
|
|
},
|
|
},
|
|
getEndDate (date, dateString) {
|
|
getEndDate (date, dateString) {
|
|
this.form.time[1] = dateString
|
|
this.form.time[1] = dateString
|
|
- this.queryParam.endDate = this.moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 59:59:59'
|
|
|
|
|
|
+ this.queryParam.endDate = date ? this.moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 23:59:59' : ''
|
|
},
|
|
},
|
|
|
|
|
|
// 产品分类 change
|
|
// 产品分类 change
|
|
@@ -297,8 +303,13 @@ export default {
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
- this.queryParam.productCode = undefined
|
|
|
|
- this.queryParam.productName = undefined
|
|
|
|
|
|
+ this.startValue = null
|
|
|
|
+ this.endValue = null
|
|
|
|
+ this.time = []
|
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
|
+ this.queryParam.product.code = ''
|
|
|
|
+ this.queryParam.product.name = ''
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productBrandSn = undefined
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|