feat:优化了门店部门财务功能,新增开票功能
This commit is contained in:
@@ -3,7 +3,7 @@ import { onMounted, ref } from 'vue';
|
||||
|
||||
import { Page } from '@vben/common-ui';
|
||||
|
||||
import { Button, Card, Input, InputNumber, message, Radio, Space, Switch, Tabs, Tag } from 'ant-design-vue';
|
||||
import { Button, Card, Checkbox, Input, InputNumber, message, Radio, Space, Switch, Tabs, Tag } from 'ant-design-vue';
|
||||
|
||||
import type { QuickDiscountOption } from '#/utils/pricePercentAdjust';
|
||||
|
||||
@@ -37,6 +37,8 @@ const logisticsShowWhNameUser = ref(false);
|
||||
const logisticsShowWhNameClinic = ref(true);
|
||||
/** 业务员是否允许编辑/改价/配置所属诊所(默认否) */
|
||||
const salespersonStoreEditEnabled = ref(false);
|
||||
/** 开票通知渠道:subscribe / sms,默认仅订阅消息 */
|
||||
const invoiceNoticeChannels = ref<string[]>(['subscribe']);
|
||||
|
||||
function readStoredTab() {
|
||||
const stored = localStorage.getItem(TAB_STORAGE_KEY);
|
||||
@@ -45,7 +47,8 @@ function readStoredTab() {
|
||||
stored === 'input_audit' ||
|
||||
stored === 'miniprogram' ||
|
||||
stored === 'logistics' ||
|
||||
stored === 'salesperson'
|
||||
stored === 'salesperson' ||
|
||||
stored === 'invoice_notice'
|
||||
) {
|
||||
activeKey.value = stored;
|
||||
}
|
||||
@@ -110,6 +113,22 @@ async function load() {
|
||||
if (row.config_key === 'salesperson_store_edit_enabled') {
|
||||
salespersonStoreEditEnabled.value = parseBoolConfig(row.config_value, false);
|
||||
}
|
||||
if (row.config_key === 'invoice_notice_channels') {
|
||||
let channels: unknown = row.config_value;
|
||||
if (typeof channels === 'string') {
|
||||
try {
|
||||
channels = JSON.parse(channels);
|
||||
} catch {
|
||||
channels = ['subscribe'];
|
||||
}
|
||||
}
|
||||
if (Array.isArray(channels) && channels.length) {
|
||||
invoiceNoticeChannels.value = channels.map(String).filter((c) => c === 'subscribe' || c === 'sms');
|
||||
}
|
||||
if (!invoiceNoticeChannels.value.length) {
|
||||
invoiceNoticeChannels.value = ['subscribe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
@@ -167,6 +186,16 @@ async function handleSave() {
|
||||
description: '允许业务员编辑/改价/配置所属诊所',
|
||||
sort: 300,
|
||||
},
|
||||
{
|
||||
config_key: 'invoice_notice_channels',
|
||||
config_value: JSON.stringify(
|
||||
invoiceNoticeChannels.value.length ? invoiceNoticeChannels.value : ['subscribe'],
|
||||
),
|
||||
value_type: 'json',
|
||||
config_group: 'invoice',
|
||||
description: '开票通知渠道:subscribe订阅消息 / sms短信',
|
||||
sort: 200,
|
||||
},
|
||||
]);
|
||||
message.success('保存成功');
|
||||
} finally {
|
||||
@@ -271,6 +300,19 @@ onMounted(() => {
|
||||
/>
|
||||
</div>
|
||||
</Tabs.TabPane>
|
||||
|
||||
<Tabs.TabPane key="invoice_notice" tab="开票通知">
|
||||
<div class="py-4">
|
||||
<div class="mb-2 font-medium">患者开票通知渠道</div>
|
||||
<div class="mb-2 text-sm text-gray-500">
|
||||
受理与开票完成时按所选渠道发送;可多选(全选)。默认仅小程序订阅消息。
|
||||
</div>
|
||||
<Checkbox.Group v-model:value="invoiceNoticeChannels">
|
||||
<Checkbox value="subscribe">小程序订阅消息</Checkbox>
|
||||
<Checkbox value="sms">短信</Checkbox>
|
||||
</Checkbox.Group>
|
||||
</div>
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
|
||||
<div class="mt-4">
|
||||
|
||||
Reference in New Issue
Block a user