Commit 1281ab95 authored by GuanHua's avatar GuanHua

feat:有合同流程的新增订单添加合同id字段

parent f93466ce
......@@ -50,7 +50,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
const [contractInfo, setContractInfo] = useState<any>()
const [electronicContractId, setElectronicContractId] = useState<number>()
const [agreeSingLoading, setAgreeSignLoading] = useState<boolean>(false)
const [btnDisabled, setBtnDisable] = useState<boolean>(false)
const [btnDisabled] = useState<boolean>(false)
useEffect(() => {
if (!userInfo) {
......@@ -260,7 +260,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
/**
* 提交订单
*/
const submitOrder = () => {
const submitOrder = (signatureLogId?: number) => {
let params: any = {
orderModel: getOrderMode(), // 下单模式
needTheInvoice: needTheInvoice ? 1 : 0,
......@@ -321,6 +321,10 @@ const Order: React.FC<OrderPropsType> = (props) => {
params.productType = (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) ? 2 : 1
}
if(signatureLogId) {
params.signatureLogId = signatureLogId
}
setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => {
if (res.code === 1000) {
......@@ -386,7 +390,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
const handleSignModalConfirm = () => {
let param = {
contractTemplateId: electronicContractId,
orderId: new Date().getTime(),
contractName: contractInfo.contractName,
contractUrl: contractInfo.contractUrl,
}
......@@ -414,7 +417,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
if (res.code === 1000) {
if (res.data.state === 4) {
clearTimeout(timer)
submitOrder()
submitOrder(signatureLogId)
} else {
timer = setTimeout(() => {
if (checkoutCount < 20) {
......
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