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 @@
+
+
+
+
+
+
+
+
+
+
+ 选择物料
+
+
+
+
+
+
+
+
+ *入库时间
+
+
+
+ {{ inboundDate || '请选择入库时间' }}
+ ▼
+
+
+
+
+
+
+ *经办人
+
+
+
+ {{ selectedOperatorName || '请选择经办人' }}
+
+ ▶
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+ 附件
+
+
+
+
+
+ {{ getFileIcon(file.name) }}
+
+
+ {{ file.name }}
+ {{ formatFileSize(file.size) }}
+
+
+ ✕
+
+
+
+ 选取文件
+
+
+
+
+
+
+
+
+
+ 入库清单({{ itemList.length }})
+
+
+
+
+ ✕
+
+
+
+ 📦
+
+
+ {{ item.productName }}
+ {{ item.productBarCode || '-' }}
+
+
+
+
+ 入库数量
+ {{ item.inputCount }}{{ item.purchaseUnitName }}
+
+
+
+
+
+
+ 请扫码或选择物料
+
+
+
+
+
+ 取消
+ 确认入库
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialInbound/index.vue b/src/pages_function/pages/materialInbound/index.vue
new file mode 100644
index 0000000..0d854dc
--- /dev/null
+++ b/src/pages_function/pages/materialInbound/index.vue
@@ -0,0 +1,764 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ currentStatusLabel }}
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+ 物料信息
+ {{ textValue(item.productNames) }}
+
+
+ 入库时间
+ {{ formatDateTime(item.inTime || item.createTime) }}
+
+
+ 创建人
+ {{ textValue(item.creatorName || item.creator) }}
+
+
+ 数量
+ {{ textValue(item.totalCount) }}
+
+
+ 审核人
+ {{ textValue(item.auditUserName) }}
+
+
+
+
+ 提交审核
+
+
+
+ 审核通过
+ 审核驳回
+
+
+
+ 加载中...
+ 暂无数据
+ 加载更多...
+ 没有更多了
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ *审核人
+
+ {{ selectedAuditor ? selectedAuditor.label : '请选择' }}
+ ▼
+
+
+
+ {{ u.label }}
+ ✓
+
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialInbound/materialConfirm.vue b/src/pages_function/pages/materialInbound/materialConfirm.vue
new file mode 100644
index 0000000..1fa744c
--- /dev/null
+++ b/src/pages_function/pages/materialInbound/materialConfirm.vue
@@ -0,0 +1,469 @@
+
+
+
+
+
+
+
+
+ 已选物料
+
+
+
+
+
+
+ 📦
+
+
+
+
+ 物料名称:
+ {{ textValue(material.name) }}
+
+
+ 规格:
+ {{ textValue(material.standard || material.deviceSpec) }}
+
+
+ 当前总库存:
+ {{ material.count != null ? material.count : 0 }}{{ textUnit(material.unitName || material.minStockUnitName || '个') }}
+
+
+
+
+
+
+ 采购单位:
+ {{ textValue(material.purchaseUnitName) }}
+
+
+ 库存单位:
+ {{ textValue(material.unitName || material.minStockUnitName || '个') }}
+
+
+
+ 换算关系:
+ 1{{ textValue(material.purchaseUnitName) }}={{ textValue(material.purchaseUnitConvertQuantity) }}{{ stockUnitLabel(material) }}
+
+
+
+
+
+
+
+ 仓库/库区
+
+
+
+
+ 仓库
+
+
+
+ {{ selectedWarehouse ? selectedWarehouse.label : '请选择' }}
+
+ ▼
+
+
+
+
+ {{ item.label }}
+ ✓
+
+ 暂无数据
+
+
+
+
+
+ 库区
+
+
+
+ {{ selectedArea ? selectedArea.label : (loadingAreas ? '加载中...' : '请选择') }}
+
+ ▼
+
+
+
+
+ {{ item.label }}
+ ✓
+
+ 暂无数据
+
+
+
+
+
+
+
+
+
+
+ 入库数量
+
+
+
+ 入库数量
+
+ 单位:{{ textValue(material.purchaseUnitName) }}
+
+
+ 折算后库存数量:
+ {{ calculatedStock }}
+ {{ stockUnitLabel(material) }}
+
+
+ {{ inboundQty || 0 }}{{ textValue(material.purchaseUnitName) }} × {{ textValue(material.purchaseUnitConvertQuantity) }}{{ stockUnitLabel(material) }} = {{ calculatedStock }}{{ stockUnitLabel(material) }}
+
+
+
+
+
+
+ 供应商
+
+
+
+
+ {{ defaultSupplierName || '未配置默认供应商' }}
+
+
+
+
+
+
+
+ 取消
+ 确认
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialInbound/materialSelect.vue b/src/pages_function/pages/materialInbound/materialSelect.vue
new file mode 100644
index 0000000..3ce323f
--- /dev/null
+++ b/src/pages_function/pages/materialInbound/materialSelect.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+
+
+
+ ✕
+
+
+
+
+
+
+
+
+
+ 物料编码
+ {{ textValue(item.barCode) }}
+
+
+ 规格
+ {{ textValue(item.standard || item.deviceSpec) }}
+
+
+ 分类
+ {{ textValue(item.categoryName) }}
+
+
+ 单位
+ {{ textValue(item.unitName) }}
+
+
+ 采购单位
+ {{ textValue(item.purchaseUnitName) }}
+
+
+ 换算关系
+ 1{{ textValue(item.purchaseUnitName) }}={{ textValue(item.purchaseUnitConvertQuantity) }}{{ textValue(item.unitName) }}
+
+
+
+
+
+
+
+ 加载中...
+ 暂无物料数据
+
+
+
+
+
+ 确认
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldRepair/userSelect.vue b/src/pages_function/pages/moldRepair/userSelect.vue
index 8909271..1b9251b 100644
--- a/src/pages_function/pages/moldRepair/userSelect.vue
+++ b/src/pages_function/pages/moldRepair/userSelect.vue
@@ -63,7 +63,7 @@ const selectedId = ref('')
const searchText = ref('')
const userList = ref([])
const loading = ref(false)
-const fromSource = ref('moldRepair') // moldRepair | sparepartInbound | sparepartOutbound
+const fromSource = ref('moldRepair') // moldRepair | sparepartInbound | sparepartOutbound | materialInbound
let searchTimer = null
const pageTitle = computed(() => {
@@ -124,7 +124,7 @@ function handleConfirm() {
return
}
// 根据来源使用不同的 globalData key
- const keyMap = { sparepartInbound: '_sparepartInboundUserSelectResult', sparepartOutbound: '_sparepartOutboundUserSelectResult' }
+ const keyMap = { sparepartInbound: '_sparepartInboundUserSelectResult', sparepartOutbound: '_sparepartOutboundUserSelectResult', materialInbound: '_materialInboundUserSelectResult' }
const key = keyMap[fromSource.value] || '_moldRepairUserSelectResult'
getApp().globalData[key] = {
field: field.value === 'confirmBy' ? 'confirmBy' : 'acceptedBy',
diff --git a/src/utils/permissionMenu.js b/src/utils/permissionMenu.js
index 71675ed..72728f2 100644
--- a/src/utils/permissionMenu.js
+++ b/src/utils/permissionMenu.js
@@ -94,6 +94,9 @@ const MENU_ROUTE_MAP = {
sparepartinbound: '/pages_function/pages/sparepartInbound/index',
sparepartIn: '/pages_function/pages/sparepartInbound/index',
'备件入库': '/pages_function/pages/sparepartInbound/index',
+ materialInbound: '/pages_function/pages/materialInbound/index',
+ materialinbound: '/pages_function/pages/materialInbound/index',
+ '物料入库': '/pages_function/pages/materialInbound/index',
sparepartinventory: '/pages_function/pages/sparepartInventory/index',
'备件库存查询': '/pages_function/pages/sparepartInventory/index',
keypart: '/pages_function/pages/keypart/index',