From 413f12619b5994c0aafe635114f3629de6c9c27b Mon Sep 17 00:00:00 2001 From: Timi Date: Fri, 21 Aug 2026 15:02:28 +0800 Subject: [PATCH] remove store filter --- src/pages/customer/CustomerEdit.vue | 66 +++--------------------- src/pages/customer/CustomerList.vue | 43 +--------------- src/pages/event/EventList.vue | 69 ++----------------------- src/pages/point/PointAccount.vue | 79 +++-------------------------- src/pages/point/PointAdjust.vue | 74 +++------------------------ src/pages/point/PointLedgerList.vue | 48 ++---------------- src/pages/point/PointRuleList.vue | 44 ++-------------- src/pages/user/UserList.vue | 66 ++---------------------- 8 files changed, 41 insertions(+), 448 deletions(-) diff --git a/src/pages/customer/CustomerEdit.vue b/src/pages/customer/CustomerEdit.vue index 6608e15..5289f4d 100644 --- a/src/pages/customer/CustomerEdit.vue +++ b/src/pages/customer/CustomerEdit.vue @@ -18,9 +18,6 @@ - -
-
- - - formData.name?.trim() && formData.storeId); - -// ---------- 门店选择 ---------- - -const storePickerVisible = ref(false); -const storePickerDraft = ref([]); -const storePickerColumns = computed(() => [ - currentStoreStore.storeList.map(item => ({ - label: item.name || item.code || "未命名门店", - value: item.id || "" - })).filter(item => item.value) -]); -const selectedStoreName = computed(() => { - const store = currentStoreStore.storeList.find(item => item.id === formData.storeId); - return store?.name || store?.code || "请选择门店"; -}); - -function openStorePicker(): void { - if (!currentStoreStore.storeList.length) { - Toast.warning("暂无可选门店"); - return; - } - - storePickerDraft.value = [formData.storeId || ""]; - storePickerVisible.value = true; -} - -function confirmStorePicker(): void { - const storeId = String(storePickerDraft.value[0] || ""); - if (!storeId) { - return; - } - - formData.storeId = storeId; - currentStoreStore.selectStore(storeId); - storePickerVisible.value = false; -} +const canSubmit = computed(() => formData.name?.trim() && currentStoreStore.currentStoreId); async function prepareStoreScope(): Promise { if (isGlobalManager.value) { await currentStoreStore.loadStoreList(); - const queryStoreId = String(route.query.storeId || ""); - formData.storeId = currentStoreStore.storeList.some(item => item.id === queryStoreId) - ? queryStoreId - : currentStoreStore.currentStoreId; + formData.storeId = currentStoreStore.currentStoreId; return; } - const store = await currentStoreStore.loadLoginStore(); - formData.storeId = store?.id || ""; + await currentStoreStore.loadLoginStore(); + formData.storeId = currentStoreStore.currentStoreId; } async function loadDetail() { @@ -434,8 +381,8 @@ async function loadDetail() { try { const customer = await CustomerAPI.detail(id); Object.assign(formData, customer); + formData.storeId = currentStoreStore.currentStoreId; await loadCustomerTags(id); - formData.storeId = customer.storeId || formData.storeId; photoItemList.value = (customer.attachmentList || []) .filter(item => !!item.id) .map(item => ({ @@ -579,7 +526,7 @@ async function doSubmit(): Promise { Toast.warning("请填写姓名"); return; } - Toast.warning("请选择门店"); + Toast.warning("当前门店未设置"); return; } if (!validateCustomerPhotoList()) { @@ -589,6 +536,7 @@ async function doSubmit(): Promise { isSubmitting.value = true; try { const payload: Customer = { ...formData }; + payload.storeId = currentStoreStore.currentStoreId; payload.conditioningPart = selectedAreas.value; payload.introducerCustomerId = introducerCustomerId.value || ""; payload.attachmentList = buildAttachmentList(); diff --git a/src/pages/customer/CustomerList.vue b/src/pages/customer/CustomerList.vue index 704f283..826ef8b 100644 --- a/src/pages/customer/CustomerList.vue +++ b/src/pages/customer/CustomerList.vue @@ -1,14 +1,6 @@