From c07305b14130d8def2ce5b05092d5b7d5b5a5003 Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Tue, 1 Sep 2026 17:37:25 +0800 Subject: [PATCH] =?UTF-8?q?style(inspection):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=A8=A1=E5=9D=97=E8=A1=A8=E6=A0=BC=E5=92=8C?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉检验待办列表页面的操作列 - 在采购商搜索表单中添加顶部标签位置 - 移除多余的空行以改善代码格式 - 优化删除确认逻辑中的变量赋值格式 - 统一API调用前后的空行格式以提高可读性 --- .../inspection/inspectionPendingList.vue | 4 ++-- .../inspection/inspectionRequestList.vue | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/modules/inspection/inspectionPendingList.vue b/src/views/modules/inspection/inspectionPendingList.vue index a0d7ee5..d850dac 100644 --- a/src/views/modules/inspection/inspectionPendingList.vue +++ b/src/views/modules/inspection/inspectionPendingList.vue @@ -92,9 +92,9 @@ style="width: 100px; height: 100px"/> - + - + diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue index 2bf7670..991cee2 100644 --- a/src/views/modules/inspection/inspectionRequestList.vue +++ b/src/views/modules/inspection/inspectionRequestList.vue @@ -511,7 +511,7 @@ width="760px" append-to-body :close-on-click-modal="false"> - + - + { const itemRequestNo = item.requestNo || item.request_no || '' return !itemRequestNo || String(itemRequestNo) === String(requestNo) @@ -2247,7 +2247,7 @@ export default { crd: this.formatToDateOnly(item.crd), qty: item.qty || 0 // 确保 qty 字段存在且为数字类型 })) - + // 保存原始PO列表的副本,用于区分新增和修改 this.originalEditPoDetailList = this.editPoDetailList.map(item => ({...item})) } else { @@ -2278,23 +2278,23 @@ export default { type: 'warning' }).then(() => { const deletedRow = this.editPoDetailList[index] - + // 记录被删除的PO的key和itemNo,用于保存时判断 const key = `${deletedRow.orderRef1 || ''}_${deletedRow.orderRef2 || ''}` // 使用 poItemNo 或 itemNo 作为删除标识(对应后端 item_no) const itemNo = deletedRow.poItemNo || deletedRow.po_item_no || deletedRow.itemNo || deletedRow.item_no || deletedRow.orderRef2 || '' - + // 如果删除的是原有PO(在originalEditPoDetailList中存在),则记录到deletedPoKeys const isOriginalPo = this.originalEditPoDetailList.some(item => { const originalKey = `${item.orderRef1 || ''}_${item.orderRef2 || ''}` return originalKey === key }) - + if (isOriginalPo && itemNo) { // 存储对象而非字符串,保留完整的itemNo信息 this.deletedPoKeys.add(JSON.stringify({ key, itemNo })) } - + // 从列表中移除该行(仅前端移除,不立即调用后端接口) this.editPoDetailList.splice(index, 1) this.$message.success('已标记删除,点击保存后生效') @@ -2346,10 +2346,10 @@ export default { } this.addPoSelectLoading = true - + // 根据是否有排除列表选择不同的API const apiCall = params.excludePoItems ? queryPoPageExclude(params) : queryPoPage(params) - + apiCall.then(({ data }) => { if (data && data.code === 0) { const pageData = data.page || {}