apply-refund.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. <template>
  2. <view class="apply-refund-page">
  3. <!-- 退款商品 -->
  4. <view class="card">
  5. <view class="type-section">
  6. <view class="section-title">请选择售后类型</view>
  7. <view class="type-btn-group">
  8. <view class="type-btn" :class="{ active: refundType === '1' }"
  9. @click="confirmType([{ value: '1', label: '退货退款' }])">
  10. <text>退货退款</text>
  11. </view>
  12. <view class="type-btn" :class="{ active: refundType === '2' }"
  13. @click="confirmType([{ value: '2', label: '仅退款' }])">
  14. <text>仅退款</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="card-header">
  19. <text class="card-title">退款商品</text>
  20. </view>
  21. <view class="goods-list">
  22. <view v-for="(item, index) in orderInfo.detailVoList" :key="index" class="goods-item">
  23. <view class="checkbox-box" @click.stop="toggleCheck(item)">
  24. <u-icon v-if="item.checked" name="checkmark-circle-fill" color="#38C148" size="44"></u-icon>
  25. <u-icon v-else name="checkmark-circle" color="#ccc" size="44"></u-icon>
  26. </view>
  27. <image :src="item.cover" mode="aspectFill" class="goods-cover"></image>
  28. <view class="goods-info">
  29. <view class="goods-name u-line-2">{{ item.bookName }}</view>
  30. <view class="goods-sku" v-if="item.isbn">ISBN: {{ item.isbn }}</view>
  31. <view class="price-box">
  32. <text class="price">¥{{ item.payPrice }}</text>
  33. <u-number-box v-model="item.refundNum" :min="1" :max="item.num"
  34. @change="calculateRefundMoney"></u-number-box>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 退款原因配置 -->
  41. <view class="card no-padding">
  42. <u-cell-group :border="false">
  43. <!-- 退款原因 -->
  44. <u-cell-item title="退款原因" :value="refundReasonText || '请选择'" @click="showReasonPicker = true" required
  45. :border-bottom="refundType === '2' ? false : true"></u-cell-item>
  46. <!-- 货物状态 (仅退款显示) -->
  47. <u-cell-item v-if="refundType === '1'" title="货物状态" :value="shopStatusText"
  48. @click="showStatusPicker = true" required :border-bottom="false"></u-cell-item>
  49. </u-cell-group>
  50. </view>
  51. <!-- 退款金额与凭证 -->
  52. <view class="card no-padding">
  53. <view class="card-title" style="padding:30rpx 0 0 20rpx">退款金额:</view>
  54. <u-cell-group :border="false">
  55. <!-- 退回支付渠道 -->
  56. <u-cell-item :title="refundChannelText" :arrow="false">
  57. <view slot="right-icon" class="refund-money-box" @click="showRefundAmountPopup = true">
  58. <text class="money">¥{{ refundMoney }}</text>
  59. <view class="edit-tag">
  60. <u-icon name="edit-pen" size="24"></u-icon>
  61. <text>修改</text>
  62. </view>
  63. </view>
  64. </u-cell-item>
  65. <!-- 上传描述和凭证 -->
  66. <u-cell-item title="上传描述和凭证" :value="uploadStatusText" @click="showUploadPopup = true" is-link
  67. :border-bottom="false"></u-cell-item>
  68. </u-cell-group>
  69. </view>
  70. <!-- 退货方式 (仅退货退款显示) - 单独分区 -->
  71. <view class="card no-padding" v-if="refundType === '1'">
  72. <u-cell-group :border="false">
  73. <u-cell-item title="退货方式" :value="returnMethodText || '请选择'" @click="showReturnMethodPicker = true"
  74. required></u-cell-item>
  75. <!-- 上门取件地址 (仅上门取件显示) -->
  76. <view class="address-section" @click="chooseAddress">
  77. <view class="flex-a flex-j-b mb-20" v-if="address.name">
  78. <view class="address-label">我的地址</view>
  79. <image src="/pages-mine/static/adderss.png" style="width: 40rpx; height: 40rpx"></image>
  80. <view class="flex-d flex-1 ml-24" style="margin-right: 20rpx">
  81. <view class="flex-a flex-j-b mb-10">
  82. <view class="address-text">{{ address.name }}</view>
  83. <view class="address-text">{{ address.mobile }}</view>
  84. </view>
  85. <view class="address-text">{{ address.province || '' }}{{ address.city || '' }}{{
  86. address.area || '' }}{{ address.fullAddress }}</view>
  87. </view>
  88. <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
  89. </view>
  90. <view class="flex-a flex-j-b" v-else>
  91. <view class="flex-a">
  92. <u-icon name="plus-circle-fill" :size="48" color="#38C148" top="2"></u-icon>
  93. <view class="ml-10 font-30 address-text">我的地址</view>
  94. <text class="u-required">*</text>
  95. </view>
  96. <view class="flex-a">
  97. <view class="ml-10 address-text">请添加</view>
  98. <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
  99. </view>
  100. </view>
  101. </view>
  102. </u-cell-group>
  103. </view>
  104. <!-- 我的服务 - 单独分区 -->
  105. <view class="card no-padding">
  106. <view class="card-title" style="padding:30rpx 0 0 20rpx">我的服务</view>
  107. <u-cell-group :border="false">
  108. <u-cell-item title="退换无忧" value="服务生效中" :arrow="true" :border-bottom="false">
  109. <u-icon slot="icon" name="checkmark-circle-fill" color="#38C148" size="32"
  110. style="margin-right: 10rpx;"></u-icon>
  111. </u-cell-item>
  112. </u-cell-group>
  113. </view>
  114. <!-- 底部占位 -->
  115. <view style="height: 60rpx;"></view>
  116. <!-- 底部固定栏 -->
  117. <view class="footer-bar">
  118. <view class="footer-left" @click="showRefundAmountPopup = true">
  119. <text class="label">{{ refundChannelText }}:</text>
  120. <text class="amount">¥{{ refundMoney }}</text>
  121. <text class="detail-link">明细</text>
  122. </view>
  123. <view class="footer-right">
  124. <u-button type="primary" shape="circle" :custom-style="submitBtnStyle" @click="submit">提交申请</u-button>
  125. </view>
  126. </view>
  127. <!-- 弹窗: 退款原因 -->
  128. <u-select v-model="showReasonPicker" :list="reasonList" @confirm="confirmReason"></u-select>
  129. <!-- 弹窗: 货物状态 -->
  130. <u-select v-model="showStatusPicker" :list="statusList" @confirm="confirmStatus"></u-select>
  131. <!-- 弹窗: 退货方式 -->
  132. <u-select v-model="showReturnMethodPicker" :list="returnMethodList" :default-value="returnMethodIndex"
  133. @confirm="confirmReturnMethod"></u-select>
  134. <!-- 弹窗: 上传描述和凭证 -->
  135. <u-popup v-model="showUploadPopup" mode="bottom" border-radius="24" height="800">
  136. <view class="popup-container full-height">
  137. <view class="popup-header">
  138. <text class="title">上传描述和凭证</text>
  139. <u-icon name="close" size="32" color="#999" @click="showUploadPopup = false"></u-icon>
  140. </view>
  141. <view class="popup-content">
  142. <view class="upload-textarea-box">
  143. <u-input v-model="description" type="textarea" placeholder="补充描述,有助于平台更好的处理售后问题" :height="100"
  144. maxlength="200" />
  145. </view>
  146. <view class="upload-area">
  147. <common-image-upload v-model="fileList" :max-count="5" code="shopRefund" width="160"
  148. height="160">
  149. </common-image-upload>
  150. </view>
  151. </view>
  152. <view class="popup-footer safe-area-bottom">
  153. <u-button type="primary" shape="circle" :custom-style="submitBtnStyle"
  154. @click="showUploadPopup = false">完成</u-button>
  155. </view>
  156. </view>
  157. </u-popup>
  158. <!-- 弹窗: 退款明细 -->
  159. <u-popup v-model="showRefundAmountPopup" mode="bottom" border-radius="24">
  160. <view class="popup-container">
  161. <view class="popup-header">
  162. <text class="title">退款金额明细</text>
  163. <u-icon name="close" size="32" color="#999" @click="showRefundAmountPopup = false"></u-icon>
  164. </view>
  165. <view class="popup-content">
  166. <view class="detail-item">
  167. <view class="item-row">
  168. <u-icon name="rmb-circle" size="36" color="#666"></u-icon>
  169. <text class="item-label">{{ refundChannelText }}</text>
  170. <text class="item-value">¥{{ refundMoney }}</text>
  171. </view>
  172. </view>
  173. <!-- 如果有红包/优惠,展示在这里 -->
  174. <view class="detail-item" v-if="otherRefundAmount > 0">
  175. <view class="item-row">
  176. <u-icon name="red-packet" size="36" color="#666"></u-icon>
  177. <text class="item-label">退回其他</text>
  178. </view>
  179. <view class="sub-list">
  180. <view class="sub-item" v-if="orderInfo.discountMoney > 0">
  181. <text class="sub-label">优惠金额</text>
  182. <text class="sub-value">¥{{ orderInfo.discountMoney }}</text>
  183. </view>
  184. <!-- 预留红包字段 -->
  185. <view class="sub-item" v-if="orderInfo.redPacketMoney > 0">
  186. <text class="sub-label">红包</text>
  187. <text class="sub-value">¥{{ orderInfo.redPacketMoney }}</text>
  188. </view>
  189. </view>
  190. </view>
  191. </view>
  192. <view class="popup-footer safe-area-bottom">
  193. <u-button type="primary" shape="circle" :custom-style="submitBtnStyle"
  194. @click="showRefundAmountPopup = false">我知道了</u-button>
  195. </view>
  196. </view>
  197. </u-popup>
  198. </view>
  199. </template>
  200. <script>
  201. import CommonImageUpload from "@/components/image-upload.vue";
  202. export default {
  203. components: {
  204. CommonImageUpload
  205. },
  206. data() {
  207. return {
  208. orderId: '',
  209. isModify: false, // 是否是修改申请模式
  210. refundOrderId: '', // 修改模式下的退款单ID
  211. orderInfo: {
  212. detailVoList: [],
  213. discountMoney: 0,
  214. redPacketMoney: 0 // 假设有
  215. },
  216. // 表单数据
  217. refundType: '1', // 1: 退货退款, 2: 仅退款
  218. refundTypeText: '退货退款',
  219. refundReason: '',
  220. refundReasonText: '',
  221. shopStatus: '2', // 1: 未收到货, 2: 已收到货
  222. shopStatusText: '已收到货',
  223. returnMethod: '3', // 1: 上门取件, 2: 寄件点自寄, 3: 自行寄回
  224. returnMethodText: '自行寄回',
  225. description: '',
  226. fileList: [], // 用于回显和同步状态
  227. address: {}, // 上门取件地址
  228. // 辅助数据
  229. showReasonPicker: false,
  230. showStatusPicker: false,
  231. showReturnMethodPicker: false,
  232. showRefundAmountPopup: false,
  233. showUploadPopup: false, // 上传弹窗
  234. reasonList: [],
  235. statusList: [
  236. { value: '1', label: '未收到货' },
  237. { value: '2', label: '已收到货' }
  238. ],
  239. returnMethodList: [
  240. { value: '1', label: '上门取件' },
  241. { value: '2', label: '寄件点自寄' },
  242. { value: '3', label: '自行寄回' }
  243. ],
  244. submitBtnStyle: {
  245. width: '100%',
  246. height: '80rpx',
  247. fontSize: '30rpx',
  248. backgroundColor: '#38C148',
  249. color: '#ffffff'
  250. }
  251. };
  252. },
  253. computed: {
  254. returnMethodIndex() {
  255. const index = this.returnMethodList.findIndex(item => item.value === this.returnMethod);
  256. return index > -1 ? [index] : [2];
  257. },
  258. selectedGoods() {
  259. return this.orderInfo.detailVoList.filter(item => item.checked);
  260. },
  261. maxRefundMoney() {
  262. if (!this.orderInfo.detailVoList || this.orderInfo.detailVoList.length === 0) return '0.00';
  263. let totalOriginal = 0;
  264. this.orderInfo.detailVoList.forEach(item => {
  265. totalOriginal += Number(item.payPrice) * item.num;
  266. });
  267. if (totalOriginal === 0) return '0.00';
  268. let refund = 0;
  269. this.selectedGoods.forEach(item => {
  270. refund += Number(item.payPrice) * item.refundNum;
  271. });
  272. return refund.toFixed(2);
  273. },
  274. refundMoney() {
  275. return this.maxRefundMoney;
  276. },
  277. refundChannelText() {
  278. const type = String(this.orderInfo.payType);
  279. if (type === '1') return '退回余额';
  280. if (type === '2') return '退回微信';
  281. return '退回支付渠道';
  282. },
  283. otherRefundAmount() {
  284. return (Number(this.orderInfo.discountMoney) || 0) + (Number(this.orderInfo.redPacketMoney) || 0);
  285. },
  286. uploadStatusText() {
  287. if ((this.description && this.description.trim().length > 0) || this.fileList.length > 0) {
  288. return '已补充';
  289. }
  290. return '上传有助于处理退款';
  291. }
  292. },
  293. onLoad(options) {
  294. this.getRefundReasons();
  295. if (options.isModify == '1' && options.refundOrderId) {
  296. this.isModify = true;
  297. this.refundOrderId = options.refundOrderId;
  298. this.loadRefundDetail();
  299. } else if (options.orderId) {
  300. this.orderId = options.orderId;
  301. this.loadOrderDetail();
  302. }
  303. },
  304. onShow() {
  305. let selectAddr = uni.getStorageSync("selectAddr");
  306. if (selectAddr) {
  307. this.address = selectAddr;
  308. uni.removeStorageSync("selectAddr");
  309. }
  310. },
  311. onUnload() {
  312. },
  313. methods: {
  314. loadRefundDetail() {
  315. // 使用退款详情接口回填数据
  316. this.$u.api.getNewRefundOrderDetailAjax({
  317. refundOrderId: this.refundOrderId
  318. }).then(res => {
  319. if (res.code === 200) {
  320. const data = res.data;
  321. this.orderId = data.originOrderId; // 确保orderId存在
  322. // 构造页面需要的 orderInfo 结构
  323. // 注意:退款详情接口返回的 detailList 结构可能与订单详情的 detailVoList 略有不同,需要映射
  324. this.orderInfo = {
  325. ...data,
  326. detailVoList: data.detailList.map(item => ({
  327. ...item,
  328. num: item.num, // 原购买数量
  329. refundNum: item.refundNum // 之前申请的退款数量
  330. }))
  331. };
  332. console.log(this.orderInfo, 'orderInfo');
  333. // 回填表单数据
  334. this.refundType = String(data.refundType);
  335. // this.refundTypeText 需要根据 options 查找或直接设置,这里简单根据值设置
  336. this.refundTypeText = this.refundType === '1' ? '退货退款' : '仅退款';
  337. this.shopStatus = String(data.shopStatus);
  338. this.shopStatusText = this.shopStatus === '1' ? '未收到货' : '已收到货';
  339. this.refundReason = data.refundReason;
  340. this.refundReasonText = data.refundReason; // 假设后端直接返回文本,或者需要遍历 reasonList 匹配
  341. this.returnMethod = String(data.sendType);
  342. // 查找 returnMethodText
  343. const methodObj = this.returnMethodList.find(m => m.value === this.returnMethod);
  344. this.returnMethodText = methodObj ? methodObj.label : '';
  345. this.description = data.description || '';
  346. // 回填图片
  347. if (data.fileUrlList) {
  348. this.fileList = data.fileUrlList;
  349. }
  350. // 初始化选中状态
  351. this.orderInfo.detailVoList.forEach(item => {
  352. this.$set(item, 'checked', true);
  353. // 修改模式下,默认显示上次申请的数量
  354. this.$set(item, 'refundNum', item.refundNum || 1);
  355. });
  356. this.address = {
  357. id: data.sendAddressId,
  358. name: data.sendName,
  359. mobile: data.sendMobile,
  360. fullAddress: data.sendAddress,
  361. }
  362. }
  363. });
  364. },
  365. loadOrderDetail() {
  366. this.$u.api.getShopOrderDetailAjax({ orderId: this.orderId }).then(res => {
  367. if (res.code === 200) {
  368. this.orderInfo = res.data;
  369. // 初始化商品选中状态和退款数量
  370. this.orderInfo.detailVoList.forEach(item => {
  371. this.$set(item, 'checked', true);
  372. this.$set(item, 'refundNum', item.num);
  373. });
  374. // 根据状态默认选中类型
  375. if (this.orderInfo.status == '3') { // 待收货
  376. // 默认退货退款
  377. this.refundType = '1';
  378. this.refundTypeText = '退货退款';
  379. this.shopStatus = '1';
  380. this.shopStatusText = '未收到货';
  381. } else {
  382. this.refundType = '1';
  383. this.refundTypeText = '退货退款';
  384. this.shopStatus = '2';
  385. this.shopStatusText = '已收到货';
  386. }
  387. // 默认使用订单收货地址作为取件地址
  388. this.address = {
  389. id: this.orderInfo.receiverAddressId,
  390. name: this.orderInfo.receiverName,
  391. mobile: this.orderInfo.receiverMobile,
  392. fullAddress: this.orderInfo.receiverAddress,
  393. };
  394. }
  395. });
  396. },
  397. getRefundReasons() {
  398. uni.$u.http.get("/token/common/getDictOptions?type=shop_order_complaints_options").then(res => {
  399. if (res.code === 200) {
  400. this.reasonList = res.data.map(item => ({
  401. value: item.dictValue || item.dictLabel,
  402. label: item.dictLabel
  403. }));
  404. }
  405. });
  406. },
  407. toggleCheck(item) {
  408. item.checked = !item.checked;
  409. },
  410. calculateRefundMoney() {
  411. // Computed auto updates
  412. },
  413. confirmType(e) {
  414. this.refundType = e[0].value;
  415. this.refundTypeText = e[0].label;
  416. // 切换类型时重置一些状态
  417. if (this.refundType === '2') { // 仅退款
  418. this.returnMethod = '';
  419. this.returnMethodText = '';
  420. } else {
  421. if (!this.returnMethod) {
  422. this.returnMethod = '3';
  423. this.returnMethodText = '自行寄回';
  424. }
  425. }
  426. },
  427. confirmReason(e) {
  428. this.refundReason = e[0].value;
  429. this.refundReasonText = e[0].label;
  430. },
  431. confirmStatus(e) {
  432. this.shopStatus = e[0].value;
  433. this.shopStatusText = e[0].label;
  434. },
  435. confirmReturnMethod(e) {
  436. this.returnMethod = e[0].value;
  437. this.returnMethodText = e[0].label;
  438. },
  439. chooseAddress() {
  440. uni.navigateTo({
  441. url: `/pages-mine/pages/address/list?id=${this.address.id || ''}&isSelect=1`
  442. });
  443. },
  444. submit() {
  445. if (this.selectedGoods.length === 0) {
  446. this.$u.toast('请选择退款商品');
  447. return;
  448. }
  449. if (!this.refundReason) {
  450. this.$u.toast('请选择退款原因');
  451. return;
  452. }
  453. if (this.refundType === '1' && !this.returnMethod) {
  454. this.$u.toast('请选择退货方式');
  455. return;
  456. }
  457. if (this.refundType === '1' && this.returnMethod === '1' && !this.address.name) {
  458. this.$u.toast('请选择取件地址');
  459. return;
  460. }
  461. // 处理图片
  462. let files = this.fileList;
  463. const params = {
  464. orderId: this.orderId,
  465. refundDetailList: this.selectedGoods.map(item => ({
  466. detailOrderId: item.detailOrderId || item.id,
  467. num: item.refundNum
  468. })),
  469. refundType: this.refundType,
  470. shopStatus: this.shopStatus,
  471. refundReason: this.refundReason,
  472. refundMoney: this.refundMoney,
  473. sendType: this.returnMethod,
  474. addressId: this.address.id || '',
  475. description: this.description,
  476. fileUrlList: files
  477. };
  478. // 附加地址信息(如果是上门取件)
  479. if (this.refundType === '1' && this.returnMethod === '1') {
  480. // 这里的参数结构需根据后端实际要求调整,这里假设后端接收 address 对象
  481. params.address = this.address;
  482. }
  483. const api = this.isModify ? this.$u.api.refundApplyModifyAjax : this.$u.api.applyRefundAjax;
  484. // 修改模式下可能需要传入 refundOrderId (虽然截图只有 orderId, 但为了保险起见或者后端根据 orderId 找)
  485. // 截图显示 Request body 包含 orderId 和 refundDetailList 等。
  486. // 如果是修改,通常 orderId 指的是原订单ID。后端可能通过 orderId 找到对应的 active refund application 或者需要 refundOrderId。
  487. // 根据截图,只有 body,没有 path param。body 里有 orderId。
  488. // 如果是修改,我们可能需要额外传 refundOrderId 吗? 截图里没有显示 refundOrderId 字段。
  489. // 假设后端通过 orderId 识别当前正在进行的退款申请进行修改,或者复用 applyRefund 的逻辑只是接口不同。
  490. api(params).then(res => {
  491. if (res.code === 200) {
  492. this.$u.toast(this.isModify ? '修改成功' : '提交成功');
  493. setTimeout(() => {
  494. uni.navigateBack();
  495. }, 1500);
  496. } else {
  497. this.$u.toast(res.msg || (this.isModify ? '修改失败' : '提交失败'));
  498. }
  499. });
  500. }
  501. }
  502. }
  503. </script>
  504. <style lang="scss" scoped>
  505. .apply-refund-page {
  506. min-height: 100vh;
  507. background-color: #f5f5f5;
  508. padding: 20rpx;
  509. padding-bottom: 140rpx; // Space for fixed footer
  510. }
  511. .card {
  512. background-color: #fff;
  513. border-radius: 16rpx;
  514. margin-bottom: 20rpx;
  515. padding: 30rpx;
  516. overflow: hidden;
  517. &.no-padding {
  518. padding: 0;
  519. }
  520. .type-section {
  521. margin-bottom: 30rpx;
  522. .section-title {
  523. font-size: 30rpx;
  524. font-weight: bold;
  525. color: #333;
  526. margin-bottom: 20rpx;
  527. }
  528. .type-btn-group {
  529. display: flex;
  530. .type-btn {
  531. flex: 1;
  532. height: 64rpx;
  533. display: flex;
  534. align-items: center;
  535. justify-content: center;
  536. border: 2rpx solid #e5e5e5;
  537. border-radius: 8rpx;
  538. margin-right: 20rpx;
  539. font-size: 28rpx;
  540. color: #333;
  541. transition: all 0.3s;
  542. &:last-child {
  543. margin-right: 0;
  544. }
  545. &.active {
  546. border-color: #38C148;
  547. color: #38C148;
  548. background-color: rgba(56, 193, 72, 0.05);
  549. font-weight: bold;
  550. }
  551. }
  552. }
  553. }
  554. .card-header {
  555. padding: 10rpx 0 20rpx;
  556. border-bottom: 1rpx solid #f5f5f5;
  557. margin-bottom: 20rpx;
  558. .card-title {
  559. font-size: 30rpx;
  560. font-weight: bold;
  561. color: #333;
  562. }
  563. }
  564. .card-title {
  565. // For simple title without header line
  566. font-size: 30rpx;
  567. font-weight: bold;
  568. color: #333;
  569. margin-bottom: 10rpx;
  570. }
  571. }
  572. .goods-list {
  573. .goods-item {
  574. display: flex;
  575. align-items: center;
  576. margin-bottom: 30rpx;
  577. &:last-child {
  578. margin-bottom: 0;
  579. }
  580. .checkbox-box {
  581. margin-right: 20rpx;
  582. }
  583. .goods-cover {
  584. width: 140rpx;
  585. height: 140rpx;
  586. border-radius: 8rpx;
  587. margin-right: 20rpx;
  588. }
  589. .goods-info {
  590. flex: 1;
  591. height: 140rpx;
  592. display: flex;
  593. flex-direction: column;
  594. justify-content: space-between;
  595. .goods-name {
  596. font-size: 28rpx;
  597. color: #333;
  598. line-height: 1.4;
  599. }
  600. .goods-sku {
  601. font-size: 24rpx;
  602. color: #999;
  603. }
  604. .price-box {
  605. display: flex;
  606. justify-content: space-between;
  607. align-items: center;
  608. .price {
  609. font-size: 30rpx;
  610. color: #333;
  611. font-weight: 500;
  612. }
  613. }
  614. }
  615. }
  616. }
  617. .refund-money-box {
  618. display: flex;
  619. align-items: center;
  620. .money {
  621. font-size: 32rpx;
  622. color: #38C148; // Theme color
  623. font-weight: bold;
  624. }
  625. .edit-tag {
  626. display: flex;
  627. align-items: center;
  628. background-color: #f0f0f0;
  629. padding: 4rpx 12rpx;
  630. border-radius: 20rpx;
  631. margin-left: 16rpx;
  632. text {
  633. font-size: 22rpx;
  634. color: #666;
  635. margin-left: 4rpx;
  636. }
  637. }
  638. }
  639. .address-box {
  640. flex: 1;
  641. display: flex;
  642. align-items: center;
  643. justify-content: flex-end;
  644. text-align: right;
  645. color: #333;
  646. font-size: 28rpx;
  647. .addr-detail {
  648. font-size: 24rpx;
  649. color: #999;
  650. max-width: 300rpx;
  651. }
  652. }
  653. .footer-bar {
  654. position: fixed;
  655. bottom: 0;
  656. left: 0;
  657. right: 0;
  658. height: 200rpx;
  659. background-color: #fff;
  660. display: flex;
  661. align-items: center;
  662. padding: 0 30rpx;
  663. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  664. z-index: 100;
  665. padding-bottom: constant(safe-area-inset-bottom);
  666. padding-bottom: env(safe-area-inset-bottom);
  667. .footer-left {
  668. flex: 1;
  669. display: flex;
  670. align-items: center;
  671. .label {
  672. font-size: 26rpx;
  673. color: #333;
  674. }
  675. .amount {
  676. font-size: 36rpx;
  677. color: #38C148;
  678. font-weight: bold;
  679. margin: 0 10rpx;
  680. }
  681. .detail-link {
  682. font-size: 24rpx;
  683. color: #999;
  684. text-decoration: underline;
  685. }
  686. }
  687. .footer-right {
  688. width: 240rpx;
  689. }
  690. }
  691. .popup-container {
  692. padding: 30rpx;
  693. background-color: #fff;
  694. &.full-height {
  695. height: 100%;
  696. display: flex;
  697. flex-direction: column;
  698. }
  699. .popup-header {
  700. display: flex;
  701. justify-content: space-between;
  702. align-items: center;
  703. margin-bottom: 40rpx;
  704. flex-shrink: 0;
  705. .title {
  706. font-size: 32rpx;
  707. font-weight: bold;
  708. color: #333;
  709. }
  710. }
  711. .popup-content {
  712. margin-bottom: 40rpx;
  713. flex: 1;
  714. overflow-y: auto;
  715. .detail-item {
  716. margin-bottom: 30rpx;
  717. .item-row {
  718. display: flex;
  719. align-items: center;
  720. margin-bottom: 10rpx;
  721. .item-label {
  722. flex: 1;
  723. margin-left: 20rpx;
  724. font-size: 30rpx;
  725. color: #333;
  726. }
  727. .item-value {
  728. font-size: 30rpx;
  729. color: #333;
  730. font-weight: 500;
  731. }
  732. }
  733. .sub-list {
  734. padding-left: 60rpx;
  735. .sub-item {
  736. display: flex;
  737. justify-content: space-between;
  738. margin-top: 10rpx;
  739. font-size: 26rpx;
  740. color: #999;
  741. }
  742. }
  743. }
  744. .upload-textarea-box {
  745. background-color: #f9f9f9;
  746. padding: 20rpx;
  747. border-radius: 12rpx;
  748. .counter {
  749. text-align: right;
  750. font-size: 24rpx;
  751. color: #999;
  752. margin: 10rpx 0 0;
  753. }
  754. }
  755. .upload-area {
  756. margin-top: 20rpx;
  757. }
  758. }
  759. .popup-footer {
  760. margin-top: 20rpx;
  761. flex-shrink: 0;
  762. &.safe-area-bottom {
  763. padding-bottom: constant(safe-area-inset-bottom);
  764. padding-bottom: env(safe-area-inset-bottom);
  765. }
  766. }
  767. }
  768. .address-section {
  769. padding: 26rpx 32rpx;
  770. }
  771. .address-text {
  772. color: #333333;
  773. font-family: PingFang SC;
  774. font-weight: 400;
  775. }
  776. .address-label {
  777. font-size: 28rpx;
  778. color: #909399;
  779. margin-right: 20rpx;
  780. width: 140rpx;
  781. }
  782. .u-required {
  783. color: #ff0000;
  784. margin-left: 8rpx;
  785. }
  786. </style>