Commit 8acdcc76 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents fede7d19 1cbd6c50
......@@ -15,8 +15,8 @@ interface queryProps {
const Corporate: React.FC<queryProps> = (props) => {
const { Option } = Select;
const { authType, authTypeFn, checkPayWayFn, data , updateData} = props;
const [options,setOptions] = useState<any>([])
const { authType, authTypeFn, checkPayWayFn, data, updateData } = props;
const [options, setOptions] = useState<any>([])
const [form] = Form.useForm();
const [payWay, setPayWay] = useState<number>(1); // 1.支付宝, 2.对公, 3.短信
......@@ -63,6 +63,9 @@ const Corporate: React.FC<queryProps> = (props) => {
CheckPayWay(1);
PublicApi.getManageCountryAreaGetTelCode().then(res => {
setOptions(res.data)
form.setFieldsValue({
code: res.data[0]
})
})
}, [])
......
......@@ -57,7 +57,7 @@ const PaymentCard: React.FC<Iprops> = ({
return (
<div className={style.warp_item} key={index}>
<div className={style.title}>付款比例</div>
<div className={style.proportion}>{item.payRatio}%</div>
<div className={style.proportion}>{item.payRatio ? item.payRatio : item.paidRatio}%</div>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className={style.Price}>¥{item.payAmount}</div>
{
......
/* 合同执行列表 */
import React, { useRef } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card } from 'antd';
......@@ -8,7 +8,6 @@ import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { tableListSchema } from '../schema'
import StatusTag from '@/components/StatusTag';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
......@@ -119,6 +118,7 @@ const contractexecutionList = () => {
)
}
}]
//下拉框选中值请求
const fetchOptions = (service) => {
return async function () {
const res = await service();
......@@ -142,11 +142,9 @@ const contractexecutionList = () => {
return new Promise((resolve, reject) => {
PublicApi.getContractExecutePageListByPartyA({
...params,
}).then(res => {
resolve(res.data)
})
})
}
return (
......@@ -186,5 +184,4 @@ const contractexecutionList = () => {
</PageHeaderWrapper>
)
}
export default contractexecutionList
......@@ -2,7 +2,6 @@
import React, { useEffect, useState, useRef } from 'react';
import { Modal, Form, Button, Select } from 'antd';
import style from './index.less';
import { history } from 'umi'
import { IAntdSchemaFormProps } from '@formily/antd'
const Option = Select.Option;
......
......@@ -12,9 +12,9 @@ const activeAnchorClassName = 'ant-anchor-link-active'
import moment from 'moment';
import BasicInfo from '../../components/detailCard/basic';
import PaymentCard from '../../components/detailCard/PaymentCard'
import DetailedList from './detailedList';
import DrawerModal from './DrawerModal';
import PopModal from './PopModal';
import DetailedList from './components/DetailedList';
import DrawerModal from './components/DrawerModal';
import PopModal from './components/PopModal';
const PAGE_SIZE = 8;
const Details = (props: any) => {
......
/* 流转记录的组建 */
import React, { useState, useRef } from 'react';
import {
Radio,
Table,
Typography
} from 'antd';
import { IAntdSchemaFormProps } from '@formily/antd'
import { PublicApi } from '@/services/api';
const { Text } = Typography;
import { StandardTable } from 'god';
export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */
......@@ -65,7 +63,7 @@ const circulation: React.FC<Iprops> = ({
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
流转记录
</div>
</div>
<div className='ant-card-extra'>
<Radio.Group defaultValue={listIndex} onChange={(e) => handleBatchChange(e)}>
<Radio.Button value="1">外部流转</Radio.Button>
......
......@@ -6,7 +6,6 @@ import {
Drawer,
Space,
Typography,
Table,
} from 'antd';
import { IAntdSchemaFormProps } from '@formily/antd'
......@@ -14,44 +13,49 @@ import { StandardTable } from 'god';
import style from '../index.less'
import { ColumnType } from 'antd/lib/table/interface';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
export interface Iprops extends IAntdSchemaFormProps {
popupshow: any,
basicInfo?: any,
setDrawerModal: Function
basicData?: any,
setDrawerModal: Function,
applyId: any
}
const { Text } = Typography;
const PopupDrawer: React.FC<Iprops> = ({
popupshow,
basicInfo,
setDrawerModal
basicData,
setDrawerModal,
applyId
}) => {
console.log(popupshow)
console.log(basicData, applyId)
const ref = useRef<any>({});
const [payAmount, setpayAmount] = useState(0); //付款金额
const [orderAmount, setorderAmount] = useState(0) // 订单金额
const columns: ColumnType<any>[] = [{
title: '单据号/摘要',
dataIndex: 'applyNo',
dataIndex: 'orderNO',
align: 'left',
render: (text: any, record: any) => {
return (
<div>
<EyePreview
url={`/memberCenter/contract/funds/levelpayment/details?applyId=${record.id}&type=PageToBeExamineOne`}
url="button"
>
{text}
</EyePreview>
<p>{record.applyAbstract}</p>
<p>{record.orderAbstract}</p>
</div>
);
},
}, {
title: '单据类型',
dataIndex: 'orderTime',
dataIndex: 'orderTypeName',
align: 'left',
}, {
title: '单据时间',
dataIndex: 'payeeMemberName',
dataIndex: 'orderTime',
align: 'left',
},
......@@ -61,26 +65,26 @@ const PopupDrawer: React.FC<Iprops> = ({
align: 'left',
},
{
dataIndex: 'contractNo',
dataIndex: 'orderAmount',
title: (
<Space direction='vertical'>
<Text>单据金额</Text>
<Text>合计: ¥9999</Text>
<Text>合计: ¥{orderAmount}</Text>
</Space>
),
},
{
title: '含税/税率',
dataIndex: 'payeeMemberName',
dataIndex: 'isHasTaxName',
align: 'left'
},
{
dataIndex: 'contractNo',
dataIndex: 'payAmount',
align: 'left',
title: (
<Space direction='vertical'>
<Text>付款金额</Text>
<Text>合计: ¥9999</Text>
<Text>合计: ¥{payAmount}</Text>
</Space>
),
},
......@@ -88,14 +92,23 @@ const PopupDrawer: React.FC<Iprops> = ({
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
// PublicApi.getContractApplyAmountPageToBeExamineOne({
// ...params,
// }).then(res => {
resolve([])
// })
PublicApi.getContractExecuteExecuteInfoPayDetailInfoPagePayDetail({
applyId,
...params,
}).then(res => {
if (res.code === 1000) {
resolve(res.data)
let payAmount = 0, orderAmount = 0;
res.data.data.map((item: any) => {
payAmount += item.payAmount;
orderAmount += item.orderAmount
})
console.log(payAmount, orderAmount)
setpayAmount(payAmount)
setorderAmount(orderAmount)
}
})
})
}
......@@ -127,35 +140,36 @@ const PopupDrawer: React.FC<Iprops> = ({
<div className={style.memuItem}>
<div className={style.menuCard}>
<div className={style.menulabel}>收款账户:</div>
<div className={style.card}>广州白马皮具交易中心</div>
<div className={style.card}>{basicData.payeeName}</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>银行账号:</div>
<div className={style.card}>622202 110868 11424 45</div>
<div className={style.card}>{basicData.bankAccount}</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>开户行:</div>
<div className={style.card}>中国建设银行广州市分行营业部</div>
<div className={style.card}>{basicData.bankDeposit}</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>付款阶段:</div>
<div className={style.card}>合同中期款</div>
<div className={style.card}>{basicData.payStage}</div>
</div>
</div>
<div className={style.memuItem}>
<div className={style.menuCard}>
<div className={style.menulabel}>付款金额:</div>
<div className={style.card}>¥ 36.000.00</div>
<div className={style.card}>¥ {basicData.payAmount}</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>付款时间:</div>
<div className={style.card}>2020-08-25 08:58</div>
<div className={style.card}>{basicData.payTime}</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>付款方式:</div>
<div className={style.card}>账期:30天</div>
{/* {basicData.payParam} */}
<div className={style.card}>{basicData.payWay == 1 ? '账期' : basicData.payWay == 2 ? '月结' : '现结'} </div>
</div>
</div>
<div className={style.memuItem}>
......@@ -164,25 +178,28 @@ const PopupDrawer: React.FC<Iprops> = ({
<div className={style.card}>线下支付方式:线下支付线上确认</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>发票编号:</div>
<div className={style.card}>40122826</div>
</div>
<div className={style.menuCard}>
<div className={style.menulabel}>开票日期:</div>
<div className={style.card}>2020-08-25</div>
<div className={style.menulabel}>发票编号(开票日期):</div>
{
basicData.invoiceProveVOList.map((item: any) => {
return (
<div className={style.card}>{item.number} + '-'+{item.invoiceDate}</div>
)
})
}
</div>
</div>
</div>
<div className={style.PopupTitle}>付款明细</div>
<Table
<StandardTable
rowKey="id"
style={{
width: "100%"
}}
pagination={false}
columns={columns}
ref={ref}
// fetchTableData={(params: any) => fetchData(params)}
fetchTableData={(params: any) => fetchData(params)}
/>
</Drawer>
......@@ -190,7 +207,10 @@ const PopupDrawer: React.FC<Iprops> = ({
}
PopupDrawer.defaultProps = {
popupshow: false,
basicInfo: {},
basicData: {
invoiceProveVOList: [],
},
applyId: ''
}
export default PopupDrawer;
......@@ -6,10 +6,10 @@ import {
Typography,
message,
} from 'antd';
import style from './index.less';
import style from '../index.less';
import { IAntdSchemaFormProps } from '@formily/antd'
import { PublicApi } from '@/services/api';
import CrossSellProducts from '../components/modal/crossSellProducts';
import CrossSellProducts from '../../components/modal/crossSellProducts';
const { Text } = Typography;
export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */
......
......@@ -8,7 +8,7 @@ import {
Space
} from 'antd';
import { PublicApi } from '@/services/api';
import style from './index.less';
import style from '../index.less';
import { IAntdSchemaFormProps } from '@formily/antd'
import EyePreview from '@/components/EyePreview';
import moment from 'moment';
......
......@@ -8,13 +8,13 @@ import { history } from 'umi'
import Basic from '../../components/detailCard/basic'
import PaymentCard from '../../components/detailCard/PaymentCard'
const { TextArea } = Input;
import StepListItem from './record';
import PurchaseList from './purchaseList'
import CirculationList from './circulationList'
import DetailedList from './detailedList'
import SituationList from './situationList'
import StepListItem from './components/Record'; // 流转进度条
import PurchaseList from './components/PurchaseList' // 关联商品组建
import CirculationList from './components/CirculationList' // 流转列表
// import DetailedList from './detailedList'
import SituationList from './components/SituationList' //付款明细
import { Download } from '../../constants/utils'
import PopupDrawer from './components/Popup'
import PopupDrawer from './components/Popup' // 显示隐藏
import {
FileWordFilled
} from '@ant-design/icons'
......@@ -27,7 +27,6 @@ const Details = (props: any) => {
const [contractNo, setcontractNo] = useState();
/* 合同id */
const { location: { query: { contractId, type } } } = props;
console.log(type, 'type')
const [currLink, setCurrLink] = useState(activeAnchorClassName)
/**
* 渲染信息
......@@ -59,12 +58,14 @@ const Details = (props: any) => {
const [contractAbstract, setcontractAbstract] = useState('');
const [tabPane, settabPane] = useState([])
const [Popup, setPopup] = useState<any>(false);
const [basicData, setbasicData] = useState<any>({}) // 合同付款基本信息
const [basicData, setbasicData] = useState<any>({
invoiceProveVOList: [],
}) // 合同付款基本信息
/* 获取详情的数据 */
const getDetail = () => {
PublicApi.getContractCoordinationGetDetail({ contractId }).then(res => {
if (res.code === 1000) {
let { basics, outerTaskStepList, innerTaskStepList, payPlanList, contractText } = res.data
let { basics, outerTaskStepList, innerTaskStepList, applyAmountOrderList, contractText } = res.data
let contractAbstract = res.data.basics.contractAbstract;
setsignatureLogId(basics.signatureLogId)
......@@ -73,7 +74,6 @@ const Details = (props: any) => {
{ label: '合同编号', extra: basics.contractNo ? basics.contractNo : '', },
{ label: '合同摘要', extra: basics.contractAbstract ? basics.contractAbstract : '' },
{ label: '外部状态', extra: basics.outerStatusName ? basics.outerStatusName : '', type: 'StatusTag' },
],
col2: [
{ label: '寻源类型', extra: basics.sourceTypeName ? basics.sourceTypeName : '' },
......@@ -122,7 +122,7 @@ const Details = (props: any) => {
setbasicInfo(basicInfo)
setouterTaskStepList(outerTaskStepList)
setinnerTaskStepList(innerTaskStepList)
setpayPlanList(payPlanList)
setpayPlanList(applyAmountOrderList ? applyAmountOrderList : [])
setcontractText(contractText)
setcontractNo(basics.contractNo)
setcontractAbstract(contractAbstract)
......@@ -288,16 +288,20 @@ const Details = (props: any) => {
getDetail();
}
const [applyId, setapplyId] = useState<any>('')
/* 点击查看详情回调 */
const setkey = (item) => {
console.log(item)
if (item.id) {
setapplyId(item.id)
PublicApi.getContractExecuteExecuteInfoPayDetailInfo({
contractId,
applyId: item.id
}).then(res => {
console.log(res);
if (res.code === 1000) {
console.log(res.data)
res.data.invoiceProveVOList = res.data.invoiceProveVOList ? res.data.invoiceProveVOList : [];
setbasicData(res.data)
setDrawerModal()
}
})
......@@ -308,6 +312,38 @@ const Details = (props: any) => {
const setDrawerModal = () => {
setPopup(!Popup)
}
/* 支付方式元素节点 */
const payItem = () => (
<div style={{
display: 'flex',
}}>
<div style={{
fontSize: '12px',
fontWeight: 400,
color: '#909399',
flex: 0.5,
}}>支付方式:</div>
<div style={{
fontSize: '12px',
fontWeight: 400,
color: '#303133',
flex: 1,
}}>线下支付方式:线下支付线上确认</div>
</div>
)
/* 查看详情元素节点 */
const ondeTails = () => {
<span style={{
color: '#00B37A',
background: '#F4F5F7',
display: 'inline-block',
padding: '5px',
borderRadius: 5,
cursor: 'pointer'
}}
onClick={setkey}
>查看详情</span>
}
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -375,40 +411,13 @@ const Details = (props: any) => {
{
type == 'implement' &&
<PaymentCard
children={
<span style={{
color: '#00B37A',
background: '#F4F5F7',
display: 'inline-block',
padding: '5px',
borderRadius: 5,
cursor: 'pointer'
}}
onClick={setkey}
>查看详情</span>}
children={ondeTails}
title="付款统计"
payPlanList={payPlanList}
basics={basicInfo}
contractId={contractId}
setkey={setkey}
payItem={
<div style={{
display: 'flex',
}}>
<div style={{
fontSize: '12px',
fontWeight: 400,
color: '#909399',
flex: 0.5,
}}>支付方式:</div>
<div style={{
fontSize: '12px',
fontWeight: 400,
color: '#303133',
flex: 1,
}}>线下支付方式:线下支付线上确认</div>
</div>
}
payItem={payItem}
/>
}
{/* 交易条件 */}
......@@ -438,7 +447,6 @@ const Details = (props: any) => {
{/* 流转记录 */}
{
type != 'implement' ? <CirculationList contractId={contractId} /> : null
// <DetailedList contractId={contractId} />
}
</div>
{/* 提交审核 */}
......@@ -484,8 +492,7 @@ const Details = (props: any) => {
</Form>
</Modal>
{/* 查看付款计划明细弹出组建 */}
{/* Popup */}
<PopupDrawer popupshow={Popup} basicInfo={basicInfo} setDrawerModal={setDrawerModal} />
<PopupDrawer popupshow={Popup} basicData={basicData} setDrawerModal={setDrawerModal} applyId={applyId} />
</div>
)
}
......
......@@ -225,7 +225,7 @@ const AddInfo = (props: any) => {
**/
const fetchData = (params: any) => {
params.startTime = params.startTime ? moment(Number(params.startTime)).format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment(Number(params.startTime)).format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment(Number(params.endTime)).format('YYYY-MM-DD') : '';
return new Promise(resolve => {
PublicApi.getContractManagePageCompleteList({ ...params }).then(res => {
console.log(res)
......@@ -461,7 +461,7 @@ const AddInfo = (props: any) => {
<Drawer
visible={visible}
onClose={() => setvisible(!visible)}
title="选择采购合同"
title="选择待请款单据"
width={1000}
footer={
<div
......
......@@ -96,6 +96,7 @@ const AddInfo = (props: any) => {
PublicApi.getContractManageGetContractInfoByApplyAmountOrder({ contractId: basicsData.contractId }).then(res => {
if (res.code === 1000) {
const auth = JSON.parse(localStorage.getItem('auth'));
console.log(auth)
for (let i = 0; i < res.data.payPlanList.length; i++) {
if (res.data.payPlanList[i].id == basicsData.payPlanId) {
setIndex(i + 1)
......@@ -109,7 +110,7 @@ const AddInfo = (props: any) => {
contractId: basicsData.contractId,
bankAccount: basicsData.bankAccount, // 银行卡号
remark: basicsData.remark, // 描述
account: auth.account,
account: auth ? auth.account : '',
payeeName: res.data.corporateAccountConfig.name,
bankDeposit: basicsData.bankDeposit,
payRatio: basicsData.payRatio,
......
......@@ -32,7 +32,8 @@ const FormList = (props: any) => {
/* 确定 */
const handleOk = () => {
let dataArr = [];
selectRow.map((item: any) => {
selectRow.map((item: any, index: number) => {
item.rowId = index + 1
dataArr.push(item);
})
setData(dataArr)
......@@ -61,34 +62,45 @@ const FormList = (props: any) => {
};
/* 获取物料信息 */
const getList = () => {
const parmas: any = {
let parmas: any = {
current: '1',
pageSize: '3',
}
let fn;
if (sourceType == '1') {
parmas.id = Row.demandId;
parmas.memberId = Row.partyBMemberId;
parmas.memberRoleId = Row.partyBRoleId;
fn = PublicApi.getPurchaseQuotedPriceProductlistListContract
}
switch (sourceType) {
case '1':
parmas.id = Row.demandId;
parmas.memberId = Row.partyBMemberId;
parmas.memberRoleId = Row.partyBRoleId;
fn = PublicApi.getPurchaseQuotedPriceProductlistListContract
break;
if (sourceType == '2') {
parmas.submitTenderId = Row.bidId;
fn = PublicApi.getPurchaseSubmitTenderMaterielGetSubmitTenderMaterielList
} else {
case '2':
parmas.submitTenderId = Row.bidId;
fn = PublicApi.getPurchaseSubmitTenderMaterielGetSubmitTenderMaterielList
break;
parmas.id = Row.viePriceId
fn = PublicApi.getPurchaseBiddingPrizeMaterielPage
}
console.log(sourceType)
case '3':
parmas.id = Row.viePriceId
fn = PublicApi.getPurchaseBiddingPrizeMaterielPage
break;
default:
break;
}
// const fnsasdf = (sourceType: string, newObj: any, callBackArr: Array) => {
// const key = callBackArr[sourceType]
// if (sourceType == '2') {
// return newObj.inviteTenderMateriel[key]
// }
// return newObj[key]
// }
console.log(parmas, 'parmas', Row)
fn(parmas).then(res => {
console.log(res);
// return;
if (res.code === 1000) {
let data = res.data.data.map((item, index) => {
return {
// fnsasdf(sourceType,item,['number','code','number'])
code: sourceType == '1' ? item.number : sourceType == '2' ? item.inviteTenderMateriel.code : item.number, // 物料编号
name: sourceType == '1' ? item.name : sourceType == '2' ? item.inviteTenderMateriel.name : item.name, // 物料名称
type: sourceType == '1' ? item.model : sourceType == '2' ? item.inviteTenderMateriel.type : item.model, // 物料规格
......
......@@ -38,7 +38,7 @@ const FormList = (props: any) => {
/* 显示模态框 */
const tabcolumns: any = [
{
title: '付款次数', dataIndex: 'payNum', align: 'center',
title: '付款次数', dataIndex: 'payNum', align: 'left',
render: (_, item, index) => {
return (
<Select
......@@ -55,11 +55,11 @@ const FormList = (props: any) => {
},
{
title: '付款阶段', dataIndex: 'payStage', align: 'center',
title: '付款阶段', dataIndex: 'payStage', align: 'left',
render: (_, item, index) => <TextArea maxLength={150} rows={1} onChange={(e) => onSelectChange(e, 'payStage', index)} />
},
{
title: '预计付款时间', dataIndex: 'expectPayTime', align: 'center',
title: '预计付款时间', dataIndex: 'expectPayTime', align: 'left',
render: (_, item, index) => <DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
......@@ -67,7 +67,7 @@ const FormList = (props: any) => {
/>
},
{
title: '付款比例', dataIndex: 'payRatio', align: 'center',
title: '付款比例', dataIndex: 'payRatio', align: 'left',
render: (_, item, index) =>
<div className={styles.flex}>
<Input
......@@ -82,7 +82,7 @@ const FormList = (props: any) => {
},
{
title: '付款金额', dataIndex: 'payAmount', align: 'center',
title: '付款金额', dataIndex: 'payAmount', align: 'left',
render: (_, item, index) =>
<div className={styles.flex}>
<span></span>
......@@ -123,7 +123,7 @@ const FormList = (props: any) => {
{
title: '操作',
dataIndex: '',
align: 'center',
align: 'left',
key: 'x',
render: (_, item, index) => <a onClick={() => Delete(item, index)}>删除</a>,
},
......
......@@ -68,7 +68,7 @@
.select .setBox {
width: 100px;
display: flex;
align-items: center;
align-items: flex-end;
position: absolute;
top: 1px;
right: 78px;
......
......@@ -78,7 +78,7 @@
.setBox{
width: 100px;
display: flex;
align-items: center;
align-items: flex-end;
position: absolute;
top: 1px;
right: 78px;
......
......@@ -145,7 +145,7 @@ const FormList = (props: any) => {
currentRef.current = {
get: () => new Promise((resolve: any) => {
let list = [];
dataList.map((item, idnex) => {
dataList.map((item, index) => {
list.push({
id: item.id,
materielNo: item.materielNo,
......
......@@ -25,7 +25,7 @@ const FormList = (props: any) => {
/* 显示模态框 */
const tabcolumns: any = [
{
title: '付款次数', dataIndex: 'payNum', align: 'center',
title: '付款次数', dataIndex: 'payNum', align: 'left',
render: (_, item, index) => {
return (
<Select
......@@ -42,11 +42,11 @@ const FormList = (props: any) => {
},
{
title: '付款阶段', dataIndex: 'payStage', align: 'center',
title: '付款阶段', dataIndex: 'payStage', align: 'left',
render: (_, item, index) => <TextArea defaultValue={item.payStage} maxLength={150} rows={1} onChange={(e) => onSelectChange(e, 'payStage', index)} />
},
{
title: '预计付款时间', dataIndex: 'expectPayTime', align: 'center',
title: '预计付款时间', dataIndex: 'expectPayTime', align: 'left',
render: (_, item, index) => <DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
......@@ -54,7 +54,7 @@ const FormList = (props: any) => {
/>
},
{
title: '付款比例', dataIndex: 'payRatio', align: 'center',
title: '付款比例', dataIndex: 'payRatio', align: 'left',
render: (text, item, index) =>
<div className={styles.flex}>
<Input
......@@ -70,7 +70,7 @@ const FormList = (props: any) => {
},
{
title: '付款金额', dataIndex: 'payAmount', align: 'center',
title: '付款金额', dataIndex: 'payAmount', align: 'left',
render: (text, item, index) =>
<div className={styles.flex}>
<span></span>
......
......@@ -22,6 +22,7 @@ const Editing: React.FC<{}> = (props: any) => {
const purchaseMate = useRef<any>([])
const payPlan = useRef<any>([])
const contractText = useRef<any>({})
const [btnType, setbtnType] = useState<any>(false);
/**
* @param name tag标签名
* @param components 显示内容
......@@ -62,26 +63,33 @@ const Editing: React.FC<{}> = (props: any) => {
/* 提交*/
const submit = async () => {
/* 基本信息 */
const basicsVO = await currentBasic.current.get();
const purchaseMaterielList = await purchaseMate.current.length != 0 ? await purchaseMate.current.get() : [];
const payPlanList = await payPlan.current.length != 0 ? await payPlan.current.get() : [];
const contract = await Object.keys(contractText.current).length != 0 ? await contractText.current.get() : {}
let param: any = {
basicsVO: basicsVO.data,
purchaseMaterielList: purchaseMaterielList.length != 0 ? purchaseMaterielList.data.list : purchaseMaterielList,
payPlanList: payPlanList,
contractText: contract,
operateType: oldContractId ? 3 : 2,
}
console.log(param)
PublicApi.postContractManageSave(param).then((res => {
if (res.code === 1000) {
setTimeout(() => {
history.push('/memberCenter/contract/manage/add/addList')
}, 1000)
if (!btnType) {
/* 基本信息 */
const basicsVO = await currentBasic.current.get();
const purchaseMaterielList = await purchaseMate.current.length != 0 ? await purchaseMate.current.get() : [];
const payPlanList = await payPlan.current.length != 0 ? await payPlan.current.get() : [];
const contract = await Object.keys(contractText.current).length != 0 ? await contractText.current.get() : {}
let param: any = {
basicsVO: basicsVO.data,
purchaseMaterielList: purchaseMaterielList.length != 0 ? purchaseMaterielList.data.list : purchaseMaterielList,
payPlanList: payPlanList,
contractText: contract,
operateType: oldContractId ? 3 : 2,
}
}))
console.log(param)
setbtnType(true)
PublicApi.postContractManageSave(param).then((res => {
if (res.code === 1000) {
setTimeout(() => {
history.push('/memberCenter/contract/manage/add/addList')
setbtnType(false)
}, 1000)
} else {
setbtnType(false)
}
}))
}
}
const TabList = [
{
......
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