防腐记录

This commit is contained in:
2026-07-03 10:23:03 +08:00
parent cc4b55ed8e
commit 451e8b4bc3
2 changed files with 99 additions and 41 deletions
+92 -36
View File
@@ -16,33 +16,54 @@
<view class="anti-record__header">
<view class="anti-record__bar"></view>
<text class="anti-record__title">防腐记录</text>
<text
v-if="list.length > 1"
class="anti-record__more"
@click="showPopup = true"
>查看全部({{ list.length }})</text>
<text v-if="list.length > 1" class="anti-record__more" @click="showPopup = true">查看全部({{ list.length
}})</text>
</view>
<!-- 最新一条记录 -->
<view class="anti-record__card" v-if="latest">
<view class="anti-record__row">
<text class="anti-record__label">检查结果</text>
<view class="anti-record__tag" :class="latest.CheckResult === '合格' ? 'anti-record__tag--pass' : 'anti-record__tag--fail'">
<text class="anti-record__tag-icon">{{ latest.CheckResult === '合格' ? '\u2713' : '\u2717' }}</text>
<text class="anti-record__tag-text">{{ latest.CheckResult || '--' }}</text>
</view>
</view>
<view class="anti-record__row">
<text class="anti-record__label">防腐等级</text>
<text class="anti-record__value">{{ latest.AnticorrosionLevel || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">中间漆</text>
<text class="anti-record__value">{{ latest.IntermediatePaint || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">面漆</text>
<text class="anti-record__value">{{ latest.Topcoat || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">漆膜厚度</text>
<text class="anti-record__value">{{ latest.FilmThickness || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">检查人</text>
<text class="anti-record__value">{{ latest.CheckPersonName || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">检查时间</text>
<text class="anti-record__value">{{ latest.CheckTime || '--' }}</text>
</view>
<view v-if="latest.CheckResult === '不合格' && latest.UnqualifiedReason" class="anti-record__row anti-record__row--stack">
<text class="anti-record__label">不合格原因</text>
<text class="anti-record__value anti-record__value--fail">{{ latest.UnqualifiedReason }}</text>
<view class="anti-record__row">
<text class="anti-record__label">检查结果</text>
<view class="anti-record__tag"
:class="latest.CheckResult === '合格' ? 'anti-record__tag--pass' : 'anti-record__tag--fail'">
<text class="anti-record__tag-icon">{{ latest.CheckResult === '合格' ? '\u2713' : '\u2717'
}}</text>
<text class="anti-record__tag-text">{{ latest.CheckResult || '--' }}</text>
</view>
</view>
<view class="anti-record__row anti-record__row--stack">
<text class="anti-record__label--stack">不合格原因</text>
<text class="anti-record__value anti-record__value--stack">{{ latest.UnqualifiedReason }}</text>
</view>
<view class="anti-record__row anti-record__row--stack">
<text class="anti-record__label--stack">整改要求</text>
<text class="anti-record__value anti-record__value--stack">{{ latest.RectifyRequirement
}}</text>
</view>
</view>
</view>
@@ -55,30 +76,52 @@
<text class="anti-record__popup-close" @click="showPopup = false"></text>
</view>
<scroll-view class="anti-record__popup-bd" scroll-y>
<view
v-for="(item, index) in list"
:key="index"
<view v-for="(item, index) in list" :key="index"
class="anti-record__card anti-record__card--popup"
:class="item.CheckResult === '合格' ? 'anti-record__card--pass' : 'anti-record__card--fail'"
>
<view class="anti-record__row">
<text class="anti-record__label">检查结果</text>
<view class="anti-record__tag" :class="item.CheckResult === '合格' ? 'anti-record__tag--pass' : 'anti-record__tag--fail'">
<text class="anti-record__tag-icon">{{ item.CheckResult === '合格' ? '\u2713' : '\u2717' }}</text>
<text class="anti-record__tag-text">{{ item.CheckResult || '--' }}</text>
</view>
</view>
:class="item.CheckResult === '合格' ? 'anti-record__card--pass' : 'anti-record__card--fail'">
<view class="anti-record__row">
<text class="anti-record__label">防腐等级</text>
<text class="anti-record__value">{{ item.AnticorrosionLevel || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">中间漆</text>
<text class="anti-record__value">{{ item.IntermediatePaint || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">面漆</text>
<text class="anti-record__value">{{ item.Topcoat || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">漆膜厚度</text>
<text class="anti-record__value">{{ item.FilmThickness || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">检查人</text>
<text class="anti-record__value">{{ item.CheckPersonName || '--' }}</text>
</view>
<view class="anti-record__row">
<text class="anti-record__label">检查时间</text>
<text class="anti-record__value">{{ item.CheckTime || '--' }}</text>
</view>
<view v-if="item.CheckResult === '不合格' && item.UnqualifiedReason" class="anti-record__row anti-record__row--stack">
<text class="anti-record__label">不合格原因</text>
<text class="anti-record__value anti-record__value--fail">{{ item.UnqualifiedReason }}</text>
<view class="anti-record__row">
<text class="anti-record__label">检查结果</text>
<view class="anti-record__tag"
:class="item.CheckResult === '合格' ? 'anti-record__tag--pass' : 'anti-record__tag--fail'">
<text class="anti-record__tag-icon">{{ item.CheckResult === '合格' ? '\u2713' :
'\u2717'
}}</text>
<text class="anti-record__tag-text">{{ item.CheckResult || '--' }}</text>
</view>
</view>
<view class="anti-record__row anti-record__row--stack" v-if="item.CheckResult === '不合格'">
<text class="anti-record__label--stack">不合格原因</text>
<text class="anti-record__value anti-record__value--stack">{{ item.UnqualifiedReason
}}</text>
</view>
<view class="anti-record__row anti-record__row--stack" v-if="item.CheckResult === '不合格'">
<text class="anti-record__label--stack">整改要求</text>
<text class="anti-record__value anti-record__value--stack">{{ item.RectifyRequirement
}}</text>
</view>
</view>
</scroll-view>
@@ -133,6 +176,7 @@ $text: #1a1a2e;
$text-secondary: #8e99a4;
.anti-record {
&__loading,
&__empty {
padding: 40rpx 24rpx;
@@ -212,12 +256,11 @@ $text-secondary: #8e99a4;
align-items: center;
padding: 8rpx 0;
& + & {
&+& {
border-top: 1rpx solid #f0f0f0;
}
&--stack {
flex-direction: column;
align-items: flex-start;
.anti-record__value {
@@ -233,6 +276,15 @@ $text-secondary: #8e99a4;
flex-shrink: 0;
margin-right: 24rpx;
width: 140rpx;
&--stack {
font-size: 26rpx;
color: $text-secondary;
flex-shrink: 0;
margin-right: 24rpx;
width: 140rpx;
margin-top: 8rpx;
}
}
&__value {
@@ -241,8 +293,7 @@ $text-secondary: #8e99a4;
flex: 1;
text-align: left;
&--fail {
color: #dc2626;
&--stack {
font-size: 24rpx;
}
}
@@ -353,7 +404,12 @@ $text-secondary: #8e99a4;
}
@keyframes slideUp {
0% { transform: translateY(100%); }
100% { transform: translateY(0); }
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}
}
</style>
+7 -5
View File
@@ -46,10 +46,6 @@
</view>
</view>
</view>
<!-- 防腐记录 -->
<nbd-anti-record :params="{ materialCode: form.MaterialCode, projectId: currentProject.ProjectId }" />
<!-- 防腐填报 -->
<view class="section">
<view class="section__header">
@@ -110,7 +106,8 @@
</view>
</view>
</view>
<!-- 自检 -->
<!-- 自检 -->
<view class="section">
<view class="section__header">
<view class="section__bar"></view>
@@ -165,6 +162,11 @@
</view>
</view>
<!-- 防腐记录 -->
<nbd-anti-record :params="{ materialCode: form.MaterialCode, projectId: currentProject.ProjectId }" />
<nbd-submit-bar text="提交" :loading="submitting" @click="handleSubmit" />
</view>