修复商品库存与网络摘要并校验订购编号

This commit is contained in:
cieanyau committed 2026-11-06 04:48:38 +08:00
1 parent 28894e0813
commit d8224ec5b7
15 files changed
+529 -68

No files matched your search

+7 -1
View File
@@ -60,6 +60,7 @@ import KkyEcsConfig from "~/components/config/KkyEcsConfig.vue";
import MfCloudConfig from "~/components/config/MfCloudConfig.vue";
import { t as composables_t } from "~/lib/composables-2.js";
import { t as product_description_data_t } from "~/lib/product-description-data.js";
import { productId } from "~/lib/product-id.js";
var ge = {
class: `cloud-order-page`,
},
@@ -135,6 +136,7 @@ var ge = {
? `库存待确认`
: `暂时缺货`,
G = (e) =>
productId(e.id) !== null &&
Number(e.hidden ?? 0) !== 1 &&
(e.product_group_id_second == null ||
Number(e.product_group_id_second) === T.value);
@@ -208,7 +210,7 @@ var ge = {
((E.value = (t.list ?? []).filter(G)),
(I.value = Number(t.count) || 0),
(A.value = !1));
let n = Number(C.query.id ?? C.query.product_id),
let n = productId(C.query.id ?? C.query.product_id),
r =
E.value.find((e) => e.id === n && !U(e)) ??
E.value.find((e) => !U(e));
@@ -238,6 +240,10 @@ var ge = {
(j.value = !1),
(A.value = !1));
try {
// 显式指定的商品编号无效时就地提示,不改选首件商品,更不把超限值交给后端。
const requestedId = C.query.id ?? C.query.product_id;
if (requestedId !== undefined && productId(requestedId) === null)
throw Error(`商品编号无效`);
let [t, n] = await Promise.all([
S.get(`/product/group/first`),
S.get(`/product/group/second`),