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
linweijiong
jinfa-platform
Commits
e2a14177
Commit
e2a14177
authored
Aug 26, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 对接中止申请相关
parent
88a9bc4c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
10 deletions
+128
-10
index.tsx
...pages/afterService/exchangeManage/exchangeQuery/index.tsx
+64
-5
index.tsx
src/pages/afterService/returnManage/returnQuery/index.tsx
+64
-5
No files found.
src/pages/afterService/exchangeManage/exchangeQuery/index.tsx
View file @
e2a14177
...
...
@@ -2,14 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-13 15:27:46
* @LastEditTime: 2021-0
8-26 11:14:09
* @Description: 换货申请单查询
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
}
from
'antd'
;
import
{
ClockCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
Card
,
Badge
,
Button
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
...
@@ -20,6 +17,11 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
coverColFiltersItem
}
from
'@/utils'
;
import
{
EXCHANGE_INNER_STATUS_CONFIRM_SUCCESS
,
EXCHANGE_INNER_STATUS_CONFIRM_FAILED
,
EXCHANGE_INNER_STATUS_FINISHED
,
}
from
'@/constants/afterService'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
...
...
@@ -28,12 +30,17 @@ import {
EXCHANGE_OUTER_STATUS_TAG_MAP
,
EXCHANGE_INNER_STATUS_BADGE_MAP
,
}
from
'../../constants'
;
import
StopModal
,
{
ValuesType
}
from
'../../components/StopModal'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
ExchangeQuery
:
React
.
FC
=
()
=>
{
const
[
stopModalVisible
,
setStopModalVisible
]
=
useState
(
false
);
const
[
stopModalSubmitLoading
,
setStopModalSubmitLoading
]
=
useState
(
false
);
const
ref
=
useRef
<
any
>
({});
const
currentRecord
=
useRef
<
number
>
(
0
);
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -84,6 +91,27 @@ const ExchangeQuery: React.FC = () => {
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
EXCHANGE_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
||
'#606266'
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
{
(
record
.
innerStatus
>=
EXCHANGE_INNER_STATUS_CONFIRM_SUCCESS
&&
record
.
innerStatus
<=
EXCHANGE_INNER_STATUS_FINISHED
&&
record
.
innerStatus
!==
EXCHANGE_INNER_STATUS_CONFIRM_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handleStop
(
record
.
replaceId
)
}
>
终止
</
Button
>
)
}
</>
),
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
...
...
@@ -143,6 +171,30 @@ const ExchangeQuery: React.FC = () => {
return
{};
};
const
handleVisibleStopModal
=
(
flag
?:
boolean
)
=>
{
setStopModalVisible
(
!!
flag
);
};
const
handleStop
=
(
recordId
:
number
)
=>
{
currentRecord
.
current
=
recordId
;
handleVisibleStopModal
(
true
);
};
const
handleStopModalSubmit
=
(
values
:
ValuesType
)
=>
{
setStopModalSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsStopReturnGoods
({
dataId
:
currentRecord
.
current
,
remark
:
values
.
remark
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
handleVisibleStopModal
(
false
);
}
}).
finally
(()
=>
{
setStopModalSubmitLoading
(
false
);
});
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -174,6 +226,13 @@ const ExchangeQuery: React.FC = () => {
}
/>
</
Card
>
<
StopModal
visible=
{
stopModalVisible
}
onClose=
{
()
=>
handleVisibleStopModal
(
false
)
}
onSubmit=
{
handleStopModalSubmit
}
submitLoading=
{
stopModalSubmitLoading
}
/>
</
PageHeaderWrapper
>
);
};
...
...
src/pages/afterService/returnManage/returnQuery/index.tsx
View file @
e2a14177
...
...
@@ -2,14 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
7-30 13:45:0
7
* @LastEditTime: 2021-0
8-26 11:05:5
7
* @Description: 退货申请单查询
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
}
from
'antd'
;
import
{
ClockCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
Card
,
Badge
,
Button
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
...
@@ -20,6 +17,11 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
coverColFiltersItem
}
from
'@/utils'
;
import
{
RETURN_INNER_STATUS_CONFIRM_SUCCESS
,
RETURN_INNER_STATUS_FINISHED
,
RETURN_INNER_STATUS_CONFIRM_FAILED
,
}
from
'@/constants/afterService'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
...
...
@@ -28,12 +30,17 @@ import {
RETURN_OUTER_STATUS_TAG_MAP
,
RETURN_INNER_STATUS_BADGE_MAP
,
}
from
'../../constants'
;
import
StopModal
,
{
ValuesType
}
from
'../../components/StopModal'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
ReturnQuery
:
React
.
FC
=
()
=>
{
const
[
stopModalVisible
,
setStopModalVisible
]
=
useState
(
false
);
const
[
stopModalSubmitLoading
,
setStopModalSubmitLoading
]
=
useState
(
false
);
const
ref
=
useRef
<
any
>
({});
const
currentRecord
=
useRef
<
number
>
(
0
);
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -89,6 +96,27 @@ const ReturnQuery: React.FC = () => {
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
RETURN_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
||
'#606266'
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
{
(
record
.
innerStatus
>=
RETURN_INNER_STATUS_CONFIRM_SUCCESS
&&
record
.
innerStatus
<=
RETURN_INNER_STATUS_FINISHED
&&
record
.
innerStatus
!==
RETURN_INNER_STATUS_CONFIRM_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handleStop
(
record
.
returnId
)
}
>
终止
</
Button
>
)
}
</>
),
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
...
...
@@ -148,6 +176,30 @@ const ReturnQuery: React.FC = () => {
return
{};
};
const
handleVisibleStopModal
=
(
flag
?:
boolean
)
=>
{
setStopModalVisible
(
!!
flag
);
};
const
handleStop
=
(
recordId
:
number
)
=>
{
currentRecord
.
current
=
recordId
;
handleVisibleStopModal
(
true
);
};
const
handleStopModalSubmit
=
(
values
:
ValuesType
)
=>
{
setStopModalSubmitLoading
(
true
);
PublicApi
.
postAsReturnGoodsStopReturnGoods
({
dataId
:
currentRecord
.
current
,
remark
:
values
.
remark
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
handleVisibleStopModal
(
false
);
}
}).
finally
(()
=>
{
setStopModalSubmitLoading
(
false
);
});
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -179,6 +231,13 @@ const ReturnQuery: React.FC = () => {
}
/>
</
Card
>
<
StopModal
visible=
{
stopModalVisible
}
onClose=
{
()
=>
handleVisibleStopModal
(
false
)
}
onSubmit=
{
handleStopModalSubmit
}
submitLoading=
{
stopModalSubmitLoading
}
/>
</
PageHeaderWrapper
>
);
};
...
...
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