diff --git a/src/api/system/mrp.js b/src/api/system/mrp.js new file mode 100644 index 0000000..85387be --- /dev/null +++ b/src/api/system/mrp.js @@ -0,0 +1,128 @@ +import request from '@/utils/request' + +// 查询MRP运算结果复查列表 +export function listMrp(query) { + return request({ + url: '/system/mrp/list', + method: 'get', + params: query + }) +} + +// 查询MRP运算结果复查详细 +export function getMrp(id) { + return request({ + url: '/system/mrp/' + id, + method: 'get' + }) +} + +// 新增MRP运算结果复查 +export function addMrp(data) { + return request({ + url: '/system/mrp', + method: 'post', + data: data + }) +} + +// 修改MRP运算结果复查 +export function updateMrp(data) { + return request({ + url: '/system/mrp', + method: 'put', + data: data + }) +} + +// 删除MRP运算结果复查 +export function delMrp(id) { + return request({ + url: '/system/mrp/' + id, + method: 'delete' + }) +} + +// 导出MRP运算结果复查列表 +export function exportMrp(query) { + return request({ + url: '/system/mrp/export', + method: 'post', + data: query, + responseType: 'blob', + timeout: 5 * 60 * 1000 // 导出可能需要较长时间,设置5分钟超时 + }) +} + +// ========== MRP2 相关方法 ========== + +// 查询MRP2运算结果列表 +export function getMRP2Results(query) { + return request({ + url: '/system/mrp2/list', + method: 'get', + params: query + }) +} + +// 查询MRP2运算结果详细 +export function getMRP2Result(id) { + return request({ + url: '/system/mrp2/' + id, + method: 'get' + }) +} + +// 新增MRP2运算结果 +export function addMRP2Result(data) { + return request({ + url: '/system/mrp2', + method: 'post', + data: data + }) +} + +// 修改MRP2运算结果 +export function updateMRP2Result(data) { + return request({ + url: '/system/mrp2', + method: 'put', + data: data + }) +} + +// 删除MRP2运算结果 +export function delMRP2Result(id) { + return request({ + url: '/system/mrp2/' + id, + method: 'delete' + }) +} + +// 导出MRP2运算结果 +export function exportMRP2Data(query) { + return request({ + url: '/system/mrp2/export', + method: 'post', + data: query, + responseType: 'blob' + }) +} + +// 执行MRP2运算 +export function executeMRP2Calculation(data) { + return request({ + url: '/system/mrp2/calculate', + method: 'post', + data: data + }) +} + +// 获取MRP2统计信息 +export function getMRP2Stats(query) { + return request({ + url: '/system/mrp2/stats', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/system/proPlan.js b/src/api/system/proPlan.js new file mode 100644 index 0000000..957a7f7 --- /dev/null +++ b/src/api/system/proPlan.js @@ -0,0 +1,67 @@ +import request from '@/utils/request' + +// 查询方案管理列表 +export function listProPlan(query) { + return request({ + url: '/system/proPlan/list', + method: 'get', + params: query + }) +}// 查询方案管理列表 +export function listProPlan2(query) { + return request({ + url: '/system/proPlan/list2', + method: 'get', + params: query + }) +} + +// 查询超期/临期项目列表 +export function listProPlanOverdue() { + return request({ + url: '/system/proPlan/overdue', + method: 'get' + }) +} + +// 查询临期项目列表 +export function listProPlanExpirys() { + return request({ + url: '/system/proPlan/expiryProjects', + method: 'get' + }) +} + +// 查询方案管理详细 +export function getProPlan(id) { + return request({ + url: '/system/proPlan/' + id, + method: 'get' + }) +} + +// 新增方案管理 +export function addProPlan(data) { + return request({ + url: '/system/proPlan', + method: 'post', + data: data + }) +} + +// 修改方案管理 +export function updateProPlan(data) { + return request({ + url: '/system/proPlan', + method: 'put', + data: data + }) +} + +// 删除方案管理 +export function delProPlan(id) { + return request({ + url: '/system/proPlan/' + id, + method: 'delete' + }) +} diff --git a/src/views/indexDaping.vue b/src/views/indexDaping.vue new file mode 100644 index 0000000..62ebf78 --- /dev/null +++ b/src/views/indexDaping.vue @@ -0,0 +1,1050 @@ + + + + + 设计任务进度看板 + {{ getCurrentTime() }} + + + + + + + + + + + + + + + + + + + 超期项目 + + 总超期: {{ overdueStats.total }}项 + 严重超期: {{ overdueStats.critical }}项 + 一般超期: {{ overdueStats.normal }}项 + + + + + + + + + + {{ item.projectCode }} + + 超期{{ item.overdueDays }}天 + + + + {{ item.designer }} + {{ item.description }} + + 开始: {{ item.startDate }} + 计划: {{ item.planDate }} + + + + + + + + + + {{ item.projectCode }} + + {{ item.overdueDays * -1 }}天 + + + + {{ item.designer }} + {{ item.description }} + + 开始: {{ item.startDate }} + 计划: {{ item.planDate }} + + + + + + + + + + 暂无超期项目 + + + + + + + + + + + + 临期项目 + + + + + + + {{ item.rank }} + + {{ item.designer }} + + 临期{{ item.overdueDays }}天 + + {{item.projectCode}} + {{item.planDate}} + + + + + + + + + + + + + {{ index + 1 }} + + {{ item.designer }} + + 临期{{ item.overdueDays }}天 + + + + + + + + + + 暂无临期项目 + + + + + + + + + + 项目方案数 + + 周 + 月 + 年 + + + + + + + + + + 加载中... + + + + + + diff --git a/src/views/system/mrp2/index.vue b/src/views/system/mrp2/index.vue new file mode 100644 index 0000000..bfa8a87 --- /dev/null +++ b/src/views/system/mrp2/index.vue @@ -0,0 +1,945 @@ + + + + + + + + + 项目供需查询(仅供参考) + + + 物料需求计划运算结果查询 + + + + + 刷新页面 + + + 返回 + + + + + + + + + + + + + + 查询条件 + + + + + + + + + + + {{ item.productionOrderNo }} + + + {{ item.productionName }} + + + + + {{ item.drawingNo }} + + + {{ item.createdBy || '系统' }} + + + + + + + + 搜索 + 重置 + + + + + + + + + + 当前选择的生产令号 + + + + + + + + {{ productionObj.productionOrderNo }} + + + {{ productionObj.productionName }} + + + + + + 图号: {{ productionObj.drawingNo }} + + + + 创建人: {{ productionObj.createdBy }} + + + + 创建时间: {{ formatDateTime(productionObj.createTime) }} + + + + + + 刷新数据 + + + + + + + + + + + 运算结果 + + + + + + {{ mrpOperationStatus || '运算进行中...' }} + + + + + {{ loadingMRP ? '核算中...' : '开始核算' }} + + + + + + + + + + 导出Excel + + + + 刷新 + + + + + + + + + + {{ mrpStats.totalMaterials }} + 总物料数 + + + + + {{ mrpStats.positiveStock }} + 正库存 + + + + + {{ mrpStats.negativeStock }} + 负库存 + + + + + {{ mrpStats.zeroStock }} + 零库存 + + + + + + + + + 请先选择生产令号以查看运算结果 + + + + + + + + {{ scope.row.purchaseNotInStock.toFixed(2) }} + + + + + + {{ scope.row.availableStock.toFixed(3) }} + + + + + + + {{ scope.row.realTimeStock.toFixed(3) }} + + + + + + {{ scope.row.prodNotInStock.toFixed(3) }} + + + + + {{ scope.row.purchaseRequestQty.toFixed(3) }} + + + + + + {{ scope.row.childNotPickedQty.toFixed(3) }} + + + + + {{ formatDateTime(scope.row.createTime) }} + + + + + {{ formatDateTime(scope.row.updateTime) }} + + + + + + + + + + + + + +
+ 物料需求计划运算结果查询 +
请先选择生产令号以查看运算结果