From 9225ceba38668a5de1f158e210bffa297f23ade8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Mon, 11 May 2026 18:16:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor(wms/coil):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=97=A7=E7=89=88=E9=92=A2=E5=8D=B7=E5=8D=A1=E7=89=87=E5=B8=83?= =?UTF-8?q?=E5=B1=80=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 为钢卷暂存单据管理卡片添加v-if="moreColumn"控制显示 2. 移除correct.vue和correntAll.vue中冗余的coil-card组件代码 3. 统一添加标签打印功能,重构打印标签逻辑 4. 调整按钮加载状态和文案样式,优化交互体验 --- klp-ui/src/views/wms/coil/do/correct.vue | 61 +++------------ klp-ui/src/views/wms/coil/do/correntAll.vue | 83 ++++++--------------- klp-ui/src/views/wms/coil/panels/base.vue | 2 +- 3 files changed, 37 insertions(+), 109 deletions(-) diff --git a/klp-ui/src/views/wms/coil/do/correct.vue b/klp-ui/src/views/wms/coil/do/correct.vue index 7810a7fb..9e58a044 100644 --- a/klp-ui/src/views/wms/coil/do/correct.vue +++ b/klp-ui/src/views/wms/coil/do/correct.vue @@ -94,55 +94,6 @@ - @@ -315,6 +266,8 @@ + + @@ -612,6 +565,16 @@ export default { path: '/wms/coil/' + row.coilId, }); }, + // 打印标签 + handlePrintLabel(row) { + this.labelRender.data = { + ...row, + updateTime: row.updateTime?.split(' ')[0] || '', + }; + this.$nextTick(() => { + this.$refs.labelRender.printLabel(); + }) + }, /** 新增按钮操作 */ handleAdd() { this.reset(); diff --git a/klp-ui/src/views/wms/coil/do/correntAll.vue b/klp-ui/src/views/wms/coil/do/correntAll.vue index 6027e9e3..fbcb386e 100644 --- a/klp-ui/src/views/wms/coil/do/correntAll.vue +++ b/klp-ui/src/views/wms/coil/do/correntAll.vue @@ -61,9 +61,8 @@ size="mini" icon="el-icon-view" @click="handlePreviewLabel(scope.row)" title="预览标签">预览 打印 - - 数字钢卷 - + 数字钢卷 追溯 @@ -80,57 +79,7 @@ :loading="scope.row.cancelling" class="action-btn">强制入库 - - @@ -275,6 +224,8 @@ + + @@ -603,12 +554,6 @@ export default { } return '物品类型'; }, - // 进入数字钢卷页面 - handleNumberCoilClick(row) { - this.$router.push({ - path: '/wms/coil/' + row.coilId, - }); - }, // 分条操作列表(100-199) splitTypes() { if (!this.dict.type.action_type) return []; @@ -648,6 +593,25 @@ export default { }) }, + // 打印标签 + handlePrintLabel(row) { + this.labelRender.data = { + ...row, + updateTime: row.updateTime?.split(' ')[0] || '', + }; + this.$nextTick(() => { + this.$refs.labelRender.printLabel(); + }) + }, + + // 进入数字钢卷页面 + handleNumberCoilClick(row) { + console.log(row) + this.$router.push({ + path: '/wms/coil/' + row.coilId, + }); + }, + // 处理材料类型变化 handleMaterialTypeChange(value) { // 清空物品选择 @@ -663,6 +627,7 @@ export default { /** 预览标签 */ handlePreviewLabel(row) { + console.log(row) this.labelRender.visible = true; const type = getCoilTagPrintType(row); this.labelRender.type = type; diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index 086c9be2..7bbd1e3b 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -609,7 +609,7 @@ - +
钢卷暂存单据管理 创建暂存单据 From a36d87465276703d769185eb6ad20b8f771a8bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Tue, 12 May 2026 09:08:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(wms/processSpec):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E5=92=8C=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增规程类型和产线的单选筛选框,支持按条件查询规程列表 2. 为规程列表添加分页组件,支持分页查询 3. 重构页面元素布局,压缩冗余的标签换行和空格 4. 优化版本列表的加载状态提示,完善空数据处理逻辑 5. 统一调整按钮样式的代码格式,修复部分代码格式问题 --- klp-ui/src/views/wms/processSpec/index.vue | 143 ++++++++++++--------- 1 file changed, 85 insertions(+), 58 deletions(-) diff --git a/klp-ui/src/views/wms/processSpec/index.vue b/klp-ui/src/views/wms/processSpec/index.vue index e284d4b0..b01c0a9c 100644 --- a/klp-ui/src/views/wms/processSpec/index.vue +++ b/klp-ui/src/views/wms/processSpec/index.vue @@ -3,25 +3,29 @@ + +
+ + + + + + + +
规程列表
- + + @@ -32,36 +36,25 @@ + +
-
+
版本列表 - {{ currentSpec.specName }} - 新建版本 + 新建版本
- + @@ -141,7 +134,16 @@ export default { versionList: [], versionLoading: false, statusOptions: ['DRAFT', 'PUBLISHED', 'OBSOLETE'], - + + // 分页相关 + total: 0, + queryParams: { + pageNum: 1, + pageSize: 10, + specType: '', + lineId: '' + }, + // 规程相关 specOpen: false, specTitle: '', @@ -151,7 +153,7 @@ export default { specCode: [{ required: true, message: '规程编码不能为空', trigger: 'blur' }], specName: [{ required: true, message: '规程名称不能为空', trigger: 'blur' }] }, - + // 版本相关 versionOpen: false, versionTitle: '', @@ -171,30 +173,35 @@ export default { tableRowClassName({ row }) { return row.specId === this.currentSpecId ? 'current-row' : '' }, - + // 加载规程列表 loadSpecs() { this.pageLoading = true - listProcessSpec({ pageNum: 1, pageSize: 500 }).then(res => { + listProcessSpec(this.queryParams).then(res => { + this.total = res.total || 0 this.specList = res.rows || [] if (this.specList.length > 0 && !this.currentSpec) { this.selectSpec(this.specList[0]) + } else { + this.currentSpec = null + this.currentSpecId = null + this.versionList = [] } }).catch(e => console.error(e)).finally(() => { this.pageLoading = false }) }, - + // 选择规程 selectSpec(spec) { this.currentSpec = spec this.currentSpecId = spec.specId this.loadVersions() }, - + // 点击规程行 onSpecRowClick(row) { this.selectSpec(row) }, - + // 加载版本列表 loadVersions() { if (!this.currentSpecId) return @@ -203,12 +210,12 @@ export default { this.versionList = res.rows || [] }).catch(e => console.error(e)).finally(() => { this.versionLoading = false }) }, - + // 点击版本行 onVersionRowClick(row) { this.goPlanSpec(row) }, - + // 跳转到方案详情 goPlanSpec(row) { const basePath = this.$route.path.replace(/\/[^/]*$/, '') @@ -218,7 +225,7 @@ export default { query: { specId: this.currentSpecId, versionId: String(row.versionId), versionCode: row.versionCode } }) }, - + // 生效切换 handleActiveChange(row, val) { if (!val) { @@ -230,9 +237,9 @@ export default { }).then(() => { this.$modal.msgSuccess('已生效') this.loadVersions() - }).catch(() => {}) + }).catch(() => { }) }, - + // 规程对话框 openSpecDialog(row) { this.specForm = row @@ -242,7 +249,7 @@ export default { this.specOpen = true this.$nextTick(() => this.$refs.specFormRef && this.$refs.specFormRef.clearValidate()) }, - + // 提交规程 submitSpec() { this.$refs.specFormRef.validate(ok => { @@ -256,7 +263,7 @@ export default { }).catch(e => console.error(e)).finally(() => { this.specSubmitLoading = false }) }) }, - + // 删除规程 removeSpec(row) { this.$modal.confirm('确认删除规程"' + row.specName + '"?').then(() => { @@ -269,9 +276,9 @@ export default { this.versionList = [] } this.loadSpecs() - }).catch(() => {}) + }).catch(() => { }) }, - + // 版本对话框 openVersionDialog(row) { this.versionForm = row @@ -281,7 +288,7 @@ export default { this.versionOpen = true this.$nextTick(() => this.$refs.versionFormRef && this.$refs.versionFormRef.clearValidate()) }, - + // 提交版本 submitVersion() { this.$refs.versionFormRef.validate(ok => { @@ -297,7 +304,7 @@ export default { }).catch(e => console.error(e)).finally(() => { this.versionSubmitLoading = false }) }) }, - + // 删除版本 removeVersion(row) { this.$modal.confirm('确认删除版本"' + row.versionCode + '"?').then(() => { @@ -305,7 +312,7 @@ export default { }).then(() => { this.$modal.msgSuccess('删除成功') this.loadVersions() - }).catch(() => {}) + }).catch(() => { }) } } } @@ -370,23 +377,43 @@ export default { background: #5F7BA0 !important; border-color: #5F7BA0 !important; } + ::v-deep .el-button--primary:hover, -::v-deep .el-button--primary:focus { background: #4d6a8e !important; border-color: #4d6a8e !important; } -::v-deep .el-button--primary:active { background: #4a6585 !important; border-color: #4a6585 !important; } -::v-deep .el-button--primary.is-disabled { opacity: .5; } +::v-deep .el-button--primary:focus { + background: #4d6a8e !important; + border-color: #4d6a8e !important; +} + +::v-deep .el-button--primary:active { + background: #4a6585 !important; + border-color: #4a6585 !important; +} + +::v-deep .el-button--primary.is-disabled { + opacity: .5; +} ::v-deep .el-button:not(.el-button--primary):not(.el-button--text):not(.el-button--danger) { color: #606266 !important; background: #fff !important; border-color: #dcdfe6 !important; } + ::v-deep .el-button:not(.el-button--primary):not(.el-button--text):not(.el-button--danger):hover { color: #5F7BA0 !important; border-color: #5F7BA0 !important; } -::v-deep .el-button--text { background: transparent !important; border-color: transparent !important; } -::v-deep .el-button--text.btn-danger { color: #f56c6c !important; } +::v-deep .el-button--text { + background: transparent !important; + border-color: transparent !important; +} -.btn-danger { color: #f56c6c; } +::v-deep .el-button--text.btn-danger { + color: #f56c6c !important; +} + +.btn-danger { + color: #f56c6c; +}