From f88b28ae4a5149c37c965596f1f6e1345428f997 Mon Sep 17 00:00:00 2001
From: zhongwenkai <3478244299@qq.com>
Date: Tue, 23 Jun 2026 15:21:18 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=93=E5=82=A8=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E7=89=A9=E6=96=99=E5=87=BA=E5=BA=93=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/mes/materialOutbound.js | 55 +++
src/locales/zh-CN.js | 21 +
src/pages.json | 28 ++
.../pages/materialInbound/create.vue | 2 +-
.../pages/materialInbound/index.vue | 4 +
.../pages/materialInbound/materialSelect.vue | 13 +-
.../pages/materialOutbound/create.vue | 431 ++++++++++++++++++
.../pages/materialOutbound/detail.vue | 235 ++++++++++
.../pages/materialOutbound/index.vue | 285 ++++++++++++
.../materialOutbound/materialConfirm.vue | 392 ++++++++++++++++
.../pages/moldRepair/userSelect.vue | 9 +-
.../pages/sparepartInbound/index.vue | 4 +
.../pages/sparepartOutbound/create.vue | 2 +
.../pages/sparepartOutbound/index.vue | 1 +
src/utils/permissionMenu.js | 3 +
15 files changed, 1480 insertions(+), 5 deletions(-)
create mode 100644 src/api/mes/materialOutbound.js
create mode 100644 src/pages_function/pages/materialOutbound/create.vue
create mode 100644 src/pages_function/pages/materialOutbound/detail.vue
create mode 100644 src/pages_function/pages/materialOutbound/index.vue
create mode 100644 src/pages_function/pages/materialOutbound/materialConfirm.vue
diff --git a/src/api/mes/materialOutbound.js b/src/api/mes/materialOutbound.js
new file mode 100644
index 0000000..9b22d90
--- /dev/null
+++ b/src/api/mes/materialOutbound.js
@@ -0,0 +1,55 @@
+import request from '@/utils/request'
+
+// 物料出库单创建
+export function createMaterialOutbound(data) {
+ return request({
+ url: '/admin-api/erp/stock-out/create',
+ method: 'post',
+ data: { ...data, outType: '物料出库' }
+ })
+}
+
+// 物料出库单分页查询
+export function getMaterialOutboundPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/stock-out/page',
+ method: 'get',
+ params: { ...params, outType: '物料出库' }
+ })
+}
+
+// 物料出库单详情
+export function getMaterialOutbound(id) {
+ return request({
+ url: '/admin-api/erp/stock-out/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+// 物料出库单提交审核
+export function submitMaterialOutbound(data) {
+ return request({
+ url: '/admin-api/erp/stock-out/submit',
+ method: 'put',
+ data
+ })
+}
+
+// 物料出库单审核(status: 20=通过, 1=驳回)
+export function auditMaterialOutbound(data) {
+ return request({
+ url: '/admin-api/erp/stock-out/audit',
+ method: 'put',
+ data
+ })
+}
+
+// 物料出库单删除
+export function deleteMaterialOutbound(id) {
+ return request({
+ url: '/admin-api/erp/stock-out/delete',
+ method: 'delete',
+ params: { ids: String(id) }
+ })
+}
diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js
index bacfb81..397cbb1 100644
--- a/src/locales/zh-CN.js
+++ b/src/locales/zh-CN.js
@@ -1589,6 +1589,27 @@ export default {
empty: '暂无出库单据',
createTitle: '新增备件出库'
},
+ materialOutbound: {
+ moduleName: '物料出库',
+ tabPending: '待出库',
+ tabAuditing: '待审核',
+ searchPlaceholder: '搜索出库单号',
+ sparepartInfo: '物料信息',
+ materialInfo: '物料信息',
+ outboundTime: '出库时间',
+ creator: '创建人',
+ quantity: '数量',
+ reviewer: '审核人',
+ approve: '已出库',
+ reject: '驳回',
+ confirmApprove: '确定审核通过该出库单吗?',
+ confirmReject: '确定驳回该出库单吗?',
+ approveSuccess: '审核通过',
+ rejectSuccess: '已驳回',
+ deleteSuccess: '删除成功',
+ empty: '暂无出库单据',
+ createTitle: '新增物料出库'
+ },
sparepartInventory: {
moduleName: '备件库存查询',
searchPlaceholder: '请输入备件编码或名称',
diff --git a/src/pages.json b/src/pages.json
index 8cfc4a9..de33a35 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -521,6 +521,34 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "materialOutbound/index",
+ "style": {
+ "navigationBarTitleText": "物料出库",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialOutbound/create",
+ "style": {
+ "navigationBarTitleText": "新增物料出库",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialOutbound/detail",
+ "style": {
+ "navigationBarTitleText": "物料出库详情",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialOutbound/materialConfirm",
+ "style": {
+ "navigationBarTitleText": "确认物料出库",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "sparepartCheck/index",
"style": {
diff --git a/src/pages_function/pages/materialInbound/create.vue b/src/pages_function/pages/materialInbound/create.vue
index 9fc77df..a711380 100644
--- a/src/pages_function/pages/materialInbound/create.vue
+++ b/src/pages_function/pages/materialInbound/create.vue
@@ -234,7 +234,7 @@ function handleCancel() {
function handleSelectMaterial() {
getApp().globalData._materialSelectFrom = 'inbound'
uni.navigateTo({
- url: '/pages_function/pages/materialInbound/materialSelect'
+ url: '/pages_function/pages/materialInbound/materialSelect?from=inbound'
})
}
diff --git a/src/pages_function/pages/materialInbound/index.vue b/src/pages_function/pages/materialInbound/index.vue
index 318b73e..c52fe04 100644
--- a/src/pages_function/pages/materialInbound/index.vue
+++ b/src/pages_function/pages/materialInbound/index.vue
@@ -74,6 +74,10 @@
创建人
{{ textValue(item.creatorName || item.creator) }}
+
+ 经办人
+ {{ textValue(item.stockUserName) }}
+
数量
{{ textValue(item.totalCount) }}
diff --git a/src/pages_function/pages/materialInbound/materialSelect.vue b/src/pages_function/pages/materialInbound/materialSelect.vue
index 3ce323f..283c9d3 100644
--- a/src/pages_function/pages/materialInbound/materialSelect.vue
+++ b/src/pages_function/pages/materialInbound/materialSelect.vue
@@ -69,7 +69,7 @@
+
+
+
diff --git a/src/pages_function/pages/materialOutbound/detail.vue b/src/pages_function/pages/materialOutbound/detail.vue
new file mode 100644
index 0000000..3dbe876
--- /dev/null
+++ b/src/pages_function/pages/materialOutbound/detail.vue
@@ -0,0 +1,235 @@
+
+
+
+
+ 加载中...
+ 暂无详情
+
+
+
+ 出库时间{{ formatDateTime(detail.outTime || detail.createTime) }}
+ 经办人{{ textValue(detail.responserName || detail.stockUserName || detail.creatorName || detail.creator) }}
+ 审核人{{ textValue(detail.auditUserName) }}
+ 总数量{{ textValue(detail.totalCount) }}
+ 备注{{ textValue(detail.remark) }}
+
+
+
+
+ 出库明细
+
+
+
+ {{ textValue(item.productName || item.name) }}
+ 物料编码{{ textValue(item.productBarCode || item.barCode) }}
+ 仓库/库区{{ warehouseAreaText(item) }}
+ 出库数量{{ textValue(item.inputCount || item.count) }}{{ textUnit(item.purchaseUnitName || item.productUnitName) }}
+ 库存数量{{ textValue(item.count) }}{{ textUnit(item.productUnitName) }}
+
+
+ 暂无明细
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialOutbound/index.vue b/src/pages_function/pages/materialOutbound/index.vue
new file mode 100644
index 0000000..7d65417
--- /dev/null
+++ b/src/pages_function/pages/materialOutbound/index.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+ {{ currentStatusLabel }}
+
+
+ {{ item.label }}
+ ✓
+
+
+
+ {{ t('functionCommon.reset') }}
+
+
+
+
+
+
+
+ {{ t('materialOutbound.materialInfo') }}{{ textValue(item.productNames) }}
+ {{ t('materialOutbound.outboundTime') }}{{ formatDateTime(item.outTime || item.createTime) }}
+ {{ t('materialOutbound.creator') }}{{ textValue(item.creatorName || item.creator) }}
+ 经办人{{ textValue(item.stockUserName) }}
+ {{ t('materialOutbound.quantity') }}{{ textValue(item.totalCount) }}
+ {{ t('materialOutbound.reviewer') }}{{ textValue(item.auditUserName) }}
+
+
+ 提交审核
+
+
+ 审核通过
+ 审核驳回
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('materialOutbound.empty') }}
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMoreData') }}
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ *审核人
+
+ {{ selectedAuditor ? selectedAuditor.label : '请选择' }}
+ ▼
+
+
+
+ {{ u.label }}
+ ✓
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialOutbound/materialConfirm.vue b/src/pages_function/pages/materialOutbound/materialConfirm.vue
new file mode 100644
index 0000000..16f982f
--- /dev/null
+++ b/src/pages_function/pages/materialOutbound/materialConfirm.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+ 已选物料
+
+
+
+
+
+ 📦
+
+
+ 物料名称:{{ 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 : '未找到原料仓' }}
+
+
+
+
+ 库区
+
+
+ {{ selectedArea ? selectedArea.label : (loadingAreas ? '加载中...' : '请选择') }}
+ ▼
+
+
+
+
+ {{ item.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
+ 出库数量
+
+
+
+ 出库数量
+
+ 单位:{{ textValue(material.purchaseUnitName) }}
+
+ 请先选择仓库与库区,选择后可查看当前库存
+
+ 出库后当前仓库/库区的剩余库存:
+ {{ remainingStock }}
+ {{ stockUnitLabel(material) }}
+
+ {{ currentStockText }}
+ {{ outboundQty || 0 }}{{ textValue(material.purchaseUnitName) }} × {{ textValue(material.purchaseUnitConvertQuantity) }}{{ stockUnitLabel(material) }} = {{ calculatedStock }}{{ stockUnitLabel(material) }}
+
+ ⚠
+
+ 当前仓库/库区的库存不足,不能出库
+ 当前仓库/库区的库存:{{ stockCount }}{{ stockUnitLabel(material) }}({{ stockPackText }})
+ 本次出库:{{ calculatedStock }}{{ stockUnitLabel(material) }}({{ outboundPackText }})
+
+
+
+
+
+
+ 供应商
+
+
+
+ {{ defaultSupplierName || '未配置默认供应商' }}
+
+
+
+
+
+ 取消
+ 确认
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldRepair/userSelect.vue b/src/pages_function/pages/moldRepair/userSelect.vue
index 1b9251b..c9462ce 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 | materialInbound
+const fromSource = ref('moldRepair') // moldRepair | sparepartInbound | sparepartOutbound | materialInbound | materialOutbound
let searchTimer = null
const pageTitle = computed(() => {
@@ -124,7 +124,12 @@ function handleConfirm() {
return
}
// 根据来源使用不同的 globalData key
- const keyMap = { sparepartInbound: '_sparepartInboundUserSelectResult', sparepartOutbound: '_sparepartOutboundUserSelectResult', materialInbound: '_materialInboundUserSelectResult' }
+ const keyMap = {
+ sparepartInbound: '_sparepartInboundUserSelectResult',
+ sparepartOutbound: '_sparepartOutboundUserSelectResult',
+ materialInbound: '_materialInboundUserSelectResult',
+ materialOutbound: '_materialOutboundUserSelectResult'
+ }
const key = keyMap[fromSource.value] || '_moldRepairUserSelectResult'
getApp().globalData[key] = {
field: field.value === 'confirmBy' ? 'confirmBy' : 'acceptedBy',
diff --git a/src/pages_function/pages/sparepartInbound/index.vue b/src/pages_function/pages/sparepartInbound/index.vue
index d31cc1f..8686314 100644
--- a/src/pages_function/pages/sparepartInbound/index.vue
+++ b/src/pages_function/pages/sparepartInbound/index.vue
@@ -68,6 +68,10 @@
{{ t('sparepartInbound.creator') }}
{{ textValue(item.creatorName || item.creator) }}
+
+ 经办人
+ {{ textValue(item.stockUserName) }}
+
{{ t('sparepartInbound.quantity') }}
{{ textValue(item.totalCount) }}
diff --git a/src/pages_function/pages/sparepartOutbound/create.vue b/src/pages_function/pages/sparepartOutbound/create.vue
index b4f8934..d03849f 100644
--- a/src/pages_function/pages/sparepartOutbound/create.vue
+++ b/src/pages_function/pages/sparepartOutbound/create.vue
@@ -337,6 +337,8 @@ async function handleSubmit() {
const submitData = {
isCode: true,
outTime: outTime,
+ stockUserId: String(selectedOperatorId.value),
+ stockUserName: selectedOperatorName.value || '',
responserId: Number(selectedOperatorId.value),
status: 0,
totalCount: totalCount,
diff --git a/src/pages_function/pages/sparepartOutbound/index.vue b/src/pages_function/pages/sparepartOutbound/index.vue
index 8bc42c4..ba4e9fc 100644
--- a/src/pages_function/pages/sparepartOutbound/index.vue
+++ b/src/pages_function/pages/sparepartOutbound/index.vue
@@ -31,6 +31,7 @@
{{ t('sparepartOutbound.sparepartInfo') }}{{ textValue(item.productNames) }}
{{ t('sparepartOutbound.outboundTime') }}{{ formatDateTime(item.outTime || item.createTime) }}
{{ t('sparepartOutbound.creator') }}{{ textValue(item.creatorName || item.creator) }}
+ 经办人{{ textValue(item.stockUserName) }}
{{ t('sparepartOutbound.quantity') }}{{ textValue(item.totalCount) }}
{{ t('sparepartOutbound.reviewer') }}{{ textValue(item.auditUserName) }}
diff --git a/src/utils/permissionMenu.js b/src/utils/permissionMenu.js
index 43c36d7..b348124 100644
--- a/src/utils/permissionMenu.js
+++ b/src/utils/permissionMenu.js
@@ -104,6 +104,9 @@ const MENU_ROUTE_MAP = {
materialInbound: '/pages_function/pages/materialInbound/index',
materialinbound: '/pages_function/pages/materialInbound/index',
'物料入库': '/pages_function/pages/materialInbound/index',
+ materialOutbound: '/pages_function/pages/materialOutbound/index',
+ materialoutbound: '/pages_function/pages/materialOutbound/index',
+ '物料出库': '/pages_function/pages/materialOutbound/index',
sparepartinventory: '/pages_function/pages/sparepartInventory/index',
'备件库存查询': '/pages_function/pages/sparepartInventory/index',
keypart: '/pages_function/pages/keypart/index',