edit.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. <template>
  2. <view class="edit-container">
  3. <scroll-view scroll-y class="scroll-content">
  4. <view class="form-wrapper">
  5. <uv-form :model="form" ref="formRef" labelWidth="100px" labelPosition="top" :borderBottom="false">
  6. <!-- 1. 项目信息 -->
  7. <view class="section-title">项目信息</view>
  8. <view class="group-card">
  9. <uv-form-item label="项目名称">
  10. <uv-input v-model="form.projectName" disabled placeholder="自动获取" border="none"/>
  11. </uv-form-item>
  12. <uv-form-item label="项目来源">
  13. <uv-input v-model="form.projectSource" disabled placeholder="自动获取" border="none"/>
  14. </uv-form-item>
  15. <uv-form-item label="项目负责人">
  16. <uv-input v-model="form.projectIncharge" disabled placeholder="自动获取" border="none"/>
  17. </uv-form-item>
  18. <uv-form-item label="所属科室">
  19. <uv-input v-model="form.deptName" disabled placeholder="自动获取" border="none"/>
  20. </uv-form-item>
  21. <uv-form-item label="费用科目">
  22. <uv-input v-model="form.subjName" disabled placeholder="自动获取" border="none"/>
  23. </uv-form-item>
  24. <uv-form-item label="费用类型">
  25. <uv-input v-model="form.subSubjName" disabled placeholder="自动获取" border="none"/>
  26. </uv-form-item>
  27. <uv-form-item label="入账金额(元)">
  28. <uv-input :value="showAmount ? amountUnitFormatter(showAmount) : '0.00'" disabled placeholder="自动获取" border="none" />
  29. </uv-form-item>
  30. <uv-form-item label="可用金额(元)">
  31. <uv-input :value="showBalanceAmount ? amountUnitFormatter(showBalanceAmount) : '0.00'" disabled placeholder="自动获取" border="none" />
  32. </uv-form-item>
  33. <uv-form-item label="事项" prop="purpose" required>
  34. <uv-textarea v-model="form.purpose" placeholder="请输入事项" autoHeight border="none" customStyle="background-color: #f8f8f8; padding: 20rpx; border-radius: 10rpx;" />
  35. </uv-form-item>
  36. </view>
  37. <!-- 2. 报销经费 -->
  38. <view class="section-title mt20">报销经费</view>
  39. <view class="group-card">
  40. <uv-form-item label="支出日期" prop="expendTime" required @click="openExpandTimePicker">
  41. <uv-input v-model="form.expendTime" disabled disabledColor="#ffffff" placeholder="请选择支出日期" suffixIcon="arrow-right" border="none"/>
  42. </uv-form-item>
  43. <uv-form-item label="申请人" prop="handle">
  44. <uv-input v-model="form.handle" placeholder="请输入申请人" border="none"/>
  45. </uv-form-item>
  46. <uv-form-item label="出纳" prop="expend">
  47. <uv-input v-model="form.expend" placeholder="请输入出纳" border="none"/>
  48. </uv-form-item>
  49. <uv-form-item label="支出金额(元)" prop="amount">
  50. <uv-input v-model="form.amount" type="digit" :formatter="amountInputFormatter" placeholder="请输入支出金额" border="none"/>
  51. </uv-form-item>
  52. </view>
  53. <!-- 3. 发票信息 -->
  54. <view class="section-title mt20 flex justify-between align-center">
  55. <text>发票信息</text>
  56. <uv-button type="primary" size="small" icon="plus" plain customStyle="height: 50rpx;" @click="addInvoice">添加</uv-button>
  57. </view>
  58. <view class="group-card mt10" v-for="(item, index) in form.invoice" :key="'invoice' + index">
  59. <view class="flex justify-between align-center mb10" v-if="Number(index) > 0">
  60. <text style="color: #999; font-size: 24rpx;">发票信息 {{ Number(index) + 1 }}</text>
  61. <text class="delete-text" @click="deleteInvoice(Number(index))">删除</text>
  62. </view>
  63. <uv-form-item label="发票号码" required>
  64. <uv-input v-model="item.invoiceNo" placeholder="请输入发票号码" border="none"/>
  65. </uv-form-item>
  66. <uv-form-item label="发票金额(元)" required>
  67. <uv-input v-model="item.amount" type="digit" :formatter="amountInputFormatter" placeholder="请输入金额" border="none"/>
  68. </uv-form-item>
  69. <uv-form-item label="开票日期" required @click="openInvoiceByPicker(Number(index), item.invoiceBy)">
  70. <uv-input v-model="item.invoiceBy" disabled disabledColor="#ffffff" placeholder="请选择开票日期" suffixIcon="arrow-right" border="none"/>
  71. </uv-form-item>
  72. <uv-form-item label="上传附件" required>
  73. <uv-upload
  74. :fileList="item.fileList"
  75. name="file"
  76. multiple
  77. :maxCount="3"
  78. @afterRead="afterReadInvoice($event, Number(index))"
  79. @delete="deleteInvoiceFile($event, Number(index))"
  80. ></uv-upload>
  81. </uv-form-item>
  82. </view>
  83. <!-- 4. 支付信息 -->
  84. <view class="section-title mt20 flex justify-between align-center">
  85. <text>支付信息</text>
  86. <uv-button type="primary" size="small" icon="plus" plain customStyle="height: 50rpx;" @click="addPayment">添加</uv-button>
  87. </view>
  88. <view class="group-card mt10" v-for="(item, index) in form.payment" :key="'payment' + index">
  89. <view class="flex justify-between align-center mb10" v-if="Number(index) > 0">
  90. <text style="color: #999; font-size: 24rpx;">支付信息 {{ Number(index) + 1 }}</text>
  91. <text class="delete-text" @click="deletePayment(Number(index))">删除</text>
  92. </view>
  93. <uv-form-item label="支付方式" @click="openPayTypePicker(Number(index))">
  94. <uv-input :value="formatPayType(item.payType)" disabled disabledColor="#ffffff" placeholder="请选择支付方式" suffixIcon="arrow-right" border="none"/>
  95. </uv-form-item>
  96. <uv-form-item label="收款人/单位" prop="receiver">
  97. <uv-input v-model="item.receiver" placeholder="请输入收款人或单位" border="none"/>
  98. </uv-form-item>
  99. <uv-form-item label="个人/单位类型" required>
  100. <view class="radio-group-wrap">
  101. <radio-group @change="item.receiverType = $event.detail.value">
  102. <label class="radio-label" v-for="ro in receiverTypeOptions" :key="ro.dictValue">
  103. <radio :value="ro.dictValue" :checked="item.receiverType === ro.dictValue" color="#1c9bfd" style="transform: scale(0.8)"/>
  104. <text>{{ ro.dictLabel }}</text>
  105. </label>
  106. </radio-group>
  107. </view>
  108. </uv-form-item>
  109. <uv-form-item label="金额(元)" required>
  110. <uv-input v-model="item.amount" type="digit" :formatter="amountInputFormatter" placeholder="请输入金额" border="none"/>
  111. </uv-form-item>
  112. </view>
  113. <!-- 5. 附件信息 -->
  114. <view class="section-title mt20">项目附件</view>
  115. <view class="group-card">
  116. <uv-form-item label="上传附件">
  117. <uv-upload
  118. :fileList="form.fileList"
  119. name="file"
  120. multiple
  121. :maxCount="5"
  122. @afterRead="afterReadGeneral"
  123. @delete="deleteGeneralFile"
  124. ></uv-upload>
  125. </uv-form-item>
  126. </view>
  127. </uv-form>
  128. </view>
  129. </scroll-view>
  130. <!-- 提交按钮 -->
  131. <view class="bottom-bar">
  132. <uv-button type="primary" text="提交报销" @click="submitForm" :loading="loading" customStyle="border-radius: 40rpx;"></uv-button>
  133. </view>
  134. <!-- 选择器容器 -->
  135. <uv-datetime-picker ref="expendTimePickerRef" mode="date" @confirm="onExpendTimeConfirm"></uv-datetime-picker>
  136. <uv-datetime-picker ref="invoicePickerRef" mode="date" @confirm="onInvoiceByConfirm"></uv-datetime-picker>
  137. <uv-picker ref="payTypePickerRef" :columns="[payTypeOptions]" keyName="label" @confirm="onPayTypeConfirm"></uv-picker>
  138. <uv-toast ref="toastRef"></uv-toast>
  139. </view>
  140. </template>
  141. <script lang="ts" setup>
  142. import { ref, reactive } from 'vue';
  143. import { onLoad } from '@dcloudio/uni-app';
  144. import { useUserStore } from '@/store/modules/user';
  145. import { storeToRefs } from 'pinia';
  146. import { useExpenseRemindApi, useRebateApi, useExpenseApi, useFundCardApi } from '@/api/fund/index';
  147. import { useSystemApi } from '@/api/system/index';
  148. import { CACHE_KEY } from '@/constants/index';
  149. import { amountInputFormatter } from '@/utils/format';
  150. const userStore = useUserStore();
  151. const { userInfo } = storeToRefs(userStore);
  152. const systemApi = useSystemApi();
  153. const expenseRemindApi = useExpenseRemindApi();
  154. const fundCardApi = useFundCardApi();
  155. const expenseApi = useExpenseApi();
  156. const toastRef = ref();
  157. const formRef = ref();
  158. const expendTimePickerRef = ref();
  159. const invoicePickerRef = ref();
  160. const payTypePickerRef = ref();
  161. const loading = ref(false);
  162. const receiverTypeOptions = ref<any[]>([]);
  163. const dictOptions = ref<any[]>([]);
  164. const subList = ref<any[]>([]);
  165. const payTypeOptions = [
  166. { label: '现金', value: '10' },
  167. { label: '银行转账', value: '20' },
  168. { label: '国库集中支付', value: '30' }
  169. ];
  170. const showAmount = ref(0);
  171. const showBalanceAmount = ref(0);
  172. const activeInvoiceIndex = ref(-1);
  173. const activePayIndex = ref(-1);
  174. const form = reactive<any>({
  175. id: 0,
  176. orderNo: '',
  177. price: 0,
  178. buyerName: '',
  179. createdTime: '',
  180. status: '',
  181. fileList: [],
  182. amount: 0,
  183. noticeId: null,
  184. projectType: '',
  185. allotId: null,
  186. handle: '',
  187. projectId: 0,
  188. projectIncharge: '',
  189. projectName: '',
  190. projectSource: '',
  191. deptName: '',
  192. purpose: '',
  193. invoice: [
  194. { fileList: [], invoiceNo: '', amount: null, invoiceBy: '' }
  195. ],
  196. payment: [
  197. { payType: '10', receiver: '', receiverType: '', amount: '' }
  198. ],
  199. subjCode: '',
  200. subjName: '',
  201. subSubjCode: '',
  202. subSubjName: '',
  203. expendTime: '',
  204. expend: ''
  205. });
  206. const formatPayType = (type: string) => {
  207. const item = payTypeOptions.find(o => o.value === type);
  208. return item ? item.label : '';
  209. };
  210. const amountUnitFormatter = (val: any) => {
  211. if (val === null || val === undefined || val === '') return '0.00';
  212. const num = Number(val);
  213. return isNaN(num) ? '0.00' : num.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  214. };
  215. const getDict = async () => {
  216. try {
  217. const resTypes: any = await systemApi.getDictDataByType('sci_receiver_type');
  218. if (resTypes.success && resTypes.data) receiverTypeOptions.value = resTypes.data.values;
  219. // get subjects
  220. const resSubj: any = await expenseApi.GetListNoPage();
  221. if(resSubj.success) {
  222. subList.value = resSubj.data;
  223. }
  224. const resSys: any = await systemApi.getEntityMapByKeys({ configKeys: ['sci_fund_expense_notice_business_code', 'sci_fund_expense_notice_material_code'] });
  225. if(resSys.success && resSys.data) {
  226. const pConfig = resSys.data;
  227. const find = (subList.value || []).find((item: any) => item.subjCode == pConfig.sci_fund_expense_notice_business_code);
  228. form.subjCode = find?.subjCode || '';
  229. form.subjName = find?.subjName || '';
  230. const subChildrenList = find?.children || [];
  231. const subFind = subChildrenList.find((item: any) => item.subjCode == pConfig.sci_fund_expense_notice_material_code);
  232. form.subSubjCode = subFind?.subjCode || '';
  233. form.subSubjName = subFind?.subjName || '';
  234. }
  235. } catch (err) {
  236. console.error(err);
  237. }
  238. };
  239. const getAmountInfo = async () => {
  240. if (!form.projectId || !form.subjCode) return;
  241. const params = {
  242. projectId: form.projectId,
  243. projectType: form.projectType,
  244. subjCode: form.subjCode
  245. };
  246. try {
  247. const res: any = await fundCardApi.getSubjAmount(params);
  248. if (res.code == 200 && res.data) {
  249. showAmount.value = res.data.amount;
  250. showBalanceAmount.value = res.data.balanceAmount;
  251. }
  252. } catch (err) {
  253. console.error(err);
  254. }
  255. };
  256. const getFundDetail = async (id: number) => {
  257. try {
  258. const res: any = await expenseRemindApi.getDetails({ id });
  259. if (res.code == 200 && res.data) {
  260. Object.assign(form, res.data);
  261. form.noticeId = res.data.id;
  262. form.amount = res.data.price;
  263. form.deptName = res.data.projectDeptName;
  264. form.handle = userInfo.value?.nickName || '';
  265. if(form.invoice.length === 0) {
  266. form.invoice = [{ fileList: [], invoiceNo: '', amount: null, invoiceBy: '' }];
  267. }
  268. if(form.payment.length === 0) {
  269. form.payment = [{ payType: '10', receiver: '', receiverType: '', amount: '' }];
  270. }
  271. }
  272. } catch (err) {
  273. console.error(err);
  274. }
  275. };
  276. // ================= Add/Delete dynamic items =================
  277. const addInvoice = () => {
  278. form.invoice.push({ fileList: [], invoiceNo: '', amount: null, invoiceBy: '' });
  279. };
  280. const deleteInvoice = (idx: number) => {
  281. uni.showModal({
  282. title: '提示',
  283. content: '确认删除该发票信息吗?',
  284. success: (res) => {
  285. if(res.confirm) form.invoice.splice(idx, 1);
  286. }
  287. });
  288. };
  289. const addPayment = () => {
  290. form.payment.push({ payType: '10', receiver: '', receiverType: '', amount: '' });
  291. };
  292. const deletePayment = (idx: number) => {
  293. uni.showModal({
  294. title: '提示',
  295. content: '确认删除该支付信息吗?',
  296. success: (res) => {
  297. if(res.confirm) form.payment.splice(idx, 1);
  298. }
  299. });
  300. };
  301. // ================= Pickers =================
  302. const openExpandTimePicker = () => {
  303. expendTimePickerRef.value.open();
  304. };
  305. const onExpendTimeConfirm = (e: any) => {
  306. const d = new Date(e.value);
  307. form.expendTime = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
  308. };
  309. const openInvoiceByPicker = (index: number, val: string) => {
  310. activeInvoiceIndex.value = index;
  311. invoicePickerRef.value.open();
  312. };
  313. const onInvoiceByConfirm = (e: any) => {
  314. const d = new Date(e.value);
  315. const dateStr = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
  316. if(activeInvoiceIndex.value !== -1) {
  317. form.invoice[activeInvoiceIndex.value].invoiceBy = dateStr;
  318. }
  319. };
  320. const openPayTypePicker = (index: number) => {
  321. activePayIndex.value = index;
  322. payTypePickerRef.value.open();
  323. };
  324. const onPayTypeConfirm = (e: any) => {
  325. if (activePayIndex.value !== -1) {
  326. form.payment[activePayIndex.value].payType = e.value[0].value;
  327. }
  328. };
  329. // ================= Upload Logic =================
  330. const uploadFileApi = (file: any): Promise<string> => {
  331. return new Promise((resolve, reject) => {
  332. uni.uploadFile({
  333. url: import.meta.env.VITE_SCIENTIFIC.replace('/api/Scientific', '/api/System/File/UploadFile'), // Fallback guess for system upload API if specific one isn't known
  334. filePath: file.url,
  335. name: 'file',
  336. header: { Authorization: 'Bearer ' + uni.getStorageSync(CACHE_KEY.TOKEN) },
  337. success: (res) => {
  338. try {
  339. const data = JSON.parse(res.data);
  340. if (data.code === 200 || data.success) resolve(data.data.url || data.data);
  341. else reject(new Error('上传失败'));
  342. } catch {
  343. resolve(res.data); // in case it returns plain url
  344. }
  345. },
  346. fail: (err) => reject(err)
  347. });
  348. });
  349. };
  350. const afterReadGeneral = async (e: any) => {
  351. const fileList: any[] = [].concat(e.file);
  352. for (const file of fileList) {
  353. form.fileList.push({ ...file, status: 'uploading', message: '上传中' });
  354. try {
  355. const url = await uploadFileApi(file);
  356. const item = form.fileList[form.fileList.length - 1];
  357. item.status = 'success';
  358. item.message = '';
  359. item.url = url;
  360. item.fileUrl = url;
  361. item.fileName = file.name;
  362. } catch {
  363. form.fileList[form.fileList.length - 1].status = 'failed';
  364. }
  365. }
  366. };
  367. const deleteGeneralFile = (e: any) => {
  368. form.fileList.splice(e.index, 1);
  369. };
  370. const afterReadInvoice = async (e: any, invoiceIndex: number) => {
  371. const fileList: any[] = [].concat(e.file);
  372. const targetInvoice = form.invoice[invoiceIndex];
  373. for (const file of fileList) {
  374. targetInvoice.fileList.push({ ...file, status: 'uploading', message: '上传中' });
  375. try {
  376. const url = await uploadFileApi(file);
  377. const item = targetInvoice.fileList[targetInvoice.fileList.length - 1];
  378. item.status = 'success';
  379. item.message = '';
  380. item.url = url;
  381. item.fileUrl = url;
  382. item.fileName = file.name;
  383. } catch {
  384. targetInvoice.fileList[targetInvoice.fileList.length - 1].status = 'failed';
  385. }
  386. }
  387. };
  388. const deleteInvoiceFile = (e: any, invoiceIndex: number) => {
  389. form.invoice[invoiceIndex].fileList.splice(e.index, 1);
  390. };
  391. // ================= Submit =================
  392. const submitForm = async () => {
  393. if (!form.purpose) {
  394. toastRef.value.show({ message: '请输入事项', type: 'warning' });
  395. return;
  396. }
  397. if (!form.expendTime) {
  398. toastRef.value.show({ message: '请选择支出日期', type: 'warning' });
  399. return;
  400. }
  401. if (form.invoice.length === 0) {
  402. toastRef.value.show({ message: '发票信息不能为空', type: 'warning' });
  403. return;
  404. }
  405. if (form.payment.length === 0) {
  406. toastRef.value.show({ message: '支付信息不能为空', type: 'warning' });
  407. return;
  408. }
  409. // Basic validation loop for invoice and payment
  410. for (const inv of form.invoice) {
  411. if(!inv.invoiceNo || !inv.amount || !inv.invoiceBy || !inv.fileList.length) {
  412. toastRef.value.show({ message: '请完成发票信息的填写及附件上传', type: 'warning' });
  413. return;
  414. }
  415. }
  416. for (const pay of form.payment) {
  417. if(!pay.receiverType || !pay.amount) {
  418. toastRef.value.show({ message: '请完成支付信息的必填项', type: 'warning' });
  419. return;
  420. }
  421. }
  422. const params = JSON.parse(JSON.stringify(form));
  423. // MAP attachments to backend format
  424. params.fileList = params.fileList.map((item: any) => ({
  425. fileName: item.fileName || item.name,
  426. fileSize: item.size,
  427. fileUrl: item.fileUrl || item.url
  428. }));
  429. params.fileUrl = JSON.stringify(params.fileList);
  430. params.invoice = params.invoice.map((item: any) => ({
  431. amount: item.amount,
  432. invoiceBy: item.invoiceBy,
  433. invoiceNo: item.invoiceNo,
  434. fileName: item.fileList[0]?.fileName || item.fileList[0]?.name,
  435. fileUrl: item.fileList[0]?.fileUrl || item.fileList[0]?.url,
  436. invoiceType: item.fileList[0]?.type || ''
  437. }));
  438. loading.value = true;
  439. try {
  440. const res: any = await expenseRemindApi.create(params);
  441. if (res.code == 200) {
  442. toastRef.value.show({ message: '报销成功', type: 'success' });
  443. setTimeout(() => {
  444. uni.navigateBack();
  445. }, 1000);
  446. } else {
  447. toastRef.value.show({ message: res.msg || '提交失败', type: 'error' });
  448. }
  449. } catch (err) {
  450. console.error(err);
  451. } finally {
  452. loading.value = false;
  453. }
  454. };
  455. onLoad((options: any) => {
  456. const id = options.id ? Number(options.id) : 0;
  457. getDict().then(() => {
  458. if (id) {
  459. getFundDetail(id).then(() => {
  460. getAmountInfo();
  461. });
  462. }
  463. });
  464. });
  465. </script>
  466. <style lang="scss" scoped>
  467. .edit-container {
  468. height: calc(100vh - var(--window-top));
  469. display: flex;
  470. flex-direction: column;
  471. background-color: #f5f7fa;
  472. box-sizing: border-box;
  473. }
  474. .scroll-content {
  475. flex: 1;
  476. height: 100%;
  477. }
  478. .form-wrapper {
  479. margin: 30rpx;
  480. padding-bottom: calc(120rpx + env(safe-area-inset-bottom));
  481. }
  482. .section-title {
  483. font-size: 32rpx;
  484. font-weight: bold;
  485. color: #333;
  486. margin-bottom: 20rpx;
  487. padding-left: 20rpx;
  488. position: relative;
  489. &::before {
  490. content: '';
  491. position: absolute;
  492. left: 0;
  493. top: 50%;
  494. transform: translateY(-50%);
  495. width: 8rpx;
  496. height: 32rpx;
  497. background-color: #1c9bfd;
  498. border-radius: 4rpx;
  499. }
  500. }
  501. .group-card {
  502. background-color: #fff;
  503. border-radius: 16rpx;
  504. padding: 0 30rpx;
  505. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.03);
  506. margin-bottom: 30rpx;
  507. :deep(.uv-form-item) {
  508. padding: 10rpx 0;
  509. border-bottom: 1px solid #f5f5f5;
  510. &:last-child {
  511. border-bottom: none;
  512. }
  513. }
  514. }
  515. .flex {
  516. display: flex;
  517. }
  518. .justify-between {
  519. justify-content: space-between;
  520. }
  521. .align-center {
  522. align-items: center;
  523. }
  524. .mt20 {
  525. margin-top: 20rpx;
  526. }
  527. .mt10 {
  528. margin-top: 10rpx;
  529. }
  530. .mb10 {
  531. margin-bottom: 10rpx;
  532. }
  533. .delete-text {
  534. color: #ff4d4f;
  535. font-size: 26rpx;
  536. padding: 10rpx 20rpx;
  537. }
  538. .radio-group-wrap {
  539. display: flex;
  540. flex-wrap: wrap;
  541. gap: 20rpx;
  542. .radio-label {
  543. display: flex;
  544. align-items: center;
  545. font-size: 28rpx;
  546. color: #333;
  547. }
  548. }
  549. .bottom-bar {
  550. position: fixed;
  551. bottom: 0;
  552. left: 0;
  553. right: 0;
  554. background-color: #fff;
  555. padding: 20rpx 30rpx;
  556. box-sizing: border-box;
  557. box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.05);
  558. padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
  559. z-index: 99;
  560. }
  561. </style>