Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
fe47e4b3
提交
fe47e4b3
authored
9月 16, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:签署合同未认证,跳转认证
上级
9bdaed2a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
38 行增加
和
9 行删除
+38
-9
index.tsx
src/components/order/productOrder/sureOrder/index.tsx
+38
-9
没有找到文件。
src/components/order/productOrder/sureOrder/index.tsx
浏览文件 @
fe47e4b3
...
@@ -16,15 +16,20 @@ import './index.scss';
...
@@ -16,15 +16,20 @@ import './index.scss';
import
{
ColumnsType
}
from
'antd/es/table/InternalTable'
;
import
{
ColumnsType
}
from
'antd/es/table/InternalTable'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
InterListType
}
from
'~/api/interface'
;
import
{
Inter
DataType
,
Inter
ListType
}
from
'~/api/interface'
;
import
{
mallOrderListType
}
from
'~/api/interface/orderManageType'
;
import
{
mallOrderListType
}
from
'~/api/interface/orderManageType'
;
import
{
FddInterfaceAPI
,
OrderManageAPI
}
from
'~/api'
;
import
{
FddInterfaceAPI
,
OrderManageAPI
}
from
'~/api'
;
import
IframeModal
from
'~/components/modal/iframeModal'
;
import
IframeModal
from
'~/components/modal/iframeModal'
;
import
{
decode
}
from
'js-base64'
;
import
{
decode
}
from
'js-base64'
;
import
{
UploadFile
}
from
'antd/es/upload/interface'
;
import
{
UploadFile
}
from
'antd/es/upload/interface'
;
import
{
userFddInfoType
}
from
'~/api/interface/fddInterfaceType'
;
import
{
useNavigate
}
from
'react-router-dom'
;
// 商城订单对象类型
// 商城订单对象类型
type
mallOrderItemType
=
InterListType
<
mallOrderListType
>
[
0
];
type
mallOrderItemType
=
InterListType
<
mallOrderListType
>
[
0
];
// fdd实名认证信息类型
type
fddAuthType
=
InterDataType
<
userFddInfoType
>
;
interface
selfProps
{
interface
selfProps
{
onCancel
:
()
=>
void
;
onCancel
:
()
=>
void
;
onOk
:
()
=>
void
;
onOk
:
()
=>
void
;
...
@@ -33,6 +38,7 @@ interface selfProps {
...
@@ -33,6 +38,7 @@ interface selfProps {
}
}
const
SureOrder
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onOk
,
onCancel
,
orderItem
,
type
})
=>
{
const
SureOrder
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onOk
,
onCancel
,
orderItem
,
type
})
=>
{
const
navigate
=
useNavigate
();
const
[
orderInfoForm
]
=
Form
.
useForm
<
{
const
[
orderInfoForm
]
=
Form
.
useForm
<
{
orderTotalAmount
:
number
;
orderTotalAmount
:
number
;
deliveryTime
:
string
;
deliveryTime
:
string
;
...
@@ -73,6 +79,8 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
...
@@ -73,6 +79,8 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
// 签署合同地址
// 签署合同地址
const
[
contractFileList
,
setContractFileList
]
=
useState
<
UploadFile
[]
>
([]);
const
[
contractFileList
,
setContractFileList
]
=
useState
<
UploadFile
[]
>
([]);
const
[
contractUrl
,
setContractUrl
]
=
useState
<
string
>
(
''
);
const
[
contractUrl
,
setContractUrl
]
=
useState
<
string
>
(
''
);
// fdd实名认证信息
const
[
fddAuthInfo
,
setFddAuthInfo
]
=
useState
<
fddAuthType
[
0
]
>
();
const
[
iframeModalShow
,
setIframeModalShow
]
=
useState
<
boolean
>
(
false
);
const
[
iframeModalShow
,
setIframeModalShow
]
=
useState
<
boolean
>
(
false
);
// 合同文件上传成功回调
// 合同文件上传成功回调
...
@@ -86,20 +94,35 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
...
@@ -86,20 +94,35 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
contractForm
contractForm
.
validateFields
()
.
validateFields
()
.
then
((
values
)
=>
{
.
then
((
values
)
=>
{
FddInterfaceAPI
.
uploadContract
({
if
(
fddAuthInfo
?.
entVerifyStatus
===
4
)
{
docUrl
:
values
.
contractUrl
,
FddInterfaceAPI
.
uploadContract
({
orderNo
:
orderItem
.
orderNo
,
docUrl
:
values
.
contractUrl
,
port
:
1
,
orderNo
:
orderItem
.
orderNo
,
title
:
values
.
contractTitle
,
port
:
1
,
}).
then
(({
result
})
=>
{
title
:
values
.
contractTitle
,
signContract
(
result
.
contractNo
);
}).
then
(({
result
})
=>
{
});
signContract
(
result
.
contractNo
);
});
}
else
{
message
.
warning
(
'请先完成认证'
);
setTimeout
(()
=>
{
navigate
(
'/systemManage/realNameAuth'
);
},
500
);
}
})
})
.
catch
((
error
:
any
)
=>
{
.
catch
((
error
:
any
)
=>
{
message
.
warning
(
error
?.
errorFields
[
0
]?.
errors
[
0
]);
message
.
warning
(
error
?.
errorFields
[
0
]?.
errors
[
0
]);
});
});
}
}
};
};
// 获取fdd实名认证信息
const
getAppUserFddInfo
=
()
=>
{
FddInterfaceAPI
.
getAppUserFddInfo
({
port
:
1
}).
then
(({
result
})
=>
{
if
(
result
)
{
setFddAuthInfo
(
result
.
find
((
v
)
=>
v
.
accountType
===
2
));
}
});
};
// 签署合同
// 签署合同
const
signContract
=
(
contractId
:
string
)
=>
{
const
signContract
=
(
contractId
:
string
)
=>
{
FddInterfaceAPI
.
signContract
({
contractId
,
port
:
1
}).
then
(({
result
})
=>
{
FddInterfaceAPI
.
signContract
({
contractId
,
port
:
1
}).
then
(({
result
})
=>
{
...
@@ -169,6 +192,12 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
...
@@ -169,6 +192,12 @@ const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem
);
);
}
}
},
[
orderItem
,
type
]);
},
[
orderItem
,
type
]);
useEffect
(()
=>
{
if
(
open
)
{
getAppUserFddInfo
();
}
},
[
open
]);
return
(
return
(
<
Modal
open=
{
open
}
title=
'确认订单'
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
width=
{
800
}
>
<
Modal
open=
{
open
}
title=
'确认订单'
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
width=
{
800
}
>
<
div
className=
'sure-order'
>
<
div
className=
'sure-order'
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论