Commit 1281ab95 authored by GuanHua's avatar GuanHua

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

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