diff --git a/api/model/index.js b/api/model/index.js index d8d0e5d..f92a51f 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -253,7 +253,11 @@ const api = { method: 'GET', auth: true, }, - + queryTrace: { + url: '/recycle-admin/applet/order/queryTrace', + method: 'GET', + auth: true, + }, } diff --git a/config.js b/config.js index 3d994aa..d166eb8 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ // config.js -const type = 'dev' +const type = 'prod' const config = { local: { diff --git a/pages.json b/pages.json index e1aea3a..3f3cc06 100644 --- a/pages.json +++ b/pages.json @@ -253,6 +253,13 @@ "navigationStyle": "custom", "enablePullDownRefresh": true } + }, + { + "path": "logistics", + "style": { + "navigationStyle": "custom", + "enablePullDownRefresh": true + } } ] }, diff --git a/pages/manager/order-detail.vue b/pages/manager/order-detail.vue index 8abf030..f0d7092 100644 --- a/pages/manager/order-detail.vue +++ b/pages/manager/order-detail.vue @@ -39,7 +39,10 @@ {{ item.value }} - 复制 + + 查看物流 + 复制 + @@ -231,7 +234,7 @@ export default { // 基础信息 this.baseInfo = [ { label: '订单编号', value: data.ordeNo || data.id, copy: true }, - ...(data.wliuNo ? [{ label: '快递单号', value: data.wliuNo, copy: true }] : []), + ...(data.wliuNo && data.wliu ? [{ label: '快递单号', value: data.wliuNo, copy: true, viewLogistics: true, expressCompany: data.wliu }] : []), { label: '用户名', value: data.name, arrow: true }, { label: '取件地址', value: (data.address || '') + (data.addressDetail || '') }, { label: '预约时间', value: data.goTime || data.createTime } @@ -265,6 +268,15 @@ export default { copyText(text) { uni.setClipboardData({ data: text }) }, + viewLogistics(expressNumber, expressCompany) { + if (!expressNumber) { + uni.showToast({ title: '暂无快递单号', icon: 'none' }); + return; + } + uni.navigateTo({ + url: `/pages/subcomponent/logistics?wliuNo=${expressNumber}&expressCompany=${expressCompany || ''}` + }); + }, maskPhone(phone) { if (!phone) return ''; return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); @@ -594,7 +606,10 @@ $order-card-padding: 40px 28px; .base-label-wrap { min-width: 80px; text-align: left; color: #8b8b8b; font-size: 13px;} .base-value-wrap { display: flex; align-items: center; flex: 1; justify-content: flex-end; } .base-value { color: #222; font-size: 15px; font-weight: 600; word-break: break-all; text-align: right; } - .copy-btn { color: #ffb400; font-size: 13px; margin-left: 6px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } + .base-actions { display: flex; align-items: center; gap: 8px; } + .view-logistics-btn { color: #2a9cfb; font-size: 13px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } + .view-logistics-btn:active { background: #eaf6ff; } + .copy-btn { color: #ffb400; font-size: 13px; font-weight: 400; padding: 1px 6px; border-radius: 6px; transition: background 0.2s; } .copy-btn:active { background: #fff7e6; } .divider { position: absolute; left: 16px; right: 16px; bottom: -1px; height: 1px; background: #f0f0f0; } uni-icons { margin-left: 6px; } diff --git a/pages/subcomponent/detail.vue b/pages/subcomponent/detail.vue index a790439..a1fe98d 100644 --- a/pages/subcomponent/detail.vue +++ b/pages/subcomponent/detail.vue @@ -49,12 +49,15 @@ 期待您下次的支持,共同为地球减少碳排放出一份力! - - + + 物流公司 - {{ expressCompany }}{{ expressNo }} - 复制 + {{ expressCompany }}{{ wuliuNo }} + + 查看物流 + 复制 + @@ -198,7 +201,7 @@ export default { reportTime: '', showEditButton: true, expressCompany: '', - expressNo: '', + wuliuNo: '', showCancelModal: false, statusBarHeight: 0, orderDetail: null, @@ -313,12 +316,21 @@ export default { }, copyExpressNo() { uni.setClipboardData({ - data: this.expressCompany + this.expressNo, + data: this.expressCompany + this.wuliuNo, success: () => { uni.showToast({ title: '已复制', icon: 'none' }); } }); }, + viewLogistics() { + if (!this.wuliuNo) { + uni.showToast({ title: '暂无快递单号', icon: 'none' }); + return; + } + uni.navigateTo({ + url: `/pages/subcomponent/logistics?wliuNo=${this.wuliuNo}&expressCompany=${this.expressCompany}` + }); + }, confirmCancelOrder() { this.showCancelModal = false; // 模拟取消动作 @@ -401,7 +413,7 @@ export default { this.finalPrice = res.result.price || '' this.clothesList = res.result.commonOrderList || [] this.expressCompany = res.result.wliu || '' - this.expressNo = res.result.expressNo || '' + this.wuliuNo = res.result.wliuNo || '' this.phone = res.result.deliveryPhone || '' // 状态判断 this.setOrderStatus(res.result.status, res.result.state, res.result) @@ -887,12 +899,22 @@ letter-spacing: 0%; font-size: 28rpx; font-weight: 500; word-break: break-all; + flex: 1; +} +.express-actions { + display: flex; + align-items: center; + gap: 16rpx; +} +.express-view { + color: #2a9cfb; + font-size: 26rpx; + font-weight: 500; } .express-copy { color: #ff9c00; font-size: 26rpx; font-weight: 500; - margin-left: 16rpx; } .modal-mask { position: fixed; diff --git a/pages/subcomponent/inspection-report.vue b/pages/subcomponent/inspection-report.vue index 6ded66c..f770e32 100644 --- a/pages/subcomponent/inspection-report.vue +++ b/pages/subcomponent/inspection-report.vue @@ -52,7 +52,7 @@ /{{item.unit}} x{{item.count}} - ¥{{item.total}} + @@ -94,7 +94,7 @@ 件数:{{problemCount}} - 结算金额:¥ 0 + 结算金额:¥{{problemAmount}} @@ -124,8 +124,8 @@ - 件数:{{problemCount}} - 结算金额:¥ 0 + 件数:{{unrecyclableCount}} + 结算金额:¥{{unrecyclableAmount}} @@ -174,7 +174,13 @@ export default { return this.problemList.reduce((sum, item) => sum + item.count, 0) }, problemAmount() { - return this.problemList.reduce((sum, item) => sum + item.total, 0).toFixed(1) + return this.problemList.reduce((sum, item) => sum + item.total, 0).toFixed(2) + }, + unrecyclableCount() { + return this.unrecyclableList.reduce((sum, item) => sum + item.count, 0) + }, + unrecyclableAmount() { + return this.unrecyclableList.reduce((sum, item) => sum + item.total, 0).toFixed(2) }, fixedHeaderHeight() { // 导航栏高度 + 状态栏高度 + 特性区域高度 (约140rpx转px) @@ -249,7 +255,7 @@ export default { desc: item.pinName ? `${item.pinName}` : '', price: item.price || 0, count: sub.num || 1, - total: 0, + total: (item.price || 0) * (sub.num || 1), detail: true, testingInstructions: sub.testingInstructions || '', testingImages: sub.testingImages || '', @@ -265,7 +271,7 @@ export default { desc: item.pinName ? `${item.pinName}` : '', price: item.price || 0, count: sub.num || 1, - total: 0, + total: (item.price || 0) * (sub.num || 1), detail: true, testingInstructions: sub.testingInstructions || '', testingImages: sub.testingImages || '', diff --git a/pages/subcomponent/logistics.vue b/pages/subcomponent/logistics.vue new file mode 100644 index 0000000..4b2ad42 --- /dev/null +++ b/pages/subcomponent/logistics.vue @@ -0,0 +1,288 @@ + + + + + \ No newline at end of file