|
|
|
@ -182,7 +182,7 @@ |
|
|
|
</el-form> |
|
|
|
<!-- 主材料 --> |
|
|
|
<el-form> |
|
|
|
<fieldset class="customer-fieldset" style="width: 830px;"> |
|
|
|
<fieldset class="customer-fieldset" style="width: 898px; min-width: 0;"> |
|
|
|
<legend>{{labels.primaryMaterial}}</legend> |
|
|
|
<el-table |
|
|
|
height="180" |
|
|
|
@ -198,7 +198,7 @@ |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!--<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"--> |
|
|
|
@ -209,6 +209,16 @@ |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer" @click="editMaterialRow(scope.row)">编辑</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</fieldset> |
|
|
|
</el-form> |
|
|
|
@ -217,6 +227,78 @@ |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 编辑材料行对话框 --> |
|
|
|
<el-dialog |
|
|
|
title="编辑材料信息" |
|
|
|
:visible.sync="editMaterialDialogVisible" |
|
|
|
width="520px" |
|
|
|
class="merge-roll-dialog" |
|
|
|
append-to-body |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<div class="merge-content"> |
|
|
|
<el-form :model="editMaterialForm" label-position="top"> |
|
|
|
<!-- 材料信息 --> |
|
|
|
<div class="roll-info-card"> |
|
|
|
<div class="info-header"> |
|
|
|
<i class="el-icon-tickets"></i> |
|
|
|
<span>材料信息</span> |
|
|
|
</div> |
|
|
|
<div class="info-content"> |
|
|
|
<el-row :gutter="15"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="报告时间" class="form-item-enhanced"> |
|
|
|
<el-input v-model="editMaterialForm.reportDate" disabled style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="材料卷号" class="form-item-enhanced"> |
|
|
|
<el-input v-model="editMaterialForm.rmRollNo" disabled style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="15"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="零部件编码" class="form-item-enhanced"> |
|
|
|
<el-input v-model="editMaterialForm.partNo" disabled style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="数量" class="form-item-enhanced"> |
|
|
|
<el-input v-model="editMaterialForm.transQty" disabled style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 耗用信息 --> |
|
|
|
<div class="roll-info-card" style="background: linear-gradient(135deg, #17B3A315 0%, #13998b15 100%);"> |
|
|
|
<div class="info-header"> |
|
|
|
<i class="el-icon-edit-outline" style="color: #17B3A3;"></i> |
|
|
|
<span>耗用信息</span> |
|
|
|
</div> |
|
|
|
<div class="info-content"> |
|
|
|
<el-row :gutter="15"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="本卷耗用数量" class="form-item-enhanced"> |
|
|
|
<el-input v-model="editMaterialForm.netIssueQty" type="number" class="qty-input" style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<button class="action-btn primary" @click="saveMaterialEdit"> |
|
|
|
确定 |
|
|
|
</button> |
|
|
|
<button class="action-btn secondary" @click="editMaterialDialogVisible = false"> |
|
|
|
取消 |
|
|
|
</button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 异常原因录入的组件 --> |
|
|
|
<comExceptionReason ref="comExceptionReason" :close-on-click-modal="false" |
|
|
|
:visible.sync="showExceptionFlag" |
|
|
|
@ -259,6 +341,7 @@ import { |
|
|
|
finishRollWithNoFqc, |
|
|
|
getSORoutingPreviousOperationItemNo, |
|
|
|
getSfdcFlowLabelData,/*执行打印的请求*/ |
|
|
|
checkModifyActualUsage, |
|
|
|
} from '@/api/yieldReport/com_finish_roll.js'; |
|
|
|
|
|
|
|
/*打印标签专用的js*/ |
|
|
|
@ -908,6 +991,9 @@ export default { |
|
|
|
objectType: 'label' |
|
|
|
}, |
|
|
|
isFqc:false, |
|
|
|
editMaterialDialogVisible: false, |
|
|
|
editMaterialForm: {}, |
|
|
|
currentEditMaterialRow: null, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -1354,6 +1440,47 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/* 编辑材料行 */ |
|
|
|
editMaterialRow(row) { |
|
|
|
// 校验是否有权限修改 |
|
|
|
let postData = { |
|
|
|
site: this.pageData.site, |
|
|
|
orderNo: this.pageData.orderNo, |
|
|
|
seqNo: this.pageData.seqNo, |
|
|
|
username: this.pageData.username |
|
|
|
}; |
|
|
|
checkModifyActualUsage(postData).then(({data}) => { |
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |