diff --git a/src/api/order/poOrder.js b/src/api/order/poOrder.js index a7e27c6..171420c 100644 --- a/src/api/order/poOrder.js +++ b/src/api/order/poOrder.js @@ -8,4 +8,7 @@ export const updatePoDetail = (data) => createAPI(`/pODetail/save`, 'post', data export const deletePoDetail = (data) => createAPI(`/pODetail/delete`, 'post', data) //批量更新 -export const batchUpdatePoDetail = (data) => createAPI(`/pODetail/batchUpdatePoDetail`, 'post', data) \ No newline at end of file +export const batchUpdatePoDetail = (data) => createAPI(`/pODetail/batchUpdatePoDetail`, 'post', data) + +// 根据PO订单查询验货申请明细 +export const getInspectionByPODetail = (data) => createAPI(`/pODetail/getInspectionByPODetail`, 'post', data) diff --git a/src/views/modules/inspection/inspectionPendingList.vue b/src/views/modules/inspection/inspectionPendingList.vue index d91e4bb..24d0abe 100644 --- a/src/views/modules/inspection/inspectionPendingList.vue +++ b/src/views/modules/inspection/inspectionPendingList.vue @@ -18,7 +18,8 @@ - + + @@ -156,7 +157,7 @@ export default { requestNo: '', supplierNo: '', supplierName: '', - status: 'Scheduled', // 固定状态为已排程 + status: 'Scheduled', // 默认状态为已排程 qcOperator: '', // QC人员不设置默认值 createBy: '', requestDateStart: '', @@ -425,8 +426,10 @@ export default { }, mounted () { this.$nextTick(() => { - this.height = (window.innerHeight - 220) / 2 - this.detailHeight = (window.innerHeight - 220) / 2 + // 统一计算主表格和详情页签的高度,确保一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight + this.detailHeight = calculatedHeight // 从路由参数获取筛选条件 const query = this.$route.query @@ -491,13 +494,15 @@ export default { } }, - // 查询数据 - 🔑 核心方法:固定状态和QC人员 + // 查询数据 - 🔑 核心方法:默认状态为已排程,但允许用户选择全部 getMainData () { this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex - // 🔑 固定状态为"已排程" - this.searchData.status = 'Scheduled' + // 🔑 如果状态为 undefined 或 null(未初始化),则默认使用已排程;如果用户主动选择"全部"(空字符串),则保持为空 + if (this.searchData.status === undefined || this.searchData.status === null) { + this.searchData.status = 'Scheduled' + } // QC人员由用户手动输入,不自动设置默认值 diff --git a/src/views/modules/inspection/inspectionRequestAudit.vue b/src/views/modules/inspection/inspectionRequestAudit.vue index 293f41b..18bba7c 100644 --- a/src/views/modules/inspection/inspectionRequestAudit.vue +++ b/src/views/modules/inspection/inspectionRequestAudit.vue @@ -381,8 +381,10 @@ export default { }, mounted () { this.$nextTick(() => { - this.height = (window.innerHeight - 220) / 2 - this.detailHeight = (window.innerHeight - 220) / 2 + // 统一计算主表格和详情页签的高度,确保一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight + this.detailHeight = calculatedHeight this.getMainData() }) }, diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue index 9167c8c..c1072a4 100644 --- a/src/views/modules/inspection/inspectionRequestList.vue +++ b/src/views/modules/inspection/inspectionRequestList.vue @@ -649,8 +649,10 @@ export default { }, mounted () { this.$nextTick(() => { - this.height = (window.innerHeight - 220) / 2 - this.detailHeight = (window.innerHeight - 220) / 2 + // 统一计算主表格和详情页签的高度,确保一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight + this.detailHeight = calculatedHeight this.getMainData() }) }, diff --git a/src/views/modules/inspection/myInspectionList.vue b/src/views/modules/inspection/myInspectionList.vue index 002aa93..cf94d5b 100644 --- a/src/views/modules/inspection/myInspectionList.vue +++ b/src/views/modules/inspection/myInspectionList.vue @@ -28,7 +28,8 @@ @@ -65,7 +66,8 @@ export default { totalPage: 0, searchData: { page: 1, - limit: 50 + limit: 50, + statusDb: 'Scheduled,Inspecting' } } }, @@ -126,6 +128,7 @@ export default { 'Confirmed': '已确认', 'Scheduled': '已排程', 'Audited': '已审核', + 'Inspecting': '验货中', 'Inspected': '已验货', 'Completed': '已完成', 'Cancelled': '已取消' @@ -133,6 +136,22 @@ export default { return statusMap[statusDb] || statusDb || '-' }, + // 跳转到 IQCResultEntry 页面 + goToIQCResult (row) { + // 使用检验单号进行跳转,字段可能是 inspectNo 或 inspectionNo + const inspectionNo = row.inspectNo || row.inspectionNo || '' + if (!inspectionNo) { + this.$message.warning('未找到检验单号') + return + } + this.$router.push({ + name: 'qc-IQCResultEntry', + query: { + inspectionNo: inspectionNo + } + }) + }, + // 开始验货 startInspection (row) { this.$confirm(`确认开始验货?\n申请单号:${row.requestNo}\n供应商:${row.supplierName}`, '提示', { @@ -163,6 +182,14 @@ export default { this.$message.success('开始验货成功') // 刷新列表 this.getList() + + // 跳转到 IQCResultEntry 页面,并传入检验单号作为查询条件 + this.$router.push({ + name: 'qc-IQCResultEntry', + query: { + inspectionNo: inspectionNo + } + }) } else { this.$message.error((data && data.msg) || '开始验货失败') } diff --git a/src/views/modules/inspection/srmFeeList.vue b/src/views/modules/inspection/srmFeeList.vue index 0ea46fc..d3c7985 100644 --- a/src/views/modules/inspection/srmFeeList.vue +++ b/src/views/modules/inspection/srmFeeList.vue @@ -313,8 +313,10 @@ export default { }, mounted() { this.$nextTick(() => { - this.height = (window.innerHeight - 220) / 2 - this.detailHeight = (window.innerHeight - 220) / 2 + // 统一计算主表格和详情页签的高度,确保一致 + const calculatedHeight = (window.innerHeight - 220) / 2 + this.height = calculatedHeight + this.detailHeight = calculatedHeight this.getMainData() }) }, diff --git a/src/views/modules/order/com_inspectionDetailList.vue b/src/views/modules/order/com_inspectionDetailList.vue index b961317..3daa902 100644 --- a/src/views/modules/order/com_inspectionDetailList.vue +++ b/src/views/modules/order/com_inspectionDetailList.vue @@ -38,7 +38,7 @@