1. 配送仓库
This commit is contained in:
15
apps/web-antd/src/utils/formatStoreNameWithHu.ts
Normal file
15
apps/web-antd/src/utils/formatStoreNameWithHu.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 在线处方诊所名追加「(互)」:is_online 为 1/2/3(问诊/复诊等),线下 0 不加
|
||||
*/
|
||||
export function formatStoreNameWithHu(
|
||||
storeName: string | null | undefined,
|
||||
isOnline: number | string | null | undefined,
|
||||
): string {
|
||||
const name = String(storeName ?? '').trim();
|
||||
if (!name) return '';
|
||||
const online = Number(isOnline);
|
||||
if (online === 1 || online === 2 || online === 3) {
|
||||
return name.endsWith('(互)') ? name : `${name}(互)`;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
Reference in New Issue
Block a user