✨ 导入运单支持未结算整批删除,结算导入运输方式取业务字典
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1378,22 +1378,18 @@ const confirmImport = async () => {
|
||||
|
||||
const loadTransportTypeOptions = async () => {
|
||||
try {
|
||||
// 运输方式取业务字典 transport_type 的字典名称(dictValue),不写死枚举
|
||||
const response = await getDictionary({ code: 'transport_type' });
|
||||
const list = unwrapData(response) || [];
|
||||
transportTypeOptions.value = (Array.isArray(list) ? list : [])
|
||||
.map(item => {
|
||||
const label = item.dictValue || item.label || item.name || '';
|
||||
const value = item.dictValue || item.dictKey || item.value || label;
|
||||
return label ? { label, value } : null;
|
||||
const label = String(item.dictValue || item.label || item.name || '').trim();
|
||||
if (!label || String(item.dictKey) === '-1') return null;
|
||||
return { label, value: label };
|
||||
})
|
||||
.filter(Boolean);
|
||||
} catch (error) {
|
||||
transportTypeOptions.value = [
|
||||
{ label: '公路运输', value: '公路运输' },
|
||||
{ label: '铁路运输', value: '铁路运输' },
|
||||
{ label: '水路运输', value: '水路运输' },
|
||||
{ label: '航空运输', value: '航空运输' },
|
||||
];
|
||||
transportTypeOptions.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user