feat(web): 增加工单审批流结构
This commit is contained in:
@@ -187,6 +187,11 @@ export const checkTypeMapping = [
|
||||
mappingItem('授权审查', 'AUTHENTICATION', 'bg-purple-500'),
|
||||
]
|
||||
|
||||
export const checkOverMapping = [
|
||||
mappingItem('完结', 'true', 'bg-success'),
|
||||
mappingItem('进行中', 'false', 'bg-primary'),
|
||||
]
|
||||
|
||||
function api(method, url) {
|
||||
return {
|
||||
method: method,
|
||||
|
||||
@@ -59,8 +59,8 @@ useAmis(information => {
|
||||
tabs: [
|
||||
// tabOverview(),
|
||||
// tabMarket(),
|
||||
tabData(),
|
||||
tabCheck(),
|
||||
tabData(),
|
||||
tabPermissions(),
|
||||
tabUser(),
|
||||
tabSettings(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
apiGet,
|
||||
apiPost,
|
||||
checkerOnly,
|
||||
checkOverMapping,
|
||||
checkTypeMapping,
|
||||
crudCommonOptions,
|
||||
mappingField
|
||||
@@ -17,14 +17,14 @@ export function tabCheck() {
|
||||
body: [
|
||||
{
|
||||
type: 'crud',
|
||||
api: apiGet('${base}/check/list'),
|
||||
api: apiGet('${base}/check_order/list'),
|
||||
...crudCommonOptions(),
|
||||
headerToolbar: [
|
||||
'reload',
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
name: 'name',
|
||||
name: 'description',
|
||||
label: '描述',
|
||||
},
|
||||
{
|
||||
@@ -33,6 +33,12 @@ export function tabCheck() {
|
||||
align: 'center',
|
||||
...mappingField('type', checkTypeMapping)
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
...mappingField('over', checkOverMapping)
|
||||
},
|
||||
{
|
||||
label: '操作',
|
||||
width: 100,
|
||||
@@ -41,6 +47,7 @@ export function tabCheck() {
|
||||
className: 'nowrap',
|
||||
buttons: [
|
||||
{
|
||||
visibleOn: '${!over}',
|
||||
type: 'action',
|
||||
label: '处理',
|
||||
level: 'link',
|
||||
@@ -48,19 +55,17 @@ export function tabCheck() {
|
||||
'parameters.confirmationId',
|
||||
[
|
||||
{
|
||||
type: 'each',
|
||||
name: 'operations',
|
||||
items: {
|
||||
type: 'action',
|
||||
label: '${item.name}',
|
||||
level: '${item.level}',
|
||||
actionType: 'ajax',
|
||||
api: {
|
||||
...apiPost('${base}/check/operation/${item.operation}'),
|
||||
data: '${parameters}'
|
||||
}
|
||||
}
|
||||
type: 'action',
|
||||
label: '同意',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/APPLY')
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '拒绝',
|
||||
actionType: 'ajax',
|
||||
api: apiGet('${base}/check_order/operation/${checkOrderId}/REJECT')
|
||||
}
|
||||
]
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user