From b7a70ea11300cb9f24afd4b2d9ad2b80edeb48ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Wed, 26 Aug 2026 15:49:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(store):=20=E8=AF=8A=E6=89=80=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E5=85=AC=E8=B4=A6?= =?UTF-8?q?=E8=B4=A6=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编辑表单增加公账账期字段;列表开关区独立「公账账期」入口并可快捷修改,去掉业务配置重复公账开关。 --- .../src/views/system/store/api/index.ts | 8 +++ .../cells/StoreConfigTogglesCell.vue | 53 ++++++++++++++----- .../src/views/system/store/config/form.ts | 15 ++++++ .../web-antd/src/views/system/store/index.vue | 51 ++++++++++++++++-- 4 files changed, 111 insertions(+), 16 deletions(-) diff --git a/apps/web-antd/src/views/system/store/api/index.ts b/apps/web-antd/src/views/system/store/api/index.ts index 52195725..7595962a 100644 --- a/apps/web-antd/src/views/system/store/api/index.ts +++ b/apps/web-antd/src/views/system/store/api/index.ts @@ -266,6 +266,14 @@ export async function updateStorePublicAccountPayEnabled(data: { id: number }) { return requestClient.post(`${prefix}update-public-account-pay-enabled`, data); } +/** 更新诊所公账账期天数(0=跟随全局) */ +export async function updateStorePublicAccountLockDays(data: { + id: number; + public_account_lock_days: number; +}) { + return requestClient.post(`${prefix}update-public-account-lock-days`, data); +} + export async function toggleSalespersonSeePriceApi(data: { store_id: number }) { return requestClient.post('salesperson-store-config/toggle-see-price', data); } diff --git a/apps/web-antd/src/views/system/store/components/cells/StoreConfigTogglesCell.vue b/apps/web-antd/src/views/system/store/components/cells/StoreConfigTogglesCell.vue index ced5a67e..a93f7140 100644 --- a/apps/web-antd/src/views/system/store/components/cells/StoreConfigTogglesCell.vue +++ b/apps/web-antd/src/views/system/store/components/cells/StoreConfigTogglesCell.vue @@ -1,4 +1,8 @@ @@ -259,11 +283,14 @@ function handleBankCardTagClick( .config-item__label { flex-shrink: 0; min-width: 72px; - color: rgb(156 163 175); + color: hsl(var(--muted-foreground)); line-height: 1.4; } .config-item__control { + display: inline-flex; + align-items: center; + gap: 4px; min-width: 0; flex: 1; } diff --git a/apps/web-antd/src/views/system/store/config/form.ts b/apps/web-antd/src/views/system/store/config/form.ts index 8771c631..9ece5a4d 100644 --- a/apps/web-antd/src/views/system/store/config/form.ts +++ b/apps/web-antd/src/views/system/store/config/form.ts @@ -139,6 +139,21 @@ export const modalFormProps: VbenFormProps = { label: '公账支付', defaultValue: 0, }, + { + // 门店账期覆盖:0=跟随全局锁定天数;>0 按本店出账/锁店 + component: 'InputNumber', + formItemClass: 'col-span-6', + componentProps: { + min: 0, + max: 90, + precision: 0, + placeholder: '0=跟随全局', + }, + fieldName: 'public_account_lock_days', + label: '公账账期(天)', + help: '0=跟随全局锁定天数;大于 0 按本店账期(1=按日,>1=周期账单)', + defaultValue: 0, + }, { // 诊所类型(单选) component: 'RadioGroup', diff --git a/apps/web-antd/src/views/system/store/index.vue b/apps/web-antd/src/views/system/store/index.vue index bb4be23b..98aa4686 100644 --- a/apps/web-antd/src/views/system/store/index.vue +++ b/apps/web-antd/src/views/system/store/index.vue @@ -1,14 +1,14 @@