|
@@ -90,7 +90,7 @@
|
|
|
<el-descriptions :column="2" size="small" class="pet-desc" border>
|
|
<el-descriptions :column="2" size="small" class="pet-desc" border>
|
|
|
<el-descriptions-item label="品种">{{ order.petBreed || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="品种">{{ order.petBreed || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="疫苗状态"><span style="color:#67c23a">{{ order.petVaccine || '-'
|
|
<el-descriptions-item label="疫苗状态"><span style="color:#67c23a">{{ order.petVaccine || '-'
|
|
|
- }}</span></el-descriptions-item>
|
|
|
|
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
<el-descriptions-item label="性格特点">{{ order.petCharacter || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="性格特点">{{ order.petCharacter || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="健康状况">{{ order.petHealth || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="健康状况">{{ order.petHealth || '-' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
@@ -104,7 +104,7 @@
|
|
|
<div class="user-content">
|
|
<div class="user-content">
|
|
|
<div class="u-row">
|
|
<div class="u-row">
|
|
|
<el-avatar :size="40" :src="order.userAvatar">{{ (order.userName || '').charAt(0)
|
|
<el-avatar :size="40" :src="order.userAvatar">{{ (order.userName || '').charAt(0)
|
|
|
- }}</el-avatar>
|
|
|
|
|
|
|
+ }}</el-avatar>
|
|
|
<div class="u-info">
|
|
<div class="u-info">
|
|
|
<div class="nm">{{ order.userName }}</div>
|
|
<div class="nm">{{ order.userName }}</div>
|
|
|
<div class="ph">{{ order.contactPhone }}</div>
|
|
<div class="ph">{{ order.contactPhone }}</div>
|
|
@@ -136,18 +136,18 @@
|
|
|
({{ Number(order.platformId) === 1 ? '门店下单' : '平台代下单' }})</el-descriptions-item>
|
|
({{ Number(order.platformId) === 1 ? '门店下单' : '平台代下单' }})</el-descriptions-item>
|
|
|
<el-descriptions-item label="宠主信息">{{ order.userName || '-' }} / {{
|
|
<el-descriptions-item label="宠主信息">{{ order.userName || '-' }} / {{
|
|
|
order.contactPhone || '-'
|
|
order.contactPhone || '-'
|
|
|
- }}</el-descriptions-item>
|
|
|
|
|
|
|
+ }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="订单佣金" label-class-name="money-label">
|
|
<el-descriptions-item label="订单佣金" label-class-name="money-label">
|
|
|
<span style="color:#f56c6c; font-weight:bold;">¥ {{ order.orderCommission ?
|
|
<span style="color:#f56c6c; font-weight:bold;">¥ {{ order.orderCommission ?
|
|
|
(order.orderCommission / 100).toFixed(2) : '0.00' }}</span>
|
|
(order.orderCommission / 100).toFixed(2) : '0.00' }}</span>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item label="预约时间">{{ getServiceTimeRange(order.serviceTime) || '-'
|
|
<el-descriptions-item label="预约时间">{{ getServiceTimeRange(order.serviceTime) || '-'
|
|
|
- }}</el-descriptions-item>
|
|
|
|
|
|
|
+ }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="团购套餐">{{ order.groupBuyPackage || '-'
|
|
<el-descriptions-item label="团购套餐">{{ order.groupBuyPackage || '-'
|
|
|
- }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="创建时间">{{ order.createTime || '-'
|
|
|
|
|
}}</el-descriptions-item>
|
|
}}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="创建时间">{{ order.createTime || '-'
|
|
|
|
|
+ }}</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item label="订单备注" :span="3">
|
|
<el-descriptions-item label="订单备注" :span="3">
|
|
|
{{ order.remark || '-' }}
|
|
{{ order.remark || '-' }}
|
|
@@ -166,7 +166,7 @@
|
|
|
<div class="t-row">
|
|
<div class="t-row">
|
|
|
<span class="t-k">起点</span>
|
|
<span class="t-k">起点</span>
|
|
|
<span class="t-v">{{ order.detail?.fromAddress || order.detail?.pickAddr || '-'
|
|
<span class="t-v">{{ order.detail?.fromAddress || order.detail?.pickAddr || '-'
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="t-row">
|
|
<div class="t-row">
|
|
|
<span class="t-k">终点</span>
|
|
<span class="t-k">终点</span>
|
|
@@ -187,7 +187,7 @@
|
|
|
<el-descriptions :column="2" border size="default" class="custom-desc">
|
|
<el-descriptions :column="2" border size="default" class="custom-desc">
|
|
|
<el-descriptions-item label="服务地址" :span="2">{{ order.detail?.area || order.address
|
|
<el-descriptions-item label="服务地址" :span="2">{{ order.detail?.area || order.address
|
|
|
|| '-'
|
|
|| '-'
|
|
|
- }}</el-descriptions-item>
|
|
|
|
|
|
|
+ }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -199,7 +199,7 @@
|
|
|
<div v-if="order.fulfillerName" class="fulfiller-card">
|
|
<div v-if="order.fulfillerName" class="fulfiller-card">
|
|
|
<div class="f-left">
|
|
<div class="f-left">
|
|
|
<el-avatar :size="60" :src="order.fulfillerAvatar">{{ order.fulfillerName.charAt(0)
|
|
<el-avatar :size="60" :src="order.fulfillerAvatar">{{ order.fulfillerName.charAt(0)
|
|
|
- }}</el-avatar>
|
|
|
|
|
|
|
+ }}</el-avatar>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="f-right">
|
|
<div class="f-right">
|
|
|
<div class="f-row1">
|
|
<div class="f-row1">
|
|
@@ -630,7 +630,7 @@ const currentOrderSteps = computed(() => {
|
|
|
{ title: '订单完成', time: findTime('完成') || '' }
|
|
{ title: '订单完成', time: findTime('完成') || '' }
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
- let active = 1 // 默认停在「运营派单」
|
|
|
|
|
|
|
+ let active = 1
|
|
|
|
|
|
|
|
switch (status) {
|
|
switch (status) {
|
|
|
case 0:
|
|
case 0:
|
|
@@ -697,6 +697,38 @@ const handleExportLogs = () => {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 复制文本到剪贴板,兼容 HTTP 环境
|
|
|
|
|
+ */
|
|
|
|
|
+const copyToClipboard = (text) => {
|
|
|
|
|
+ if (navigator.clipboard && window.isSecureContext) {
|
|
|
|
|
+ return navigator.clipboard.writeText(text)
|
|
|
|
|
+ }
|
|
|
|
|
+ // 降级方案:使用传统的 execCommand
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ const textarea = document.createElement('textarea')
|
|
|
|
|
+ textarea.value = text
|
|
|
|
|
+ textarea.style.position = 'fixed'
|
|
|
|
|
+ textarea.style.left = '-9999px'
|
|
|
|
|
+ textarea.style.top = '-9999px'
|
|
|
|
|
+ document.body.appendChild(textarea)
|
|
|
|
|
+ textarea.focus()
|
|
|
|
|
+ textarea.select()
|
|
|
|
|
+ try {
|
|
|
|
|
+ const success = document.execCommand('copy')
|
|
|
|
|
+ document.body.removeChild(textarea)
|
|
|
|
|
+ if (success) {
|
|
|
|
|
+ resolve()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ reject(new Error('execCommand copy failed'))
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ document.body.removeChild(textarea)
|
|
|
|
|
+ reject(e)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 生成履约路径链接并复制到剪贴板
|
|
* 生成履约路径链接并复制到剪贴板
|
|
|
*/
|
|
*/
|
|
@@ -710,7 +742,7 @@ const handleGenerateFulfillPath = () => {
|
|
|
const isIp = /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname)
|
|
const isIp = /^(\d{1,3}\.){3}\d{1,3}$/.test(hostname)
|
|
|
const baseUrl = isIp ? `http://${hostname}` : 'https://www.hoomeng.pet'
|
|
const baseUrl = isIp ? `http://${hostname}` : 'https://www.hoomeng.pet'
|
|
|
const url = `${baseUrl}/fulfillPath?orderId=${id}`
|
|
const url = `${baseUrl}/fulfillPath?orderId=${id}`
|
|
|
- navigator.clipboard.writeText(url).then(() => {
|
|
|
|
|
|
|
+ copyToClipboard(url).then(() => {
|
|
|
ElMessage.success('履约路径已复制到剪贴板')
|
|
ElMessage.success('履约路径已复制到剪贴板')
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
ElMessage({ message: url, type: 'success', duration: 10000, showClose: true })
|
|
ElMessage({ message: url, type: 'success', duration: 10000, showClose: true })
|