1
0

feat(frontend): 优化页面样式,更现代化

This commit is contained in:
2024-12-20 16:48:59 +08:00
parent 74b0638a07
commit 615edb57b8
7 changed files with 663 additions and 562 deletions

View File

@@ -1,6 +1,5 @@
import {
apiGet,
checkerOnly,
checkOverMapping,
checkTypeMapping,
crudCommonOptions,
@@ -13,134 +12,128 @@ import {authenticationDetailDialog, confirmationDetailDialog} from "../../compon
import {wareDetailDialog} from "../../components/ware/dialog-ware.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'),
},
{
visibleOn: `\${type === 'MARKET' && state === 'CHECKING'}`,
type: 'action',
label: '处理',
level: 'link',
...wareDetailDialog(
'parameters.wareId',
[
{
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 === 'MARKET' && state !== NORMAL}`,
type: 'action',
label: '查看',
level: 'link',
...wareDetailDialog('parameters.wareId'),
},
]),
],
},
],
}
return [
{
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'),
},
{
visibleOn: `\${type === 'MARKET' && state === 'CHECKING'}`,
type: 'action',
label: '处理',
level: 'link',
...wareDetailDialog(
'parameters.wareId',
[
{
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 === 'MARKET' && state !== NORMAL}`,
type: 'action',
label: '查看',
level: 'link',
...wareDetailDialog('parameters.wareId'),
},
]),
],
},
]
}