| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350 |
- 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: "product", label: "投保险种", minWidth: 100 },
- { 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: "userid", label: "业务员工号", minWidth: 180 },
- { prop: "createtime", label: "录单日期", minWidth: 160},
- ],
- columns1: [
- { prop: "subOrderId", label: "订单号", minWidth: 180 },
- { prop: "product", label: "投保险种", minWidth: 100 },
- { 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: "userid", label: "业务员工号", minWidth: 180 },
- { 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):''
- data.source = row.managementSource
- 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
- });
- }
- });
- }
- },
- }
- }
|