Commit a9092820 authored by xiexiuxing's avatar xiexiuxing

feat: 合同执行改

parent 64b0a074
......@@ -7,6 +7,7 @@ import EyePreview from '@/components/EyePreview';
import moment from 'moment';
import { getContractExecuteExecuteInfoPayDetailList } from '@/services/ContractV2Api'
import { getIntl } from 'umi';
import { getSettleAccountsBusinessApplyAmountBuyerApplyAmountList } from '@/services/SettleV2Api';
const intl = getIntl();
export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */
......@@ -39,10 +40,10 @@ const DrawerModal: React.FC<Iprops> = ({
},
{ title: intl.formatMessage({id: 'contract.zhuangtai'}), dataIndex: 'statusName', align: 'left', },
{
title: intl.formatMessage({id: 'contract.qingkuanshijian'}), dataIndex: 'orderTime', align: 'left',
render: (text: any, record: any) => (
<div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
)
title: intl.formatMessage({id: 'contract.qingkuanshijian'}), dataIndex: 'createTime', align: 'left',
// render: (text: any, record: any) => (
// <div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
// )
},
{
title: intl.formatMessage({id: 'contract.qingkuanjine'}), dataIndex: 'applyAmount', align: 'left',
......@@ -52,9 +53,9 @@ const DrawerModal: React.FC<Iprops> = ({
},
{
title: intl.formatMessage({id: 'contract.fukuanshijian'}), dataIndex: 'payTime', align: 'left',
render: (text: any, record: any) => (
<div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
)
// render: (text: any, record: any) => (
// <div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
// )
},
{
title: intl.formatMessage({id: 'contract.fukuanjine'}), dataIndex: 'payAmount', align: 'left',
......@@ -74,13 +75,16 @@ const DrawerModal: React.FC<Iprops> = ({
/* 请求查看付款明细 */
const fetchTableData = (params) => {
return new Promise((resolve, reject) => {
getContractExecuteExecuteInfoPayDetailList({
// /settle/accounts/business/apply/amount/buyer/apply/amount/list
// getContractExecuteExecuteInfoPayDetailList
getSettleAccountsBusinessApplyAmountBuyerApplyAmountList({
...params,
executeId: item.id,
contractId,
}).then(res => {
console.log(res,'res')
if (res.code === 1000) {
resolve(res)
resolve(res.data)
}
}).catch((err) => {
resolve([])
......
......@@ -296,27 +296,31 @@ const Details = (props: any) => {
title: intl.formatMessage({id: 'contract.caozuo'}), dataIndex: 'type', align: 'left',
render: (text, record) => {
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
let node = null;
if (record.payAmount !== 0) {
node =
<div>
return(
<div>
<a onClick={() => getPayment(record)} className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a>
{/* <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a> */}
</div>
return node;
} else if (record.unPayApplyAmount > 0) {
node = <div>
<a onClick={() => getPayment(record)} className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a>
{/* <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a> */}
</div>
return node;
} else {
node = null
// <div>
// <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a>
// </div>
return node;
}
</div>
)
// if (record.payAmount !== 0) {
// node =
// <div>
// <a onClick={() => getPayment(record)} className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a>
// {/* <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a> */}
// </div>
// return node;
// } else if (record.unPayApplyAmount > 0) {
// node = <div>
// <a onClick={() => getPayment(record)} className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a>
// {/* <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a> */}
// </div>
// return node;
// } else {
// node = null
// // <div>
// // <a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>{intl.formatMessage({id: 'contract.qingkuan'})}</a>
// // </div>
// return node;
// }
}
},
];
......@@ -339,6 +343,7 @@ const Details = (props: any) => {
}
};
/* 查看付款明细回调 */
const setDrawerModal = () => {
setVisible(!visible)
......@@ -347,6 +352,7 @@ const Details = (props: any) => {
const setDrawerPopModal = () => {
setIsModalVisible(!ModalVisible)
}
// 分页
const handlePaginationChange = (current: number, pageSize: number) => {
const data = {
......
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