| | |
| | | export function updateById (data) { |
| | | return request.post('/business/insuranceApply/updateById', data) |
| | | } |
| | | export function getDetail (id) { |
| | | return request.get(`business/insuranceApply/${id}`) |
| | | } |
| | |
| | | <div class="desc_item"> |
| | | <div class="desc_item_label"> |
| | | <div class="desc_item_label_left"> |
| | | <span>投保企业:安徽平安人力资源有限公司</span> |
| | | <span>保单状态:待出单</span> |
| | | <span>提交时间:2023-09-11 00:00:00</span> |
| | | <span>投保企业:{{ model.companyName }}</span> |
| | | <span>保单状态:{{ model.statusInfo }}</span> |
| | | <span>提交时间:{{ model.createDate }}</span> |
| | | </div> |
| | | <div class="desc_item_label_right"> |
| | | <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单')">导出详单</el-button> |
| | |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | prop="date" |
| | | prop="code" |
| | | label="保单号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | prop="solutionsName" |
| | | label="保险方案" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | prop="startTime" |
| | | label="保险生效起期"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | prop="endTime" |
| | | label="保险生效止期"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | prop="insureNum" |
| | | label="投保人数"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | prop="serviceDays" |
| | | label="在保时长(天)"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="当前费用"> |
| | | prop="currentFee" |
| | | label="当前费用(元)"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="总费用"> |
| | | prop="fee" |
| | | label="总费用(元)"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import InsuranceDetails from '@/components/business/InsuranceDetails' |
| | | export default { |
| | | name: 'OperaInsuranceApplyWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, InsuranceDetails }, |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | | form: { |
| | | id: null, |
| | | editDate: '' |
| | | }, |
| | | // 验证规则 |
| | | rules: { |
| | | }, |
| | | formInline: { |
| | | user: '', |
| | | region: '' |
| | | }, |
| | | visible1: false, |
| | | visible2: false, |
| | | visible3: false, |
| | | visible4: false, |
| | | visible5: false, |
| | | reverse: true, |
| | | radio: 0, |
| | | fileList: [ |
| | | {name: 'food.pdf', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'} |
| | | ], |
| | | activities: [{ |
| | | content: '活动按期开始', |
| | | timestamp: '2018-04-15' |
| | | }, { |
| | | content: '通过审核', |
| | | timestamp: '2018-04-13' |
| | | }, { |
| | | content: '创建成功', |
| | | timestamp: '2018-04-11' |
| | | }], |
| | | tableData: [], |
| | | activeName: 'first', |
| | | currentPage: 1 |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList); |
| | | }, |
| | | handlePreview(file) { |
| | | console.log(file); |
| | | }, |
| | | handleExceed(files, fileList) { |
| | | this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
| | | }, |
| | | beforeRemove(file, fileList) { |
| | | return this.$confirm(`确定移除 ${ file.name }?`); |
| | | }, |
| | | successEvent() { |
| | | |
| | | }, |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(tab, event); |
| | | }, |
| | | onSubmit() { |
| | | |
| | | } |
| | | } |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import InsuranceDetails from '@/components/business/InsuranceDetails' |
| | | import {getDetail} from "@/api/business/insuranceApply"; |
| | | import {all as solutionAll} from "@/api/business/solutions"; |
| | | export default { |
| | | name: 'OperaInsuranceApplyWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, InsuranceDetails }, |
| | | data () { |
| | | return { |
| | | // 表单数据 |
| | | dataId:null, |
| | | model: {}, |
| | | form: { |
| | | id: null, |
| | | editDate: '' |
| | | }, |
| | | // 验证规则 |
| | | rules: { |
| | | }, |
| | | formInline: { |
| | | user: '', |
| | | region: '' |
| | | }, |
| | | visible1: false, |
| | | visible2: false, |
| | | visible3: false, |
| | | visible4: false, |
| | | visible5: false, |
| | | reverse: true, |
| | | radio: 0, |
| | | fileList: [ |
| | | {name: 'food.pdf', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'} |
| | | ], |
| | | activities: [{ |
| | | content: '活动按期开始', |
| | | timestamp: '2018-04-15' |
| | | }, { |
| | | content: '通过审核', |
| | | timestamp: '2018-04-13' |
| | | }, { |
| | | content: '创建成功', |
| | | timestamp: '2018-04-11' |
| | | }], |
| | | tableData: [], |
| | | activeName: 'first', |
| | | currentPage: 1 |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open(title,target){ |
| | | this.visible=true; |
| | | this.dataId=target.id |
| | | this.getDetail(); |
| | | }, |
| | | getDetail(){ |
| | | getDetail(this.dataId).then(res => { |
| | | this.model = res |
| | | this.tableData = new Array(); |
| | | this.tableData.push(res); |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList); |
| | | }, |
| | | handlePreview(file) { |
| | | console.log(file); |
| | | }, |
| | | handleExceed(files, fileList) { |
| | | this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
| | | }, |
| | | beforeRemove(file, fileList) { |
| | | return this.$confirm(`确定移除 ${ file.name }?`); |
| | | }, |
| | | successEvent() { |
| | | |
| | | }, |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(tab, event); |
| | | }, |
| | | onSubmit() { |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .v-modal { |
| | |
| | | <el-select v-model="searchForm.companyId" placeholder="请选择" @change="search"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="保险方案" prop="solutionId"> |
| | | <el-select v-model="searchForm.solutionId" placeholder="请选择" @change="search"> |
| | | <el-select v-model="searchForm.baseSolutionId" placeholder="请选择" @change="search"> |
| | | <el-option |
| | | v-for="item in solutionList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | <!-- <el-date-picker v-model="searchForm.createDate" value-format="yyyy-MM-dd" placeholder="请输入创建时间"/>--> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | <el-button @click="$refs.operaInsuranceApplyWindow.open('投保详情')">投保详情</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | |
| | | <span>{{scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="投保状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.statusCollect === 0">待审核</span> |
| | | <span v-if="row.statusCollect === 1">待出单</span> |
| | | <span v-if="row.statusCollect === 2">保障中</span> |
| | | <span v-if="row.statusCollect === 3">已过期</span> |
| | | <span v-if="row.statusCollect === 4">已退回</span> |
| | | <span v-if="row.statusCollect === 5">退回申请中</span> |
| | | <span v-if="row.statusCollect === 6">已关闭</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="statusInfo" label="投保状态" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="投保企业" min-width="100px"></el-table-column> |
| | | <el-table-column prop="solutionsName" label="保险方案" min-width="100px"></el-table-column> |
| | | <el-table-column prop="insureNum" label="投保人数" min-width="100px"></el-table-column> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { all as solutionAll} from '@/api/business/solutions' |
| | | import { pageAll as companyAll} from '@/api/business/company' |
| | | import OperaInsuranceApplyWindow from '@/components/business/OperaInsuranceApplyWindow' |
| | | export default { |
| | | name: 'InsuranceApply', |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | createDate: '', |
| | | createTimeS: '', |
| | | createTimeE: '', |
| | | solutionId: '', |
| | | companyId: '', |
| | | statusCollect: '' |
| | | statusCollect: '' |
| | | }, |
| | | solutionList:[], |
| | | companyList:[] |
| | |
| | | this.search() |
| | | this.loadSelectList() |
| | | }, |
| | | methods (){ |
| | | loadSelectList(){ |
| | | methods:{ |
| | | loadSelectList() { |
| | | solutionAll({dataType:0}).then(res => { |
| | | this.solutionList = res |
| | | }).catch(err => { |
| | | }) |
| | | companyAll({}).then(res => { |
| | | this.companyList = res |
| | | }).catch(err => { |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | } |
| | | |
| | | public enum ApplyCollectStatus { |
| | | DSP(0, "待审批"), |
| | | DCD(1, "待出单"), |
| | | BZZ(2, "保障中"), |
| | | YGQ(3, "已过期"), |
| | | YTH(4, "已退回"), |
| | | THSQZ(5, "退回申请中"), |
| | | YGB(6, "已关闭"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | ApplyCollectStatus(int key, String name) { |
| | | this.name = name; |
| | | this.key = key; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (ApplyCollectStatus c : ApplyCollectStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set 方法 |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public enum ApplyLogType { |
| | | UPLOAD(0, "提交投保","提交意见:${param}"), |
| | |
| | | |
| | | @ApiModelProperty(value = "方案编码(关联solutions)", example = "1") |
| | | private Integer solutionId; |
| | | @ApiModelProperty(value = "企业编码 ", example = "1") |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "基表方案编码 ", example = "1") |
| | | private Integer baseSolutionId; |
| | | |
| | | @ApiModelProperty(value = "实际保险生效止期开始") |
| | | private Date endTimeS; |
| | |
| | | @ApiModelProperty(value = "状态 0待审批 1待出单 2保障中 3已过期 4已撤回 5退回申请中 6已关闭", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer statusCollect; |
| | | @ApiModelProperty(value = "集合状态" , example = "1") |
| | | @TableField(exist = false) |
| | | private String statusInfo; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | List<Multifile> multifileList = new ArrayList<>(); |
| | | List<Integer> objList = new ArrayList<>(); |
| | | if(company.getBusinessImg()!=null && StringUtils.isNotBlank(company.getBusinessImg().getFileurl())){ |
| | | if(company.getBusinessImg()!=null && company.getBusinessImg().getId() ==null && StringUtils.isNotBlank(company.getBusinessImg().getFileurl())){ |
| | | multifileList.add(initMultiFileByCompay(company,company.getBusinessImg(),Constants.MultiFile.COM_BUSINESS_LICENSE.getKey())); |
| | | objList.add(Constants.MultiFile.COM_BUSINESS_LICENSE.getKey()); |
| | | }else { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请上传营业执照!"); |
| | | } |
| | | if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){ |
| | | if(company.getSignImg()!=null&& company.getSignImg().getId() ==null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){ |
| | | multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey())); |
| | | objList.add(Constants.MultiFile.COM_SING_IMG.getKey()); |
| | | company.setSignIdStatus(Constants.ZERO);//标记电子签章未上传 |
| | |
| | | } |
| | | if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null){ |
| | | for(Multifile f : company.getIdcardImgList()){ |
| | | if(f.getId() !=null){ |
| | | continue; |
| | | } |
| | | multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey())); |
| | | } |
| | | objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey()); |
| | |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId); |
| | | queryWrapper.eq(InsuranceApply::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(pageWrap.getModel().getBaseSolutionId()!=null,Solutions::getBaseId,pageWrap.getModel().getBaseSolutionId()); |
| | | queryWrapper.in(statusList.size()>0,InsuranceApply::getStatus,statusList); |
| | | if(Constants.equalsInteger(pageWrap.getModel().getStatusCollect(),Constants.THREE) ){ |
| | | queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()); |
| | |
| | | PageData<InsuranceApply> pageData = PageData.from(insuranceApplyJoinMapper.selectJoinPage(page,InsuranceApply.class, queryWrapper)); |
| | | if(pageData.getRecords()!=null){ |
| | | for (InsuranceApply apply : pageData.getRecords()){ |
| | | apply.setStatusCollect(Constants.InsuranceApplyStatus.getCollectStatus(apply.getStatus())); |
| | | if(Constants.equalsInteger(apply.getStatusCollect(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //如果已完成 |
| | | if(apply.getEndTime()==null || System.currentTimeMillis()>apply.getEndTime().getTime()){ |
| | | apply.setStatusCollect(Constants.THREE);//已过期 |
| | | } |
| | | } |
| | | } |
| | | initApplyStatus(apply) ; |
| | | } |
| | | } |
| | | return pageData; |
| | | } |
| | | |
| | | public void initApplyStatus(InsuranceApply apply){ |
| | | apply.setStatusCollect(Constants.InsuranceApplyStatus.getCollectStatus(apply.getStatus())); |
| | | if(Constants.equalsInteger(apply.getStatusCollect(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //如果已完成 |
| | | if(apply.getEndTime()==null || System.currentTimeMillis()>apply.getEndTime().getTime()){ |
| | | apply.setStatusCollect(Constants.THREE);//已过期 |
| | | } |
| | | } |
| | | setServiceDays(apply); |
| | | apply.setStatusInfo(Constants.ApplyCollectStatus.getName(apply.getStatusCollect())); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<InsuranceApply> findListByDTO(InsuranceApplyQueryDTO model) { |
| | |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Company::getName,ApplyLog::getCompanyName) |
| | | .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(InsuranceApply::getId,id) |
| | |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | insuranceApply.setInsureNum(applyDetailMapper.selectCount(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId()) |
| | | .eq(ApplyDetail::getIsdeleted,Constants.ZERO))); |
| | | |
| | | //设置在保时长(天数) |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //如果当前时间大于结束日期 则使用结束日期对比开始日期 |
| | | if(DateUtil.compareDate(new Date(),insuranceApply.getEndTime())>=Constants.ZERO){ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),insuranceApply.getStartTime())); |
| | | }else if(DateUtil.compareDate(insuranceApply.getStartTime(),new Date())>=Constants.ZERO){ |
| | | //未开始 |
| | | insuranceApply.setServiceDays(Constants.ZERO); |
| | | }else{ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),insuranceApply.getStartTime())); |
| | | } |
| | | } |
| | | initApplyStatus(insuranceApply); |
| | | |
| | | //查询附件数据 |
| | | initImgData(insuranceApply); |
| | |
| | | insuranceApply.setApplyLogList(applyLogList); |
| | | return insuranceApply; |
| | | } |
| | | |
| | | private void setServiceDays(InsuranceApply insuranceApply) { |
| | | //设置在保时长(天数) |
| | | insuranceApply.setServiceDays(Constants.ZERO); |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //如果当前时间大于结束日期 则使用结束日期对比开始日期 |
| | | if(DateUtil.compareDate(new Date(),insuranceApply.getEndTime())>=Constants.ZERO){ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),insuranceApply.getStartTime())); |
| | | }else if(DateUtil.compareDate(insuranceApply.getStartTime(),new Date())>=Constants.ZERO){ |
| | | //未开始 |
| | | insuranceApply.setServiceDays(Constants.ZERO); |
| | | }else{ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),insuranceApply.getStartTime())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void initImgData(InsuranceApply model) { |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,model.getId()) |
| | |
| | | @Override |
| | | public List<Solutions> findList(Solutions solutions) { |
| | | solutions.setIsdeleted(Constants.ZERO); |
| | | solutions.setDataType(Constants.TWO); |
| | | if(solutions.getDataType() == null){ |
| | | solutions.setDataType(Constants.TWO); |
| | | } |
| | | QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); |
| | | return solutionsMapper.selectList(wrapper); |
| | | } |