包装管理列表
This commit is contained in:
+7
-2
@@ -9,6 +9,11 @@ import {
|
||||
export const reqProjectWorkArea = (projectId)=>get(`BaseInfo/getProjectWorkArea?projectId=${projectId}`)
|
||||
|
||||
/**
|
||||
* 获取焊口位置
|
||||
* 请求焊口位置
|
||||
*/
|
||||
export const getWeldingLocation = ()=>get(`BaseInfo/getWeldingLocation`)
|
||||
export const reqWeldingLocation = ()=>get(`BaseInfo/getWeldingLocation`)
|
||||
|
||||
/**
|
||||
* 根据项目ID单位类型请求单位
|
||||
*/
|
||||
export const reqUnitByProjectIdUnitType = (projectId, unitType="")=>get(`Unit/getUnitByProjectIdUnitType?projectId=${projectId}&unitType=${unitType}`)
|
||||
@@ -34,4 +34,10 @@ export const reqSaveWeldingDailyByWeldJointId = (data) => get(
|
||||
/**
|
||||
* 点口
|
||||
*/
|
||||
export const reqGetManualPointSave = (weldJointId)=>get(`NDETrust/getManualPointSave?weldJointId=${weldJointId}`)
|
||||
export const reqGetManualPointSave = (weldJointId)=>get(`NDETrust/getManualPointSave?weldJointId=${weldJointId}`)
|
||||
|
||||
// ========================= 包装管理 ====================================
|
||||
/**
|
||||
* 包装管理列表
|
||||
*/
|
||||
export const reqPackagingInformationList = (data)=> get(`PackagingManage/GetPackagingInformationList?unitId=${data.unitId}&projectId=${data.projectId}&pageindex=${data.pageIndex}&pagesize=${data.pageSize}&packagingCode=${data.packagingCode}&hasTrainNumber=${data.hasTrainNumber}`)
|
||||
+334
-200
@@ -27,6 +27,7 @@
|
||||
// 首页
|
||||
.home {
|
||||
padding-top: 80px;
|
||||
|
||||
.u-border-bottom:after {
|
||||
border: none;
|
||||
}
|
||||
@@ -148,7 +149,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 快捷应用 & 业务查询公共样式
|
||||
.section-card {
|
||||
margin: 20rpx;
|
||||
@@ -156,7 +157,7 @@
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
|
||||
padding: 24rpx;
|
||||
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -165,12 +166,12 @@
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
|
||||
|
||||
.title-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.title-line {
|
||||
display: inline-block;
|
||||
width: 8rpx;
|
||||
@@ -179,16 +180,17 @@
|
||||
border-radius: 4rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.edit-btn {
|
||||
padding: 8rpx;
|
||||
opacity: 0.8;
|
||||
|
||||
&:active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.section-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
@@ -203,7 +205,7 @@
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.grid-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -212,11 +214,11 @@
|
||||
border-radius: 12rpx;
|
||||
transition: background 0.2s;
|
||||
min-width: 0;
|
||||
|
||||
|
||||
&:active {
|
||||
background: #f5f6f8;
|
||||
}
|
||||
|
||||
|
||||
.icon-box {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
@@ -225,7 +227,7 @@
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
.item-label {
|
||||
margin-top: 12rpx;
|
||||
font-size: 22rpx;
|
||||
@@ -238,7 +240,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 编辑快捷应用弹窗样式
|
||||
.edit-quick {
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
@@ -246,7 +248,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
.edit-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -256,14 +258,14 @@
|
||||
color: #333;
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
|
||||
|
||||
.edit-tip {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.edit-grid {
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
@@ -274,7 +276,7 @@
|
||||
min-height: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.edit-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -287,12 +289,12 @@
|
||||
position: relative;
|
||||
transition: all 0.25s;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
&.active {
|
||||
background: rgba($color: #4a7df5, $alpha: 0.08);
|
||||
border: 2rpx solid $u-type-primary;
|
||||
}
|
||||
|
||||
|
||||
.icon-box {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
@@ -300,7 +302,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.edit-label {
|
||||
margin-top: 14rpx;
|
||||
font-size: 22rpx;
|
||||
@@ -311,7 +313,7 @@
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.selected-mark {
|
||||
position: absolute;
|
||||
top: 6rpx;
|
||||
@@ -326,33 +328,38 @@
|
||||
box-shadow: 0 4rpx 12rpx rgba($color: $u-type-primary, $alpha: 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.edit-btns {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 10rpx;
|
||||
position: absolute;
|
||||
bottom: 10px;left:0;right:0;
|
||||
bottom: 10px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.u-size-medium {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.btn-cancel,
|
||||
.btn-confirm {
|
||||
height: 88rpx;
|
||||
font-size: 30rpx;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.btn-cancel {
|
||||
background: #f5f6f8;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
.btn-confirm {
|
||||
box-shadow: 0 4rpx 16rpx rgba($color: $u-type-primary, $alpha: 0.25);
|
||||
}
|
||||
@@ -373,38 +380,52 @@
|
||||
padding: 20rpx 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
|
||||
// 第一行:单位选择 + 刷新
|
||||
.filter-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
// 选择按钮
|
||||
.project-select-btn {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12rpx 24rpx;
|
||||
background: #f5f6f8;
|
||||
border-radius: 12rpx;
|
||||
max-height: 60rpx;
|
||||
|
||||
.select-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
.project-select-btn {
|
||||
flex: 1;
|
||||
margin-right: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f5f6f8;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 16rpx;
|
||||
max-height: 70rpx;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.u-input) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.u-input__input) {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f5f6f8;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
|
||||
.rotating {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索框
|
||||
// 第二行:搜索框
|
||||
.search-box {
|
||||
width: 90%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f5f6f8;
|
||||
@@ -412,6 +433,10 @@
|
||||
padding: 0 16rpx;
|
||||
max-height: 70rpx;
|
||||
|
||||
.u-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
@@ -424,211 +449,319 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
padding: 8rpx;
|
||||
// 搜索框 + 刷新按钮布局(用于 packaging/list)
|
||||
.search-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.rotating {
|
||||
animation: rotate 1s linear infinite;
|
||||
.u-search {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f5f6f8;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
|
||||
.rotating {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 车次关联 + 单位选择布局(用于 packaging/list)
|
||||
.filter-row.has-radio {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.u-radio-group {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.unit-select-btn {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: #f5f6f8;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.unit-name {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
margin-right: 6rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 300rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
// 列表区域
|
||||
.list-scroll {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
// 加载中
|
||||
.loading-box {
|
||||
// 悬浮新增按钮
|
||||
.fab-btn {
|
||||
position: fixed;
|
||||
right: 30rpx;
|
||||
bottom: 100rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: $u-type-primary;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 80rpx 0;
|
||||
box-shadow: 0 4rpx 20rpx rgba($color: $u-type-primary, $alpha: 0.4);
|
||||
z-index: 99;
|
||||
|
||||
.loading-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.list-wrap {
|
||||
padding: 24rpx 24rpx 60rpx;
|
||||
}
|
||||
|
||||
// 列表项:序号 + 标题 + 箭头
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 28rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
&:active {
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.item-index {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f0f3ff;
|
||||
color: $u-type-primary;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
opacity: 0.8;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading-more {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 32rpx 0;
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
// 列表区域
|
||||
.list-scroll {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
// 加载中
|
||||
.loading-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 80rpx 0;
|
||||
|
||||
.loading-text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-wrap {
|
||||
padding: 24rpx 24rpx 60rpx;
|
||||
}
|
||||
|
||||
// 列表项:序号 + 标题 + 箭头
|
||||
.list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 28rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
&:active {
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.no-more {
|
||||
text-align: center;
|
||||
padding: 32rpx 0;
|
||||
color: #ccc;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
// 操作按钮区域
|
||||
.action-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 24rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 16rpx 0;
|
||||
background: $u-type-primary;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 8rpx;
|
||||
|
||||
&:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 批号信息
|
||||
.batch-info {
|
||||
.item-index {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx;
|
||||
background: #ffffff;
|
||||
margin-top: 2rpx;
|
||||
justify-content: center;
|
||||
background: #f0f3ff;
|
||||
color: $u-type-primary;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.batch-refresh {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.item-title {
|
||||
flex: 1;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.rotating {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
.loading-more {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 32rpx 0;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.no-more {
|
||||
text-align: center;
|
||||
padding: 32rpx 0;
|
||||
color: #ccc;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
// 操作按钮区域
|
||||
.action-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 24rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 16rpx 0;
|
||||
background: $u-type-primary;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 8rpx;
|
||||
|
||||
&:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.batch-label {
|
||||
width: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
// 批号信息
|
||||
.batch-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx;
|
||||
background: #ffffff;
|
||||
margin-top: 2rpx;
|
||||
|
||||
.batch-value {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
.batch-refresh {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.rotating {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
// 卡片项
|
||||
.card-item {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
.batch-label {
|
||||
width: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.batch-value {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.card-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
// 卡片项
|
||||
.card-item {
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1rpx solid #f5f6f8;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
width: 160rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
|
||||
.card-value {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
.card-code {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-tag {
|
||||
display: inline-block;
|
||||
padding: 6rpx 20rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
background: rgba(244, 67, 54, 0.1);
|
||||
color: #f44336;
|
||||
margin-left: auto;
|
||||
|
||||
&.done {
|
||||
&.status-0 {
|
||||
background: rgba(153, 153, 153, 0.1);
|
||||
color: #999;
|
||||
}
|
||||
|
||||
&.status-1 {
|
||||
background: rgba(255, 167, 38, 0.1);
|
||||
color: #ffa726;
|
||||
}
|
||||
|
||||
&.status-2 {
|
||||
background: rgba(76, 175, 80, 0.1);
|
||||
color: #4caf50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding-top: 20rpx;
|
||||
|
||||
.card-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 14rpx 0;
|
||||
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1rpx dashed #f0f0f0;
|
||||
}
|
||||
|
||||
.row-label {
|
||||
width: 200rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.row-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 详情页通用样式
|
||||
@@ -701,6 +834,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 网格页面(试压管理等)
|
||||
.page-grid {
|
||||
min-height: 100vh;
|
||||
@@ -752,4 +886,4 @@
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
<scroll-view scroll-y="true" class="nbd-select-inner">
|
||||
<scroll-view scroll-y="true" class="nbd-select-inner" :scroll-into-view="scrollIntoView">
|
||||
<view class="nbd-select-inner-wrap">
|
||||
<!-- 空状态 -->
|
||||
<view class="nbd-select-empty" v-if="filteredList.length === 0">
|
||||
@@ -30,7 +30,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 列表项 -->
|
||||
<view v-for="(item, idx) in filteredList" :key="idx" class="nbd-select-item"
|
||||
<view v-for="(item, idx) in filteredList" :key="idx" :id="'item-' + idx" class="nbd-select-item"
|
||||
:class="{ active: isSelected(item) }" @click="handleItemClick(item)">
|
||||
<text class="nbd-select-item-text">{{ item[labelKey] }}</text>
|
||||
<view v-if="multiple" class="nbd-select-checkbox">
|
||||
@@ -133,6 +133,7 @@
|
||||
|
||||
const localVisible = ref(false)
|
||||
const searchKey = ref('')
|
||||
const scrollIntoView = ref('')
|
||||
|
||||
// 当前选中的项(多选时为数组)
|
||||
const selectedItems = ref(props.multiple ? (props.model || []) : (props.model || null))
|
||||
@@ -150,6 +151,17 @@
|
||||
if (val) {
|
||||
// 打开时重置搜索
|
||||
searchKey.value = ''
|
||||
// 滚动到选中的项
|
||||
setTimeout(() => {
|
||||
if (selectedItems.value && !props.multiple) {
|
||||
const index = props.list?.findIndex(item =>
|
||||
item[props.valueKey] === selectedItems.value[props.valueKey]
|
||||
)
|
||||
if (index !== undefined && index > -1) {
|
||||
scrollIntoView.value = 'item-' + index
|
||||
}
|
||||
}
|
||||
}, 300)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
<nbd-select v-model="showProject" title="请选择项目" :list="projectList" label-key="ProjectName" :show-search="true"
|
||||
value-key="ProjectId" :default-value="currentProject?.ProjectId" @search-change="handleSearchChange"
|
||||
value-key="ProjectId" v-model:model="currentProject" @search-change="handleSearchChange"
|
||||
@confirm="handleConfirmProject" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -14,13 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 关键字搜索 -->
|
||||
<view class="search-box">
|
||||
<u-icon name="search" :size="28" color="#999"></u-icon>
|
||||
<input class="search-input" placeholder="输入关键字过滤" v-model="keyword" />
|
||||
<view v-if="keyword" class="search-clear" @click="keyword = ''">
|
||||
<u-icon name="close-circle-fill" :size="28" color="#c0c4cc"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<u-search v-model="keyword" :show-action="false" shape="round" bg-color="#f5f6f8" />
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
@@ -46,7 +40,7 @@
|
||||
|
||||
<!-- 单位工程选择弹窗 -->
|
||||
<nbd-select v-model="showUnitWorkSelect" :show-search="true" title="请选择单位工程" :list="unitWorkList"
|
||||
label-key="BaseInfoName" value-key="BaseInfoId" @confirm="handleUnitWorkConfirm" />
|
||||
label-key="BaseInfoName" v-model:model="selectedUnitWork" value-key="BaseInfoId" @confirm="handleUnitWorkConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<view class="page-list">
|
||||
<!-- 头部过滤区域 -->
|
||||
<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>
|
||||
</view>
|
||||
<!-- 第二行:车次关联 + 单位选择 -->
|
||||
<view class="filter-row has-radio">
|
||||
<u-radio-group v-model="hasTrainNumber" @change="onTrainNumberChange">
|
||||
<u-radio :name="true" shape="button" label="已关联"></u-radio>
|
||||
<u-radio :name="false" shape="button" label="未关联"></u-radio>
|
||||
</u-radio-group>
|
||||
<view class="unit-select-btn" @click="handleShowUnitSelect">
|
||||
<text class="unit-name">{{ selectedUnit?.UnitName || '单位' }}</text>
|
||||
<u-icon name="arrow-down" :size="18" color="#999"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
<scroll-view class="list-scroll" scroll-y @scrolltolower="loadMore" refresher-enabled
|
||||
:refresher-triggered="refreshing" @refresh="handleRefresh">
|
||||
<view class="list-wrap">
|
||||
<view v-for="(item, index) in listData" :key="item.PackagingManageId || index" class="card-item"
|
||||
@click="handleItemClick(item)">
|
||||
<view class="card-header">
|
||||
<text class="card-code">{{ item.PackagingCode || '--' }}</text>
|
||||
<text class="card-tag" :class="'status-' + item.State">
|
||||
{{ getStatus(item.State) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-body">
|
||||
<view class="card-row">
|
||||
<text class="row-label">包装单位</text>
|
||||
<text class="row-value">{{ item.UnitName || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">预制工作包</text>
|
||||
<text class="row-value">{{ item.StackingPosition || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">车次</text>
|
||||
<text class="row-value">{{ item.TrainNumber || '未关联' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">数量</text>
|
||||
<text class="row-value">{{ item.ComponentCount || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">分类</text>
|
||||
<text class="row-value">{{ item.CategoryString || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">签收人</text>
|
||||
<text class="row-value">{{ item.ReceiveMan || '--' }}</text>
|
||||
</view>
|
||||
<view class="card-row">
|
||||
<text class="row-label">签收时间</text>
|
||||
<text class="row-value">{{ item.ReceiveDate || '--' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="!loading && listData.length === 0" mode="list" text="暂无数据"></u-empty>
|
||||
|
||||
<!-- 加载提示 -->
|
||||
<view v-if="loading && listData.length > 0" class="loading-more">
|
||||
<u-loading mode="circle" size="32"></u-loading>
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
|
||||
<!-- 没有更多 -->
|
||||
<view v-if="!loading && !hasMore && listData.length > 0" class="no-more">
|
||||
<text>— 没有更多了 —</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
n <!-- 新增按钮 -->
|
||||
<view class="fab-btn" @click="handleAdd">
|
||||
<u-icon name="plus" :size="60" color="#ffffff"></u-icon>
|
||||
</view>
|
||||
|
||||
<!-- 单位选择弹窗 -->
|
||||
<nbd-select v-model="showUnitSelect" v-model:model="selectedUnit" :show-search="true" title="选择单位" :list="unitList" label-key="UnitName"
|
||||
value-key="UnitId" @confirm="handleUnitConfirm" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
useUserStore
|
||||
} from '@/store'
|
||||
import {
|
||||
storeToRefs
|
||||
} from 'pinia'
|
||||
import {
|
||||
reqUnitByProjectIdUnitType
|
||||
} from '@/api/base.js'
|
||||
import {
|
||||
reqPackagingInformationList
|
||||
} from '@/api/hj.js'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const {
|
||||
currentProject
|
||||
} = storeToRefs(userStore)
|
||||
|
||||
// ===== 搜索 =====
|
||||
const keyword = ref('')
|
||||
|
||||
// ===== 车次关联 true:已关联 false:未关联 =====
|
||||
const hasTrainNumber = ref(true)
|
||||
const onTrainNumberChange = () => {
|
||||
resetAndLoad()
|
||||
}
|
||||
|
||||
// ===== 单位选择 =====
|
||||
const showUnitSelect = ref(false)
|
||||
const selectedUnit = ref({
|
||||
UnitId: '',
|
||||
UnitName: '全部单位'
|
||||
})
|
||||
const unitList = ref([])
|
||||
|
||||
const handleShowUnitSelect = async () => {
|
||||
// TODO: 请求单位列表
|
||||
const res = await reqUnitByProjectIdUnitType(currentProject.value.ProjectId)
|
||||
unitList.value = [{ UnitId: '', UnitName: '全部单位' }, ...(res.data || [])]
|
||||
showUnitSelect.value = true
|
||||
}
|
||||
|
||||
|
||||
const handleUnitConfirm = (item) => {
|
||||
selectedUnit.value = item
|
||||
showUnitSelect.value = false
|
||||
resetAndLoad()
|
||||
}
|
||||
|
||||
// ===== 列表数据 =====
|
||||
const listData = ref([])
|
||||
const loading = ref(false)
|
||||
const refreshing = ref(false)
|
||||
const hasMore = ref(true)
|
||||
const currentPage = ref(1)
|
||||
const pageSize = 20
|
||||
|
||||
// 加载数据
|
||||
const fetchData = async (isRefresh = false) => {
|
||||
if (loading.value || (!isRefresh && !hasMore.value)) return
|
||||
|
||||
loading.value = true
|
||||
if (isRefresh) {
|
||||
refreshing.value = true
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await reqPackagingInformationList({
|
||||
projectId: currentProject.value?.ProjectId,
|
||||
pageIndex: currentPage.value,
|
||||
pageSize,
|
||||
packagingCode: keyword.value,
|
||||
unitId: selectedUnit.value?.UnitId || '',
|
||||
hasTrainNumber: hasTrainNumber.value
|
||||
})
|
||||
|
||||
const pageData = res.data?.getDataList || []
|
||||
hasMore.value = pageData.length === pageSize
|
||||
|
||||
listData.value = [...listData.value, ...pageData]
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error)
|
||||
uni.showToast({
|
||||
title: '加载失败,请重试',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
refreshing.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 重置并重新加载
|
||||
const resetAndLoad = () => {
|
||||
currentPage.value = 1
|
||||
hasMore.value = true
|
||||
listData.value = []
|
||||
fetchData(true)
|
||||
}
|
||||
|
||||
// 下拉刷新
|
||||
const handleRefresh = () => {
|
||||
resetAndLoad()
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleSearch = () => {
|
||||
resetAndLoad()
|
||||
}
|
||||
|
||||
// 加载更多
|
||||
const loadMore = () => {
|
||||
if (!loading.value && hasMore.value) {
|
||||
currentPage.value++
|
||||
fetchData(false)
|
||||
}
|
||||
}
|
||||
|
||||
// 到场状态
|
||||
const getStatus = (val) => {
|
||||
const map = {
|
||||
'0': '未到场',
|
||||
'1': '已发货',
|
||||
'2': '已到场'
|
||||
}
|
||||
return map[String(val)] || '--'
|
||||
}
|
||||
|
||||
// 列表项点击
|
||||
const handleItemClick = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pipe/packaging/detail?id=${item.PackagingManageId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
const handleAdd = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pipe/packaging/add'
|
||||
})
|
||||
}
|
||||
|
||||
// ===== 生命周期 =====
|
||||
onMounted(() => {
|
||||
fetchData(true)
|
||||
})
|
||||
</script>
|
||||
@@ -99,7 +99,7 @@
|
||||
reqGetManualPointSave
|
||||
} from '@/api/hj.js'
|
||||
import {
|
||||
getWeldingLocation
|
||||
reqWeldingLocation
|
||||
} from '@/api/base.js'
|
||||
import { useUserStore } from '@/store'
|
||||
const userStroe = useUserStore()
|
||||
@@ -128,7 +128,7 @@
|
||||
// ===== 弹窗 ========
|
||||
// 焊口位置弹窗
|
||||
const handleShowLocationSelect = () => {
|
||||
getWeldingLocation().then(res => {
|
||||
reqWeldingLocation().then(res => {
|
||||
locationList.value = res.data
|
||||
showLocationPicker.value = true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user