|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getBomTreeStructure, searchQuoteBOMAlternativeNo, |
|
|
|
getBomTreeStructure, searchQuoteBOMAllCost, searchQuoteBOMAlternativeNo, |
|
|
|
searchQuoteBomList, |
|
|
|
searchQuoteBOMVersion, |
|
|
|
updateQuoteBomList |
|
|
|
@ -29,6 +29,20 @@ export default { |
|
|
|
totalCost:{ |
|
|
|
type:Number, |
|
|
|
default:-1, |
|
|
|
}, |
|
|
|
allSearchFlag:{ |
|
|
|
type:Boolean, |
|
|
|
default:false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
BOMAllSearchFlag:{ |
|
|
|
get(){ |
|
|
|
return this.allSearchFlag; |
|
|
|
}, |
|
|
|
set(val){ |
|
|
|
this.$emit("update:allSearchFlag",val) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
@ -65,6 +79,23 @@ export default { |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
serialNumber: '102003Table4PartNo', |
|
|
|
tableId: "102003Table4", |
|
|
|
tableName: "报价材料信息", |
|
|
|
columnProp: 'partNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '产品编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 102003, |
|
|
|
@ -74,7 +105,7 @@ export default { |
|
|
|
columnProp: 'componentPart', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnLabel: '零部件编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -311,20 +342,38 @@ export default { |
|
|
|
}, |
|
|
|
searchQuoteBomListPost(params){ |
|
|
|
this.dataListLoading = true; |
|
|
|
searchQuoteBomList(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.bomDetailList = data.rows |
|
|
|
this.computedQuoteBomCost(); |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
}).catch((error)=>{ |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
if (this.BOMAllSearchFlag){ |
|
|
|
searchQuoteBomList(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.bomDetailList = data.rows |
|
|
|
this.computedQuoteBomCost(); |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
}).catch((error)=>{ |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}else { |
|
|
|
// this.dataListLoading = false; |
|
|
|
searchQuoteBOMAllCost(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.bomDetailList = data.rows |
|
|
|
this.computedQuoteBomCost(); |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$emit("update:loadingStatus",this.dataListLoading) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
computedQuoteBomCost(){ |
|
|
|
this.$emit("update:loadingStatus",true) |
|
|
|
@ -468,6 +517,8 @@ export default { |
|
|
|
<div> |
|
|
|
<div style="margin-bottom: 5px"> |
|
|
|
<el-link style="cursor:pointer;" v-if="this.selectBom.length === 6 && bomTreeStructure.length >= 0" @click="clickVersionCheck">切换版本</el-link> |
|
|
|
<span style="display: inline-block;width: 20px"></span> |
|
|
|
<el-checkbox v-model="BOMAllSearchFlag">全级BOM结构</el-checkbox> |
|
|
|
</div> |
|
|
|
<el-container> |
|
|
|
<el-aside width="24%" style="padding: 0;" :style="{height: height}" v-loading="treeLoading"> |
|
|
|
|