From b4d34c812fa353b6b7be68b27928a91edfda0a5f Mon Sep 17 00:00:00 2001 From: tzy1042411602 <1042411602@qq.com> Date: Fri, 27 Dec 2024 17:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=89=BA=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E6=8E=A8=E9=80=81bom=20=E6=8E=A8=E9=80=81=E5=B7=A5=E8=89=BA?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E7=AD=89=20=EF=BC=9A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/route.js | 21 +- src/views/system/orderPro/index.vue | 2 +- src/views/system/route/index.vue | 324 +++++++++++----------------- 3 files changed, 140 insertions(+), 207 deletions(-) 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 @@ - + +