样式修复
This commit is contained in:
+184
-1
@@ -499,7 +499,7 @@
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
background: #f5f6f8;
|
||||
border-radius: 8rpx;
|
||||
|
||||
@@ -1130,6 +1130,189 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 试压前条件确认列表样式
|
||||
.page-list,.pressure-filter {
|
||||
.filter-section {
|
||||
background: #ffffff;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 70rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #f8fafc;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
border: 1rpx solid #e2e8f0;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-label {
|
||||
width: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: #475569;
|
||||
font-weight: 500;
|
||||
flex-shrink: 0;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 6rpx;
|
||||
height: 24rpx;
|
||||
background: linear-gradient(180deg, #3577FF 0%, #6366f1 100%);
|
||||
border-radius: 3rpx;
|
||||
margin-right: 12rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-item :deep(.u-input) {
|
||||
flex: 1;
|
||||
background: transparent;
|
||||
font-size: 28rpx;
|
||||
color: #1e293b;
|
||||
text-align: right;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-item :deep(.u-input__input) {
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.filter-item :deep(.u-input__icon--right) {
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.filter-item :deep(.u-radio-group) {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 32rpx;
|
||||
}
|
||||
|
||||
.filter-item :deep(.u-radio) {
|
||||
:deep(.u-radio__icon) {
|
||||
border-radius: 6rpx;
|
||||
border-width: 2rpx;
|
||||
}
|
||||
|
||||
:deep(.u-radio__icon--checked) {
|
||||
background: linear-gradient(135deg, #3577FF 0%, #6366f1 100%);
|
||||
}
|
||||
|
||||
:deep(.u-radio__label) {
|
||||
font-size: 28rpx;
|
||||
color: #475569;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search-item {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
|
||||
:deep(.u-search) {
|
||||
background: #f8fafc;
|
||||
border-radius: 12rpx;
|
||||
height: 70rpx;
|
||||
border: 1rpx solid #e2e8f0;
|
||||
}
|
||||
|
||||
:deep(.u-search__input-wrap) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
:deep(.u-search__icon) {
|
||||
color: #94a3b8;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
:deep(.u-search__input) {
|
||||
font-size: 28rpx;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
:deep(.u-search__placeholder) {
|
||||
font-size: 28rpx;
|
||||
color: #94a3b8;
|
||||
}
|
||||
}
|
||||
|
||||
.list-scroll {
|
||||
height: calc(100vh - 300rpx);
|
||||
}
|
||||
|
||||
.list-wrap {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.card-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding-top: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
border-top: 1rpx solid #f1f5f9;
|
||||
|
||||
.card-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
width: 180rpx;
|
||||
font-size: 26rpx;
|
||||
color: #94a3b8;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.row-value {
|
||||
font-size: 28rpx;
|
||||
color: #475569;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 表格样式(保留)
|
||||
.package-table {
|
||||
border: 1rpx solid #e5e5e5;
|
||||
|
||||
@@ -56,6 +56,12 @@
|
||||
"navigationBarTitleText": "试压管理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pressure/pressure_before/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "试压前条件确认"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "packaging/list",
|
||||
"style": {
|
||||
|
||||
@@ -7,15 +7,12 @@
|
||||
<u-input style="color: #333;" v-model="selectUnit.UnitName" :clearable="false" type="select"
|
||||
placeholder="请选择单位工程" @click="handleShowUnit" />
|
||||
</view>
|
||||
<view class="refresh-btn" @click="handleRefresh">
|
||||
<u-icon name="reload" :size="36" :class="{ rotating: loading }"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
<scroll-view class="list-scroll" scroll-y @scrolltolower="loadMore" refresher-enabled
|
||||
:refresher-triggered="refreshing" @refresh="handleRefresh">
|
||||
<scroll-view class="list-scroll" scroll-y @scrolltolower="loadMore" refresher-enabled="true"
|
||||
:refresher-triggered="refreshing" @refresherrefresh="handleRefresh">
|
||||
<view class="list-wrap">
|
||||
<view v-for="(item, index) in list" :key="index" class="card-item deliver-card" @click="clickTap(item)">
|
||||
<view class="card-header">
|
||||
@@ -188,6 +185,7 @@ import { reqTrainNumberList } from '@/api/hj'
|
||||
|
||||
// ===== 刷新 =====
|
||||
const handleRefresh = () => {
|
||||
refreshing.value = true
|
||||
pageindex.value = 1
|
||||
isFinished.value = false
|
||||
list.value = []
|
||||
|
||||
+22
-14
@@ -1,20 +1,29 @@
|
||||
<template>
|
||||
<view class="page-list">
|
||||
<!-- 头部过滤区域 -->
|
||||
<view class="filter-header">
|
||||
<view class="filter-row" style="margin-bottom: 16rpx;">
|
||||
<!-- 单位工程下拉选择 -->
|
||||
<view class="project-select-btn">
|
||||
<u-input style="color: #333;" v-model="unitWorkName" :clearable="false" type="select"
|
||||
placeholder="请选择单位工程" @click="handleShowUnitWorkSelect" />
|
||||
</view>
|
||||
<!-- 刷新按钮 -->
|
||||
<view class="refresh-btn" @click="handleRefresh">
|
||||
<u-icon name="reload" :size="36" :class="{ rotating: loading }"></u-icon>
|
||||
</view>
|
||||
<view class="filter-section">
|
||||
<!-- 单位工程选择 -->
|
||||
<view class="filter-item">
|
||||
<text class="filter-label">单位工程</text>
|
||||
<u-input
|
||||
type="select"
|
||||
v-model="unitWorkName"
|
||||
readonly
|
||||
:clearable="false"
|
||||
@click="handleShowUnitWorkSelect"
|
||||
placeholder="请选择单位工程"
|
||||
></u-input>
|
||||
</view>
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="filter-item search-item">
|
||||
<u-search
|
||||
v-model="keyword"
|
||||
placeholder="搜索点口批号..."
|
||||
:show-action="false"
|
||||
shape="square"
|
||||
></u-search>
|
||||
</view>
|
||||
<!-- 关键字搜索 -->
|
||||
<u-search v-model="keyword" :show-action="false" shape="round" bg-color="#f5f6f8" />
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
@@ -47,7 +56,6 @@
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
<view class="filter-header">
|
||||
<!-- 第一行:搜索框 + 刷新 -->
|
||||
<view class="search-row">
|
||||
<u-search v-model="keyword" placeholder="请输入包装编号" :show-action="false" shape="round" bg-color="#f5f6f8" @change="handleSearch" />
|
||||
<view class="refresh-btn" @click="handleRefresh">
|
||||
<u-icon name="reload" :size="32" :class="{ rotating: loading }"></u-icon>
|
||||
</view>
|
||||
<u-search v-model="keyword" placeholder="请输入包装编号" :show-action="false" shape="square" bg-color="#f5f6f8" @change="handleSearch" />
|
||||
</view>
|
||||
<!-- 第二行:车次关联 + 单位选择 -->
|
||||
<view class="filter-row has-radio">
|
||||
@@ -23,8 +20,8 @@
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
<scroll-view class="list-scroll" scroll-y @scrolltolower="loadMore" refresher-enabled
|
||||
:refresher-triggered="refreshing" @refresh="handleRefresh">
|
||||
<scroll-view class="list-scroll" scroll-y @scrolltolower="loadMore" refresher-enabled="true"
|
||||
:refresher-triggered="refreshing" @refresherrefresh="handleRefresh">
|
||||
<view class="list-wrap">
|
||||
<view v-for="(item, index) in listData" :key="item.PackagingManageId || index" class="card-item"
|
||||
@click="handleItemClick(item)">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 卡片列表 -->
|
||||
<view class="grid-card">
|
||||
<view class="grid-list">
|
||||
<view class="grid-item" @click="handleClick('/pipe/pressure/condition')">
|
||||
<view class="grid-item" @click="handleClick('/pipe/pressure/pressure_before/list')">
|
||||
<view class="grid-icon">
|
||||
<u-icon name="info-circle" :size="60" :color="$u.type.primary"></u-icon>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<view class="page-list pressure-filter">
|
||||
<!-- 筛选区域 -->
|
||||
<view class="filter-section">
|
||||
<!-- 单位工程选择 -->
|
||||
<view class="filter-item">
|
||||
<text class="filter-label">单位工程</text>
|
||||
<u-input
|
||||
type="select"
|
||||
v-model="unitWorkName"
|
||||
readonly
|
||||
:clearable="false"
|
||||
@click="handleShowUnitPopup"
|
||||
placeholder="请选择单位工程"
|
||||
></u-input>
|
||||
</view>
|
||||
|
||||
<!-- 试压条件选择 -->
|
||||
<view class="filter-item">
|
||||
<text class="filter-label">试压条件</text>
|
||||
<u-radio-group v-model="addInfo.isFinish" @change="onFinishChange">
|
||||
<u-radio :name="true" label="具备" active-color="#3577FF" shape="square"></u-radio>
|
||||
<u-radio :name="false" label="不具备" active-color="#3577FF" shape="square"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="filter-item search-item">
|
||||
<u-search
|
||||
v-model="addInfo.testPackageNo"
|
||||
placeholder="搜索试压包号..."
|
||||
@search="getTestPackageNo"
|
||||
:show-action="false"
|
||||
shape="square"
|
||||
></u-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 试压包列表 -->
|
||||
<scroll-view class="list-scroll" scroll-y>
|
||||
<view class="list-wrap">
|
||||
<view v-for="(item, index) in itemList" :key="index" class="card-item" @click="goDetail(item)">
|
||||
<view class="card-header">
|
||||
<text class="card-title">{{ item.BaseInfoCode }}</text>
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<view class="card-row">
|
||||
<text class="row-label">单位工程</text>
|
||||
<text class="row-value">{{ addInfo.unit_name || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">试压条件</text>
|
||||
<text class="row-value">{{ addInfo.isFinish_name || '--' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="!loading && itemList.length === 0" mode="list" text="暂无数据"></u-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 单位工程选择弹窗 -->
|
||||
<nbd-select v-model="showUnitPopup" :show-search="true" title="请选择单位工程" :list="unitList"
|
||||
label-key="BaseInfoName" v-model:model="selectedUnit" value-key="BaseInfoId" @confirm="handleUnitConfirm" />
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { useUserStore } from '@/store'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { reqProjectWorkArea } from '@/api/base.js'
|
||||
import nbdSelect from '@/components/nbd-select'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const { currentProject } = storeToRefs(userStore)
|
||||
|
||||
// 表单数据
|
||||
const addInfo = reactive({
|
||||
unit_name: '',
|
||||
unitWorkId: '',
|
||||
BaseInfoCode: '',
|
||||
isFinish: false,
|
||||
isFinish_name: '否',
|
||||
testPackageNo: ''
|
||||
})
|
||||
|
||||
// 弹窗状态
|
||||
const showUnitPopup = ref(false)
|
||||
|
||||
// 选中值
|
||||
const selectedUnit = ref(null)
|
||||
|
||||
// 单位工程名称(计算属性)
|
||||
const unitWorkName = computed(() => selectedUnit.value?.BaseInfoName || '')
|
||||
|
||||
// 列表数据
|
||||
const itemList = ref([])
|
||||
const unitList = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
// 点击单位工程下拉
|
||||
const handleShowUnitPopup = () => {
|
||||
reqProjectWorkArea(currentProject.value.ProjectId).then(res => {
|
||||
unitList.value = res.data || []
|
||||
showUnitPopup.value = true
|
||||
})
|
||||
}
|
||||
|
||||
// 选择单位工程
|
||||
const handleUnitConfirm = (item) => {
|
||||
selectedUnit.value = item
|
||||
addInfo.unit_name = item.BaseInfoName
|
||||
addInfo.unitWorkId = item.BaseInfoId
|
||||
addInfo.BaseInfoCode = item.BaseInfoCode
|
||||
getTestPackageNo()
|
||||
}
|
||||
|
||||
// 试压条件变更
|
||||
const onFinishChange = (value) => {
|
||||
addInfo.isFinish_name = value ? '是' : '否'
|
||||
getTestPackageNo()
|
||||
}
|
||||
|
||||
// 跳转详情页
|
||||
const goDetail = (item) => {
|
||||
const params = {
|
||||
value: item
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/weldTwo/pressure/detail/main?params=${JSON.stringify(params)}`
|
||||
})
|
||||
}
|
||||
|
||||
// 获取单位工程列表
|
||||
const getUnitList = async () => {
|
||||
try {
|
||||
const projectId = uni.getStorageSync('projectId') || ''
|
||||
const res = await uni.$weld.getAllUnit(projectId)
|
||||
if (res.code === 1) {
|
||||
unitList.value = res.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取单位工程失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取试压包批号列表
|
||||
const getTestPackageNo = async () => {
|
||||
if (!addInfo.unitWorkId) return
|
||||
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await uni.$weld.getTestPackageNo(addInfo.unitWorkId, addInfo.isFinish, addInfo.testPackageNo)
|
||||
if (res.code === 1) {
|
||||
itemList.value = res.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取试压包批号失败:', error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 页面显示时加载数据
|
||||
onShow(() => {
|
||||
getUnitList()
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user