Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-admin
Commits
a16f094d
Commit
a16f094d
authored
Dec 07, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缓存操作日志-商品日志
parent
60ec26fe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
171 additions
and
18 deletions
+171
-18
columns.tsx
src/pages/systemManage/operationLog/columns.tsx
+124
-11
constants.ts
src/pages/systemManage/operationLog/constants.ts
+12
-0
index.tsx
src/pages/systemManage/operationLog/index.tsx
+33
-5
schema.ts
src/pages/systemManage/operationLog/schema.ts
+2
-2
No files found.
src/pages/systemManage/operationLog/columns.tsx
View file @
a16f094d
import
React
from
'react'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
status_3
,
operation_3
}
from
'./constants'
import
{
formatTimeString
}
from
'@/utils/index'
;
const
base_columns_outer
=
[
{
title
:
'操作角色'
,
dataIndex
:
'
operationRol
e'
,
key
:
'
operationRol
e'
dataIndex
:
'
memberRoleNam
e'
,
key
:
'
memberRoleNam
e'
},
{
title
:
'状态'
,
...
...
@@ -18,13 +24,14 @@ const base_columns_outer = [
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
dataIndex
:
'createTime'
,
key
:
'createTime'
,
render
:
(
_
,
text
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
)
},
{
title
:
'备注'
,
dataIndex
:
'
remarks
'
,
key
:
'
remarks
'
dataIndex
:
'
checkRemark
'
,
key
:
'
checkRemark
'
},
]
...
...
@@ -70,8 +77,6 @@ const base_columns_inner = [
const
columns_base_1
=
[{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
}];
// 售后
const
columns_base_2
=
[{
title
:
'申请单号'
,
dataIndex
:
'applyNo'
,
key
:
'applyNo'
},
{
title
:
'售后类型'
,
dataIndex
:
'type'
,
key
:
'type'
}];
// 商品
const
columns_base_3
=
[{
title
:
'商品ID'
,
dataIndex
:
'goodsId'
,
key
:
'goodsId'
}];
// 会员
const
columns_base_4
=
[{
title
:
'会员ID'
,
dataIndex
:
'memberId'
,
key
:
'memberId'
},
{
title
:
'操作类型'
,
dataIndex
:
'operationType'
,
key
:
'operationType'
}];
// 商品询价
...
...
@@ -88,11 +93,78 @@ export const columns_outer_1 = columns_base_1.concat(base_columns_outer);
// 售后外部
export
const
columns_outer_2
=
columns_base_2
.
concat
(
base_columns_outer
);
// 商品外部
export
const
columns_outer_3
=
columns_base_3
.
concat
(
base_columns_outer
);
export
const
columns_outer_3
=
[
{
title
:
'商品ID'
,
dataIndex
:
'commodityId'
,
key
:
'commodityId'
},
{
title
:
'操作角色'
,
dataIndex
:
'memberRoleName'
,
key
:
'memberRoleName'
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
)
=>
<
StatusTag
title=
{
status_3
[
text
].
text
}
type=
{
status_3
[
text
].
type
}
/>
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
text
)
=>
operation_3
[
text
]
},
{
title
:
'操作时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
render
:
(
text
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
)
},
{
title
:
'备注'
,
dataIndex
:
'checkRemark'
,
key
:
'checkRemark'
},
];
// 会员外部
export
const
columns_outer_4
=
columns_base_4
.
concat
(
base_columns_outer
);
// 商品询价外部
export
const
columns_outer_5
=
columns_base_5
.
concat
(
base_columns_outer
);
export
const
columns_outer_5
=
[
{
title
:
'询价单号'
,
dataIndex
:
'inquiryListId'
,
key
:
'inquiryListId'
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
render
:
(
text
,
record
)
=>
<
StatusTag
title=
{
record
.
stateName
}
type=
{
'default'
}
/>
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
,
render
:
(
text
)
=>
formatTimeString
(
text
,
'YYYY-MM-DD HH:mm'
)
},
{
title
:
'备注'
,
dataIndex
:
'auditOpinion'
,
key
:
'auditOpinion'
},
];
// 采购外部
export
const
columns_outer_6
=
columns_base_6
.
concat
(
base_columns_outer
);
// 合同外部
...
...
@@ -106,7 +178,48 @@ export const columns_inner_1 = columns_base_1.concat(base_columns_inner);
// 售后内部
export
const
columns_inner_2
=
columns_base_2
.
concat
(
base_columns_inner
);
// 商品内部
export
const
columns_inner_3
=
columns_base_3
.
concat
(
base_columns_inner
);
export
const
columns_inner_3
=
[
{
title
:
'商品ID'
,
dataIndex
:
'commodityId'
,
key
:
'commodityId'
},
{
title
:
'操作角色'
,
dataIndex
:
'memberRoleName'
,
key
:
'memberRoleName'
},
{
title
:
'部门'
,
dataIndex
:
'operatorOrgName'
,
key
:
'operatorOrgName'
},
{
title
:
'职位'
,
dataIndex
:
'operatorJobTitle'
,
key
:
'operatorJobTitle'
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
key
:
'operation'
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
key
:
'operationTime'
},
{
title
:
'备注'
,
dataIndex
:
'remarks'
,
key
:
'remarks'
},
];
// 会员内部
export
const
columns_inner_4
=
columns_base_4
.
concat
(
base_columns_inner
);
// 商品询价内部
...
...
src/pages/systemManage/operationLog/constants.ts
0 → 100644
View file @
a16f094d
export
const
status_3
=
{
1
:
{
text
:
'待提交审核'
,
type
:
'warnning'
},
2
:
{
text
:
'待审核'
,
type
:
'warnning'
},
3
:
{
text
:
'审核不通过'
,
type
:
'danger'
},
4
:
{
text
:
'审核通过'
,
type
:
'success'
},
};
export
const
operation_3
=
{
1
:
'新增'
,
2
:
'修改'
,
3
:
'审核'
,
}
src/pages/systemManage/operationLog/index.tsx
View file @
a16f094d
...
...
@@ -4,6 +4,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout';
import
{
Card
,
Radio
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
getProductCommodityGetCommodityCheckRecordList
}
from
'@/services/ProductV2Api'
import
Search
from
'@/components/NiceForm/components/Search'
;
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
;
...
...
@@ -75,9 +77,9 @@ const OperationLog: React.FC = () => {
switch
(
typeState
)
{
case
1
:
_type
=
'orderNo'
;
break
;
case
2
:
_type
=
'applyNo'
;
break
;
case
3
:
_type
=
'
goods
Id'
;
break
;
case
3
:
_type
=
'
commodity
Id'
;
break
;
case
4
:
_type
=
'memberId'
;
break
;
case
5
:
_type
=
'inquiryList
No
'
;
break
;
case
5
:
_type
=
'inquiryList
Id
'
;
break
;
case
6
:
_type
=
'no'
;
break
;
case
7
:
_type
=
'contractNo'
;
break
;
case
8
:
_type
=
'id'
;
break
;
...
...
@@ -116,8 +118,34 @@ const OperationLog: React.FC = () => {
},
[
typeState
])
const
_tableKey
=
useMemo
(()
=>
{
return
`table_
${
_actionKey
}
`
},
[
_actionKey
])
return
`table_
${
_actionKey
}
_
${
extraState
}
_
${
statusState
}
`
},
[
_actionKey
,
extraState
,
statusState
])
const
fetchTableData
=
async
(
params
:
any
)
=>
{
let
_fetch
:
any
;
switch
(
typeState
)
{
case
1
:
break
;
case
2
:
break
;
case
3
:
if
(
statusState
===
1
)
{
_fetch
=
getProductCommodityGetCommodityCheckRecordList
;
}
break
;
case
4
:
break
;
case
5
:
break
;
case
6
:
break
;
case
7
:
break
;
case
8
:
break
;
default
:
break
;
}
if
(
_fetch
)
{
const
{
data
}
=
await
_fetch
(
params
);
return
data
}
return
{
data
:
[],
totalCount
:
0
}
};
return
(
<
PageHeaderWrapper
...
...
@@ -138,7 +166,7 @@ const OperationLog: React.FC = () => {
currentRef=
{
ref
}
columns=
{
_columns
}
tableProps=
{
{
rowKey
:
'id'
}
}
// fetchTableData={(params) => fetchd
ata(params)}
fetchTableData=
{
(
params
)
=>
fetchTableD
ata
(
params
)
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
...
...
src/pages/systemManage/operationLog/schema.ts
View file @
a16f094d
...
...
@@ -127,7 +127,7 @@ export const schema_3: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
goods
Id
:
{
commodity
Id
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
...
...
@@ -244,7 +244,7 @@ export const schema_5: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
inquiryList
No
:
{
inquiryList
Id
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment