1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"version":3,"file":"detail.js","sources":["../../../../../../../src/modules/mall/order/aftersale/detail.vue","../../../../../../../uniPage:/bW9kdWxlc1xtYWxsXG9yZGVyXGFmdGVyc2FsZVxkZXRhaWwudnVl"],"sourcesContent":["<!-- 售后详情 -->\r\n<template>\r\n <s-layout title=\"售后详情\" :navbar=\"!isEmpty(state.info) && state.loading ? 'inner' : 'normal'\">\r\n <view class=\"content_box\" v-if=\"!isEmpty(state.info) && state.loading\">\r\n <!-- 步骤条 -->\r\n <view\r\n class=\"steps-box ss-flex\"\r\n :style=\"[\r\n {\r\n marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',\r\n paddingTop: Number(statusBarHeight + 88) + 'rpx',\r\n },\r\n ]\"\r\n >\r\n <view class=\"ss-flex\">\r\n <view class=\"steps-item\" v-for=\"(item, index) in state.list\" :key=\"index\">\r\n <view class=\"ss-flex\">\r\n <text\r\n class=\"sicon-circleclose\"\r\n v-if=\"state.list.length - 1 === index && [61, 62, 63].includes(state.info.status)\"\r\n />\r\n <text\r\n class=\"sicon-circlecheck\"\r\n v-else\r\n :class=\"state.active >= index ? 'activity-color' : 'info-color'\"\r\n />\r\n\r\n <view\r\n v-if=\"state.list.length - 1 !== index\"\r\n class=\"line\"\r\n :class=\"state.active >= index ? 'activity-bg' : 'info-bg'\"\r\n />\r\n </view>\r\n <view\r\n class=\"steps-item-title\"\r\n :class=\"state.active >= index ? 'activity-color' : 'info-color'\"\r\n >\r\n {{ item.title }}\r\n </view>\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <!-- 服务状态 -->\r\n <view\r\n class=\"status-box ss-flex ss-col-center ss-row-between ss-m-x-20\"\r\n @tap=\"sheep.$router.go('/modules/mall/order/aftersale/log', { id: state.id })\"\r\n >\r\n <view class=\"\">\r\n <view class=\"status-text\">\r\n {{ formatAfterSaleStatusDescription(state.info) }}\r\n </view>\r\n <view class=\"status-time\">\r\n {{ sheep.$helper.timeFormat(state.info.updateTime, 'yyyy-mm-dd hh:MM:ss') }}\r\n </view>\r\n </view>\r\n <text class=\"ss-iconfont _icon-forward\" style=\"color: #666\" />\r\n </view>\r\n\r\n <!-- 退款金额 -->\r\n <view class=\"aftersale-money ss-flex ss-col-center ss-row-between\">\r\n <view class=\"aftersale-money--title\">退款总额</view>\r\n <view class=\"aftersale-money--num\">¥{{ fen2yuan(state.info.refundPrice) }}</view>\r\n </view>\r\n <!-- 服务商品 -->\r\n <view class=\"order-shop\">\r\n <s-goods-item\r\n :img=\"state.info.picUrl\"\r\n :title=\"state.info.spuName\"\r\n :titleWidth=\"480\"\r\n :skuText=\"state.info.properties.map((property) => property.valueName).join(' ')\"\r\n :num=\"state.info.count\"\r\n />\r\n </view>\r\n\r\n <!-- 服务内容 -->\r\n <view class=\"aftersale-content\">\r\n <view class=\"aftersale-item ss-flex ss-col-center\">\r\n <view class=\"item-title\">服务单号:</view>\r\n <view class=\"item-content ss-m-r-16\">{{ state.info.no }}</view>\r\n <button class=\"ss-reset-button copy-btn\" @tap=\"onCopy\">复制</button>\r\n </view>\r\n <view class=\"aftersale-item ss-flex ss-col-center\">\r\n <view class=\"item-title\">申请时间:</view>\r\n <view class=\"item-content\">\r\n {{ sheep.$helper.timeFormat(state.info.createTime, 'yyyy-mm-dd hh:MM:ss') }}\r\n </view>\r\n </view>\r\n <view class=\"aftersale-item ss-flex ss-col-center\">\r\n <view class=\"item-title\">售后类型:</view>\r\n <view class=\"item-content\">{{ state.info.way === 10 ? '仅退款' : '退款退货' }}</view>\r\n </view>\r\n <view class=\"aftersale-item ss-flex ss-col-center\">\r\n <view class=\"item-title\">申请原因:</view>\r\n <view class=\"item-content\">{{ state.info.applyReason }}</view>\r\n </view>\r\n <view class=\"aftersale-item ss-flex ss-col-center\">\r\n <view class=\"item-title\">相关描述:</view>\r\n <view class=\"item-content\">{{ state.info.applyDescription }}</view>\r\n </view>\r\n </view>\r\n </view>\r\n\r\n <!-- 操作区 -->\r\n <s-empty\r\n v-if=\"isEmpty(state.info) && state.loading\"\r\n icon=\"/static/order-empty.png\"\r\n text=\"暂无该订单售后详情\"\r\n />\r\n <su-fixed bottom placeholder bg=\"bg-white\" v-if=\"!isEmpty(state.info)\">\r\n <view class=\"foot_box\">\r\n <button\r\n class=\"ss-reset-button btn\"\r\n v-if=\"state.info.buttons?.includes('cancel')\"\r\n @tap=\"onApply(state.info.id)\"\r\n >\r\n 取消申请\r\n </button>\r\n <button\r\n class=\"ss-reset-button btn\"\r\n v-if=\"state.info.buttons?.includes('delivery')\"\r\n @tap=\"\r\n sheep.$router.go('/modules/mall/order/aftersale/return-delivery', { id: state.info.id })\r\n \"\r\n >\r\n 填写退货\r\n </button>\r\n <button\r\n class=\"ss-reset-button contcat-btn btn\"\r\n @tap=\"sheep.$router.go('/modules/mall/chat/index')\"\r\n >\r\n 联系客服\r\n </button>\r\n </view>\r\n </su-fixed>\r\n </s-layout>\r\n</template>\r\n\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { onLoad } from '@dcloudio/uni-app'\r\nimport { reactive } from 'vue'\r\nimport { isEmpty } from 'lodash-es'\r\nimport {\r\n fen2yuan,\r\n formatAfterSaleStatusDescription,\r\n handleAfterSaleButtons,\r\n} from '@/sheep/hooks/useGoods'\r\nimport AfterSaleApi from '@/sheep/api/trade/afterSale'\r\n\r\nconst statusBarHeight = sheep.$platform.device.statusBarHeight * 2\r\nconst headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png')\r\nconst state = reactive({\r\n id: 0, // 售后编号\r\n info: {}, // 收货信息\r\n loading: false,\r\n active: 0, // 在 list 的激活位置\r\n list: [\r\n {\r\n title: '提交申请',\r\n },\r\n {\r\n title: '处理中',\r\n },\r\n {\r\n title: '完成',\r\n },\r\n ], // 时间轴\r\n})\r\n\r\nfunction onApply(id) {\r\n uni.showModal({\r\n title: '提示',\r\n content: '确定要取消此申请吗?',\r\n success: async function (res) {\r\n if (!res.confirm) {\r\n return\r\n }\r\n const { code } = await AfterSaleApi.cancelAfterSale(id)\r\n if (code === 0) {\r\n await getDetail(id)\r\n }\r\n },\r\n })\r\n}\r\n\r\n// 复制\r\nconst onCopy = () => {\r\n sheep.$helper.copyText(state.info.no)\r\n}\r\n\r\nasync function getDetail(id) {\r\n state.loading = true\r\n const { code, data } = await AfterSaleApi.getAfterSale(id)\r\n if (code !== 0) {\r\n state.info = null\r\n return\r\n }\r\n state.info = data\r\n handleAfterSaleButtons(state.info)\r\n\r\n // 处理时间轴\r\n if ([10].includes(state.info.status)) {\r\n state.active = 0\r\n } else if ([20, 30].includes(state.info.status)) {\r\n state.active = 1\r\n } else if ([40, 50].includes(state.info.status)) {\r\n state.active = 2\r\n } else if ([61, 62, 63].includes(state.info.status)) {\r\n state.active = 2\r\n }\r\n}\r\n\r\nonLoad((options) => {\r\n if (!options.id) {\r\n sheep.$helper.toast(`缺少订单信息,请检查`)\r\n return\r\n }\r\n state.id = options.id\r\n getDetail(options.id)\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n// 步骤条\r\n.steps-box {\r\n width: 100%;\r\n height: 190rpx;\r\n padding-left: 72rpx;\r\n background:\r\n v-bind(headerBg) no-repeat,\r\n linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));\r\n background-size: 750rpx 100%;\r\n\r\n .steps-item {\r\n .sicon-circleclose {\r\n font-size: 24rpx;\r\n color: #fff;\r\n }\r\n\r\n .sicon-circlecheck {\r\n font-size: 24rpx;\r\n }\r\n\r\n .steps-item-title {\r\n width: 100rpx;\r\n margin-top: 16rpx;\r\n margin-left: -36rpx;\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n text-align: center;\r\n }\r\n }\r\n}\r\n\r\n.activity-color {\r\n color: #fff;\r\n}\r\n\r\n.info-color {\r\n color: rgba(#fff, 0.4);\r\n}\r\n\r\n.activity-bg {\r\n background: #fff;\r\n}\r\n\r\n.info-bg {\r\n background: rgba(#fff, 0.4);\r\n}\r\n\r\n.line {\r\n width: 270rpx;\r\n height: 4rpx;\r\n}\r\n\r\n// 服务状态\r\n.status-box {\r\n position: relative;\r\n z-index: 3;\r\n padding: 20rpx;\r\n margin-top: -20rpx;\r\n background-color: #fff;\r\n border-radius: 20rpx 20rpx 0px 0px;\r\n\r\n .status-text {\r\n margin-bottom: 20rpx;\r\n font-size: 28rpx;\r\n\r\n font-weight: 500;\r\n color: rgba(51, 51, 51, 1);\r\n }\r\n\r\n .status-time {\r\n font-size: 24rpx;\r\n\r\n font-weight: 400;\r\n color: rgba(153, 153, 153, 1);\r\n }\r\n}\r\n\r\n// 退款金额\r\n.aftersale-money {\r\n height: 98rpx;\r\n padding: 0 20rpx;\r\n margin: 20rpx;\r\n background-color: #fff;\r\n\r\n .aftersale-money--title {\r\n font-size: 28rpx;\r\n\r\n font-weight: 500;\r\n color: rgba(51, 51, 51, 1);\r\n }\r\n\r\n .aftersale-money--num {\r\n font-family: OPPOSANS;\r\n font-size: 28rpx;\r\n font-weight: 500;\r\n color: #ff3000;\r\n }\r\n}\r\n\r\n// order-shop\r\n.order-shop {\r\n padding: 20rpx;\r\n margin: 0 20rpx 20rpx 20rpx;\r\n background-color: #fff;\r\n}\r\n\r\n// 服务内容\r\n.aftersale-content {\r\n padding: 20rpx;\r\n margin: 0 20rpx;\r\n background-color: #fff;\r\n\r\n .aftersale-item {\r\n height: 60rpx;\r\n\r\n .copy-btn {\r\n width: 75rpx;\r\n height: 40rpx;\r\n font-size: 22rpx;\r\n color: #333;\r\n background: #eeeeee;\r\n border-radius: 20rpx;\r\n }\r\n\r\n .item-title {\r\n font-size: 28rpx;\r\n color: #999;\r\n }\r\n\r\n .item-content {\r\n font-size: 28rpx;\r\n color: #333;\r\n }\r\n }\r\n}\r\n\r\n// 底部功能\r\n.foot_box {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-end;\r\n height: 100rpx;\r\n background-color: #fff;\r\n\r\n .btn {\r\n width: 160rpx;\r\n padding: 0;\r\n margin-right: 20rpx;\r\n font-size: 26rpx;\r\n\r\n font-weight: 400;\r\n line-height: 60rpx;\r\n color: rgba(51, 51, 51, 1);\r\n background: rgba(238, 238, 238, 1);\r\n border-radius: 30rpx;\r\n }\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/modules/mall/order/aftersale/detail.vue'\nwx.createPage(MiniProgramPage)"],"names":["sheep","reactive","uni","AfterSaleApi","handleAfterSaleButtons","onLoad"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsJA,UAAA,kBAAAA,YAAAA,MAAA,UAAA,OAAA,kBAAA;AACA,UAAA,WAAAA,YAAA,MAAA,KAAA,IAAA,qCAAA;AACA,UAAA,QAAAC,cAAAA,SAAA;AAAA,MACA,IAAA;AAAA;AAAA,MACA,MAAA,CAAA;AAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA;AAAA,MACA,MAAA;AAAA,QACA;AAAA,UACA,OAAA;AAAA,QACA;AAAA,QACA;AAAA,UACA,OAAA;AAAA,QACA;AAAA,QACA;AAAA,UACA,OAAA;AAAA,QACA;AAAA,MACA;AAAA;AAAA,IACA,CAAA;AAEA,aAAA,QAAA,IAAA;AACAC,oBAAAA,MAAA,UAAA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA,SAAA,KAAA;AAAA;AACA,gBAAA,CAAA,IAAA,SAAA;AACA;AAAA,YACA;AACA,kBAAA,EAAA,KAAA,IAAA,MAAAC,0BAAAA,aAAA,gBAAA,EAAA;AACA,gBAAA,SAAA,GAAA;AACA,oBAAA,UAAA,EAAA;AAAA,YACA;AAAA,UACA;AAAA;AAAA,MACA,CAAA;AAAA,IACA;AAGA,UAAA,SAAA,MAAA;AACAH,kBAAAA,MAAA,QAAA,SAAA,MAAA,KAAA,EAAA;AAAA,IACA;AAEA,aAAA,UAAA,IAAA;AAAA;AACA,cAAA,UAAA;AACA,cAAA,EAAA,MAAA,KAAA,IAAA,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