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 {