| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639 |
- export default {
- data() {
- return {
- immediateCoverage: "0", //即时起保标识
- transferScene: "0", //过户车标识
- biTransferScene: "0", //商业过户标识
- secondHandCarScene: "0", //二手车标识
- immediateCoverageList: [{ //即时起保选项
- label: '是',
- value: "1",
- },
- {
- label: '否',
- value: "0",
- },
- ],
- transferList: [{ //过户车选项
- label: '是',
- value: "1",
- },
- {
- label: '否',
- value: "0",
- },
- ],
- biTransferList: [{ //商业过户选项
- label: '是',
- value: "1",
- },
- {
- label: '否',
- value: "0",
- },
- ],
- secondHandCarList: [{ //商业过户选项
- label: '是',
- value: "1",
- },
- {
- label: '否',
- value: "0",
- },
- ],
- vehicleAndVesselTaxModel: {
- taxRelifFlag: "正常交税",
- taxpayerIdentifier: "身份证",
- relifReason: "",
- taxPaidAreaCode: "",
- },
- // 车船税信息
- vehicleAndVesselTaxVo: {
- taxRelifFlag: "1", //类型
- identifyNumber: "", //纳税人识别号
- taxpayerIdentifier: "01", //纳税人证件类型
- taxpayerName: "", //纳税人名称
- extendChar2: "", //减免税凭证号
- paidFreeCertificate: "", //完税凭证号
- relifReason: "", //减免税原因
- taxComCode: "", //税务机关代码
- taxComName: "", ///税务机关名称
- taxDocumentDate: "", //完税日期
- taxPaidAreaCode: "", //完税凭证地区代码
- taxRelief: "", //减税比例
- },
- carImageListId: [], //车辆影像
- ownerImageListId: [], //车主影像
- policyHolderImageListId: [], //投保人影像
- insuredPersonImageListId: [], //被保人影像
- productId: "", //报价险种code
- productName: "", //报价险种name
- quotableCompanyList: [], //可报价保险公司列表集合
- order: {},
- costs: {},
- accidentalDrivings: {},
- ciRiskInfoVo: { //交强险种大类
- amount: 0,
- endDate: '',
- instantFlag: false,
- premium: 0,
- riskCode: "0507",
- startDate: '',
- },
- biRiskInfoVo: { //商业险种大类
- amount: 0,
- endDate: '',
- instantFlag: false,
- premium: 0,
- riskCode: "0510",
- startDate: '',
- },
- quoteno: "", //报价号
- // 比价表格字段
- optimalColumn: [{
- name: 'companyName',
- label: '保险公司',
- fixed: true,
- width: 100,
- align: "center",
- },
- {
- name: 'A',
- label: '车损险',
- formatter: true,
- align: "center",
- sorter: true,
- },
- {
- name: 'B',
- label: '三者责任险',
- formatter: true,
- align: "center",
- sorter: true,
- },
- {
- name: 'D3',
- label: '司机责任险',
- align: "center",
- sorter: true,
- },
- {
- name: 'D4',
- label: '乘客责任险',
- align: "center",
- sorter: true,
- },
- {
- name: 'SY_FJ_YBW1',
- label: '附加医保外-三者',
- align: "center",
- width: 140,
- sorter: true,
- },
- {
- name: 'SY_FJ_YBW3',
- label: '附加医保外-司机',
- align: "center",
- width: 140,
- sorter: true,
- },
- {
- name: 'SY_FJ_YBW2',
- label: '附加医保外-乘客',
- align: "center",
- width: 140,
- sorter: true,
- },
- {
- name: 'TY1',
- label: '道路救援服务特约条款',
- align: "center",
- width: 180,
- sorter: true,
- },
- {
- name: 'TY1',
- label: '车辆安全检测特约条款',
- align: "center",
- width: 180,
- sorter: true,
- },
- {
- name: 'TY3',
- label: '代为驾驶服务特约条款',
- align: "center",
- width: 180,
- sorter: true,
- },
- {
- name: 'TY4',
- label: '代为送检服务特约条款',
- align: "center",
- width: 180,
- sorter: true,
- },
- {
- name: 'L',
- label: '附加车身划痕损失险',
- align: "center",
- width: 180,
- sorter: true,
- },
- {
- name: 'BD',
- label: '附加法定节假日限额翻倍险',
- align: "center",
- width: 220,
- sorter: true,
- },
- {
- name: 'MJ1',
- label: '附加绝对免赔率特约条款(车损)',
- align: "center",
- width: 260,
- sorter: true,
- },
- {
- name: 'MJ2',
- label: '附加绝对免赔率特约条款(机动车第三者责任保险)',
- align: "center",
- width: 350,
- sorter: true,
- },
- {
- name: 'MJ3',
- label: '附加绝对免赔率特约条款(机动车车上人员责任保险(司机))',
- align: "center",
- width: 420,
- sorter: true,
- },
- {
- name: 'MJ4',
- label: '附加绝对免赔率特约条款(机动车车上人员责任保险(乘客))',
- align: "center",
- width: 420,
- sorter: true,
- },
- ],
- optimalData: [], //比价列表
- // 保险公司icon
- companylogoList: [{
- name: "中煤财险",
- icon: "/static/image/insuranceCompany/zhongmei.png"
- }, //华农
- {
- name: "恒邦财险",
- icon: "/static/image/insuranceCompany/hengbang.png"
- },
- {
- name: "安盛天平",
- icon: "/static/image/insuranceCompany/ansheng.png"
- },
- {
- name: "中国人寿",
- icon: "/static/image/insuranceCompany/renshou.png"
- },
- {
- name: "众安财险",
- icon: "/static/image/insuranceCompany/zhongan.png"
- },
- {
- name: "永诚财险",
- icon: "/static/image/insuranceCompany/yongcheng.png"
- },
- {
- name: "永安财险",
- icon: "/static/image/insuranceCompany/yongan.png"
- },
- {
- name: "紫金财险",
- icon: "/static/image/insuranceCompany/zijin.png"
- },
- {
- name: "国任财险",
- icon: "/static/image/insuranceCompany/guoren.png"
- },
- {
- name: "华泰财险",
- icon: "/static/image/insuranceCompany/huatai.png"
- },
- {
- name: "大家财险",
- icon: "/static/image/insuranceCompany/dajia.png"
- },
- {
- name: "太平财险",
- icon: "/static/image/insuranceCompany/taiping.png"
- },
- {
- name: "华农财险",
- icon: "/static/image/insuranceCompany/huanong.png"
- },
- {
- name: "渤海财险",
- icon: "/static/image/insuranceCompany/bohai.png"
- },
- {
- name: "泰康财险",
- icon: "/static/image/insuranceCompany/taikang.png"
- },
- {
- name: "诚泰财险",
- icon: "/static/image/insuranceCompany/chengtai.png"
- },
- {
- name: "阳光财险",
- icon: "/static/image/insuranceCompany/yangguang.png"
- },
- {
- name: "太平洋财险",
- icon: "/static/image/insuranceCompany/taipingyang.png"
- },
- {
- name: "泰山财险",
- icon: "/static/image/insuranceCompany/taishan.png"
- },
- ]
- };
- },
- watch: {
- // 过户车
- 'carInfo.transfer': {
- handler(val) {
- if (val) {
- this.transferScene = '1';
- } else {
- this.transferScene = '0';
- }
- },
- },
- // 商业过户
- 'carInfo.biTransfer': {
- handler(val) {
- if (val) {
- this.biTransferScene = '1';
- } else {
- this.biTransferScene = '0';
- }
- },
- },
- //二手车
- 'carInfo.secondHandCar': {
- handler(val) {
- if (val) {
- this.secondHandCarScene = '1';
- } else {
- this.secondHandCarScene = '0';
- }
- },
- },
- },
- methods: {
- //与当前日期对比
- isDateBeforeToday(date) {
- const inputDate = new Date(date); // 将输入的日期转换为 Date 对象
- const today = new Date(); // 获取当前日期
- // 比较日期是否小于当前日期
- if (inputDate < today) {
- return true; // 输入日期小于当前日期
- } else {
- return false; // 输入日期大于等于当前日期
- }
- },
- //更新车辆性质
- transferChange(e, name) {
- console.log(e, name);
- if (e == 1) {
- this.carInfo[name] = true;
- if (name == 'transfer') { //过户车给转移登记日期赋值
- this.carInfo.transferDate = this.carInfo.issueDate;
- }
- } else {
- this.carInfo[name] = false;
- if (name == 'transfer') {
- this.carInfo.transferDate = "";
- }
- }
- },
- // 比价表格数据格式化
- tableformatter(row, column, rowIndex, columnIndex) {
- return `${row.age}\n${row.id}`
- },
- // 表格头部样式
- cellheaderStyle() {
- return {
- color: '#333',
- fontSize: '28rpx'
- }
- },
- //影像查询
- async imageEcho(list) {
- list.forEach((keys) => {
- switch (keys.imageCode) {
- case 'C01':
- this.carImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'D01':
- this.carImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'C02':
- this.ownerImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'D02':
- this.ownerImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'C03':
- this.policyHolderImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'D03':
- this.policyHolderImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'C04':
- this.insuredPersonImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- case 'D04':
- this.insuredPersonImageListId.push({
- imageBase64List: [{
- imageId: keys.imageBase64List[0].imageId
- }],
- imageCode: keys.imageCode,
- })
- break;
- default:
- break;
- }
- });
- },
- //保险公司数据前置处理
- commpanyList(item) {
- console.log(this.quotableCompanyList);
- let quoteRecord = (item && item.insCompanyVo && item.insCompanyVo[0]) || {};
- this.quotableCompanyList.map(ele => {
- ele["result"] = {};
- ele["quoteCode"] = 0;
- ele["checked"] = false;
- ele["msg"] = "";
- ele["lastYearMsg"] = "";
- ele["agreementName"] = "";
- ele["apiType"] = "";
- ele["coefficient"] = "";
- ele["discount"] = "";
- ele["isInspect"] = false;
- ele["syAdjustRate"] = "";
- ele["selectShow"] = false;
- ele['underwritingDescription'] = "";
- ele['isComparableShow'] = false;
- ele['isComparableshowHide'] = false;
- ele['isComparableDisabled'] = false;
- ele['insurancePlanInfo'] = null;
- if (quoteRecord.id && ele.id === quoteRecord.id) {
- if (quoteRecord.costs && quoteRecord.costs.sumPremium) {
- ele.result = item;
- ele.insurancePlanInfo = {};
- ele.insurancePlanInfo.drivings = item.accidentalDrivings;
- ele.insurancePlanInfo.kinds = item.kindInfoVo.filter(item => item.kindCode != 'J1');
- ele.quoteCode = 200;
- } else {
- ele.result = item;
- ele.msg = item.errorMessage;
- ele.insurancePlanInfo = {};
- ele.insurancePlanInfo.drivings = item.accidentalDrivings;
- ele.insurancePlanInfo.kinds = item.kindInfoVo.filter(item => item.kindCode != 'J1');
- ele.quoteCode = 3;
- }
- }
- return ele;
- })
- },
- //根据报价险种更新险种大类日期
- riskTypeEchoProcessing(code) {
- switch (code) {
- case '0330':
- this.ciRiskInfoVo.startDate = this.jqstartDate;
- this.ciRiskInfoVo.endDate = this.jqendDate;
- break;
- case '034001':
- case '034002':
- this.biRiskInfoVo.startDate = this.systartDate;
- this.biRiskInfoVo.endDate = this.syendDate;
- break;
- case '0330034002':
- case '0330034001':
- this.ciRiskInfoVo.startDate = this.jqstartDate;
- this.ciRiskInfoVo.endDate = this.jqendDate;
- this.biRiskInfoVo.startDate = this.systartDate;
- this.biRiskInfoVo.endDate = this.syendDate;
- break;
- }
- },
- //跳转微信客服
- async getWechatCustomer() {
- let res = await this.$http.get('/organization/wechat/customerService/manage/find/link')
- if (res.code == 200) {
- if (plus) { // 确保在App环境下
- plus.runtime.openURL(res.data);
- }
- }
- },
- //右上角返回主页
- home() {
- uni.switchTab({
- url: '/pages/index/index'
- })
- },
- back() {
- uni.navigateBack(-1)
- },
- // 数字单位转化
- convertedValue(num) {
- if (num < 10000) {
- return num.toString();
- } else if (num < 100000000) {
- return (Math.floor(num / 10000 * 10) / 10) + '万';
- } else {
- return (Math.floor(num / 100000000 * 10) / 10) + '亿';
- }
- },
- // 日期格式化
- formatter(type, value) {
- if (type === 'year') {
- return `${value}年`
- }
- if (type === 'month') {
- return `${value}月`
- }
- if (type === 'day') {
- return `${value}日`
- }
- if (type === 'hour') {
- return `${value}时`
- }
- if (type === 'minute') {
- return `${value}分`
- }
- return value
- },
- //计算输入时间一年后的的前一天(输入的参数为字符串("2019-03-02")最终输出也为日期的字符串)
- oneYearPast(time) {
- var date = new Date(time);
- date.setSeconds(date.getSeconds() - 1);
- date.setFullYear(date.getFullYear() + 1); //一年后
- date.setTime(date.getTime()); //一年后的前一天
- var strYear = date.getFullYear();
- var strDay = date.getDate();
- var strMonth = date.getMonth() + 1;
- var hh = date.getHours();
- var minutes = date.getMinutes(); // 分
- var Seconds = date.getSeconds();
- if (hh < 10) {
- hh = "0" + hh;
- }
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- if (Seconds < 10) {
- Seconds = "0" + Seconds;
- }
- if (strMonth < 10) {
- strMonth = "0" + strMonth;
- }
- if (strDay < 10) {
- strDay = "0" + strDay;
- }
- var datastr =
- strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
- return datastr;
- },
- //次日
- nextday() {
- var date = new Date();
- date.setFullYear(date.getFullYear());
- date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
- var strYear = date.getFullYear();
- var strDay = date.getDate();
- var strMonth = date.getMonth() + 1;
- var hh = date.getHours();
- if (hh < 10) {
- hh = "0" + hh;
- }
- if (strMonth < 10) {
- strMonth = "0" + strMonth;
- }
- if (strDay < 10) {
- strDay = "0" + strDay;
- }
- var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
- return datastr;
- },
- //时间转换
- transformTime(date) {
- var d = new Date(date);
- var strYear = d.getFullYear();
- var strMonth = d.getMonth() + 1;
- var strDay = d.getDate();
- var hh = d.getHours();
- var minutes = d.getMinutes(); // 分
- var Seconds = d.getSeconds();
- if (hh < 10) {
- hh = "0" + hh;
- }
- if (minutes < 10) {
- minutes = "0" + minutes;
- }
- if (Seconds < 10) {
- Seconds = "0" + Seconds;
- }
- if (strMonth < 10) {
- strMonth = "0" + strMonth;
- }
- if (strDay < 10) {
- strDay = "0" + strDay;
- }
- var datetime =
- strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
- return datetime;
- },
- },
- computed: {
- },
- };
|