From 81821f332e53cb993d8b3a47d879bcc3bdc33f04 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 11 Mar 2026 14:11:09 +0800 Subject: [PATCH] =?UTF-8?q?2026-03-10=20=E5=B1=9E=E6=80=A7=E5=8F=98?= =?UTF-8?q?=E5=8A=A8=E5=A2=9E=E5=8A=A0=E3=80=90=E7=BD=AE=E7=A9=BA=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchSfdcRollsReport.vue | 123 ++++++++++++++++-- 1 file changed, 113 insertions(+), 10 deletions(-) diff --git a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue index 9e68af2..fe7014f 100644 --- a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue +++ b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue @@ -207,27 +207,71 @@ - + - +
+ + + + {{ attributeClearFlags.parentRollNo ? '取消置空' : '置空' }} + +
- +
+ + + + {{ attributeClearFlags.batchNo ? '取消置空' : '置空' }} + +
- +
+ + + + {{ attributeClearFlags.remark ? '取消置空' : '置空' }} + +
- + 保存 关闭 @@ -518,6 +562,11 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; batchNo: '', remark: '' }, + attributeClearFlags: { + parentRollNo: false, + batchNo: false, + remark: false + }, searchExpanded: true, searchData: { site:'', @@ -1348,24 +1397,38 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; this.$message.warning(`标签号 ${rollNos} 状态为"已入库"或"已消耗",不允许属性变动!`); return false; } - // 重置表单 + // 重置表单及置空标志 this.attributeChangeForm = { parentRollNo: '', batchNo: '', remark: '' }; + this.attributeClearFlags = { + parentRollNo: false, + batchNo: false, + remark: false + }; this.attributeChangeDialogVisible = true; }, + toggleClear(field) { + this.attributeClearFlags[field] = !this.attributeClearFlags[field]; + if (this.attributeClearFlags[field]) { + this.attributeChangeForm[field] = ''; + } + }, saveAttributeChange(){ - // 构建更新数据列表 + // 构建更新数据列表,置空标志为 true 时对应字段传 null const updateList = this.selectionDataList.map(item => { return { site: item.site, rollNo: item.rollNo, orderNo: item.orderNo, - parentRollNo: this.attributeChangeForm.parentRollNo, - batchNo: this.attributeChangeForm.batchNo, - remark: this.attributeChangeForm.remark + parentRollNo: this.attributeClearFlags.parentRollNo ? null : this.attributeChangeForm.parentRollNo, + batchNo: this.attributeClearFlags.batchNo ? null : this.attributeChangeForm.batchNo, + remark: this.attributeClearFlags.remark ? null : this.attributeChangeForm.remark, + parentRollNoClear: this.attributeClearFlags.parentRollNo, + batchNoClear: this.attributeClearFlags.batchNo, + remarkClear: this.attributeClearFlags.remark } }) updateSfdcRollsAttribute(updateList).then(({data}) => { @@ -1752,6 +1815,46 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; padding-top: 0; } +/* 属性变动 - 输入框+置空按钮行 */ +.attr-input-row { + display: flex; + align-items: center; + gap: 8px; +} + +.attr-input-row--textarea { + align-items: flex-start; +} + +.attr-input-row .el-input { + flex: 1; +} + +.attr-input-row .el-textarea { + flex: 1; +} + +.clear-btn { + flex-shrink: 0; + min-width: 72px; +} + +/* 置空状态输入框样式 */ +.attr-input-row .is-cleared /deep/ .el-input__inner, +.attr-input-row .is-cleared /deep/ .el-textarea__inner { + background-color: #fef6ec; + border-color: #f5a623; + color: #999; + text-decoration: line-through; +} + +.clear-tip { + margin-top: 4px; + font-size: 12px; + color: #e6a23c; + line-height: 1.5; +} + /* 标签打印对话框样式 */ .print-dialog { /deep/ .el-dialog__header {