|
|
@@ -374,8 +374,6 @@
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- orderCountingRecordsDate: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
- moment(new Date()).format('yyyy-MM-DD')],
|
|
|
logisticsCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
moment(new Date()).format('yyyy-MM-DD')],
|
|
|
warehouseCountingRecordsData: [moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
@@ -396,6 +394,26 @@
|
|
|
orderCountingRecordsYearShow: false,
|
|
|
orderCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
orderCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ orderCountingUnit: '日',
|
|
|
+ orderUnitsData:{
|
|
|
+ start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_day: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ start_month: moment().subtract('12', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_month: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ start_year: moment().subtract('12', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_year: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ },
|
|
|
+
|
|
|
+ laborReportsUnit: '日',
|
|
|
+ laborReportsData:{
|
|
|
+ start_day: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_day: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ start_month: moment().subtract('12', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_month: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ start_year: moment().subtract('12', 'month').format('yyyy-MM-DD'),
|
|
|
+ end_year: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ },
|
|
|
+
|
|
|
laborReportsCountingRecordsDayShow: true,
|
|
|
laborReportsCountingRecordsMonthShow: false,
|
|
|
laborReportsCountingRecordsYearShow: false,
|
|
|
@@ -437,6 +455,66 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ switchDataPanel_forOrderCountingRecords(fromUnit,toUnit){
|
|
|
+ switch (fromUnit){
|
|
|
+ case '日':
|
|
|
+ this.orderUnitsData.start_day=this.orderCountingRecordsStart;
|
|
|
+ this.orderUnitsData.end_day=this.orderCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ case '月':
|
|
|
+ this.orderUnitsData.start_month=this.orderCountingRecordsStart;
|
|
|
+ this.orderUnitsData.end_month=this.orderCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ case '年':
|
|
|
+ this.orderUnitsData.start_year=this.orderCountingRecordsStart;
|
|
|
+ this.orderUnitsData.end_year=this.orderCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (toUnit){
|
|
|
+ case '日':
|
|
|
+ this.orderCountingRecordsStart=this.orderUnitsData.start_day;
|
|
|
+ this.orderCountingRecordsEnd=this.orderUnitsData.end_day;
|
|
|
+ break;
|
|
|
+ case '月':
|
|
|
+ this.orderCountingRecordsStart=this.orderUnitsData.start_month;
|
|
|
+ this.orderCountingRecordsEnd=this.orderUnitsData.end_month;
|
|
|
+ break;
|
|
|
+ case '年':
|
|
|
+ this.orderCountingRecordsStart=this.orderUnitsData.start_year;
|
|
|
+ this.orderCountingRecordsEnd=this.orderUnitsData.end_year;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ switchDataPanel_forLaborReports(fromUnit,toUnit){
|
|
|
+ switch (fromUnit){
|
|
|
+ case '日':
|
|
|
+ this.laborReportsData.start_day=this.laborReportsCountingRecordsStart;
|
|
|
+ this.laborReportsData.end_day=this.laborReportsCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ case '月':
|
|
|
+ this.laborReportsData.start_month=this.laborReportsCountingRecordsStart;
|
|
|
+ this.laborReportsData.end_month=this.laborReportsCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ case '年':
|
|
|
+ this.laborReportsData.start_year=this.laborReportsCountingRecordsStart;
|
|
|
+ this.laborReportsData.end_year=this.laborReportsCountingRecordsEnd;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ switch (toUnit){
|
|
|
+ case '日':
|
|
|
+ this.laborReportsCountingRecordsStart=this.laborReportsData.start_day;
|
|
|
+ this.laborReportsCountingRecordsEnd=this.laborReportsData.end_day;
|
|
|
+ break;
|
|
|
+ case '月':
|
|
|
+ this.laborReportsCountingRecordsStart=this.laborReportsData.start_month;
|
|
|
+ this.laborReportsCountingRecordsEnd=this.laborReportsData.end_month;
|
|
|
+ break;
|
|
|
+ case '年':
|
|
|
+ this.laborReportsCountingRecordsStart=this.laborReportsData.start_year;
|
|
|
+ this.laborReportsCountingRecordsEnd=this.laborReportsData.end_year;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
getWareHouse: function (code) {
|
|
|
return this.warehouses[code];
|
|
|
},
|
|
|
@@ -576,24 +654,23 @@
|
|
|
if (orderCountingRecordsUnit === '') {
|
|
|
orderCountingRecordsUnit = this.orderCountingRecordsUnit;
|
|
|
}
|
|
|
+ this.switchDataPanel_forOrderCountingRecords(this.orderCountingUnit, orderCountingRecordsUnit);
|
|
|
+ this.orderCountingUnit=orderCountingRecordsUnit;
|
|
|
switch (orderCountingRecordsUnit) {
|
|
|
case '日':
|
|
|
this.orderCountingRecordsDayShow = true;
|
|
|
this.orderCountingRecordsMonthShow = false;
|
|
|
this.orderCountingRecordsYearShow = false;
|
|
|
- this.orderCountingRecordsStart = moment().subtract('1', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
case '月':
|
|
|
this.orderCountingRecordsDayShow = false;
|
|
|
this.orderCountingRecordsMonthShow = true;
|
|
|
this.orderCountingRecordsYearShow = false;
|
|
|
- this.orderCountingRecordsStart = moment().subtract('12', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
case '年':
|
|
|
this.orderCountingRecordsDayShow = false;
|
|
|
this.orderCountingRecordsMonthShow = false;
|
|
|
this.orderCountingRecordsYearShow = true;
|
|
|
- this.orderCountingRecordsStart = moment().subtract('12', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
}
|
|
|
this.orderCountingRecordsUnit = orderCountingRecordsUnit;
|
|
|
@@ -650,25 +727,24 @@
|
|
|
if (laborReportsCountingRecordUnit === '') {
|
|
|
laborReportsCountingRecordUnit = this.laborReportsCountingRecordUnit;
|
|
|
}
|
|
|
+ this.switchDataPanel_forLaborReports(this.laborReportsUnit, laborReportsCountingRecordUnit);
|
|
|
+ this.laborReportsUnit=laborReportsCountingRecordUnit;
|
|
|
this.laborReportsCountingRecordUnit = laborReportsCountingRecordUnit;
|
|
|
switch (laborReportsCountingRecordUnit) {
|
|
|
case '日':
|
|
|
this.laborReportsCountingRecordsDayShow = true;
|
|
|
this.laborReportsCountingRecordsMonthShow = false;
|
|
|
this.laborReportsCountingRecordsYearShow = false;
|
|
|
- this.laborReportsCountingRecordsStart = moment().subtract('1', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
case '月':
|
|
|
this.laborReportsCountingRecordsDayShow = false;
|
|
|
this.laborReportsCountingRecordsMonthShow = true;
|
|
|
this.laborReportsCountingRecordsYearShow = false;
|
|
|
- this.laborReportsCountingRecordsStart = moment().subtract('12', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
case '年':
|
|
|
this.laborReportsCountingRecordsDayShow = false;
|
|
|
this.laborReportsCountingRecordsMonthShow = false;
|
|
|
this.laborReportsCountingRecordsYearShow = true;
|
|
|
- this.laborReportsCountingRecordsStart = moment().subtract('12', 'month').format('yyyy-MM-DD');
|
|
|
break;
|
|
|
}
|
|
|
|