|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config pad" style="margin-top: 10px"> |
|
|
|
<h5 style="margin-left: 20px">产品属性</h5> |
|
|
|
<el-form inline="true" style="margin-left: 20px" label-position="top"> |
|
|
|
<div class="mod-config pad" style="margin-top: 0px"> |
|
|
|
<h5 style="margin-left: 20px;font-size: 20px">产品属性</h5> |
|
|
|
<el-form inline="true" style="margin-left: 20px;margin-top: -20px" label-position="top"> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="searchData.site" readonly style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -11,77 +11,221 @@ |
|
|
|
<el-form-item :label="'产品名称/规格型号:'" style="margin-left: 20px"> |
|
|
|
<el-input v-model="partDescription" readonly style="width: 300px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form inline="true" style="margin-top: 26px;margin-left: 20px" label-position="top"> |
|
|
|
<el-form-item :label="'序号:'"> |
|
|
|
<el-input v-model="num" style="width: 120px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'描述:'" style="margin-left: 20px"> |
|
|
|
<el-input v-model="subCodeDesc" style="width: 200px" readonly></el-input> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="jump()" style="margin-left: 24px;height: 35px;width: 80px" type="primary">关闭</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="lastData()" style="margin-left: 24px;height: 35px;width: 90px" type="primary">上一条</el-button> |
|
|
|
</el-form> |
|
|
|
<el-tabs v-model="activeTable" style="margin-top: 10px; width: 100%;height: 22px;" |
|
|
|
type="border-card" @tab-click="tabClick" class="customer-tab"> |
|
|
|
<el-tab-pane label="属性" name="tab1" > |
|
|
|
<el-form inline="true" style="margin-top: 10px;margin-left: 20px" label-position="top"> |
|
|
|
<el-form-item :label="'序号:'"> |
|
|
|
<el-input v-model="num" style="width: 120px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="nextData()" style="margin-left: 24px;height: 35px;width: 90px" type="primary">下一条</el-button> |
|
|
|
<el-form-item :label="'描述:'" style="margin-left: 20px"> |
|
|
|
<el-input v-model="subCodeDesc" style="width: 200px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="jump()" style="margin-left: 24px;height: 35px;width: 80px" type="primary">关闭</el-button> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="lastData()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">上一条</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="nextData()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">下一条</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
|
|
|
|
|
style="width: 100%;margin-top: 20px"> |
|
|
|
<el-table-column |
|
|
|
prop="propertiesItemNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="itemDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性描述"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="textValue" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="文本值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="numValue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="60" |
|
|
|
label="数字值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="valueType" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性类型"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="产品结构" name="tab2" > |
|
|
|
<el-form inline="true" style="margin-top: 10px;margin-left: 20px" label-position="top"> |
|
|
|
<el-form-item :label="'版本号:'"> |
|
|
|
<el-input v-model="bomRevNo" style="width: 120px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
|
|
|
|
|
style="width: 100%;margin-top: 20px"> |
|
|
|
<el-table-column |
|
|
|
prop="propertiesItemNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="itemDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性描述"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="textValue" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="文本值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="numValue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="60" |
|
|
|
label="数字值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="valueType" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="属性类型"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="lastBom()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">上一版本</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="nextBom()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">下一版本</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:data="bomTable" |
|
|
|
border |
|
|
|
style="width: 100%;margin-top: 20px"> |
|
|
|
<el-table-column |
|
|
|
prop="partNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="零部件编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="revNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="30" |
|
|
|
label="零部件版本"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="partDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="100" |
|
|
|
label="零部件规格/名称"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyAssembly" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="单位用量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyFixedScrapt" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="调机量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="scraptFactor" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="损耗率"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="umid" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="30" |
|
|
|
label="计量单位"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="工艺路线" name="tab3" > |
|
|
|
<el-form inline="true" style="margin-top: 10px;margin-left: 20px" label-position="top"> |
|
|
|
<el-form-item :label="'版本号:'"> |
|
|
|
<el-input v-model="routingRevNo" style="width: 120px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="lastRouting()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">上一版本</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="''"> |
|
|
|
<el-button @click="nextRouting()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">下一版本</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:data="routingTable" |
|
|
|
border |
|
|
|
style="width: 100%;margin-top: 20px"> |
|
|
|
<el-table-column |
|
|
|
prop="itemNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
label="工序"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="operationDesc" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="30" |
|
|
|
label="工序名称"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="workCenterNo" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="100" |
|
|
|
label="加工中心编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="qtyAssembly" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="加工中心名称"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="machSetupTime" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="准备时间"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="machRunFactor" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="30" |
|
|
|
label="单位产出量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="factorUnit" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="30" |
|
|
|
label="产出单位"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getPartSubPropertiesValueData, |
|
|
|
getPartSubPropertiesValueHeaderData |
|
|
|
getPartSubPropertiesValueHeaderData, |
|
|
|
getBomDetailData, |
|
|
|
getRoutingDetailData, |
|
|
|
} from '@/api/pad.js' |
|
|
|
export default { |
|
|
|
name: 'padPartAttribute', |
|
|
|
data () { |
|
|
|
return { |
|
|
|
activeTable: 'tab1', |
|
|
|
height:200, |
|
|
|
tableData:[], |
|
|
|
currentData: {}, |
|
|
|
@ -91,15 +235,22 @@ |
|
|
|
}, |
|
|
|
partDescription:'', |
|
|
|
num:'', |
|
|
|
bomNum:'', |
|
|
|
routingNum:'', |
|
|
|
subCodeDesc:'', |
|
|
|
list:[], |
|
|
|
|
|
|
|
bomList:[], |
|
|
|
routingList:[], |
|
|
|
bomRevNo:'', |
|
|
|
routingRevNo:'', |
|
|
|
bomTable:[], |
|
|
|
routingTable:[], |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 250 |
|
|
|
this.height = window.innerHeight - 230 |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -107,20 +258,26 @@ |
|
|
|
this.currentData = JSON.parse(localStorage.getItem("partData")) |
|
|
|
this.searchData.partNo = this.currentData.partNo |
|
|
|
this.num=1; |
|
|
|
this.bomNum=1; |
|
|
|
this.routingNum=1; |
|
|
|
this.remark=this.currentData.remark; |
|
|
|
this.searchData.site= this.currentData.site; |
|
|
|
this.partDescription= this.currentData.partDescription+'/'+this.currentData.spec; |
|
|
|
getPartSubPropertiesValueHeaderData(this.searchData).then(({data}) => { |
|
|
|
this.list = data.rows; |
|
|
|
if(data.rows.length==0){ |
|
|
|
this.$alert('该物料没有设置属性!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.bomList = data.rows2; |
|
|
|
this.routingList = data.rows3; |
|
|
|
// if(data.rows.length==0){ |
|
|
|
// this.$alert('该物料没有设置属性!', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
|
|
|
|
this.subCodeDesc=this.list[this.num-1].subCodeDesc; |
|
|
|
this.search(); |
|
|
|
this.searchBom(); |
|
|
|
this.searchRouting() |
|
|
|
this.subCodeDesc=this.list[this.num-1].subCodeDesc; |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
@ -139,6 +296,36 @@ |
|
|
|
this.tableData = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
searchBom(){ |
|
|
|
if( this.bomList.length==0){ |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
this.bomRevNo=this.bomList[this.bomNum-1].revNo |
|
|
|
let postData={ |
|
|
|
site:this.searchData.site, |
|
|
|
partNo:this.searchData.partNo, |
|
|
|
revNo:this.bomList[this.bomNum-1].revNo, |
|
|
|
} |
|
|
|
getBomDetailData(postData).then(({data}) => { |
|
|
|
this.bomTable = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
searchRouting(){ |
|
|
|
if( this.routingList.length==0){ |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
this.routingRevNo=this.routingList[this.routingNum-1].revNo |
|
|
|
let postData={ |
|
|
|
site:this.searchData.site, |
|
|
|
partNo:this.searchData.partNo, |
|
|
|
revNo:this.routingList[this.routingNum-1].revNo, |
|
|
|
} |
|
|
|
getRoutingDetailData(postData).then(({data}) => { |
|
|
|
this.routingTable = data.rows |
|
|
|
}) |
|
|
|
}, |
|
|
|
jump(){ |
|
|
|
this.$router.push('/padPart'); |
|
|
|
}, |
|
|
|
@ -175,6 +362,76 @@ |
|
|
|
this.subCodeDesc=this.list[i].subCodeDesc; |
|
|
|
this.search(); |
|
|
|
}, |
|
|
|
nextBom(){ |
|
|
|
if(this.bomList.length==0){ |
|
|
|
this.$alert('该物料没有维护bom!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.bomNum==this.bomList.length){ |
|
|
|
this.bomNum=1; |
|
|
|
}else{ |
|
|
|
this.bomNum=this.bomNum+1; |
|
|
|
} |
|
|
|
let i=this.bomNum-1; |
|
|
|
|
|
|
|
|
|
|
|
this.searchBom(); |
|
|
|
}, |
|
|
|
lastBom(){ |
|
|
|
if(this.bomList.length==0){ |
|
|
|
this.$alert('该物料没有维护bom!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.bomNum==1){ |
|
|
|
this.bomNum=this.bomList.length; |
|
|
|
}else{ |
|
|
|
this.bomNum=this.bomNum-1; |
|
|
|
} |
|
|
|
// let i=this.num-1; |
|
|
|
// this.subCodeDesc=this.list[i].subCodeDesc; |
|
|
|
this.searchBom(); |
|
|
|
}, |
|
|
|
nextRouting(){ |
|
|
|
if(this.routingList.length==0){ |
|
|
|
this.$alert('该物料没有工艺路线!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.routingNum==this.routingList.length){ |
|
|
|
this.routingNum=1; |
|
|
|
}else{ |
|
|
|
this.routingNum=this.routingNum+1; |
|
|
|
} |
|
|
|
let i=this.routingNum-1; |
|
|
|
|
|
|
|
|
|
|
|
this.searchRouting(); |
|
|
|
}, |
|
|
|
lastRouting(){ |
|
|
|
if(this.routingList.length==0){ |
|
|
|
this.$alert('该物料没有工艺路线!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.routingNum==1){ |
|
|
|
this.routingNum=this.routingList.length; |
|
|
|
}else{ |
|
|
|
this.routingNum=this.routingNum-1; |
|
|
|
} |
|
|
|
// let i=this.num-1; |
|
|
|
// this.subCodeDesc=this.list[i].subCodeDesc; |
|
|
|
this.searchRouting(); |
|
|
|
}, |
|
|
|
// 列表表格选择替换 |
|
|
|
tabClick (tab, event) { |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.getData(); |
|
|
|
|