diff --git a/api/base.js b/api/base.js index b54dcfb..dc880a4 100644 --- a/api/base.js +++ b/api/base.js @@ -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}`) \ No newline at end of file diff --git a/api/hj.js b/api/hj.js index 61bbc4d..84d2a3c 100644 --- a/api/hj.js +++ b/api/hj.js @@ -34,4 +34,10 @@ export const reqSaveWeldingDailyByWeldJointId = (data) => get( /** * 点口 */ -export const reqGetManualPointSave = (weldJointId)=>get(`NDETrust/getManualPointSave?weldJointId=${weldJointId}`) \ No newline at end of file +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}`) \ No newline at end of file diff --git a/assets/css/page.scss b/assets/css/page.scss index 90583a0..d1b98ef 100644 --- a/assets/css/page.scss +++ b/assets/css/page.scss @@ -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%; } -} +} \ No newline at end of file diff --git a/components/nbd-select.vue b/components/nbd-select.vue index 001fb83..c5d99d6 100644 --- a/components/nbd-select.vue +++ b/components/nbd-select.vue @@ -22,7 +22,7 @@ - + @@ -30,7 +30,7 @@ - {{ item[labelKey] }} @@ -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) } }) diff --git a/pages/index/index.vue b/pages/index/index.vue index e97e0a2..596a59f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -124,7 +124,7 @@ diff --git a/pipe/diankou/list.vue b/pipe/diankou/list.vue index b380614..a720f5c 100644 --- a/pipe/diankou/list.vue +++ b/pipe/diankou/list.vue @@ -14,13 +14,7 @@ - - - - - - - + @@ -46,7 +40,7 @@ + label-key="BaseInfoName" v-model:model="selectedUnitWork" value-key="BaseInfoId" @confirm="handleUnitWorkConfirm" /> diff --git a/pipe/packaging/add.vue b/pipe/packaging/add.vue new file mode 100644 index 0000000..02409e3 --- /dev/null +++ b/pipe/packaging/add.vue @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/pipe/packaging/list.vue b/pipe/packaging/list.vue index e69de29..8675e62 100644 --- a/pipe/packaging/list.vue +++ b/pipe/packaging/list.vue @@ -0,0 +1,247 @@ + + + \ No newline at end of file diff --git a/pipe/weld/daily_paper.vue b/pipe/weld/daily_paper.vue index 04908f1..a18b28d 100644 --- a/pipe/weld/daily_paper.vue +++ b/pipe/weld/daily_paper.vue @@ -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 })