Commit 7084af47 authored by 前端-许佳敏's avatar 前端-许佳敏

电子合同

parent 8deede95
......@@ -204,7 +204,7 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
const detailList = [
{ label: '对应报价单号', name: 'quotationNo', span: 8, render: text => <Link to={'/'}>{text}</Link> },
{ label: '订单摘要', name: 'orderThe', span: 8 },
{ label: '供应会员', name: 'supplyMembersName', span: 8, render: text => <Link to={'/'}>{text}</Link> },
{ label: '供应会员', name: 'supplyMembersName', span: 8 },
{ label: '下单模式', name: 'orderModel', span: 8, render: text => GlobalConfig.web.orderMode.find(v => v.value === text)?.label || '' },
{ label: '订单类型', name: 'type', span: 8, render: text => orderTypeLabel[text] },
{ label: '下单时间', name: 'createTime', span: 8, render: text => formatTimeString(text) },
......
import React from 'react'
import React, { useContext } from 'react'
import { Modal, Button } from 'antd'
import NiceForm from '@/components/NiceForm'
import { createFormActions, ISchema } from '@formily/antd'
......@@ -7,6 +7,8 @@ import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { PublicApi } from '@/services/api'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import { getAuth } from '@/utils/auth'
import { OrderDetailContext } from '../../context'
export interface OrderElectronModalProps {
currentRef: any
......@@ -105,9 +107,25 @@ const schema: ISchema = {
}
//@todo 尚未完成
const OrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
const { data } = useContext(OrderDetailContext)
const { run, loading } = useHttpRequest(PublicApi.postOrderSignatureSignContractCreate)
const createElectron = async () => {
// const contractTemplateId = schemaActions.getFieldValue('contractTemplateId')
const contractTemplateId = schemaActions.getFieldValue('contractTemplateId')
const orderNo = data.orderNo
const signMemberId = data.createMemberId
const params = {
contractTemplateId,
orderNo,
signMemberId
}
const { code, data: resData } = await PublicApi.postOrderSignatureSignContractCreate(params)
if (code === 1000) {
}
console.log(resData)
console.log(params)
}
const electronBtn = <Button style={{marginLeft: 24}} onClick={createElectron} loading={loading}>生成电子合同</Button>
return (
......
......@@ -155,7 +155,7 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
}
const renderExtra = () => {
if (!formData || page_type === SALE_ORDER_STATUS.PREVIEW_ORDER) {
if (!formData || page_type === SALE_ORDER_STATUS.PREVIEW_ORDER || page_type === SaleOrderInsideWorkState.CONFIRM_DELIVERY_ORDER) {
return null
}
let text = ''
......@@ -164,10 +164,6 @@ const CommonOrderDetail:React.FC<CommonOrderDetailProps> = (props) => {
text = '确认提交'
break;
}
case SaleOrderInsideWorkState.CONFIRM_DELIVERY_ORDER: {
text = '确认全部已发货'
break;
}
case SaleOrderInsideWorkState.CONFIRM_RECEIPT: {
text = '确认全部已回单'
break;
......
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