|
@@ -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" :showShortcut="false" :value="queryParam.time" @change="dateChange" />
|
|
|
|
|
|
+ <rangeDate ref="rangeDate" :value="queryParam.time" @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">
|
|
@@ -115,8 +115,8 @@ export default {
|
|
],
|
|
],
|
|
// beginDate: getDate.getMonthDays(3).starttime,
|
|
// beginDate: getDate.getMonthDays(3).starttime,
|
|
// endDate: getDate.getMonthDays(3).endtime,
|
|
// endDate: getDate.getMonthDays(3).endtime,
|
|
- beginDate:'',
|
|
|
|
- endDate:'',
|
|
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
productEntity: {
|
|
productEntity: {
|
|
code: '', // 产品编码
|
|
code: '', // 产品编码
|
|
name: '', // 产品名称
|
|
name: '', // 产品名称
|
|
@@ -129,7 +129,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,
|
|
@@ -141,9 +141,9 @@ export default {
|
|
{ title: '三级分类', dataIndex: 'productEntity.productTypeName3', width: 130, align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '三级分类', dataIndex: 'productEntity.productTypeName3', width: 130, align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'left', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '期初数量', dataIndex: 'beginQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
- { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
|
|
+ // { title: '期初数量', dataIndex: 'beginQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ // { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
|
+ // { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '收入数量', dataIndex: 'putQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '收入数量', dataIndex: 'putQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '收入单价(¥)', dataIndex: 'putPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '收入单价(¥)', dataIndex: 'putPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
@@ -208,8 +208,8 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
const a = moment(this.queryParam.beginDate)
|
|
const a = moment(this.queryParam.beginDate)
|
|
const b = moment(this.queryParam.endDate).subtract(1, 'days')
|
|
const b = moment(this.queryParam.endDate).subtract(1, 'days')
|
|
- if (b.diff(a, 'month') > 2) {
|
|
|
|
- this.$message.info('最多只能查询3个月')
|
|
|
|
|
|
+ if (b.diff(a, 'days') > 365) {
|
|
|
|
+ this.$message.info('最多只能查询一年')
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|