From a99126a9a36f54d96852e687732ba92ee7f04f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Tue, 14 Apr 2026 16:08:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(CoilSelector):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=89=A9=E6=96=99=E7=B1=BB=E5=9E=8B=E9=80=89=E6=8B=A9=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加物料类型选择下拉框,并根据选择的类型动态显示相关字段 将selectType默认值改为通过props传入的defaultType 优化查询逻辑,确保itemType与selectType保持一致 --- klp-ui/src/components/CoilSelector/index.vue | 29 ++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/klp-ui/src/components/CoilSelector/index.vue b/klp-ui/src/components/CoilSelector/index.vue index ffd38724..65e765ae 100644 --- a/klp-ui/src/components/CoilSelector/index.vue +++ b/klp-ui/src/components/CoilSelector/index.vue @@ -35,23 +35,29 @@ - - + + + + + + + - + - + - + - + @@ -266,6 +272,10 @@ export default { orderId: { type: String, default: null + }, + defaultType: { + type: String, + default: 'product' } }, data() { @@ -287,7 +297,8 @@ export default { itemMaterial: null, itemManufacturer: null, actualWarehouseId: null, - selectType: 'product', + itemType: this.defaultType, + selectType: this.defaultType, status: 0, // 不包含已发货的钢卷 dataType: 1 // 只查询当前数据,不查询历史数据 }, @@ -485,6 +496,7 @@ export default { ...this.queryParams, ...this.filters, }; + queryPayload.selectType = queryPayload.itemType; // 处于销售视角,且my视图时,只查询当前用户的钢卷 console.log('this.salesRestricted', this.salesRestricted, this.currentTab, this.currentUserId); if (this.salesRestricted && this.currentTab === 'my') { @@ -536,7 +548,8 @@ export default { currentCoilNo: null, grade: null, dataType: 1, - selectType: 'raw_material', + itemType: this.defaultType, + selectType: this.defaultType, }; this.getList(); },