import { Modal } from 'antd'; import { saveInsBlbMinusPreservationService, minusBatchRelevancePer } from '../../../../../services/api'; export default function () { const isLinbao = this.props.insuranceType === 'temporary' return [ { title: '序号', dataIndex: 'number', key: 'number' }, { title: '姓名', dataIndex: 'name', key: 'name' }, { title: '手机号', dataIndex: 'mobilePhone', key: 'mobilePhone' }, { title: '身份证号', dataIndex: 'idCardNo', key: 'idCardNo' }, { title: '人员类别', dataIndex: 'majorGroup', key: 'majorGroup', hidden: isLinbao }, { title: '所属项目', dataIndex: 'projectName', key: 'projectName', hidden: !isLinbao, }, { title: '所属企业', dataIndex: 'comName', key: 'comName', hidden: !isLinbao, }, { title: '关联保单号', dataIndex: 'policyNo', key: 'policyNo' }, { title: '保单有效期', dataIndex: 'effectDate', key: 'effectDate' }, { title: '购买方式', dataIndex: 'buyModeName', key: 'buyModeName' }, { title: '在职状态', dataIndex: 'incumbencyName', key: 'incumbencyName', hidden: isLinbao, render: (text, record) => ( record.incumbencyName == '在职' ? 在职 : 离职 ) }, { title: '操作', key: 'operation', render: (text, record) => (
{ Modal.confirm({ title: '是否为选中的人员进行减员操作?', content: (

关联线下保单,则直接移除关联;

关联线上保单,则提交减员申请。

), okText: '确认', onOk: () => { // 线上保单 if (record.buyMode == '1') { const perIds = record.perId; const orderId = record.orderId; saveInsBlbMinusPreservationService({ orderId, perIds }).then(res => { Modal.success({ title: '提交减员申请成功!', okText: '确定', content:

注:关联线上保单时,需要等待保险公司审核,请在批单申请记录中查看进度。

}); // 重置选中项 this.setState({ selectedRows: [], //表格中选中的数组 selectedRowKeys: [], }); this.props.updateTable(); }); } else { //线下 const idCards = record.idCardNo; const comInsId = record.comInsId; minusBatchRelevancePer({ idCards, comInsId }).then(res => { // Modal.success({ // title: '移除成功!', // content:

已将所选选择人员移除保障状态!

// }); Modal.confirm({ title: '上传批单提示', content: (

*企业若发生人员变动,可通过【保险保单管理】-【修改】上传批单,后台将进行人工校验,请务必上传真实有效数据!

本次共移除1位,请及时上传相应批单!

), okText: '马上办理', cancelText: '取消', onOk: () => { this.props.history.push(`/insurancemanagement/enterpriseinsurance/insurancedetails?comInsId=${comInsId}&edit=00`); } }); // 重置选中项 this.setState({ selectedRows: [], //表格中选中的数组 selectedRowKeys: [], }); this.props.updateTable(); }); } }, cancelText: '取消' }); }} > 减员
) } ]; }