爱简收旧衣按件回收前端代码仓库
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.

975 lines
27 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 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 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-result-container" :class="{ 'popup-open': isPopupOpen }">
  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="more" size="24" color="#222" />
  11. </view>
  12. </view>
  13. <view class="main-content">
  14. <!-- 合格产品卡片 -->
  15. <view v-if="hasQualifiedItems" class="result-card">
  16. <view class="card-title">合格产品</view>
  17. <view v-for="item in qualifiedList" :key="item.shopId" class="result-row">
  18. <view class="row-main">
  19. <view class="goods-name-section">
  20. <text class="goods-name">{{ item.shopId ? getGoodsName(item.shopId) : (item.id === 'unrecyclable' ? '不可回收'
  21. : (item.id === 'quality_issue' ? '质量问题' : ''))}}</text>
  22. <text class="goods-brand">{{ getItemBrand(item.shopId) }}</text>
  23. </view>
  24. <text class="row-count">x{{ item.count }}</text>
  25. <text class="row-total">¥{{ item.total }}</text>
  26. </view>
  27. <view class="row-reason">
  28. <text class="reason-label">{{ getGoodsName(item.shopId) }}</text>
  29. <view class="reason-select" @tap="selectReasonForQualified(item)">
  30. <text class="reason-placeholder" :class="{ 'selected': hasSelectedReason(item) }">
  31. {{ hasSelectedReason(item) ? '已选择' : '请选择理由(选填)' }}
  32. </text>
  33. <uni-icons type="right" size="18" color="#bbb" />
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 不合格产品卡片 -->
  39. <view v-if="hasUnqualifiedItems" class="result-card">
  40. <view class="card-title">不合格产品</view>
  41. <view v-for="group in unqualifiedGroups" :key="group.shopId" class="result-group">
  42. <view class="row-main">
  43. <view class="goods-name-section">
  44. <text class="goods-name">质量问题</text>
  45. <text class="goods-brand"></text>
  46. </view>
  47. <text class="row-count">x{{ group.count }}</text>
  48. <text class="row-total">¥{{ group.total }}</text>
  49. </view>
  50. <!-- 选择理由模块 -->
  51. <view v-if="inspectData && inspectData.list">
  52. <view v-for="(item, index) in (inspectData.list.find(i => i.id === 'quality_issue')?.commonOrderList || [])"
  53. :key="item.id || item.testingStatus" class="row-reason">
  54. <text class="reason-label">质量问题{{ index + 1 }}</text>
  55. <view class="reason-select" @tap="selectReason(item)">
  56. <text class="reason-placeholder" :class="{ 'selected': hasSelectedReason(item) }">
  57. {{ hasSelectedReason(item) ? '已选择' : '请选择理由' }}
  58. </text>
  59. <uni-icons type="right" size="18" color="#bbb" />
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 不可回收产品卡片 -->
  66. <view v-if="hasUnrecyclableItems" class="result-card">
  67. <view class="card-title">不可回收产品</view>
  68. <view v-for="item in unrecyclableList" :key="item.id" class="result-group">
  69. <view class="row-main">
  70. <view class="goods-name-section">
  71. <text class="goods-name">不可回收</text>
  72. <text class="goods-brand"></text>
  73. </view>
  74. <text class="row-count">x{{ item.count }}</text>
  75. <text class="row-total">¥{{ item.total }}</text>
  76. </view>
  77. <!-- 选择理由模块 -->
  78. <view v-if="inspectData && inspectData.list">
  79. <view v-for="(commonItem,index) in (inspectData.list.find(i => i.id === 'unrecyclable')?.commonOrderList || [])"
  80. :key="commonItem.id || commonItem.testingStatus" class="row-reason">
  81. <text class="reason-label">不可回收{{ index +1 }}</text>
  82. <view class="reason-select" @tap="selectReason(commonItem)">
  83. <text class="reason-placeholder" :class="{ 'selected': hasSelectedReason(commonItem) }">
  84. {{ hasSelectedReason(commonItem) ? '已选择' : '请选择理由' }}
  85. </text>
  86. <uni-icons type="right" size="18" color="#bbb" />
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 回收信息卡片 -->
  93. <view class="result-card info-card">
  94. <view class="card-title-row">
  95. <text class="card-title">回收信息</text>
  96. <view class="status-tag">待质检</view>
  97. </view>
  98. <view class="info-row">
  99. <text class="info-label">订单编号</text>
  100. <text class="info-value copy-btn">{{ order?.ordeNo || 'RE82738127861525' }} 复制</text>
  101. </view>
  102. <view class="info-row">
  103. <text class="info-label">取件时间</text>
  104. <text class="info-value">{{ order?.goTime || '2025-03-20 11:00' }}</text>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 底部操作按钮 -->
  109. <view class="footer-btns">
  110. <button class="btn-outline" @tap="goPrev">上一步</button>
  111. <button class="btn-main" @tap="finishInspect">完成质检</button>
  112. </view>
  113. <!-- 理由弹窗 -->
  114. <uni-popup ref="reasonPopup" type="bottom" :mask-click="false" :safe-area="false" class="reason-popup-wrapper">
  115. <view class="reason-popup">
  116. <view class="popup-header">
  117. <text class="popup-close" @tap="closeReasonPopup">关闭</text>
  118. <text class="popup-title">{{ currentReasonTitle }}</text>
  119. </view>
  120. <scroll-view class="popup-content" scroll-y="true">
  121. <view class="popup-section">
  122. <text class="section-label">上传图片</text>
  123. <view class="img-list">
  124. <view class="img-item add" @tap="addReasonImg">
  125. <uni-icons type="plusempty" size="32" color="#bbb" />
  126. </view>
  127. <view v-for="(img, idx) in reasonImages" :key="idx" class="img-item">
  128. <image :src="img" class="img" />
  129. <view class="img-del" @tap="removeReasonImg(idx)">×</view>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="popup-section">
  134. <text class="section-label">选择理由</text>
  135. <view v-for="(item, index) in reasonOptions" :key="item.id" class="reason-row" @tap="toggleReason(index)">
  136. <view :class="['checkbox', { checked: reasonChecked.includes(item.reason) }]" />
  137. <text class="reason-text">{{ item.reason }}</text>
  138. </view>
  139. </view>
  140. </scroll-view>
  141. <button class="popup-save-btn" @tap="saveReason">保存</button>
  142. </view>
  143. </uni-popup>
  144. </view>
  145. </template>
  146. <script>
  147. import pullRefreshMixin from '../mixins/pullRefreshMixin.js'
  148. import OSS from '@/utils/oss-upload/oss/index.js'
  149. export default {
  150. mixins: [pullRefreshMixin],
  151. data() {
  152. return {
  153. inspectData: null, // 从步骤一传过来的质检数据
  154. order: null, // 订单数据
  155. qualifiedList: [],
  156. unqualifiedGroups: [],
  157. unrecyclableList: [],
  158. goodsNameMap: {}, // 商品id => 名称
  159. reasonPopupVisible: false,
  160. currentReasonTitle: '',
  161. reasonImages: [],
  162. reasonOptions: [],
  163. reasonChecked: [],
  164. currentReasonItem: null,
  165. isPopupOpen: false // 控制弹窗状态
  166. }
  167. },
  168. computed: {
  169. hasQualifiedItems() {
  170. return this.qualifiedList && this.qualifiedList.length > 0
  171. },
  172. hasUnqualifiedItems() {
  173. return this.unqualifiedGroups && this.unqualifiedGroups.length > 0
  174. },
  175. hasUnrecyclableItems() {
  176. return this.unrecyclableList && this.unrecyclableList.length > 0
  177. }
  178. },
  179. onLoad(options) {
  180. // 接收质检数据和订单数据
  181. if (options && options.resultData) {
  182. try {
  183. const resultData = JSON.parse(decodeURIComponent(options.resultData))
  184. this.inspectData = resultData.inspectResult
  185. this.order = resultData.order
  186. this.processInspectData()
  187. } catch (error) {
  188. console.error('解析数据失败:', error)
  189. }
  190. }
  191. if (options && options.inspectData && !options.resultData) {
  192. try {
  193. this.inspectData = JSON.parse(decodeURIComponent(options.inspectData))
  194. this.processInspectData()
  195. } catch (error) {
  196. console.error('解析质检数据失败:', error)
  197. }
  198. }
  199. },
  200. methods: {
  201. async processInspectData() {
  202. if (!this.inspectData || !this.inspectData["list"]) return
  203. this.qualifiedList = []
  204. this.unqualifiedGroups = []
  205. this.unrecyclableList = []
  206. // 只收集普通商品的 shopId 作为 goodsId
  207. const allIds = []
  208. this.inspectData["list"].forEach(item => {
  209. if (item.shopId && item.id !== 'unrecyclable' && item.id !== 'quality_issue') {
  210. allIds.push(item.shopId)
  211. }
  212. })
  213. console.log('allIds', allIds)
  214. const uniqueIds = Array.from(new Set(allIds.filter(Boolean)))
  215. console.log('uniqueIds', uniqueIds)
  216. await this.fetchGoodsNames(uniqueIds)
  217. // 合格商品
  218. this.inspectData["list"].forEach(item => {
  219. if (item.qualifiedNum > 0 && item.id !== 'unrecyclable' && item.id !== 'quality_issue') {
  220. this.qualifiedList.push({
  221. shopId: item.shopId,
  222. count: item.qualifiedNum,
  223. total: item.price,
  224. classId: item.categoryId
  225. })
  226. console.log('qualifiedList', this.qualifiedList)
  227. }
  228. })
  229. // 不合格商品(只展示质量问题)
  230. this.inspectData["list"].forEach(item => {
  231. if (item.id === 'quality_issue' && item.noQualifiedNum > 0) {
  232. this.unqualifiedGroups.push({
  233. shopId: item.id,
  234. count: item.noQualifiedNum,
  235. total: item.price,
  236. items: item.commonOrderList ? [...item.commonOrderList] : []
  237. })
  238. }
  239. })
  240. // 不可回收商品
  241. this.inspectData["list"].forEach(item => {
  242. if (item.id === 'unrecyclable' && item.unrecyclable > 0) {
  243. this.unrecyclableList.push({
  244. id: item.id,
  245. count: item.unrecyclable,
  246. total: item.price
  247. })
  248. }
  249. })
  250. },
  251. async fetchGoodsNames(ids) {
  252. // 批量获取商品名称
  253. const nameMap = {}
  254. for (const id of ids) {
  255. try {
  256. const res = await this.$api('getGoodsDetail', { goodsId: id })
  257. if (res && res.code === 200 && res.result) {
  258. nameMap[id] = res.result.name
  259. }
  260. } catch (e) {
  261. nameMap[id] = '未知商品'
  262. }
  263. }
  264. this.goodsNameMap = nameMap
  265. },
  266. getGoodsName(id) {
  267. return this.goodsNameMap[id] || '未知商品'
  268. },
  269. goBack() {
  270. uni.navigateBack()
  271. },
  272. goPrev() {
  273. uni.navigateBack()
  274. },
  275. finishInspect() {
  276. // 校验理由必填性
  277. // 1. 合格产品理由可选填
  278. // 2. 质量问题和不可回收理由必填
  279. // 检查质量问题
  280. const qualityItem = this.inspectData["list"].find(item => item.id === 'quality_issue')
  281. if (qualityItem && qualityItem.noQualifiedNum > 0) {
  282. const hasReason = qualityItem.commonOrderList && qualityItem.commonOrderList.some(c => {
  283. // 只要填写了理由或图片即可
  284. return (c.testingInstructions && c.testingInstructions.trim() !== '') ||
  285. (c.testingImages && c.testingImages.trim() !== '')
  286. })
  287. if (!hasReason) {
  288. uni.showToast({ title: '质量问题理由必填', icon: 'none' })
  289. return
  290. }
  291. }
  292. // 检查不可回收
  293. const unrecyclableItem = this.inspectData["list"].find(item => item.id === 'unrecyclable')
  294. if (unrecyclableItem && unrecyclableItem.unrecyclable > 0) {
  295. const hasReason = unrecyclableItem.commonOrderList && unrecyclableItem.commonOrderList.some(c => {
  296. return (c.testingInstructions && c.testingInstructions.trim() !== '') ||
  297. (c.testingImages && c.testingImages.trim() !== '')
  298. })
  299. if (!hasReason) {
  300. uni.showToast({ title: '不可回收理由必填', icon: 'none' })
  301. return
  302. }
  303. }
  304. // 在提交前将质量问题和不可回收中的id值置为空
  305. const processedList = this.inspectData["list"].map(item => {
  306. if (item.id === 'quality_issue' || item.id === 'unrecyclable') {
  307. // 对于质量问题和不可回收,将id置为空
  308. return { ...item, id: '' }
  309. }
  310. return item
  311. })
  312. const inspectDatas = {...this.inspectData, list: JSON.stringify(processedList, null, 2)}
  313. console.log('最终的质检数据:', inspectDatas);
  314. this.$api('submitQualityInfo', inspectDatas , res => {
  315. if (res && res.code === 200) {
  316. uni.showToast({ title: '质检完成', icon: 'success' })
  317. uni.reLaunch({ url: '/pages/component/home' })
  318. }
  319. })
  320. uni.showToast({ title: '完成质检', icon: 'success' })
  321. },
  322. selectReason(item) {
  323. // 直接使用传入的item,因为它已经是commonOrderList中的具体项
  324. let popupItem = item
  325. let type = 0 // 默认类型
  326. // 根据testingStatus确定类型
  327. if (item.testingStatus === 1) {
  328. type = 1 // 质量问题
  329. } else if (item.testingStatus === 2) {
  330. type = 2 // 不可回收
  331. }
  332. this.currentReasonItem = popupItem
  333. // 判断类型,动态设置标题
  334. if (popupItem.testingStatus === 1) {
  335. this.currentReasonTitle = '质量问题'
  336. } else if (popupItem.testingStatus === 2) {
  337. this.currentReasonTitle = '不可回收'
  338. } else {
  339. this.currentReasonTitle = this.getGoodsName(popupItem.shopId || popupItem.id)
  340. }
  341. // 只使用testingImages字段
  342. if (popupItem.testingImages && popupItem.testingImages.trim() !== '') {
  343. this.reasonImages = popupItem.testingImages.split(',').filter(img => img.trim() !== '')
  344. } else {
  345. this.reasonImages = []
  346. }
  347. // 不在这里设置reasonChecked
  348. this.selectReasonForUnqualified(popupItem, type)
  349. this.lockScroll()
  350. this.$refs.reasonPopup.open()
  351. },
  352. selectReasonForQualified(item) {
  353. this.currentReasonItem = item
  354. this.currentReasonTitle = this.getGoodsName(item.shopId || item.id)
  355. // 只使用testingImages字段
  356. if (item.testingImages && item.testingImages.trim() !== '') {
  357. this.reasonImages = item.testingImages.split(',').filter(img => img.trim() !== '')
  358. } else {
  359. this.reasonImages = []
  360. }
  361. // 使用从上一个页面传过来的categoryId
  362. this.selectReasonForUnqualified(item, 0, item.classId)
  363. this.lockScroll()
  364. this.$refs.reasonPopup.open()
  365. },
  366. selectReasonForUnqualified(item, type, classId = '') {
  367. console.log(item)
  368. // 根据类型确定classId
  369. if (!classId) {
  370. if (type === 1) {
  371. // 质量问题
  372. classId = ''
  373. } else if (type === 2) {
  374. // 不可回收
  375. classId = ''
  376. } else {
  377. // classId
  378. classId = item.classId || ''
  379. }
  380. }
  381. console.log('[selectReasonForUnqualified] classId:', classId, 'type:', type)
  382. this.$api('getcheckoutReasons', {
  383. classId: classId,
  384. type: type
  385. }, res => {
  386. if (res.code == 200) {
  387. this.reasonOptions = res.result;
  388. if (item.testingInstructions && item.testingInstructions.trim() !== '') {
  389. this.reasonChecked = item.testingInstructions.split(',').map(s => s.trim()).filter(Boolean)
  390. } else {
  391. this.reasonChecked = []
  392. }
  393. this.$nextTick(() => {
  394. this.reasonChecked = [...this.reasonChecked]
  395. console.log('[selectReasonForUnqualified] reasonOptions:', this.reasonOptions)
  396. console.log('[selectReasonForUnqualified] reasonChecked:', this.reasonChecked)
  397. })
  398. } else {
  399. console.error('[selectReasonForUnqualified] API返回错误:', res)
  400. uni.showToast({
  401. title: '获取理由列表失败',
  402. icon: 'none'
  403. })
  404. }
  405. }, err => {
  406. console.error('[selectReasonForUnqualified] API调用失败:', err)
  407. uni.showToast({
  408. title: '获取理由列表失败',
  409. icon: 'none'
  410. })
  411. })
  412. },
  413. closeReasonPopup() {
  414. this.unlockScroll()
  415. this.$refs.reasonPopup.close()
  416. },
  417. addReasonImg() {
  418. // 检查是否已达到最大数量限制
  419. if (this.reasonImages.length >= 3) {
  420. uni.showToast({
  421. title: '最多只能上传3张图片',
  422. icon: 'none'
  423. })
  424. return
  425. }
  426. uni.chooseMedia({
  427. count: 3 - this.reasonImages.length, // 剩余可选择数量
  428. mediaType: ['image'], // 只选择图片
  429. sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机
  430. maxDuration: 30,
  431. sizeType: [ 'compressed'],
  432. camera: 'back',
  433. success: (res) => {
  434. console.log('选择的图片:', res.tempFiles)
  435. // 显示上传进度
  436. uni.showLoading({
  437. title: '上传中...'
  438. })
  439. // 处理选择的图片
  440. const uploadPromises = res.tempFiles.map(file => {
  441. return this.uploadImageToOSS(file.tempFilePath)
  442. })
  443. // 批量上传
  444. Promise.all(uploadPromises).then(urls => {
  445. this.reasonImages = this.reasonImages.concat(urls)
  446. uni.hideLoading()
  447. uni.showToast({
  448. title: '上传成功',
  449. icon: 'success'
  450. })
  451. }).catch(error => {
  452. console.error('上传失败:', error)
  453. uni.hideLoading()
  454. uni.showToast({
  455. title: '上传失败,请重试',
  456. icon: 'none'
  457. })
  458. })
  459. },
  460. fail: (error) => {
  461. console.error('选择图片失败:', error)
  462. uni.showToast({
  463. title: '选择图片失败',
  464. icon: 'none'
  465. })
  466. }
  467. })
  468. },
  469. async uploadImageToOSS(filePath) {
  470. try {
  471. // 使用项目中的OSS上传工具
  472. const url = await OSS.ossUpload(filePath)
  473. return url
  474. } catch (error) {
  475. console.error('OSS上传失败:', error)
  476. throw error
  477. }
  478. },
  479. removeReasonImg(idx) {
  480. this.reasonImages.splice(idx, 1)
  481. },
  482. toggleReason(idx) {
  483. const val = this.reasonOptions[idx].reason.toString()
  484. const i = this.reasonChecked.indexOf(val)
  485. if (i > -1) {
  486. this.reasonChecked.splice(i, 1)
  487. } else {
  488. this.reasonChecked.push(val)
  489. }
  490. this.reasonChecked = [...this.reasonChecked]
  491. console.log('[toggleReason] reasonChecked:', this.reasonChecked)
  492. },
  493. saveReason() {
  494. if (this.currentReasonItem) {
  495. console.log('this.currentReasonItem', this.currentReasonItem)
  496. // 直接更新当前项
  497. this.currentReasonItem.testingInstructions = this.reasonChecked.join(',')
  498. this.currentReasonItem.testingImages = this.reasonImages.join(',')
  499. }
  500. this.closeReasonPopup()
  501. },
  502. lockScroll() {
  503. // 禁用页面滚动
  504. this.isPopupOpen = true
  505. },
  506. unlockScroll() {
  507. // 恢复页面滚动
  508. this.isPopupOpen = false
  509. },
  510. async onRefresh() {
  511. await this.refreshData && this.refreshData()
  512. },
  513. refreshData() {
  514. // 可根据实际需求刷新质检结果数据
  515. // 例如重新请求接口或重置数据
  516. },
  517. getItemBrand(id) {
  518. if (this.order && this.order.commonOrderList) {
  519. const orderItem = this.order.commonOrderList.find(item => item.id == id)
  520. return orderItem ? (orderItem.pinName || '') : ''
  521. }
  522. return ''
  523. },
  524. parseTestingInstructions() {
  525. return []
  526. },
  527. hasSelectedReason(item) {
  528. // console.log('item', item)
  529. // 检查该商品是否已选择理由或上传图片
  530. return (item.testingInstructions && item.testingInstructions.trim() !== '') ||
  531. (item.testingImages && item.testingImages.trim() !== '')
  532. }
  533. }
  534. }
  535. </script>
  536. <style lang="scss" scoped>
  537. .inspect-result-container {
  538. min-height: 100vh;
  539. background: #f8f8f8;
  540. display: flex;
  541. flex-direction: column;
  542. &.popup-open {
  543. overflow: hidden;
  544. position: fixed;
  545. width: 100%;
  546. height: 100vh;
  547. }
  548. }
  549. .nav-bar {
  550. display: flex;
  551. align-items: center;
  552. height: calc(150rpx + var(--status-bar-height));
  553. padding: 0 32rpx;
  554. padding-top: var(--status-bar-height);
  555. background: #fff;
  556. position: fixed;
  557. top: 0;
  558. left: 0;
  559. right: 0;
  560. z-index: 999;
  561. box-sizing: border-box;
  562. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
  563. .back {
  564. padding: 20rpx;
  565. margin-left: -20rpx;
  566. }
  567. .nav-title {
  568. flex: 1;
  569. text-align: center;
  570. font-size: 32rpx;
  571. font-weight: 500;
  572. color: #222;
  573. }
  574. .nav-icons {
  575. display: flex;
  576. align-items: center;
  577. gap: 12px;
  578. }
  579. }
  580. .main-content {
  581. margin-top: calc(200rpx + var(--status-bar-height));
  582. display: flex;
  583. flex-direction: column;
  584. background: none;
  585. padding-bottom: 120px;
  586. }
  587. .result-card {
  588. background: #fff;
  589. border-radius: 24px;
  590. box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  591. margin: 0 24px 24px 24px;
  592. padding: 24px 24px 0 24px;
  593. }
  594. .card-title {
  595. font-size: 16px;
  596. font-weight: bold;
  597. color: #222;
  598. margin-bottom: 18px;
  599. }
  600. .card-title-row {
  601. display: flex;
  602. align-items: center;
  603. justify-content: space-between;
  604. margin-bottom: 18px;
  605. }
  606. .status-tag {
  607. background: #fff7e6;
  608. color: #ffb400;
  609. font-size: 12px;
  610. border-radius: 12px;
  611. padding: 2px 14px;
  612. font-weight: 400;
  613. height: 22px;
  614. display: flex;
  615. align-items: center;
  616. }
  617. .result-row,
  618. .result-group {
  619. margin-bottom: 18px;
  620. }
  621. .row-main {
  622. display: flex;
  623. align-items: center;
  624. .goods-name-section {
  625. display: flex;
  626. flex-direction: column;
  627. margin-right: 8px;
  628. .goods-name {
  629. font-size: 14px;
  630. font-weight: bold;
  631. color: #222;
  632. line-height: 1.2;
  633. }
  634. .goods-brand {
  635. font-size: 11px;
  636. color: #999;
  637. font-weight: normal;
  638. line-height: 1.2;
  639. margin-top: 2px;
  640. }
  641. }
  642. .row-name {
  643. font-size: 14px;
  644. font-weight: bold;
  645. color: #222;
  646. margin-right: 8px;
  647. }
  648. .row-count {
  649. font-size: 13px;
  650. color: #888;
  651. margin-right: 8px;
  652. }
  653. .row-total {
  654. font-size: 14px;
  655. color: #222;
  656. font-weight: bold;
  657. margin-left: auto;
  658. }
  659. }
  660. .row-reason {
  661. display: flex;
  662. align-items: center;
  663. margin-top: 8px;
  664. .reason-label {
  665. font-size: 13px;
  666. color: #bbb;
  667. min-width: 80px;
  668. }
  669. .reason-input {
  670. flex: 1;
  671. height: 36px;
  672. border-radius: 12px;
  673. background: #f6f6f6;
  674. border: none;
  675. font-size: 14px;
  676. color: #222;
  677. padding-left: 12px;
  678. margin-left: 8px;
  679. }
  680. .reason-select {
  681. flex: 1;
  682. display: flex;
  683. align-items: center;
  684. height: 36px;
  685. border-radius: 12px;
  686. background: #f6f6f6;
  687. font-size: 14px;
  688. color: #bbb;
  689. padding-left: 12px;
  690. margin-left: 8px;
  691. justify-content: flex-end;
  692. }
  693. .reason-placeholder {
  694. color: #bbb;
  695. font-size: 14px;
  696. &.selected {
  697. color: #52c41a;
  698. font-weight: 500;
  699. }
  700. }
  701. }
  702. .info-card {
  703. background: #fff;
  704. border-radius: 24px;
  705. box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  706. margin: 0 24px 24px 24px;
  707. padding: 24px 24px 0 24px;
  708. }
  709. .info-row {
  710. display: flex;
  711. align-items: center;
  712. margin-bottom: 16px;
  713. .info-label {
  714. font-size: 13px;
  715. color: #bbb;
  716. min-width: 80px;
  717. }
  718. .info-value {
  719. font-size: 13px;
  720. color: #222;
  721. margin-left: 8px;
  722. }
  723. .copy-btn {
  724. color: #ffb400;
  725. margin-left: 8px;
  726. }
  727. }
  728. .footer-btns {
  729. position: fixed;
  730. left: 0;
  731. right: 0;
  732. bottom: 0;
  733. background: #fff;
  734. display: flex;
  735. gap: 16px;
  736. padding: 12px 16px 24px 16px;
  737. z-index: 101;
  738. .btn-outline {
  739. flex: 1;
  740. height: 40px;
  741. border-radius: 16px;
  742. border: 1px solid #ffe09a;
  743. color: #ffb400;
  744. background: #fff0d2;
  745. font-size: 15px;
  746. font-weight: 500;
  747. box-shadow: none;
  748. padding: 0 18px;
  749. }
  750. .btn-main {
  751. flex: 1;
  752. height: 40px;
  753. border-radius: 16px;
  754. background: linear-gradient(90deg, #ffd01e 0%, #ffac04 100%);
  755. color: #fff;
  756. border: none;
  757. font-size: 15px;
  758. font-weight: 500;
  759. box-shadow: none;
  760. padding: 0 18px;
  761. }
  762. }
  763. .reason-popup-wrapper {
  764. z-index: 10000 !important;
  765. }
  766. .reason-popup-wrapper .uni-popup__wrapper {
  767. z-index: 10000 !important;
  768. }
  769. .reason-popup {
  770. background: #fff;
  771. border-radius: 24px 24px 0 0;
  772. padding: 0;
  773. height: 75vh;
  774. position: relative;
  775. z-index: 9999;
  776. .popup-header {
  777. display: flex;
  778. align-items: center;
  779. justify-content: center;
  780. height: 60px;
  781. border-bottom: 1px solid #f0f0f0;
  782. position: relative;
  783. .popup-close {
  784. position: absolute;
  785. left: 20px;
  786. color: #666;
  787. font-size: 16px;
  788. }
  789. .popup-title {
  790. font-size: 18px;
  791. font-weight: 600;
  792. color: #222;
  793. }
  794. }
  795. .popup-content {
  796. height: calc(75vh - 60px - 82px);
  797. overflow-y: auto;
  798. }
  799. .popup-section {
  800. padding: 0 20px 24px 20px;
  801. &:first-child {
  802. padding-top: 24px;
  803. }
  804. .section-label {
  805. font-size: 16px;
  806. color: #222;
  807. margin-bottom: 16px;
  808. display: block;
  809. font-weight: 500;
  810. }
  811. .img-list {
  812. display: flex;
  813. gap: 12px;
  814. margin-bottom: 32px;
  815. .img-item {
  816. width: 80px;
  817. height: 80px;
  818. border-radius: 12px;
  819. background: #f8f8f8;
  820. position: relative;
  821. .img {
  822. width: 100%;
  823. height: 100%;
  824. border-radius: 12px;
  825. object-fit: cover;
  826. }
  827. .img-del {
  828. position: absolute;
  829. top: -6px;
  830. right: -6px;
  831. width: 24px;
  832. height: 24px;
  833. background: rgba(0, 0, 0, 0.6);
  834. color: #fff;
  835. border-radius: 50%;
  836. text-align: center;
  837. line-height: 24px;
  838. font-size: 16px;
  839. font-weight: bold;
  840. }
  841. &.add {
  842. display: flex;
  843. align-items: center;
  844. justify-content: center;
  845. background: #f8f8f8;
  846. border: 2px dashed #ddd;
  847. color: #bbb;
  848. }
  849. }
  850. }
  851. .reason-row {
  852. display: flex;
  853. align-items: center;
  854. padding: 16px 0;
  855. border-bottom: 1px solid #f0f0f0;
  856. &:last-child {
  857. border-bottom: none;
  858. }
  859. .checkbox {
  860. width: 20px;
  861. height: 20px;
  862. border-radius: 4px;
  863. border: 2px solid #ddd;
  864. margin-right: 12px;
  865. background: #fff;
  866. position: relative;
  867. &.checked {
  868. border-color: #ffb400;
  869. background: #ffb400;
  870. &::after {
  871. content: '✓';
  872. position: absolute;
  873. top: 50%;
  874. left: 50%;
  875. transform: translate(-50%, -50%);
  876. color: #fff;
  877. font-size: 12px;
  878. font-weight: bold;
  879. }
  880. }
  881. }
  882. .reason-text {
  883. font-size: 16px;
  884. color: #222;
  885. line-height: 1.4;
  886. }
  887. }
  888. }
  889. .popup-save-btn {
  890. position: fixed;
  891. bottom: 34px;
  892. left: 20px;
  893. right: 20px;
  894. height: 48px;
  895. border-radius: 24px;
  896. background: linear-gradient(90deg, #ffd01e 0%, #ffac04 100%);
  897. color: #fff;
  898. font-size: 18px;
  899. font-weight: 600;
  900. border: none;
  901. display: flex;
  902. align-items: center;
  903. justify-content: center;
  904. box-shadow: 0 4px 12px rgba(255, 172, 4, 0.3);
  905. }
  906. }
  907. </style>