diff --git a/src/api/mes/processroute/index.ts b/src/api/mes/processroute/index.ts
index b18879dc3..c889e2dff 100644
--- a/src/api/mes/processroute/index.ts
+++ b/src/api/mes/processroute/index.ts
@@ -82,9 +82,9 @@ export const getPatternPage = async (code:String) => {
return await request.get({ url: `/mes/mes-process-pattern/pagePatternByProcessCode?pageSize=25&processCode=`+code })
}
-// 查询物料列表
-export const getItembasicPage = async (code:String) => {
- return await request.get({ url: `/mes/mes-process-itembasic/pageByProcessCode?pageSize=25&processCode=`+code})
+// 查询产品物料列表
+export const getProcessBomList = async (params) => {
+ return await request.get({ url: `/mes/common/getBomListByProductAndProcess`,params})
}
export const getWorkstationPage = async (code:String) => {
diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue
index 2193afb2d..c10f2af27 100644
--- a/src/views/mes/processroute/components/configDialog.vue
+++ b/src/views/mes/processroute/components/configDialog.vue
@@ -96,10 +96,11 @@
-
- =
-
-
+
+
+
+
+
@@ -210,6 +211,7 @@ const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
graph.value.removeNode(row.code)
}
+const productCode=ref()
//初始化图形组件
const graph = ref()
const rowData = ref()
@@ -219,6 +221,7 @@ const openDetail = (row: any) => {
titleNameRef.value = rowData.value.processrouteCode
titleValueRef.value = rowData.value.processName
processRouteId.value = rowData.value.id
+ productCode.value=rowData.value.productCode
routeVersion.value=rowData.value.routeVersion
remarksData.data = {
tableId: rowData.value.id,
@@ -261,11 +264,17 @@ const getProcessInfo = async (id: any) => {
/** 获取产品信息 */
const getItembasicInfo = async (code: String) => {
const res = await ProcessrouteApi.getProductInfo(code)
+ console.log('productData',res)
productData.value = res
}
/** 获取物料列表 */
-const getItembasicPage = async (code) => {
- return await ProcessrouteApi.getItembasicPage(code);
+const getProcessBomList = async (pcode,processCode) => {
+ let params={
+ code:pcode ,//"产品编码"
+ //version:version,//bom版本"
+ processCode:processCode
+ }
+ return await ProcessrouteApi.getProcessBomList(params);
}
/** 查询模具基本信息列表 */
const getPatternPage = async (code) => {
@@ -290,7 +299,7 @@ const getWorkstationPage = async (code) => {
// }
/**获取工艺路线定义的工序列表 */
const getProcessList = async (code) => {
- console.log('code',code)
+ //console.log('code',code)
const res = await ProcessrouteApi.getProcessrouteNodeList(code)
processData.value = res
//return res
@@ -299,15 +308,15 @@ const getProcessList = async (code) => {
const nodeClick = (e, x, y, node, view) => {
Promise.all([
getProcessInfo(node.id),
- getItembasicPage(node.id),
+ getProcessBomList(productCode.value,node.id),
getPatternPage(node.id),
getWorkstationPage(node.id)
- ]).then(([processIndoList,itembasicPage, patternPage,workstationInfoList]) => {
+ ]).then(([processIndoList,basicBom, patternPage,workstationInfoList]) => {
// 在这里处理所有异步操作的结果
- message.info(JSON.stringify(processIndoList))
- console.log(processIndoList)
+ //message.info(JSON.stringify(processIndoList))
+ console.log('basicBom',basicBom)
//获取绑定的物料信息
- materialData.value = itembasicPage.list
+ materialData.value = basicBom
//获取绑定的模具信息
mouldData.value = patternPage.list
//获取绑定的工位信息