Files
xk-doctor-wx/utils/formatStoreNameWithHu.js

13 lines
390 B
JavaScript
Raw Normal View History

/**
* 在线处方诊所名追加is_online 1/2/3线下 0 不加
*/
export function formatStoreNameWithHu(storeName, isOnline) {
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
}