|
@@ -178,6 +178,9 @@
|
|
|
|
|
|
|
|
<!-- 服务进度 -->
|
|
<!-- 服务进度 -->
|
|
|
<view class="tab-content" v-if="activeTab === 'progress'">
|
|
<view class="tab-content" v-if="activeTab === 'progress'">
|
|
|
|
|
+ <view style="display: flex; justify-content: flex-end; margin-bottom: 20rpx;">
|
|
|
|
|
+ <button class="mini-btn" size="mini" type="primary" style="margin: 0; background-color: #409eff; border-color: #409eff;" @click="generateFulfillPath">生成履约路径</button>
|
|
|
|
|
+ </view>
|
|
|
<view class="empty-state"
|
|
<view class="empty-state"
|
|
|
v-if="['wait_dispatch', 'wait_accept'].includes(order.statusKey) || serviceTimeline.length === 0">
|
|
v-if="['wait_dispatch', 'wait_accept'].includes(order.statusKey) || serviceTimeline.length === 0">
|
|
|
<uni-icons type="info" size="40" color="#ccc"></uni-icons>
|
|
<uni-icons type="info" size="40" color="#ccc"></uni-icons>
|
|
@@ -333,6 +336,7 @@ import { getFulfiller } from '@/api/fulfiller/fulfiller'
|
|
|
import { listSubOrderLog } from '@/api/order/subOrderLog'
|
|
import { listSubOrderLog } from '@/api/order/subOrderLog'
|
|
|
import { listComplaintByOrder } from '@/api/fulfiller/complaint'
|
|
import { listComplaintByOrder } from '@/api/fulfiller/complaint'
|
|
|
import { listSubOrderAppealByOrderId } from '@/api/order/subOrderAppeal'
|
|
import { listSubOrderAppealByOrderId } from '@/api/order/subOrderAppeal'
|
|
|
|
|
+import { BASE_URL } from '@/utils/config'
|
|
|
|
|
|
|
|
const activeTab = ref('base')
|
|
const activeTab = ref('base')
|
|
|
const activeService = ref('transport')
|
|
const activeService = ref('transport')
|
|
@@ -796,6 +800,28 @@ const onComplaint = () => {
|
|
|
url: `/pages/my/complaint/submit/index?orderId=${order.id}&fulfillerId=${order.fulfiller}&orderCode=${order.code}`
|
|
url: `/pages/my/complaint/submit/index?orderId=${order.id}&fulfillerId=${order.fulfiller}&orderCode=${order.code}`
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const generateFulfillPath = () => {
|
|
|
|
|
+ if (!order.id) {
|
|
|
|
|
+ uni.showToast({ title: '订单ID不存在', icon: 'none' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ let path = ''
|
|
|
|
|
+ const ipPattern = /http:\/\/((\d{1,3}\.){3}\d{1,3}(:\d+)?)/;
|
|
|
|
|
+ const match = BASE_URL.match(ipPattern);
|
|
|
|
|
+ if (match) {
|
|
|
|
|
+ path = `http://${match[1]}/fulfillPath?orderId=${order.id}`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ path = `https://www.hoomeng.pet/fulfillPath?orderId=${order.id}`
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
|
+ data: path,
|
|
|
|
|
+ success: () => {
|
|
|
|
|
+ uni.showToast({ title: '履约路径已复制到剪贴板', icon: 'none' })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|