fix(assets): show inventory operations managers and bump v1.1.19

This commit is contained in:
shishengliang
2026-10-10 21:56:06 +08:00
parent 7dd7e67602
commit 24984fe033
11 changed files with 30 additions and 9 deletions
+1
View File
@@ -544,6 +544,7 @@ function vehicleListItem(v: Vehicle) {
subjectOrg: v.subjectOrg,
departmentName: v.departmentName,
customerManager: v.customerManager,
opsManagers: v.opsManagers || null,
brandLabel: v.brandLabel,
orgName: v.orgName,
};
+1
View File
@@ -199,6 +199,7 @@ test('transforms database rows without changing the route model contract', () =>
subjectOrg: '主体',
projectName: '项目',
customerManager: '经理',
opsManagers: null,
managerId: '9',
brandLabel: '现代',
});
+1
View File
@@ -255,6 +255,7 @@ export function transformRow(row: VehicleRow): Vehicle {
subjectOrg: row.主体,
projectName: row.项目名称,
customerManager: row.客户经理,
opsManagers: row.ops_managers?.trim() || null,
managerId: row.经理ID || null,
brandLabel: row.车辆品牌Label,
};
+5
View File
@@ -100,6 +100,11 @@ export const MAIN_SQL = `SELECT
NULLIF(vi.registered_ownership, '') AS 主体,
vor.project_name AS 项目名称,
vor.business_manager AS 客户经理,
(SELECT GROUP_CONCAT(
COALESCE(NULLIF(TRIM(ops.nick_name), ''), NULLIF(TRIM(ops.user_name), ''), CAST(ops.user_id AS CHAR))
ORDER BY ops.id SEPARATOR '、')
FROM vehicle_ops_manager_rel ops
WHERE ops.vehicle_id = vi.id AND ops.del_flag = '0') AS ops_managers,
CAST(COALESCE(c.business_manager_id, vi.business_id) AS CHAR) AS 经理ID
FROM vehicle_info vi
LEFT JOIN vehicle_status vs
+2
View File
@@ -1,6 +1,7 @@
import type { AbnormalMoveDetail } from '../shared/assets/abnormal-move.js';
export interface VehicleRow {
ops_managers?: string | null;
pending_delivery_id?: string | null;
pending_contract_no?: string | null;
pending_customer_name?: string | null;
@@ -42,6 +43,7 @@ export interface VehicleRow {
}
export interface Vehicle {
opsManagers?: string | null;
pendingDelivery?: { contractNo: string | null; customerName: string | null } | null;
abnormalMove?: AbnormalMoveDetail | null;
id: string;