diff --git a/package.json b/package.json
index a8d220b..4e0a82b 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "gao-customer-h5",
"private": true,
- "version": "1.0.3",
+ "version": "1.1.0",
"type": "module",
"scripts": {
"dev": "vite --host",
@@ -30,9 +30,9 @@
"less": "^4.3.0",
"pinia": "^3.0.2",
"tdesign-mobile-vue": "^1.17.1",
- "timi-tdesign-mobile": "^1.0.1",
+ "timi-tdesign-mobile": "^1.0.2",
"timi-ts": "^1.0.0",
- "timi-web": "^1.0.1",
+ "timi-web": "^1.0.2",
"timi-web-api": "^1.0.2",
"ts-node": "^10.9.2",
"vconsole": "^3.15.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3ae5af6..2731625 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -47,17 +47,17 @@ importers:
specifier: ^1.17.1
version: 1.17.1(patch_hash=c98db305008fbfd00046666ca890e1c6cb88257c0619418694689cddf8cd78c3)(vue@3.5.40(typescript@5.8.3))
timi-tdesign-mobile:
- specifier: ^1.0.1
- version: 1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3))
+ specifier: ^1.0.2
+ version: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3))
timi-ts:
specifier: ^1.0.0
version: 1.0.0
timi-web:
- specifier: ^1.0.1
- version: 1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
+ specifier: ^1.0.2
+ version: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
timi-web-api:
specifier: ^1.0.2
- version: 1.0.2(timi-web@1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
+ version: 1.0.2(timi-web@1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
ts-node:
specifier: ^10.9.2
version: 10.9.2(@types/node@24.13.3)(typescript@5.8.3)
@@ -1979,6 +1979,7 @@ packages:
image-size@0.5.5:
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
engines: {node: '>=0.10.0'}
+ deprecated: Please migrate to image-size@2.x
hasBin: true
import-fresh@3.3.1:
@@ -2747,8 +2748,8 @@ packages:
through2@4.0.2:
resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==}
- timi-tdesign-mobile@1.0.1:
- resolution: {integrity: sha512-HFBENjEw1+zymyaDU7u9ZNZjIqzA8J+9eZHNMGyPd8/zSSsGb9bS1a1r3zDA0Zq7g6WwqQctwaQUO4xkU4gyAw==}
+ timi-tdesign-mobile@1.0.2:
+ resolution: {integrity: sha512-7qjwUUqIjMB9TJbOWguK61JfQ15PLf3gnfUDU1gY2eS4cjbgo/PD2U/eHNV6CZ0VB/hBjPNp84xKZ0qr03tsmw==}
engines: {node: '>=20.0.0'}
peerDependencies:
vue: ^3.5.0
@@ -2765,8 +2766,8 @@ packages:
timi-web: ^1.0.0
vue: ^3.5.26
- timi-web@1.0.1:
- resolution: {integrity: sha512-FVPQuqTc3DurS3Gfty9ZQoNZ7vyQ0v6xj0g/iouFgxFqNuzjzUNn3PA/Tl58nJcRrUNv3S/uofMMkNRmw/cUYg==}
+ timi-web@1.0.2:
+ resolution: {integrity: sha512-CXyWEeGTjrExnrAwstdWPc3qK5Lfyp7ipD8p7+WYcm4mcnJOS48k6SkVnrAIADAImeJAr/1e5JEV8wk+8AcvxQ==}
engines: {node: '>=20.0.0'}
tinycolor2@1.6.0:
@@ -3125,7 +3126,7 @@ snapshots:
'@babel/helper-module-imports@7.29.7':
dependencies:
'@babel/traverse': 7.29.13
- '@babel/types': 7.29.7
+ '@babel/types': 7.29.11
transitivePeerDependencies:
- supports-color
@@ -5848,10 +5849,10 @@ snapshots:
dependencies:
readable-stream: 3.6.2
- timi-tdesign-mobile@1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)):
+ timi-tdesign-mobile@1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue-router@4.5.1(vue@3.5.40(typescript@5.8.3)))(vue@3.5.40(typescript@5.8.3)):
dependencies:
tdesign-mobile-vue: 1.17.1(patch_hash=c98db305008fbfd00046666ca890e1c6cb88257c0619418694689cddf8cd78c3)(vue@3.5.40(typescript@5.8.3))
- timi-web: 1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
+ timi-web: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
vue: 3.5.40(typescript@5.8.3)
vue-router: 4.5.1(vue@3.5.40(typescript@5.8.3))
transitivePeerDependencies:
@@ -5864,18 +5865,18 @@ snapshots:
timi-ts@1.0.0: {}
- timi-web-api@1.0.2(timi-web@1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)):
+ timi-web-api@1.0.2(timi-web@1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)):
dependencies:
axios: 1.21.0
pinia: 3.0.4(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
- timi-web: 1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
+ timi-web: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3))
vue: 3.5.40(typescript@5.8.3)
transitivePeerDependencies:
- debug
- supports-color
- typescript
- timi-web@1.0.1(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)):
+ timi-web@1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.40(typescript@5.8.3)):
dependencies:
'@marsio/vue-split-pane': 1.0.0(typescript@5.8.3)
'@tiptap/extension-code-block': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
diff --git a/src/Root.vue b/src/Root.vue
index 92f3bdf..4612898 100644
--- a/src/Root.vue
+++ b/src/Root.vue
@@ -40,6 +40,18 @@ watch(
{ immediate: true }
);
+watch(
+ () => globalUIStore.backdropBlur,
+ (enabled) => {
+ if (enabled) {
+ document.documentElement.style.removeProperty("--tui-backdrop-blur");
+ } else {
+ document.documentElement.style.setProperty("--tui-backdrop-blur", "0px");
+ }
+ },
+ { immediate: true }
+);
+
onMounted(() => {
settingStore.loadSoundPlayers();
window.addEventListener("pointerdown", unlockSoundOnUserGesture, { once: true });
diff --git a/src/assets/styles/global.less b/src/assets/styles/global.less
index 798d0ec..fc8aece 100644
--- a/src/assets/styles/global.less
+++ b/src/assets/styles/global.less
@@ -291,8 +291,8 @@ html.theme-dark body {
mask: linear-gradient(to top, transparent 0%, #000 60%);
-webkit-mask: linear-gradient(to top, transparent 0%, #000 60%);
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
+ backdrop-filter: blur(var(--tui-backdrop-blur, 10px));
+ -webkit-backdrop-filter: blur(var(--tui-backdrop-blur, 10px));
}
}
@@ -309,8 +309,8 @@ html.theme-dark body {
mask: linear-gradient(to bottom, transparent 0%, #000 60%);
-webkit-mask: linear-gradient(to bottom, transparent 0%, #000 60%);
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
+ backdrop-filter: blur(var(--tui-backdrop-blur, 10px));
+ -webkit-backdrop-filter: blur(var(--tui-backdrop-blur, 10px));
}
}
diff --git a/src/components/ProductSkuTags.vue b/src/components/ProductSkuTags.vue
index a279941..2c9d293 100644
--- a/src/components/ProductSkuTags.vue
+++ b/src/components/ProductSkuTags.vue
@@ -3,18 +3,19 @@
-
+
diff --git a/src/pages/setting/About.vue b/src/pages/setting/About.vue
index 06d2323..606df80 100644
--- a/src/pages/setting/About.vue
+++ b/src/pages/setting/About.vue
@@ -12,6 +12,7 @@
@@ -32,6 +33,13 @@
v-else
:description="isLoading ? '正在加载协议配置' : '暂无可用协议'"
/>
+
+
+
+
+
+
+
@@ -46,52 +51,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 检查更新
-
-
- 下载更新
-
-
-
- 下载中 {{ percent }}%
-
-
-
- 现在更新
-
-
@@ -101,8 +60,6 @@ import type { ThemeMode } from "@/store/globalUI";
import { useGlobalUIStore } from "@/store/globalUI";
import SegmentedSlider from "@/components/SegmentedSlider.vue";
import { useSettingStore } from "@/store/settingStore";
-import { setAutoUpdate, useAppUpdate } from "@/composables/useAppUpdate";
-import { Message } from "@/utils/message";
defineOptions({
name: "AppSettings"
@@ -159,97 +116,7 @@ async function playSettingSoundPreview(type: "scanSuccess" | "registerSuccess"):
await settingStore.playRegisterSuccessSound();
}
-// ---------- 版本更新 ----------
-const {
- supported: updateSupported,
- currentVersion,
- nativeVersion,
- latest,
- checking,
- downloading,
- percent,
- ready,
- error: updateError,
- autoUpdate,
- loadCurrent,
- check,
- hasUpdate,
- download,
- apply,
- restorePending
-} = useAppUpdate();
-
-/** 有更新时展示目标版本号 */
-const latestVersionText = computed(() => (hasUpdate() ? `v${latest.value?.version ?? ""}` : ""));
-
-/** 当前所处的更新阶段 */
-const updateStage = computed<"check" | "download" | "downloading" | "apply">(() => {
- if (downloading.value) {
- return "downloading";
- }
- if (ready.value) {
- return "apply";
- }
- if (latest.value && hasUpdate()) {
- return "download";
- }
- return "check";
-});
-
-/** 阶段说明文案 */
-const updateHint = computed(() => {
- if (!updateSupported) {
- return "仅在 App 内可用";
- }
- if (ready.value) {
- return `v${ready.value.version} 已下载,点击下方按钮重启生效`;
- }
- if (latest.value && hasUpdate()) {
- return `发现新版本 v${latest.value.version}`;
- }
- if (latest.value && !checking.value) {
- return "当前已是最新版本";
- }
- return "";
-});
-
-onMounted(async () => {
- await loadCurrent();
- await restorePending();
-});
-
-function handleAutoUpdateChange(value: boolean | string | number): void {
- setAutoUpdate(value === true);
-}
-
-async function handleCheck(): Promise {
- const result = await check();
- if (!result) {
- Message.error(updateError.value || "检查更新失败");
- return;
- }
- if (!hasUpdate()) {
- Message.info("已是最新版本");
- }
-}
-
-async function handleDownload(): Promise {
- const bundle = await download();
- if (!bundle) {
- Message.error(updateError.value || "下载失败");
- return;
- }
- Message.success(`v${bundle.version} 已下载`);
-}
-
-async function handleApply(): Promise {
- const bundle = ready.value;
- if (!bundle) {
- return;
- }
- await apply(bundle);
-}
diff --git a/src/pages/setting/AppUpdate.vue b/src/pages/setting/AppUpdate.vue
new file mode 100644
index 0000000..0c643d3
--- /dev/null
+++ b/src/pages/setting/AppUpdate.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 检查更新
+
+
+ 下载更新
+
+
+
+
+
+
+
+
+ 现在更新
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/tabs/component/CustomerEntryPanel.vue b/src/pages/tabs/component/CustomerEntryPanel.vue
index 54e27c4..0ec77c0 100644
--- a/src/pages/tabs/component/CustomerEntryPanel.vue
+++ b/src/pages/tabs/component/CustomerEntryPanel.vue
@@ -174,10 +174,14 @@ async function openAiChat(): Promise {
.items {
--td-button-border-radius: 1.75rem;
- // 按最小宽度铺排:手机刚好吃下 3 列,平板自动加列而不是把卡片放大
+ // 窄屏至少显示 3 列,宽屏按最小宽度自动增加列数
gap: .875rem;
display: grid;
- grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
+ grid-template-columns: repeat(auto-fill, minmax(min(6.5rem, calc(33.3333% - .5834rem)), 1fr));
+
+ .item-wrap {
+ min-width: 0;
+ }
.item {
--entry-color: #0f766e;
@@ -207,7 +211,7 @@ async function openAiChat(): Promise {
}
.body {
- inset: 1rem;
+ inset: .5rem;
display: flex;
gap: .5rem;
position: absolute;
diff --git a/src/router/routes/managementRoutes.ts b/src/router/routes/managementRoutes.ts
index 6451bf3..a390463 100644
--- a/src/router/routes/managementRoutes.ts
+++ b/src/router/routes/managementRoutes.ts
@@ -137,6 +137,17 @@ export const managementSettingRoutes: RouteRecordRaw[] = [
darkBodyBackground: "#10161f"
}
},
+ {
+ path: "/management/about/update",
+ name: "AppUpdate",
+ component: () => import("@/pages/setting/AppUpdate.vue"),
+ meta: {
+ depth: 4,
+ tabBarVisible: false,
+ bodyBackground: "#F5F5F8",
+ darkBodyBackground: "#10161f"
+ }
+ },
{
path: "/management/about/agreement/:id",
name: "Agreement",
diff --git a/src/store/globalUI.ts b/src/store/globalUI.ts
index 3867558..e8eedff 100644
--- a/src/store/globalUI.ts
+++ b/src/store/globalUI.ts
@@ -3,6 +3,7 @@ import { defineStore } from "pinia";
export const DEFAULT_BODY_BACKGROUND = "#FFF";
const THEME_STORAGE_KEY = "gao-customer-h5:theme-mode";
+const BACKDROP_BLUR_STORAGE_KEY = "gao-customer-h5:backdrop-blur";
export type ThemeMode = "light" | "dark" | "system";
@@ -18,6 +19,7 @@ function readStoredThemeMode(): ThemeMode {
const store = defineStore("globalUI", () => {
const bodyBackground = ref(DEFAULT_BODY_BACKGROUND);
const themeMode = ref(readStoredThemeMode());
+ const backdropBlur = ref(localStorage.getItem(BACKDROP_BLUR_STORAGE_KEY) !== "false");
function setBodyBackground(color?: string): void {
bodyBackground.value = color || DEFAULT_BODY_BACKGROUND;
@@ -28,11 +30,18 @@ const store = defineStore("globalUI", () => {
localStorage.setItem(THEME_STORAGE_KEY, mode);
}
+ function setBackdropBlur(enabled: boolean): void {
+ backdropBlur.value = enabled;
+ localStorage.setItem(BACKDROP_BLUR_STORAGE_KEY, String(enabled));
+ }
+
return {
bodyBackground,
themeMode,
+ backdropBlur,
setBodyBackground,
- setThemeMode
+ setThemeMode,
+ setBackdropBlur
};
});
diff --git a/src/types/Product.ts b/src/types/Product.ts
index 26ed52f..482a2ca 100644
--- a/src/types/Product.ts
+++ b/src/types/Product.ts
@@ -116,6 +116,12 @@ export type ProductSelection = {
unit: ProductSkuUnit;
};
+/** 产品 SKU 标签所需的产品与规格信息。 */
+export type ProductSkuTagSelection = {
+ product: Pick;
+ sku: Pick;
+};
+
export type ProductCategoryPage = {
storeId?: string;
status?: ProductCategoryStatus;
diff --git a/src/types/SalesOrder.ts b/src/types/SalesOrder.ts
index 73900dd..4909a25 100644
--- a/src/types/SalesOrder.ts
+++ b/src/types/SalesOrder.ts
@@ -78,6 +78,7 @@ export type SalesOrderPage = {
storeId?: string;
customerId?: string;
packageConfigId?: string;
+ fulfillableSkuId?: string;
orderType?: GaoSalesOrderType;
orderTypeList?: GaoSalesOrderType[];
status?: GaoSalesOrderStatus;
diff --git a/src/types/SalesOrderFilter.ts b/src/types/SalesOrderFilter.ts
index b1c2222..1f6d6bd 100644
--- a/src/types/SalesOrderFilter.ts
+++ b/src/types/SalesOrderFilter.ts
@@ -5,6 +5,7 @@ import type {
GaoSalesRefundStatus
} from "@/types/SalesOrder";
import type { DateTimeRange } from "@/utils/date";
+import type { ProductSelection, ProductSkuTagSelection } from "@/types/Product";
import { DATE_FILTER_OPTIONS, type DateFilterType } from "@/utils/dateFilter";
/** 销售订单筛选类型别名,保持现有导入路径兼容。 */
@@ -14,7 +15,7 @@ export type SalesOrderDateFilterType = DateFilterType;
export type SalesOrderPaymentFilter = GaoSalesPaymentStatus | "PENDING_RECEIVE";
/** 销售订单筛选组。 */
-export type SalesOrderFilterGroupKey = "date" | "orderTypeList" | "statusList" | "paymentStatusList" | "refundStatusList";
+export type SalesOrderFilterGroupKey = "date" | "orderTypeList" | "statusList" | "paymentStatusList" | "refundStatusList" | "fulfillableSku";
/** 销售订单列表筛选条件。 */
export type SalesOrderListFilter = {
@@ -24,8 +25,19 @@ export type SalesOrderListFilter = {
statusList: GaoSalesOrderStatus[];
paymentStatusList: SalesOrderPaymentFilter[];
refundStatusList: GaoSalesRefundStatus[];
+ fulfillableSkuId: string;
+ fulfillableSkuName: string;
+ fulfillableSkuSelection?: ProductSkuTagSelection;
};
+/** 提取筛选回显需要的产品和 SKU 信息。 */
+export function getFulfillableSkuSelection(selection: ProductSelection): ProductSkuTagSelection {
+ return {
+ product: { name: selection.product.name, specList: selection.product.specList },
+ sku: { name: selection.sku.name, specSummary: selection.sku.specSummary, specValueIdList: selection.sku.specValueIdList }
+ };
+}
+
/** 创建销售订单筛选默认值。 */
export function createDefaultSalesOrderFilter(): SalesOrderListFilter {
return {
@@ -34,7 +46,9 @@ export function createDefaultSalesOrderFilter(): SalesOrderListFilter {
orderTypeList: ["PACKAGE", "DIRECT_PRODUCT"],
statusList: ["ACTIVE"],
paymentStatusList: ["UNPAID", "PARTIALLY_PAID", "PAID"],
- refundStatusList: ["NOT_REQUIRED", "PENDING", "REFUNDED"]
+ refundStatusList: ["NOT_REQUIRED", "PENDING", "REFUNDED"],
+ fulfillableSkuId: "",
+ fulfillableSkuName: ""
};
}
@@ -46,7 +60,10 @@ export function cloneSalesOrderFilter(filter: SalesOrderListFilter): SalesOrderL
orderTypeList: [...filter.orderTypeList],
statusList: [...filter.statusList],
paymentStatusList: [...filter.paymentStatusList],
- refundStatusList: [...filter.refundStatusList]
+ refundStatusList: [...filter.refundStatusList],
+ fulfillableSkuId: filter.fulfillableSkuId,
+ fulfillableSkuName: filter.fulfillableSkuName,
+ fulfillableSkuSelection: filter.fulfillableSkuSelection
};
}
@@ -73,7 +90,24 @@ export function normalizeSalesOrderFilter(value: unknown): SalesOrderListFilter
orderTypeList: normalizeList(source.orderTypeList, defaultFilter.orderTypeList),
statusList: normalizeList(source.statusList, defaultFilter.statusList),
paymentStatusList: normalizeList(source.paymentStatusList, defaultFilter.paymentStatusList),
- refundStatusList: normalizeList(source.refundStatusList, defaultFilter.refundStatusList)
+ refundStatusList: normalizeList(source.refundStatusList, defaultFilter.refundStatusList),
+ fulfillableSkuId: typeof source.fulfillableSkuId === "string" ? source.fulfillableSkuId : "",
+ fulfillableSkuName: typeof source.fulfillableSkuName === "string" ? source.fulfillableSkuName : "",
+ fulfillableSkuSelection: normalizeSkuSelection(source.fulfillableSkuSelection)
+ };
+}
+
+function normalizeSkuSelection(value: unknown): ProductSkuTagSelection | undefined {
+ if (!value || typeof value !== "object") return undefined;
+ const selection = value as ProductSkuTagSelection;
+ if (!selection.product || typeof selection.product.name !== "string" || !selection.sku || typeof selection.sku.name !== "string") return undefined;
+ return {
+ product: { name: selection.product.name, specList: Array.isArray(selection.product.specList) ? selection.product.specList : [] },
+ sku: {
+ name: selection.sku.name,
+ specSummary: typeof selection.sku.specSummary === "string" ? selection.sku.specSummary : "",
+ specValueIdList: normalizeList(selection.sku.specValueIdList, [])
+ }
};
}