From cc4b55ed8e9aaf80a6b29d1dd32d24da66c6e267 Mon Sep 17 00:00:00 2001
From: Zones <765289303@qq.com>
Date: Thu, 2 Jul 2026 19:36:49 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E8=85=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.claude/settings.json | 7 -
api/hj.js | 19 +
assets/icon/nbd-icon.css | 12 +-
components/nbd-anti-record.vue | 359 ++++++++++++++++
components/nbd-check-btn.vue | 118 +++++
components/nbd-submit-bar.vue | 91 ++++
main.js | 1 +
pages.json | 6 +
pages/index/index.vue | 4 +
scanpages/hj/do_anti_rust.vue | 670 +++++++++++++++++++++++++++++
scanpages/hj/material_sampling.vue | 86 +---
utils/constant.js | 9 +
utils/formatTime.js | 38 ++
13 files changed, 1327 insertions(+), 93 deletions(-)
delete mode 100644 .claude/settings.json
create mode 100644 components/nbd-anti-record.vue
create mode 100644 components/nbd-check-btn.vue
create mode 100644 components/nbd-submit-bar.vue
create mode 100644 scanpages/hj/do_anti_rust.vue
create mode 100644 utils/formatTime.js
diff --git a/.claude/settings.json b/.claude/settings.json
deleted file mode 100644
index 7d752e4..0000000
--- a/.claude/settings.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "permissions": {
- "allow": [
- "Bash(git checkout *)"
- ]
- }
-}
diff --git a/api/hj.js b/api/hj.js
index 680f360..cc7e706 100644
--- a/api/hj.js
+++ b/api/hj.js
@@ -167,3 +167,22 @@ export const reqGetGrooveTypeList = ()=>get(`BaseInfo/GetGrooveType`)
*
*/
export const reqSaveFitupCheck = (data)=>post(`PreWeldInspection/SaveFitupCheck`, data)
+
+/**
+ * 获取防腐等级
+ * @returns
+ */
+export const reqPaintCodeList = ()=>get(`/AntiCorrosionCheck/GetPaintCodeList`)
+/**
+ * 保存防腐填报记录
+ * @param {Object} data
+ */
+export const reqSaveAntiCorrosionCheck = (data={})=>post(`/AntiCorrosionCheck/SaveRecord`,data)
+
+/**
+ * 获取防腐填报记录
+ * @param {String} materialCode
+ */
+export const reqGetAntiCorrosionCheck = (params) => get(`/AntiCorrosionCheck/GetRecordsByMaterialCode?materialCode=${params.materialCode}&projectId=${params.projectId}`)
+
+
diff --git a/assets/icon/nbd-icon.css b/assets/icon/nbd-icon.css
index b9876f6..3f61867 100644
--- a/assets/icon/nbd-icon.css
+++ b/assets/icon/nbd-icon.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "nbd-icon"; /* Project id 5193086 */
- src: url('//at.alicdn.com/t/c/font_5193086_0r8nbjxfoygi.woff2?t=1781694668587') format('woff2'),
- url('//at.alicdn.com/t/c/font_5193086_0r8nbjxfoygi.woff?t=1781694668587') format('woff'),
- url('//at.alicdn.com/t/c/font_5193086_0r8nbjxfoygi.ttf?t=1781694668587') format('truetype');
+ src: url('//at.alicdn.com/t/c/font_5193086_mkaqbwmfan.woff2?t=1782898376381') format('woff2'),
+ url('//at.alicdn.com/t/c/font_5193086_mkaqbwmfan.woff?t=1782898376381') format('woff'),
+ url('//at.alicdn.com/t/c/font_5193086_mkaqbwmfan.ttf?t=1782898376381') format('truetype');
}
.nbd-icon {
@@ -13,8 +13,12 @@
-moz-osx-font-smoothing: grayscale;
}
+.nbd-icon-chuxiufangfu:before {
+ content: "\e65a";
+}
+
.nbd-icon-zudui:before {
- content: "\e619";
+ content: "\ebf6";
}
.nbd-icon-xialiaochoujianjilu:before {
diff --git a/components/nbd-anti-record.vue b/components/nbd-anti-record.vue
new file mode 100644
index 0000000..4a49f86
--- /dev/null
+++ b/components/nbd-anti-record.vue
@@ -0,0 +1,359 @@
+
+
+
+
+ 加载中...
+
+
+
+
+ 暂无防腐记录
+
+
+
+
+
+
+
+
+
+
+ 检查结果
+
+ {{ latest.CheckResult === '合格' ? '\u2713' : '\u2717' }}
+ {{ latest.CheckResult || '--' }}
+
+
+
+ 防腐等级
+ {{ latest.AnticorrosionLevel || '--' }}
+
+
+ 检查时间
+ {{ latest.CheckTime || '--' }}
+
+
+ 不合格原因
+ {{ latest.UnqualifiedReason }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/nbd-check-btn.vue b/components/nbd-check-btn.vue
new file mode 100644
index 0000000..7063cea
--- /dev/null
+++ b/components/nbd-check-btn.vue
@@ -0,0 +1,118 @@
+
+
+
+ {{ '\u2713' }}
+ {{ passText }}
+
+
+ {{ '\u2717' }}
+ {{ failText }}
+
+
+
+
+
+
+
diff --git a/components/nbd-submit-bar.vue b/components/nbd-submit-bar.vue
new file mode 100644
index 0000000..0333a83
--- /dev/null
+++ b/components/nbd-submit-bar.vue
@@ -0,0 +1,91 @@
+
+
+
+ {{ icon }}
+ {{ loading ? '提交中...' : text }}
+
+
+
+
+
+
+
diff --git a/main.js b/main.js
index c838dc6..cd2f811 100644
--- a/main.js
+++ b/main.js
@@ -21,6 +21,7 @@
})()
import App from './App'
+import './utils/formatTime'
// #ifndef VUE3
import Vue from 'vue'
diff --git a/pages.json b/pages.json
index 860d45c..fa42d12 100644
--- a/pages.json
+++ b/pages.json
@@ -145,6 +145,12 @@
"style": {
"navigationBarTitleText": "焊接日报"
}
+ },
+ {
+ "path": "hj/do_anti_rust",
+ "style": {
+ "navigationBarTitleText": "防腐处理"
+ }
}
]
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 4717906..34ef430 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -267,6 +267,10 @@
* 菜单扫一扫
*/
const handleMenuScan = (path) => {
+ uni.navigateTo({
+ url: path + `?id=PPA031S03-25607419-2511410009`
+ })
+ return
wx.scanCode({
scanType: ['datamatrix', 'barCode', 'qrCode', 'wxCode', 'pdf417'],
success(res) {
diff --git a/scanpages/hj/do_anti_rust.vue b/scanpages/hj/do_anti_rust.vue
new file mode 100644
index 0000000..abe4059
--- /dev/null
+++ b/scanpages/hj/do_anti_rust.vue
@@ -0,0 +1,670 @@
+
+
+
+
+ {{ form.MaterialCode || '--' }}
+
+
+ 材料编码
+ {{ form.Code || '--' }}
+
+
+ 材料名称
+ {{ form.MaterialName }}
+
+
+
+
+
+
+
+
+
+ 炉号
+
+ {{ form.HeatNo || '--' }}
+
+
+
+ 批号
+ {{ form.BatchNo || '--' }}
+
+
+ 规格
+ {{ form.MaterialSpec || '--' }}
+
+
+ 单位
+ {{ form.MaterialUnit || '--' }}
+
+
+ 材料描述
+ {{ form.MaterialDef || '--' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 防腐等级
+
+
+ {{ antiForm.AnticorrosionLevel || '请选择防腐等级' }}
+
+
+
+
+
+
+ 中间漆
+
+ {{ antiForm.IntermediatePaint || '--' }}
+
+
+
+
+ 面漆
+
+ {{ antiForm.Topcoat || '--' }}
+
+
+
+
+ 漆膜厚度
+
+
+ μm
+
+
+
+
+
+ 喷砂情况
+
+
+
+
+
+
+
+ 除锈喷砂情况
+
+
+
+
+
+
+
+
+
+
+
+
+ 自检结果
+
+
+
+
+
+
+
+
+ 不合格原因
+
+
+
+
+
+
+ 整改要求
+
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+ 照片
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scanpages/hj/material_sampling.vue b/scanpages/hj/material_sampling.vue
index cbfd881..15ba92a 100644
--- a/scanpages/hj/material_sampling.vue
+++ b/scanpages/hj/material_sampling.vue
@@ -90,20 +90,8 @@
材料编码及炉批号校验
核对实物编码与批次信息
-
-
-
- ✓
- 通过
-
-
- ✗
- 不通过
-
-
+
+
@@ -111,20 +99,8 @@
材料数量校验
核对实物数量与单据一致
-
-
-
- ✓
- 通过
-
-
- ✗
- 不通过
-
-
+
+
@@ -192,11 +168,6 @@
// 照片组件引用
const photoRef = ref(null)
- const toggleCheck = (key) => {
- const val = check.value[key]
- check.value[key] = val === true ? false : true
- }
-
const handleSubmit = () => {
uni.showModal({
title: '确认提交',
@@ -581,55 +552,6 @@
}
}
- .check-btn {
- display: inline-flex;
- align-items: center;
- gap: 8rpx;
- padding: 12rpx 24rpx;
- border-radius: 12rpx;
- transition: all 0.25s ease;
- min-width: 120rpx;
- justify-content: center;
-
- &--pass {
- background: #ebf9f0;
- border: 1rpx solid #b7ebc6;
-
- .check-btn__icon {
- font-size: 26rpx;
- color: #22c55e;
- font-weight: 700;
- }
-
- .check-btn__text {
- font-size: 24rpx;
- color: #16a34a;
- font-weight: 600;
- }
- }
-
- &--fail {
- background: #fef2f2;
- border: 1rpx solid #fecaca;
-
- .check-btn__icon {
- font-size: 26rpx;
- color: #ef4444;
- font-weight: 700;
- }
-
- .check-btn__text {
- font-size: 24rpx;
- color: #dc2626;
- font-weight: 600;
- }
- }
-
- &:active {
- transform: scale(0.96);
- }
- }
-
// ===== 提交栏(悬浮底部) =====
.submit-bar {
position: fixed;
diff --git a/utils/constant.js b/utils/constant.js
index 8cb14f8..c2cee2f 100644
--- a/utils/constant.js
+++ b/utils/constant.js
@@ -67,5 +67,14 @@ export const defaultApps = [{
isScan: true,
prefix: 'nbd-icon',
selected: false
+ },
+ {
+ name: '防腐处理',
+ icon: 'chuxiufangfu',
+ menuId: "",
+ path: "/scanpages/hj/do_anti_rust",
+ isScan: true,
+ prefix: 'nbd-icon',
+ selected: false
}
]
diff --git a/utils/formatTime.js b/utils/formatTime.js
new file mode 100644
index 0000000..6d4aa07
--- /dev/null
+++ b/utils/formatTime.js
@@ -0,0 +1,38 @@
+/**
+ * 时间格式化工具
+ * 挂载到 uni.formatTime,支持以下格式:
+ * uni.formatTime(date, 'YYYY-MM-DD HH:mm:ss')
+ * uni.formatTime(timestamp, 'YYYY/MM/DD')
+ */
+
+const pad = (n) => String(n).padStart(2, '0')
+
+const formatTime = (date, fmt = 'YYYY-MM-DD HH:mm:ss') => {
+ if (!date) return ''
+ const d = date instanceof Date ? date : new Date(date)
+ if (isNaN(d.getTime())) return ''
+
+ const tokens = {
+ 'Y+': d.getFullYear(),
+ 'M+': d.getMonth() + 1,
+ 'D+': d.getDate(),
+ 'H+': d.getHours(),
+ 'm+': d.getMinutes(),
+ 's+': d.getSeconds(),
+ }
+
+ for (const [key, val] of Object.entries(tokens)) {
+ const match = fmt.match(new RegExp(key))
+ if (match) {
+ const len = match[0].length
+ const str = key === 'Y+' ? String(val).slice(-len) : len === 1 ? String(val) : pad(val)
+ fmt = fmt.replace(match[0], str)
+ }
+ }
+
+ return fmt
+}
+
+uni.formatTime = formatTime
+
+export default formatTime