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

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