feat: update appraisal return address and test packaging assets

This commit is contained in:
wushumin
2026-06-15 20:08:36 +08:00
parent fa267c4413
commit 9be60fbe17
23 changed files with 1806 additions and 393 deletions

View File

@@ -174,6 +174,7 @@ export interface AdminOrderListItem {
id: number;
order_no: string;
appraisal_no: string;
external_order_no?: string;
product_name: string;
category_name: string;
brand_name: string;
@@ -197,6 +198,7 @@ export interface AdminOrderDetail {
id: number;
order_no: string;
appraisal_no: string;
external_order_no?: string;
service_provider: string;
service_provider_text: string;
price_package_name: string;

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, onMounted, reactive, ref } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { CopyDocument } from "@element-plus/icons-vue";
import {
adminApi,
type EnterpriseCustomer,
@@ -210,6 +211,49 @@ async function resetSecret(row: EnterpriseCustomerApp) {
}
}
function copySecretFallback(value: string) {
const input = document.createElement("textarea");
input.value = value;
input.setAttribute("readonly", "readonly");
input.style.position = "fixed";
input.style.opacity = "0";
document.body.appendChild(input);
input.select();
try {
const copied = document.execCommand("copy");
if (!copied) {
throw new Error("copy command failed");
}
} finally {
document.body.removeChild(input);
}
}
async function copySecret() {
const value = oneTimeSecret.value;
if (!value) {
ElMessage.warning("Secret 为空");
return;
}
try {
if (navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(value);
} else {
copySecretFallback(value);
}
ElMessage.success("Secret 已复制");
} catch (error) {
try {
copySecretFallback(value);
ElMessage.success("Secret 已复制");
} catch (fallbackError) {
console.error(fallbackError || error);
ElMessage.error("Secret 复制失败");
}
}
}
async function resendEvent(row: EnterpriseOrderEvent) {
try {
const response = await adminApi.resendCustomerEvent(row.id);
@@ -485,7 +529,11 @@ onMounted(fetchCustomers);
<el-dialog v-model="secretDialogVisible" title="应用 Secret" width="620px">
<el-alert type="warning" show-icon :closable="false" title="Secret 只展示一次,关闭后无法再次查看。" />
<el-input v-model="oneTimeSecret" readonly style="margin-top: 16px" />
<el-input v-model="oneTimeSecret" readonly class="secret-input">
<template #append>
<el-button :icon="CopyDocument" @click="copySecret">复制</el-button>
</template>
</el-input>
<template #footer>
<el-button type="primary" @click="secretDialogVisible = false">已保存</el-button>
</template>
@@ -509,4 +557,8 @@ onMounted(fetchCustomers);
.detail-url {
overflow-wrap: anywhere;
}
.secret-input {
margin-top: 16px;
}
</style>

View File

@@ -42,6 +42,7 @@ const manualForm = ref<AdminManualOrderCreatePayload>(createManualOrderForm());
const manualAddressRecognitionText = ref("");
const keyword = ref("");
const externalOrderNo = ref("");
const trackingNo = ref("");
const userMobile = ref("");
const serviceProvider = ref("");
@@ -203,6 +204,7 @@ async function fetchOrders() {
try {
const response = await adminApi.getOrders({
keyword: keyword.value,
external_order_no: externalOrderNo.value,
tracking_no: trackingNo.value,
user_mobile: userMobile.value,
service_provider: serviceProvider.value,
@@ -535,6 +537,7 @@ onMounted(fetchOrders);
<el-card class="panel-card" shadow="never">
<div class="filters-row">
<el-input v-model="keyword" placeholder="搜索订单号 / 鉴定单号 / 商品名称" clearable style="width: 320px" />
<el-input v-model="externalOrderNo" placeholder="搜索客户单号" clearable style="width: 180px" />
<el-input v-model="trackingNo" placeholder="搜索快递单号" clearable style="width: 180px" />
<el-input v-model="userMobile" placeholder="搜索用户电话" clearable style="width: 180px" />
<el-select v-model="serviceProvider" placeholder="服务类型" style="width: 160px">
@@ -563,6 +566,7 @@ onMounted(fetchOrders);
<el-table-column label="下单渠道" min-width="150">
<template #default="{ row }">
<span>{{ row.source_channel_text }}</span>
<div v-if="row.external_order_no" class="table-subtext">客户单号{{ row.external_order_no }}</div>
<div v-if="row.source_customer_id" class="table-subtext">客户ID{{ row.source_customer_id }}</div>
</template>
</el-table-column>
@@ -664,6 +668,10 @@ onMounted(fetchOrders);
<div class="order-detail-item__label">大客户客户 ID</div>
<div class="order-detail-item__value">{{ detail.order_info.source_customer_id }}</div>
</div>
<div class="order-detail-item" v-if="detail.order_info.external_order_no">
<div class="order-detail-item__label">客户单号</div>
<div class="order-detail-item__value">{{ detail.order_info.external_order_no }}</div>
</div>
<div class="order-detail-item">
<div class="order-detail-item__label">当前状态</div>
<div class="order-detail-item__value"><OrderStatusTag :status="detail.order_info.display_status" /></div>