- 移除 AuthenticationRepository 和 ConfirmationRepository 中的 updateStateById 方法 - 更新 AuthenticationService 和 ConfirmationService 中的状态更新逻辑 - 修改 CheckOrder 实体,使用 State 枚举替代布尔型 over 字段 - 更新相关前端组件,适应新的审核状态
111 lines
4.9 KiB
JavaScript
111 lines
4.9 KiB
JavaScript
import {
|
|
apiGet,
|
|
checkerOnly,
|
|
checkOverMapping,
|
|
checkTypeMapping,
|
|
crudCommonOptions,
|
|
mappingField,
|
|
operationField,
|
|
stringField,
|
|
timeField,
|
|
} from "../../components/constants.js";
|
|
import {authenticationDetailDialog, confirmationDetailDialog} from "../../components/permission/dialog-permission.js";
|
|
|
|
export function tabCheck() {
|
|
return {
|
|
visibleOn: checkerOnly,
|
|
title: '审核审查',
|
|
icon: 'fa fa-shield-halved',
|
|
reload: true,
|
|
body: [
|
|
{
|
|
name: 'check_order_list',
|
|
type: 'crud',
|
|
api: apiGet('${base}/check_order/list'),
|
|
...crudCommonOptions(),
|
|
headerToolbar: [
|
|
'reload',
|
|
],
|
|
columns: [
|
|
stringField('description', '描述'),
|
|
mappingField('type', '类型', checkTypeMapping),
|
|
mappingField('state', '状态', checkOverMapping),
|
|
timeField('createdTime', '创建时间'),
|
|
stringField('createdUsername', '创建人', 100),
|
|
timeField('modifiedTime', '最后修改时间'),
|
|
stringField('modifiedUsername', '最后操作人', 100),
|
|
operationField('操作', undefined, [
|
|
{
|
|
visibleOn: `\${type === 'CONFIRMATION' && state === 'CHECKING'}`,
|
|
type: 'action',
|
|
label: '处理',
|
|
level: 'link',
|
|
...confirmationDetailDialog(
|
|
'parameters.confirmationId',
|
|
[
|
|
{
|
|
type: 'action',
|
|
label: '同意',
|
|
actionType: 'ajax',
|
|
close: true,
|
|
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
|
reload: 'check_order_list',
|
|
},
|
|
{
|
|
type: 'action',
|
|
label: '拒绝',
|
|
actionType: 'ajax',
|
|
close: true,
|
|
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
|
reload: 'check_order_list',
|
|
},
|
|
],
|
|
),
|
|
},
|
|
{
|
|
visibleOn: `\${type === 'CONFIRMATION' && state !== NORMAL}`,
|
|
type: 'action',
|
|
label: '查看',
|
|
level: 'link',
|
|
...confirmationDetailDialog('parameters.confirmationId'),
|
|
},
|
|
{
|
|
visibleOn: `\${type === 'AUTHENTICATION' && state === 'CHECKING'}`,
|
|
type: 'action',
|
|
label: '处理',
|
|
level: 'link',
|
|
...authenticationDetailDialog(
|
|
'parameters.authenticationId',
|
|
[
|
|
{
|
|
type: 'action',
|
|
label: '同意',
|
|
actionType: 'ajax',
|
|
close: true,
|
|
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY'),
|
|
reload: 'check_order_list',
|
|
},
|
|
{
|
|
type: 'action',
|
|
label: '拒绝',
|
|
actionType: 'ajax',
|
|
close: true,
|
|
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT'),
|
|
reload: 'check_order_list',
|
|
},
|
|
],
|
|
),
|
|
},
|
|
{
|
|
visibleOn: `\${type === 'AUTHENTICATION' && state !== NORMAL}`,
|
|
type: 'action',
|
|
label: '查看',
|
|
level: 'link',
|
|
...authenticationDetailDialog('parameters.authenticationId'),
|
|
},
|
|
]),
|
|
],
|
|
},
|
|
],
|
|
}
|
|
} |