Commit b2704b26 authored by 许佳敏's avatar 许佳敏

Merge branch 'fix0318' into 'v2-220318'

fix: 处理销售订单取消订单传参id异常 See merge request linkseeks-design/pro-platform!3
parents 6367416c 25748335
......@@ -72,6 +72,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const serversRoles = roles.filter(item => item['roleType'] === MEMBER_ROLE_TYPE_SERVICE_CONSUMER)
const { token } = (getAuth() || {})
const fetchParams = useRef<any>({})
const cancelId = useRef()
const loadingTableData = (params) => {
fetchParams.current = {...params}
......@@ -81,7 +82,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
// 提交取消
const handleSubmit = () => {
destroyActions.submit().then(async ({values}: any) => {
const result = await run({ orderId: values.id, reason: values.cancelReason })
const result = await run({ orderId: values.id || cancelId.current, reason: values.cancelReason })
if (result.code === 1000) {
destroyActions.reset()
destoryRef.current.setVisible(false)
......@@ -170,6 +171,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const handleCancel = (r) => {
destoryRef.current.setVisible(true)
destroyActions.setFieldValue('id', r.orderId)
cancelId.current = r.orderId
}
const handleSuspend = (r) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment