爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

811 lines
24 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="inspect-container">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar">
  5. <view class="back" @tap="goBack">
  6. <uni-icons type="left" size="20" color="#222" />
  7. </view>
  8. <text class="nav-title">步骤一数量确认</text>
  9. <view class="nav-icons">
  10. <uni-icons type="scan" size="24" color="#222" />
  11. </view>
  12. </view>
  13. <view class="main-content">
  14. <!-- 左侧分类导航 -->
  15. <view class="category-nav">
  16. <view v-for="(cat, idx) in categories" :key="cat.title"
  17. :class="['category-item', { active: idx === currentCategory }]" @tap="switchCategory(idx)">
  18. <text>{{ cat.title }}</text>
  19. <view v-if="cat.badge" class="category-badge">{{ cat.badge }}</view>
  20. </view>
  21. </view>
  22. <!-- 右侧商品卡片区 -->
  23. <view class="goods-list">
  24. <view v-for="(item, idx) in currentGoods" :key="item.id" class="goods-card">
  25. <view class="goods-header">
  26. <image :src="item.image" class="goods-img" />
  27. <view class="goods-info">
  28. <view class="goods-title-row">
  29. <text class="goods-name">{{ item.name }}</text>
  30. <text class="goods-price">¥ {{ item.price }} <text class="goods-unit">/</text></text>
  31. </view>
  32. <text class="goods-desc">{{ item.desc }}</text>
  33. <text v-if="item.brand" class="goods-brand">品牌{{ item.brand }}</text>
  34. <text v-if="item.originalNum" class="goods-limit">总数量{{ item.originalNum }}</text>
  35. </view>
  36. </view>
  37. <view class="goods-row">
  38. <text class="row-label">合格数量</text>
  39. <view class="num-ctrl">
  40. <button class="num-btn" @tap="changeNum(item, 'qualified', -1)">-</button>
  41. <text class="num">{{ item.qualified }}</text>
  42. <button class="num-btn" @tap="changeNum(item, 'qualified', 1)">+</button>
  43. </view>
  44. </view>
  45. <view class="goods-row">
  46. <text class="row-label">不合格数量</text>
  47. <view class="num-ctrl">
  48. <button class="num-btn" @tap="changeNum(item, 'unqualified', -1)">-</button>
  49. <text class="num">{{ item.unqualified }}</text>
  50. <button class="num-btn" @tap="changeNum(item, 'unqualified', 1)">+</button>
  51. </view>
  52. </view>
  53. <view class="goods-row">
  54. <text class="row-label">总金额</text>
  55. <input class="amount-input" :value="getInspectPrice(item)" @input="updateInspectPrice(item, $event)" placeholder="请输入金额" />
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <!-- 底部操作按钮 -->
  61. <view class="footer-btns">
  62. <button class="btn-outline" @tap="goBack">返回订单详情</button>
  63. <button class="btn-main" @tap="goNext">下一步</button>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. statusBarHeight: 0,
  72. currentCategory: 0,
  73. orderId: '',
  74. order: null, // 订单数据
  75. currentGoods: [], // 当前显示的商品列表
  76. inspectResult: {}, // 质检结果对象,按照新的数据格式
  77. }
  78. },
  79. computed: {
  80. categories() {
  81. const list = getApp().globalData.pricePreviewList || []
  82. let filteredCategories = []
  83. // 如果有订单数据,根据订单商品过滤分类
  84. if (this.order && this.order.commonOrderList) {
  85. // 获取订单中所有商品的分类ID(去重)
  86. const orderCategoryIds = new Set()
  87. this.order.commonOrderList.forEach(item => {
  88. // 如果有shopClass字段直接使用
  89. if (item.shopClass) {
  90. orderCategoryIds.add(item.shopClass)
  91. } else {
  92. // 如果没有shopClass,通过商品标题匹配分类
  93. const matchedCategory = list.find(cat =>
  94. cat.pid === '0' && item.title && item.title.includes(cat.title)
  95. )
  96. if (matchedCategory) {
  97. orderCategoryIds.add(matchedCategory.id)
  98. }
  99. }
  100. })
  101. // 过滤出订单中包含的分类
  102. filteredCategories = list.filter(item =>
  103. item.pid === '0' && orderCategoryIds.has(item.id)
  104. ).sort((a, b) => a.sort - b.sort)
  105. // 如果没有匹配到任何分类,显示所有分类
  106. if (filteredCategories.length === 0) {
  107. filteredCategories = list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort)
  108. }
  109. } else {
  110. // 没有订单数据时显示所有分类
  111. filteredCategories = list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort)
  112. }
  113. // 新增不可回收分类
  114. const extra = [{ id: 'unrecyclable', title: '不可回收' }]
  115. return [...filteredCategories, ...extra]
  116. }
  117. },
  118. methods: {
  119. initInspectResult() {
  120. if (!this.order || !this.order.commonOrderList) return
  121. this.inspectResult = {
  122. id: this.order.id,
  123. list: []
  124. }
  125. // 按照订单商品分组(按originalId分组)
  126. const groupedGoods = {}
  127. this.order.commonOrderList.forEach(item => {
  128. if (!groupedGoods[item.id]) {
  129. groupedGoods[item.id] = {
  130. id: item.id,
  131. price: '', // 初始为空字符串
  132. qualifiedNum: 0,
  133. noQualifiedNum: 0,
  134. unrecyclable: 0,
  135. commonOrderList: []
  136. }
  137. }
  138. // 为每个数量创建对应的质检项
  139. for (let i = 0; i < (item.num || 0); i++) {
  140. groupedGoods[item.id].commonOrderList.push({
  141. id: `${item.id}-${i}`, // 生成唯一ID
  142. testingInstructions: '',
  143. testingImages: '',
  144. testingStatus: '' // 默认为空
  145. })
  146. }
  147. })
  148. // 添加不可回收分类 - 暂时注释掉
  149. // const totalOrderNum = this.order.commonOrderList.reduce((sum, item) => sum + (item.num || 0), 0)
  150. // groupedGoods['unrecyclable'] = {
  151. // id: 'unrecyclable',
  152. // price: '',
  153. // qualifiedNum: 0,
  154. // noQualifiedNum: 0,
  155. // unrecyclable: totalOrderNum, // 初始化时全部为不可回收状态
  156. // commonOrderList: []
  157. // }
  158. // // 为不可回收创建对应数量的质检项
  159. // for (let i = 0; i < totalOrderNum; i++) {
  160. // groupedGoods['unrecyclable'].commonOrderList.push({
  161. // id: `unrecyclable-${i}`,
  162. // testingInstructions: '',
  163. // testingImages: '',
  164. // testingStatus: 2 // 不可回收状态
  165. // })
  166. // }
  167. this.inspectResult.list = Object.values(groupedGoods)
  168. },
  169. updateCurrentGoods() {
  170. const currentCategoryId = this.categories[this.currentCategory]?.id
  171. const currentCategoryTitle = this.categories[this.currentCategory]?.title
  172. // 不可回收分类内容
  173. if (currentCategoryId === 'unrecyclable') {
  174. // 计算订单中所有商品的总数量作为不可回收的最大限制
  175. let totalOrderNum = 0
  176. if (this.order && this.order.commonOrderList) {
  177. totalOrderNum = this.order.commonOrderList.reduce((sum, item) => sum + (item.num || 0), 0)
  178. }
  179. this.currentGoods = [{
  180. id: 'unrecyclable-1',
  181. image: '/static/回收/衣物.png',
  182. name: '不可回收品类',
  183. price: '—',
  184. desc: '允许脏破烂,160码以上',
  185. qualified: 0,
  186. unqualified: 0,
  187. amount: '',
  188. originalNum: totalOrderNum // 设置最大数量为订单总数
  189. }]
  190. return
  191. }
  192. // 如果有订单数据,根据订单商品过滤当前分类的商品
  193. if (this.order && this.order.commonOrderList) {
  194. const orderGoods = this.order.commonOrderList.filter(item => {
  195. // 如果有shopClass字段,直接匹配
  196. if (item.shopClass) {
  197. return item.shopClass === currentCategoryId
  198. }
  199. // 如果没有shopClass,通过商品标题匹配分类
  200. return item.title && currentCategoryTitle && item.title.includes(currentCategoryTitle)
  201. })
  202. // 根据pinName展示不同品牌的商品,不进行去重
  203. const goodsList = orderGoods.map((item, index) => ({
  204. id: `${item.id}`,
  205. image: item.image || '/static/回收/衣物.png',
  206. name: item.title,
  207. brand: item.pinName || '未知品牌',
  208. price: item.onePrice || 0,
  209. desc: item.details || '',
  210. qualified: 0,
  211. unqualified: 0,
  212. amount: '',
  213. originalNum: item.num || 0,
  214. estimatedPrice: item.price || 0,
  215. originalId: item.id // 保存原始ID
  216. }))
  217. this.currentGoods = goodsList
  218. return
  219. }
  220. // 没有订单数据时返回空数组
  221. this.currentGoods = []
  222. },
  223. goBack() {
  224. uni.navigateBack()
  225. },
  226. goNext() {
  227. // 检测是否所有商品都已完成质检和填写价格
  228. const validationResult = this.validateInspectData()
  229. if (!validationResult.isValid) {
  230. uni.showToast({
  231. title: validationResult.message,
  232. icon: 'none',
  233. duration: 2000
  234. })
  235. return
  236. }
  237. // 构造传递给步骤二的完整数据
  238. const resultData = {
  239. inspectResult: this.inspectResult,
  240. order: this.order // 同时传递订单信息
  241. }
  242. const resultDataStr = encodeURIComponent(JSON.stringify(resultData))
  243. uni.navigateTo({
  244. url: `/pages/manager/inspect-result?resultData=${resultDataStr}`
  245. })
  246. },
  247. validateInspectData() {
  248. if (!this.inspectResult.list || this.inspectResult.list.length === 0) {
  249. return {
  250. isValid: false,
  251. message: '没有质检数据'
  252. }
  253. }
  254. for (const item of this.inspectResult.list) {
  255. // 跳过不可回收分类的检查
  256. if (item.id === 'unrecyclable') {
  257. continue
  258. }
  259. // 获取商品信息用于显示错误消息
  260. const orderItem = this.order.commonOrderList.find(orderGoods => orderGoods.id == item.id)
  261. const brandName = orderItem ? (orderItem.title+' '+orderItem.pinName || orderItem.title || '未知商品') : '未知商品'
  262. // 检查是否有空的testingStatus
  263. const hasEmptyStatus = item.commonOrderList.some(commonItem =>
  264. commonItem.testingStatus === '' || commonItem.testingStatus === null || commonItem.testingStatus === undefined
  265. )
  266. if (hasEmptyStatus) {
  267. return {
  268. isValid: false,
  269. message: `${brandName} 还未完成质检选择`
  270. }
  271. }
  272. // 检查价格是否为空
  273. if (!item.price || item.price === 0 || item.price === '') {
  274. return {
  275. isValid: false,
  276. message: `${brandName} 还未填写总金额`
  277. }
  278. }
  279. }
  280. return {
  281. isValid: true,
  282. message: ''
  283. }
  284. },
  285. switchCategory(idx) {
  286. this.currentCategory = idx
  287. this.updateCurrentGoods()
  288. },
  289. changeNum(item, key, delta) {
  290. const currentQualified = item.qualified || 0
  291. const currentUnqualified = item.unqualified || 0
  292. const maxNum = item.originalNum || 0
  293. if (key === 'qualified') {
  294. const newQualified = Math.max(0, currentQualified + delta)
  295. const totalAfterChange = newQualified + currentUnqualified
  296. // 检查总数是否超过原始数量
  297. if (totalAfterChange <= maxNum) {
  298. this.$set(item, 'qualified', newQualified)
  299. // 更新inspectResult对象
  300. this.updateInspectResult(item, 'qualified', delta)
  301. console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2))
  302. } else {
  303. uni.showToast({
  304. title: `总数不能超过${maxNum}`,
  305. icon: 'none',
  306. duration: 1500
  307. })
  308. }
  309. } else if (key === 'unqualified') {
  310. const newUnqualified = Math.max(0, currentUnqualified + delta)
  311. const totalAfterChange = currentQualified + newUnqualified
  312. // 检查总数是否超过原始数量
  313. if (totalAfterChange <= maxNum) {
  314. this.$set(item, 'unqualified', newUnqualified)
  315. // 更新inspectResult对象
  316. this.updateInspectResult(item, 'unqualified', delta)
  317. } else {
  318. uni.showToast({
  319. title: `总数不能超过${maxNum}`,
  320. icon: 'none',
  321. duration: 1500
  322. })
  323. }
  324. }
  325. },
  326. updateInspectResult(item, type, delta) {
  327. // 处理不可回收分类 - 暂时注释掉
  328. // if (item.id === 'unrecyclable-1') {
  329. // const unrecyclableItem = this.inspectResult.list.find(listItem => listItem.id === 'unrecyclable')
  330. // if (!unrecyclableItem) return
  331. // if (type === 'qualified' && delta > 0) {
  332. // // 增加合格数量:找到第一个不可回收状态的项改为合格
  333. // const targetItem = unrecyclableItem.commonOrderList.find(commonItem => commonItem.testingStatus === 2)
  334. // if (targetItem) {
  335. // targetItem.testingStatus = 0
  336. // unrecyclableItem.unrecyclable--
  337. // unrecyclableItem.qualifiedNum++
  338. // }
  339. // } else if (type === 'qualified' && delta < 0) {
  340. // // 减少合格数量:找到第一个合格状态的项改为不可回收
  341. // const targetItem = unrecyclableItem.commonOrderList.find(commonItem => commonItem.testingStatus === 0)
  342. // if (targetItem) {
  343. // targetItem.testingStatus = 2
  344. // unrecyclableItem.qualifiedNum--
  345. // unrecyclableItem.unrecyclable++
  346. // }
  347. // } else if (type === 'unqualified' && delta > 0) {
  348. // // 增加不合格数量:找到第一个不可回收状态的项改为质量问题
  349. // const targetItem = unrecyclableItem.commonOrderList.find(commonItem => commonItem.testingStatus === 2)
  350. // if (targetItem) {
  351. // targetItem.testingStatus = 1
  352. // unrecyclableItem.unrecyclable--
  353. // unrecyclableItem.noQualifiedNum++
  354. // }
  355. // } else if (type === 'unqualified' && delta < 0) {
  356. // // 减少不合格数量:找到第一个质量问题状态的项改为不可回收
  357. // const targetItem = unrecyclableItem.commonOrderList.find(commonItem => commonItem.testingStatus === 1)
  358. // if (targetItem) {
  359. // targetItem.testingStatus = 2
  360. // unrecyclableItem.noQualifiedNum--
  361. // unrecyclableItem.unrecyclable++
  362. // }
  363. // }
  364. // console.log('更新后的不可回收inspectResult:', JSON.stringify(unrecyclableItem, null, 2))
  365. // return
  366. // }
  367. // 找到对应的inspectResult项
  368. const originalId = item.originalId || item.id.split('-')[0]
  369. const inspectItem = this.inspectResult.list.find(listItem => listItem.id == originalId)
  370. if (!inspectItem) return
  371. if (type === 'qualified' && delta > 0) {
  372. // 增加合格数量:优先找空状态的项,其次找非合格状态的项
  373. let targetItem = inspectItem.commonOrderList.find(commonItem => commonItem.testingStatus === '')
  374. if (!targetItem) {
  375. targetItem = inspectItem.commonOrderList.find(commonItem =>
  376. commonItem.testingStatus === 1 || commonItem.testingStatus === 2
  377. )
  378. }
  379. if (targetItem) {
  380. const oldStatus = targetItem.testingStatus
  381. targetItem.testingStatus = 0
  382. inspectItem.qualifiedNum++
  383. if (oldStatus === 1) {
  384. inspectItem.noQualifiedNum--
  385. } else if (oldStatus === 2) {
  386. inspectItem.unrecyclable--
  387. }
  388. }
  389. } else if (type === 'qualified' && delta < 0) {
  390. // 减少合格数量:找到第一个合格状态的项改为空状态
  391. const targetItem = inspectItem.commonOrderList.find(commonItem => commonItem.testingStatus === 0)
  392. if (targetItem) {
  393. targetItem.testingStatus = ''
  394. inspectItem.qualifiedNum--
  395. }
  396. } else if (type === 'unqualified' && delta > 0) {
  397. // 增加不合格数量:优先找空状态的项,其次找合格状态的项
  398. let targetItem = inspectItem.commonOrderList.find(commonItem => commonItem.testingStatus === '')
  399. if (!targetItem) {
  400. targetItem = inspectItem.commonOrderList.find(commonItem => commonItem.testingStatus === 0)
  401. }
  402. if (targetItem) {
  403. const oldStatus = targetItem.testingStatus
  404. targetItem.testingStatus = 1
  405. inspectItem.noQualifiedNum++
  406. if (oldStatus === 0) {
  407. inspectItem.qualifiedNum--
  408. }
  409. }
  410. } else if (type === 'unqualified' && delta < 0) {
  411. // 减少不合格数量:找到第一个质量问题状态的项改为空状态
  412. const targetItem = inspectItem.commonOrderList.find(commonItem => commonItem.testingStatus === 1)
  413. if (targetItem) {
  414. targetItem.testingStatus = ''
  415. inspectItem.noQualifiedNum--
  416. }
  417. }
  418. console.log('更新后的inspectResult:', JSON.stringify(this.inspectResult, null, 2))
  419. },
  420. getInspectPrice(item) {
  421. // 获取inspectResult中对应商品的price
  422. if (item.id === 'unrecyclable-1') {
  423. return ''
  424. }
  425. const originalId = item.originalId || item.id.split('-')[0]
  426. const inspectItem = this.inspectResult.list?.find(listItem => listItem.id == originalId)
  427. return inspectItem ? inspectItem.price : ''
  428. },
  429. updateInspectPrice(item, event) {
  430. // 更新inspectResult中对应商品的price
  431. if (item.id === 'unrecyclable-1') {
  432. return
  433. }
  434. const originalId = item.originalId || item.id.split('-')[0]
  435. const inspectItem = this.inspectResult.list?.find(listItem => listItem.id == originalId)
  436. if (inspectItem) {
  437. const newPrice = parseFloat(event.detail.value) || 0
  438. inspectItem.price = newPrice
  439. console.log('更新价格:', originalId, newPrice)
  440. }
  441. },
  442. },
  443. created() {
  444. this.currentCategory = 0
  445. },
  446. onLoad(options) {
  447. // 接收订单数据
  448. if (options && options.orderData) {
  449. try {
  450. this.order = JSON.parse(decodeURIComponent(options.orderData))
  451. console.log('接收到的订单数据:', this.order)
  452. // 订单数据加载完成后更新商品列表和初始化质检结果
  453. this.$nextTick(() => {
  454. this.initInspectResult()
  455. this.updateCurrentGoods()
  456. })
  457. } catch (error) {
  458. console.error('解析订单数据失败:', error)
  459. }
  460. }
  461. if (options && options.orderId) {
  462. this.orderId = options.orderId
  463. }
  464. console.log(this.orderId, 'orderId')
  465. },
  466. }
  467. </script>
  468. <style lang="scss" scoped>
  469. .inspect-container {
  470. min-height: 100vh;
  471. background: #f8f8f8;
  472. display: flex;
  473. flex-direction: column;
  474. }
  475. .nav-bar {
  476. display: flex;
  477. align-items: center;
  478. height: calc(150rpx + var(--status-bar-height));
  479. padding: 0 32rpx;
  480. padding-top: var(--status-bar-height);
  481. background: #fff;
  482. position: fixed;
  483. top: 0;
  484. left: 0;
  485. right: 0;
  486. z-index: 999;
  487. box-sizing: border-box;
  488. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  489. .back {
  490. padding: 20rpx;
  491. margin-left: -20rpx;
  492. }
  493. .nav-title {
  494. flex: 1;
  495. text-align: center;
  496. font-size: 32rpx;
  497. font-weight: 500;
  498. color: #222;
  499. }
  500. .nav-icons {
  501. display: flex;
  502. align-items: center;
  503. gap: 12px;
  504. }
  505. }
  506. .main-content {
  507. margin-top: calc(200rpx + var(--status-bar-height));
  508. display: flex;
  509. background: none;
  510. }
  511. .category-nav {
  512. width: 80px;
  513. background: #fff;
  514. border-radius: 24px 0 0 24px;
  515. padding: 24px 0;
  516. display: flex;
  517. flex-direction: column;
  518. align-items: center;
  519. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  520. height: 100%;
  521. overflow-y: auto;
  522. position: relative;
  523. z-index: 2;
  524. .category-item {
  525. width: 64px;
  526. height: 44px;
  527. border-radius: 16px 0 0 16px;
  528. display: flex;
  529. align-items: center;
  530. justify-content: flex-start;
  531. font-size: 16px;
  532. color: #222;
  533. margin-bottom: 12px;
  534. background: #fff;
  535. position: relative;
  536. transition: background 0.2s, color 0.2s, font-weight 0.2s;
  537. padding-left: 12px;
  538. &.active {
  539. background: linear-gradient(90deg, #fff7e6 80%, #fff 100%);
  540. color: #ffb400;
  541. font-weight: bold;
  542. &::before {
  543. content: '';
  544. position: absolute;
  545. left: 0;
  546. top: 30%;
  547. height: 40%;
  548. width: 2px;
  549. border-radius: 4px;
  550. background: #ffb400;
  551. bottom: auto;
  552. }
  553. }
  554. .category-badge {
  555. position: absolute;
  556. top: 6px;
  557. right: 10px;
  558. background: #ff4d4f;
  559. color: #fff;
  560. font-size: 12px;
  561. border-radius: 50%;
  562. width: 18px;
  563. height: 18px;
  564. display: flex;
  565. align-items: center;
  566. justify-content: center;
  567. }
  568. }
  569. }
  570. .goods-list {
  571. flex: 1;
  572. height: calc(100vh - 110rpx - var(--status-bar-height) - 80px);
  573. padding: 0 0 0 16px;
  574. overflow-y: auto;
  575. background: none;
  576. }
  577. .goods-card {
  578. background: #fff;
  579. border-radius: 24px;
  580. box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  581. margin-bottom: 18px;
  582. padding: 18px 18px 9px 18px;
  583. }
  584. .goods-header {
  585. display: flex;
  586. align-items: center;
  587. margin-bottom: 12px;
  588. .goods-img {
  589. width: 56px;
  590. height: 56px;
  591. border-radius: 16px;
  592. margin-right: 12px;
  593. background: #f8f8f8;
  594. object-fit: contain;
  595. }
  596. .goods-info {
  597. flex: 1;
  598. display: flex;
  599. flex-direction: column;
  600. justify-content: center;
  601. min-width: 0;
  602. .goods-title-row {
  603. display: flex;
  604. align-items: baseline;
  605. .goods-name {
  606. font-size: 16px;
  607. font-weight: bold;
  608. color: #222;
  609. margin-right: 8px;
  610. }
  611. .goods-price {
  612. font-size: 15px;
  613. color: #ffb400;
  614. font-weight: bold;
  615. .goods-unit {
  616. font-size: 13px;
  617. color: #bbb;
  618. }
  619. }
  620. }
  621. .goods-desc {
  622. font-size: 13px;
  623. color: #999;
  624. margin-top: 4px;
  625. }
  626. }
  627. }
  628. .goods-row {
  629. display: flex;
  630. align-items: center;
  631. margin-bottom: 12px;
  632. .row-label {
  633. font-size: 14px;
  634. color: #888;
  635. width: 80px;
  636. flex-shrink: 0;
  637. }
  638. .num-ctrl {
  639. display: flex;
  640. align-items: center;
  641. .num-btn {
  642. width: 60rpx;
  643. height: 60rpx;
  644. padding: 0;
  645. margin: 0;
  646. display: flex;
  647. align-items: center;
  648. justify-content: center;
  649. font-size: 28rpx;
  650. color: #666;
  651. background: #ffffff;
  652. border: none;
  653. border-radius: 50%;
  654. &::after {
  655. border: none;
  656. }
  657. &:active {
  658. opacity: 0.8;
  659. }
  660. }
  661. .num {
  662. width: 80rpx;
  663. text-align: center;
  664. font-size: 32rpx;
  665. color: #333;
  666. }
  667. }
  668. .amount-input {
  669. flex: 1;
  670. height: 32px;
  671. border-radius: 12px;
  672. background: #f6f6f6;
  673. border: none;
  674. font-size: 15px;
  675. color: #222;
  676. padding-left: 10px;
  677. margin-left: 8px;
  678. }
  679. }
  680. .footer-btns {
  681. position: fixed;
  682. left: 0;
  683. right: 0;
  684. bottom: 0;
  685. background: #fff;
  686. display: flex;
  687. gap: 16px;
  688. padding: 12px 16px 24px 16px;
  689. z-index: 101;
  690. .btn-outline {
  691. flex: 1;
  692. height: 40px;
  693. border-radius: 16px;
  694. border: 1px solid #ffe09a;
  695. color: #ffb400;
  696. background: #fff0d2;
  697. font-size: 15px;
  698. font-weight: 500;
  699. box-shadow: none;
  700. padding: 0 18px;
  701. }
  702. .btn-main {
  703. flex: 1;
  704. height: 40px;
  705. border-radius: 16px;
  706. background: linear-gradient(90deg, #ffd01e 0%, #ffac04 100%);
  707. color: #fff;
  708. border: none;
  709. font-size: 15px;
  710. font-weight: 500;
  711. box-shadow: none;
  712. padding: 0 18px;
  713. }
  714. }
  715. .goods-brand {
  716. font-size: 12px;
  717. color: #ffb400;
  718. margin-top: 2px;
  719. font-weight: 500;
  720. }
  721. .goods-limit {
  722. font-size: 12px;
  723. color: #ffb400;
  724. margin-top: 2px;
  725. font-weight: 500;
  726. }
  727. </style>