From 2bc869cc52f1e5d0c3cb17fa865d5544a49c332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Thu, 18 Dec 2025 15:06:13 +0800 Subject: [PATCH] =?UTF-8?q?refactor(wms):=20=E4=BC=98=E5=8C=96=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E8=AE=B0=E5=BD=95=E5=92=8C=E9=92=A2=E5=8D=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除发货记录页面的planId校验,增加默认分页大小 简化钢卷列表页面的查询逻辑和样式类名 --- .../src/views/wms/delivery/mycoil/index.vue | 47 ++----------------- .../src/views/wms/delivery/record/index.vue | 8 ++-- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/klp-ui/src/views/wms/delivery/mycoil/index.vue b/klp-ui/src/views/wms/delivery/mycoil/index.vue index 93b4c8af..9f44190b 100644 --- a/klp-ui/src/views/wms/delivery/mycoil/index.vue +++ b/klp-ui/src/views/wms/delivery/mycoil/index.vue @@ -1,5 +1,5 @@ @@ -134,32 +132,12 @@ export default { }; }, computed: { - // 根据模式决定对话框显隐逻辑 - dialogVisible: { - get() { - // 触发器模式:使用内部变量 - if (this.useTrigger) { - return this.innerVisible; - } - // 非触发器模式:使用外部传入的visible属性 - return this.visible; - }, - set(val) { - if (this.useTrigger) { - // 触发器模式:更新内部变量 - this.innerVisible = val; - } else { - // 非触发器模式:通知父组件更新 - this.$emit('update:visible', val); - } - } - }, currentUserId() { return this.$store.getters.id; }, renderColumns() { // 如果有自定义列配置,使用它;否则使用默认列 - return this.coilColumn.length; + return this.columns; } }, created() { @@ -168,41 +146,22 @@ export default { methods: { // 表格行类名动态生成 - 核心:区分权限行/禁用行 tableRowClassName({ row }) { - // 销售受限模式下,判断当前行是否有权限 - if (this.salesRestricted && row.saleId !== this.currentUserId) { - return 'disabled-coil-row'; // 禁用行类名 - } + return ''; }, // 获取钢卷列表 async getList() { - // 如果是范围模式,直接使用传入数据 - if (this.rangeMode) { - this.coilList = this.rangeData || []; - this.total = this.coilList.length; - return; - } try { this.loading = true; // 设置筛选条件 const queryPayload = { ...this.queryParams, - ...this.filters, }; - // 处于销售视角,且my视图时,只查询当前用户的钢卷 - console.log('this.salesRestricted', this.salesRestricted, this.currentTab, this.currentUserId); - if (this.salesRestricted && this.currentTab === 'my') { - queryPayload.saleId = this.currentUserId; - } const response = await listMaterialCoil(queryPayload); if (response.code === 200) { this.coilList = response.rows || []; this.total = response.total || 0; - // 如果有初始coilId,尝试匹配数据 - if (this.value && !this.selectedCoil) { - this.matchCoilById(this.value); - } } else { this.$message.warning(`获取钢卷列表失败:${response.msg || '未知错误'}`); } diff --git a/klp-ui/src/views/wms/delivery/record/index.vue b/klp-ui/src/views/wms/delivery/record/index.vue index ebca3cce..192815ed 100644 --- a/klp-ui/src/views/wms/delivery/record/index.vue +++ b/klp-ui/src/views/wms/delivery/record/index.vue @@ -66,7 +66,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 50, planId: undefined, coilId: undefined, operateType: undefined, @@ -81,9 +81,9 @@ export default { methods: { /** 查询发货计划钢卷操作记录列表 */ getList() { - if (!this.planId) { - return - } + // if (!this.planId) { + // return + // } this.loading = true; listDeliveryPlanCoilOperate(this.queryParams).then(response => { this.deliveryPlanCoilOperateList = response.rows;