| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913 |
- <template>
- <view class="order-container">
- <erp-nav-bar title="添加型号" />
- <scroll-view :scroll-y="!showTypePicker && !showSurfacePicker && !showPackagePicker" class="order-scroll"
- :show-scrollbar="false" :enhanced="true" @scrolltolower="onScrollToLower">
- <view class="form-content">
- <!-- 模块 1:型材 -->
- <view class="section-card">
- <view class="section-header">
- <view class="blue-bar"></view>
- <text class="section-title">型材</text>
- </view>
- <view class="form-item">
- <text class="label required">型号</text>
- <view class="picker-box" @click="openTypePicker">
- <view class="picker-inner">
- <view class="picker-val" :class="{ placeholder: !formData.type }">
- {{ formData.type || '请选择型号' }}
- </view>
- <view class="line-arrow-down"></view>
- </view>
- </view>
- </view>
- <view class="row-flex">
- <view class="half-item">
- <text class="label">名称</text>
- <input class="input-box readonly small-font" v-model="formData.name" disabled
- placeholder="型号名称" />
- </view>
- <view class="half-item">
- <text class="label">材质</text>
- <input class="input-box readonly small-font" v-model="formData.material" disabled
- placeholder="材质" />
- </view>
- </view>
- </view>
- <!-- 模块 2:表面处理 -->
- <view class="section-card">
- <view class="section-header">
- <view class="blue-bar"></view>
- <text class="section-title">表面处理</text>
- </view>
- <view class="form-item">
- <text class="label required">表面名称</text>
- <view class="picker-box" @click="openSurfacePicker">
- <view class="picker-inner">
- <view class="picker-val" :class="{ placeholder: !formData.surfaceName }">
- {{ formData.surfaceName || '请选择表面名称' }}
- </view>
- <view class="line-arrow-down"></view>
- </view>
- </view>
- </view>
- </view>
- <!-- 模块 3:包装 -->
- <view class="section-card">
- <view class="section-header">
- <view class="blue-bar"></view>
- <text class="section-title">包装</text>
- </view>
- <view class="form-item">
- <text class="label required">包装方式</text>
- <view class="picker-box" @click="openPackagePicker">
- <view class="picker-inner">
- <view class="picker-val" :class="{ placeholder: !formData.packageMethod }">
- {{ formData.packageMethod || '请选择包装方式' }}
- </view>
- <view class="line-arrow-down"></view>
- </view>
- </view>
- </view>
- </view>
- <!-- 模块 4:壁厚 -->
- <view class="section-card">
- <view class="section-header">
- <view class="blue-bar"></view>
- <text class="section-title">壁厚</text>
- </view>
- <view class="row-flex">
- <view class="half-item">
- <text class="label required">长度</text>
- <view class="input-wrap">
- <input class="input-box" type="digit" v-model="formData.length" placeholder="请输入" />
- <text class="unit">mm</text>
- </view>
- </view>
- <view class="half-item">
- <text class="label required">壁厚</text>
- <view class="input-wrap">
- <input class="input-box" type="digit" v-model="formData.wallThickness"
- placeholder="请输入" />
- <text class="unit">mm</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 模块 5:数量 -->
- <view class="section-card">
- <view class="section-header">
- <view class="blue-bar"></view>
- <text class="section-title">数量</text>
- </view>
- <view class="form-item no-margin-bottom">
- <text class="label required">支数</text>
- <input class="input-box full-width" type="number" v-model="formData.count"
- placeholder="请输入支数" />
- </view>
- </view>
- <view class="bottom-placeholder"></view>
- </view>
- </scroll-view>
- <view class="fixed-submit-bar">
- <button class="submit-btn" @click="confirmAddModel">确认并添加</button>
- </view>
- <!-- 型号选择 -->
- <view class="custom-picker-mask" v-if="showTypePicker" @click="closeTypePicker" @touchmove.stop.prevent>
- <view class="picker-popup" @click.stop>
- <view class="popup-header">
- <text class="cancel-text" @click="closeTypePicker">取消</text>
- <text class="popup-title">选择产品型号</text>
- <text class="confirm-text" @click="confirmTypeSelect">确定</text>
- </view>
- <!-- 搜索栏 -->
- <view class="search-bar">
- <view class="search-input-wrap">
- <text class="search-icon">🔍</text>
- <input class="search-input" type="text" v-model="typeSearchKey" placeholder="输入名称检索"
- @input="onTypeSearch" />
- </view>
- </view>
- <!-- 层级面包屑 -->
- <view class="breadcrumb-bar" v-if="typePickerLevel > 1">
- <text class="back-btn" @click="goBackModelLevel">← 返回</text>
- <text class="breadcrumb-path">
- {{typeBreadcrumbs.map(b => b.label).join(' / ')}}
- </text>
- </view>
- <!-- 列表区 -->
- <scroll-view scroll-y class="item-list">
- <view class="option-item kind-item" v-for="(item, index) in modelKindList" :key="'mk'+index"
- @click="drillDownType(item)">
- <text class="option-text kind-text">{{ item.num }} - {{ item.name }}</text>
- <text class="arrow-right">›</text>
- </view>
- <view class="option-item" v-for="(item, index) in modelItemList" :key="'mi'+index"
- :class="{ active: tempSelectedIndex === index }">
- <text class="option-text" @click="selectTypeItem(index)">{{ item.num }} - {{ item.name }}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- <!-- 表面处理选择 -->
- <view class="custom-picker-mask" v-if="showSurfacePicker" @click="closeSurfacePicker" @touchmove.stop.prevent>
- <view class="picker-popup" @click.stop>
- <view class="popup-header">
- <text class="cancel-text" @click="closeSurfacePicker">取消</text>
- <text class="popup-title">选择表面处理</text>
- <text class="confirm-text" @click="confirmSurfaceSelect">确定</text>
- </view>
- <!-- 搜索栏 -->
- <view class="search-bar">
- <view class="search-input-wrap">
- <text class="search-icon">🔍</text>
- <input class="search-input" type="text" v-model="surfaceSearchKey" placeholder="输入名称检索"
- @input="onSurfaceSearch" />
- </view>
- </view>
- <!-- 层级面包屑 -->
- <view class="breadcrumb-bar" v-if="surfacePickerLevel > 1">
- <text class="back-btn" @click="goBackSurfaceLevel">← 返回</text>
- <text class="breadcrumb-path">{{surfaceBreadcrumbs.map(b => b.label).join(' / ')}}</text>
- </view>
- <!-- 列表区 -->
- <scroll-view scroll-y class="item-list">
- <view class="option-item kind-item" v-for="(item, index) in colorKindList" :key="'ck'+index"
- @click="drillDownSurface(item)">
- <text class="option-text kind-text">{{ item.num }} - {{ item.name }}</text>
- <text class="arrow-right">›</text>
- </view>
- <view class="option-item" v-for="(item, index) in colorItemList" :key="'ci'+index"
- :class="{ active: tempSurfaceIndex === index }">
- <text class="option-text" @click="selectSurfaceItem(index)">{{ item.num }} - {{ item.name
- }}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- <!-- 包装方式选择 -->
- <view class="custom-picker-mask" v-if="showPackagePicker" @click="closePackagePicker" @touchmove.stop.prevent>
- <view class="picker-popup" @click.stop>
- <view class="popup-header">
- <text class="cancel-text" @click="closePackagePicker">取消</text>
- <text class="popup-title">选择包装方式</text>
- <text class="confirm-text" @click="confirmPackageSelect">确定</text>
- </view>
- <view class="search-bar">
- <view class="search-input-wrap">
- <text class="search-icon">🔍</text>
- <input class="search-input" type="text" v-model="packageSearchKey" placeholder="输入名称检索"
- @input="onPackageSearch" />
- </view>
- </view>
- <scroll-view scroll-y class="item-list" @scrolltolower="loadMorePackage">
- <view class="option-item" v-for="(item, index) in packageList" :key="index"
- :class="{ active: tempPackageIndex === index }" @click="selectPackageItem(index)">
- <text>{{ item.num }} - {{ item.name }}</text>
- <icon type="success_no_circle" size="16" color="#C1001C" v-if="tempPackageIndex === index">
- </icon>
- </view>
- <view class="loading-tip" v-if="packageLoading && packageHasMore">
- <text class="loading-text">加载中...</text>
- </view>
- <view class="loading-tip" v-if="!packageHasMore && packageList.length > 0">
- <text class="loading-text">已加载全部</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import ErpNavBar from '@/components/erp-nav-bar.vue';
- import { listModel } from '@/api/erp/model.js';
- import { listModelKind } from '@/api/erp/modelKind.js';
- import { listColor } from '@/api/erp/color.js';
- import { listColorKind } from '@/api/erp/colorKind.js';
- import { listPagePack } from '@/api/erp/pack.js';
- import { addOrderDetail } from '@/api/erp/orderDetail.js';
- export default {
- components: { ErpNavBar },
- data() {
- return {
- showTypePicker: false, showSurfacePicker: false, showPackagePicker: false,
- tempSelectedIndex: -1, tempSurfaceIndex: -1, tempPackageIndex: -1,
- modelKindList: [],
- modelItemList: [],
- colorKindList: [],
- colorItemList: [],
- packageList: [],
- typeSearchKey: '', surfaceSearchKey: '', packageSearchKey: '',
- typeBreadcrumbs: [],
- typePickerLevel: 1,
- surfaceBreadcrumbs: [],
- surfacePickerLevel: 1,
- packagePageNum: 1, packagePageSize: 10, packageHasMore: true, packageLoading: false,
- formData: {
- type: '', modelId: '', name: '', material: '',
- surfaceName: '', surfaceId: '', packageMethod: '', packageId: '', length: '',
- wallThickness: '', count: '', meterWeight: ''
- }
- }
- },
- async onLoad() {
- await this.loadPackageMethods();
- },
- methods: {
- async loadPackageMethods(pageNum = 1, keyword = '') {
- if (this.packageLoading) return;
- this.packageLoading = true;
- try {
- const res = await listPagePack({
- pageNum: pageNum,
- pageSize: this.packagePageSize,
- name: keyword
- });
- const rows = res.rows || [];
- const total = res.total || 0;
- if (pageNum === 1) {
- this.packageList = rows;
- } else {
- this.packageList = [...this.packageList, ...rows];
- }
- this.packageHasMore = this.packageList.length < total;
- } catch (e) {
- uni.showToast({ title: e || '加载包装方式失败', icon: 'none' });
- } finally {
- this.packageLoading = false;
- }
- },
- loadMorePackage() {
- if (this.packageHasMore && !this.packageLoading) {
- this.packagePageNum++;
- this.loadPackageMethods(this.packagePageNum, this.packageSearchKey);
- }
- },
- /**
- * 包装方式搜索(防抖)
- * @Author: Antigravity
- */
- onPackageSearch() {
- if (this.packageSearchTimer) clearTimeout(this.packageSearchTimer);
- this.packageSearchTimer = setTimeout(() => {
- this.packagePageNum = 1;
- this.loadPackageMethods(1, this.packageSearchKey);
- }, 300);
- },
- /**
- * 加载型材系列,点击系列后同时加载子系列和具体型号
- * @Author: Trae
- */
- async loadTypes(parentRowId) {
- try {
- const keyword = (this.typeSearchKey || '').trim();
- const kindParams = { name: keyword || undefined };
- if (parentRowId) {
- kindParams.parentRowId = parentRowId;
- }
- const kindRes = await listModelKind(kindParams);
- this.modelKindList = kindRes.data || [];
- if (parentRowId) {
- const modelParams = { name: keyword || undefined, parentRowId };
- const modelRes = await listModel(modelParams);
- this.modelItemList = modelRes.data || [];
- } else {
- this.modelItemList = [];
- }
- } catch (e) {
- uni.showToast({ title: e || '加载型号失败', icon: 'none' });
- }
- },
- /**
- * 型号搜索
- * @Author: Trae
- */
- onTypeSearch() {
- const parentRowId = this.typeBreadcrumbs.length > 0
- ? this.typeBreadcrumbs[this.typeBreadcrumbs.length - 1].rowId : '';
- this.loadTypes(parentRowId);
- },
- /**
- * 加载表面处理系列,点击系列后同时加载子系列和具体颜色
- * @Author: Trae
- */
- async loadSurfaces(parentRowId) {
- try {
- const keyword = (this.surfaceSearchKey || '').trim();
- const kindParams = { name: keyword || undefined };
- if (parentRowId) {
- kindParams.parentRowId = parentRowId;
- }
- const kindRes = await listColorKind(kindParams);
- this.colorKindList = kindRes.data || [];
- if (parentRowId) {
- const colorParams = { name: keyword || undefined, parentRowId };
- const colorRes = await listColor(colorParams);
- this.colorItemList = colorRes.data || [];
- } else {
- this.colorItemList = [];
- }
- } catch (e) {
- uni.showToast({ title: e || '加载表面处理失败', icon: 'none' });
- }
- },
- /**
- * 表面处理搜索
- * @Author: Trae
- */
- onSurfaceSearch() {
- const parentRowId = this.surfaceBreadcrumbs.length > 0
- ? this.surfaceBreadcrumbs[this.surfaceBreadcrumbs.length - 1].rowId : '';
- this.loadSurfaces(parentRowId);
- },
- /**
- * 打开型号选择器
- * @Author: Trae
- */
- openTypePicker() {
- this.typePickerLevel = 1;
- this.typeBreadcrumbs = [];
- this.tempSelectedIndex = -1;
- this.showTypePicker = true;
- this.loadTypes('');
- },
- /**
- * 钻取到子级
- * @Author: Trae
- */
- drillDownType(item) {
- this.typeBreadcrumbs.push({ rowId: item.rowId, label: item.num });
- this.typePickerLevel++;
- this.tempSelectedIndex = -1;
- this.loadTypes(item.rowId);
- },
- /**
- * 返回上一级
- * @Author: Trae
- */
- goBackModelLevel() {
- this.typeBreadcrumbs.pop();
- this.typePickerLevel--;
- this.tempSelectedIndex = -1;
- const parentRowId = this.typeBreadcrumbs.length > 0
- ? this.typeBreadcrumbs[this.typeBreadcrumbs.length - 1].rowId : '';
- this.loadTypes(parentRowId);
- },
- closeTypePicker() {
- this.showTypePicker = false;
- this.typeSearchKey = '';
- this.typePickerLevel = 1;
- this.typeBreadcrumbs = [];
- this.tempSelectedIndex = -1;
- },
- selectTypeItem(index) { this.tempSelectedIndex = index; },
- /**
- * 确认选择型材
- * @Author: Trae
- */
- confirmTypeSelect() {
- if (this.tempSelectedIndex === -1) {
- uni.showToast({ title: '请先选择一个选项', icon: 'none' });
- return;
- }
- const item = this.modelItemList[this.tempSelectedIndex];
- this.formData.type = item.num;
- this.formData.modelId = item.rowId;
- this.formData.name = item.name;
- this.formData.material = '6063-T5';
- this.formData.meterWeight = item.meterWt || '';
- this.closeTypePicker();
- },
- /**
- * 打开表面处理选择器
- * @Author: Trae
- */
- openSurfacePicker() {
- this.surfacePickerLevel = 1;
- this.surfaceBreadcrumbs = [];
- this.tempSurfaceIndex = -1;
- this.showSurfacePicker = true;
- this.loadSurfaces('');
- },
- /**
- * 钻取到子级
- * @Author: Trae
- */
- drillDownSurface(item) {
- this.surfaceBreadcrumbs.push({ rowId: item.rowId, label: item.num });
- this.surfacePickerLevel++;
- this.tempSurfaceIndex = -1;
- this.loadSurfaces(item.rowId);
- },
- /**
- * 返回上一级
- * @Author: Trae
- */
- goBackSurfaceLevel() {
- this.surfaceBreadcrumbs.pop();
- this.surfacePickerLevel--;
- this.tempSurfaceIndex = -1;
- const parentRowId = this.surfaceBreadcrumbs.length > 0
- ? this.surfaceBreadcrumbs[this.surfaceBreadcrumbs.length - 1].rowId : '';
- this.loadSurfaces(parentRowId);
- },
- closeSurfacePicker() {
- this.showSurfacePicker = false;
- this.surfaceSearchKey = '';
- this.surfacePickerLevel = 1;
- this.surfaceBreadcrumbs = [];
- this.tempSurfaceIndex = -1;
- },
- selectSurfaceItem(index) { this.tempSurfaceIndex = index; },
- /**
- * 确认选择表面处理
- * @Author: Trae
- */
- confirmSurfaceSelect() {
- if (this.tempSurfaceIndex === -1) {
- uni.showToast({ title: '请先选择一个选项', icon: 'none' });
- return;
- }
- const item = this.colorItemList[this.tempSurfaceIndex];
- this.formData.surfaceName = item.name;
- this.formData.surfaceId = item.rowId;
- this.closeSurfacePicker();
- },
- openPackagePicker() {
- if (this.formData.packageMethod) {
- this.tempPackageIndex = this.packageList.findIndex(item => item.name === this.formData.packageMethod);
- } else {
- this.tempPackageIndex = -1;
- }
- this.showPackagePicker = true;
- },
- closePackagePicker() {
- this.showPackagePicker = false;
- this.packageSearchKey = '';
- this.packagePageNum = 1;
- },
- selectPackageItem(index) { this.tempPackageIndex = index; },
- confirmPackageSelect() {
- if (this.tempPackageIndex === -1) return;
- const item = this.packageList[this.tempPackageIndex];
- this.formData.packageMethod = item.name;
- this.formData.packageId = item.rowId;
- this.closePackagePicker();
- },
- async confirmAddModel() {
- const fields = [
- { key: 'type', label: '型号' },
- { key: 'surfaceName', label: '表面名称' },
- { key: 'packageMethod', label: '包装方式' },
- { key: 'length', label: '长度' },
- { key: 'wallThickness', label: '壁厚' },
- { key: 'count', label: '支数' }
- ];
- for (let item of fields) {
- if (!this.formData[item.key]) {
- uni.showToast({ title: `请完善项目:${item.label}`, icon: 'none' });
- return;
- }
- }
- const finalData = {
- orderId: null,
- modelId: this.formData.modelId,
- modelNum: this.formData.type,
- modelName: this.formData.name,
- material: this.formData.material,
- surfaceId: this.formData.surfaceId,
- surfaceName: this.formData.surfaceName,
- packId: this.formData.packageId,
- packName: this.formData.packageMethod,
- length: parseFloat(this.formData.length || 0).toFixed(4),
- wallThickness: parseFloat(this.formData.wallThickness || 0).toFixed(4),
- meterWeight: this.formData.meterWeight ? parseFloat(this.formData.meterWeight || 0).toFixed(4) : null,
- count: parseInt(this.formData.count || 0)
- };
- uni.showLoading({ title: '正在保存...' });
- try {
- await addOrderDetail(finalData);
- uni.hideLoading();
- uni.showToast({ title: '添加成功', icon: 'success' });
- uni.$emit('add_order_item', finalData);
- setTimeout(() => {
- uni.navigateBack();
- }, 1000);
- } catch (e) {
- uni.hideLoading();
- uni.showToast({ title: e || '添加失败', icon: 'none' });
- }
- }
- }
- }
- </script>
- <style scoped>
- /deep/ ::-webkit-scrollbar {
- display: none !important;
- width: 0 !important;
- height: 0 !important;
- }
- .order-container {
- width: 100%;
- height: 100vh;
- background: #f7f8fa;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .order-scroll {
- flex: 1;
- height: 0;
- }
- .form-content {
- padding: 30rpx;
- padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
- }
- .section-card {
- background: #fff;
- border-radius: 24rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02);
- }
- .section-header {
- display: flex;
- align-items: center;
- margin-bottom: 40rpx;
- }
- .blue-bar {
- width: 8rpx;
- height: 32rpx;
- background: #C1001C;
- border-radius: 4rpx;
- margin-right: 16rpx;
- }
- .section-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
- .form-item {
- margin-bottom: 40rpx;
- }
- .no-margin-bottom {
- margin-bottom: 0;
- }
- .row-flex {
- display: flex;
- justify-content: space-between;
- }
- .half-item {
- width: 48%;
- }
- .label {
- font-size: 28rpx;
- color: #333;
- margin-bottom: 20rpx;
- display: block;
- font-weight: 500;
- }
- .label.required::after {
- content: ' *';
- color: #ff4d4f;
- font-weight: bold;
- margin-left: 4rpx;
- }
- .picker-box {
- background: #f9fafc;
- border-radius: 12rpx;
- height: 100rpx;
- border: 1rpx solid #eee;
- display: flex;
- align-items: center;
- }
- .picker-inner {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 30rpx;
- box-sizing: border-box;
- }
- .picker-val {
- font-size: 30rpx;
- color: #333;
- }
- .picker-val.placeholder {
- color: #ccc;
- font-size: 28rpx;
- }
- .line-arrow-down {
- width: 14rpx;
- height: 14rpx;
- border-right: 3rpx solid #bbb;
- border-bottom: 3rpx solid #bbb;
- transform: rotate(45deg);
- margin-top: -8rpx;
- margin-right: 4rpx;
- }
- .input-wrap {
- position: relative;
- width: 100%;
- }
- .input-box {
- font-size: 30rpx;
- color: #333;
- width: 100%;
- height: 100rpx;
- background: #f9fafc;
- border-radius: 12rpx;
- padding: 0 80rpx 0 30rpx;
- box-sizing: border-box;
- border: 1rpx solid #eee;
- }
- .input-box.readonly {
- background: #f8f9fa;
- color: #666;
- border-color: #f0f0f0;
- }
- .input-box.full-width {
- padding: 0 30rpx;
- }
- .unit {
- position: absolute;
- right: 24rpx;
- top: 50%;
- transform: translateY(-50%);
- font-size: 26rpx;
- color: #999;
- font-weight: 500;
- }
- .small-font {
- font-size: 26rpx !important;
- }
- .fixed-submit-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- background: #fff;
- padding: 20rpx 30rpx calc(env(safe-area-inset-bottom) + 20rpx);
- box-sizing: border-box;
- box-shadow: 0 -10rpx 30rpx rgba(0, 0, 0, 0.05);
- z-index: 100;
- }
- .submit-btn {
- background: #C1001C;
- color: #fff;
- height: 100rpx;
- border-radius: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 34rpx;
- font-weight: bold;
- border: none;
- }
- .submit-btn:active {
- opacity: 0.9;
- transform: scale(0.98);
- }
- .custom-picker-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.4);
- z-index: 1000;
- display: flex;
- align-items: flex-end;
- }
- .picker-popup {
- width: 100%;
- background: #fff;
- border-radius: 32rpx 32rpx 0 0;
- padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
- animation: slideUp 0.15s ease-out;
- }
- @keyframes slideUp {
- from {
- transform: translateY(100%);
- }
- to {
- transform: translateY(0);
- }
- }
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 40rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .popup-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- }
- .cancel-text,
- .confirm-text {
- font-size: 30rpx;
- padding: 10rpx;
- }
- .confirm-text {
- color: #C1001C;
- font-weight: bold;
- }
- .item-list {
- max-height: 50vh;
- padding: 0 40rpx;
- }
- /* 搜索栏样式 */
- .search-bar {
- padding: 16rpx 40rpx;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .search-input-wrap {
- display: flex;
- align-items: center;
- background: #f5f6f8;
- border-radius: 32rpx;
- padding: 12rpx 24rpx;
- }
- .search-icon {
- font-size: 28rpx;
- margin-right: 12rpx;
- }
- .search-input {
- flex: 1;
- font-size: 26rpx;
- color: #333;
- height: 56rpx;
- }
- .option-item {
- height: 110rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1rpx solid #f8f8f8;
- font-size: 32rpx;
- color: #333;
- }
- .option-item.active {
- color: #C1001C;
- font-weight: bold;
- }
- .kind-item {
- background: #fafbfc;
- }
- .kind-text {
- color: #556;
- }
- .option-text {
- flex: 1;
- padding: 10rpx 0;
- }
- .loading-tip {
- padding: 20rpx 0;
- text-align: center;
- }
- .loading-text {
- font-size: 26rpx;
- color: #999;
- }
- /* 级联面包屑 */
- .breadcrumb-bar {
- display: flex;
- align-items: center;
- padding: 16rpx 40rpx;
- background: #fafafa;
- border-bottom: 1rpx solid #f0f0f0;
- }
- .back-btn {
- font-size: 28rpx;
- color: #C1001C;
- padding-right: 20rpx;
- flex-shrink: 0;
- }
- .breadcrumb-path {
- font-size: 26rpx;
- color: #666;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .arrow-right {
- font-size: 56rpx;
- color: #bbb;
- padding: 10rpx 0 10rpx 20rpx;
- font-weight: 300;
- }
- .bottom-placeholder {
- height: 60rpx;
- }
- </style>
|