k94314517
2025-07-04 50fb58286ed3b718c39a97e0987ee7561a295651
company/src/components/business/OperaSettleClaimsWindow.vue
@@ -7,18 +7,156 @@
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div class="box">
        <div class="box" v-if="info">
            <div class="box_status">
                <div class="box_status_row" v-for="(item, index) in statusList" :key="index">
                    <div v-if="statusList.length - 1 !== index" :class="item.date ? 'box_status_row_xian statusColor2' : 'box_status_row_xian'"></div>
                        <div :class="item.date ? 'box_status_row_icon statusColor1' : statusList[index - 1].date ? 'box_status_row_icon statusColor2 statusColor3' : 'box_status_row_icon'">
                        <span v-if="!item.date">{{index + 1}}</span>
                        <i class="el-icon-check" v-else></i>
                    </div>
                <div class="box_status_row" v-for="(item, index) in info.parentStatusVOList" :key="index">
                    <div v-if="info.parentStatusVOList.length - 1 !== index" :class="item.optDate ? 'box_status_row_xian statusColor1' : 'box_status_row_xian'"></div>
                    <div :class="item.optDate ? 'box_status_row_icon statusColor1' : info.parentStatusVOList[index - 1].optDate ? 'box_status_row_icon statusColor2 statusColor3' : 'box_status_row_icon'"></div>
                    <div class="box_status_row_info">
                        <div class="title">{{item.name}}</div>
                        <div class="info" v-if="item.info">{{item.info}}</div>
                        <div class="info" v-if="item.date">{{item.date}}</div>
                        <div class="title">{{item.parentTitle}}</div>
                        <div class="info" v-if="item.childTitle">{{item.childTitle}}</div>
                        <div class="info" v-if="item.optDate">{{item.optDate}}</div>
                    </div>
                </div>
            </div>
            <div class="box_dk" v-if="[13].includes(info.status)">
                <div class="box_dk_title">
                    <i class="el-icon-success"></i>
                    <span style="font-weight: bold">已打款</span>
                </div>
                <div class="box_dk_list">
                    <div class="box_dk_list_row">
                        <div class="box_dk_list_row_label">打款时间:</div>
                        <div class="box_dk_list_row_value">{{info.refuseSettleClaimsLog.createDate}}</div>
                    </div>
                    <div class="box_dk_list_row">
                        <div class="box_dk_list_row_label">打款说明:</div>
                        <div class="box_dk_list_row_value">{{info.refuseSettleClaimsLog.content}}</div>
                    </div>
                    <div class="box_dk_list_row">
                        <div class="box_dk_list_row_label">打款凭证:</div>
                        <div class="box_dk_list_row_l" v-if="info.payFileList">
                            <div class="box_dk_list_row_l_img" v-for="(item, index) in info.payFileList" :key="index">
                                <el-image
                                    style="width: 80px; height: 80px"
                                    :src="item.fileurlFull"
                                    :preview-src-list="[item.fileurlFull]">
                                </el-image>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <template v-if="userInfo.type === 1">
                <div class="box_tui" v-if="[9].includes(info.status) && info.waitSupplement === 1">
                    <span class="box_tui_status" style="background-color: rgba(255,162,63,0.15); color: #FFA23F;">材料补充</span>
                    <div class="box_tui_title">补充说明</div>
                    <div class="box_tui_info">时间:{{info.refuseSettleClaimsLog.createDate}}</div>
                    <div class="box_tui_info">人员:平台理赔人员-{{info.refuseSettleClaimsLog.creatorName}}</div>
                    <div class="box_tui_row"><div class="yuan"></div>{{info.refuseSettleClaimsLog.content}}</div>
                </div>
                <div class="box_tui" v-if="[6,8].includes(info.status)">
                    <span class="box_tui_status">已拒绝</span>
                    <div class="box_tui_title">拒绝原因</div>
                    <div class="box_tui_info">时间:{{info.refuseSettleClaimsLog.createDate}}</div>
                    <div class="box_tui_info">人员:平台理赔人员-{{info.refuseSettleClaimsLog.creatorName}}</div>
                    <div class="box_tui_row"><div class="yuan"></div>{{info.refuseSettleClaimsLog.content}}</div>
                </div>
                <div class="box_tui" v-if="[4].includes(info.status)">
                    <span class="box_tui_status">已退回</span>
                    <div class="box_tui_title">退回说明</div>
                    <div class="box_tui_info">时间:{{info.refuseSettleClaimsLog.createDate}}</div>
                    <div class="box_tui_info">人员:平台理赔人员-{{info.refuseSettleClaimsLog.creatorName}}</div>
                    <div class="box_tui_row"><div class="yuan"></div>{{info.refuseSettleClaimsLog.content}}</div>
                </div>
                <div class="box_comInfo" v-if="[10,11,12,13].includes(info.status)">
                    <div class="box_comInfo_title">
                        <i class="el-icon-info"></i>
                        <span>重要提示</span>
                    </div>
                    <div class="box_comInfo_text">
                        <span>• 赔付款项将在确认后 1-3 个工作日内到账</span>
                        <span>• 请确认收款账户信息准确无误</span>
                        <span>• 如有疑问请及时联系客服 0551-77738493</span>
                    </div>
                </div>
                <div class="box_price" v-if="[10,11,12,13].includes(info.status)">
                    <span class="box_price_title" v-if="[11].includes(info.status) && info.feeUpdate === 1">赔付金额已变更</span>
                    <span class="box_price_title" v-else-if="[11].includes(info.status) && info.feeUpdate === 0">赔付金额已确认</span>
                    <span class="box_price_title" v-else>赔付金额已确认</span>
                    <span class="box_price_jine">¥{{info.hpAccount + info.hpOtherAccount}}</span>
                    <el-button type="text" style="margin-bottom: 5px;" @click="$refs.compensationDetails.open('赔付详情', info.hpAccountContent)">查看赔付详情</el-button>
                    <el-button type="primary" @click="confirmFeeInfo" v-if="[11].includes(info.status)">确认</el-button>
                </div>
                <div class="box_sinfo" v-if="[10,11,12].includes(info.status)">
                    <div class="box_sinfo_title">
                        <span>收款信息</span>
                        <span @click="$refs.paymentInformation.open('修改收款信息', {
                            id: info.id,
                            receiveBank: info.receiveBank,
                            receiveAccount: info.receiveAccount,
                            receiveUserName: info.receiveUserName
                        })">修改</span>
                    </div>
                    <div class="box_sinfo_row">
                        <div class="box_sinfo_row_label">开户银行:</div>
                        <div class="box_sinfo_row_val">{{info.receiveBank}}</div>
                    </div>
                    <div class="box_sinfo_row">
                        <div class="box_sinfo_row_label">账号:</div>
                        <div class="box_sinfo_row_val">{{info.receiveAccount}}</div>
                    </div>
                    <div class="box_sinfo_row">
                        <div class="box_sinfo_row_label">户名:</div>
                        <div class="box_sinfo_row_val">{{info.receiveUserName}}</div>
                    </div>
                </div>
            </template>
            <div class="box_desc" v-if="[11,12,13].includes(info.status) && userInfo.type === 0">
                <div class="box_desc_head">
                    <div class="box_desc_title" v-if="[11].includes(info.status)">
                        <i class="el-icon-success" style="color: #FF9502;"></i>
                        <span class="box_desc_title_val" style="color: #FF9502;">核赔待确认</span>
                    </div>
                    <div class="box_desc_title" v-else>
                        <i class="el-icon-success" style="color: #34C758;"></i>
                        <span class="box_desc_title_val" style="color: #34C758;">核赔已确认</span>
                    </div>
                </div>
                <div class="box_desc_ls">
                    <span>核赔赔付金额合计:</span>
                    <span>¥{{info.hpAccount + info.hpOtherAccount}}</span>
                </div>
                <div class="box_desc_lslist">
                    <div class="box_desc_lslist_title">赔付详情</div>
                    <div class="box_desc_lslist_l">
                        <div class="box_desc_lslist_l_row" v-for="(item, index) in JSON.parse(info.hpAccountContent).filter(row => row.type === 0)" :key="index">
                            <span>{{item.name}}</span>
                            <span>{{item.fee}}</span>
                            <span>{{item.describe}}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="box_desc" v-if="[10,11,12,13].includes(info.status) && userInfo.type === 0">
                <div class="box_desc_head">
                    <div class="box_desc_title">
                        <i class="el-icon-success"></i>
                        <span class="box_desc_title_val" style="color: #34C758;">理算完成</span>
                    </div>
                </div>
                <div class="box_desc_ls">
                    <span>理算赔付金额合计:</span>
                    <span>¥{{info.claimAccount + info.otherAccount}}</span>
                </div>
                <div class="box_desc_lslist">
                    <div class="box_desc_lslist_title">赔付详情</div>
                    <div class="box_desc_lslist_l">
                        <div class="box_desc_lslist_l_row" v-for="(item, index) in JSON.parse(info.accountContent).filter(row => row.type === 0)" :key="index">
                            <span>{{item.name}}</span>
                            <span>{{item.fee}}</span>
                            <span>{{item.describe}}</span>
                        </div>
                    </div>
                </div>
            </div>
@@ -26,64 +164,91 @@
                <div class="box_desc_head">
                    <div class="box_desc_title">
                        <span class="box_desc_title_val">报案详情</span>
                        <div class="box_desc_title_zt" v-if="info.statusName">{{info.statusName}}</div>
                        <div class="box_desc_title_tips" @click="$refs.riskCaseReminder.open('风险案件提醒', info.riskContent)" v-if="info.isRisk === 1">
                            <i class="el-icon-warning"></i>
                            <span>风险案件</span>
                        </div>
                        <template v-if="userInfo.type === 0">
                            <el-select v-model="info.caseType" @change="setCaseType" style="width: 100px;" placeholder="案件类型" v-if="[9,10,11,12].includes(info.status)">
                                <el-option label="医疗" :value="1"></el-option>
                                <el-option label="伤残" :value="2"></el-option>
                                <el-option label="死亡" :value="3"></el-option>
                            </el-select>
                        </template>
                    </div>
                    <div class="box_desc_btns">
                        <el-button type="danger" @click="show = true">退回</el-button>
                        <el-button type="primary">立案</el-button>
                        <el-button icon="el-icon-refresh-left" type="primary" circle></el-button>
                        <div class="box_desc_btns_operate">
                            <i class="el-icon-arrow-down"></i>
                            <span>收起</span>
                        </div>
                        <template v-if="userInfo.type === 1">
                            <el-button type="danger" @click="revoke()" v-if="[1,2,3,4,5,9,7,10].includes(info.status)">撤销报案</el-button>
                            <el-button type="primary" @click="$refs.additionMaterial_ba.open('补充材料', info.id)" v-if="[9].includes(info.status) && info.waitSupplement === 1">补充材料</el-button>
                        </template>
                        <template v-if="userInfo.type === 0">
                            <el-button type="danger" @click="returnCase" v-if="[1,2].includes(info.status)">退回</el-button>
                            <el-button type="primary" @click="register" v-if="[1,2].includes(info.status)">立案</el-button>
                            <el-button type="primary" @click="$refs.acceptance.open('案件受理', info.id)" v-if="[3,5].includes(info.status)">受理</el-button>
                            <el-button type="primary" @click="addRemark" v-if="![0,1,2,4,14].includes(info.status)">备注</el-button>
                            <el-button type="primary" @click="addReport(1)" v-if="[3,9].includes(info.status) && info.reportNumStatus === 0">添加报案号</el-button>
                            <el-button type="primary" @click="addReport(2)" v-if="[9].includes(info.status) && info.reportNumStatus === 1">编辑报案号</el-button>
                            <el-button type="primary" @click="$refs.adjustment.open('理算', info.id, 1)" v-if="[9].includes(info.status)">理算</el-button>
                            <el-button type="primary" @click="$refs.adjustment.open('重新理算', info.id, 1)" v-if="[10].includes(info.status)">重新理算</el-button>
                            <el-button type="primary" @click="$refs.adjustment.open('核赔', info.id, 2)" v-if="[10].includes(info.status)">核赔</el-button>
                            <el-button type="primary" @click="$refs.adjustment.open('修改金额', info.id, 2)" v-if="[11,12].includes(info.status)">修改金额</el-button>
                            <el-button type="primary" @click="$refs.makePayment.open('打款', info.id)" v-if="[12].includes(info.status)">打款</el-button>
                            <el-button type="primary" @click="$refs.discussAudit.open('商议审批', info.id)" v-if="[7].includes(info.status)">商议审批</el-button>
                            <el-button type="primary" @click="supplementaryMaterials" v-if="[9].includes(info.status)">补充材料</el-button>
                            <el-button type="primary" @click="$refs.additionMaterial_ba.open('添加材料', info.id)" v-if="[9,10].includes(info.status)">添加材料</el-button>
                        </template>
                        <el-button icon="el-icon-refresh-left" type="primary" title="查看案件进度" circle @click="$refs.caseProgress.open('案件进度', info.settleClaimsLogList)" v-if="![0].includes(info.status)"></el-button>
                    </div>
                </div>
                <div class="box_desc_list">
                    <div class="box_desc_list_row">
                        报案时间:2024-09-12 03:50
                        报案时间:{{info.createDate}}
                    </div>
                    <div class="box_desc_list_row">
                        报案号:YYBLP-2025010101
                        报案号:{{info.code}}
                    </div>
                    <div class="box_desc_list_row">
                        所属保单:2984719842130 <el-button type="text">下载保单</el-button>
                        保司报案号:{{info.reportNum}}
                    </div>
                    <div class="box_desc_list_row">
                        报案人:尹晓凤
                        所属保单:{{info.applyCode}}
                    </div>
                    <div class="box_desc_list_row">
                        报案人联系方式:15556970338
                        报案人:{{info.informantName}}
                    </div>
                    <div class="box_desc_list_row">
                        保司报案号:-
                       报案人联系方式:{{info.informantPhone}}
                    </div>
                    <div class="box_desc_list_zw"></div>
                </div>
            </div>
            <div class="box_fx">
            <div class="box_fx" v-if="info.isRisk === 1 && showIsRisk ===true ">
                <div class="box_fx_left">
                    <i class="el-icon-warning"></i>
                    <span class="box_fx_left_a">注意,该案件有5条风险信息</span>
                    <span class="box_fx_left_b">查看详情</span>
                    <span class="box_fx_left_a">注意,该案件有{{info.riskContent.length}}条风险信息</span>
                    <span class="box_fx_left_b" @click="$refs.riskCaseReminder.open('风险案件提醒', info.riskContent)">查看详情</span>
                </div>
                <i class="el-icon-close"></i>
                <i class="el-icon-close" @click="closeRiskTip"></i>
            </div>
            <div class="box_desc">
                <div class="box_desc_head">
                    <div class="box_desc_title">
                        <span class="box_desc_title_val">出险人信息</span>
                    </div>
                    <div class="box_desc_btns">
                        <div class="box_desc_btns_operate">
                            <i class="el-icon-arrow-down"></i>
                            <span>收起</span>
                        </div>
                    </div>
<!--                    <div class="box_desc_btns">-->
<!--                        <div class="box_desc_btns_operate">-->
<!--                            <i class="el-icon-arrow-down"></i>-->
<!--                            <span>收起</span>-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="box_desc_list">
                    <div class="box_desc_list_row">
                        出险人姓名:李静
                        出险人姓名:{{info.memberName}}
                    </div>
                    <div class="box_desc_list_row">
                        出险人身份证号:340122200603251924
                        出险人身份证号:{{info.idcardNo}}
                    </div>
                    <div style="width: 33%; height: 0;"></div>
                </div>
@@ -94,22 +259,13 @@
                </div>
                <div class="box_desc_f">
                    <div class="box_desc_fa">
                        <div class="box_desc_fa_title">工伤意外险-B类</div>
                        <div class="box_desc_fa_row">保单号:20241225133229</div>
                        <div class="box_desc_fa_row">保障期限:2025-01-01~2025-12-31</div>
                        <div class="box_desc_fa_row">投保单位:XXX信息科技有限公司</div>
                        <div class="box_desc_fa_row">派遣单位:XXX信息科技有限公司</div>
                        <div class="box_desc_fa_row">所属工种:电子器械制造工</div>
                        <div class="box_desc_fa_title">{{info.solutionName}}</div>
                        <div class="box_desc_fa_row">保单号:{{info.applyCode}}</div>
                        <div class="box_desc_fa_row">保障期限:{{info.baoxianStartTime}}~{{info.baoxianEndTime}}</div>
                        <div class="box_desc_fa_row">投保单位:{{info.companyName}}</div>
                        <div class="box_desc_fa_row">派遣单位:{{info.duName}}</div>
                        <div class="box_desc_fa_row">所属工种:{{info.worktypeName}}</div>
                    </div>
                    <div class="box_desc_fa">
                        <div class="box_desc_fa_title">工伤意外险-B类</div>
                        <div class="box_desc_fa_row">保单号:20241225133229</div>
                        <div class="box_desc_fa_row">保障期限:2025-01-01~2025-12-31</div>
                        <div class="box_desc_fa_row">投保单位:XXX信息科技有限公司</div>
                        <div class="box_desc_fa_row">派遣单位:XXX信息科技有限公司</div>
                        <div class="box_desc_fa_row">所属工种:电子器械制造工</div>
                    </div>
                    <div style="width: 32%; height: 0;"></div>
                </div>
                <div class="box_desc_head">
                    <div class="box_desc_title">
@@ -118,36 +274,51 @@
                </div>
                <div class="box_desc_list">
                    <div class="box_desc_list_row">
                        出险时间:2024-06-13 07:40:00
                        出险时间:{{info.happenTime}}
                    </div>
                    <div class="box_desc_list_row">
                        就诊医疗机构:合肥第二人民医院
                        就诊医疗机构:{{info.hospital}}
                    </div>
                    <div class="box_desc_list_row">
                        出现地区:安徽省合肥市肥东县
                        出险地区:{{info.areaInfo}}
                    </div>
                    <div class="box_desc_list_row" style="width: 100%;">
                        出险经过:上班时间骑车被撞。头部遭到撞击CT还没出来, 脚踝还有左边大腿外侧严重擦伤。
                    </div>
                    <div class="box_desc_list_row">
                        事故类型:上下班途中受伤
                    </div>
                    <div class="box_desc_list_row">
                        是否住院:是
                    </div>
                    <div class="box_desc_list_row">
                        是否有医疗保险:是
                        出险经过:{{info.content}}
                    </div>
                    <div class="box_desc_list_row" style="width: 100%;">
                        就诊类型:住院
                        事故类型:{{returnType(info.type)}}
                    </div>
                    <div class="box_desc_list_row">
                        是否伤残:{{returnName(info.hurtType)}}
                    </div>
                    <div class="box_desc_list_row">
                        是否有医保:{{returnName(info.medicalInsurance)}}
                    </div>
                    <div class="box_desc_list_row">
                        就诊类型:{{returnInHospital(info.inHospital)}}
                    </div>
                    <div class="box_desc_list_zw"></div>
                    <div class="box_desc_list_img">
                        <span>事故视频/照片:</span>
                        <div class="box_desc_list_img_files">
                            <div class="box_desc_list_img_files_row">
                                <img src="" alt="" />
                            </div>
                            <PreviewArea :list="info.reportFileList || []" />
                        </div>
                    </div>
                </div>
                <div class="box_desc_head" style="margin-top: 30px;">
                    <div class="box_desc_title">
                        <span class="box_desc_title_val">收款信息</span>
                    </div>
                </div>
                <div class="box_desc_list">
                    <div class="box_desc_list_row">
                        收款银行:{{info.receiveBank}}
                    </div>
                    <div class="box_desc_list_row">
                        收款人:{{info.receiveUserName}}
                    </div>
                    <div class="box_desc_list_row">
                        收款账号:{{info.receiveAccount}}
                    </div>
                </div>
            </div>
@@ -156,12 +327,12 @@
                    <div class="box_desc_title">
                        <span class="box_desc_title_val">理赔材料</span>
                    </div>
                    <div class="box_desc_btns">
                        <div class="box_desc_btns_operate">
                            <i class="el-icon-arrow-down"></i>
                            <span>收起</span>
                        </div>
                    </div>
<!--                    <div class="box_desc_btns">-->
<!--                        <div class="box_desc_btns_operate">-->
<!--                            <i class="el-icon-arrow-down"></i>-->
<!--                            <span>收起</span>-->
<!--                        </div>-->
<!--                    </div>-->
                </div>
                <div class="box_desc_cailiao">
                    <div class="box_desc_cailiao_title">
@@ -169,9 +340,7 @@
                        <span>员工关系证明材料</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea :list="info.relationFileList || []" />
                    </div>
                </div>
                <div class="box_desc_cailiao">
@@ -180,9 +349,7 @@
                        <span>门诊</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea :list="info.outpatientFileList || []" />
                    </div>
                </div>
                <div class="box_desc_cailiao">
@@ -191,9 +358,7 @@
                        <span>住院</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea :list="info.hospitalFileList || []" />
                    </div>
                </div>
                <div class="box_desc_cailiao">
@@ -202,9 +367,7 @@
                        <span>伤残</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea :list="info.disabilityFileList || []" />
                    </div>
                </div>
                <div class="box_desc_cailiao">
@@ -213,9 +376,7 @@
                        <span>其他材料</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea :list="info.otherFileList || []" />
                    </div>
                </div>
                <div class="box_desc_cailiao">
@@ -224,71 +385,65 @@
                        <span>补充材料</span>
                    </div>
                    <div class="box_desc_cailiao_list">
                        <div class="box_desc_cailiao_list_img" v-for="(item, index) in 3" :key="index">
                            <img src="" alt="" />
                        </div>
                        <PreviewArea   :list="info.supplementFileList || []" />
                    </div>
                </div>
            </div>
        </div>
        <!--    退回    -->
        <el-dialog
            title="退回"
            :visible.sync="show"
            width="500px">
            <span>这是一段信息</span>
            <span slot="footer" class="dialog-footer">
                <el-button @click="show = false">取消</el-button>
                <el-button type="primary" @click="show = false">确定退回</el-button>
            </span>
        </el-dialog>
        <!--    风险案件提醒    -->
        <RiskCaseReminder ref="riskCaseReminder" />
        <!--    案件进度    -->
        <CaseProgress ref="caseProgress" />
        <!--    受理    -->
        <Acceptance ref="acceptance" @success="getDetail" />
        <discussAudit ref="discussAudit" @success="getDetail" />
        <!--    添加材料    -->
        <AdditionMaterial_ba ref="additionMaterial_ba" @success="getDetail" />
        <!--    理算    -->
        <adjustment ref="adjustment" @success="getDetail" />
        <!--  赔付详情  -->
        <CompensationDetails ref="compensationDetails" />
        <!--    修改收款信息    -->
        <PaymentInformation ref="paymentInformation" @success="getDetail" />
        <!--   打款     -->
        <MakePayment ref="makePayment" @success="getDetail" />
    </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { findById } from '@/api/business/settleClaims'
import {
  register,
  addReportNum,
  addRemark,
  saveSupplementDescribe,
  updCaseType,
  confirmFee,
  returnSettle
} from '@/api/business/settleRisk'
import RiskCaseReminder from '@/components/business/riskCaseReminder'
import CaseProgress from '@/components/business/caseProgress'
import Acceptance from '@/components/business/acceptance'
import discussAudit from '@/components/business/discussAudit'
import AdditionMaterial_ba from '@/components/business/additionMaterial_ba'
import adjustment from '@/components/business/adjustment'
import CompensationDetails from '@/components/business/compensationDetails'
import PaymentInformation from '@/components/business/paymentInformation'
import MakePayment from '@/components/business/makePayment'
import PreviewArea from '@/components/common/previewArea'
import { mapState } from 'vuex'
export default {
  name: 'OperaSettleClaimsWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  components: { GlobalWindow, MakePayment, PreviewArea, PaymentInformation, CompensationDetails, RiskCaseReminder, CaseProgress, Acceptance,discussAudit, AdditionMaterial_ba, adjustment },
  data () {
    return {
        show: false,
        statusList: [
            {
                name: '报案',
                info: '已报案',
                date: '2025-03-03 12:31'
            },
            {
                name: '立案',
                info: '待立案',
                date: ''
            },
            {
                name: '受理',
                info: '',
                date: ''
            },
            {
                name: '理算',
                info: '',
                date: ''
            },
            {
                name: '核赔',
                info: '',
                date: ''
            },
            {
                name: '结案',
                info: '',
                date: ''
            }
        ]
      info: null,
      id: null,
      showIsRisk: true
    }
  },
  computed: {
@@ -301,14 +456,454 @@
    })
  },
  methods: {
    open (title, id) {
      this.title = title
      this.id = id
      this.getDetail()
    },
    closeRiskTip(){
      this.showIsRisk= false
    },
    setCaseType (e) {
      updCaseType({ id: this.id, caseType: e })
        .then(res => {
          this.getDetail()
        })
        .catch(err => {
            this.$message.error(err.message)
        })
    },
    supplementaryMaterials () {
      this.$prompt('补充说明', '补充材料', {
        confirmButtonText: '提交',
        cancelButtonText: '取消',
        inputType: 'textarea',
        inputPattern: /^(?:.|\n)+$/,
        inputErrorMessage: '补充说明不能为空!',
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            instance.confirmButtonLoading = true
            saveSupplementDescribe({ id: this.id, describe: instance.inputValue })
                .then((res) => {
                  done()
                })
                .catch((data) => {
                  this.$message.error(data.message)
                })
                .finally(() => {
                  instance.confirmButtonLoading = false
                })
          } else {
            done()
          }
        }
      }).then(({ value }) => {
        this.getDetail()
      }).catch(() => {
      })
    },
    addRemark () {
      this.$prompt('备注', '添加备注', {
        confirmButtonText: '添加',
        cancelButtonText: '取消',
        inputType: 'textarea',
        inputPattern: /^(?:.|\n)+$/,
        inputErrorMessage: '备注不能为空!',
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            instance.confirmButtonLoading = true
            addRemark({ id: this.id, describe: instance.inputValue })
                .then((res) => {
                  done()
                })
                .catch((data) => {
                  this.$message.error(data.message)
                })
                .finally(() => {
                  instance.confirmButtonLoading = false
                })
          } else {
            done()
          }
        }
      }).then(({ value }) => {
        this.getDetail()
      }).catch(() => {
      })
    },
    addReport (type) {
      this.$prompt('报案号', `${type === 1 ? '添加报案号' : '编辑报案号'}`, {
        confirmButtonText: '添加',
        cancelButtonText: '取消',
        inputPattern: /^(?:.|\n)+$/,
        inputErrorMessage: '报案号不能为空!',
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            instance.confirmButtonLoading = true
            addReportNum({ id: this.id, reportNum: instance.inputValue })
              .then((res) => {
                done()
              })
              .catch((data) => {
                this.$message.error(data.message)
              })
              .finally(() => {
                instance.confirmButtonLoading = false
              })
          } else {
            done()
          }
        }
      }).then(({ value }) => {
        this.getDetail()
      }).catch(() => {
      })
    },
    register () {
      this.$prompt('立案说明', '立案', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputType: 'textarea',
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            instance.confirmButtonLoading = true
            register({ id: this.id, describe: instance.inputValue, registerStatus: 3 })
                .then((res) => {
                  done()
                })
                .catch((data) => {
                  this.$message.error(data.message)
                })
                .finally(() => {
                  instance.confirmButtonLoading = false
                })
          } else {
            done()
          }
        }
      }).then(({ value }) => {
        this.getDetail()
      }).catch(() => {
      })
    },
    returnCase () {
      this.$prompt('退回说明', '退回', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputType: 'textarea',
        inputPattern: /^(?:.|\n)+$/,
        inputErrorMessage: '退回说明不能为空!',
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            instance.confirmButtonLoading = true
            register({ id: this.id, describe: instance.inputValue, registerStatus: 4 })
                .then((res) => {
                  done()
                })
                .catch((data) => {
                  this.$message.error(data.message)
                })
                .finally(() => {
                  instance.confirmButtonLoading = false
                })
          } else {
            done()
          }
        }
      }).then(({ value }) => {
        this.getDetail()
      }).catch(() => {
      })
    },
    getDetail () {
      findById(this.id)
        .then(res => {
          res.riskContent = JSON.parse(res.riskContent)
          this.info = res
          this.info.showIsRisk = true
          this.visible = true
        })
    },
    // 撤销
    revoke () {
      this.$confirm('撤销后,案件直接结束,无法继续进行理赔操作!', '是否撤销报案?', {
        confirmButtonText: '确定撤销',
        cancelButtonText: '我再想想',
        type: 'warning',
      }).then(() => {
        returnSettle({ id: this.info.id })
          .then(res => {
            this.getDetail()
          }).catch(err => {
              console.log(err)
            this.$message.error(err.message)
        })
      }).catch(() => {
      })
    },
    returnInHospital (type) {
      switch (type) {
      case 0:
        return '住院'
      case 1:
        return '门诊'
      }
    },
    returnName (type) {
      switch (type) {
      case 0:
        return '是'
      case 1:
        return '否'
      case 2:
        return '待确定'
      default:
        return ''
      }
    },
    returnType (type) {
      switch (type) {
      case 0:
        return '工作期间受伤'
      case 1:
        return '上下班途中受伤'
      case 2:
        return '非工作时间受伤'
      case 3:
        return '意外受伤'
      }
    },
    confirmFeeInfo () {
      this.$confirm('是否确认赔付金额?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        confirmFee(this.id)
          .then(res => {
            this.getDetail()
          })
      }).catch(() => {
      })
    }
  }
}
</script>
<style lang="scss" scoped>
    .box {
        //margin-left: 30px;
        width: 100%;
        .box_tui {
            width: 100%;
            padding: 17px 0;
            box-sizing: border-box;
            margin-bottom: 30px;
            .box_tui_status {
                padding: 3px 8px;
                border-radius: 15px;
                background-color: rgba(254,226,225,1);
                color: rgba(153,27,27,1);
                font-size: 12px;
            }
            .box_tui_title {
                color: rgba(16,16,16,1);
                font-size: 16px;
                margin-top: 15px;
            }
            .box_tui_info {
                color: rgba(154,154,154,1);
                font-size: 14px;
                margin-top: 10px;
            }
            .box_tui_row {
                color: rgba(16,16,16,1);
                font-size: 14px;
                margin-top: 10px;
                display: flex;
                align-items: center;
                .yuan {
                    width: 5px;
                    height: 5px;
                    border-radius: 50%;
                    margin-right: 5px;
                    background-color: rgba(153,27,27,1);
                }
            }
        }
        .box_dk {
            width: 100%;
            display: flex;
            flex-direction: column;
            margin-bottom: 30px;
            .box_dk_title {
                width: 100%;
                display: flex;
                align-items: center;
                margin-bottom: 12px;
                i {
                    font-size: 20px;
                    margin-right: 5px;
                    color: #34C758;
                }
                span {
                    color: rgba(52,199,88,1);
                    font-size: 18px;
                }
            }
            .box_dk_list {
                width: 100%;
                display: flex;
                flex-direction: column;
                .box_dk_list_row {
                    width: 100%;
                    display: flex;
                    align-items: start;
                    margin-bottom: 15px;
                    &:last-child {
                        margin: 0 !important;
                    }
                    .box_dk_list_row_label {
                        flex-shrink: 0;
                        color: rgba(16,16,16,1);
                        font-size: 14px;
                    }
                    .box_dk_list_row_value {
                        flex: 1;
                        color: rgba(16,16,16,1);
                        font-size: 14px;
                    }
                    .box_dk_list_row_l {
                        flex: 1;
                        display: flex;
                        align-items: center;
                        flex-wrap: wrap;
                        .box_dk_list_row_l_img {
                            width: 80px;
                            height: 80px;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            overflow: hidden;
                            margin-right: 15px;
                            margin-bottom: 15px;
                            img {
                                width: 100%;
                                height: 100%;
                            }
                        }
                    }
                }
            }
        }
        .box_sinfo {
            width: 100%;
            display: flex;
            flex-direction: column;
            margin-bottom: 30px;
            .box_sinfo_title {
                width: 100%;
                display: flex;
                align-items: center;
                margin-bottom: 26px;
                span {
                    &:nth-child(1) {
                        color: rgba(16,16,16,1);
                        font-size: 16px;
                        margin-right: 10px;
                    }
                    &:nth-child(2) {
                        color: rgba(22,93,255,1);
                        font-size: 14px;
                        cursor: pointer;
                        text-decoration: underline;
                    }
                }
            }
            .box_sinfo_row {
                width: 100%;
                margin-bottom: 15px;
                display: flex;
                align-items: center;
                .box_sinfo_row_label {
                    flex-shrink: 0;
                    color: rgba(154,154,154,1);
                    font-size: 14px;
                }
                .box_sinfo_row_val {
                    flex: 1;
                    color: rgba(16,16,16,1);
                    font-size: 14px;
                }
            }
        }
        .box_price {
            width: 100%;
            padding: 30px 0;
            background-color: #ffffff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            border-bottom: 1px solid #ececec;
            .box_price_title {
                color: rgba(16,16,16,1);
                font-size: 20px;
                margin-bottom: 10px;
            }
            .box_price_jine {
                color: rgba(255,162,63,1);
                font-size: 29px;
                margin-bottom: 10px;
            }
        }
        .box_comInfo {
            width: 100%;
            padding: 11px 21px;
            box-sizing: border-box;
            background-color: rgba(240,246,254,1);
            display: flex;
            flex-direction: column;
            margin-bottom: 30px;
            .box_comInfo_title {
                width: 100%;
                display: flex;
                align-items: center;
                margin-bottom: 12px;
                i {
                    color: #165DFF;
                    font-size: 20px;
                    margin-right: 5px;
                }
                span {
                    color: rgba(16,16,16,1);
                    font-size: 14px;
                }
            }
            .box_comInfo_text {
                width: 100%;
                padding-left: 20px;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                span {
                    color: rgba(16,16,16,1);
                    font-size: 14px;
                    margin-bottom: 10px;
                    &:last-child {
                        margin: 0 !important;
                    }
                }
            }
        }
        .box_status {
            width: 100%;
            padding: 30px 0;
@@ -316,25 +911,27 @@
            display: flex;
            align-items: start;
            justify-content: center;
            margin-bottom: 30px;
            /*margin-bottom: 30px;*/
            .box_status_row {
                width: 200px;
                display: flex;
                align-items: start;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                position: relative;
                .box_status_row_xian {
                    position: absolute;
                    right: 30px;
                    top: 10px;
                    width: calc(100% - 110px);
                    right: -55px;
                    top: 5px;
                    width: calc(100% - 80px);
                    height: 1px;
                    background-color: #BEBEBE;
                }
                .statusColor1 {
                    background-color: #E8F4FF !important;
                    background-color: #165DFF !important;
                }
                .statusColor2 {
                    background-color: #165DFF !important;
                    border: 1px solid #0052D9 !important;
                }
                .statusColor3 {
                    span {
@@ -342,14 +939,13 @@
                    }
                }
                .box_status_row_icon {
                    width: 28px;
                    height: 28px;
                    background-color: rgba(242,243,245,1);
                    width: 8px;
                    height: 8px;
                    border: 1px solid #C5C5C5;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 50%;
                    margin-right: 10px;
                    span {
                        color: rgba(78,89,105,1);
                        font-size: 14px;
@@ -360,7 +956,10 @@
                }
                .box_status_row_info {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-direction: column;
                    margin-top: 10px;
                    .title {
                        color: rgba(78,89,105,1);
                        font-size: 16px;
@@ -369,7 +968,7 @@
                    .info {
                        color: rgba(154,154,154,1);
                        font-size: 14px;
                        margin-top: 5px;
                        margin-top: 10px;
                    }
                }
            }
@@ -401,21 +1000,62 @@
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    .box_desc_cailiao_list_img {
                        width: 100px;
                        height: 100px;
                }
            }
            .box_desc_ls {
                width: 100%;
                display: flex;
                align-items: center;
                margin-bottom: 15px;
                span {
                    &:nth-child(1) {
                        color: rgba(0,0,0,1);
                        font-size: 16px;
                    }
                    &:nth-child(2) {
                        color: rgba(255,162,63,1);
                        font-size: 16px;
                    }
                }
            }
            .box_desc_lslist {
                width: 100%;
                display: flex;
                flex-direction: column;
                margin-bottom: 40px;
                .box_desc_lslist_title {
                    color: rgba(0,0,0,1);
                    font-size: 16px;
                    margin-bottom: 15px;
                }
                .box_desc_lslist_l {
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    padding-left: 50px;
                    box-sizing: border-box;
                    .box_desc_lslist_l_row {
                        width: 100%;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        overflow: hidden;
                        margin-right: 15px;
                        background-color: #E5E5E5;
                        margin-bottom: 13px;
                        &:last-child {
                            margin: 0;
                            margin: 0 !important;
                        }
                        img {
                            width: 100%;
                            height: 100%;
                        span {
                            &:nth-child(1) {
                                color: rgba(16,16,16,1);
                                font-size: 14px;
                            }
                            &:nth-child(2) {
                                color: rgba(16,16,16,1);
                                font-size: 14px;
                                margin: 0 30px;
                            }
                            &:nth-child(3) {
                                color: rgba(108,108,108,1);
                                font-size: 14px;
                            }
                        }
                    }
                }
@@ -423,12 +1063,18 @@
            .box_desc_head {
                width: 100%;
                display: flex;
                font-weight: bold;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 26px;
                .box_desc_title {
                    display: flex;
                    align-items: center;
                    .el-icon-success {
                        font-size: 20px;
                        color: #34C758;
                        margin-right: 10px;
                    }
                    .box_desc_title_val {
                        color: rgba(16,16,16,1);
                        font-size: 18px;
@@ -448,6 +1094,7 @@
                        margin-right: 20px;
                    }
                    .box_desc_title_tips {
                      cursor: pointer;
                        width: 84px;
                        height: 25px;
                        border-radius: 15px;
@@ -455,6 +1102,11 @@
                        align-items: center;
                        justify-content: center;
                        background-color: rgba(254,226,225,1);
                        margin-right: 20px;
                        .el-icon-warning {
                            color: #FF4D4F;
                            margin-right: 5px;
                        }
                        span {
                            color: #FF4D4F;
                            font-size: 12px;
@@ -486,6 +1138,10 @@
                align-items: center;
                justify-content: space-between;
                flex-wrap: wrap;
                .box_desc_list_zw {
                    width: 33%;
                    height: 0;
                }
                .box_desc_list_row {
                    width: 33%;
                    color: rgba(16,16,16,1);