projects/line-new-zhp #463

Merged
zhp merged 2 commits from projects/line-new-zhp into projects/line-new 2025-12-12 16:54:55 +08:00
4 changed files with 93 additions and 69 deletions

View File

@@ -401,6 +401,7 @@ export default {
activeLabel: 'table', // 当班数据tab
activeLabelDay: 'table', // 当天数据tab
fileName: '',
headFormValue:{},
dataListLoading: false,
tableProps,
factoryColumns: [],
@@ -571,6 +572,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -967,33 +969,34 @@ export default {
},
// 搜索/导出按钮点击
buttonClick(val) {
this.headFormValue = val
if (this.activeName === 'productLine') {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.process = val.process ? val.process : [];
this.listQuery.lineId = val.lineId ? val.lineId : [];
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.factoryId = this.headFormValue.factoryId || undefined;
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = this.headFormValue.lineId ? this.headFormValue.lineId : [];
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1003,30 +1006,30 @@ export default {
} else {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || []
this.listQuery.process = val.process ? val.process : [];
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1140,7 +1143,15 @@ export default {
},
async getProductList() {
console.log('resGroup');
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined
if (this.listQuery.timeType === 2) {
const resGroup = await getProcessAutoReportNew(this.listQuery);
console.log('resGroup', resGroup);

View File

@@ -406,6 +406,7 @@ export default {
factoryColumns: [],
factoryColumnsDay: [],
activeName: 'product',
headFormValue:{},
tableBtn: [],
showData: [],
tableData: [],
@@ -535,6 +536,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -557,6 +559,7 @@ export default {
prop: 'processType',
label: '产品类型',
filter: (val) => (val != 1 ? '面板' : '背板'),
sortable: true,
fixed: true
},
{
@@ -938,33 +941,34 @@ export default {
// 搜索/导出按钮点击
buttonClick(val) {
this.headFormValue = val
if (this.activeName === 'productLine') {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || undefined;
this.listQuery.process = val.process ? val.process : [];
this.listQuery.lineId = val.lineId ? val.lineId : [];
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.factoryId = this.headFormValue.factoryId || undefined;
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = this.headFormValue.lineId ? this.headFormValue.lineId : [];
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -974,30 +978,30 @@ export default {
} else {
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = val.factoryId || []
this.listQuery.process = val.process ? val.process : [];
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = val.processType ? val.processType : [];
this.listQuery.reportType = val.reportType || undefined;
this.listQuery.timeType = val.timeType || undefined;
this.listQuery.searchType = val.searchType || undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined;
// 处理不同时间选择类型
if (val.timeVal) {
this.listQuery.startTime = val.timeVal[0];
this.listQuery.endTime = val.timeVal[1];
} else if (val.timeValWeek) {
if (this.headFormValue.timeVal) {
this.listQuery.startTime = this.headFormValue.timeVal[0];
this.listQuery.endTime = this.headFormValue.timeVal[1];
} else if (this.headFormValue.timeValWeek) {
// 周选择器
const { startTime, endTime } = this.getWeekTimeRange(val.timeValWeek);
const { startTime, endTime } = this.getWeekTimeRange(this.headFormValue.timeValWeek);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else if (val.timeValMonth) {
} else if (this.headFormValue.timeValMonth) {
// 月选择器
this.listQuery.startTime = val.timeValMonth[0];
this.listQuery.endTime = val.timeValMonth[1];
} else if (val.timeValYear) {
this.listQuery.startTime = this.headFormValue.timeValMonth[0];
this.listQuery.endTime = this.headFormValue.timeValMonth[1];
} else if (this.headFormValue.timeValYear) {
// 年选择器
const { startTime, endTime } = this.getYearTimeRange(val.timeValYear);
const { startTime, endTime } = this.getYearTimeRange(this.headFormValue.timeValYear);
this.listQuery.startTime = startTime;
this.listQuery.endTime = endTime;
} else {
@@ -1109,7 +1113,15 @@ export default {
},
async getProductList() {
console.log('resGroup');
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.factoryId = this.headFormValue.factoryId || []
this.listQuery.process = this.headFormValue.process ? this.headFormValue.process : [];
this.listQuery.lineId = undefined;
this.listQuery.processType = this.headFormValue.processType ? this.headFormValue.processType : [];
this.listQuery.reportType = this.headFormValue.reportType || undefined;
this.listQuery.timeType = this.headFormValue.timeType || undefined;
this.listQuery.searchType = this.headFormValue.searchType || undefined
if (this.listQuery.timeType === 2) {
const resGroup = await getProcessAutoReportNew(this.listQuery);
console.log('resGroup', resGroup);

View File

@@ -210,7 +210,7 @@
</template>
<script>
import moment from 'moment';
import JDatePickerScript from './JDatePicker.js'
// import JDatePickerScript from './JDatePicker.js'
export default {
props: {

View File

@@ -121,6 +121,7 @@ export default {
type: 'select',
label: '产线',
selectOptions: [],
multiple: true,
param: 'lineId',
},
{