diff --git a/src/api/mes/materialInbound.js b/src/api/mes/materialInbound.js new file mode 100644 index 0000000..40b6533 --- /dev/null +++ b/src/api/mes/materialInbound.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +// 物料入库单创建 +export function createMaterialInbound(data) { + return request({ + url: '/admin-api/erp/stock-in/create', + method: 'post', + data: { ...data, inType: '物料入库' } + }) +} +// 物料入库单分页查询(待入库/待审核) +export function getMaterialInboundPage(params = {}) { + return request({ + url: '/admin-api/erp/stock-in/page', + method: 'get', + params: { ...params, inType: '物料入库' } + }) +} + +// 物料入库单提交审核(提交后变为待审核状态) +export function submitMaterialInbound(data) { + return request({ + url: '/admin-api/erp/stock-in/submit', + method: 'put', + data + }) +} + +// 物料入库单审核(status: 20=通过, 1=驳回) +export function auditMaterialInbound(data) { + return request({ + url: '/admin-api/erp/stock-in/audit', + method: 'put', + data + }) +} + +// 物料入库单删除 +export function deleteMaterialInbound(id) { + return request({ + url: '/admin-api/erp/stock-in/delete', + method: 'delete', + params: { ids: String(id) } + }) +} diff --git a/src/api/mes/sparepart.js b/src/api/mes/sparepart.js index 546c95b..f54ab92 100644 --- a/src/api/mes/sparepart.js +++ b/src/api/mes/sparepart.js @@ -13,6 +13,28 @@ export function getSparepartSimpleList(pageNo = 1) { }) } +// 物料列表(分页查询,后端按 categoryType=2 过滤物料) +export function getMaterialSimpleList(pageNo = 1) { + return request({ + url: '/admin-api/erp/product/page', + method: 'get', + params: { + pageNo, + pageSize: 100, + categoryType: 2 + } + }) +} + +// 产品详情(含供应商、图片等完整信息,备件/物料通用) +export function getProductDetail(id) { + return request({ + url: '/admin-api/erp/product/get', + method: 'get', + params: { id } + }) +} + // 备件详情(含供应商、图片等完整信息) export function getSparepartDetail(id) { return request({ diff --git a/src/pages.json b/src/pages.json index 693ab5e..2747e7c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -430,6 +430,34 @@ "navigationStyle": "custom" } }, + { + "path": "materialInbound/index", + "style": { + "navigationBarTitleText": "物料入库", + "navigationStyle": "custom" + } + }, + { + "path": "materialInbound/create", + "style": { + "navigationBarTitleText": "新增物料入库", + "navigationStyle": "custom" + } + }, + { + "path": "materialInbound/materialSelect", + "style": { + "navigationBarTitleText": "选择物料", + "navigationStyle": "custom" + } + }, + { + "path": "materialInbound/materialConfirm", + "style": { + "navigationBarTitleText": "确认物料入库", + "navigationStyle": "custom" + } + }, { "path": "keypart/index", diff --git a/src/pages_function/pages/materialInbound/create.vue b/src/pages_function/pages/materialInbound/create.vue new file mode 100644 index 0000000..964e29a --- /dev/null +++ b/src/pages_function/pages/materialInbound/create.vue @@ -0,0 +1,576 @@ +