feat(c3): record/abnormal 权限码/错误码/APIS

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
liuyun 2026-10-15 00:19:38 +08:00
parent 66da809a2e
commit 71b9155ccf
3 changed files with 26 additions and 1 deletions

View File

@ -50,6 +50,14 @@ export const ErrorCodes = {
ORDER_NOT_FOUND: 44003, ORDER_NOT_FOUND: 44003,
ORDER_CONFLICT: 44004, ORDER_CONFLICT: 44004,
ORDER_STATUS_INVALID: 44005, ORDER_STATUS_INVALID: 44005,
// 服务机构端·履约留痕/异常(45)
RECORD_NOT_FOUND: 45001,
RECORD_ORDER_INVALID: 45002,
RECORD_STATUS_INVALID: 45003,
RECORD_PHOTO_REQUIRED: 45004, // 必拍未拍(3001)
RECORD_MD5_DUP: 45005,
ABNORMAL_NOT_FOUND: 45006,
PREPAID_CARRYOVER_INVALID: 45007,
} as const; } as const;
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes]; export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];

View File

@ -68,7 +68,11 @@ export const Permissions = {
elder: { list: 'elder:list', detail: 'elder:detail', create: 'elder:create', update: 'elder:update', statusChange: 'elder:status-change', import: 'elder:import', svcSave: 'elder:svc-save' }, elder: { list: 'elder:list', detail: 'elder:detail', create: 'elder:create', update: 'elder:update', statusChange: 'elder:status-change', import: 'elder:import', svcSave: 'elder:svc-save' },
plan: { create: 'plan:create', change: 'plan:change', detail: 'plan:detail', confirm: 'plan:confirm' }, plan: { create: 'plan:create', change: 'plan:change', detail: 'plan:detail', confirm: 'plan:confirm' },
order: { generate: 'order:generate', assign: 'order:assign', reassign: 'order:reassign', cancel: 'order:cancel', detail: 'order:detail', today: 'order:today' }, order: { generate: 'order:generate', assign: 'order:assign', reassign: 'order:reassign', cancel: 'order:cancel', detail: 'order:detail', today: 'order:today' },
record: { checkin: 'record:checkin', checkout: 'record:checkout', itemSave: 'record:item-save', photoUpload: 'record:photo-upload', detail: 'record:detail' }, record: {
checkin: 'record:checkin', itemSave: 'record:item-save', photoUpload: 'record:photo-upload',
checkout: 'record:checkout', offlineSync: 'record:offline-sync', detail: 'record:detail',
list: 'record:list', prepaidList: 'record:prepaid-list', prepaidCarryover: 'record:prepaid-carryover',
},
abnormal: { report: 'abnormal:report', list: 'abnormal:list', handle: 'abnormal:handle' }, abnormal: { report: 'abnormal:report', list: 'abnormal:list', handle: 'abnormal:handle' },
qc: { pendingList: 'qc:pending-list', detail: 'qc:detail', pass: 'qc:pass', return: 'qc:return', exceptionLink: 'qc:exception-link' }, qc: { pendingList: 'qc:pending-list', detail: 'qc:detail', pass: 'qc:pass', return: 'qc:return', exceptionLink: 'qc:exception-link' },
export: { export: 'export:export' }, export: { export: 'export:export' },

View File

@ -110,6 +110,18 @@ export const APIS: { code: string; name: string; method: string; path: string; p
{ code: Permissions.order.detail, name: '工单详情', method: 'GET', path: '/api/v1/order/:id', parent: 'schedule' }, { code: Permissions.order.detail, name: '工单详情', method: 'GET', path: '/api/v1/order/:id', parent: 'schedule' },
{ code: Permissions.order.today, name: '今日任务', method: 'GET', path: '/api/v1/order/today', parent: 'schedule' }, { code: Permissions.order.today, name: '今日任务', method: 'GET', path: '/api/v1/order/today', parent: 'schedule' },
{ code: Permissions.elder.svcSave, name: '个人项目库', method: 'PUT', path: '/api/v1/elder-svc/:elderId', parent: 'elder' }, { code: Permissions.elder.svcSave, name: '个人项目库', method: 'PUT', path: '/api/v1/elder-svc/:elderId', parent: 'elder' },
// 服务机构端·履约留痕/异常(C3)
{ code: Permissions.record.checkin, name: '签到', method: 'POST', path: '/api/v1/record/checkin', parent: 'record' },
{ code: Permissions.record.itemSave, name: '保存项目', method: 'POST', path: '/api/v1/record/item/save', parent: 'record' },
{ code: Permissions.record.photoUpload, name: '上传照片', method: 'POST', path: '/api/v1/record/photo/upload', parent: 'record' },
{ code: Permissions.record.checkout, name: '签退', method: 'POST', path: '/api/v1/record/checkout', parent: 'record' },
{ code: Permissions.record.offlineSync, name: '离线补传', method: 'POST', path: '/api/v1/record/offline/sync', parent: 'record' },
{ code: Permissions.record.detail, name: '留痕详情', method: 'GET', path: '/api/v1/record/:id', parent: 'record' },
{ code: Permissions.record.list, name: '留痕列表', method: 'GET', path: '/api/v1/record', parent: 'record' },
{ code: Permissions.record.prepaidList, name: '垫付台账', method: 'GET', path: '/api/v1/record/prepaid-list', parent: 'record' },
{ code: Permissions.record.prepaidCarryover, name: '结转', method: 'POST', path: '/api/v1/record/prepaid/carryover', parent: 'record' },
{ code: Permissions.abnormal.report, name: '异常上报', method: 'POST', path: '/api/v1/abnormal', parent: 'record' },
{ code: Permissions.abnormal.list, name: '异常列表', method: 'GET', path: '/api/v1/abnormal', parent: 'record' },
]; ];
/** 按钮资源(纯前端按钮,无独立受控接口)。 */ /** 按钮资源(纯前端按钮,无独立受控接口)。 */
@ -191,6 +203,7 @@ export const DICTS: { code: string; name: string; items: { label: string; value:
{ label: '进食困难', value: 'eat_difficulty', colorType: 'warning', sort: 7 }, { label: '进食困难', value: 'eat_difficulty', colorType: 'warning', sort: 7 },
{ label: '排泄异常', value: 'excretion_abnormal', colorType: 'info', sort: 8 }, { label: '排泄异常', value: 'excretion_abnormal', colorType: 'info', sort: 8 },
{ label: '其他', value: 'other', colorType: 'info', sort: 9 }, { label: '其他', value: 'other', colorType: 'info', sort: 9 },
{ label: '未遇(扑空)', value: 'not_met', colorType: 'info', sort: 10 },
] }, ] },
{ code: 'photo_tier', name: '拍照分档', items: [ { code: 'photo_tier', name: '拍照分档', items: [
{ label: '必拍', value: 'must', colorType: 'danger', sort: 1 }, { label: '必拍', value: 'must', colorType: 'danger', sort: 1 },