原片追溯,报表日期
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2024-04-22 15:49:56
|
||||
* @LastEditTime: 2024-04-25 14:30:44
|
||||
* @LastEditTime: 2024-04-26 10:14:50
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@@ -94,26 +94,45 @@ export default {
|
||||
now.setHours(0, 0, 0, 0)
|
||||
now.setDate(1)
|
||||
let startOfMonth = now.getTime()
|
||||
// let firstDayOfMonth = new Date(startOfMonth)
|
||||
this.listQuery.time = startOfMonth
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getTime1() {
|
||||
const firstDayOfMonth = new Date(this.listQuery.time)
|
||||
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
|
||||
// console.log('时间', parseTime(firstDayOfMonth), parseTime(lastDayOfMonth))
|
||||
this.$set(this.tableProps[2], 'label', '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
|
||||
this.$set(this.tableProps1[2], 'label', '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')')
|
||||
// this.tableProps[2].label = '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
|
||||
// this.tableProps1[2].label = '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')'
|
||||
console.log(this.tableProps, this.tableProps1)
|
||||
},
|
||||
async getList() {
|
||||
const firstDayOfMonth = new Date(this.listQuery.time)
|
||||
const lastDayOfMonth = new Date(firstDayOfMonth.getFullYear(), firstDayOfMonth.getMonth() + 1, 0, 0, 0, 0, 0)
|
||||
this.tableData = [];
|
||||
this.tableProps = [
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'paramsName',
|
||||
label: '',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'xc',
|
||||
label: '许昌安彩月原片生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
|
||||
// align: 'center',
|
||||
children: []
|
||||
}
|
||||
];
|
||||
this.tableData1 = [];
|
||||
this.tableProps1 = [
|
||||
@@ -121,18 +140,26 @@ export default {
|
||||
prop: 'lineName',
|
||||
label: '',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'paramsName',
|
||||
label: '',
|
||||
fixed: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'xc1',
|
||||
label: '许昌安彩月成品生产汇总(' + parseTime(firstDayOfMonth) + '-' + parseTime(lastDayOfMonth) + ')',
|
||||
// align: 'center',
|
||||
children: []
|
||||
}
|
||||
];
|
||||
await productionMonthY(this.listQuery).then((res) => {
|
||||
this.resData = res.data;
|
||||
// 设置表头
|
||||
Object.keys(this.resData).forEach((item) => {
|
||||
this.tableProps.push({
|
||||
this.tableProps[2].children.push({
|
||||
prop: item,
|
||||
label: item,
|
||||
'show-overflow-tooltip': true,
|
||||
@@ -144,7 +171,7 @@ export default {
|
||||
this.resData1 = res.data;
|
||||
// 设置表头
|
||||
Object.keys(this.resData1).forEach((item) => {
|
||||
this.tableProps1.push({
|
||||
this.tableProps1[2].children.push({
|
||||
prop: item,
|
||||
label: item,
|
||||
'show-overflow-tooltip': true,
|
||||
@@ -152,6 +179,7 @@ export default {
|
||||
});
|
||||
this.buildTableData1(this.resData1);
|
||||
});
|
||||
// this.getTime1()
|
||||
},
|
||||
// 设置表格2数据
|
||||
buildTableData1(data) {
|
||||
|
||||
Reference in New Issue
Block a user