remove customer package

This commit is contained in:
Timi
2026-09-06 17:09:19 +08:00
parent 4c6920be85
commit 0b01a54eac
15 changed files with 133 additions and 567 deletions
+10 -1
View File
@@ -5,7 +5,10 @@
<section class="hero" v-entrance-transition="35">
<div class="header">
<span class="eyebrow">销售订单</span>
<t-tag :content="getSalesOrderStatusText(order.status)" variant="light-outline" :theme="getStatusTheme(order.status)" />
<div class="tags">
<t-tag :content="getSalesOrderTypeText(order.orderType)" theme="primary" variant="light-outline" />
<t-tag :content="getSalesOrderStatusText(order.status)" variant="light-outline" :theme="getStatusTheme(order.status)" />
</div>
</div>
<h1 class="no" v-text="order.orderNo" />
<div class="meta">
@@ -215,6 +218,7 @@ import { getErrorMessage } from "@/utils/error";
import { getProductPhotoURL } from "@/utils/product";
import {
getSalesOrderStatusText,
getSalesOrderTypeText,
getSalesPaymentStatusText,
getSalesRefundStatusText,
getStatusTheme
@@ -468,6 +472,11 @@ onUnmounted(() => navBarStore.clearRight());
align-items: center;
justify-content: space-between;
.tags {
gap: .5rem;
display: flex;
}
.eyebrow {
color: #c2410c;
display: block;
+4
View File
@@ -92,6 +92,7 @@ const actions = computed(() => canCreate.value ? [{
action: toCreate
}] : []);
const keyword = ref("");
const customerId = ref("");
const orderType = ref("ALL");
type PaymentFilter = "ALL" | GaoSalesPaymentStatus | "PENDING_RECEIVE";
type RefundFilter = "ALL" | GaoSalesRefundStatus;
@@ -112,6 +113,7 @@ const paymentOptions = [{ label: "全部收款", value: "ALL" }, { label: "未
const refundOptions = [{ label: "全部退款", value: "ALL" }, { label: "无需退款", value: "NOT_REQUIRED" }, { label: "待退款", value: "PENDING" }, { label: "已退款", value: "REFUNDED" }];
const routeFilterKey = computed(() => [
route.query.customerId,
route.query.orderType,
route.query.status,
route.query.paymentStatus,
@@ -125,6 +127,7 @@ function queryValue(value: unknown): string {
function applyRouteFilters(): void {
const pendingReceive = queryValue(route.query.pendingReceive) === "true";
customerId.value = queryValue(route.query.customerId);
orderType.value = queryValue(route.query.orderType) || "ALL";
status.value = queryValue(route.query.status) || "ALL";
paymentStatus.value = pendingReceive ? "PENDING_RECEIVE" : queryValue(route.query.paymentStatus) as PaymentFilter || "ALL";
@@ -134,6 +137,7 @@ function applyRouteFilters(): void {
function buildPageFilter(): SalesOrderPage {
const pendingReceive = paymentStatus.value === "PENDING_RECEIVE";
return {
customerId: customerId.value || undefined,
keyword: keyword.value || undefined,
orderType: orderType.value === "ALL" ? undefined : orderType.value as GaoSalesOrderType,
status: status.value === "ALL" ? undefined : status.value as GaoSalesOrderStatus,
@@ -62,7 +62,7 @@
<strong class="value red" v-text="formatPackageAmount(props.order.saleAmount)" />
</div>
</div>
<div v-if="showActions" class="actions" @click.stop>
<div class="actions" @click.stop>
<t-button
v-if="showReceiveAction"
variant="outline"
@@ -117,7 +117,6 @@ const productSummaryText = computed(() => `共 ${itemList.value.length} 项 ·
const showReceiveAction = computed(() => props.canReceive && props.order.status !== "CANCELLED" && props.order.paymentStatus !== "PAID");
const canFulfillByPayment = computed(() => props.order.paymentStatus === "PAID" || (props.order.paymentStatus === "PARTIALLY_PAID" && props.canOperateStock));
const showFulfillAction = computed(() => props.canFulfill && canFulfillByPayment.value && props.order.status === "ACTIVE");
const showActions = computed(() => showReceiveAction.value || showFulfillAction.value);
function getPaymentStatusTheme(status?: GaoSalesPaymentStatus): "success" | "warning" | "danger" | "default" {
if (status === "PAID") {