From a24e369ebb38769f9ce5dd085ffa84345cf65089 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Sat, 6 Jun 2026 14:57:23 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E6=89=AB=E7=A0=81?=
=?UTF-8?q?=E4=B8=8E=E5=B7=A1=E6=A3=80=E6=A8=A1=E5=9D=97=EF=BC=8C=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E9=A1=B5=E9=9D=A2=E8=B7=AF=E7=94=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 新增钢卷详情、扫码页面与设备巡检组件
2. 调整首页跳转逻辑至扫码页面,更新tabBar配置
3. 隐藏旧的分条、其他操作模块,替换钢卷详情弹窗为页面跳转
4. 复用巡检组件到扫码页面与设备巡检页
---
.../components/scan-coil/scan-coil.vue | 1191 +++++++++++++++++
.../components/scan-inspect/scan-inspect.vue | 886 ++++++++++++
apps/hand-factory/pages.json | 32 +-
apps/hand-factory/pages/coil-detail/index.vue | 1172 ++++++++++++++++
apps/hand-factory/pages/easycode/easycode.vue | 12 +-
apps/hand-factory/pages/eqp/eqp.vue | 885 +-----------
apps/hand-factory/pages/index.vue | 132 +-
apps/hand-factory/pages/mine/index.vue | 4 +-
apps/hand-factory/pages/scan/scan.vue | 105 ++
apps/hand-factory/pages/search/search.vue | 89 +-
10 files changed, 3407 insertions(+), 1101 deletions(-)
create mode 100644 apps/hand-factory/components/scan-coil/scan-coil.vue
create mode 100644 apps/hand-factory/components/scan-inspect/scan-inspect.vue
create mode 100644 apps/hand-factory/pages/coil-detail/index.vue
create mode 100644 apps/hand-factory/pages/scan/scan.vue
diff --git a/apps/hand-factory/components/scan-coil/scan-coil.vue b/apps/hand-factory/components/scan-coil/scan-coil.vue
new file mode 100644
index 0000000..5a36f2f
--- /dev/null
+++ b/apps/hand-factory/components/scan-coil/scan-coil.vue
@@ -0,0 +1,1191 @@
+
+
+
+
+ {{ item.label }}
+ {{ item.description }}
+
+ ›
+
+
+
+
+
+
+
+ 原钢卷信息
+
+ ⚙
+ 参数
+
+
+
+
+
+ 入场钢卷号
+ {{ coilDetail.enterCoilNo || '-' }}
+
+
+ 当前钢卷号
+ {{ coilDetail.currentCoilNo || '-' }}
+
+
+ 当前库区
+ {{ coilDetail.actualWarehouseName || '-' }}
+
+
+
+
+
+
+
+ 目标库区
+
+
+
+
+ 📷
+
+ 扫描库区码
+ 请扫描目标库区的二维码
+
+
+
+
+
+ 已选中:
+ {{ targetWarehouse.actualWarehouseName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 入场钢卷号
+ {{ coilDetail.enterCoilNo || '-' }}
+
+
+ 当前钢卷号
+ {{ coilDetail.currentCoilNo || '-' }}
+
+
+ 逻辑库区
+ {{ coilDetail.warehouseName || '-' }}
+
+
+ 实际库区
+ {{ coilDetail.actualWarehouseName || '-' }}
+
+
+ 重量
+ {{ coilDetail.netWeight || '-' }}
+
+
+ 厂家
+ {{ (coilDetail.manufacturer) || '-' }}
+
+
+ 材质
+ {{ (coilDetail.material) || '-' }}
+
+
+ 规格
+ {{ (coilDetail.specification) || '-' }}
+
+
+ 品名
+ {{ (coilDetail.itemName) || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/hand-factory/components/scan-inspect/scan-inspect.vue b/apps/hand-factory/components/scan-inspect/scan-inspect.vue
new file mode 100644
index 0000000..e40fdf1
--- /dev/null
+++ b/apps/hand-factory/components/scan-inspect/scan-inspect.vue
@@ -0,0 +1,886 @@
+
+
+
+
+
+ 📷
+ {{ partInfo ? '重新扫码' : '点击扫码' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 检验部位
+ {{ partInfo.inspectPart || '-' }}
+
+
+ 产线
+ {{ partInfo.productionLine || '-' }}
+
+
+ 线别
+ {{ partInfo.lineSection || '-' }}
+
+
+ 备注
+ {{ partInfo.remark || '-' }}
+
+
+
+
+ 巡检人
+ {{ inspector }}
+
+
+ 巡检时间
+ {{ inspectTime }}
+
+
+
+
+
+
+ 班次
+
+
+
+ 白班
+
+
+
+ 夜班
+
+
+
+
+
+
+
+ 待检项({{ checklist.length }})
+
+
+
+ 该部位暂无待检项
+
+
+
+
+ {{ item.checkName || item.checkContent || '检验项' }}
+ {{ item.checkContent }}
+ 标准:{{ item.standard }}
+
+
+
+
+
+
+
+
+
+ ✕
+
+
+ 📷
+ 拍照/选图
+
+
+
+
+
+
+
+ ✓
+ 正常
+
+ {{ getResultTime(item.checkId) }}
+
+
+
+
+
+ ✕
+ 故障
+
+ {{ getResultTime(item.checkId) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 异常描述:
+ {{ abnormalDescMap[item.checkId] || '未填写' }}
+
+
+
+
+
+
+
+ 🔍
+ 请扫描设备部位二维码开始巡检
+
+
+
+
+
+
+
diff --git a/apps/hand-factory/pages.json b/apps/hand-factory/pages.json
index e156832..4179e8d 100644
--- a/apps/hand-factory/pages.json
+++ b/apps/hand-factory/pages.json
@@ -125,6 +125,18 @@
"style": {
"navigationBarTitleText": "缺陷维护"
}
+ },
+ {
+ "path": "pages/coil-detail/index",
+ "style": {
+ "navigationBarTitleText": "钢卷详情"
+ }
+ },
+ {
+ "path": "pages/scan/scan",
+ "style": {
+ "navigationBarTitleText": "扫码"
+ }
}
],
"globalStyle": {
@@ -135,21 +147,15 @@
"tabBar": {
"selectedColor": "#17abe3",
"list": [
- {
- "text": "产线",
- "pagePath": "pages/line/line",
- "selectedIconPath": "/static/images/tabbar/home_.png",
- "iconPath": "/static/images/tabbar/home.png"
- },
- {
- "text": "待办",
- "pagePath": "pages/todo/index",
- "selectedIconPath": "/static/images/tabbar/todo_.png",
- "iconPath": "/static/images/tabbar/todo.png"
- },
+ // {
+ // "text": "待办",
+ // "pagePath": "pages/todo/index",
+ // "selectedIconPath": "/static/images/tabbar/todo_.png",
+ // "iconPath": "/static/images/tabbar/todo.png"
+ // },
{
"text": "扫码",
- "pagePath": "pages/easycode/easycode",
+ "pagePath": "pages/scan/scan",
"selectedIconPath": "/static/images/tabbar/work_.png",
"iconPath": "/static/images/tabbar/work.png"
},
diff --git a/apps/hand-factory/pages/coil-detail/index.vue b/apps/hand-factory/pages/coil-detail/index.vue
new file mode 100644
index 0000000..a7243e0
--- /dev/null
+++ b/apps/hand-factory/pages/coil-detail/index.vue
@@ -0,0 +1,1172 @@
+
+
+
+
+
+
+
+
+ {{ tab.label }}
+
+
+
+
+
+
+
+
+
+ 基础信息
+
+
+ 入场钢卷号
+ {{ coilInfo.enterCoilNo || '-' }}
+
+
+ 厂家卷号
+ {{ coilInfo.supplierCoilNo || '-' }}
+
+
+ 物料类型
+ {{ coilInfo.materialType || '-' }}
+
+
+ 品名
+ {{ coilInfo.itemName || '-' }}
+
+
+ 规格
+ {{ coilInfo.specification || coilInfo.itemSpecification || '-' }}
+
+
+ 材质
+ {{ coilInfo.material || coilInfo.itemMaterial || '-' }}
+
+
+ 厂家
+ {{ coilInfo.manufacturer || coilInfo.itemManufacturer || '-' }}
+
+
+
+
+
+ 重量信息
+
+
+ 毛重 (吨)
+ {{ coilInfo.grossWeight || '-' }}
+
+
+ 净重 (吨)
+ {{ coilInfo.netWeight || '-' }}
+
+
+ 长度 (米)
+ {{ coilInfo.length || '-' }}
+
+
+
+
+
+ 库区信息
+
+
+ 逻辑库区
+ {{ coilInfo.warehouseName || '-' }}
+
+
+ 真实库区
+ {{ coilInfo.actualWarehouseName || '-' }}
+
+
+ 班组
+ {{ coilInfo.team || '-' }}
+
+
+
+
+
+ 操作信息
+
+
+ 创建人
+ {{ coilInfo.createBy || '-' }}
+
+
+ 创建时间
+ {{ coilInfo.createTime || '-' }}
+
+
+ 更新人
+ {{ coilInfo.updateBy || '-' }}
+
+
+ 更新时间
+ {{ coilInfo.updateTime || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+ 入场钢卷号
+
+
+
+ 当前钢卷号
+
+
+
+ 厂家卷号
+
+
+
+ 品名
+
+
+
+ 规格
+
+
+
+ 材质
+
+
+
+ 厂家
+
+
+
+ 毛重 (吨)
+
+
+
+ 净重 (吨)
+
+
+
+ 长度 (米)
+
+
+
+ 班组
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无异常记录
+
+
+
+
+
+ {{ item.defectCode || '-' }}
+ {{ item.degree || '-' }}
+ 主缺陷
+
+
+ 编辑
+ 删除
+
+
+ {{ item.remark || '暂无描述' }}
+
+ 板面: {{ item.plateSurface }}
+ 断面: {{ item.position }}
+
+ 区间: {{ item.startPosition || '?' }}~{{ item.endPosition || '?' }}
+ (长 {{ item.length }})
+
+
+
+
+
+ {{ item.createTime || '' }}
+
+
+
+ + 新增异常
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/hand-factory/pages/easycode/easycode.vue b/apps/hand-factory/pages/easycode/easycode.vue
index 46cee9f..49e9219 100644
--- a/apps/hand-factory/pages/easycode/easycode.vue
+++ b/apps/hand-factory/pages/easycode/easycode.vue
@@ -1,7 +1,7 @@
-
+
-
+
@@ -39,7 +39,7 @@
-
+
@@ -346,7 +346,7 @@
if (res.rows.length == 1) {
const coilId = res.rows[0].coilId;
uni.navigateTo({
- url: '/pages/easycode/editby?coilId=' + coilId
+ url: '/pages/coil-detail/index?coilId=' + coilId
})
} else {
uni.showToast({
diff --git a/apps/hand-factory/pages/eqp/eqp.vue b/apps/hand-factory/pages/eqp/eqp.vue
index e40fdf1..b98f2eb 100644
--- a/apps/hand-factory/pages/eqp/eqp.vue
+++ b/apps/hand-factory/pages/eqp/eqp.vue
@@ -1,886 +1,15 @@
-
-
-
-
- 📷
- {{ partInfo ? '重新扫码' : '点击扫码' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 检验部位
- {{ partInfo.inspectPart || '-' }}
-
-
- 产线
- {{ partInfo.productionLine || '-' }}
-
-
- 线别
- {{ partInfo.lineSection || '-' }}
-
-
- 备注
- {{ partInfo.remark || '-' }}
-
-
-
-
- 巡检人
- {{ inspector }}
-
-
- 巡检时间
- {{ inspectTime }}
-
-
-
-
-
-
- 班次
-
-
-
- 白班
-
-
-
- 夜班
-
-
-
-
-
-
-
- 待检项({{ checklist.length }})
-
-
-
- 该部位暂无待检项
-
-
-
-
- {{ item.checkName || item.checkContent || '检验项' }}
- {{ item.checkContent }}
- 标准:{{ item.standard }}
-
-
-
-
-
-
-
-
-
- ✕
-
-
- 📷
- 拍照/选图
-
-
-
-
-
-
-
- ✓
- 正常
-
- {{ getResultTime(item.checkId) }}
-
-
-
-
-
- ✕
- 故障
-
- {{ getResultTime(item.checkId) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 异常描述:
- {{ abnormalDescMap[item.checkId] || '未填写' }}
-
-
-
-
-
-
-
- 🔍
- 请扫描设备部位二维码开始巡检
-
+
+
-
-
+
\ No newline at end of file
diff --git a/apps/hand-factory/pages/index.vue b/apps/hand-factory/pages/index.vue
index aa7ef17..ab50670 100644
--- a/apps/hand-factory/pages/index.vue
+++ b/apps/hand-factory/pages/index.vue
@@ -6,132 +6,26 @@
export default {
data() {
return {
- tabVisible: {
- admin: [true, true, true, false, true, true],
- canteen: [false, false, false, true, false, true],
- worker: [false, true, true, false, true, true]
- },
- hasJumped: false, // 防止重复跳转的标记
+ hasJumped: false,
}
},
onShow() {
- // 已跳转过则不再执行逻辑
if (this.hasJumped) return;
- // 检查用户角色
this.$store.dispatch('GetInfo')
- .then(res => {
- // 验证返回数据格式
- if (!res || !res.data || !Array.isArray(res.data.roles)) {
- throw new Error('用户角色信息格式错误');
- }
-
- console.log('用户角色信息', res.data.roles)
-
- const roles = res.data.roles;
-
- if (roles.includes('admin')) {
- for (let i = 0; i < this.tabVisible.admin.length; i++) {
- const v = this.tabVisible.admin[i]
- uni.setTabBarItem({
- index: i,
- visible: v
- });
- }
- // 管理员角色跳转
- uni.switchTab({
- url: '/pages/line/line',
- success: () => {
- this.hasJumped = true; // 标记已跳转
- },
- fail: (err) => {
- console.error('管理员页面跳转失败:', err);
- uni.showToast({
- title: '跳转产线页面失败',
- icon: 'none',
- duration: 2000
- });
- }
- });
- } else if (roles.includes('canteen')) {
- for (let i = 0; i < this.tabVisible.canteen.length; i++) {
- const v = this.tabVisible.canteen[i]
- uni.setTabBarItem({
- index: i,
- visible: v
- });
- }
- // 食堂角色跳转
- uni.switchTab({
- url: '/pages/meal/meal',
- success: () => {
- this.hasJumped = true; // 标记已跳转
- },
- fail: (err) => {
- console.error('管理员页面跳转失败:', err);
- uni.showToast({
- title: '跳转产线页面失败',
- icon: 'none',
- duration: 2000
- });
- }
- });
- } else if (roles.includes('worker')) {
- // 工人角色跳转
- // 设置tab内容
- // 设置产线和复杂扫码不可见
- for (let i = 0; i < this.tabVisible.worker.length; i++) {
- const v = this.tabVisible.worker[i]
- uni.setTabBarItem({
- index: i,
- visible: v
- });
- }
- uni.switchTab({
- url: '/pages/easycode/easycode',
- success: () => {
- this.hasJumped = true; // 标记已跳转
- },
- fail: (err) => {
- console.error('工人页面跳转失败:', err);
- uni.showToast({
- title: '跳转扫码页面失败',
- icon: 'none',
- duration: 2000
- });
- }
- });
- } else {
- for (let i = 0; i < this.tabVisible.worker.length; i++) {
- const v = this.tabVisible.worker[i]
- uni.setTabBarItem({
- index: i,
- visible: v
- });
- }
- // 延迟跳转,确保提示被用户看到
- setTimeout(() => {
- uni.switchTab({
- url: '/pages/easycode/easycode',
- success: () => {
- this.hasJumped = true;
- },
- fail: (err) => {
- console.error('默认角色页面跳转失败:', err);
- uni.showToast({
- title: '跳转默认页面失败',
- icon: 'none',
- duration: 2000
- });
- }
- });
- }, 2000);
- }
+ .then(() => {
+ uni.switchTab({
+ url: '/pages/scan/scan',
+ success: () => {
+ this.hasJumped = true;
+ },
+ fail: (err) => {
+ console.error('跳转失败:', err);
+ }
+ });
})
- .catch(err => {
- uni.reLaunch({
- url: '/pages/login'
- })
+ .catch(() => {
+ uni.reLaunch({ url: '/pages/login' })
});
}
}
diff --git a/apps/hand-factory/pages/mine/index.vue b/apps/hand-factory/pages/mine/index.vue
index 9939bd8..9426a61 100644
--- a/apps/hand-factory/pages/mine/index.vue
+++ b/apps/hand-factory/pages/mine/index.vue
@@ -40,12 +40,12 @@
-
+
-
-
-
-
-
-
-
-
-
- 入场钢卷号
- {{ coilDetail.enterCoilNo || '-' }}
-
-
- 当前钢卷号
- {{ coilDetail.currentCoilNo || '-' }}
-
-
- 厂家卷号
- {{ coilDetail.supplierCoilNo || '-' }}
-
-
- 状态
- {{ getStatusText(coilDetail.status) }}
-
-
- 毛重 (吨)
- {{ coilDetail.grossWeight || '-' }}
-
-
- 净重 (吨)
- {{ coilDetail.netWeight || '-' }}
-
-
- 逻辑库区
- {{ coilDetail.warehouseName || '-' }}
-
-
- 真实库区
- {{ coilDetail.actualWarehouseName || '-' }}
-
-
- 班组
- {{ coilDetail.team || '-' }}
-
-
- 物料类型
- {{ coilDetail.materialType || '-' }}
-
-
- 品名
- {{ coilDetail.itemName || '-' }}
-
-
- 规格
- {{ coilDetail.specification || '-' }}
-
-
- 材质
- {{ coilDetail.material || '-' }}
-
-
- 厂家
- {{ coilDetail.manufacturer || '-' }}
-
-
-
-
-
-
-
+
查询
@@ -216,8 +144,7 @@