|
|
|
@ -563,7 +563,7 @@ |
|
|
|
<!-- 子物料页签 --> |
|
|
|
<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-tab-pane label="产品BOM" v-if="componentPartCurrentRow.ifHasBom==='Y'" name="component_part_bom"> |
|
|
|
<el-table |
|
|
|
:data="componentPartBomList" |
|
|
|
height="250px" |
|
|
|
@ -586,29 +586,29 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- <el-tab-pane label="配方BOM" name="component_part_recipe">--> |
|
|
|
<!-- <el-table--> |
|
|
|
<!-- :data="componentPartRecipeList"--> |
|
|
|
<!-- 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-tab-pane label="配方BOM" v-if="componentPartCurrentRow.ifHasPeifang==='Y'" name="component_part_recipe"> |
|
|
|
<el-table |
|
|
|
:data="componentPartRecipeList" |
|
|
|
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-button type="primary" @click="componentPartModelFlag = false">关闭</el-button> |
|
|
|
@ -1138,7 +1138,11 @@ import ChooseList from '@/views/modules/common/Chooselist' |
|
|
|
import {isAuth} from "../../../utils"; |
|
|
|
import FilterSearch from "../../common/filterSearch.vue"; |
|
|
|
import {partAllInfoSearchAny} from "../../../api/part/partAllInfoSearch"; |
|
|
|
import {bomManagementSearchAny, queryProductGroupId4} from "../../../api/part/bomManagement"; |
|
|
|
import { |
|
|
|
bomManagementSearchAny, |
|
|
|
queryComponentPartRecipeList, |
|
|
|
queryProductGroupId4 |
|
|
|
} from "../../../api/part/bomManagement"; |
|
|
|
import {queryWorkCenterList} from "../../../api/part/workCenter"; |
|
|
|
import {queryWorkerLevelList} from "../../../api/base/laborClass"; |
|
|
|
|
|
|
|
@ -1192,6 +1196,12 @@ export default { |
|
|
|
this.partData.partNo = this.partData.partNo.toUpperCase() |
|
|
|
} |
|
|
|
}, |
|
|
|
componentPartModelFlag: { |
|
|
|
deep: true, |
|
|
|
handler: function (newV, oldV) { |
|
|
|
this.componentPartCurrentRow = {} |
|
|
|
} |
|
|
|
}, |
|
|
|
'componentPartProductGroupId4Data.productGroupId4': { |
|
|
|
deep: true, |
|
|
|
handler: function (newV, oldV) { |
|
|
|
@ -1203,6 +1213,17 @@ export default { |
|
|
|
handler: function (newV, oldV) { |
|
|
|
this.partData.productGroupId4 = this.componentPartProductGroupId4SaveData.productGroupId4 |
|
|
|
} |
|
|
|
}, |
|
|
|
componentPartCurrentRow: { |
|
|
|
handler: function (newV, oldV) { |
|
|
|
if (newV.ifHasBom==='Y'||newV.ifHasPeifang==='Y'){ |
|
|
|
if (newV.ifHasBom==='Y'){ |
|
|
|
this.componentTable = 'component_part_bom' |
|
|
|
} else { |
|
|
|
this.componentTable = 'component_part_recipe' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -2873,6 +2894,96 @@ export default { |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
], |
|
|
|
columnComponentPartList1: [ |
|
|
|
{ |
|
|
|
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: 'weightShare', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '重量分配', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 200 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'partsByWeight', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '零件-按重量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 140 |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'qtyUom', |
|
|
|
headerAlign: "center", |
|
|
|
align: "left", |
|
|
|
columnLabel: '数量计量单位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
], |
|
|
|
productGroupId4ColumnList: [ |
|
|
|
{ |
|
|
|
columnProp: 'productGroupId4', |
|
|
|
@ -3920,6 +4031,15 @@ export default { |
|
|
|
this.pageIndex3 = data.page.currPage |
|
|
|
this.pageSize3 = data.page.pageSize |
|
|
|
this.totalPage3 = data.page.totalCount |
|
|
|
if (data.page.list.length > 0){ |
|
|
|
this.componentPartCurrentRow = JSON.parse(JSON.stringify(this.componentPartList[0])) |
|
|
|
if (this.componentPartCurrentRow.ifHasPeifang==='Y'){ |
|
|
|
this.queryComponentPartRecipeList() |
|
|
|
} |
|
|
|
if (this.componentPartCurrentRow.ifHasBom==='Y'){ |
|
|
|
this.queryComponentPartBomList() |
|
|
|
} |
|
|
|
} |
|
|
|
this.componentPartModelFlag = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
@ -3931,9 +4051,9 @@ export default { |
|
|
|
|
|
|
|
// 刷新页签的table数据 |
|
|
|
tabClick () { |
|
|
|
if (this.componentTable === 'component_part_bom') { |
|
|
|
this.queryComponentPartBomList() |
|
|
|
} |
|
|
|
// if (this.componentTable === 'component_part_bom') { |
|
|
|
// this.queryComponentPartBomList() |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
// 子物料Bom列表 |
|
|
|
@ -3973,10 +4093,10 @@ export default { |
|
|
|
// 单机选中物料信息 |
|
|
|
componentPartClickRow (row, column) { |
|
|
|
this.componentPartCurrentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
if (this.componentPartCurrentRow.ifHasPeifang){ |
|
|
|
if (this.componentPartCurrentRow.ifHasPeifang==='Y'){ |
|
|
|
this.queryComponentPartRecipeList() |
|
|
|
} |
|
|
|
if (this.componentPartCurrentRow.ifHasBom){ |
|
|
|
if (this.componentPartCurrentRow.ifHasBom==='Y'){ |
|
|
|
this.queryComponentPartBomList() |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -4021,6 +4141,15 @@ export default { |
|
|
|
this.pageIndex3 = data.page.currPage |
|
|
|
this.pageSize3 = data.page.pageSize |
|
|
|
this.totalPage3 = data.page.totalCount |
|
|
|
if (data.page.list.length > 0){ |
|
|
|
this.componentPartCurrentRow = JSON.parse(JSON.stringify(this.componentPartList[0])) |
|
|
|
if (this.componentPartCurrentRow.ifHasPeifang==='Y'){ |
|
|
|
this.queryComponentPartRecipeList() |
|
|
|
} |
|
|
|
if (this.componentPartCurrentRow.ifHasBom==='Y'){ |
|
|
|
this.queryComponentPartBomList() |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.componentPartList = [] |
|
|
|
} |
|
|
|
|