diff --git a/src/views/quality/monitoring/originalGlassRetrace/index.vue b/src/views/quality/monitoring/originalGlassRetrace/index.vue index 66122bd2..56d68fe1 100644 --- a/src/views/quality/monitoring/originalGlassRetrace/index.vue +++ b/src/views/quality/monitoring/originalGlassRetrace/index.vue @@ -1,20 +1,61 @@ @@ -34,35 +75,17 @@ import { } from '@/api/quality/rawMaterialTraceability'; const tableProps = [ - { - prop: 'orderName', - label: '订单名称', + prop: 'certificateNumber', + label: '合格证号', }, { - prop: 'workOrderName', - label: '工单名称', - }, - { - prop: 'palletNumber', - label: '托号', - }, - { - prop: 'transportQuantity', - label: '该托片数', + prop: 'boxNumber', + label: '箱号', }, { prop: 'packagingCode', - label: '包装条码', - }, - { - prop: 'originalGlassLineName', - label: '原片产线', - }, - { - prop: 'originalGlassOutputTime', - label: '原片下片时间', - filter: parseTime + label: '成品周转编号', }, { prop: 'deepProcessingLineName', @@ -74,10 +97,23 @@ const tableProps = [ filter: parseTime }, { - prop: 'productionOutputTime', + prop: 'deepProcessingOutputTime', label: '深加工下片时间', filter: parseTime }, + { + prop: 'glassCode', + label: '原片周转编码', + }, + { + prop: 'originalGlassLineName', + label: '原片产线', + }, + { + prop: 'originalGlassOutputTime', + label: '原片下片时间', + filter: parseTime + }, // { // prop: 'scrapDetail', // label: '详情', @@ -115,37 +151,70 @@ export default { // ].filter((v) => v), list: [], listQuery: { - pageSize: 10, - pageNo: 1, - total: 0, - workOrderId: undefined, - startTime: undefined, - endTime:undefined, + // pageSize: 10, + // pageNo: 1, + // total: 0, + certificateNumber: undefined, + packagingCode: undefined, + timeVal:undefined, + lineName: undefined, + glassCode: undefined }, + count: 0, + useTime: false, + countArray: [], // tableH: this.tableHeight(260), formConfig: [ + // { + // type: 'select', + // label: '工单', + // selectOptions: [], + // labelField: 'name', + // valueField: 'name', + // param: 'workOrderName', + // filterable: true + // }, + { + type: 'input', + label: '合格证号', + placeholder: '合格证号', + param: 'certificateNumber', + + }, + { + type: 'input', + label: '成品周转编号', + placeholder: '成品周转编号', + param: 'packagingCode' + }, + { + type: 'datePicker', + label: '包装全检时间及产线', + dateType: 'datetimerange', + format: 'timestamp', + valueFormat: "timestamp", + rangeSeparator: '-', + startPlaceholder: '开始时间', + endPlaceholder: '结束时间', + param: 'timeVal', + defaultSelect: [], + width: 250 + }, { type: 'select', - label: '工单', + label: '', selectOptions: [], labelField: 'name', valueField: 'name', - param: 'workOrderName', + param: 'lineName', filterable: true }, - // { - // type: 'datePicker', - // label: '时间段', - // dateType: 'daterange', - // format: 'yyyy-MM-dd', - // valueFormat: "yyyy-MM-dd", - // rangeSeparator: '-', - // startPlaceholder: '开始时间', - // endPlaceholder: '结束时间', - // param: 'timeVal', - // defaultSelect: [], - // width: 250 - // }, + { + type: 'input', + label: '原片周转编号', + placeholder: '原片周转编号', + param: 'glassCode' + }, { type: this.$auth.hasPermi('monitoring:rawMaterial-traceability:query') ? 'button' : '', @@ -191,17 +260,58 @@ export default { // window.addEventListener('resize', () => { // this.tableH = this.tableHeight(260) // }) - this.getList() + this.count = 0 + this.useTime = false + // this.getList() this.getDict() }, methods: { + countTimes(val) { + if (val === 1) { + let temp = this.listQuery?.certificateNumber !== '' + this.countArray[0] = temp + console.log('你好', this.countArray) + } + if (val && val !== '') { + if (val === 'timestamp3') { + if (this.listQuery.timeVal.length > 0 || this.listQuery?.lineName !== '') { + this.useTime = true + } else { + this.useTime = false + } + } else { + this.count ++ + } + } else { + this.count -- + } + }, getList() { + // console.log('nihc ', this.count, this.listQuery) + // if (this.count > 1) { + // this.$message.error('请选择一个条件进行查询!') + // } else { + // if (this.useTime === true) { + // if (this.listQuery.timeVal.length > 0 && this.listQuery?.lineName !== '') { + // getOriginalGlassRetrace({ ...this.listQuery }).then(res => { + // console.log(res); + // this.list = res.data || [] + // console.log(this.list); + // // this.listQuery.total = res.data.total || 0 + // }) + // } else { + // this.$message.error('选择包装全检时,时间和产线必填!') + // } + // } else { getOriginalGlassRetrace({ ...this.listQuery }).then(res => { console.log(res); this.list = res.data || [] console.log(this.list); // this.listQuery.total = res.data.total || 0 }) + // } + // } + }, getDict() { // 获取产品的属性列表 @@ -243,7 +353,7 @@ export default { buttonClick(val) { console.log(val) if (val.btnName === 'search') { - this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined + this.listQuery.certificateNumber = val.certificateNumber ? val.certificateNumber :undefined // this.queryParams.status = val.status // if (val.timeVal && val.timeVal.length != 0 ) { // this.listQuery.startTime = val.timeVal[0] + ' 00:00:00' @@ -272,3 +382,17 @@ export default { }, }; + + diff --git a/src/views/report/Product/monthly.vue b/src/views/report/Product/monthly.vue index 3dbefdd3..eaf0a5b3 100644 --- a/src/views/report/Product/monthly.vue +++ b/src/views/report/Product/monthly.vue @@ -1,7 +1,7 @@ @@ -12,11 +12,11 @@ :model="listQuery" class="blueTip"> @@ -94,8 +94,8 @@ export default { now.setHours(0, 0, 0, 0) now.setDate(1) let startOfMonth = now.getTime() - let firstDayOfMonth = new Date(startOfMonth) - this.listQuery.time = parseTime(firstDayOfMonth) + // let firstDayOfMonth = new Date(startOfMonth) + this.listQuery.time = startOfMonth }, mounted() { this.getList(); diff --git a/src/views/report/Product/weekly.vue b/src/views/report/Product/weekly.vue index 378aa55a..3b5d97b3 100644 --- a/src/views/report/Product/weekly.vue +++ b/src/views/report/Product/weekly.vue @@ -1,14 +1,14 @@