diff --git a/src/api/mes/mold.js b/src/api/mes/mold.js
index 3d6546c..8459cac 100644
--- a/src/api/mes/mold.js
+++ b/src/api/mes/mold.js
@@ -1,3 +1,4 @@
+import upload from '@/utils/upload'
import request from '@/utils/request'
export function getMoldDetail(id) {
@@ -32,3 +33,90 @@ export function getMoldRepairListByMoldId(moldId, params = {}) {
})
}
+export function getMoldBrandPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/mold-brand/page',
+ method: 'get',
+ params
+ })
+}
+
+export function getMoldBrandDetail(id) {
+ return request({
+ url: '/admin-api/erp/mold-brand/get',
+ method: 'get',
+ params: { id }
+ })
+}
+
+export function getMoldBrandTree() {
+ return request({
+ url: '/admin-api/erp/mold-brand/tree',
+ method: 'get'
+ })
+}
+
+export function getMoldPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/mold-brand/mold/page',
+ method: 'get',
+ params
+ })
+}
+
+export function createMoldBrand(data) {
+ return request({
+ url: '/admin-api/erp/mold-brand/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateMoldBrand(data) {
+ return request({
+ url: '/admin-api/erp/mold-brand/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteMoldBrand(id) {
+ return request({
+ url: '/admin-api/erp/mold-brand/delete',
+ method: 'delete',
+ params: { id }
+ })
+}
+
+export function createMold(data) {
+ return request({
+ url: '/admin-api/erp/mold-brand/mold/create',
+ method: 'post',
+ data
+ })
+}
+
+export function updateMold(data) {
+ return request({
+ url: '/admin-api/erp/mold-brand/mold/update',
+ method: 'put',
+ data
+ })
+}
+
+export function deleteMold(id) {
+ return request({
+ url: '/admin-api/erp/mold-brand/mold/delete',
+ method: 'delete',
+ params: { id }
+ })
+}
+
+export function uploadMoldImage(filePath, name = 'file') {
+ return upload({
+ url: '/admin-api/infra/file/upload',
+ name,
+ filePath,
+ showLoading: false
+ })
+}
diff --git a/src/api/mes/product.js b/src/api/mes/product.js
index b12af00..9872fb1 100644
--- a/src/api/mes/product.js
+++ b/src/api/mes/product.js
@@ -9,6 +9,13 @@ export function getUnitList() {
method: 'get'
})
}
+
+export function getProductUnitSimpleList() {
+ return request({
+ url: '/admin-api/erp/product-unit/simple-list',
+ method: 'get'
+ })
+}
// 原料列表
export function getItemList() {
return request({
diff --git a/src/pages.json b/src/pages.json
index a51084a..4b400e1 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -420,6 +420,34 @@
"navigationBarTitleText": "设备关键件",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "moldType/index",
+ "style": {
+ "navigationBarTitleText": "模具类型",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "moldType/detail",
+ "style": {
+ "navigationBarTitleText": "模具类型详情",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "moldLedger/index",
+ "style": {
+ "navigationBarTitleText": "模具台账",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "moldLedger/detail",
+ "style": {
+ "navigationBarTitleText": "模具台账详情",
+ "navigationStyle": "custom"
+ }
}
]
}
diff --git a/src/pages/work.vue b/src/pages/work.vue
index 8c73f10..a1b3ed7 100644
--- a/src/pages/work.vue
+++ b/src/pages/work.vue
@@ -371,8 +371,8 @@ function handleClick(name) {
'设备分类': '/pages_function/pages/equipmentCategory/index',
'设备台账': '/pages_function/pages/equipmentLedger/index',
'设备关键件': '/pages_function/pages/equipmentKeypart/index',
- '模具类型': '',
- '模具台账': '',
+ '模具类型': '/pages_function/pages/moldType/index',
+ '模具台账': '/pages_function/pages/moldLedger/index',
'模具出库': '',
'模具入库': '',
'上下模': '',
diff --git a/src/pages_function/pages/moldLedger/detail.vue b/src/pages_function/pages/moldLedger/detail.vue
new file mode 100644
index 0000000..0752e63
--- /dev/null
+++ b/src/pages_function/pages/moldLedger/detail.vue
@@ -0,0 +1,697 @@
+
+
+
+
+
+
+ 基本信息
+
+
+ 模具名称
+ {{ getDetailField('name') }}
+
+
+ 模具编号
+ {{ getDetailField('code') }}
+
+
+ 模具状态
+
+
+
+ 模具型号
+ {{ getDetailField('brandName') }}
+
+
+ 模具规格
+ {{ getDetailField('moldType') }}
+
+
+ 工序
+ {{ getDetailField('orgType') }}
+
+
+ 模穴数
+ {{ getDetailField('moldSize') }}
+
+
+ 使用次数/次
+ {{ getDetailField('useTime') }}
+
+
+ 使用设备
+ {{ machineLabel }}
+
+
+ 入库日期
+ {{ inTimeLabel }}
+
+
+ 是否启用
+ {{ enableLabel }}
+
+
+ 备注
+ {{ getDetailField('remark') }}
+
+
+
+
+
+ 履历
+
+
+
+
+
+ 暂无点检数据
+
+
+ [{{ group.time }}]
+ 操作人: {{ group.operator }}
+
+
+
+ {{ item.resultLabel }}
+ {{ item.name }}
+
+
+
+ 点检方式
+ {{ detailValue(item.method) }}
+
+
+ 判定标准
+ {{ detailValue(item.criteria) }}
+
+
+ 点检时间
+ {{ detailValue(item.taskTimeLabel) }}
+
+
+ 创建时间
+ {{ detailValue(item.createTimeLabel) }}
+
+
+ 备注
+ {{ detailValue(item.remark) }}
+
+
+
+
+
+
+
+
+
+
+ 暂无保养数据
+
+
+ [{{ group.time }}]
+ 操作人: {{ group.operator }}
+
+
+
+ {{ item.resultLabel }}
+ {{ item.name }}
+
+
+
+ 保养方式
+ {{ detailValue(item.method) }}
+
+
+ 判定标准
+ {{ detailValue(item.criteria) }}
+
+
+ 保养时间
+ {{ detailValue(item.taskTimeLabel) }}
+
+
+ 创建时间
+ {{ detailValue(item.createTimeLabel) }}
+
+
+ 备注
+ {{ detailValue(item.remark) }}
+
+
+
+
+
+
+
+
+
+
+ 暂无维修数据
+
+
+ {{ group.name }}
+ 共{{ group.items.length }}条
+
+
+
+ {{ detailValue(row.subjectCode) }}
+ {{ detailValue(row.subjectName) }}
+
+
+
+ 项目内容
+ {{ detailValue(row.subjectContent) }}
+
+
+ 维修结果
+
+ {{ row.resultLabel }}
+
+
+
+ 备注
+ {{ detailValue(row.remark) }}
+
+
+ 完成日期
+ {{ detailValue(row.finishDateLabel) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldLedger/index.vue b/src/pages_function/pages/moldLedger/index.vue
new file mode 100644
index 0000000..4b76134
--- /dev/null
+++ b/src/pages_function/pages/moldLedger/index.vue
@@ -0,0 +1,1385 @@
+
+
+
+
+
+
+
+ 型号
+
+ {{ selectedBrandLabel || '全部型号' }}
+
+ ›
+
+
+ 状态
+
+ {{ selectedStatusLabel || '全部状态' }}
+
+ ›
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+ 模具型号
+ {{ textValue(item.brandName) }}
+
+
+ 使用设备
+ {{ textValue(item.machineName || item.machineId) }}
+
+
+ 使用次数
+ {{ textValue(item.useTime) }}
+
+
+ 创建时间
+ {{ formatDateTime(item.createTime) }}
+
+
+
+
+ 加载中...
+ 暂无模具台账数据
+ 正在加载更多...
+ 没有更多数据了
+
+
+
+
+ ↑
+
+
+
+ +
+
+
+
+
+
+
+
+ {{ option.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
+ {{ option.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ option.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
+ {{ option.label }}
+ ✓
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldType/detail.vue b/src/pages_function/pages/moldType/detail.vue
new file mode 100644
index 0000000..dcfdf88
--- /dev/null
+++ b/src/pages_function/pages/moldType/detail.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+ 基础信息
+
+
+ 型号编码
+ {{ fieldValue('code') }}
+
+
+ 型号名称
+ {{ fieldValue('name') }}
+
+
+ 规格
+ {{ fieldValue('moldType') }}
+
+
+ 工序
+ {{ orgTypeText }}
+
+
+ 预期寿命(小时)
+ {{ fieldValue('useTime') }}
+
+
+ 模穴数
+ {{ fieldValue('moldSize') }}
+
+
+ 维保模式
+ {{ fieldValue('maintainType') }}
+
+
+ 维保周期
+ {{ fieldValue('maintainTime') }}
+
+
+ 产品ID
+ {{ fieldValue('productId') }}
+
+
+ 是否启用
+ {{ enableText }}
+
+
+ 创建时间
+ {{ formatDateTime(detailData?.createTime) }}
+
+
+ 更新时间
+ {{ formatDateTime(detailData?.updateTime) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/moldType/index.vue b/src/pages_function/pages/moldType/index.vue
new file mode 100644
index 0000000..488b5be
--- /dev/null
+++ b/src/pages_function/pages/moldType/index.vue
@@ -0,0 +1,756 @@
+
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+ 规格
+ {{ textValue(item.moldType) }}
+
+
+ 工序
+ {{ orgTypeLabel(item.orgType) }}
+
+
+ 预期寿命
+ {{ textValue(item.useTime) }}
+
+
+ 模穴数
+ {{ textValue(item.moldSize) }}
+
+
+ 创建时间
+ {{ formatDateTime(item.createTime) }}
+
+
+
+
+ 加载中...
+ 暂无模具类型数据
+ 正在加载更多...
+ 没有更多数据了
+
+
+
+
+ +
+
+
+
+ ↑
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages_function/pages/spare/index.vue b/src/pages_function/pages/spare/index.vue
index a80266e..12d679f 100644
--- a/src/pages_function/pages/spare/index.vue
+++ b/src/pages_function/pages/spare/index.vue
@@ -57,7 +57,7 @@ import AppTitleHeader from '@/components/common/AppTitleHeader.vue'
const spareCode = ref('');
const isScanning = ref(false);
-const SCAN_TYPE = 'SPARE';
+const SCAN_TYPE = 'PRODUCTMATERIAL';
const MODULE_NAME = '备件';
function parseScanResult(res) {