From 7c55b009e689ab7718db989cc7e507ac468b12cc Mon Sep 17 00:00:00 2001
From: zhongwenkai <3478244299@qq.com>
Date: Wed, 24 Jun 2026 10:10:36 +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=E7=9B=98=E7=82=B9=E6=89=A7=E8=A1=8C=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/mes/materialCheck.js | 82 ++
src/pages.json | 58 ++
.../pages/materialCheck/areaSelect.vue | 190 ++++
.../pages/materialCheck/create.vue | 407 ++++++++
.../pages/materialCheck/execute.vue | 392 ++++++++
.../pages/materialCheck/index.vue | 872 ++++++++++++++++++
.../pages/materialCheck/itemSelect.vue | 269 ++++++
.../materialCheck/itemSelectByProduct.vue | 225 +++++
.../pages/materialCheck/productSelect.vue | 228 +++++
.../pages/sparepartCheck/areaSelect.vue | 190 ++++
.../pages/sparepartCheck/create.vue | 104 +--
.../pages/sparepartCheck/itemSelect.vue | 48 +-
.../sparepartCheck/itemSelectByProduct.vue | 41 +-
src/utils/permissionMenu.js | 4 +
14 files changed, 3032 insertions(+), 78 deletions(-)
create mode 100644 src/api/mes/materialCheck.js
create mode 100644 src/pages_function/pages/materialCheck/areaSelect.vue
create mode 100644 src/pages_function/pages/materialCheck/create.vue
create mode 100644 src/pages_function/pages/materialCheck/execute.vue
create mode 100644 src/pages_function/pages/materialCheck/index.vue
create mode 100644 src/pages_function/pages/materialCheck/itemSelect.vue
create mode 100644 src/pages_function/pages/materialCheck/itemSelectByProduct.vue
create mode 100644 src/pages_function/pages/materialCheck/productSelect.vue
create mode 100644 src/pages_function/pages/sparepartCheck/areaSelect.vue
diff --git a/src/api/mes/materialCheck.js b/src/api/mes/materialCheck.js
new file mode 100644
index 0000000..e31d942
--- /dev/null
+++ b/src/api/mes/materialCheck.js
@@ -0,0 +1,82 @@
+import request from '@/utils/request'
+
+// 创建盘点单
+export function createMaterialCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/create',
+ method: 'post',
+ data
+ })
+}
+
+// 生成盘点项(按仓库/库区)
+export function generateCheckItemsByLocation(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/generate-items/by-location',
+ method: 'post',
+ data
+ })
+}
+
+// 生成盘点项(按产品)
+export function generateCheckItemsByProduct(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/generate-items/by-product',
+ method: 'post',
+ data
+ })
+}
+
+// 物料盘点单分页查询
+export function getMaterialCheckPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/stock-check/page',
+ method: 'get',
+ params
+ })
+}
+
+// 物料盘点单详情
+export function getMaterialCheckDetail(id) {
+ return request({
+ url: '/admin-api/erp/stock-check/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+// 物料盘点执行(提交盘点结果)
+export function executeMaterialCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/update',
+ method: 'put',
+ data
+ })
+}
+
+// 物料盘点单提交
+export function submitMaterialCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/submit',
+ method: 'put',
+ data
+ })
+}
+
+// 物料盘点单审核(status: 20=通过, 1=驳回)
+export function auditMaterialCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/audit',
+ method: 'put',
+ data
+ })
+}
+
+// 物料盘点单删除
+export function deleteMaterialCheck(id) {
+ return request({
+ url: '/admin-api/erp/stock-check/delete',
+ method: 'delete',
+ params: { ids: String(id) }
+ })
+}
diff --git a/src/pages.json b/src/pages.json
index 0a15a39..47d8442 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -647,6 +647,64 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "sparepartCheck/areaSelect",
+ "style": {
+ "navigationBarTitleText": "选择库区",
+ "navigationStyle": "custom"
+ }
+ },
+
+
+ {
+ "path": "materialCheck/index",
+ "style": {
+ "navigationBarTitleText": "物料盘点",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/execute",
+ "style": {
+ "navigationBarTitleText": "执行盘点",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/create",
+ "style": {
+ "navigationBarTitleText": "新增盘点单",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/itemSelect",
+ "style": {
+ "navigationBarTitleText": "选择盘点项",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/itemSelectByProduct",
+ "style": {
+ "navigationBarTitleText": "选择盘点项",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/productSelect",
+ "style": {
+ "navigationBarTitleText": "选择产品",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "materialCheck/areaSelect",
+ "style": {
+ "navigationBarTitleText": "选择库区",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "keypart/index",
diff --git a/src/pages_function/pages/materialCheck/areaSelect.vue b/src/pages_function/pages/materialCheck/areaSelect.vue
new file mode 100644
index 0000000..f7b8541
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/areaSelect.vue
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ isAllSelected ? '✓' : '' }}
+ 全选
+
+ 已选 {{ selectedItems.length }} 项
+
+
+
+
+
+ {{ isSelected(item) ? '✓' : '' }}
+
+
+
+ 库区编码
+ {{ textValue(item.areaCode) }}
+
+
+ 库区名称
+ {{ textValue(item.areaName) }}
+
+
+
+
+ 加载中...
+ 暂无数据
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/create.vue b/src/pages_function/pages/materialCheck/create.vue
new file mode 100644
index 0000000..3da4ee4
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/create.vue
@@ -0,0 +1,407 @@
+
+
+
+
+
+
+ *盘点时间
+
+
+
+
+
+
+
+ *生成来源
+
+
+
+ 按库存
+
+
+ 按产品
+
+
+
+
+
+
+
+ 仓库/库区/盘点项
+
+
+
+
+ 仓库
+
+
+ 原料仓
+
+
+
+
+ 库区
+
+
+
+ {{ selectedAreas.length ? selectedAreas.map(a => a.label).join('、') : '请选择' }}
+
+ ▶
+
+
+
+
+ 盘点项
+
+ {{ items.length ? `已选${items.length}项` : '点击选择' }}
+ ▼
+
+
+
+
+
+
+
+
+
+
+ *产品/盘点项
+
+
+
+
+ 产品
+
+
+
+ {{ selectedProducts.length ? selectedProducts.map(p => p.name).join('、') : '请选择' }}
+
+ ▼
+
+
+
+
+ 盘点项
+
+
+ {{ items.length ? `已选择 ${items.length} 项` : '请选择' }}
+ ▼
+
+
+
+
+
+
+
+
+
+
+ 已选盘点项({{ items.length }})
+
+
+
+
+
+
+ 仓库
+ {{ textValue(item.warehouseName) }}
+
+
+ 库区
+ {{ textValue(item.areaName) }}
+
+
+ 账面数量
+ {{ textValue(item.stockCount) }}
+
+
+
+ 删除
+
+
+
+
+
+
+ 备注
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/execute.vue b/src/pages_function/pages/materialCheck/execute.vue
new file mode 100644
index 0000000..ce66958
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/execute.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+ 规格型号
+ {{ textValue(item.standard || item.productStandard || item.deviceSpec) }}
+
+
+
+
+
+ 账面库存
+ {{ formatNumber(item.stockCount) }} {{ textValue(item.productUnitName || item.unitName || '个') }}
+
+
+ 最小单位
+ {{ textValue(item.productUnitName || item.unitName || '个') }}
+
+
+ 换算关系
+ {{ getConvertText(item) }}
+
+
+
+
+ 实盘数量
+
+ -
+
+ +
+
+
+
+
+ 差异
+ {{ getDiffText(item) }}
+
+
+
+
+
+
+ 暂无盘点数据
+
+
+ 提交盘点结果
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/index.vue b/src/pages_function/pages/materialCheck/index.vue
new file mode 100644
index 0000000..68672d9
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/index.vue
@@ -0,0 +1,872 @@
+
+
+
+
+
+
+
+
+
+
+ {{ currentStatusLabel }}
+
+
+
+ 重置
+
+
+
+
+
+
+
+
+ 产品物料名称
+ {{ textValue(item.productNames) }}
+
+
+ 仓库
+ {{ textValue(item.warehouseName || getItemsWarehouseName(item.items)) }}
+
+
+ 盘点时间
+ {{ formatDateTime(item.checkTime) }}
+
+
+ 创建人
+ {{ textValue(item.creatorName || item.creator) }}
+
+
+ 创建时间
+ {{ formatDateTime(item.createTime) }}
+
+
+ 审核人
+ {{ textValue(item.auditUserName) }}
+
+
+ 备注
+ {{ textValue(item.remark) }}
+
+
+
+ 通过
+ 驳回
+ 提交
+ 盘点
+ 删除
+
+
+
+ 加载中...
+ 暂无盘点数据
+ 加载更多...
+ 没有更多了
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ *审核人
+
+ {{ selectedSubmitAuditor ? selectedSubmitAuditor.label : '请选择' }}
+ ▼
+
+
+
+ {{ u.label }}
+ ✓
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/itemSelect.vue b/src/pages_function/pages/materialCheck/itemSelect.vue
new file mode 100644
index 0000000..792cbc7
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/itemSelect.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ isAllSelected ? '✓' : '' }}
+ 全选
+
+ 已选 {{ selectedItems.length }} 项
+
+
+
+
+
+ {{ isSelected(item) ? '✓' : '' }}
+
+
+
+ 仓库
+ {{ textValue(item.warehouseName) }}
+
+
+ 库区
+ {{ textValue(item.areaName) }}
+
+
+ 编码
+ {{ textValue(item.productBarCode) }}
+
+
+ 名称
+ {{ textValue(item.productName) }}
+
+
+ 库存数量
+ {{ textValue(item.stockCount) }}
+
+
+
+
+ 加载中...
+ 暂无数据
+ 没有更多了
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/itemSelectByProduct.vue b/src/pages_function/pages/materialCheck/itemSelectByProduct.vue
new file mode 100644
index 0000000..7ed08c3
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/itemSelectByProduct.vue
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ isAllSelected ? '✓' : '' }}
+ 全选
+
+ 已选 {{ selectedItems.length }} 项
+
+
+
+
+
+ {{ isSelected(item) ? '✓' : '' }}
+
+
+
+ 仓库
+ {{ textValue(item.warehouseName) }}
+
+
+ 库区
+ {{ textValue(item.areaName) }}
+
+
+ 编码
+ {{ textValue(item.productBarCode) }}
+
+
+ 名称
+ {{ textValue(item.productName) }}
+
+
+ 库存数量
+ {{ textValue(item.stockCount) }}
+
+
+
+
+ 加载中...
+ 暂无数据
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/materialCheck/productSelect.vue b/src/pages_function/pages/materialCheck/productSelect.vue
new file mode 100644
index 0000000..e027c0f
--- /dev/null
+++ b/src/pages_function/pages/materialCheck/productSelect.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ isAllSelected ? '✓' : '' }}
+ 全选
+
+ 已选 {{ selectedItems.length }} 项
+
+
+
+
+
+ {{ isSelected(item) ? '✓' : '' }}
+
+
+
+ 编码
+ {{ textValue(item.barCode || item.productBarCode) }}
+
+
+ 名称
+ {{ textValue(item.name || item.productName) }}
+
+
+ 单位
+ {{ textValue(item.unitName || item.productUnitName) }}
+
+
+ 规格型号
+ {{ textValue(item.standard || item.productStandard) }}
+
+
+
+
+ 加载中...
+ 暂无数据
+ 没有更多了
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/sparepartCheck/areaSelect.vue b/src/pages_function/pages/sparepartCheck/areaSelect.vue
new file mode 100644
index 0000000..f8fd189
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/areaSelect.vue
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ isAllSelected ? '✓' : '' }}
+ 全选
+
+ 已选 {{ selectedItems.length }} 项
+
+
+
+
+
+ {{ isSelected(item) ? '✓' : '' }}
+
+
+
+ 库区编码
+ {{ textValue(item.areaCode) }}
+
+
+ 库区名称
+ {{ textValue(item.areaName) }}
+
+
+
+
+ 加载中...
+ 暂无数据
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/sparepartCheck/create.vue b/src/pages_function/pages/sparepartCheck/create.vue
index 473bfbb..7babccd 100644
--- a/src/pages_function/pages/sparepartCheck/create.vue
+++ b/src/pages_function/pages/sparepartCheck/create.vue
@@ -51,24 +51,17 @@
库区
-
-
- {{ selectedArea ? selectedArea.label : (loadingAreas ? '加载中...' : '请选择') }}
- ▼
-
-
-
-
- {{ a.label }}
- ✓
-
- 暂无数据
-
+
+
+
+ {{ selectedAreas.length ? selectedAreas.map(a => a.label).join('、') : '请选择' }}
+
+ ▶
-
+
盘点项
{{ items.length ? `已选${items.length}项` : '点击选择' }}
@@ -165,10 +158,10 @@