| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354 |
- import CommonUtil from "@/utils/comutil.js";
- export const mixin = { // 导出混入对象
- data() {
- return {
- retrievalFields: [
- {
- name: 'provinceId',
- label: '省机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'cityId',
- label: '市机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'countyId',
- label: '区机构名称',
- type: 'select',
- options: []
- },
- {
- name: 'houseId',
- label: '门店名称',
- type: 'select',
- options: []
- },
- {
- name: 'taskNo',
- label: '任务池号',
- type: 'input',
- },
- {
- name: 'orderNo',
- label: '订单号',
- type: 'input',
- },
- {
- name: 'companyId',
- label: '保险公司',
- type: 'select',
- options: []
- },
- {
- name: 'agreeId',
- label: '协议选择',
- type: 'select',
- options: [],
- optionsIabel: "agreementName",
- },
- {
- name: 'licenseNo',
- label: '车牌号',
- type: 'input',
- Retained: true,
- },
- {
- name: 'frameNo',
- label: '车架号',
- type: 'input',
- Retained: true,
- },
- {
- name: 'engineNo',
- label: '发动机号',
- type: 'input',
- Retained: true,
- },
- {
- name: 'riskCode',
- label: '投保险种',
- type: 'select',
- Retained: true,
- options: [],
- optionsIabel: "dictTag",
- optionsValue: "dictTag",
- },
- {
- name: 'operatorId',
- label: '代理人工号',
- type: 'input',
- Retained: true,
- },
- {
- name: 'operatorName',
- label: '代理人姓名',
- type: 'input',
- Retained: true,
- },
- {
- name: 'auditId',
- label: '受理人工号',
- type: 'input',
- Retained: true,
- },
- {
- name: 'insuredName',
- label: '被保险人',
- type: 'input',
- Retained: true,
- },
- {
- name: ["quoteStartDateStr", "quoteEndDateStr"],
- label: '报价时间',
- type: 'date',
- list: 'quoteList'
- },
- {
- name: ["attachStartDateStr", "attachEndDateStr"],
- label: '起保时间',
- type: 'date',
- list: 'attachList'
- },
- ],
- loading: false,
- queryFrom: {},
- pageResult: {},
- columns: [
- { prop: "subOrderId", label: "订单号", minWidth: 180 },
- { prop: "userid", label: "业务员工号", minWidth: 180 },
- { prop: "username", label: "业务员姓名", minWidth: 180 },
- // { prop: "userid", label: "业务员", minWidth: 160, formatter: this.useridFormatter },
- { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
- // { prop: "insCompany", label: "保险公司", minWidth: 120 },
- { prop: "partnerCompaniesName", label: "合作公司", minWidth: 120 },
- // { prop: "agreementName", label: "协议", minWidth: 160 },
- { prop: "licenseno", label: "车牌号", minWidth: 160 },
- { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
- { prop: "product", label: "投保险种", minWidth: 100 },
- { prop: "createtime", label: "录单日期", minWidth: 160},
- ],
- columns1: [
- { prop: "subOrderId", label: "订单号", minWidth: 180 },
- { prop: "userid", label: "业务员工号", minWidth: 180 },
- { prop: "username", label: "业务员姓名", minWidth: 180 },
- // { prop: "userid", label: "业务员", minWidth: 160, formatter: this.useridFormatter },
- { prop: "managementSource", label: "业务来源", minWidth: 160, formatter: this.managementSourceFormatter },
- // { prop: "insCompany", label: "保险公司", minWidth: 120 },
- { prop: "partnerCompaniesName", label: "已承保公司", minWidth: 120 },
- { prop: "licenseno", label: "车牌号", minWidth: 160 },
- { prop: "jqpremium", label: "交强险保费", minWidth: 160 },
- { prop: "sypremium", label: "商业险保费", minWidth: 160 },
- // { prop: "agreementName", label: "协议", minWidth: 160 },
- { prop: "taxamount", label: "车船税", minWidth: 160 },
- { prop: "jypremium", label: "驾意险保费", minWidth: 160 },
-
-
- // { prop: "isExternal", label: "外部订单", formatter: this.isExternalFormatter},
- { prop: "insuredname", label: "投保人姓名", minWidth: 120 },
- { prop: "product", label: "投保险种", minWidth: 100 },
- { prop: "createtime", label: "录单日期", minWidth: 160},
- ],
- statusoptions: "",
- dialogVisible: false,
- companyList: [], //保险公司
- institutionOptions: [], //机构名称列表
- options: [],//转发人列表
- transmitValue: "", //选中的转发人
- orderNo: '', //主订单号
- id: '', //子订单号
- queryOrders: {},
- carImageList: [], //车辆影像
- ownerImageList: [], //车主影像
- policyImageList: [], //投保人影像
- insuredImageList: [], //被保人影像
- carCheckImageList: [], //验车照影像
- quoteno: "",
- oldfileList: [],
- orderInfo: {},
- forwardingRecordsdialogVisible:false,
- gridData:[],
- natureOfVehicleUseoptions: [],
- businessVehicleUseoptions:[],
- energyTypeoptions:[],
- vehicleTypeoptions:[],
- trafficManagementVehicleTypeoptions:[],
- outOfBusinessVehicleUseoptions: [],
- isAuditing:{
- adjustFeeFlag:false,
- },
- feeOrderNewVoList:{},
- dialogVisibleOrder:false,
- formDataOrder:{
- carinfo:{},
- ownerinfo:{},
- applyinfo:{},
- insureinfo:{},
- },
- formvehicleList: [
- { prop: "licenseNo", label: "车牌号" },
- { prop: "vinNo", label: "车辆识别代码" },
- { prop: "modelcname", label: "品牌型号" },
- { prop: "engineNo", label: "发动机号" },
- { prop: "caryear", label: "年款" },
- { prop: "seatCount", label: "座位数" },
- { prop: "completeKerbMass", label: "整备质量" },
- { prop: "limitLoad", label: "核定载质量" },
- { prop: "enginedesc", label: "排量" },
- { prop: "powerScale", label: "功率" },
- { prop: "purchasePrice", label: "新车购置价" },
- ],
- formownersList: [
- { prop: "name", label: "车主姓名" },
- { prop: "identifyType", label: "证件类型" ,type:'select'},
- { prop: "identifyNumber", label: "身份证号" },
- { prop: "mobile", label: "手机号" },
- { prop: "email", label: "电子邮箱" },
- { prop: "addr", label: "地址" },
- ],
- formPolicyholderList: [
- { prop: "name", label: "投保人姓名" },
- { prop: "identifyType", label: "证件类型" ,type:'select'},
- { prop: "identifyNumber", label: "身份证号" },
- { prop: "mobile", label: "手机号" },
- { prop: "email", label: "电子邮箱" },
- { prop: "addr", label: "地址" },
- ],
- forminsureinfoList: [
- { prop: "name", label: "被保人姓名" },
- { prop: "identifyType", label: "证件类型" ,type:'select'},
- { prop: "identifyNumber", label: "身份证号" },
- { prop: "mobile", label: "手机号" },
- { prop: "email", label: "电子邮箱" },
- { prop: "addr", label: "地址" },
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- }
- },
- whetheroptions:[
- {
- label:'是',
- value:false
- }, {
- label:'否',
- value:true
- },
- ]
- }
- },
- computed: {
- issueDateOptions() {
- return {
- disabledDate: this.disabledDate
- };
- },
- currentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, '0');
- const day = String(today.getDate()).padStart(2, '0');
- return `${year}-${month}-${day}`;
- }
- },
- created() {
- this.pageRequest.quoteStartDateStr=this.currentDate;
- this.pageRequest.quoteEndDateStr=this.currentDate;
- this.$api.letter.gainTopList().then(res => {
- this.companyList = res.data;
- });
- this.$api.dept.findAllTree().then(res => {
- this.institutionOptions = res.data;
- });
- this.areaqueryList(1, 99, "provinceId");
- this.CompanyList();
- this.agrmentlist();
- this.getDicType("productsType"); //车船税类型
- this.getDicTypePro("natureOfVehicleUse"); //车辆使用性质
- this.getDicTypePro("vehicleType"); //车辆种类
- this.getDicTypePro("trafficManagementVehicleType"); //车辆类型
- this.getDicTypePro("energyType"); //能源种类
- this.getDicTypePro("businessVehicleUse"); //(车辆用途)营业
- this.getDicTypePro("outOfBusinessVehicleUse"); //(车辆用途)非营业
- },
- methods: {
- submitOrder(){
- let data={
- ownerInfo:this.formDataOrder.ownerinfo,
- carInfo:this.formDataOrder.carinfo,
- applyInfo:this.formDataOrder.applyinfo,
- insureInfo:this.formDataOrder.insureinfo,
- subOrderNo:this.formDataOrder.id
- }
- this.$api.task.batchOrder(data).then(res => {
- if (res.code == 200) {
- this.findPage();
- this.dialogVisibleOrder=false
- this.$message({
- message: res.msg ||'操作成功',
- type: 'success'
- });
- }
- else{
- this.$message.error(res.msg);
- }
- });
- },
- disabledDate(time) {
- let datetime = this.formDataOrder.registerDate;
- return time.getTime() < new Date(datetime).getTime();
- },
- natureFun() {
- if (this.formDataOrder.carinfo.carnature == "01") {
- this.formDataOrder.carinfo.vehicleUse = "";
- }
- },
- handleCloseOrder(){
- this.dialogVisibleOrder=false
- },
- getDicTypePro(type) {
- this.$api.insCompany.dicType(type).then(res => {
- if (res.code == 200) {
- this[type + "options"] = res.data.ddList;
- }
- });
- },
- capTypedictTag(val,option) {
- if(option.find(item => item.dictValue == val)){
- return option.find(item => item.dictValue == val).dictTag;
- }
- else{
- return '-'
- }
- },
- forwardingRecords(row){
- let id=row.row.subOrderId;
- this.forwardingRecordsQuery(id);
- },
- forwardingRecordsQuery(id) {
- this.$api.letter.findForwardingListBySubOrderId(id).then((res) => {
- if (res.code == '200' && res.data.length) {
- this.gridData=res.data;
- this.forwardingRecordsdialogVisible=true;
- } else {
- this.$message({
- type: 'error',
- message: "没有转发记录",
- });
- }
- });
- },
- detailFun(row) {
- let params = {
- companyId: row.row.subOrderId
- };
- this.$api.letter.getTaskByCompanyId(params).then(res => {
- if (res.code == "200") {
- var data = res.data;
- this.orderInfo = res.data;
- this.cpolicy();
- this.ImageList();
- data.kindinfo.map((ele, index) => {
- switch (ele.kindCode) {
- case "A":
- ele.amount = "投保";
- break;
- case "D4":
- case "SY_FJ_YBW2":
- ele.unitAmount = this.toChinesNum(ele.unitAmount);
- break;
- case "MJ1":
- case "MJ2":
- case "MJ3":
- case "MJ4":
- ele.deductibleRate = ele.deductibleRate + "%";
- break;
- default:
- ele.amount = this.toChinesNum(ele.amount);
- }
- return ele;
- });
- if (data.feeOrderNewVo && data.feeOrderNewVo.exportFee && data.feeOrderNewVo.entranceFee) {
- let data1 = JSON.parse(JSON.stringify(res.data.feeOrderNewVo))
- data1.exportFee.map((val, index) => {
- val.type = "出口费用"
- return val;
- })
- data1.entranceFee.map((val, index) => {
- val.type = "入口费用"
- return val;
- })
- this.feeOrderNewVoList = {
- list: [...data1.entranceFee,...data1.exportFee],
- }
- }
- if(data.carinfo.carnature && data.carinfo.carnature == '02' || data.carinfo.carnature == '非营业'){
- data.carinfo.vehicleUse=this.capTypedictTag(data.carinfo.vehicleUse,this.outOfBusinessVehicleUseoptions)
- }else{
- data.carinfo.vehicleUse=this.capTypedictTag(data.carinfo.vehicleUse,this.businessVehicleUseoptions)
- }
- data.carinfo.carnature = this.capTypedictTag(data.carinfo.carnature,this.natureOfVehicleUseoptions);
- data.carinfo.cartype=data.carinfo.cartype?this.capTypedictTag(data.carinfo.cartype,this.trafficManagementVehicleTypeoptions):''
- data.carinfo.cimodelclass=data.carinfo.cimodelclass?this.capTypedictTag(data.carinfo.cimodelclass,this.vehicleTypeoptions):''
- data.carinfo.energyType=data.carinfo.energyType?this.capTypedictTag(data.carinfo.energyType,this.energyTypeoptions):''
- this.queryOrders = data;
- }
- else{
- this.$message.error(res.msg)
- }
- });
- this.$refs.detailsDialog.setBackupVisible(true);
- },
- batchOrder(row){
- this.dialogVisibleOrder=true
- let params = {
- companyId: row.row.subOrderId
- };
- this.$api.letter.getTaskByCompanyId(params).then(res => {
- if(res.code==200){
- this.formDataOrder = res.data;
- }
- else{
- this.$message.error(res.msg)
- }
- })
- },
- areaSelectChange(obj) {
- switch (obj.filed) {
- case 'provinceId':
- this.areaqueryList(2, obj.id, 'cityId')
- break;
- case 'cityId':
- this.areaqueryList(3, obj.id, 'countyId')
- break;
- case 'countyId':
- this.areaqueryList(4, obj.id, 'houseId')
- break;
- default:
- }
- },
- //下拉数据匹配
- selectDataMatching(files, name, data) {
- files.forEach(filed => {
- if (filed.name == name) {
- filed.options = data;
- }
- })
- },
- //获取机构数据
- areaqueryList(level, parentId, filed) {
- this.$api.task.queryListByParentId(level, parentId).then((res) => {
- this.selectDataMatching(this.retrievalFields, filed, res.data);
- });
- },
- CompanyList() {
- this.$api.letter.gainTopList().then((res) => {
- this.selectDataMatching(this.retrievalFields, 'companyId', res.data);
- })
- },
- agrmentlist() {
- this.$api.task.findPtlAgreementList().then((res) => {
- this.selectDataMatching(this.retrievalFields, 'agreeId', res.data);
- });
- },
- getDicType(type) {
- this.$api.insCompany.dicType(type).then(res => {
- if (res.code == 200) {
- this.selectDataMatching(this.retrievalFields, 'riskCode', res.data.ddList);
- }
- });
- },
- cpolicy() {
- if (this.orderInfo.orderstatus == "3") {
- this.oldfileList = [];
- let businessList = []
- let accidentList = []
- if(this.orderInfo.isExternal==1){
- this.$api.letter
- .getPolicyPrintexternalOrder(this.orderInfo.id).then(res1=>{
- if(res1.code==200){
- if (res1.data.jqPolicy) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res1.data.jqPolicy
- });
- }
- if (res1.data.jqSign) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res1.data.jqSign
- });
- }
- if (res1.data.jqSign) {
- accidentList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res1.data.jqSign
- });
- }
- if (res1.data.noPolicy) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: "驾意险保单",
- fileurl: res1.data.noPolicy
- });
- }
- }
- else{
- this.$message.error(res1.msg)
- }
- })
- }
- else{
- switch (this.orderInfo.inscompany) {
- case "永安财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .getPolicyPrint({
- companyId: this.orderInfo.id,
- policytype: "jq",
- })
- .then((res) => {
- //交强保单
- if (res.data) {
- let result = res.data.replace(/[\r\n]/g, "");
- let pdfBase64 = `data:application/pdf;base64,${result}`;
- base64ToPath(pdfBase64).then((path) => {
- if (path) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: path,
- });
- }
- });
- }
- });
- this.$api.letter
- .getPolicyPrint2({
- companyId: this.orderInfo.id,
- policytype: "jq",
- })
- .then((res) => {
- //交强保单
- if (res.data) {
- let result = res.data.replace(/[\r\n]/g, "");
- let pdfBase64 = `data:application/pdf;base64,${result}`;
- base64ToPath(pdfBase64).then((path) => {
- if (path) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: path,
- });
- }
- });
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .getPolicyPrint({
- companyId: this.orderInfo.id,
- policytype: "sy",
- })
- .then((res) => {
- //商业保单
- if (res.data) {
- let result = res.data.replace(/[\r\n]/g, "");
- let pdfBase64 = `data:application/pdf;base64,${result}`;
- base64ToPath(pdfBase64).then((path) => {
- if (path) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: path,
- });
- }
- });
- }
- });
- }
- break;
- case "华泰财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .HuataigetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- if (res.data.jqxPolicyUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxPolicyUrl,
- });
- }
- if (res.data.jqxFlagUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxFlagUrl,
- });
- }
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .HuataigetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data && res.data.syxPolicyUrl) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data.syxPolicyUrl,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- break;
- case "中煤财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .ZhongmeigetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data && res.data[0]) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data[0],
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- this.$api.letter
- .ZhongmeigetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "1", // 1:标志
- })
- .then((res) => {
- if (res.data && res.data[0]) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data[0],
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .ZhongmeigetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data && res.data[0]) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data[0],
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.crossInsurance.length > 0) {
- this.orderInfo.crossInsurance.map((ele) => {
- this.$api.letter
- .ZhongmeigetPolicyPrint({
- ridePolicyNo: ele.ridePolicyNo,
- companyId: this.orderInfo.id,
- riskCode: "0513",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.code == 200 && res.data) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data[0],
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- });
- }
- break;
- case "永诚财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .yongchenggetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.code == 200 && res.data) {
- if (res.data.jqUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqUrl,
- });
- }
- if (res.data.jqFlagUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqFlagUrl,
- });
- }
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .yongchenggetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data && res.data.syUrl) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data.syUrl,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.crossInsurance.length > 0) {
- this.orderInfo.crossInsurance.map((ele) => {
- this.$api.letter
- .yongchenggetPolicyPrint({
- companyId: this.orderInfo.id,
- policyNumber: ele.policyNumber,
- riskCode: "0513",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.code == 200 && res.data) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: ele.policyNumber,
- fileurl: res.data.jyUrl,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- });
- }
- break;
- case "国任财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .guoRengetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- this.$api.letter
- .guoRengetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "1", //1:标志
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .guoRengetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.crossInsurance.length > 0) {
- this.orderInfo.crossInsurance.map((ele) => {
- this.$api.letter
- .guoRengetPolicyPrint({
- companyId: this.orderInfo.id,
- policyNumber: ele.policyNumber,
- riskCode: "0513",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: ele.policyNumber,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- });
- }
- break;
- case "紫金财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .zijingetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- this.$api.letter
- .zijingetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "1", //1:标志
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .zijingetPolicyPrint({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.crossInsurance.length > 0) {
- this.orderInfo.crossInsurance.map((ele) => {
- this.$api.letter
- .zijingetPolicyPrint({
- companyId: this.orderInfo.id,
- policyNumber: ele.policyNumber,
- riskCode: "0513",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: ele.policyNumber,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- });
- }
- break;
- case "渤海财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .getPolicyPrintboHai({
- companyId: this.orderInfo.id,
- })
- .then((res) => {
- if (res.code == 200 && res.data) {
- if (res.data.jqxPolicyUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxPolicyUrl,
- });
- }
- if (res.data.jqxFlagUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxFlagUrl,
- });
- }
- if (res.data.syxPolicyUrl) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data.syxPolicyUrl,
- });
- }
- if (
- res.data.jyxInfoList &&
- res.data.jyxInfoList.length > 0
- ) {
- res.data.jyxInfoList.forEach((val) => {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: "驾意险保单",
- fileurl: val.jyx_policy_url,
- });
- });
- }
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- break;
- case "恒邦财险":
- case "安盛天平":
- case "中国人寿":
- case "太平财险":
- case "华农财险":
- case "众安财险":
- if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
- this.$api.letter
- .pythongetPolicyPrint({
- subOrderNo: this.orderInfo.id,
- })
- .then((res) => {
- if (res.code == 200 && res.data) {
- if (res.data.jqxPolicyUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxPolicyUrl,
- });
- }
- if (res.data.jqxFlagUrl) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data.jqxFlagUrl,
- });
- }
- if (res.data.syxPolicyUrl) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data.syxPolicyUrl,
- });
- }
- if (
- res.data.jyxInfoList &&
- res.data.jyxInfoList.length > 0
- ) {
- res.data.jyxInfoList.forEach((val) => {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: "驾意险保单",
- fileurl: val.jyx_policy_url,
- });
- });
- }
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- break;
- case "大家财险":
- if (this.orderInfo.jqpolicyno) {
- this.$api.letter
- .obtainWarranty({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子保单",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- this.$api.letter
- .obtainWarranty({
- companyId: this.orderInfo.id,
- riskCode: "0507",
- type: "1", //1:标志
- })
- .then((res) => {
- if (res.data) {
- this.oldfileList.push({
- fileTitle: "交强电子标志",
- filename: this.orderInfo.jqpolicyno,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- }
- if (this.orderInfo.sypolicyno) {
- this.$api.letter
- .obtainWarranty({
- companyId: this.orderInfo.id,
- riskCode: "0510",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- businessList.push({
- fileTitle: "商业电子保单",
- filename: this.orderInfo.sypolicyno,
- fileurl: res.data,
- });
- }
- });
- }
- if (this.orderInfo.crossInsurance.length > 0) {
- this.orderInfo.crossInsurance.map((ele) => {
- this.$api.letter
- .zijingetPolicyPrint({
- companyId: this.orderInfo.id,
- policyNumber: ele.policyNumber,
- riskCode: "0513",
- type: "2", //2:保单
- })
- .then((res) => {
- if (res.data) {
- accidentList.push({
- fileTitle: "驾意险保单",
- filename: ele.policyNumber,
- fileurl: res.data,
- });
- } else {
- this.$message.error(res.msg);
- }
- });
- });
- }
- break;
- default:
- }
- }
- let obj = {
- oldfileList: this.oldfileList,
- businessList,
- accidentList
- }
- this.$refs.detailsDialog.warrantyFun(obj);
- }
- },
- ImageList() {
- this.carImageList = [];
- this.ownerImageList = []; //车主影像
- this.policyImageList = []; //投保人影像
- this.insuredImageList = []; //被保人影像
- this.carCheckImageList = []; //验车照影像
- // 获取影像
- this.$api.letter.findByQuoteNo(this.orderInfo.quoteno).then((resImage) => {
- Object.keys(resImage.data).forEach((keys) => {
- if (resImage.data[keys]) {
- resImage.data[keys].url = resImage.data[keys].url
- ? process.env.BASE_URL + resImage.data[keys].url
- : null;
- switch (keys) {
- case "C01":
- case "D01":
- resImage.data[keys].url
- ? this.carImageList.push(resImage.data[keys].url)
- : "";
- break;
- case "C02":
- case "D02":
- resImage.data[keys].url
- ? this.ownerImageList.push(resImage.data[keys].url)
- : "";
- break;
- case "C03":
- case "D03":
- resImage.data[keys].url
- ? this.policyImageList.push(resImage.data[keys].url)
- : "";
- break;
- case "C04":
- case "D04":
- resImage.data[keys].url
- ? this.insuredImageList.push(resImage.data[keys].url)
- : "";
- break;
- case "XC00":
- case "GC00":
- case "GX00":
- resImage.data[keys].url
- ? this.carCheckImageList.push(resImage.data[keys].url)
- : "";
- break;
- default:
- break;
- }
- }
- });
- let obj = {
- carImageList: this.carImageList,
- ownerImageList: this.ownerImageList,
- policyImageList: this.policyImageList,
- insuredImageList: this.insuredImageList,
- carCheckImageList: this.carCheckImageList
- }
- this.$refs.detailsDialog.imageFun(obj);
- });
- },
- toChinesNum(num) {
- if (num.toString().length == 4) {
- let overQian = Math.floor(num / 1000);
- let result = overQian + "千";
- return result;
- } else {
- let overWan = Math.floor(num / 10000);
- let result = overWan + "万";
- return result;
- }
- },
- useridFormatter(row, column) {
- let data = row.username + `(${row.userid})`
- return data;
- },
- managementSourceFormatter(row, column) {
- let managementSource = row.managementSource;
- switch (managementSource) {
- case '渠道':
- return <el-tag>渠道</el-tag>
- case '个代':
- return <el-tag type="success">个代</el-tag>
- case '电销':
- return <el-tag type="warning">电销</el-tag>
- default:
- }
- },
- isExternalFormatter(row, column) {
- let isExternal = row.isExternal;
- switch (isExternal) {
- case 1:
- return '是'
- case 0:
- return '否'
- default:
- }
- },
- trajectory(row){
- this.$api.letter.queryBySuborder(row.subOrderId).then((res) => {
- if (res.code == 200 && res.data.length > 0) {
- this.ddgjdialogVisible = true;
- this.trajectoryTable = res.data;
- } else {
- this.$message({
- message: res.msg || "暂无数据!",
- type: "warning",
- });
- }
- });
- },
- cancelorder(item) {
- this.$api.letter.zijincancelorder({ companyId: item.subOrderId }).then(res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg,
- type: "success"
- });
- this.findPage();
- }
- else{
- this.$message.error(res.msg)
- }
- });
- },
- // 撤销二维码
- revokeCode(row) {
- this.$api.letter.getRevokeQrCode(row.subOrderId).then(res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg,
- type: "success"
- });
- this.findPage();
- }
- });
- },
- //查询缴费状态
- refreshStatus(item) {
- let inscompany = {
- 国任财险: "updateOrderInfoGuoren",
- 华泰财险: "orderStatushuatai",
- 大家财险: "updateOrderInfoDajia",
- 中煤财险: "orderStatuszhongmei",
- 太平财险: "auditStatusQuery",
- 华农财险: "auditStatusQuery",
- 恒邦财险: "auditStatusQuery",
- 众安财险: "auditStatusQuery",
- 中国人寿: "auditStatusQuery",
- 安盛天平: "auditStatusQuery",
- 紫金财险: "auditStatusQueryZijin",
- 渤海财险: "orderStatusbohai"
- };
- Object.keys(inscompany).forEach(val => {
- if (val == item.insCompany) {
- this.$api.letter[inscompany[val]]({ companyId: item.subOrderId }).then(
- res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg ? res.msg : "已刷新状态",
- type: "success"
- });
- this.findPage();
- } else {
- this.$message({
- showClose: true,
- dangerouslyUseHTMLString: true,
- message: res.msg.replace(/\n/g, "<br><br>"),
- type: "error",
- duration: 7000
- });
- }
- }
- );
- }
- });
- if (item.insCompany == "永诚财险") {
- this.$api.letter.orderStatusyongcheng(item.subOrderId).then(res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg ? res.msg : "已刷新状态",
- type: "success"
- });
- this.findPage();
- } else {
- this.$message({
- showClose: true,
- dangerouslyUseHTMLString: true,
- message: res.msg.replace(/\n/g, "<br><br>"),
- type: "error",
- duration: 7000
- });
- }
- });
- }
- if (item.insCompany == "华泰财险") {
- let HtApiType =
- item.apiType == 2
- ? "auditStatusQuery"
- : "orderStatushuatai";
- this.$api.letter[HtApiType](item.subOrderId).then(res => {
- if (res.code == 200) {
- this.$message({
- message: res.msg ? res.msg : "已刷新状态",
- type: "success"
- });
- this.findPage();
- } else {
- this.$message({
- showClose: true,
- dangerouslyUseHTMLString: true,
- message: res.msg.replace(/\n/g, "<br><br>"),
- type: "error",
- duration: 7000
- });
- }
- });
- }
- },
- }
- }
|