diff --git a/src/api/system/details.js b/src/api/system/details.js index 8d98363..548f470 100644 --- a/src/api/system/details.js +++ b/src/api/system/details.js @@ -24,6 +24,17 @@ export function updateFBl(data) { data: data }) } + +// 获取BOM上传状态 +export function viewGetBomUploadStatus(rooteProdet) { + return request({ + url: '/system/details/viewGetBomUploadStatus', + method: 'post', + params: { + rooteProdet: rooteProdet + } + }) +} // 获取项目令号列表 export function getProjectCodes(query) { return request({ diff --git a/src/api/system/route.js b/src/api/system/route.js index a2c343a..6fa7a56 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -98,11 +98,11 @@ export function pushRouteBom(rooteProdet) { params: { rooteProdet }, }); } -export function updateProcessPlan(rooteProdet) { +export function updateProcessPlan(rooteProdet, ids) { return request({ url: '/system/route/updateProcessPlan', method: 'post', - params: { rooteProdet }, + params: { rooteProdet, ids }, }); }export function updateProcesTime(rooteProdet) { diff --git a/src/permission.js b/src/permission.js index 49eede5..b18210b 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register', '/index','/indexDaping','/mrp2'] +const whiteList = ['/login', '/register', '/index', '/indexDaping', '/mrp2', '/system/cost'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/src/router/index.js b/src/router/index.js index 44a05e2..7dd7e09 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -132,6 +132,13 @@ export const constantRoutes = [ name: 'Mrp2Public', hidden: true, meta: { title: 'MRP2运算结果' } + }, + { + path: '/system/cost', + component: () => import('@/views/system/cost/index'), + name: 'CostPublic', + hidden: true, + meta: { title: '零件成本查询' } } // { // path: '/', diff --git a/src/views/system/details/index.vue b/src/views/system/details/index.vue index cc38a9b..e393f0d 100644 --- a/src/views/system/details/index.vue +++ b/src/views/system/details/index.vue @@ -140,6 +140,18 @@ >更新物料清单 + + + 查看BOM上传状态 + + @@ -297,7 +309,7 @@ + + \ No newline at end of file diff --git a/src/views/system/productionPlan/index1.vue b/src/views/system/productionPlan/index1.vue new file mode 100644 index 0000000..8d1b72c --- /dev/null +++ b/src/views/system/productionPlan/index1.vue @@ -0,0 +1,784 @@ + + + diff --git a/src/views/system/route/index.vue b/src/views/system/route/index.vue index 10a61b9..e9cec9d 100644 --- a/src/views/system/route/index.vue +++ b/src/views/system/route/index.vue @@ -58,7 +58,7 @@ - 更新计划时间 @@ -1544,18 +1544,20 @@ export default { pushRouteBom(productionOrderNo), timeoutPromise ]); - // 处理后端返回的数据 - const {duplicateRoutes, failedRoutes, successfulRoutes} = response; - // 提取物料编码 + // 处理后端返回的数据 - 适配新的返回结构 R + const {duplicateRoutes, failedRoutes, successfulRoutes} = response.data; + // 提取物料编码和错误信息 const duplicateCodes = duplicateRoutes.join(', '); - const failedCodes = failedRoutes.map(route => route.materialCode).join(', '); + const failedInfo = failedRoutes.map(route => + `${route.materialCode} (${route.errorMessage || '未知错误'})` + ).join(', '); const successfulCodes = successfulRoutes.map(route => route.materialCode).join(', '); // 显示成功消息 this.$alert(`
成功 (${successfulRoutes.length}):
${successfulCodes || '无'}
失败 (${failedRoutes.length}):
-
${failedCodes || '无'}
+
${failedInfo || '无'}
重复 (${duplicateRoutes.length}):
${duplicateCodes || '无'}
`, '推送完成', { @@ -1592,16 +1594,24 @@ export default { }, /** 更新计划时间间*/ updateProcessPlan(row) { + // 若未勾选任何行,则提示并返回 + if (!this.ids || this.ids.length === 0) { + this.$modal.msgError("请先勾选至少一条数据再更新计划时间"); + return; + } // 显示加载状态 this.loading = true; // 调用 reset 方法,重置表单或状态 this.reset(); // 获取生产订单号 const rooteProdet = this.params.productionOrderNo; + //获取物料编码 + const materialCode = this.params.materialCode; + console.log(rooteProdet); - // 调用封装好的 API 方法 - updateProcessPlan(rooteProdet) + // 调用封装好的 API 方法(带勾选的 ids) + updateProcessPlan(rooteProdet, this.ids) .then(response => { // 假设后端返回的数据可以直接赋值给表单 this.form = response;