index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <view class="order-container">
  3. <erp-nav-bar title="编辑型号" />
  4. <scroll-view scroll-y class="order-scroll" :show-scrollbar="false" :enhanced="true">
  5. <view class="form-content">
  6. <!-- 模块 1:型材 -->
  7. <view class="section-card">
  8. <view class="section-header">
  9. <view class="blue-bar"></view>
  10. <text class="section-title">型材</text>
  11. </view>
  12. <view class="form-item">
  13. <text class="label required">型号</text>
  14. <view class="picker-box" @click="openTypePicker">
  15. <view class="picker-inner">
  16. <view class="picker-val" :class="{ placeholder: !formData.type }">
  17. {{ formData.type || '请选择型号' }}
  18. </view>
  19. <view class="line-arrow-down"></view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="row-flex">
  24. <view class="half-item">
  25. <text class="label">名称</text>
  26. <input class="input-box readonly small-font" v-model="formData.name" disabled
  27. placeholder="型号名称" />
  28. </view>
  29. <view class="half-item">
  30. <text class="label">材质</text>
  31. <input class="input-box readonly small-font" v-model="formData.material" disabled
  32. placeholder="材质" />
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 模块 2:表面处理 -->
  37. <view class="section-card">
  38. <view class="section-header">
  39. <view class="blue-bar"></view>
  40. <text class="section-title">表面处理</text>
  41. </view>
  42. <view class="form-item">
  43. <text class="label required">表面名称</text>
  44. <view class="picker-box" @click="openSurfacePicker">
  45. <view class="picker-inner">
  46. <view class="picker-val" :class="{ placeholder: !formData.surfaceName }">
  47. {{ formData.surfaceName || '请选择表面名称' }}
  48. </view>
  49. <view class="line-arrow-down"></view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 模块 3:包装 -->
  55. <view class="section-card">
  56. <view class="section-header">
  57. <view class="blue-bar"></view>
  58. <text class="section-title">包装</text>
  59. </view>
  60. <view class="form-item">
  61. <text class="label required">包装方式</text>
  62. <view class="picker-box" @click="openPackagePicker">
  63. <view class="picker-inner">
  64. <view class="picker-val" :class="{ placeholder: !formData.packageMethod }">
  65. {{ formData.packageMethod || '请选择包装方式' }}
  66. </view>
  67. <view class="line-arrow-down"></view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 模块 4:壁厚 -->
  73. <view class="section-card">
  74. <view class="section-header">
  75. <view class="blue-bar"></view>
  76. <text class="section-title">壁厚</text>
  77. </view>
  78. <view class="row-flex">
  79. <view class="half-item">
  80. <text class="label required">长度</text>
  81. <view class="input-wrap">
  82. <input class="input-box" type="digit" v-model="formData.length" placeholder="请输入" />
  83. <text class="unit">mm</text>
  84. </view>
  85. </view>
  86. <view class="half-item">
  87. <text class="label required">壁厚</text>
  88. <view class="input-wrap">
  89. <input class="input-box" type="digit" v-model="formData.wallThickness"
  90. placeholder="请输入" />
  91. <text class="unit">mm</text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 模块 5:数量 -->
  97. <view class="section-card">
  98. <view class="section-header">
  99. <view class="blue-bar"></view>
  100. <text class="section-title">数量</text>
  101. </view>
  102. <view class="form-item no-margin-bottom">
  103. <text class="label required">支数</text>
  104. <input class="input-box full-width" type="number" v-model="formData.count"
  105. placeholder="请输入支付支数" />
  106. </view>
  107. </view>
  108. <view class="bottom-placeholder"></view>
  109. </view>
  110. </scroll-view>
  111. <!-- 底部固定保存按钮 -->
  112. <view class="fixed-submit-bar">
  113. <button class="submit-btn" @click="saveEdit">保存</button>
  114. </view>
  115. <!-- 型号选择 -->
  116. <view class="custom-picker-mask" v-if="showTypePicker" @click="closeTypePicker" @touchmove.stop.prevent>
  117. <view class="picker-popup" @click.stop>
  118. <view class="popup-header">
  119. <text class="cancel-text" @click="closeTypePicker">取消</text>
  120. <text class="popup-title">选择产品型号</text>
  121. <text class="confirm-text" @click="confirmTypeSelect">确定</text>
  122. </view>
  123. <view class="search-bar">
  124. <view class="search-input-wrap">
  125. <text class="search-icon">🔍</text>
  126. <input class="search-input" type="text" v-model="typeSearchKey" placeholder="输入名称检索"
  127. @input="onTypeSearch" />
  128. </view>
  129. </view>
  130. <scroll-view scroll-y class="item-list" @scrolltolower="loadMoreType">
  131. <view class="option-item" v-for="(item, index) in typeList" :key="index"
  132. :class="{ active: tempSelectedIndex === index }" @click="selectTypeItem(index)">
  133. <text>{{ item.num }} - {{ item.name }}</text>
  134. <icon type="success_no_circle" size="16" color="#C1001C" v-if="tempSelectedIndex === index">
  135. </icon>
  136. </view>
  137. </scroll-view>
  138. </view>
  139. </view>
  140. <!-- 表面处理选择 -->
  141. <view class="custom-picker-mask" v-if="showSurfacePicker" @click="closeSurfacePicker" @touchmove.stop.prevent>
  142. <view class="picker-popup" @click.stop>
  143. <view class="popup-header">
  144. <text class="cancel-text" @click="closeSurfacePicker">取消</text>
  145. <text class="popup-title">选择表面处理</text>
  146. <text class="confirm-text" @click="confirmSurfaceSelect">确定</text>
  147. </view>
  148. <view class="search-bar">
  149. <view class="search-input-wrap">
  150. <text class="search-icon">🔍</text>
  151. <input class="search-input" type="text" v-model="surfaceSearchKey" placeholder="输入名称检索"
  152. @input="onSurfaceSearch" />
  153. </view>
  154. </view>
  155. <scroll-view scroll-y class="item-list" @scrolltolower="loadMoreSurface">
  156. <view class="option-item" v-for="(item, index) in surfaceList" :key="index"
  157. :class="{ active: tempSurfaceIndex === index }" @click="selectSurfaceItem(index)">
  158. <text>{{ item.num }} - {{ item.name }}</text>
  159. <icon type="success_no_circle" size="16" color="#C1001C" v-if="tempSurfaceIndex === index">
  160. </icon>
  161. </view>
  162. </scroll-view>
  163. </view>
  164. </view>
  165. <!-- 包装方式选择 -->
  166. <view class="custom-picker-mask" v-if="showPackagePicker" @click="closePackagePicker" @touchmove.stop.prevent>
  167. <view class="picker-popup" @click.stop>
  168. <view class="popup-header">
  169. <text class="cancel-text" @click="closePackagePicker">取消</text>
  170. <text class="popup-title">选择包装方式</text>
  171. <text class="confirm-text" @click="confirmPackageSelect">确定</text>
  172. </view>
  173. <view class="search-bar">
  174. <view class="search-input-wrap">
  175. <text class="search-icon">🔍</text>
  176. <input class="search-input" type="text" v-model="packageSearchKey" placeholder="输入名称检索"
  177. @input="onPackageSearch" />
  178. </view>
  179. </view>
  180. <scroll-view scroll-y class="item-list" @scrolltolower="loadMorePackage">
  181. <view class="option-item" v-for="(item, index) in packageList" :key="index"
  182. :class="{ active: tempPackageIndex === index }" @click="selectPackageItem(index)">
  183. <text>{{ item.num }} - {{ item.name }}</text>
  184. <icon type="success_no_circle" size="16" color="#C1001C" v-if="tempPackageIndex === index">
  185. </icon>
  186. </view>
  187. </scroll-view>
  188. </view>
  189. </view>
  190. </view>
  191. </template>
  192. <script>
  193. import ErpNavBar from '@/components/erp-nav-bar.vue';
  194. import { listPageColor } from '@/api/erp/color.js';
  195. import { listPagePack } from '@/api/erp/pack.js';
  196. import { listPageModel } from '@/api/erp/model.js';
  197. import { addOrderDetail } from '@/api/erp/orderDetail.js';
  198. export default {
  199. components: { ErpNavBar },
  200. data() {
  201. return {
  202. itemIndex: -1,
  203. showTypePicker: false, showSurfacePicker: false, showPackagePicker: false,
  204. tempSelectedIndex: -1, tempSurfaceIndex: -1, tempPackageIndex: -1,
  205. typeList: [],
  206. surfaceList: [],
  207. packageList: [],
  208. // 搜索关键词
  209. typeSearchKey: '', surfaceSearchKey: '', packageSearchKey: '',
  210. // 防抖定时器
  211. typeSearchTimer: null, surfaceSearchTimer: null, packageSearchTimer: null,
  212. // 分页参数
  213. typePageNum: 1, typePageSize: 20, typeHasMore: true, typeLoading: false,
  214. surfacePageNum: 1, surfacePageSize: 20, surfaceHasMore: true, surfaceLoading: false,
  215. packagePageNum: 1, packagePageSize: 20, packageHasMore: true, packageLoading: false,
  216. formData: {
  217. type: '', modelId: '', name: '', material: '',
  218. surfaceName: '', surfaceId: '', packageMethod: '', packageId: '', length: '',
  219. wallThickness: '', count: ''
  220. }
  221. }
  222. },
  223. async onLoad(options) {
  224. if (options.data) {
  225. try {
  226. const item = JSON.parse(decodeURIComponent(options.data));
  227. this.formData.type = item.modelNum || '';
  228. this.formData.modelId = item.modelId || '';
  229. this.formData.name = item.modelName || '';
  230. this.formData.material = item.material || '';
  231. this.formData.surfaceName = item.surfaceName || '';
  232. this.formData.surfaceId = item.surfaceId || '';
  233. this.formData.packageMethod = item.packName || '';
  234. this.formData.packageId = item.packId || '';
  235. this.formData.length = item.length || '';
  236. this.formData.wallThickness = item.wallThickness || '';
  237. this.formData.count = item.count || '';
  238. this.itemIndex = parseInt(options.index || -1);
  239. } catch (e) {
  240. console.error('Data parse error', e);
  241. }
  242. }
  243. await Promise.all([
  244. this.loadModels(),
  245. this.loadSurfaceKinds(),
  246. this.loadPackageMethods()
  247. ]);
  248. },
  249. methods: {
  250. async loadModels(pageNum = 1, keyword = '') {
  251. if (this.typeLoading) return;
  252. this.typeLoading = true;
  253. try {
  254. const res = await listPageModel({ pageNum, pageSize: this.typePageSize, name: keyword });
  255. const rows = res.rows || [];
  256. const total = res.total || 0;
  257. if (pageNum === 1) {
  258. this.typeList = rows;
  259. } else {
  260. this.typeList = [...this.typeList, ...rows];
  261. }
  262. this.typeHasMore = this.typeList.length < total;
  263. } catch (e) {
  264. console.error('加载型号失败', e);
  265. } finally {
  266. this.typeLoading = false;
  267. }
  268. },
  269. async loadSurfaceKinds(pageNum = 1, keyword = '') {
  270. if (this.surfaceLoading) return;
  271. this.surfaceLoading = true;
  272. try {
  273. const res = await listPageColor({ pageNum, pageSize: this.surfacePageSize, name: keyword });
  274. let rows = (res.rows || []).filter(item => item.name);
  275. const total = res.total || 0;
  276. if (pageNum === 1) {
  277. this.surfaceList = rows;
  278. } else {
  279. this.surfaceList = [...this.surfaceList, ...rows];
  280. }
  281. this.surfaceHasMore = this.surfaceList.length < total;
  282. } catch (e) {
  283. console.error('加载表面处理失败', e);
  284. } finally {
  285. this.surfaceLoading = false;
  286. }
  287. },
  288. async loadPackageMethods(pageNum = 1, keyword = '') {
  289. if (this.packageLoading) return;
  290. this.packageLoading = true;
  291. try {
  292. const res = await listPagePack({ pageNum, pageSize: this.packagePageSize, name: keyword });
  293. const rows = res.rows || [];
  294. const total = res.total || 0;
  295. if (pageNum === 1) {
  296. this.packageList = rows;
  297. } else {
  298. this.packageList = [...this.packageList, ...rows];
  299. }
  300. this.packageHasMore = this.packageList.length < total;
  301. } catch (e) {
  302. console.error('加载包装方式失败', e);
  303. } finally {
  304. this.packageLoading = false;
  305. }
  306. },
  307. loadMoreType() {
  308. if (this.typeHasMore && !this.typeLoading) {
  309. this.typePageNum++;
  310. this.loadModels(this.typePageNum, this.typeSearchKey);
  311. }
  312. },
  313. loadMoreSurface() {
  314. if (this.surfaceHasMore && !this.surfaceLoading) {
  315. this.surfacePageNum++;
  316. this.loadSurfaceKinds(this.surfacePageNum, this.surfaceSearchKey);
  317. }
  318. },
  319. loadMorePackage() {
  320. if (this.packageHasMore && !this.packageLoading) {
  321. this.packagePageNum++;
  322. this.loadPackageMethods(this.packagePageNum, this.packageSearchKey);
  323. }
  324. },
  325. onTypeSearch() {
  326. if (this.typeSearchTimer) clearTimeout(this.typeSearchTimer);
  327. this.typeSearchTimer = setTimeout(() => {
  328. this.typePageNum = 1;
  329. this.loadModels(1, this.typeSearchKey);
  330. }, 300);
  331. },
  332. onSurfaceSearch() {
  333. if (this.surfaceSearchTimer) clearTimeout(this.surfaceSearchTimer);
  334. this.surfaceSearchTimer = setTimeout(() => {
  335. this.surfacePageNum = 1;
  336. this.loadSurfaceKinds(1, this.surfaceSearchKey);
  337. }, 300);
  338. },
  339. onPackageSearch() {
  340. if (this.packageSearchTimer) clearTimeout(this.packageSearchTimer);
  341. this.packageSearchTimer = setTimeout(() => {
  342. this.packagePageNum = 1;
  343. this.loadPackageMethods(1, this.packageSearchKey);
  344. }, 300);
  345. },
  346. openTypePicker() {
  347. if (this.formData.type) {
  348. this.tempSelectedIndex = this.typeList.findIndex(item => item.num === this.formData.type);
  349. } else {
  350. this.tempSelectedIndex = -1;
  351. }
  352. this.showTypePicker = true;
  353. },
  354. closeTypePicker() {
  355. this.showTypePicker = false;
  356. this.typeSearchKey = '';
  357. this.typePageNum = 1;
  358. },
  359. selectTypeItem(index) { this.tempSelectedIndex = index; },
  360. confirmTypeSelect() {
  361. if (this.tempSelectedIndex === -1) return;
  362. const item = this.typeList[this.tempSelectedIndex];
  363. this.formData.type = item.num;
  364. this.formData.modelId = item.rowId;
  365. this.formData.name = item.name;
  366. this.formData.material = '6063-T5';
  367. this.closeTypePicker();
  368. },
  369. openSurfacePicker() {
  370. if (this.formData.surfaceName) {
  371. this.tempSurfaceIndex = this.surfaceList.findIndex(item => item.name === this.formData.surfaceName);
  372. } else {
  373. this.tempSurfaceIndex = -1;
  374. }
  375. this.showSurfacePicker = true;
  376. },
  377. closeSurfacePicker() {
  378. this.showSurfacePicker = false;
  379. this.surfaceSearchKey = '';
  380. this.surfacePageNum = 1;
  381. },
  382. selectSurfaceItem(index) { this.tempSurfaceIndex = index; },
  383. confirmSurfaceSelect() {
  384. if (this.tempSurfaceIndex === -1) return;
  385. const item = this.surfaceList[this.tempSurfaceIndex];
  386. this.formData.surfaceName = item.name;
  387. this.formData.surfaceId = item.rowId;
  388. this.closeSurfacePicker();
  389. },
  390. openPackagePicker() {
  391. if (this.formData.packageMethod) {
  392. this.tempPackageIndex = this.packageList.findIndex(item => item.name === this.formData.packageMethod);
  393. } else {
  394. this.tempPackageIndex = -1;
  395. }
  396. this.showPackagePicker = true;
  397. },
  398. closePackagePicker() {
  399. this.showPackagePicker = false;
  400. this.packageSearchKey = '';
  401. this.packagePageNum = 1;
  402. },
  403. selectPackageItem(index) { this.tempPackageIndex = index; },
  404. confirmPackageSelect() {
  405. if (this.tempPackageIndex === -1) return;
  406. const item = this.packageList[this.tempPackageIndex];
  407. this.formData.packageMethod = item.name;
  408. this.formData.packageId = item.rowId;
  409. this.closePackagePicker();
  410. },
  411. saveEdit() {
  412. const fields = [
  413. { key: 'type', label: '型号' },
  414. { key: 'surfaceName', label: '表面名称' },
  415. { key: 'packageMethod', label: '包装方式' },
  416. { key: 'length', label: '长度' },
  417. { key: 'wallThickness', label: '壁厚' },
  418. { key: 'count', label: '支数' }
  419. ];
  420. for (let item of fields) {
  421. if (!this.formData[item.key]) {
  422. uni.showToast({ title: `请完善项目:${item.label}`, icon: 'none' });
  423. return;
  424. }
  425. }
  426. uni.$emit('update_order_item', {
  427. index: this.itemIndex,
  428. data: JSON.parse(JSON.stringify(this.formData))
  429. });
  430. uni.navigateBack();
  431. }
  432. }
  433. }
  434. </script>
  435. <style scoped>
  436. /deep/ ::-webkit-scrollbar {
  437. display: none !important;
  438. width: 0 !important;
  439. height: 0 !important;
  440. }
  441. .order-container {
  442. width: 100%;
  443. height: 100vh;
  444. background: #f7f8fa;
  445. display: flex;
  446. flex-direction: column;
  447. overflow: hidden;
  448. }
  449. .order-scroll {
  450. flex: 1;
  451. height: 0;
  452. }
  453. .form-content {
  454. padding: 30rpx;
  455. padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
  456. }
  457. .section-card {
  458. background: #fff;
  459. border-radius: 24rpx;
  460. padding: 30rpx;
  461. margin-bottom: 30rpx;
  462. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02);
  463. }
  464. .section-header {
  465. display: flex;
  466. align-items: center;
  467. margin-bottom: 40rpx;
  468. }
  469. .blue-bar {
  470. width: 8rpx;
  471. height: 32rpx;
  472. background: #C1001C;
  473. border-radius: 4rpx;
  474. margin-right: 16rpx;
  475. }
  476. .section-title {
  477. font-size: 32rpx;
  478. font-weight: bold;
  479. color: #333;
  480. }
  481. .form-item {
  482. margin-bottom: 40rpx;
  483. }
  484. .no-margin-bottom {
  485. margin-bottom: 0;
  486. }
  487. .row-flex {
  488. display: flex;
  489. justify-content: space-between;
  490. }
  491. .half-item {
  492. width: 48%;
  493. }
  494. .label {
  495. font-size: 28rpx;
  496. color: #333;
  497. margin-bottom: 20rpx;
  498. display: block;
  499. font-weight: 500;
  500. }
  501. .label.required::after {
  502. content: ' *';
  503. color: #ff4d4f;
  504. font-weight: bold;
  505. margin-left: 4rpx;
  506. }
  507. .picker-box {
  508. background: #f9fafc;
  509. border-radius: 12rpx;
  510. height: 100rpx;
  511. border: 1rpx solid #eee;
  512. display: flex;
  513. align-items: center;
  514. }
  515. .picker-inner {
  516. width: 100%;
  517. height: 100%;
  518. display: flex;
  519. align-items: center;
  520. justify-content: space-between;
  521. padding: 0 30rpx;
  522. box-sizing: border-box;
  523. }
  524. .picker-val {
  525. font-size: 30rpx;
  526. color: #333;
  527. }
  528. .picker-val.placeholder {
  529. color: #ccc;
  530. font-size: 28rpx;
  531. }
  532. .line-arrow-down {
  533. width: 14rpx;
  534. height: 14rpx;
  535. border-right: 3rpx solid #bbb;
  536. border-bottom: 3rpx solid #bbb;
  537. transform: rotate(45deg);
  538. margin-top: -8rpx;
  539. margin-right: 4rpx;
  540. }
  541. .input-wrap {
  542. position: relative;
  543. width: 100%;
  544. }
  545. .input-box {
  546. font-size: 30rpx;
  547. color: #333;
  548. width: 100%;
  549. height: 100rpx;
  550. background: #f9fafc;
  551. border-radius: 12rpx;
  552. padding: 0 80rpx 0 30rpx;
  553. box-sizing: border-box;
  554. border: 1rpx solid #eee;
  555. }
  556. .input-box.readonly {
  557. background: #f8f9fa;
  558. color: #666;
  559. border-color: #f0f0f0;
  560. }
  561. .input-box.full-width {
  562. padding: 0 30rpx;
  563. }
  564. .unit {
  565. position: absolute;
  566. right: 24rpx;
  567. top: 50%;
  568. transform: translateY(-50%);
  569. font-size: 26rpx;
  570. color: #999;
  571. font-weight: 500;
  572. }
  573. .small-font {
  574. font-size: 26rpx !important;
  575. }
  576. .fixed-submit-bar {
  577. position: fixed;
  578. bottom: 0;
  579. left: 0;
  580. width: 100%;
  581. background: #fff;
  582. padding: 20rpx 30rpx calc(env(safe-area-inset-bottom) + 20rpx);
  583. box-sizing: border-box;
  584. box-shadow: 0 -10rpx 30rpx rgba(0, 0, 0, 0.05);
  585. z-index: 100;
  586. }
  587. .submit-btn {
  588. background: #C1001C;
  589. color: #fff;
  590. height: 100rpx;
  591. border-radius: 50rpx;
  592. display: flex;
  593. align-items: center;
  594. justify-content: center;
  595. font-size: 34rpx;
  596. font-weight: bold;
  597. border: none;
  598. }
  599. .submit-btn:active {
  600. opacity: 0.9;
  601. transform: scale(0.98);
  602. }
  603. .custom-picker-mask {
  604. position: fixed;
  605. top: 0;
  606. left: 0;
  607. right: 0;
  608. bottom: 0;
  609. background: rgba(0, 0, 0, 0.4);
  610. z-index: 1000;
  611. display: flex;
  612. align-items: flex-end;
  613. }
  614. .picker-popup {
  615. width: 100%;
  616. background: #fff;
  617. border-radius: 32rpx 32rpx 0 0;
  618. padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
  619. animation: slideUp 0.15s ease-out;
  620. }
  621. @keyframes slideUp {
  622. from {
  623. transform: translateY(100%);
  624. }
  625. to {
  626. transform: translateY(0);
  627. }
  628. }
  629. .popup-header {
  630. display: flex;
  631. justify-content: space-between;
  632. align-items: center;
  633. padding: 30rpx 40rpx;
  634. border-bottom: 1rpx solid #f0f0f0;
  635. }
  636. .popup-title {
  637. font-size: 32rpx;
  638. font-weight: bold;
  639. color: #333;
  640. }
  641. .cancel-text,
  642. .confirm-text {
  643. font-size: 30rpx;
  644. padding: 10rpx;
  645. }
  646. .confirm-text {
  647. color: #C1001C;
  648. font-weight: bold;
  649. }
  650. .item-list {
  651. max-height: 50vh;
  652. padding: 0 40rpx;
  653. }
  654. /* 搜索栏样式 */
  655. .search-bar {
  656. padding: 16rpx 40rpx;
  657. border-bottom: 1rpx solid #f0f0f0;
  658. }
  659. .search-input-wrap {
  660. display: flex;
  661. align-items: center;
  662. background: #f5f6f8;
  663. border-radius: 32rpx;
  664. padding: 12rpx 24rpx;
  665. }
  666. .search-icon {
  667. font-size: 28rpx;
  668. margin-right: 12rpx;
  669. }
  670. .search-input {
  671. flex: 1;
  672. font-size: 26rpx;
  673. color: #333;
  674. height: 56rpx;
  675. }
  676. .option-item {
  677. height: 110rpx;
  678. display: flex;
  679. align-items: center;
  680. justify-content: space-between;
  681. border-bottom: 1rpx solid #f8f8f8;
  682. font-size: 32rpx;
  683. color: #333;
  684. }
  685. .option-item.active {
  686. color: #C1001C;
  687. font-weight: bold;
  688. }
  689. .bottom-placeholder {
  690. height: 60rpx;
  691. }
  692. </style>