Commit d8c5e105 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理销售订单转单角色传参错误

parent e9f54b6e
......@@ -62,6 +62,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const [payModel, setPayModel] = useState<'web'|'app'|'miniapp'|null>('web')
const currentPayRef = useRef<any>({})
const [qrCode, setQrCode] = useState('')
const [transformLoading, setTransformLoading] = useState<boolean>(false)
const { run, loading } = useHttpRequest(postOrderVendorCancel)
const { run: runPause, loading: loadingEnd } = useHttpRequest(postOrderVendorTerminate)
......@@ -246,17 +247,19 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
}
const handleSubmitTransform = () => {
resetRoleSelect()
setTransformLoading(true)
transformActions.submit(values => {
transformRef.current.setVisible(false)
const { roleId, orders } = values
postOrderVendorTransfer({ roleId, orderIds: orders.map(item => item.orderId)}).then(res => {
if(res.code === 1000) {
setSelectedRowKeys([])
resetRoleSelect()
transformRef.current.setVisible(false)
setTimeout(() => {
ref.current.reload()
}, 800)
}
setTransformLoading(false)
})
})
}
......@@ -481,6 +484,9 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
confirm={handleSubmitTransform}
cancel={resetRoleSelect}
actions={transformActions}
modalProps={{
confirmLoading: transformLoading
}}
schema={{
type: 'object',
properties: {
......
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