diff --git a/src/api/system/route.js b/src/api/system/route.js index 748e6fe..8f34a0a 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -73,12 +73,12 @@ export function onSave(list) { data: list, }) .then((response) => { - + return response; }) .catch((error) => { - console.error('Error saving route:', error); - throw error; + console.error('Error saving route:', error); + throw error; }); } @@ -109,11 +109,14 @@ export function updateProcessPlan(rooteProdet) { export function generatePDFs(rooteProdet) { return request({ url: '/system/route/generatePDFs', - method: 'post', + method: 'get', params: { rooteProdet }, + responseType: 'blob', + headers:{ 'Content-Type': 'application/json; application/octet-stream'}, }); } + // 获取物料BOM信息,后端返回物料BOM信息集合 export function getBomInfo(materialCode, materialName, productionOrderNo) { return request({ @@ -121,7 +124,7 @@ export function getBomInfo(materialCode, materialName, productionOrderNo) { method: 'post', params: { materialCode, - materialName, + materialName, productionOrderNo // 添加生产订单号参数 } }) @@ -130,7 +133,7 @@ export function getBomInfo(materialCode, materialName, productionOrderNo) { // 新增BOM export function addBom(data) { return request({ - url: '/system/bom', + url: '/system/materialbom', method: 'post', data: data }) @@ -139,7 +142,7 @@ export function addBom(data) { // 修改BOM export function updateBom(data) { return request({ - url: '/system/bom', + url: '/system/materialbom', method: 'put', data: data }) @@ -148,7 +151,7 @@ export function updateBom(data) { // 删除BOM export function deleteBom(id) { return request({ - url: '/system/bom/' + id, + url: '/system/materialbom/' + id, method: 'delete' }) } @@ -168,4 +171,4 @@ export function listMaterial(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/views/system/orderPro/index.vue b/src/views/system/orderPro/index.vue index 45e9dfe..3c8a115 100644 --- a/src/views/system/orderPro/index.vue +++ b/src/views/system/orderPro/index.vue @@ -290,7 +290,7 @@ export default { handleDetail(productionOrderNo) { // 跳转到目标路由并传递查询参数 this.$router.push({ - path: '/tool/route', // 替换为你的详情页面的路径 + path: '/route/route', // 替换为你的详情页面的路径 query: { productionOrderNo: productionOrderNo } // 通过 query 传递参数 }); }, diff --git a/src/views/system/route/index.vue b/src/views/system/route/index.vue index 15368de..9f8fbb4 100644 --- a/src/views/system/route/index.vue +++ b/src/views/system/route/index.vue @@ -42,9 +42,6 @@ v-hasPermi="['system:route:export']">导出 - - 刷新库存 - 导入工艺 @@ -66,7 +63,7 @@ - 生成PDF @@ -116,13 +113,9 @@ - + +