|
@@ -0,0 +1,301 @@
|
|
|
+<template>
|
|
|
+ <scroll-view scroll-y class="container">
|
|
|
+ <!-- Banner -->
|
|
|
+ <view class="banner">
|
|
|
+ <text class="banner-title">关键工序</text>
|
|
|
+ </view>
|
|
|
+ <view class="card-list">
|
|
|
+ <u-sticky bgColor="#fff">
|
|
|
+ <u-tabs :list="tabsList"
|
|
|
+ lineWidth="30"
|
|
|
+ lineColor="#f56c6c"
|
|
|
+ :activeStyle="{
|
|
|
+ color: '#303133',
|
|
|
+ fontWeight: 'bold',
|
|
|
+ transform: 'scale(1.05)'
|
|
|
+ }"
|
|
|
+ :inactiveStyle="{
|
|
|
+ color: '#606266',
|
|
|
+ transform: 'scale(1)'
|
|
|
+ }"
|
|
|
+ itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
|
|
|
+ @click="tabsClick"
|
|
|
+ ></u-tabs>
|
|
|
+ </u-sticky>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 检查报告卡片列表 -->
|
|
|
+ <view v-if="reportList.length" class="card-list">
|
|
|
+ <view class="card" v-for="item in reportList" :key="item.id">
|
|
|
+ <view class="divider"></view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">序号</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-number-box v-model="item.id" disabled></u-number-box>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">产品码</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-input
|
|
|
+ v-model="item.productcode"
|
|
|
+ border="surround"
|
|
|
+ disabled
|
|
|
+ ></u-input>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">检测项目</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-input
|
|
|
+ v-model="item.invname"
|
|
|
+ border="surround"
|
|
|
+ disabled
|
|
|
+ ></u-input>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">分类</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-input
|
|
|
+ v-model="item.model"
|
|
|
+ border="surround"
|
|
|
+ disabled
|
|
|
+ ></u-input>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">上限要求</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-number-box v-model="item.upperlimit" step="0.1" :min="0.5" decimal-length="1" disabled></u-number-box>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">下限要求</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-number-box v-model="item.lowerlimit" :min="0" disabled></u-number-box>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <!--
|
|
|
+ <view class="btn-group">
|
|
|
+ <button class="main-btn" @click="viewReport(item)">查看报告</button>
|
|
|
+ </view>-->
|
|
|
+ <view class="divider"></view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">实测值小</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-number-box v-model="item.minactval" :min="0" ></u-number-box>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">实测值大</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-number-box v-model="item.maxactval" :min="0" ></u-number-box>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="info-row">
|
|
|
+ <text class="label">结论</text>
|
|
|
+ <text class="value">
|
|
|
+ <u-input
|
|
|
+ v-model="item.conclusion"
|
|
|
+ border="surround"
|
|
|
+ ></u-input>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 空状态 -->
|
|
|
+ <view v-else class="empty-card">
|
|
|
+ <image src="/static/image/empty.png" class="empty-img" />
|
|
|
+ <text class="empty-text">暂无检查检验记录</text>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+ import {
|
|
|
+ ref
|
|
|
+ } from 'vue'
|
|
|
+ var current = ref(1)
|
|
|
+ var reportList = ref([])
|
|
|
+ const tabsList = ref([{name:1},{name:2},{name:3},{name:4},{name:5},{name:6}]);
|
|
|
+ const initReportList = ref([{
|
|
|
+ id: 1,
|
|
|
+ productcode:"YH0001",
|
|
|
+ invname: '对称度',
|
|
|
+ model: '重要尺寸',
|
|
|
+ upperlimit:0.5,
|
|
|
+ lowerlimit:0,
|
|
|
+ minactval:0,
|
|
|
+ maxactval:0,
|
|
|
+ conclusion:'',
|
|
|
+ applyDate: '2025-08-20 09:15',
|
|
|
+ reportDate: '2025-08-20 17:30'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ productcode:"YH0001",
|
|
|
+ invname: '对称度',
|
|
|
+ model: '重要尺寸',
|
|
|
+ upperlimit:0.5,
|
|
|
+ lowerlimit:0,
|
|
|
+ minactval:0,
|
|
|
+ maxactval:0,
|
|
|
+ conclusion:'',
|
|
|
+ applyDate: '2025-08-28 10:00',
|
|
|
+ reportDate: '2025-08-28 13:40'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ reportList.value = initReportList.value.filter(item=>item.id == current.value)
|
|
|
+ const tabsClick = (obj) =>{
|
|
|
+ current = obj.name
|
|
|
+ reportList.value = initReportList.value.filter(item=>item.id == current)
|
|
|
+ }
|
|
|
+
|
|
|
+ const viewReport = (item) => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/work/report/InspectionDetail?id=${item.id}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .container {
|
|
|
+ padding: 40rpx;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ min-height: 100vh;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .banner {
|
|
|
+ background: linear-gradient(135deg, #6dd5ed, #2193b0);
|
|
|
+ border-radius: 24rpx;
|
|
|
+ padding: 40rpx 30rpx;
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+ box-shadow: 0 8rpx 16rpx rgba(33, 147, 176, 0.3);
|
|
|
+ }
|
|
|
+
|
|
|
+ .banner-title {
|
|
|
+ color: white;
|
|
|
+ font-size: 36rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box{
|
|
|
+ width: 40rpx;
|
|
|
+ background-color: #909193;
|
|
|
+ border-radius: 15rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card-list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 30rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card {
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 30rpx;
|
|
|
+ box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card-header {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card-icon {
|
|
|
+ width: 64rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ background-color: #eef5ff;
|
|
|
+ padding: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-row {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ gap: 10rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #33475b;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .label {
|
|
|
+ font-weight: 600;
|
|
|
+ color: #102a43;
|
|
|
+ min-width: 150rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .value {
|
|
|
+ flex: 1;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+
|
|
|
+ .divider {
|
|
|
+ height: 1px;
|
|
|
+ background-color: #eee;
|
|
|
+ margin: 20rpx 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card-info {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #666;
|
|
|
+ line-height: 1.6;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn-group {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .main-btn {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: white;
|
|
|
+ border: none;
|
|
|
+ border-radius: 100rpx;
|
|
|
+ background: linear-gradient(to right, #36d1dc, #5b86e5);
|
|
|
+ box-shadow: 0 6rpx 16rpx rgba(91, 134, 229, 0.3);
|
|
|
+ transition: all 0.2s ease-in-out;
|
|
|
+ }
|
|
|
+
|
|
|
+ .main-btn:active {
|
|
|
+ opacity: 0.9;
|
|
|
+ transform: scale(0.98);
|
|
|
+ }
|
|
|
+
|
|
|
+ .empty-card {
|
|
|
+ background-color: white;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ padding: 60rpx 30rpx;
|
|
|
+ box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.05);
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 100rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .empty-img {
|
|
|
+ width: 180rpx;
|
|
|
+ height: 180rpx;
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+ opacity: 0.8;
|
|
|
+ }
|
|
|
+
|
|
|
+ .empty-text {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+</style>
|