import { Form, Input } from 'antd'; import { formItemLayout } from './index'; import { taskComBhGrantDeleteComBhGrantInfo, taskComBhGrantGetComBhGrantInfoById } from '../../../services/apiSmartCard'; import $modal from '../../../utils/modal'; import $nModal from '../../../utils/modal/nModal'; // const warnColor = '#F59A23'; // const okColor = '#4B7902'; const errColor = '#D9001B'; export default function () { return [ // { // title: '序号', // dataIndex: 'number', // key: 'number', // // width: 80, // // fixed: 'left' // }, { title: '代发单号', dataIndex: 'comBhGrantId', key: 'comBhGrantId', // width: 100, // fixed: 'left', render: value => value || '-', }, { title: '标题', dataIndex: 'title', key: 'title', }, { title: '备注', dataIndex: 'remark', key: 'remark', render: text => (
{text}
) }, { title: '申请人', dataIndex: 'createBy', key: 'createBy', }, { title: '申请时间', dataIndex: 'createTime', key: 'createTime', }, { title: '发放类型', dataIndex: 'grantTypeLabel', key: 'grantTypeLabel', }, { title: '发放年月', dataIndex: 'grantYears', key: 'grantYears', }, { title: '状态', dataIndex: 'commitStatus', key: 'commitStatus', render: (value) => { if (value == '已提交') { return {value} } else { return {value} } } }, { title: '操作', dataIndex: 'operation', key: 'operation', width: 130, fixed: 'right', render: (text, record) => { const { comBhGrantId, remark, grantYears, commitStatus, grantType } = record; return (
{ taskComBhGrantGetComBhGrantInfoById({ comBhGrantId }).then(res => { const info = res.data; $nModal({ title: '基础信息', footer: null, // onOk: () => { // }, content: ( <> {/* */} ) }); }); }}>基础信息 { this.props.history.push({ pathname: '/salarypayment/salary-proxy-online/list', state: { comBhGrantId, grantYears, remark } }) // this.props.history.push(`/salarypayment/salary-proxy-online/list?comBhGrantId=${comBhGrantId}&&grantYears=${grantYears}&&remark=${remark}`); }}>代发列表 { commitStatus != '已提交' && { $modal('即将删除薪资代发记录', 薪资代发记录删除后,不可恢复,是否继续?, [{ text: '继续', type: 'primary', onPress: () => { taskComBhGrantDeleteComBhGrantInfo({ comBhGrantId }).then(() => { this.props.updateTable(); }); } }, { text: '取消', type: '', onPress: () => { } }]); }}>删除 }
); } } ]; }