|
@@ -16,7 +16,7 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<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-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -74,9 +74,7 @@
|
|
|
bordered>
|
|
|
<template slot="footer">
|
|
|
<span>
|
|
|
- 合计: 期初数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}
|
|
|
- 期初金额:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}
|
|
|
- 收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }}
|
|
|
+ 合计:收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }}
|
|
|
收入金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}
|
|
|
发出数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}
|
|
|
发出金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}
|
|
@@ -115,8 +113,8 @@ export default {
|
|
|
],
|
|
|
// beginDate: getDate.getMonthDays(3).starttime,
|
|
|
// endDate: getDate.getMonthDays(3).endtime,
|
|
|
- beginDate:'',
|
|
|
- endDate:'',
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
productEntity: {
|
|
|
code: '', // 产品编码
|
|
|
name: '', // 产品名称
|
|
@@ -129,7 +127,7 @@ export default {
|
|
|
labelCol: { span: 8 },
|
|
|
wrapperCol: { span: 16 },
|
|
|
rules: {
|
|
|
- 'time': [{ required: true, message: '请选择日期(最多查看三个月)', trigger: 'change' }]
|
|
|
+ 'time': [{ required: true, message: '请选择日期(最多查看一年)', trigger: 'change' }]
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false,
|
|
@@ -141,9 +139,9 @@ export default {
|
|
|
{ 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.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: '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) : '--') } },
|
|
@@ -157,6 +155,7 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
+ console.log('loadData.parameter:', parameter)
|
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
|
this.spinning = true
|
|
|
if (this.queryParam.beginDate) {
|
|
@@ -208,8 +207,8 @@ export default {
|
|
|
if (valid) {
|
|
|
const a = moment(this.queryParam.beginDate)
|
|
|
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
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
@@ -245,6 +244,7 @@ export default {
|
|
|
this.queryParam.productEntity.productTypeSn3 = ''
|
|
|
this.productType = []
|
|
|
this.totalData = null
|
|
|
+
|
|
|
this.$refs.table.clearTable()
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
},
|