diff --git a/src/api/yieldReport/com_finish_roll.js b/src/api/yieldReport/com_finish_roll.js index a65891e..3a0968e 100644 --- a/src/api/yieldReport/com_finish_roll.js +++ b/src/api/yieldReport/com_finish_roll.js @@ -42,6 +42,9 @@ export const finishRollWithNoFqc = data => createAPI('schedule/finishRollWithNoF // 校验是否可以修改总良品数 export const getSORoutingPreviousOperationItemNo = data => createAPI('schedule/getSORoutingPreviousOperationItemNo', 'POST', data) +// 校验是否可以修改实际耗用数量 +export const checkModifyActualUsage = data => createAPI('schedule/checkModifyActualUsage', 'POST', data) + // 换包装结束卷校验 export const checkRepackFinishRollWithNoFqc = data => createAPI(`schedule/checkRepackFinishRollWithNoFqc`,'POST',data) diff --git a/src/views/modules/yieldReport/com_finish_roll.vue b/src/views/modules/yieldReport/com_finish_roll.vue index b8caebe..4e2d628 100644 --- a/src/views/modules/yieldReport/com_finish_roll.vue +++ b/src/views/modules/yieldReport/com_finish_roll.vue @@ -182,7 +182,7 @@ - + {{labels.primaryMaterial}} @@ -209,6 +209,16 @@ style="width: 100px; height: 80px"/> + + + 编辑 + + @@ -217,6 +227,78 @@ + + + + + + + + + 材料信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 耗用信息 + + + + + + + + + + + + + + + + 确定 + + + 取消 + + + + { + if (data && data.resultMap && data.resultMap.resultCode == '400') { + this.$message.error(data.resultMap.resultMsg || '非标订单不允许修改实际耗用数量!'); + } else { + this.currentEditMaterialRow = row; + this.editMaterialForm = Object.assign({}, row); + this.editMaterialDialogVisible = true; + } + }).catch(() => { + this.$message.error('校验权限失败'); + }); + }, + + /* 保存材料修改 */ + saveMaterialEdit() { + if (this.editMaterialForm.netIssueQty === '' || this.editMaterialForm.netIssueQty === null) { + this.$message.error('本卷耗用数量不能为空'); + return; + } + if (this.editMaterialForm.netIssueQty < 0) { + this.$message.error('本卷耗用数量不能小于0'); + return; + } + if (parseFloat(this.editMaterialForm.netIssueQty) > parseFloat(this.editMaterialForm.transQty)) { + this.$message.error('材料耗用数量不能大于发料数量!'); + return; + } + // 更新当前行数据 + this.currentEditMaterialRow.netIssueQty = this.editMaterialForm.netIssueQty; + this.editMaterialDialogVisible = false; + }, + /// 保存 默认配置 列 async saveMultiLanguage() { // 保存页面 button label title 属性 @@ -1442,4 +1569,179 @@ div.table-input /deep/ input.el-input__inner{ color: red; } +/* 编辑材料对话框样式 - 参考合并卷 */ +.merge-roll-dialog { + ::v-deep .el-dialog { + border-radius: 12px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); + overflow: hidden; + + .el-dialog__header { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + padding: 15px 20px; + + .el-dialog__title { + color: white; + font-weight: 600; + font-size: 16px; + letter-spacing: 1px; + } + + .el-dialog__headerbtn { + top: 15px; + .el-dialog__close { + color: rgba(255, 255, 255, 0.8); + transition: all 0.3s; + &:hover { + color: white; + transform: rotate(90deg); + } + } + } + } + + .el-dialog__body { + padding: 25px; + background-color: #f8f9fa; + } + + .el-dialog__footer { + padding: 15px 20px; + background-color: #fff; + border-top: 1px solid #e9ecef; + } + } +} + +.merge-content { + .form-item-enhanced { + margin-bottom: 15px; + + ::v-deep .el-form-item__label { + color: #495057; + font-weight: 500; + font-size: 14px; + margin-bottom: 8px; + } + + ::v-deep .el-input__inner { + border-radius: 6px; + border: 1px solid #dee2e6; + transition: all 0.3s; + height: 42px; + line-height: 42px; + font-size: 15px; + + &:focus { + border-color: #667eea; + box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + } + } + } + + // 数量输入框样式 + .qty-input { + ::v-deep .el-input__inner { + text-align: right; + padding-right: 15px; + } + } +} + +// 卷信息卡片样式 +.roll-info-card { + background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%); + border-radius: 8px; + padding: 16px; + margin-bottom: 15px; + border: 1px solid #e3e8f0; + box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08); + + .info-header { + display: flex; + align-items: center; + margin-bottom: 12px; + padding-bottom: 10px; + border-bottom: 1px solid #dee2e6; + + i { + font-size: 18px; + color: #667eea; + margin-right: 8px; + } + + span { + font-size: 14px; + font-weight: 600; + color: #495057; + } + } + + .info-content { + padding-top: 5px; + } +} + +// 底部按钮样式 +.dialog-footer { + display: flex; + justify-content: center; + gap: 12px; + padding: 0; + + .action-btn { + min-width: 80px; + padding: 6px 16px; + border-radius: 16px; + font-size: 13px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 4px; + + i { + font-size: 13px; + } + + &:disabled { + opacity: 0.6; + cursor: not-allowed; + } + + &.primary { + background: #17B3A3; + border: none; + color: white; + + &:hover:not(:disabled) { + background: #13998b; + box-shadow: 0 4px 12px rgba(23, 179, 163, 0.4); + transform: translateY(-1px); + } + + &:active:not(:disabled) { + transform: translateY(0); + } + } + + &.secondary { + background: white; + border: 1px solid #17B3A3; + color: #17B3A3; + + &:hover:not(:disabled) { + background: #17B3A3; + color: white; + } + + &:active:not(:disabled) { + transform: scale(0.98); + } + } + } +} +