From 099e3ae3865163da089f0e4990f462b19e09c7a3 Mon Sep 17 00:00:00 2001
From: zhongwenkai <3478244299@qq.com>
Date: Mon, 22 Jun 2026 17:51:53 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E5=A4=87=E4=BB=B6=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/moldget.js | 14 +-
src/api/mes/sparepartCheck.js | 82 ++
src/pages.json | 42 +
.../pages/sparepartCheck/create.vue | 497 ++++++++++
.../pages/sparepartCheck/execute.vue | 414 ++++++++
.../pages/sparepartCheck/index.vue | 917 ++++++++++++++++++
.../pages/sparepartCheck/itemSelect.vue | 347 +++++++
.../sparepartCheck/itemSelectByProduct.vue | 307 ++++++
.../pages/sparepartCheck/productSelect.vue | 340 +++++++
src/utils/permissionMenu.js | 3 +
10 files changed, 2961 insertions(+), 2 deletions(-)
create mode 100644 src/api/mes/sparepartCheck.js
create mode 100644 src/pages_function/pages/sparepartCheck/create.vue
create mode 100644 src/pages_function/pages/sparepartCheck/execute.vue
create mode 100644 src/pages_function/pages/sparepartCheck/index.vue
create mode 100644 src/pages_function/pages/sparepartCheck/itemSelect.vue
create mode 100644 src/pages_function/pages/sparepartCheck/itemSelectByProduct.vue
create mode 100644 src/pages_function/pages/sparepartCheck/productSelect.vue
diff --git a/src/api/mes/moldget.js b/src/api/mes/moldget.js
index c1d333a..dbeb3b2 100644
--- a/src/api/mes/moldget.js
+++ b/src/api/mes/moldget.js
@@ -48,10 +48,20 @@ export function deleteMoldGet(ids = []) {
})
}
-export function getWarehouseSimpleList() {
+export function getWarehouseSimpleList(params = {}) {
return request({
url: '/admin-api/erp/warehouse/simple-list',
- method: 'get'
+ method: 'get',
+ params
+ })
+}
+
+// 仓库分页列表(支持 categoryType 过滤)
+export function getWarehousePage(params = {}) {
+ return request({
+ url: '/admin-api/erp/warehouse/page',
+ method: 'get',
+ params
})
}
diff --git a/src/api/mes/sparepartCheck.js b/src/api/mes/sparepartCheck.js
new file mode 100644
index 0000000..dfae2c1
--- /dev/null
+++ b/src/api/mes/sparepartCheck.js
@@ -0,0 +1,82 @@
+import request from '@/utils/request'
+
+// 创建盘点单
+export function createCheck(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 getSparepartCheckPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/stock-check/page',
+ method: 'get',
+ params
+ })
+}
+
+// 备件盘点单详情
+export function getSparepartCheckDetail(id) {
+ return request({
+ url: '/admin-api/erp/stock-check/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+// 备件盘点执行(提交盘点结果)
+export function executeSparepartCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/update',
+ method: 'put',
+ data
+ })
+}
+
+// 备件盘点单提交
+export function submitSparepartCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/submit',
+ method: 'put',
+ data
+ })
+}
+
+// 备件盘点单审核(status: 20=通过, 1=驳回)
+export function auditSparepartCheck(data) {
+ return request({
+ url: '/admin-api/erp/stock-check/audit',
+ method: 'put',
+ data
+ })
+}
+
+// 备件盘点单删除
+export function deleteSparepartCheck(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 2747e7c..535038b 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -458,6 +458,48 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "sparepartCheck/index",
+ "style": {
+ "navigationBarTitleText": "备件盘点",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "sparepartCheck/execute",
+ "style": {
+ "navigationBarTitleText": "执行盘点",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "sparepartCheck/create",
+ "style": {
+ "navigationBarTitleText": "新增盘点单",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "sparepartCheck/itemSelect",
+ "style": {
+ "navigationBarTitleText": "选择盘点项",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "sparepartCheck/itemSelectByProduct",
+ "style": {
+ "navigationBarTitleText": "选择盘点项",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "sparepartCheck/productSelect",
+ "style": {
+ "navigationBarTitleText": "选择产品",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "keypart/index",
diff --git a/src/pages_function/pages/sparepartCheck/create.vue b/src/pages_function/pages/sparepartCheck/create.vue
new file mode 100644
index 0000000..4bfc3d0
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/create.vue
@@ -0,0 +1,497 @@
+
+
+
+
+
+
+
+ *盘点时间
+
+
+ {{ checkTime || '请选择盘点时间' }}
+ ▼
+
+
+
+
+
+ *生成来源
+
+
+
+ 按库存
+
+
+ 按产品
+
+
+
+
+
+
+ 分类
+
+
+ 备件
+
+
+
+
+
+
+ 仓库/库区/盘点项
+
+
+
+
+
+ 仓库
+
+
+ {{ selectedWarehouse ? selectedWarehouse.label : '请选择' }}
+ ▼
+
+
+
+
+ {{ w.label }}
+ ✓
+
+ 暂无数据
+
+
+
+
+
+
+ 库区
+
+
+ {{ selectedArea ? selectedArea.label : (loadingAreas ? '加载中...' : '请选择') }}
+ ▼
+
+
+
+
+ {{ a.label }}
+ ✓
+
+ 暂无数据
+
+
+
+
+
+
+ 盘点项
+
+ {{ 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/sparepartCheck/execute.vue b/src/pages_function/pages/sparepartCheck/execute.vue
new file mode 100644
index 0000000..71e512c
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/execute.vue
@@ -0,0 +1,414 @@
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
+
+
+ 规格型号
+ {{ 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/sparepartCheck/index.vue b/src/pages_function/pages/sparepartCheck/index.vue
new file mode 100644
index 0000000..35b04e6
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/index.vue
@@ -0,0 +1,917 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ 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/sparepartCheck/itemSelect.vue b/src/pages_function/pages/sparepartCheck/itemSelect.vue
new file mode 100644
index 0000000..1d47d8a
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/itemSelect.vue
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+ {{ 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/sparepartCheck/itemSelectByProduct.vue b/src/pages_function/pages/sparepartCheck/itemSelectByProduct.vue
new file mode 100644
index 0000000..ffe2cc5
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/itemSelectByProduct.vue
@@ -0,0 +1,307 @@
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+ {{ 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/sparepartCheck/productSelect.vue b/src/pages_function/pages/sparepartCheck/productSelect.vue
new file mode 100644
index 0000000..bb58963
--- /dev/null
+++ b/src/pages_function/pages/sparepartCheck/productSelect.vue
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+ {{ 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/utils/permissionMenu.js b/src/utils/permissionMenu.js
index 72728f2..6d3890e 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',
+ sparepartCheck: '/pages_function/pages/sparepartCheck/index',
+ sparepartcheck: '/pages_function/pages/sparepartCheck/index',
+ '备件盘点': '/pages_function/pages/sparepartCheck/index',
materialInbound: '/pages_function/pages/materialInbound/index',
materialinbound: '/pages_function/pages/materialInbound/index',
'物料入库': '/pages_function/pages/materialInbound/index',