|
|
@ -465,7 +465,7 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 子明细物料模态框 --> |
|
|
<!-- 子明细物料模态框 --> |
|
|
<el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="940px"> |
|
|
|
|
|
|
|
|
<el-dialog title="物料清单" top="10vh" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="940px"> |
|
|
<el-form :inline="true" label-position="top" :model="componentPartData"> |
|
|
<el-form :inline="true" label-position="top" :model="componentPartData"> |
|
|
<el-form-item :label="'PLM物料编码'"> |
|
|
<el-form-item :label="'PLM物料编码'"> |
|
|
<el-input v-model="componentPartData.plmPartNo" clearable style="width: 120px"></el-input> |
|
|
<el-input v-model="componentPartData.plmPartNo" clearable style="width: 120px"></el-input> |
|
|
@ -489,7 +489,11 @@ |
|
|
<el-table |
|
|
<el-table |
|
|
:height="250" |
|
|
:height="250" |
|
|
:data="componentPartList" |
|
|
:data="componentPartList" |
|
|
|
|
|
ref="componentPartTable" |
|
|
|
|
|
:row-style="rowStyle" |
|
|
@row-dblclick="getComponentRowData" |
|
|
@row-dblclick="getComponentRowData" |
|
|
|
|
|
@row-click="componentPartClickRow" |
|
|
|
|
|
@current-change="changeCurrentRow" |
|
|
border |
|
|
border |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -519,6 +523,33 @@ |
|
|
:total="totalPage3" |
|
|
:total="totalPage3" |
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
|
|
|
<!-- 子物料页签 --> |
|
|
|
|
|
<el-tabs v-model="componentTable" style="width: 100%;height: 300px" type="border-card" @tab-click="tabClick" class="sub_detail-tab"> |
|
|
|
|
|
<!-- 子物料BOM --> |
|
|
|
|
|
<el-tab-pane label="BOM" name="component_part_bom"> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="componentPartBomList" |
|
|
|
|
|
height="250px" |
|
|
|
|
|
border |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
v-for="(item,index) in columnComponentPartList" :key="index" |
|
|
|
|
|
:sortable="item.columnSortable" |
|
|
|
|
|
:prop="item.columnProp" |
|
|
|
|
|
:header-align="item.headerAlign" |
|
|
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
|
|
:align="item.align" |
|
|
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
|
|
:min-width="item.columnWidth" |
|
|
|
|
|
:label="item.columnLabel"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
<el-footer style="height:35px;margin-top:10px;text-align:center"> |
|
|
<el-footer style="height:35px;margin-top:10px;text-align:center"> |
|
|
<el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
@ -933,6 +964,7 @@ import { |
|
|
queryMultiLevelStructureTable, // 刷新多级别结构 |
|
|
queryMultiLevelStructureTable, // 刷新多级别结构 |
|
|
queryPartListBom, // 查出可创建BOM的物料 |
|
|
queryPartListBom, // 查出可创建BOM的物料 |
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
queryPartListAll, // 查询包含Purchase(Raw)的物料 |
|
|
|
|
|
queryComponentPartBomList, // 查子物料BOM |
|
|
} from '@/api/part/bomManagement.js' |
|
|
} from '@/api/part/bomManagement.js' |
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
import ChooseList from '@/views/modules/common/Chooselist' |
|
|
|
|
|
|
|
|
@ -1035,6 +1067,7 @@ export default { |
|
|
// 初始页签 |
|
|
// 初始页签 |
|
|
detailTable: 'bom_detail', |
|
|
detailTable: 'bom_detail', |
|
|
subDetailTable: 'bom_sub_detail', |
|
|
subDetailTable: 'bom_sub_detail', |
|
|
|
|
|
componentTable: 'component_part_bom', |
|
|
// ======== 数据对象 ======== |
|
|
// ======== 数据对象 ======== |
|
|
modalData: { |
|
|
modalData: { |
|
|
flag: '', |
|
|
flag: '', |
|
|
@ -1203,6 +1236,7 @@ export default { |
|
|
itemCostDistribution: '', |
|
|
itemCostDistribution: '', |
|
|
updateBy: '', |
|
|
updateBy: '', |
|
|
}, |
|
|
}, |
|
|
|
|
|
componentPartCurrentRow: {}, |
|
|
// ======== 数据列表 ======== |
|
|
// ======== 数据列表 ======== |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
partList: [], |
|
|
partList: [], |
|
|
@ -1217,6 +1251,7 @@ export default { |
|
|
checkedByProduct: [], |
|
|
checkedByProduct: [], |
|
|
operationList: [], |
|
|
operationList: [], |
|
|
multiLevelStructureList: [], |
|
|
multiLevelStructureList: [], |
|
|
|
|
|
componentPartBomList: [], |
|
|
// ======== 列表表头 ======== |
|
|
// ======== 列表表头 ======== |
|
|
columnList: [ |
|
|
columnList: [ |
|
|
{ |
|
|
{ |
|
|
@ -2521,6 +2556,96 @@ export default { |
|
|
columnWidth: 100 |
|
|
columnWidth: 100 |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
|
|
|
columnComponentPartList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'engChgLevel', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: 'BOM版本号', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 60 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'bomType', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: '制造类型', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'alternativeNo', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "center", |
|
|
|
|
|
columnLabel: '替代编码', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 80 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'alternativeDescription', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '替代名称', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'componentPart', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '子物料编码', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 100 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'componentPartDesc', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '子物料名称', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 200 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'qtyPerAssembly', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "right", |
|
|
|
|
|
columnLabel: '单位用量', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 140 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'printUnit', |
|
|
|
|
|
headerAlign: "center", |
|
|
|
|
|
align: "left", |
|
|
|
|
|
columnLabel: '计量单位', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 80 |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
// ======== 必填规则 ======== |
|
|
// ======== 必填规则 ======== |
|
|
rules: { |
|
|
rules: { |
|
|
partNo: [ |
|
|
partNo: [ |
|
|
@ -3078,10 +3203,6 @@ export default { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -3128,10 +3249,6 @@ export default { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -3174,10 +3291,6 @@ export default { |
|
|
|
|
|
|
|
|
// 子明细编辑模态框 |
|
|
// 子明细编辑模态框 |
|
|
updateComponentModal (row) { |
|
|
updateComponentModal (row) { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
site: row.site, |
|
|
site: row.site, |
|
|
@ -3210,10 +3323,6 @@ export default { |
|
|
|
|
|
|
|
|
// 副产品编辑模态框 |
|
|
// 副产品编辑模态框 |
|
|
updateByProductModal (row) { |
|
|
updateByProductModal (row) { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
site: row.site, |
|
|
site: row.site, |
|
|
@ -3246,10 +3355,6 @@ export default { |
|
|
|
|
|
|
|
|
// 副产品成本分配编辑模态框 |
|
|
// 副产品成本分配编辑模态框 |
|
|
updateManufStructCostDistribModal (row) { |
|
|
updateManufStructCostDistribModal (row) { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.manufStructCostDistribData = { |
|
|
this.manufStructCostDistribData = { |
|
|
site: row.site, |
|
|
site: row.site, |
|
|
partNo: row.partNo, |
|
|
partNo: row.partNo, |
|
|
@ -3514,6 +3619,48 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 刷新页签的table数据 |
|
|
|
|
|
tabClick () { |
|
|
|
|
|
if (this.componentTable === 'component_part_bom') { |
|
|
|
|
|
this.queryComponentPartBomList() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 子物料Bom列表 |
|
|
|
|
|
queryComponentPartBomList () { |
|
|
|
|
|
let tempData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
partNo: this.componentPartCurrentRow.partNo, |
|
|
|
|
|
} |
|
|
|
|
|
queryComponentPartBomList(tempData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.componentPartBomList = data.rows |
|
|
|
|
|
} else { |
|
|
|
|
|
this.componentPartBomList = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
rowStyle ({row}) { |
|
|
|
|
|
if (this.componentPartCurrentRow.partNo === row.partNo) { |
|
|
|
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' } |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 单机选中物料信息 |
|
|
|
|
|
componentPartClickRow (row, column) { |
|
|
|
|
|
this.componentPartCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 当前值发生变化的时候修改 |
|
|
|
|
|
changeCurrentRow (row, oldRow) { |
|
|
|
|
|
// 判断是否是获取焦点的事件 |
|
|
|
|
|
if (row) { |
|
|
|
|
|
this.componentPartCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
|
|
this.tabClick() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// copy物料列表 |
|
|
// copy物料列表 |
|
|
queryCopyPartModal () { |
|
|
queryCopyPartModal () { |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
|