style:修改模具出库、模具入库、上下模卡片样式

master
黄伟杰 1 month ago
parent 5aab6cad57
commit d537a23660

@ -22,11 +22,11 @@
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore" :lower-threshold="80">
<view class="list-wrap">
<view v-for="item in list" :key="item.id" class="card" @click="openDetail(item)">
<view class="card-head">
<view>
<view class="card-title">{{ textValue(item.no) }}</view>
<view class="card-sub">{{ t('moldGet.moldName') }}: {{ textValue(item.productNames) }}</view>
<view v-for="item in list" :key="item.id" class="type-card" @click="openDetail(item)">
<view class="card-header">
<view class="header-left">
<text class="type-name">{{ textValue(item.no) }}</text>
<text class="type-code">{{ t('moldGet.moldName') }}: {{ textValue(item.productNames) }}</text>
</view>
<view class="status-chip" :class="statusClass(item.status)">{{ statusLabel(item.status) }}</view>
</view>
@ -46,13 +46,13 @@
</view>
<view class="card-actions">
<view v-if="String(item.status) === '10'" class="action-btn edit-btn" @click.stop="openEdit(item)">
<text class="action-icon"></text>
<uni-icons type="compose" size="18" color="#ffffff"></uni-icons>
</view>
<view v-if="String(item.status) === '10'" class="action-btn approve-btn" @click.stop="approve(item)">
<text class="action-icon"></text>
<uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
</view>
<view v-if="String(item.status) === '10'" class="action-btn delete-btn" @click.stop="removeItem(item)">
<text class="action-icon">🗑</text>
<uni-icons type="trash" size="18" color="#ffffff"></uni-icons>
</view>
</view>
</view>
@ -658,26 +658,33 @@ onShow(async () => {
.list-wrap {
padding: 0 24rpx 130rpx;
}
.card {
background: #fff;
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 16rpx;
.type-card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
margin-bottom: 18rpx;
box-shadow: 0 4rpx 18rpx rgba(0, 0, 0, 0.05);
}
.card-head {
.card-header {
display: flex;
justify-content: space-between;
gap: 10rpx;
align-items: center;
padding-bottom: 18rpx;
border-bottom: 1rpx solid #edf0f3;
}
.card-title {
font-size: 30rpx;
.header-left {
display: flex;
flex-direction: column;
gap: 8rpx;
}
.type-name {
font-size: 32rpx;
font-weight: 700;
color: #1a3a5c;
color: #1f2d3d;
}
.card-sub {
margin-top: 8rpx;
color: #606266;
.type-code {
font-size: 24rpx;
color: #8a9099;
}
.status-chip {
padding: 6rpx 16rpx;
@ -697,51 +704,46 @@ onShow(async () => {
color: #096dd9;
}
.card-body {
margin-top: 14rpx;
padding-top: 16rpx;
}
.row {
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
align-items: center;
margin-top: 12rpx;
}
.label {
color: #909399;
font-size: 24rpx;
font-size: 26rpx;
color: #8a9099;
}
.value {
color: #303133;
font-size: 24rpx;
max-width: 66%;
font-size: 27rpx;
color: #30363d;
max-width: 62%;
text-align: right;
}
.card-actions {
margin-top: 8rpx;
margin-top: 24rpx;
display: flex;
justify-content: flex-end;
gap: 10rpx;
gap: 14rpx;
}
.action-btn {
width: 56rpx;
height: 56rpx;
border-radius: 10rpx;
width: 60rpx;
height: 60rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
}
.action-icon {
font-size: 26rpx;
}
.edit-btn {
background: rgba(24, 144, 255, 0.12);
color: #096dd9;
background: #1a3a5c;
}
.approve-btn {
background: rgba(82, 196, 26, 0.14);
color: #389e0d;
background: #18a058;
}
.delete-btn {
background: rgba(245, 34, 45, 0.12);
color: #cf1322;
background: #e34d59;
}
.hint {
text-align: center;

@ -4,8 +4,10 @@
<!-- 操作类型切换 -->
<view class="operate-tabs">
<view class="operate-tab" :class="{ active: query.operateType === '1' }" @click="switchOperateType('1')">{{ t('moldOperate.tabUp') }}</view>
<view class="operate-tab" :class="{ active: query.operateType === '2' }" @click="switchOperateType('2')">{{ t('moldOperate.tabDown') }}</view>
<view class="operate-tab" :class="{ active: query.operateType === '1' }" @click="switchOperateType('1')">{{
t('moldOperate.tabUp') }}</view>
<view class="operate-tab" :class="{ active: query.operateType === '2' }" @click="switchOperateType('2')">{{
t('moldOperate.tabDown') }}</view>
</view>
<!-- 列表查询区 -->
@ -13,30 +15,32 @@
<view class="search-row">
<view class="search-input-wrap">
<text class="iconfont icon-search search-icon"></text>
<input v-model="query.remark" class="search-input" :placeholder="t('moldOperate.searchRemark')" @confirm="handleSearch" />
<input v-model="query.remark" class="search-input" :placeholder="t('moldOperate.searchRemark')"
@confirm="handleSearch" />
</view>
<view class="search-btn" @click="handleSearch">{{ t('functionCommon.search') }}</view>
</view>
<view class="filter-row">
<picker mode="selector" :range="moldFilterOptions" range-key="name" :value="moldIndex" @change="onMoldFilterChange">
<picker mode="selector" :range="moldFilterOptions" range-key="name" :value="moldIndex"
@change="onMoldFilterChange">
<view class="filter-item">{{ moldFilterLabel }}</view>
</picker>
</view>
</view>
<!-- 列表区 -->
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore" :lower-threshold="80">
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore"
:lower-threshold="80">
<view class="list-wrap">
<view v-for="item in list" :key="item.id" class="card" @click="openDetail(item)">
<view class="card-head">
<view class="card-title">{{ textValue(item.moldName) }}</view>
<view v-for="item in list" :key="item.id" class="type-card" @click="openDetail(item)">
<view class="card-header">
<view class="header-left">
<text class="type-name">{{ textValue(item.moldName) }}</text>
<text class="type-code">{{ t('moldOperate.deviceName') }}: {{ textValue(item.deviceName) }}</text>
</view>
<view class="type-chip">{{ typeLabel(item.operateType) }}</view>
</view>
<view class="card-body">
<view class="row">
<text class="label">{{ t('moldOperate.deviceName') }}</text>
<text class="value">{{ textValue(item.deviceName) }}</text>
</view>
<view class="row">
<text class="label">{{ t('moldOperate.creatorName') }}</text>
<text class="value">{{ textValue(item.creatorName) }}</text>
@ -48,10 +52,10 @@
</view>
<view class="card-actions">
<view class="action-btn edit-btn" @click.stop="openEdit(item)">
<uni-icons type="compose" size="18" color="#096dd9"></uni-icons>
<uni-icons type="compose" size="18" color="#ffffff"></uni-icons>
</view>
<view class="action-btn delete-btn" @click.stop="removeItem(item)">
<uni-icons type="trash" size="18" color="#cf1322"></uni-icons>
<uni-icons type="trash" size="18" color="#ffffff"></uni-icons>
</view>
</view>
</view>
@ -75,27 +79,32 @@
<uni-popup ref="formPopupRef" type="bottom">
<view class="form-popup">
<view class="popup-header">
<text class="popup-title">{{ formMode === 'create' ? t('moldOperate.createTitle') : t('moldOperate.editTitle') }}</text>
<text class="popup-title">{{ formMode === 'create' ? t('moldOperate.createTitle') : t('moldOperate.editTitle')
}}</text>
<text class="popup-close" @click="closeForm">×</text>
</view>
<scroll-view scroll-y class="popup-scroll">
<view class="form-item">
<text class="form-label"><text class="required">*</text>{{ t('moldOperate.operateType') }}</text>
<view class="radio-row">
<view class="radio-item" :class="{ active: String(formData.operateType) === '1' }" @click="changeFormOperateType('1')">{{ t('moldOperate.tabUp') }}</view>
<view class="radio-item" :class="{ active: String(formData.operateType) === '2' }" @click="changeFormOperateType('2')">{{ t('moldOperate.tabDown') }}</view>
<view class="radio-item" :class="{ active: String(formData.operateType) === '1' }"
@click="changeFormOperateType('1')">{{ t('moldOperate.tabUp') }}</view>
<view class="radio-item" :class="{ active: String(formData.operateType) === '2' }"
@click="changeFormOperateType('2')">{{ t('moldOperate.tabDown') }}</view>
</view>
</view>
<view class="form-item">
<text class="form-label"><text class="required">*</text>{{ t('moldOperate.device') }}</text>
<picker mode="selector" :range="deviceOptions" range-key="label" :value="formDeviceIndex" @change="onFormDeviceChange">
<picker mode="selector" :range="deviceOptions" range-key="label" :value="formDeviceIndex"
@change="onFormDeviceChange">
<view class="picker-view">{{ formDeviceLabel || t('moldOperate.placeholderDevice') }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label"><text class="required">*</text>{{ String(formData.operateType) === '2' ? t('moldOperate.lowerMold') : t('moldOperate.mold') }}</text>
<text class="form-label"><text class="required">*</text>{{ String(formData.operateType) === '2' ?
t('moldOperate.lowerMold') : t('moldOperate.mold') }}</text>
<view class="sub-action block" @click="openMoldPicker">{{ t('moldOperate.selectMold') }}</view>
</view>
<view v-if="!selectedMolds.length" class="item-empty">{{ t('moldOperate.noSelectedMold') }}</view>
@ -109,7 +118,8 @@
<view class="form-item">
<text class="form-label">{{ t('moldOperate.remark') }}</text>
<textarea v-model="formData.remark" class="form-textarea" :placeholder="t('moldOperate.placeholderRemark')" maxlength="200" />
<textarea v-model="formData.remark" class="form-textarea" :placeholder="t('moldOperate.placeholderRemark')"
maxlength="200" />
</view>
</scroll-view>
<view class="popup-footer">
@ -478,67 +488,435 @@ onShow(async () => {
</script>
<style lang="scss" scoped>
.page-container { min-height: 100vh; background: #f0f2f5; }
.operate-tabs { margin: 14rpx 24rpx 0; display: flex; background: #fff; border-radius: 12rpx; padding: 8rpx; }
.operate-tab { flex: 1; text-align: center; padding: 14rpx 0; border-radius: 8rpx; color: #606266; }
.operate-tab.active { background: #1a3a5c; color: #fff; font-weight: 600; }
.search-card { margin: 14rpx 24rpx 18rpx; padding: 20rpx; border-radius: 16rpx; background: #fff; }
.search-row { display: flex; gap: 16rpx; }
.search-input-wrap { flex: 1; display: flex; align-items: center; background: #f5f7fa; border-radius: 40rpx; padding: 0 20rpx; }
.search-icon { color: #909399; }
.search-input { flex: 1; height: 72rpx; margin-left: 12rpx; }
.search-btn { min-width: 120rpx; height: 72rpx; border-radius: 36rpx; background: #1a3a5c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26rpx; }
.filter-row { margin-top: 16rpx; display: flex; gap: 14rpx; }
.filter-item { min-width: 220rpx; padding: 12rpx 18rpx; border-radius: 10rpx; background: #f5f7fa; color: #303133; font-size: 24rpx; }
.list-scroll { height: calc(100vh - 420rpx); }
.list-wrap { padding: 0 24rpx 130rpx; }
.card { background: #fff; border-radius: 16rpx; padding: 20rpx; margin-bottom: 16rpx; }
.card-head { display: flex; justify-content: space-between; gap: 10rpx; align-items: center; }
.card-title { font-size: 30rpx; font-weight: 700; color: #1a3a5c; flex: 1; }
.type-chip { padding: 6rpx 16rpx; border-radius: 20rpx; font-size: 22rpx; color: #096dd9; background: rgba(24, 144, 255, 0.12); }
.card-body { margin-top: 14rpx; }
.row { display: flex; justify-content: space-between; margin-bottom: 10rpx; }
.label { color: #909399; font-size: 24rpx; }
.value { color: #303133; font-size: 24rpx; max-width: 66%; text-align: right; }
.card-actions { margin-top: 8rpx; display: flex; justify-content: flex-end; gap: 10rpx; }
.action-btn { width: 56rpx; height: 56rpx; border-radius: 10rpx; display: flex; align-items: center; justify-content: center; }
.edit-btn { background: rgba(24, 144, 255, 0.12); }
.delete-btn { background: rgba(245, 34, 45, 0.12); }
.hint { text-align: center; color: #909399; padding: 24rpx 0; }
.fab-btn { position: fixed; right: 34rpx; bottom: 120rpx; width: 96rpx; height: 96rpx; border-radius: 50%; background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 10rpx 30rpx rgba(26, 58, 92, 0.3); z-index: 20; }
.go-top-btn { position: fixed; right: 34rpx; bottom: 240rpx; width: 80rpx; height: 80rpx; border-radius: 50%; background: #fff; box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12); display: flex; align-items: center; justify-content: center; }
.form-popup { background: #fff; border-radius: 22rpx 22rpx 0 0; max-height: 88vh; }
.popup-header { height: 96rpx; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1rpx solid #f0f0f0; }
.popup-title { font-size: 30rpx; font-weight: 700; }
.popup-close { position: absolute; right: 28rpx; top: 20rpx; font-size: 44rpx; color: #909399; }
.popup-scroll { max-height: calc(88vh - 180rpx); padding: 20rpx 26rpx; }
.form-item { margin-bottom: 18rpx; }
.form-label { font-size: 24rpx; color: #606266; margin-bottom: 8rpx; display: block; }
.required { color: #f56c6c; margin-right: 6rpx; }
.radio-row { display: flex; gap: 12rpx; }
.radio-item { flex: 1; text-align: center; padding: 18rpx 0; border-radius: 10rpx; background: #f5f7fa; color: #606266; }
.radio-item.active { background: rgba(26, 58, 92, 0.12); color: #1a3a5c; font-weight: 600; }
.picker-view { min-height: 72rpx; border-radius: 12rpx; background: #f5f7fa; padding: 0 18rpx; display: flex; align-items: center; }
.sub-action { color: #1a3a5c; font-size: 24rpx; }
.sub-action.block { background: #f5f7fa; border-radius: 10rpx; padding: 18rpx; text-align: center; }
.item-empty { padding: 20rpx; color: #909399; text-align: center; }
.selected-item { margin-top: 10rpx; border-radius: 12rpx; background: #f8fafc; padding: 14rpx; display: flex; justify-content: space-between; align-items: center; }
.selected-name { color: #303133; font-size: 24rpx; }
.selected-code { color: #909399; font-size: 22rpx; margin-top: 4rpx; }
.item-remove { color: #f56c6c; font-size: 34rpx; }
.form-textarea { width: 100%; min-height: 120rpx; border-radius: 12rpx; background: #f5f7fa; padding: 14rpx 18rpx; }
.popup-footer { height: 88rpx; display: flex; }
.footer-btn { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 28rpx; }
.cancel { background: #f5f7fa; color: #606266; }
.confirm { background: #1a3a5c; color: #fff; }
.picker-popup { background: #fff; border-radius: 22rpx 22rpx 0 0; height: 70vh; }
.picker-header { height: 90rpx; display: flex; justify-content: center; align-items: center; position: relative; }
.picker-title { font-size: 28rpx; font-weight: 700; }
.picker-close { position: absolute; right: 24rpx; top: 18rpx; font-size: 42rpx; }
.picker-scroll { height: calc(70vh - 90rpx); }
.picker-item { margin: 0 24rpx 12rpx; padding: 16rpx; border-radius: 12rpx; background: #f8fafc; display: flex; justify-content: space-between; align-items: center; }
.picker-item-name { color: #303133; font-size: 26rpx; }
.picker-item-code { color: #909399; font-size: 22rpx; margin-top: 6rpx; }
.picker-check { color: #1a3a5c; font-size: 34rpx; }
.picker-hint { text-align: center; color: #909399; padding: 16rpx 0 22rpx; }
.page-container {
min-height: 100vh;
background: #f0f2f5;
}
.operate-tabs {
margin: 14rpx 24rpx 0;
display: flex;
background: #fff;
border-radius: 12rpx;
padding: 8rpx;
}
.operate-tab {
flex: 1;
text-align: center;
padding: 14rpx 0;
border-radius: 8rpx;
color: #606266;
}
.operate-tab.active {
background: #1a3a5c;
color: #fff;
font-weight: 600;
}
.search-card {
margin: 14rpx 24rpx 18rpx;
padding: 20rpx;
border-radius: 16rpx;
background: #fff;
}
.search-row {
display: flex;
gap: 16rpx;
}
.search-input-wrap {
flex: 1;
display: flex;
align-items: center;
background: #f5f7fa;
border-radius: 40rpx;
padding: 0 20rpx;
}
.search-icon {
color: #909399;
}
.search-input {
flex: 1;
height: 72rpx;
margin-left: 12rpx;
}
.search-btn {
min-width: 120rpx;
height: 72rpx;
border-radius: 36rpx;
background: #1a3a5c;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
}
.filter-row {
margin-top: 16rpx;
display: flex;
gap: 14rpx;
}
.filter-item {
min-width: 220rpx;
padding: 12rpx 18rpx;
border-radius: 10rpx;
background: #f5f7fa;
color: #303133;
font-size: 24rpx;
}
.list-scroll {
height: calc(100vh - 420rpx);
}
.list-wrap {
padding: 0 24rpx 130rpx;
}
.type-card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
margin-bottom: 18rpx;
box-shadow: 0 4rpx 18rpx rgba(0, 0, 0, 0.05);
}
.card-header {
display: flex;
justify-content: space-between;
gap: 10rpx;
align-items: center;
padding-bottom: 18rpx;
border-bottom: 1rpx solid #edf0f3;
}
.header-left {
display: flex;
flex-direction: column;
gap: 8rpx;
}
.type-name {
font-size: 32rpx;
font-weight: 700;
color: #1f2d3d;
}
.type-code {
font-size: 24rpx;
color: #8a9099;
}
.type-chip {
padding: 6rpx 16rpx;
border-radius: 20rpx;
font-size: 22rpx;
color: #096dd9;
background: rgba(24, 144, 255, 0.12);
}
.card-body {
padding-top: 16rpx;
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 12rpx;
}
.label {
font-size: 26rpx;
color: #8a9099;
}
.value {
font-size: 27rpx;
color: #30363d;
max-width: 62%;
text-align: right;
}
.card-actions {
margin-top: 24rpx;
display: flex;
justify-content: flex-end;
gap: 14rpx;
}
.action-btn {
width: 60rpx;
height: 60rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
}
.edit-btn {
background: #1a3a5c;
}
.delete-btn {
background: #e34d59;
}
.hint {
text-align: center;
color: #909399;
padding: 24rpx 0;
}
.fab-btn {
position: fixed;
right: 34rpx;
bottom: 120rpx;
width: 96rpx;
height: 96rpx;
border-radius: 50%;
background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 10rpx 30rpx rgba(26, 58, 92, 0.3);
z-index: 20;
}
.go-top-btn {
position: fixed;
right: 34rpx;
bottom: 240rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #fff;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
display: flex;
align-items: center;
justify-content: center;
}
.form-popup {
background: #fff;
border-radius: 22rpx 22rpx 0 0;
max-height: 88vh;
}
.popup-header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
border-bottom: 1rpx solid #f0f0f0;
}
.popup-title {
font-size: 30rpx;
font-weight: 700;
}
.popup-close {
position: absolute;
right: 28rpx;
top: 20rpx;
font-size: 44rpx;
color: #909399;
}
.popup-scroll {
max-height: calc(88vh - 180rpx);
padding: 20rpx 26rpx;
}
.form-item {
margin-bottom: 18rpx;
}
.form-label {
font-size: 24rpx;
color: #606266;
margin-bottom: 8rpx;
display: block;
}
.required {
color: #f56c6c;
margin-right: 6rpx;
}
.radio-row {
display: flex;
gap: 12rpx;
}
.radio-item {
flex: 1;
text-align: center;
padding: 18rpx 0;
border-radius: 10rpx;
background: #f5f7fa;
color: #606266;
}
.radio-item.active {
background: rgba(26, 58, 92, 0.12);
color: #1a3a5c;
font-weight: 600;
}
.picker-view {
min-height: 72rpx;
border-radius: 12rpx;
background: #f5f7fa;
padding: 0 18rpx;
display: flex;
align-items: center;
}
.sub-action {
color: #1a3a5c;
font-size: 24rpx;
}
.sub-action.block {
background: #f5f7fa;
border-radius: 10rpx;
padding: 18rpx;
text-align: center;
}
.item-empty {
padding: 20rpx;
color: #909399;
text-align: center;
}
.selected-item {
margin-top: 10rpx;
border-radius: 12rpx;
background: #f8fafc;
padding: 14rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.selected-name {
color: #303133;
font-size: 24rpx;
}
.selected-code {
color: #909399;
font-size: 22rpx;
margin-top: 4rpx;
}
.item-remove {
color: #f56c6c;
font-size: 34rpx;
}
.form-textarea {
width: 100%;
min-height: 120rpx;
border-radius: 12rpx;
background: #f5f7fa;
padding: 14rpx 18rpx;
}
.popup-footer {
height: 88rpx;
display: flex;
}
.footer-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.cancel {
background: #f5f7fa;
color: #606266;
}
.confirm {
background: #1a3a5c;
color: #fff;
}
.picker-popup {
background: #fff;
border-radius: 22rpx 22rpx 0 0;
height: 70vh;
}
.picker-header {
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.picker-title {
font-size: 28rpx;
font-weight: 700;
}
.picker-close {
position: absolute;
right: 24rpx;
top: 18rpx;
font-size: 42rpx;
}
.picker-scroll {
height: calc(70vh - 90rpx);
}
.picker-item {
margin: 0 24rpx 12rpx;
padding: 16rpx;
border-radius: 12rpx;
background: #f8fafc;
display: flex;
justify-content: space-between;
align-items: center;
}
.picker-item-name {
color: #303133;
font-size: 26rpx;
}
.picker-item-code {
color: #909399;
font-size: 22rpx;
margin-top: 6rpx;
}
.picker-check {
color: #1a3a5c;
font-size: 34rpx;
}
.picker-hint {
text-align: center;
color: #909399;
padding: 16rpx 0 22rpx;
}
</style>

@ -7,28 +7,32 @@
<view class="search-row">
<view class="search-input-wrap">
<text class="iconfont icon-search search-icon"></text>
<input v-model="query.no" class="search-input" :placeholder="t('moldReturn.searchNo')" @confirm="handleSearch" />
<input v-model="query.no" class="search-input" :placeholder="t('moldReturn.searchNo')"
@confirm="handleSearch" />
</view>
<view class="search-btn" @click="handleSearch">{{ t('functionCommon.search') }}</view>
</view>
<view class="filter-row">
<picker mode="selector" :range="warehouseOptions" range-key="name" :value="warehouseIndex" @change="onWarehouseFilterChange">
<picker mode="selector" :range="warehouseOptions" range-key="name" :value="warehouseIndex"
@change="onWarehouseFilterChange">
<view class="filter-item">{{ warehouseFilterLabel }}</view>
</picker>
<picker mode="selector" :range="statusOptions" range-key="label" :value="statusIndex" @change="onStatusFilterChange">
<picker mode="selector" :range="statusOptions" range-key="label" :value="statusIndex"
@change="onStatusFilterChange">
<view class="filter-item">{{ statusFilterLabel }}</view>
</picker>
</view>
</view>
<!-- 列表区 -->
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore" :lower-threshold="80">
<scroll-view scroll-y class="list-scroll" :scroll-top="scrollTop" @scroll="onScroll" @scrolltolower="loadMore"
:lower-threshold="80">
<view class="list-wrap">
<view v-for="item in list" :key="item.id" class="card" @click="openDetail(item)">
<view class="card-head">
<view>
<view class="card-title">{{ textValue(item.no) }}</view>
<view class="card-sub">{{ t('moldReturn.moldName') }}: {{ textValue(item.productNames) }}</view>
<view v-for="item in list" :key="item.id" class="type-card" @click="openDetail(item)">
<view class="card-header">
<view class="header-left">
<text class="type-name">{{ textValue(item.no) }}</text>
<text class="type-code">{{ t('moldReturn.moldName') }}: {{ textValue(item.productNames) }}</text>
</view>
<view class="status-chip" :class="statusClass(item.status)">{{ statusLabel(item.status) }}</view>
</view>
@ -48,13 +52,13 @@
</view>
<view class="card-actions">
<view v-if="String(item.status) === '10'" class="action-btn edit-btn" @click.stop="openEdit(item)">
<uni-icons type="compose" size="18" color="#096dd9"></uni-icons>
<uni-icons type="compose" size="18" color="#ffffff"></uni-icons>
</view>
<view v-if="String(item.status) === '10'" class="action-btn approve-btn" @click.stop="approve(item)">
<uni-icons type="checkmarkempty" size="18" color="#389e0d"></uni-icons>
<uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
</view>
<view v-if="String(item.status) === '10'" class="action-btn delete-btn" @click.stop="removeItem(item)">
<uni-icons type="trash" size="18" color="#cf1322"></uni-icons>
<uni-icons type="trash" size="18" color="#ffffff"></uni-icons>
</view>
</view>
</view>
@ -78,7 +82,8 @@
<uni-popup ref="formPopupRef" type="bottom">
<view class="form-popup">
<view class="popup-header">
<text class="popup-title">{{ formMode === 'create' ? t('moldReturn.createTitle') : t('moldReturn.editTitle') }}</text>
<text class="popup-title">{{ formMode === 'create' ? t('moldReturn.createTitle') : t('moldReturn.editTitle')
}}</text>
<text class="popup-close" @click="closeForm">×</text>
</view>
<scroll-view scroll-y class="popup-scroll">
@ -88,7 +93,8 @@
</view>
<view class="form-item">
<text class="form-label">{{ t('moldReturn.inNo') }}</text>
<input class="form-input disabled" :value="textValue(formData.no)" :placeholder="t('moldReturn.noAuto')" disabled />
<input class="form-input disabled" :value="textValue(formData.no)" :placeholder="t('moldReturn.noAuto')"
disabled />
</view>
<view class="form-item">
<text class="form-label"><text class="required">*</text>{{ t('moldReturn.inTimeSingle') }}</text>
@ -98,17 +104,20 @@
</view>
<view class="form-item">
<text class="form-label"><text class="required">*</text>{{ t('moldReturn.warehouse') }}</text>
<picker mode="selector" :range="warehouseOptions" range-key="name" :value="formWarehouseIndex" @change="onFormWarehouseChange">
<picker mode="selector" :range="warehouseOptions" range-key="name" :value="formWarehouseIndex"
@change="onFormWarehouseChange">
<view class="picker-view">{{ formWarehouseLabel || t('moldReturn.warehousePlaceholder') }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">{{ t('moldReturn.attachment') }}</text>
<input v-model="formData.fileUrl" class="form-input" type="text" :placeholder="t('moldReturn.fileUrlPlaceholder')" />
<input v-model="formData.fileUrl" class="form-input" type="text"
:placeholder="t('moldReturn.fileUrlPlaceholder')" />
</view>
<view class="form-item">
<text class="form-label">{{ t('moldReturn.remark') }}</text>
<textarea v-model="formData.remark" class="form-textarea" :placeholder="t('moldReturn.remarkPlaceholder')" maxlength="200" />
<textarea v-model="formData.remark" class="form-textarea" :placeholder="t('moldReturn.remarkPlaceholder')"
maxlength="200" />
</view>
<view class="sub-title-row">
<text class="sub-title"><text class="required">*</text>{{ t('moldReturn.itemListTitle') }}</text>
@ -150,10 +159,12 @@
</view>
<view class="picker-search">
<view class="picker-search-row">
<input v-model="moldQuery.code" class="picker-search-input" :placeholder="t('moldReturn.searchCode')" @confirm="handleMoldSearch" />
<input v-model="moldQuery.code" class="picker-search-input" :placeholder="t('moldReturn.searchCode')"
@confirm="handleMoldSearch" />
</view>
<view class="picker-search-row">
<input v-model="moldQuery.name" class="picker-search-input" :placeholder="t('moldReturn.searchName')" @confirm="handleMoldSearch" />
<input v-model="moldQuery.name" class="picker-search-input" :placeholder="t('moldReturn.searchName')"
@confirm="handleMoldSearch" />
</view>
<view class="picker-search-actions">
<view class="picker-action-btn" @click="handleMoldSearch">{{ t('functionCommon.search') }}</view>
@ -166,7 +177,8 @@
<view class="picker-item-name">{{ textValue(m.name) }}</view>
<view class="picker-item-code">{{ textValue(m.code) }}</view>
<view class="picker-item-meta">
{{ t('moldReturn.moldStatus') }}: {{ moldStatusLabel(m.status) }} · {{ t('moldReturn.moldUseTime') }}: {{ textValue(m.useTime) }}
{{ t('moldReturn.moldStatus') }}: {{ moldStatusLabel(m.status) }} · {{ t('moldReturn.moldUseTime') }}:
{{ textValue(m.useTime) }}
</view>
</view>
<text class="picker-check">{{ formItemIds.has(Number(m.id)) ? '✓' : '' }}</text>
@ -550,78 +562,477 @@ onShow(async () => {
</script>
<style lang="scss" scoped>
.page-container { min-height: 100vh; background: #f0f2f5; }
.search-card { margin: 18rpx 24rpx; padding: 20rpx; border-radius: 16rpx; background: #fff; }
.search-row { display: flex; gap: 16rpx; }
.search-input-wrap { flex: 1; display: flex; align-items: center; background: #f5f7fa; border-radius: 40rpx; padding: 0 20rpx; }
.search-icon { color: #909399; }
.search-input { flex: 1; height: 72rpx; margin-left: 12rpx; }
.search-btn { min-width: 120rpx; height: 72rpx; border-radius: 36rpx; background: #1a3a5c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26rpx; }
.filter-row { margin-top: 16rpx; display: flex; gap: 14rpx; }
.filter-item { min-width: 220rpx; padding: 12rpx 18rpx; border-radius: 10rpx; background: #f5f7fa; color: #303133; font-size: 24rpx; }
.list-scroll { height: calc(100vh - 360rpx); }
.list-wrap { padding: 0 24rpx 130rpx; }
.card { background: #fff; border-radius: 16rpx; padding: 20rpx; margin-bottom: 16rpx; }
.card-head { display: flex; justify-content: space-between; gap: 10rpx; }
.card-title { font-size: 30rpx; font-weight: 700; color: #1a3a5c; }
.card-sub { margin-top: 8rpx; color: #606266; font-size: 24rpx; }
.status-chip { padding: 6rpx 16rpx; border-radius: 20rpx; font-size: 22rpx; }
.status-draft { background: rgba(250, 173, 20, 0.12); color: #ad6800; }
.status-approved { background: rgba(82, 196, 26, 0.12); color: #389e0d; }
.status-other { background: rgba(24, 144, 255, 0.12); color: #096dd9; }
.card-body { margin-top: 14rpx; }
.row { display: flex; justify-content: space-between; margin-bottom: 10rpx; }
.label { color: #909399; font-size: 24rpx; }
.value { color: #303133; font-size: 24rpx; max-width: 66%; text-align: right; }
.card-actions { margin-top: 8rpx; display: flex; justify-content: flex-end; gap: 10rpx; }
.action-btn { width: 56rpx; height: 56rpx; border-radius: 10rpx; display: flex; align-items: center; justify-content: center; }
.edit-btn { background: rgba(24, 144, 255, 0.12); }
.approve-btn { background: rgba(82, 196, 26, 0.14); }
.delete-btn { background: rgba(245, 34, 45, 0.12); }
.hint { text-align: center; color: #909399; padding: 24rpx 0; }
.fab-btn { position: fixed; right: 34rpx; bottom: 120rpx; width: 96rpx; height: 96rpx; border-radius: 50%; background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%); display: flex; align-items: center; justify-content: center; box-shadow: 0 10rpx 30rpx rgba(26, 58, 92, 0.3); z-index: 20; }
.go-top-btn { position: fixed; right: 34rpx; bottom: 240rpx; width: 80rpx; height: 80rpx; border-radius: 50%; background: #fff; box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12); display: flex; align-items: center; justify-content: center; }
.form-popup { background: #fff; border-radius: 22rpx 22rpx 0 0; max-height: 88vh; }
.popup-header { height: 96rpx; display: flex; align-items: center; justify-content: center; position: relative; border-bottom: 1rpx solid #f0f0f0; }
.popup-title { font-size: 30rpx; font-weight: 700; }
.popup-close { position: absolute; right: 28rpx; top: 20rpx; font-size: 44rpx; color: #909399; }
.popup-scroll { max-height: calc(88vh - 180rpx); padding: 20rpx 26rpx; }
.form-item { margin-bottom: 18rpx; }
.form-label { font-size: 24rpx; color: #606266; margin-bottom: 8rpx; display: block; }
.required { color: #f56c6c; margin-right: 6rpx; }
.form-input,.picker-view { min-height: 72rpx; border-radius: 12rpx; background: #f5f7fa; padding: 0 18rpx; display: flex; align-items: center; }
.disabled { color: #909399; }
.form-textarea { width: 100%; min-height: 120rpx; border-radius: 12rpx; background: #f5f7fa; padding: 14rpx 18rpx; }
.sub-title-row { margin-top: 20rpx; display: flex; justify-content: space-between; align-items: center; }
.sub-title { font-size: 26rpx; font-weight: 600; }
.sub-action { color: #1a3a5c; font-size: 24rpx; }
.item-empty { padding: 20rpx; color: #909399; text-align: center; }
.item-card { margin-top: 14rpx; border-radius: 12rpx; background: #f8fafc; padding: 16rpx; }
.item-head { display: flex; justify-content: space-between; }
.item-name { color: #1a3a5c; font-size: 26rpx; font-weight: 600; }
.item-remove { color: #f56c6c; font-size: 34rpx; }
.item-row { margin-top: 10rpx; }
.item-label { color: #909399; font-size: 22rpx; }
.item-input { margin-top: 6rpx; min-height: 64rpx; border-radius: 10rpx; background: #fff; padding: 0 14rpx; }
.popup-footer { height: 88rpx; display: flex; }
.footer-btn { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 28rpx; }
.cancel { background: #f5f7fa; color: #606266; }
.confirm { background: #1a3a5c; color: #fff; }
.picker-popup { background: #fff; border-radius: 22rpx 22rpx 0 0; height: 72vh; }
.picker-header { height: 90rpx; display: flex; justify-content: center; align-items: center; position: relative; }
.picker-title { font-size: 28rpx; font-weight: 700; }
.picker-close { position: absolute; right: 24rpx; top: 18rpx; font-size: 42rpx; }
.picker-search { padding: 0 24rpx 12rpx; }
.picker-search-row { margin-bottom: 10rpx; }
.picker-search-input { height: 68rpx; border-radius: 10rpx; background: #f5f7fa; padding: 0 14rpx; }
.picker-search-actions { margin-top: 6rpx; display: flex; gap: 12rpx; }
.picker-action-btn { min-width: 110rpx; height: 56rpx; border-radius: 10rpx; background: #1a3a5c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22rpx; }
.picker-action-btn.reset { background: #eef1f4; color: #606266; }
.picker-scroll { height: calc(72vh - 150rpx); }
.picker-item { margin: 0 24rpx 12rpx; padding: 16rpx; border-radius: 12rpx; background: #f8fafc; display: flex; justify-content: space-between; align-items: center; }
.picker-item-name { color: #303133; font-size: 26rpx; }
.picker-item-code { color: #909399; font-size: 22rpx; margin-top: 6rpx; }
.picker-item-meta { color: #909399; font-size: 20rpx; margin-top: 4rpx; }
.picker-check { color: #1a3a5c; font-size: 34rpx; }
.picker-hint { text-align: center; color: #909399; padding: 16rpx 0 22rpx; }
.page-container {
min-height: 100vh;
background: #f0f2f5;
}
.search-card {
margin: 18rpx 24rpx;
padding: 20rpx;
border-radius: 16rpx;
background: #fff;
}
.search-row {
display: flex;
gap: 16rpx;
}
.search-input-wrap {
flex: 1;
display: flex;
align-items: center;
background: #f5f7fa;
border-radius: 40rpx;
padding: 0 20rpx;
}
.search-icon {
color: #909399;
}
.search-input {
flex: 1;
height: 72rpx;
margin-left: 12rpx;
}
.search-btn {
min-width: 120rpx;
height: 72rpx;
border-radius: 36rpx;
background: #1a3a5c;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
}
.filter-row {
margin-top: 16rpx;
display: flex;
gap: 14rpx;
}
.filter-item {
min-width: 220rpx;
padding: 12rpx 18rpx;
border-radius: 10rpx;
background: #f5f7fa;
color: #303133;
font-size: 24rpx;
}
.list-scroll {
height: calc(100vh - 360rpx);
}
.list-wrap {
padding: 0 24rpx 130rpx;
}
.type-card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
margin-bottom: 18rpx;
box-shadow: 0 4rpx 18rpx rgba(0, 0, 0, 0.05);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 18rpx;
border-bottom: 1rpx solid #edf0f3;
}
.header-left {
display: flex;
flex-direction: column;
gap: 8rpx;
}
.type-name {
font-size: 32rpx;
font-weight: 700;
color: #1f2d3d;
}
.type-code {
font-size: 24rpx;
color: #8a9099;
}
.status-chip {
padding: 6rpx 16rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
.status-draft {
background: rgba(250, 173, 20, 0.12);
color: #ad6800;
}
.status-approved {
background: rgba(82, 196, 26, 0.12);
color: #389e0d;
}
.status-other {
background: rgba(24, 144, 255, 0.12);
color: #096dd9;
}
.card-body {
padding-top: 16rpx;
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 12rpx;
}
.label {
font-size: 26rpx;
color: #8a9099;
}
.value {
font-size: 27rpx;
color: #30363d;
max-width: 62%;
text-align: right;
}
.card-actions {
margin-top: 24rpx;
display: flex;
justify-content: flex-end;
gap: 14rpx;
}
.action-btn {
width: 60rpx;
height: 60rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
}
.edit-btn {
background: #1a3a5c;
}
.approve-btn {
background: #18a058;
}
.delete-btn {
background: #e34d59;
}
.hint {
text-align: center;
color: #909399;
padding: 24rpx 0;
}
.fab-btn {
position: fixed;
right: 34rpx;
bottom: 120rpx;
width: 96rpx;
height: 96rpx;
border-radius: 50%;
background: linear-gradient(135deg, #1a3a5c 0%, #2d5a87 100%);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 10rpx 30rpx rgba(26, 58, 92, 0.3);
z-index: 20;
}
.go-top-btn {
position: fixed;
right: 34rpx;
bottom: 240rpx;
width: 80rpx;
height: 80rpx;
border-radius: 50%;
background: #fff;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
display: flex;
align-items: center;
justify-content: center;
}
.form-popup {
background: #fff;
border-radius: 22rpx 22rpx 0 0;
max-height: 88vh;
}
.popup-header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
border-bottom: 1rpx solid #f0f0f0;
}
.popup-title {
font-size: 30rpx;
font-weight: 700;
}
.popup-close {
position: absolute;
right: 28rpx;
top: 20rpx;
font-size: 44rpx;
color: #909399;
}
.popup-scroll {
max-height: calc(88vh - 180rpx);
padding: 20rpx 26rpx;
}
.form-item {
margin-bottom: 18rpx;
}
.form-label {
font-size: 24rpx;
color: #606266;
margin-bottom: 8rpx;
display: block;
}
.required {
color: #f56c6c;
margin-right: 6rpx;
}
.form-input,
.picker-view {
min-height: 72rpx;
border-radius: 12rpx;
background: #f5f7fa;
padding: 0 18rpx;
display: flex;
align-items: center;
}
.disabled {
color: #909399;
}
.form-textarea {
width: 100%;
min-height: 120rpx;
border-radius: 12rpx;
background: #f5f7fa;
padding: 14rpx 18rpx;
}
.sub-title-row {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.sub-title {
font-size: 26rpx;
font-weight: 600;
}
.sub-action {
color: #1a3a5c;
font-size: 24rpx;
}
.item-empty {
padding: 20rpx;
color: #909399;
text-align: center;
}
.item-card {
margin-top: 14rpx;
border-radius: 12rpx;
background: #f8fafc;
padding: 16rpx;
}
.item-head {
display: flex;
justify-content: space-between;
}
.item-name {
color: #1a3a5c;
font-size: 26rpx;
font-weight: 600;
}
.item-remove {
color: #f56c6c;
font-size: 34rpx;
}
.item-row {
margin-top: 10rpx;
}
.item-label {
color: #909399;
font-size: 22rpx;
}
.item-input {
margin-top: 6rpx;
min-height: 64rpx;
border-radius: 10rpx;
background: #fff;
padding: 0 14rpx;
}
.popup-footer {
height: 88rpx;
display: flex;
}
.footer-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.cancel {
background: #f5f7fa;
color: #606266;
}
.confirm {
background: #1a3a5c;
color: #fff;
}
.picker-popup {
background: #fff;
border-radius: 22rpx 22rpx 0 0;
height: 72vh;
}
.picker-header {
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.picker-title {
font-size: 28rpx;
font-weight: 700;
}
.picker-close {
position: absolute;
right: 24rpx;
top: 18rpx;
font-size: 42rpx;
}
.picker-search {
padding: 0 24rpx 12rpx;
}
.picker-search-row {
margin-bottom: 10rpx;
}
.picker-search-input {
height: 68rpx;
border-radius: 10rpx;
background: #f5f7fa;
padding: 0 14rpx;
}
.picker-search-actions {
margin-top: 6rpx;
display: flex;
gap: 12rpx;
}
.picker-action-btn {
min-width: 110rpx;
height: 56rpx;
border-radius: 10rpx;
background: #1a3a5c;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
}
.picker-action-btn.reset {
background: #eef1f4;
color: #606266;
}
.picker-scroll {
height: calc(72vh - 150rpx);
}
.picker-item {
margin: 0 24rpx 12rpx;
padding: 16rpx;
border-radius: 12rpx;
background: #f8fafc;
display: flex;
justify-content: space-between;
align-items: center;
}
.picker-item-name {
color: #303133;
font-size: 26rpx;
}
.picker-item-code {
color: #909399;
font-size: 22rpx;
margin-top: 6rpx;
}
.picker-item-meta {
color: #909399;
font-size: 20rpx;
margin-top: 4rpx;
}
.picker-check {
color: #1a3a5c;
font-size: 34rpx;
}
.picker-hint {
text-align: center;
color: #909399;
padding: 16rpx 0 22rpx;
}
</style>

Loading…
Cancel
Save