|
|
|
@ -257,7 +257,7 @@ |
|
|
|
style="width:100%"> |
|
|
|
<el-table-column type="selection" align="center" width="50"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnSubDetailList" :key="index" |
|
|
|
v-for="(item,index) in columnSubDetailList2" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
@ -468,7 +468,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 子明细新增模态框 --> |
|
|
|
<el-dialog title="新增子物料" :close-on-click-modal="false" v-drag :visible.sync="componentSaveModal" width="800px"> |
|
|
|
<el-dialog title="新增子物料" :close-on-click-modal="false" top="25vh" v-drag :visible.sync="componentSaveModal" width="800px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px"> |
|
|
|
<el-form-item :label="'序号'" prop="lineSequence" :rules="componentRules.lineSequence"> |
|
|
|
<el-input class="inlineNumber numInput" v-model="componentData.lineSequence" type="number" style="width: 49px"></el-input> |
|
|
|
@ -476,13 +476,19 @@ |
|
|
|
<el-form-item prop="componentPart" :rules="componentRules.componentPart"> |
|
|
|
<span v-if="!componentDisableFlag" slot="label" @click="queryComponentPartList"><a herf="#">子物料编码</a></span> |
|
|
|
<span v-if="componentDisableFlag" slot="label">子物料编码</span> |
|
|
|
<el-input v-model="componentData.componentPart" :disabled="componentDisableFlag" @blur="componentPartBlur" style="width: 175px"></el-input> |
|
|
|
<el-input v-model="componentData.componentPart" :disabled="componentDisableFlag" @blur="componentPartBlur" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'子物料名称'"> |
|
|
|
<el-input v-model="componentData.componentPartDesc" disabled style="width: 327px"></el-input> |
|
|
|
<el-input v-model="componentData.componentPartDesc" disabled style="width: 249px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'单位'"> |
|
|
|
<el-input v-model="componentData.printUnitName" disabled style="width: 165px"></el-input> |
|
|
|
<el-input v-model="componentData.printUnitName" disabled style="width: 110px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-show="componentData.productFlag === 'component'" :label="'消耗项目'" prop="consumptionItem" :rules="componentRules.consumptionItem"> |
|
|
|
<el-select v-model="componentData.consumptionItem" style="width: 165px"> |
|
|
|
<el-option label="Consumed" value="Consumed"></el-option> |
|
|
|
<el-option label="Not Consumed" value="Not Consumed"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px"> |
|
|
|
@ -951,6 +957,7 @@ export default { |
|
|
|
updateDate: '', |
|
|
|
updateBy: '', |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: '', |
|
|
|
productFlag: '' |
|
|
|
}, |
|
|
|
partData: { |
|
|
|
@ -1479,6 +1486,24 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table2ConsumptionItem', |
|
|
|
tableId: '104002Table2', |
|
|
|
tableName: 'BOM子物料表', |
|
|
|
columnProp: 'consumptionItem', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '消耗项目', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
@ -1570,6 +1595,206 @@ export default { |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
], |
|
|
|
columnSubDetailList2: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3LineSequence', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'lineSequence', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '序号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3ComponentPart', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'componentPart', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3ComponentPartDesc', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'componentPartDesc', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '物料名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3QtyPerAssembly', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'qtyPerAssembly', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '单位用量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3ComponentScrap', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'componentScrap', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '调机量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3ShrinkageFactor', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'shrinkageFactor', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '损耗率', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3PrintUnitName', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'printUnitName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '单位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3IssueType', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'issueType', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '生产属性', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3OperationDesc', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'operationId', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '工序', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3IssueToLoc', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'issueToLocName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '发料库位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104002, |
|
|
|
serialNumber: '104002Table3NoteText', |
|
|
|
tableId: '104002Table3', |
|
|
|
tableName: 'BOM副产品表', |
|
|
|
columnProp: 'noteText', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '备注', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 150 |
|
|
|
}, |
|
|
|
], |
|
|
|
operationDetailList: [ |
|
|
|
{ |
|
|
|
columnProp: 'routingRevision', |
|
|
|
@ -2070,6 +2295,13 @@ export default { |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
consumptionItem: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// ======== 复选数据集 ======== |
|
|
|
@ -2457,6 +2689,7 @@ export default { |
|
|
|
noteText: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: 'Consumed', |
|
|
|
productFlag: 'component' |
|
|
|
} |
|
|
|
// 获取子料的序号 |
|
|
|
@ -2506,6 +2739,7 @@ export default { |
|
|
|
noteText: '', |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
lineSequence: '', |
|
|
|
consumptionItem: '', |
|
|
|
productFlag: 'byProduct' |
|
|
|
} |
|
|
|
// 获取子料的序号 |
|
|
|
@ -2551,6 +2785,7 @@ export default { |
|
|
|
noteText: row.noteText, |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
lineSequence: row.lineSequence, |
|
|
|
consumptionItem: row.consumptionItem, |
|
|
|
productFlag: 'component' |
|
|
|
} |
|
|
|
this.componentDisableFlag = true |
|
|
|
@ -2586,6 +2821,7 @@ export default { |
|
|
|
noteText: row.noteText, |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
lineSequence: row.lineSequence, |
|
|
|
consumptionItem: row.consumptionItem, |
|
|
|
productFlag: 'byProduct' |
|
|
|
} |
|
|
|
this.componentDisableFlag = true |
|
|
|
@ -3103,6 +3339,10 @@ export default { |
|
|
|
this.$message.warning('请选择子物料编码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData.productFlag === 'component' && (this.componentData.consumptionItem === '' || this.componentData.consumptionItem == null)) { |
|
|
|
this.$message.warning('请选择消耗项目!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) { |
|
|
|
this.$message.warning('请填写单位用量!') |
|
|
|
return |
|
|
|
@ -3138,7 +3378,11 @@ export default { |
|
|
|
this.byProductList = data.rows.byProductList |
|
|
|
this.manufStructCostDistribList = data.rows.manufStructCostDistribList |
|
|
|
if (isClose) { |
|
|
|
this.saveComponentModal() |
|
|
|
if (this.subDetailTable === 'by_products') { |
|
|
|
this.saveByProductModal() |
|
|
|
} else { |
|
|
|
this.saveComponentModal() |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.componentSaveModal = false |
|
|
|
} |
|
|
|
@ -3769,6 +4013,7 @@ export default { |
|
|
|
-moz-appearance: textfield; |
|
|
|
padding-right: 5px !important; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
|