Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
shenshaokai
jinfa-platform
Commits
afccbde8
Commit
afccbde8
authored
Jun 16, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改质检单B2B详情查看售后单跳转
parent
5a6dde76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
index.tsx
src/pages/quality/qualityManage/detail/index.tsx
+4
-1
index.tsx
src/pages/quality/qualitySynergy/detail/index.tsx
+30
-0
No files found.
src/pages/quality/qualityManage/detail/index.tsx
View file @
afccbde8
...
...
@@ -278,6 +278,9 @@ const QualityManageDetail = (props) => {
dataIndex: 'afterSalesNo',
width: 96,
ellipsis: true,
render: (_text, record) => <>
{(dataSource?.type === TYPE.B2B && record?.afterSalesStatus === SUCESS && record?.afterSalesId) ? <Button style={{ padding: 0 }} type='link' onClick={() => handleCheckAfter(record)}>{_text}</Button> : _text}
</>
}
] : []),
{
...
...
@@ -288,7 +291,7 @@ const QualityManageDetail = (props) => {
width: dataSource?.type === TYPE.B2B ? 180 : 160,
render: (_text, record) => <>
<Button type='link' onClick={() => handledetection(record)}>{intl.formatMessage({ id: 'quality.jianyanjilu', defaultMessage: '检验记录' })}</Button>
{(
dataSource?.type === TYPE.B2B && record?.afterSalesStatus === SUCESS && record?.afterSalesId
) && <Button type='link' onClick={() => handleCheckAfter(record)}>{intl.formatMessage({ id: 'quality.zhakanshouhoudan', defaultMessage: '查看售后单' })}</Button>}
{(
PATH === 'detail' && (dataSource?.type === TYPE.B2B && record?.afterSalesStatus === SUCESS && record?.afterSalesId)
) && <Button type='link' onClick={() => handleCheckAfter(record)}>{intl.formatMessage({ id: 'quality.zhakanshouhoudan', defaultMessage: '查看售后单' })}</Button>}
{(PATH === 'detail' && showAfterBtn(record)) && <>
<Button type='link' onClick={() => handleGenerateSale(false, record)}>{intl.formatMessage({ id: 'quality.shengchengshouhoudan', defaultMessage: '生成售后单' })}</Button>
</>}
...
...
src/pages/quality/qualitySynergy/detail/index.tsx
View file @
afccbde8
...
...
@@ -18,6 +18,18 @@ enum TYPE {
SRM
}
enum
AFTER_SALE_TYPE
{
/** 换货 */
EXCHANGE
=
1
,
/** 退货 */
RETURN
,
/** 维修 */
MAINTAIN
}
/** 已生成 */
const
SUCESS
=
2
;
const
QualitySynergyDetail
=
(
props
)
=>
{
const
{
query
:
{
...
...
@@ -78,6 +90,21 @@ const QualitySynergyDetail = (props) => {
setVisible(bool)
}
/** 查看售后单 */
const handleCheckAfter = (record) => {
switch (record?.afterSaleType) {
case AFTER_SALE_TYPE.EXCHANGE:
history.push(`
/
memberCenter
/
afterService
/
exchangeApplication
/
exchangeQuery
/
detail
?
id
=
$
{
record
?.
afterSalesId
}
`)
break;
case AFTER_SALE_TYPE.RETURN:
history.push(`
/
memberCenter
/
afterService
/
returnApplication
/
returnQuery
/
detail
?
id
=
$
{
record
?.
afterSalesId
}
`)
break;
case AFTER_SALE_TYPE.MAINTAIN:
history.push(`
/
memberCenter
/
afterService
/
repairApplication
/
repairQuery
/
detail
?
id
=
$
{
record
?.
afterSalesId
}
`)
break;
}
}
/** 质检物料/商品表头 */
const columns: ColumnType<any>[] = [
...((dataSource?.type === TYPE.SRM) ? [
...
...
@@ -216,6 +243,9 @@ const QualitySynergyDetail = (props) => {
dataIndex: 'afterSalesNo',
width: 96,
ellipsis: true,
render: (_text, record) => <>
{(dataSource?.type === TYPE.B2B && record?.afterSalesStatus === SUCESS && record?.afterSalesId) ? <Button style={{ padding: 0 }} type='link' onClick={() => handleCheckAfter(record)}>{_text}</Button> : _text}
</>
}
] : []),
{
...
...
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