import React, { Component } from 'react'; import { connect } from 'dva'; // import st from 'styled-components'; import { Form, Input, Select, Button, DatePicker, Modal, message, Tabs, Alert, Popover, Upload, Icon } from 'antd'; import PTable from '../../../components/Pro/PTable'; import * as ajax from '../../../services/api'; import moment from 'moment'; import "moment/locale/zh-cn"; import InsuranceDetails from './InsuranceDetails'; import InsuranceBuy from './InsuranceBuy'; import $loading from '../../../utils/loading'; import $modal from '../../../utils/modal'; import $nModal from '../../../utils/modal/nModal'; const { Option } = Select; const { RangePicker } = DatePicker; const { TabPane } = Tabs; const dateFormat = 'YYYY-MM-DD'; @connect(state => ({ global: state.global })) @Form.create() /** * 企业保险列表页 */ export default class InsuranceBasic extends Component { constructor(props, context) { super(props, context); this.state = { comInsId: '00', visibleBuy: false, forceUpdate: false, onlineUrl: '', //购买在线保险的url orederUrl: '', pageParm: { pageSize: '10', pageNumber: '1', keyword: '', //输入框的的值 startTime: '', //开始时间 endTime: '', //结束时间 buyMode: '' //选择框的下拉值 }, keyword: '', //输入框的的值 startTime: '', //开始时间 endTime: '', //结束时间 buyMode: '', //选择框的下拉值, claimUrl: '', authorizationList: [], //授权书内容 authorizationModal: false }; } componentDidMount() { //初始化参数,修复页面切换参数不会初始化的bug!! this.ajaxInsPage(); this.messageOnline(); // 获取订单链接 this._getOrderPageList(); this.__getOnlineInsBlbReportPageLink(); } __getOnlineInsBlbReportPageLink() { ajax.getOnlineInsBlbReportPageLink({}).then(res => { this.setState({ claimUrl: res.data }); }) } //时间选择 onChangeTime = (date, dateString) => { this.setState({ startTime: dateString[0], endTime: dateString[1] }); }; //输入框的模糊查询关键字 inputTracknameChange = e => { this.setState({ keyword: e.target.value.trim() }); }; //购买方式,下拉框的选择 handleChangeBuy = value => { this.setState({ buyMode: value }); }; //在线购买保险的链接生成 messageOnline = () => { ajax .getOnlineInsBlbLink({ comId: this.props.global.companyInfo.comId }) .then(data => { this.setState({ onlineUrl: data.data }); }); }; _getOrderPageList() { ajax.getOnlineInsBlbOrderPageLink().then(res => { this.setState({ orederUrl: res.data }); }); } //重置查询条件 resetQueryCond = () => { this.setState( { keyword: '', //输入框的的值 startTime: '', //开始时间 endTime: '', //结束时间 buyMode: '', //选择框的下拉值 pageParm: { pageSize: '10', pageNumber: '1', keyword: '', //输入框的的值 startTime: '', //开始时间 endTime: '', //结束时间 buyMode: '' //选择框的下拉值 }, forceUpdate: true }, () => { this.ajaxInsPage(); } ); }; //企业保险查询分页 点击搜索 ajaxInsPage = () => { const state = { ...this.state }; const pageParm = { ...this.state.pageParm }; pageParm.buyMode = state.buyMode; pageParm.startTime = state.startTime; pageParm.endTime = state.endTime; pageParm.keyword = state.keyword; this.setState({ pageParm, forceUpdate: true }, () => { this.setState({ forceUpdate: false }); }); }; //查看在线保单内容 queryInsDetail = (comInsId, blbOrderId) => { const link = window.open('about:blank'); ajax .getOnlineInsBlbDetailLink({ comInsId, orderId: blbOrderId }) .then( data => { // window.open(data.data); link.location = data.data; }, err => { message.warning('获取在线保险详情链接失败,', err); } ); }; //删除保险订单,行按钮时间 handleDeleteList = (orderId, time) => { // const d = new Date(); // const nowTime = // d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate(); // const lateTime = time; // const nowTimes = nowTime.replace(/-/g, '/'); // const lateTimes = lateTime.replace(/-/g, '/'); // const a = (Date.parse(nowTimes) - Date.parse(lateTimes)) / 3600 / 1000; // if (a <= 0) { // //比较时间 // Modal.confirm({ // title: '该条保险购买记录尚在有效期内,是否确认删除该条记录', // okText: '确认', // cancelText: '取消', // onOk: () => { // ajax // .comInsDeleteComInsUnderline({ // comInsId: orderId // }) // .then( // data => { // // message.success(data.msg); // this.ajaxInsPage(); // }, // err => { // // message.error(err); // } // ); // }, // onCancel() { // console.log('Cancel'); // } // }); // } else { Modal.confirm({ title: '保单删除后,关联的人员也将被释放为"未投保"状态。', // '删除后该保险购买记录不可找回,是否确认删除该条记录。确认后删除购买记录.', okText: '确认', cancelText: '取消', onOk: () => { ajax .comInsDeleteComInsUnderline({ comInsId: orderId }) .then( data => { message.success(data.msg); this.ajaxInsPage(); }, err => { message.error(err); } ); }, onCancel() { console.log('Cancel'); } }); // } }; //表格渲染 renderOrderList = () => { const columns = [ { title: '保险产品名称', dataIndex: 'productName', key: 'productName', render: (text, record) => { return (
1、自定义备注内容可便于区分多张在线保单;
2、限制100个字符,默认显示3个字,鼠标悬浮显示全部内容,可点击修改。
1、购买保险:若未购买企业保险,请进行在线购买,系统会自动关联人员信息进行投保,投保过程中有问题的,可联系在线客服进行咨询。
2、新增保单:若企业已线下购买了团险或雇主险保单,请录入到系统中,并在【金融保险】-【企业保险】-【人员投保管理】中进行关联。
3、企业已将线下保单录入到系统,若发生人员变动,请及时到【保险保单管理】找到对应保单点击【修改】上传批单。
通过平台保安的可享受平台专属理赔快速通道服务,企业可授权实际出险员工办理保险理赔的全部十一(包括但不限于理赔申请、提供理赔资料、收取理赔款等,但不好含放弃索赔权益),出险员工签名替代公司签章:
点击下载《关于雇主责任险小额理赔案件授权书》