index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  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. <!-- 搜索栏 -->
  124. <view class="search-bar">
  125. <view class="search-input-wrap">
  126. <text class="search-icon">🔍</text>
  127. <input class="search-input" type="text" v-model="typeSearchKey" placeholder="输入名称检索"
  128. @input="onTypeSearch" />
  129. </view>
  130. </view>
  131. <!-- 层级面包屑 -->
  132. <view class="breadcrumb-bar" v-if="typePickerLevel > 1">
  133. <text class="back-btn" @click="goBackModelLevel">← 返回</text>
  134. <text class="breadcrumb-path">
  135. {{typeBreadcrumbs.map(b => b.label).join(' / ')}}
  136. </text>
  137. </view>
  138. <!-- 列表区 -->
  139. <scroll-view scroll-y class="item-list">
  140. <view class="option-item kind-item" v-for="(item, index) in modelKindList" :key="'mk'+index"
  141. @click="drillDownType(item)">
  142. <text class="option-text kind-text">{{ item.num }} - {{ item.name }}</text>
  143. <text class="arrow-right">›</text>
  144. </view>
  145. <view class="option-item" v-for="(item, index) in modelItemList" :key="'mi'+index"
  146. :class="{ active: tempSelectedIndex === index }">
  147. <text class="option-text" @click="selectTypeItem(index)">{{ item.num }} - {{ item.name }}</text>
  148. </view>
  149. </scroll-view>
  150. </view>
  151. </view>
  152. <!-- 表面处理选择 -->
  153. <view class="custom-picker-mask" v-if="showSurfacePicker" @click="closeSurfacePicker" @touchmove.stop.prevent>
  154. <view class="picker-popup" @click.stop>
  155. <view class="popup-header">
  156. <text class="cancel-text" @click="closeSurfacePicker">取消</text>
  157. <text class="popup-title">选择表面处理</text>
  158. <text class="confirm-text" @click="confirmSurfaceSelect">确定</text>
  159. </view>
  160. <!-- 搜索栏 -->
  161. <view class="search-bar">
  162. <view class="search-input-wrap">
  163. <text class="search-icon">🔍</text>
  164. <input class="search-input" type="text" v-model="surfaceSearchKey" placeholder="输入名称检索"
  165. @input="onSurfaceSearch" />
  166. </view>
  167. </view>
  168. <!-- 层级面包屑 -->
  169. <view class="breadcrumb-bar" v-if="surfacePickerLevel > 1">
  170. <text class="back-btn" @click="goBackSurfaceLevel">← 返回</text>
  171. <text class="breadcrumb-path">{{surfaceBreadcrumbs.map(b => b.label).join(' / ')}}</text>
  172. </view>
  173. <!-- 列表区 -->
  174. <scroll-view scroll-y class="item-list">
  175. <view class="option-item kind-item" v-for="(item, index) in colorKindList" :key="'ck'+index"
  176. @click="drillDownSurface(item)">
  177. <text class="option-text kind-text">{{ item.num }} - {{ item.name }}</text>
  178. <text class="arrow-right">›</text>
  179. </view>
  180. <view class="option-item" v-for="(item, index) in colorItemList" :key="'ci'+index"
  181. :class="{ active: tempSurfaceIndex === index }">
  182. <text class="option-text" @click="selectSurfaceItem(index)">{{ item.num }} - {{ item.name
  183. }}</text>
  184. </view>
  185. </scroll-view>
  186. </view>
  187. </view>
  188. <!-- 包装方式选择 -->
  189. <view class="custom-picker-mask" v-if="showPackagePicker" @click="closePackagePicker" @touchmove.stop.prevent>
  190. <view class="picker-popup" @click.stop>
  191. <view class="popup-header">
  192. <text class="cancel-text" @click="closePackagePicker">取消</text>
  193. <text class="popup-title">选择包装方式</text>
  194. <text class="confirm-text" @click="confirmPackageSelect">确定</text>
  195. </view>
  196. <view class="search-bar">
  197. <view class="search-input-wrap">
  198. <text class="search-icon">🔍</text>
  199. <input class="search-input" type="text" v-model="packageSearchKey" placeholder="输入名称检索"
  200. @input="onPackageSearch" />
  201. </view>
  202. </view>
  203. <scroll-view scroll-y class="item-list" @scrolltolower="loadMorePackage">
  204. <view class="option-item" v-for="(item, index) in packageList" :key="index"
  205. :class="{ active: tempPackageIndex === index }" @click="selectPackageItem(index)">
  206. <text>{{ item.num }} - {{ item.name }}</text>
  207. <icon type="success_no_circle" size="16" color="#C1001C" v-if="tempPackageIndex === index">
  208. </icon>
  209. </view>
  210. </scroll-view>
  211. </view>
  212. </view>
  213. </view>
  214. </template>
  215. <script>
  216. import ErpNavBar from '@/components/erp-nav-bar.vue';
  217. import { listModel } from '@/api/erp/model.js';
  218. import { listModelKind } from '@/api/erp/modelKind.js';
  219. import { listColor } from '@/api/erp/color.js';
  220. import { listColorKind } from '@/api/erp/colorKind.js';
  221. import { listPagePack } from '@/api/erp/pack.js';
  222. import { addOrderDetail } from '@/api/erp/orderDetail.js';
  223. export default {
  224. components: { ErpNavBar },
  225. data() {
  226. return {
  227. itemIndex: -1,
  228. showTypePicker: false, showSurfacePicker: false, showPackagePicker: false,
  229. tempSelectedIndex: -1, tempSurfaceIndex: -1, tempPackageIndex: -1,
  230. modelKindList: [],
  231. modelItemList: [],
  232. colorKindList: [],
  233. colorItemList: [],
  234. packageList: [],
  235. typeSearchKey: '', surfaceSearchKey: '', packageSearchKey: '',
  236. typeBreadcrumbs: [],
  237. typePickerLevel: 1,
  238. surfaceBreadcrumbs: [],
  239. surfacePickerLevel: 1,
  240. packagePageNum: 1, packagePageSize: 10, packageHasMore: true, packageLoading: false,
  241. formData: {
  242. type: '', modelId: '', name: '', material: '',
  243. surfaceName: '', surfaceId: '', packageMethod: '', packageId: '', length: '',
  244. wallThickness: '', count: '', meterWeight: ''
  245. }
  246. }
  247. },
  248. async onLoad(options) {
  249. if (options.data) {
  250. try {
  251. const item = JSON.parse(decodeURIComponent(options.data));
  252. this.formData.type = item.modelNum || '';
  253. this.formData.modelId = item.modelId || '';
  254. this.formData.name = item.modelName || '';
  255. this.formData.material = item.material || '';
  256. this.formData.surfaceName = item.surfaceName || '';
  257. this.formData.surfaceId = item.surfaceId || '';
  258. this.formData.packageMethod = item.packName || '';
  259. this.formData.packageId = item.packId || '';
  260. this.formData.length = item.length || '';
  261. this.formData.wallThickness = item.wallThickness || '';
  262. this.formData.meterWeight = item.meterWeight || '';
  263. this.formData.count = item.count || '';
  264. this.itemIndex = parseInt(options.index || -1);
  265. } catch (e) {
  266. console.error('Data parse error', e);
  267. }
  268. }
  269. await this.loadPackageMethods();
  270. },
  271. methods: {
  272. async loadPackageMethods(pageNum = 1, keyword = '') {
  273. if (this.packageLoading) return;
  274. this.packageLoading = true;
  275. try {
  276. const res = await listPagePack({ pageNum, pageSize: this.packagePageSize, name: keyword });
  277. const rows = res.rows || [];
  278. const total = res.total || 0;
  279. if (pageNum === 1) {
  280. this.packageList = rows;
  281. } else {
  282. this.packageList = [...this.packageList, ...rows];
  283. }
  284. this.packageHasMore = this.packageList.length < total;
  285. } catch (e) {
  286. console.error('加载包装方式失败', e);
  287. } finally {
  288. this.packageLoading = false;
  289. }
  290. },
  291. loadMorePackage() {
  292. if (this.packageHasMore && !this.packageLoading) {
  293. this.packagePageNum++;
  294. this.loadPackageMethods(this.packagePageNum, this.packageSearchKey);
  295. }
  296. },
  297. onPackageSearch() {
  298. if (this.packageSearchTimer) clearTimeout(this.packageSearchTimer);
  299. this.packageSearchTimer = setTimeout(() => {
  300. this.packagePageNum = 1;
  301. this.loadPackageMethods(1, this.packageSearchKey);
  302. }, 300);
  303. },
  304. /**
  305. * 加载型材系列,点击系列后同时加载子系列和具体型号
  306. * @Author: Trae
  307. */
  308. async loadTypes(parentRowId) {
  309. try {
  310. const keyword = (this.typeSearchKey || '').trim();
  311. const kindParams = { name: keyword || undefined };
  312. if (parentRowId) {
  313. kindParams.parentRowId = parentRowId;
  314. }
  315. const kindRes = await listModelKind(kindParams);
  316. this.modelKindList = kindRes.data || [];
  317. if (parentRowId) {
  318. const modelParams = { name: keyword || undefined, parentRowId };
  319. const modelRes = await listModel(modelParams);
  320. this.modelItemList = modelRes.data || [];
  321. } else {
  322. this.modelItemList = [];
  323. }
  324. } catch (e) {
  325. uni.showToast({ title: e || '加载型号失败', icon: 'none' });
  326. }
  327. },
  328. onTypeSearch() {
  329. const parentRowId = this.typeBreadcrumbs.length > 0
  330. ? this.typeBreadcrumbs[this.typeBreadcrumbs.length - 1].rowId : '';
  331. this.loadTypes(parentRowId);
  332. },
  333. /**
  334. * 加载表面处理系列,点击系列后同时加载子系列和具体颜色
  335. * @Author: Trae
  336. */
  337. async loadSurfaces(parentRowId) {
  338. try {
  339. const keyword = (this.surfaceSearchKey || '').trim();
  340. const kindParams = { name: keyword || undefined };
  341. if (parentRowId) {
  342. kindParams.parentRowId = parentRowId;
  343. }
  344. const kindRes = await listColorKind(kindParams);
  345. this.colorKindList = kindRes.data || [];
  346. if (parentRowId) {
  347. const colorParams = { name: keyword || undefined, parentRowId };
  348. const colorRes = await listColor(colorParams);
  349. this.colorItemList = colorRes.data || [];
  350. } else {
  351. this.colorItemList = [];
  352. }
  353. } catch (e) {
  354. uni.showToast({ title: e || '加载表面处理失败', icon: 'none' });
  355. }
  356. },
  357. onSurfaceSearch() {
  358. const parentRowId = this.surfaceBreadcrumbs.length > 0
  359. ? this.surfaceBreadcrumbs[this.surfaceBreadcrumbs.length - 1].rowId : '';
  360. this.loadSurfaces(parentRowId);
  361. },
  362. /**
  363. * 打开型号选择器
  364. * @Author: Trae
  365. */
  366. openTypePicker() {
  367. this.typePickerLevel = 1;
  368. this.typeBreadcrumbs = [];
  369. this.tempSelectedIndex = -1;
  370. this.showTypePicker = true;
  371. this.loadTypes('');
  372. },
  373. /**
  374. * 钻取到子级
  375. * @Author: Trae
  376. */
  377. drillDownType(item) {
  378. this.typeBreadcrumbs.push({ rowId: item.rowId, label: item.num });
  379. this.typePickerLevel++;
  380. this.tempSelectedIndex = -1;
  381. this.loadTypes(item.rowId);
  382. },
  383. goBackModelLevel() {
  384. this.typeBreadcrumbs.pop();
  385. this.typePickerLevel--;
  386. this.tempSelectedIndex = -1;
  387. const parentRowId = this.typeBreadcrumbs.length > 0
  388. ? this.typeBreadcrumbs[this.typeBreadcrumbs.length - 1].rowId : '';
  389. this.loadTypes(parentRowId);
  390. },
  391. closeTypePicker() {
  392. this.showTypePicker = false;
  393. this.typeSearchKey = '';
  394. this.typePickerLevel = 1;
  395. this.typeBreadcrumbs = [];
  396. this.tempSelectedIndex = -1;
  397. },
  398. selectTypeItem(index) { this.tempSelectedIndex = index; },
  399. confirmTypeSelect() {
  400. if (this.tempSelectedIndex === -1) {
  401. uni.showToast({ title: '请先选择一个选项', icon: 'none' });
  402. return;
  403. }
  404. const item = this.modelItemList[this.tempSelectedIndex];
  405. this.formData.type = item.num;
  406. this.formData.modelId = item.rowId;
  407. this.formData.name = item.name;
  408. this.formData.material = '6063-T5';
  409. this.formData.meterWeight = item.meterWt || '';
  410. this.closeTypePicker();
  411. },
  412. /**
  413. * 打开表面处理选择器
  414. * @Author: Trae
  415. */
  416. openSurfacePicker() {
  417. this.surfacePickerLevel = 1;
  418. this.surfaceBreadcrumbs = [];
  419. this.tempSurfaceIndex = -1;
  420. this.showSurfacePicker = true;
  421. this.loadSurfaces('');
  422. },
  423. /**
  424. * 钻取到子级
  425. * @Author: Trae
  426. */
  427. drillDownSurface(item) {
  428. this.surfaceBreadcrumbs.push({ rowId: item.rowId, label: item.num });
  429. this.surfacePickerLevel++;
  430. this.tempSurfaceIndex = -1;
  431. this.loadSurfaces(item.rowId);
  432. },
  433. goBackSurfaceLevel() {
  434. this.surfaceBreadcrumbs.pop();
  435. this.surfacePickerLevel--;
  436. this.tempSurfaceIndex = -1;
  437. const parentRowId = this.surfaceBreadcrumbs.length > 0
  438. ? this.surfaceBreadcrumbs[this.surfaceBreadcrumbs.length - 1].rowId : '';
  439. this.loadSurfaces(parentRowId);
  440. },
  441. closeSurfacePicker() {
  442. this.showSurfacePicker = false;
  443. this.surfaceSearchKey = '';
  444. this.surfacePickerLevel = 1;
  445. this.surfaceBreadcrumbs = [];
  446. this.tempSurfaceIndex = -1;
  447. },
  448. selectSurfaceItem(index) { this.tempSurfaceIndex = index; },
  449. confirmSurfaceSelect() {
  450. if (this.tempSurfaceIndex === -1) {
  451. uni.showToast({ title: '请先选择一个选项', icon: 'none' });
  452. return;
  453. }
  454. const item = this.colorItemList[this.tempSurfaceIndex];
  455. this.formData.surfaceName = item.name;
  456. this.formData.surfaceId = item.rowId;
  457. this.closeSurfacePicker();
  458. },
  459. openPackagePicker() {
  460. if (this.formData.packageMethod) {
  461. this.tempPackageIndex = this.packageList.findIndex(item => item.name === this.formData.packageMethod);
  462. } else {
  463. this.tempPackageIndex = -1;
  464. }
  465. this.showPackagePicker = true;
  466. },
  467. closePackagePicker() {
  468. this.showPackagePicker = false;
  469. this.packageSearchKey = '';
  470. this.packagePageNum = 1;
  471. },
  472. selectPackageItem(index) { this.tempPackageIndex = index; },
  473. confirmPackageSelect() {
  474. if (this.tempPackageIndex === -1) return;
  475. const item = this.packageList[this.tempPackageIndex];
  476. this.formData.packageMethod = item.name;
  477. this.formData.packageId = item.rowId;
  478. this.closePackagePicker();
  479. },
  480. saveEdit() {
  481. const fields = [
  482. { key: 'type', label: '型号' },
  483. { key: 'surfaceName', label: '表面名称' },
  484. { key: 'packageMethod', label: '包装方式' },
  485. { key: 'length', label: '长度' },
  486. { key: 'wallThickness', label: '壁厚' },
  487. { key: 'count', label: '支数' }
  488. ];
  489. for (let item of fields) {
  490. if (!this.formData[item.key]) {
  491. uni.showToast({ title: `请完善项目:${item.label}`, icon: 'none' });
  492. return;
  493. }
  494. }
  495. uni.$emit('update_order_item', {
  496. index: this.itemIndex,
  497. data: JSON.parse(JSON.stringify(this.formData))
  498. });
  499. uni.navigateBack();
  500. }
  501. }
  502. }
  503. </script>
  504. <style scoped>
  505. /deep/ ::-webkit-scrollbar {
  506. display: none !important;
  507. width: 0 !important;
  508. height: 0 !important;
  509. }
  510. .order-container {
  511. width: 100%;
  512. height: 100vh;
  513. background: #f7f8fa;
  514. display: flex;
  515. flex-direction: column;
  516. overflow: hidden;
  517. }
  518. .order-scroll {
  519. flex: 1;
  520. height: 0;
  521. }
  522. .form-content {
  523. padding: 30rpx;
  524. padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
  525. }
  526. .section-card {
  527. background: #fff;
  528. border-radius: 24rpx;
  529. padding: 30rpx;
  530. margin-bottom: 30rpx;
  531. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.02);
  532. }
  533. .section-header {
  534. display: flex;
  535. align-items: center;
  536. margin-bottom: 40rpx;
  537. }
  538. .blue-bar {
  539. width: 8rpx;
  540. height: 32rpx;
  541. background: #C1001C;
  542. border-radius: 4rpx;
  543. margin-right: 16rpx;
  544. }
  545. .section-title {
  546. font-size: 32rpx;
  547. font-weight: bold;
  548. color: #333;
  549. }
  550. .form-item {
  551. margin-bottom: 40rpx;
  552. }
  553. .no-margin-bottom {
  554. margin-bottom: 0;
  555. }
  556. .row-flex {
  557. display: flex;
  558. justify-content: space-between;
  559. }
  560. .half-item {
  561. width: 48%;
  562. }
  563. .label {
  564. font-size: 28rpx;
  565. color: #333;
  566. margin-bottom: 20rpx;
  567. display: block;
  568. font-weight: 500;
  569. }
  570. .label.required::after {
  571. content: ' *';
  572. color: #ff4d4f;
  573. font-weight: bold;
  574. margin-left: 4rpx;
  575. }
  576. .picker-box {
  577. background: #f9fafc;
  578. border-radius: 12rpx;
  579. height: 100rpx;
  580. border: 1rpx solid #eee;
  581. display: flex;
  582. align-items: center;
  583. }
  584. .picker-inner {
  585. width: 100%;
  586. height: 100%;
  587. display: flex;
  588. align-items: center;
  589. justify-content: space-between;
  590. padding: 0 30rpx;
  591. box-sizing: border-box;
  592. }
  593. .picker-val {
  594. font-size: 30rpx;
  595. color: #333;
  596. }
  597. .picker-val.placeholder {
  598. color: #ccc;
  599. font-size: 28rpx;
  600. }
  601. .line-arrow-down {
  602. width: 14rpx;
  603. height: 14rpx;
  604. border-right: 3rpx solid #bbb;
  605. border-bottom: 3rpx solid #bbb;
  606. transform: rotate(45deg);
  607. margin-top: -8rpx;
  608. margin-right: 4rpx;
  609. }
  610. .input-wrap {
  611. position: relative;
  612. width: 100%;
  613. }
  614. .input-box {
  615. font-size: 30rpx;
  616. color: #333;
  617. width: 100%;
  618. height: 100rpx;
  619. background: #f9fafc;
  620. border-radius: 12rpx;
  621. padding: 0 80rpx 0 30rpx;
  622. box-sizing: border-box;
  623. border: 1rpx solid #eee;
  624. }
  625. .input-box.readonly {
  626. background: #f8f9fa;
  627. color: #666;
  628. border-color: #f0f0f0;
  629. }
  630. .input-box.full-width {
  631. padding: 0 30rpx;
  632. }
  633. .unit {
  634. position: absolute;
  635. right: 24rpx;
  636. top: 50%;
  637. transform: translateY(-50%);
  638. font-size: 26rpx;
  639. color: #999;
  640. font-weight: 500;
  641. }
  642. .small-font {
  643. font-size: 26rpx !important;
  644. }
  645. .fixed-submit-bar {
  646. position: fixed;
  647. bottom: 0;
  648. left: 0;
  649. width: 100%;
  650. background: #fff;
  651. padding: 20rpx 30rpx calc(env(safe-area-inset-bottom) + 20rpx);
  652. box-sizing: border-box;
  653. box-shadow: 0 -10rpx 30rpx rgba(0, 0, 0, 0.05);
  654. z-index: 100;
  655. }
  656. .submit-btn {
  657. background: #C1001C;
  658. color: #fff;
  659. height: 100rpx;
  660. border-radius: 50rpx;
  661. display: flex;
  662. align-items: center;
  663. justify-content: center;
  664. font-size: 34rpx;
  665. font-weight: bold;
  666. border: none;
  667. }
  668. .submit-btn:active {
  669. opacity: 0.9;
  670. transform: scale(0.98);
  671. }
  672. .custom-picker-mask {
  673. position: fixed;
  674. top: 0;
  675. left: 0;
  676. right: 0;
  677. bottom: 0;
  678. background: rgba(0, 0, 0, 0.4);
  679. z-index: 1000;
  680. display: flex;
  681. align-items: flex-end;
  682. }
  683. .picker-popup {
  684. width: 100%;
  685. background: #fff;
  686. border-radius: 32rpx 32rpx 0 0;
  687. padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
  688. animation: slideUp 0.15s ease-out;
  689. }
  690. @keyframes slideUp {
  691. from {
  692. transform: translateY(100%);
  693. }
  694. to {
  695. transform: translateY(0);
  696. }
  697. }
  698. .popup-header {
  699. display: flex;
  700. justify-content: space-between;
  701. align-items: center;
  702. padding: 30rpx 40rpx;
  703. border-bottom: 1rpx solid #f0f0f0;
  704. }
  705. .popup-title {
  706. font-size: 32rpx;
  707. font-weight: bold;
  708. color: #333;
  709. }
  710. .cancel-text,
  711. .confirm-text {
  712. font-size: 30rpx;
  713. padding: 10rpx;
  714. }
  715. .confirm-text {
  716. color: #C1001C;
  717. font-weight: bold;
  718. }
  719. .item-list {
  720. max-height: 50vh;
  721. padding: 0 40rpx;
  722. }
  723. /* 搜索栏样式 */
  724. .search-bar {
  725. padding: 16rpx 40rpx;
  726. border-bottom: 1rpx solid #f0f0f0;
  727. }
  728. .search-input-wrap {
  729. display: flex;
  730. align-items: center;
  731. background: #f5f6f8;
  732. border-radius: 32rpx;
  733. padding: 12rpx 24rpx;
  734. }
  735. .search-icon {
  736. font-size: 28rpx;
  737. margin-right: 12rpx;
  738. }
  739. .search-input {
  740. flex: 1;
  741. font-size: 26rpx;
  742. color: #333;
  743. height: 56rpx;
  744. }
  745. .option-item {
  746. height: 110rpx;
  747. display: flex;
  748. align-items: center;
  749. justify-content: space-between;
  750. border-bottom: 1rpx solid #f8f8f8;
  751. font-size: 32rpx;
  752. color: #333;
  753. }
  754. .option-item.active {
  755. color: #C1001C;
  756. font-weight: bold;
  757. }
  758. .kind-item {
  759. background: #fafbfc;
  760. }
  761. .kind-text {
  762. color: #556;
  763. }
  764. .option-text {
  765. flex: 1;
  766. padding: 10rpx 0;
  767. }
  768. /* 级联面包屑 */
  769. .breadcrumb-bar {
  770. display: flex;
  771. align-items: center;
  772. padding: 16rpx 40rpx;
  773. background: #fafafa;
  774. border-bottom: 1rpx solid #f0f0f0;
  775. }
  776. .back-btn {
  777. font-size: 28rpx;
  778. color: #C1001C;
  779. padding-right: 20rpx;
  780. flex-shrink: 0;
  781. }
  782. .breadcrumb-path {
  783. font-size: 26rpx;
  784. color: #666;
  785. flex: 1;
  786. overflow: hidden;
  787. text-overflow: ellipsis;
  788. white-space: nowrap;
  789. }
  790. .arrow-right {
  791. font-size: 56rpx;
  792. color: #bbb;
  793. padding: 10rpx 0 10rpx 20rpx;
  794. font-weight: 300;
  795. }
  796. .bottom-placeholder {
  797. height: 60rpx;
  798. }
  799. </style>