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
196102a5
Commit
196102a5
authored
Aug 20, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 删除无用的逻辑
parent
ad9c447f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
240 deletions
+26
-240
verify.tsx
...vice/exchangeApplication/exchangePrConfirmBack/verify.tsx
+13
-139
verify.tsx
...erService/exchangeManage/exchangePrConfirmBack/verify.tsx
+13
-101
No files found.
src/pages/afterService/exchangeApplication/exchangePrConfirmBack/verify.tsx
View file @
196102a5
import
React
,
{
useState
}
from
'react'
;
import
{
Button
,
Space
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
,
RollbackOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 15:35:34
* @Description:
*/
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
}
from
'@/constants/afterService'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
{
confirm
}
=
Modal
;
const
ExchangePrConfirmBackVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
handleSubmit
=
(
info
)
=>
{
if
(
!
id
)
{
return
;
}
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您还有未退货发货的商品,是否确认全部退货发货都已完成?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
+
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认全部退货发货单已收到回单?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
+
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
}
};
const
handleDeliverAgain
=
(
info
)
=>
{
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您商品都已退货发货,是否确认还需要继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsContinueReturnDeliveryGoods
({
dataId
:
+
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsContinueReturnDeliveryGoods
({
dataId
:
+
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
}
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
detailInfo
=>
(
<
Space
>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleSubmit
(
detailInfo
)
}
>
确认全部退货发货单已收到回单
</
Button
>
<
Button
type=
"default"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
handleDeliverAgain
(
detailInfo
)
}
>
继续退货发货
</
Button
>
</
Space
>
)
}
target=
"/memberCenter/afterService/exchangeApplication/exchangePrConfirmBack"
isEditRefundDeliver
/>
</>
<
DetailInfo
id=
{
id
}
target=
"/memberCenter/afterService/exchangeApplication/exchangePrConfirmBack"
isEditRefundDeliver
/>
);
};
...
...
src/pages/afterService/exchangeManage/exchangePrConfirmBack/verify.tsx
View file @
196102a5
import
React
,
{
useState
}
from
'react'
;
import
{
Button
,
Space
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
,
RollbackOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 15:36:01
* @Description:
*/
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
{
confirm
}
=
Modal
;
const
ExchangePrConfirmBackVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
(
info
)
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmAllReplaceGoodsReceipt
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleDeliverAgain
=
(
info
)
=>
{
if
(
info
&&
info
.
replaceDeliveryGoodsList
&&
info
.
replaceDeliveryGoodsList
.
length
)
{
// 未换货发货数量全部小于或等于 0 时
if
(
info
.
replaceDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您商品都已换货发货,是否确认还需要继续换货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsContinueReplaceDeliveryGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
// 未换货发货数量有大于 0 时
if
(
info
.
replaceDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否继续换货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsContinueReplaceDeliveryGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
}
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
detailInfo
=>
(
<
Space
>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleSubmit
(
detailInfo
)
}
loading=
{
submitLoading
}
>
确认全部换货发货单已收到回单
</
Button
>
<
Button
type=
"default"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
handleDeliverAgain
(
detailInfo
)
}
>
继续换货发货
</
Button
>
</
Space
>
)
}
target=
"/memberCenter/afterService/exchangeManage/exchangePrConfirmBack"
isEditExchangeDeliver
/>
</>
<
DetailInfo
id=
{
id
}
target=
"/memberCenter/afterService/exchangeManage/exchangePrConfirmBack"
isEditExchangeDeliver
/>
);
};
...
...
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