|
|
@@ -1,17 +1,18 @@
|
|
|
<template>
|
|
|
- <!--布局容器-->
|
|
|
- <div class="container" style="width: 99%; margin-top: 0px">
|
|
|
- <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
|
|
|
- @getList="getList" @handleSearchList="getList" :pagination="queryFrom">
|
|
|
- </templateTable>
|
|
|
- <el-dialog v-dialogDrag title="修改" :visible.sync="dialogVisible" width="1200px" @close="closeVisible">
|
|
|
- <div>
|
|
|
- <div v-if="rowForm.auditStatus=='5'" >
|
|
|
- 费用计算规则:
|
|
|
- <el-radio-group v-model="formDeduction.state" @input="radioChange">
|
|
|
- <el-radio v-for="val in telemarketing_ruleoptions" :label="Number(val.value) " :key="val.value" >{{ val.label }}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- <!-- <el-select size="small" v-model="formDeduction.state" placeholder="请选择">
|
|
|
+ <!--布局容器-->
|
|
|
+ <div class="container" style="width: 99%; margin-top: 0px">
|
|
|
+ <templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
|
|
|
+ @getList="getList" @handleSearchList="getList" :pagination="queryFrom">
|
|
|
+ </templateTable>
|
|
|
+ <el-dialog v-dialogDrag title="修改" :visible.sync="dialogVisible" width="1200px" @close="closeVisible">
|
|
|
+ <div>
|
|
|
+ <div v-if="rowForm.auditStatus == '5'">
|
|
|
+ 费用计算规则:
|
|
|
+ <el-radio-group v-model="formDeduction.state" @input="radioChange">
|
|
|
+ <el-radio v-for="val in telemarketing_ruleoptions" :label="Number(val.value)" :key="val.value">{{ val.label
|
|
|
+ }}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <!-- <el-select size="small" v-model="formDeduction.state" placeholder="请选择">
|
|
|
<el-option v-for="item in [
|
|
|
{
|
|
|
label: '使用初始方案计算',
|
|
|
@@ -22,1292 +23,1329 @@
|
|
|
}]" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select> -->
|
|
|
- </div>
|
|
|
- <el-table :data="formData" border style="margin-top:10px">
|
|
|
- <el-table-column prop="insuranceType" label="险种">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="premium" label="保费金额">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>¥{{ scope.row.premium }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="totalProportion" label="优惠比例">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.totalProportion }}%</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="totalAmount" label="优惠金额">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="premium" label="扣减比例">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input v-if="scope.row.insuranceType=='交强险'" v-model="formDeduction.jqExportProportion" placeholder="请输入内容"></el-input>
|
|
|
- <el-input v-if="scope.row.insuranceType=='商业险'" v-model="formDeduction.syExportProportion" placeholder="请输入内容"></el-input>
|
|
|
- <el-input v-if="scope.row.insuranceType=='非车险'" v-model="formDeduction.noCarExportProportion" placeholder="请输入内容"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="comfirmDialog">提 交</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
- <detailsDialog ref="detailsDialog" :orderInfo.sync="orderInfo" :Feepermissions="false"></detailsDialog>
|
|
|
-
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <el-table :data="formData" border style="margin-top:10px">
|
|
|
+ <el-table-column prop="insuranceType" label="险种">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="premium" label="保费金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>¥{{ scope.row.premium }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="firstTotalProportion" label="初始比例">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.firstTotalProportion }}</span>%
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="totalProportion" label="优惠比例">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="flex j-c a-c">
|
|
|
+ <el-input v-if="scope.row.insuranceType == '交强险'" style="width: 120px;"
|
|
|
+ v-model="formDeduction.jqdiscountrate" placeholder="交强优惠比例"></el-input>
|
|
|
+ <el-input v-if="scope.row.insuranceType == '商业险'" style="width: 120px;"
|
|
|
+ v-model="formDeduction.sydiscountrate" placeholder="商业优惠比例"></el-input>
|
|
|
+ <el-input v-if="scope.row.insuranceType == '非车险'" style="width: 120px;"
|
|
|
+ v-model="formDeduction.nodiscountrate" placeholder="非车优惠比例"></el-input>
|
|
|
+ <span style="margin-left: 10px;">%</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="totalAmount" label="优惠金额">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="comfirmDialog">提 交</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <detailsDialog ref="detailsDialog" :orderInfo.sync="orderInfo" :Feepermissions="false"></detailsDialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import templateTable from '@/components/TemplateTable/index.vue'
|
|
|
import detailsDialog from "@/views/Core/components/detailsDialog.vue";
|
|
|
|
|
|
export default {
|
|
|
- name: "ElectricSalescost",
|
|
|
+ name: "ElectricSalescost",
|
|
|
|
|
|
- components: { templateTable, detailsDialog },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- stateValue: '',
|
|
|
- orderInfo: {},
|
|
|
- formDeduction:{},
|
|
|
- formList: [
|
|
|
- {
|
|
|
- label: "订单号",
|
|
|
- prop: "orderNo",
|
|
|
- type: "input",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "车牌号",
|
|
|
- prop: "licenseNo",
|
|
|
- type: "input",
|
|
|
- }, {
|
|
|
- label: "车架号",
|
|
|
- prop: "frameNo",
|
|
|
- type: "input",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "投保人姓名",
|
|
|
- prop: "insuredName",
|
|
|
- type: "input",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "保险公司",
|
|
|
- prop: "importTime",
|
|
|
- type: "company",
|
|
|
- }, {
|
|
|
- label: "险种",
|
|
|
- prop: "productId",
|
|
|
- type: "select",
|
|
|
- options: []
|
|
|
- },
|
|
|
- {
|
|
|
- label: "状态",
|
|
|
- prop: "auditStatus",
|
|
|
- type: "select",
|
|
|
- options: [
|
|
|
- {
|
|
|
- value: '4',
|
|
|
- label: '未提交'
|
|
|
- }, {
|
|
|
- value: '5',
|
|
|
- label: '待提交'
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- ],
|
|
|
- searchData: {},
|
|
|
- tableConfig: {
|
|
|
- columns: [
|
|
|
- {
|
|
|
- prop: 'orderNo', label: '订单号', type: 'text',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'id', label: '子订单号', type: 'text',
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'username', label: '业务员', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'userid', label: '业务员工号', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'insCompany', label: '承保公司', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'licenseNo', label: '车牌号', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'insuredName', label: '投保人姓名', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'product', label: '投保险种', type: 'text',
|
|
|
- }, {
|
|
|
- prop: 'auditStatus', label: '状态', type: 'statMap', options: [
|
|
|
- {
|
|
|
- value: '4',
|
|
|
- label: '未提交'
|
|
|
- }, {
|
|
|
- value: '5',
|
|
|
- label: '待提交'
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- ],
|
|
|
- loading: true,
|
|
|
- // operateShow: true,
|
|
|
- isPaginationShow: true,
|
|
|
- operationWidth: '180',
|
|
|
- optBtns: [
|
|
|
- {
|
|
|
- type: 'primary',
|
|
|
- label: '修改费用',
|
|
|
- // hide:(row) => {
|
|
|
- // return row.auditStatus == 1?true:false
|
|
|
- // },
|
|
|
- click: (row, index) => { return this.modifyFun(row) },
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'primary',
|
|
|
- label: '查看详情',
|
|
|
- click: (row, index) => { return this.detail(row) },
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'primary',
|
|
|
- label: '提交',
|
|
|
- hide: (row) => {
|
|
|
- return row.auditStatus == 5 ? true : false
|
|
|
- },
|
|
|
- click: (row, index) => { return this.submitTo(row) },
|
|
|
- }
|
|
|
- ]
|
|
|
+ components: { templateTable, detailsDialog },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ stateValue: '',
|
|
|
+ orderInfo: {},
|
|
|
+ formDeduction: {
|
|
|
+ jqdiscountrate: 0,
|
|
|
+ sydiscountrate: 0,
|
|
|
+ nodiscountrate: 0,
|
|
|
+ firstjqdiscountrate:0,
|
|
|
+ firstsydiscountrate:0,
|
|
|
+ firstnodiscountrate:0,
|
|
|
+ },
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ label: "订单号",
|
|
|
+ prop: "orderNo",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "车牌号",
|
|
|
+ prop: "licenseNo",
|
|
|
+ type: "input",
|
|
|
+ }, {
|
|
|
+ label: "车架号",
|
|
|
+ prop: "frameNo",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "投保人姓名",
|
|
|
+ prop: "insuredName",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "保险公司",
|
|
|
+ prop: "importTime",
|
|
|
+ type: "company",
|
|
|
+ }, {
|
|
|
+ label: "险种",
|
|
|
+ prop: "productId",
|
|
|
+ type: "select",
|
|
|
+ options: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "状态",
|
|
|
+ prop: "auditStatus",
|
|
|
+ type: "select",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ value: '4',
|
|
|
+ label: '未提交'
|
|
|
+ }, {
|
|
|
+ value: '5',
|
|
|
+ label: '待提交'
|
|
|
},
|
|
|
- queryFrom: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- totalSize: 0
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ searchData: {},
|
|
|
+ tableConfig: {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ prop: 'orderNo', label: '订单号', type: 'text',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'id', label: '子订单号', type: 'text',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'username', label: '业务员', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'userid', label: '业务员工号', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'insCompany', label: '承保公司', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'licenseNo', label: '车牌号', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'insuredName', label: '投保人姓名', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'product', label: '投保险种', type: 'text',
|
|
|
+ }, {
|
|
|
+ prop: 'auditStatus', label: '状态', type: 'statMap', options: [
|
|
|
+ {
|
|
|
+ value: '4',
|
|
|
+ label: '未提交'
|
|
|
+ }, {
|
|
|
+ value: '5',
|
|
|
+ label: '待提交'
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ // operateShow: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ operationWidth: '180',
|
|
|
+ optBtns: [
|
|
|
+ {
|
|
|
+ type: 'primary',
|
|
|
+ label: '修改费用',
|
|
|
+ // hide:(row) => {
|
|
|
+ // return row.auditStatus == 1?true:false
|
|
|
+ // },
|
|
|
+ click: (row, index) => { return this.modifyFun(row) },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'primary',
|
|
|
+ label: '查看详情',
|
|
|
+ click: (row, index) => { return this.detail(row) },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'primary',
|
|
|
+ label: '提交',
|
|
|
+ hide: (row) => {
|
|
|
+ return row.auditStatus == 5 ? true : false
|
|
|
},
|
|
|
- tableData: [],
|
|
|
- formData: [],
|
|
|
- loading: false,
|
|
|
- dialogVisible: false,
|
|
|
- outOfBusinessVehicleUseoptions: [],
|
|
|
- businessVehicleUseoptions: [],
|
|
|
- natureOfVehicleUseoptions: [],
|
|
|
- trafficManagementVehicleTypeoptions: [],
|
|
|
- telemarketing_ruleoptions:[],
|
|
|
- vehicleTypeoptions: [],
|
|
|
- energyTypeoptions: [],
|
|
|
- rowForm:{}
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getDicType("natureOfVehicleUse"); //车辆使用性质
|
|
|
- this.getDicType("vehicleType"); //车辆种类
|
|
|
- this.getDicType("trafficManagementVehicleType"); //车辆类型
|
|
|
- this.getDicType("energyType"); //能源种类
|
|
|
- this.getDicType("businessVehicleUse"); //(车辆用途)营业
|
|
|
- this.getDicType("outOfBusinessVehicleUse"); //(车辆用途)非营业
|
|
|
-
|
|
|
- this.$api.dict
|
|
|
- .findByLableName('telemarketing_rule')
|
|
|
- .then((response) => {
|
|
|
- this.telemarketing_ruleoptions = response.data; // 把获取到的数据赋给this.data
|
|
|
+ click: (row, index) => { return this.submitTo(row) },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ queryFrom: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalSize: 0
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
+ formData: [],
|
|
|
+ loading: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ outOfBusinessVehicleUseoptions: [],
|
|
|
+ businessVehicleUseoptions: [],
|
|
|
+ natureOfVehicleUseoptions: [],
|
|
|
+ trafficManagementVehicleTypeoptions: [],
|
|
|
+ telemarketing_ruleoptions: [],
|
|
|
+ vehicleTypeoptions: [],
|
|
|
+ energyTypeoptions: [],
|
|
|
+ rowForm: {},
|
|
|
+ adjustmentRatioShow: false,//修改比例
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getDicType("natureOfVehicleUse"); //车辆使用性质
|
|
|
+ this.getDicType("vehicleType"); //车辆种类
|
|
|
+ this.getDicType("trafficManagementVehicleType"); //车辆类型
|
|
|
+ this.getDicType("energyType"); //能源种类
|
|
|
+ this.getDicType("businessVehicleUse"); //(车辆用途)营业
|
|
|
+ this.getDicType("outOfBusinessVehicleUse"); //(车辆用途)非营业
|
|
|
+
|
|
|
+ this.$api.dict
|
|
|
+ .findByLableName('telemarketing_rule')
|
|
|
+ .then((response) => {
|
|
|
+ this.telemarketing_ruleoptions = response.data; // 把获取到的数据赋给this.data
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.telemarketing_ruleoptions = [];
|
|
|
+ });
|
|
|
+ this.$api.insCompany.dicType('productsType').then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.formList.forEach(el => {
|
|
|
+ if (el.label == '险种') {
|
|
|
+ el.options = res.data.ddList
|
|
|
+ }
|
|
|
})
|
|
|
- .catch((error) => {
|
|
|
- this.telemarketing_ruleoptions = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ getDicType(type) {
|
|
|
+ this.$api.insCompany.dicType(type).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this[type + "options"] = res.data.ddList;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 修改保存页面
|
|
|
+ comfirmDialog() {
|
|
|
+ this.$api.letter
|
|
|
+ .submitExportFees({ ...this.formDeduction, subOrderNo: this.rowForm.id })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: "修改成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.getList();
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
- this.$api.insCompany.dicType('productsType').then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.formList.forEach(el => {
|
|
|
- if (el.label == '险种') {
|
|
|
- el.options = res.data.ddList
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ },
|
|
|
+ submitTo(row) {
|
|
|
+ this.$api.letter
|
|
|
+ .telemarketingSubmitAudit(row.id)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg || "操作成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
});
|
|
|
- this.getList();
|
|
|
},
|
|
|
- methods: {
|
|
|
- getDicType(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 "-";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ detail(item) {
|
|
|
+ let carImageList = [];
|
|
|
+ let ownerImageList = []; //车主影像
|
|
|
+ let policyImageList = []; //投保人影像
|
|
|
+ let insuredImageList = []; //被保人影像
|
|
|
+ let carCheckImageList = []; //验车照影像
|
|
|
+ for (let i = 0; i < this.global.insureList.length; i++) {
|
|
|
+ this.global.insureList[i].coveragePremium = "";
|
|
|
+ this.global.insureList[i].amount = 0;
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ companyId: item.id,
|
|
|
+ };
|
|
|
+ this.$api.letter.getByCompanyId(params).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (
|
|
|
+ (res.data.carinfo.carnature &&
|
|
|
+ res.data.carinfo.carnature == "02") ||
|
|
|
+ res.data.carinfo.carnature == "非营业"
|
|
|
+ ) {
|
|
|
+ res.data.carinfo.vehicleUse = this.capTypedictTag(
|
|
|
+ res.data.carinfo.vehicleUse,
|
|
|
+ this.outOfBusinessVehicleUseoptions
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ res.data.carinfo.vehicleUse = this.capTypedictTag(
|
|
|
+ res.data.carinfo.vehicleUse,
|
|
|
+ this.businessVehicleUseoptions
|
|
|
+ );
|
|
|
+ }
|
|
|
+ res.data.carinfo.carnature = this.capTypedictTag(
|
|
|
+ res.data.carinfo.carnature,
|
|
|
+ this.natureOfVehicleUseoptions
|
|
|
+ );
|
|
|
+ res.data.carinfo.cartype = res.data.carinfo.cartype
|
|
|
+ ? this.capTypedictTag(
|
|
|
+ res.data.carinfo.cartype,
|
|
|
+ this.trafficManagementVehicleTypeoptions
|
|
|
+ )
|
|
|
+ : "";
|
|
|
+ res.data.carinfo.cimodelclass = res.data.carinfo.cimodelclass
|
|
|
+ ? this.capTypedictTag(
|
|
|
+ res.data.carinfo.cimodelclass,
|
|
|
+ this.vehicleTypeoptions
|
|
|
+ )
|
|
|
+ : "";
|
|
|
+ res.data.carinfo.energyType = res.data.carinfo.energyType
|
|
|
+ ? this.capTypedictTag(
|
|
|
+ res.data.carinfo.energyType,
|
|
|
+ this.energyTypeoptions
|
|
|
+ )
|
|
|
+ : "";
|
|
|
+ if (res.data.accidentInfo) {
|
|
|
+ res.data.accidentInfo.constructor === Object
|
|
|
+ ? [res.data.accidentInfo]
|
|
|
+ : res.data.accidentInfo;
|
|
|
+ }
|
|
|
+ Object.assign(this.orderInfo, res.data);
|
|
|
+ if (this.orderInfo.riskinfo && this.orderInfo.riskinfo.length > 0) {
|
|
|
+ for (let i = 0; i < this.orderInfo.riskinfo.length; i++) {
|
|
|
+ if (this.orderInfo.riskinfo[i].riskCode == "0510") {
|
|
|
+ for (let j = 0; j < this.orderInfo.kindinfo.length; j++) {
|
|
|
+ for (let m = 0; m < this.global.insureList.length; m++) {
|
|
|
+ if (
|
|
|
+ this.orderInfo.kindinfo[j].kindCode ==
|
|
|
+ this.global.insureList[m].kindCode
|
|
|
+ ) {
|
|
|
+ this.global.insureList[m].coveragePremium =
|
|
|
+ this.orderInfo.kindinfo[j].coveragePremium;
|
|
|
+ if (this.orderInfo.kindinfo[j].kindCode == "B") {
|
|
|
+ this.global.insureList[9].amtList[0].value =
|
|
|
+ this.orderInfo.kindinfo[j].amount;
|
|
|
+ }
|
|
|
+ if (this.orderInfo.kindinfo[j].kindCode == "A") {
|
|
|
+ this.global.insureList[m].amount = "1";
|
|
|
+ } else if (this.global.insureList[m].kindCode == "D4") {
|
|
|
+ this.global.insureList[m].amount =
|
|
|
+ this.orderInfo.kindinfo[j].unitAmount;
|
|
|
+ } else if (
|
|
|
+ this.global.insureList[m].isMainRisk ||
|
|
|
+ this.global.insureList[m].kindCode == "BD" ||
|
|
|
+ this.global.insureList[m].kindCode == "L"
|
|
|
+ ) {
|
|
|
+ this.global.insureList[m].amount =
|
|
|
+ this.orderInfo.kindinfo[j].amount;
|
|
|
+ } else {
|
|
|
+ this.global.insureList[m].amount =
|
|
|
+ this.orderInfo.kindinfo[j].deductibleRate;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取影像
|
|
|
+ this.$api.letter.findByQuoteNo(item.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
|
|
|
+ ? carImageList.push(resImage.data[keys].url)
|
|
|
+ : "";
|
|
|
+ break;
|
|
|
+ case "C02":
|
|
|
+ case "D02":
|
|
|
+ resImage.data[keys].url
|
|
|
+ ? ownerImageList.push(resImage.data[keys].url)
|
|
|
+ : "";
|
|
|
+ break;
|
|
|
+ case "C03":
|
|
|
+ case "D03":
|
|
|
+ resImage.data[keys].url
|
|
|
+ ? policyImageList.push(resImage.data[keys].url)
|
|
|
+ : "";
|
|
|
+ break;
|
|
|
+ case "C04":
|
|
|
+ case "D04":
|
|
|
+ resImage.data[keys].url
|
|
|
+ ? insuredImageList.push(resImage.data[keys].url)
|
|
|
+ : "";
|
|
|
+ break;
|
|
|
+ case "XC00":
|
|
|
+ case "GC00":
|
|
|
+ case "GX00":
|
|
|
+ resImage.data[keys].url
|
|
|
+ ? carCheckImageList.push(resImage.data[keys].url)
|
|
|
+ : "";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
- },
|
|
|
- // 修改保存页面
|
|
|
- comfirmDialog() {
|
|
|
- this.$api.letter
|
|
|
- .submitExportFees({...this.formDeduction,subOrderNo:this.rowForm.id})
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: "修改成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.dialogVisible = false;
|
|
|
- this.getList();
|
|
|
+ let obj = {
|
|
|
+ carImageList: carImageList,
|
|
|
+ ownerImageList: ownerImageList,
|
|
|
+ policyImageList: policyImageList,
|
|
|
+ insuredImageList: insuredImageList,
|
|
|
+ carCheckImageList: carCheckImageList,
|
|
|
+ };
|
|
|
+ this.$refs.detailsDialog.imageFun(obj);
|
|
|
+ });
|
|
|
+ let oldfileList = [];
|
|
|
+ let businessList = [];
|
|
|
+ let accidentList = [];
|
|
|
+ if (res.data.orderstatus == "3") {
|
|
|
+ if (res.data.isExternal == 1) {
|
|
|
+ this.$api.letter
|
|
|
+ .getPolicyPrintexternalOrder(res.data.id)
|
|
|
+ .then((res1) => {
|
|
|
+ if (res1.code == 200) {
|
|
|
+ if (res1.data.jqPolicy) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res1.data.jqPolicy,
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- submitTo(row) {
|
|
|
- this.$api.letter
|
|
|
- .telemarketingSubmitAudit(row.id)
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: res.msg || "操作成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.getList();
|
|
|
+ if (res1.data.jqSign) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res1.data.jqSign,
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- capTypedictTag(val, option) {
|
|
|
- if (option.find((item) => item.dictValue == val)) {
|
|
|
- return option.find((item) => item.dictValue == val).dictTag;
|
|
|
- } else {
|
|
|
- return "-";
|
|
|
- }
|
|
|
- },
|
|
|
- detail(item) {
|
|
|
- let carImageList = [];
|
|
|
- let ownerImageList = []; //车主影像
|
|
|
- let policyImageList = []; //投保人影像
|
|
|
- let insuredImageList = []; //被保人影像
|
|
|
- let carCheckImageList = []; //验车照影像
|
|
|
- for (let i = 0; i < this.global.insureList.length; i++) {
|
|
|
- this.global.insureList[i].coveragePremium = "";
|
|
|
- this.global.insureList[i].amount = 0;
|
|
|
- }
|
|
|
- let params = {
|
|
|
- companyId: item.id,
|
|
|
- };
|
|
|
- this.$api.letter.getByCompanyId(params).then((res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- if (
|
|
|
- (res.data.carinfo.carnature &&
|
|
|
- res.data.carinfo.carnature == "02") ||
|
|
|
- res.data.carinfo.carnature == "非营业"
|
|
|
- ) {
|
|
|
- res.data.carinfo.vehicleUse = this.capTypedictTag(
|
|
|
- res.data.carinfo.vehicleUse,
|
|
|
- this.outOfBusinessVehicleUseoptions
|
|
|
- );
|
|
|
- } else {
|
|
|
- res.data.carinfo.vehicleUse = this.capTypedictTag(
|
|
|
- res.data.carinfo.vehicleUse,
|
|
|
- this.businessVehicleUseoptions
|
|
|
- );
|
|
|
+ if (res1.data.jqSign) {
|
|
|
+ accidentList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res1.data.jqSign,
|
|
|
+ });
|
|
|
}
|
|
|
- res.data.carinfo.carnature = this.capTypedictTag(
|
|
|
- res.data.carinfo.carnature,
|
|
|
- this.natureOfVehicleUseoptions
|
|
|
- );
|
|
|
- res.data.carinfo.cartype = res.data.carinfo.cartype
|
|
|
- ? this.capTypedictTag(
|
|
|
- res.data.carinfo.cartype,
|
|
|
- this.trafficManagementVehicleTypeoptions
|
|
|
- )
|
|
|
- : "";
|
|
|
- res.data.carinfo.cimodelclass = res.data.carinfo.cimodelclass
|
|
|
- ? this.capTypedictTag(
|
|
|
- res.data.carinfo.cimodelclass,
|
|
|
- this.vehicleTypeoptions
|
|
|
- )
|
|
|
- : "";
|
|
|
- res.data.carinfo.energyType = res.data.carinfo.energyType
|
|
|
- ? this.capTypedictTag(
|
|
|
- res.data.carinfo.energyType,
|
|
|
- this.energyTypeoptions
|
|
|
- )
|
|
|
- : "";
|
|
|
- if (res.data.accidentInfo) {
|
|
|
- res.data.accidentInfo.constructor === Object
|
|
|
- ? [res.data.accidentInfo]
|
|
|
- : res.data.accidentInfo;
|
|
|
+ if (res1.data.noPolicy) {
|
|
|
+ accidentList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: "驾意险保单",
|
|
|
+ fileurl: res1.data.noPolicy,
|
|
|
+ });
|
|
|
}
|
|
|
- Object.assign(this.orderInfo, res.data);
|
|
|
- if (this.orderInfo.riskinfo && this.orderInfo.riskinfo.length > 0) {
|
|
|
- for (let i = 0; i < this.orderInfo.riskinfo.length; i++) {
|
|
|
- if (this.orderInfo.riskinfo[i].riskCode == "0510") {
|
|
|
- for (let j = 0; j < this.orderInfo.kindinfo.length; j++) {
|
|
|
- for (let m = 0; m < this.global.insureList.length; m++) {
|
|
|
- if (
|
|
|
- this.orderInfo.kindinfo[j].kindCode ==
|
|
|
- this.global.insureList[m].kindCode
|
|
|
- ) {
|
|
|
- this.global.insureList[m].coveragePremium =
|
|
|
- this.orderInfo.kindinfo[j].coveragePremium;
|
|
|
- if (this.orderInfo.kindinfo[j].kindCode == "B") {
|
|
|
- this.global.insureList[9].amtList[0].value =
|
|
|
- this.orderInfo.kindinfo[j].amount;
|
|
|
- }
|
|
|
- if (this.orderInfo.kindinfo[j].kindCode == "A") {
|
|
|
- this.global.insureList[m].amount = "1";
|
|
|
- } else if (this.global.insureList[m].kindCode == "D4") {
|
|
|
- this.global.insureList[m].amount =
|
|
|
- this.orderInfo.kindinfo[j].unitAmount;
|
|
|
- } else if (
|
|
|
- this.global.insureList[m].isMainRisk ||
|
|
|
- this.global.insureList[m].kindCode == "BD" ||
|
|
|
- this.global.insureList[m].kindCode == "L"
|
|
|
- ) {
|
|
|
- this.global.insureList[m].amount =
|
|
|
- this.orderInfo.kindinfo[j].amount;
|
|
|
- } else {
|
|
|
- this.global.insureList[m].amount =
|
|
|
- this.orderInfo.kindinfo[j].deductibleRate;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res1.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ switch (res.data.inscompany) {
|
|
|
+ case "永安财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .getPolicyPrint({
|
|
|
+ companyId: item.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) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
}
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- // 获取影像
|
|
|
- this.$api.letter.findByQuoteNo(item.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
|
|
|
- ? carImageList.push(resImage.data[keys].url)
|
|
|
- : "";
|
|
|
- break;
|
|
|
- case "C02":
|
|
|
- case "D02":
|
|
|
- resImage.data[keys].url
|
|
|
- ? ownerImageList.push(resImage.data[keys].url)
|
|
|
- : "";
|
|
|
- break;
|
|
|
- case "C03":
|
|
|
- case "D03":
|
|
|
- resImage.data[keys].url
|
|
|
- ? policyImageList.push(resImage.data[keys].url)
|
|
|
- : "";
|
|
|
- break;
|
|
|
- case "C04":
|
|
|
- case "D04":
|
|
|
- resImage.data[keys].url
|
|
|
- ? insuredImageList.push(resImage.data[keys].url)
|
|
|
- : "";
|
|
|
- break;
|
|
|
- case "XC00":
|
|
|
- case "GC00":
|
|
|
- case "GX00":
|
|
|
- resImage.data[keys].url
|
|
|
- ? carCheckImageList.push(resImage.data[keys].url)
|
|
|
- : "";
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
+ });
|
|
|
+ this.$api.letter
|
|
|
+ .getPolicyPrint2({
|
|
|
+ companyId: item.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) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .getPolicyPrint({
|
|
|
+ companyId: item.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 "华泰财险":
|
|
|
+ switch (item.apiType) {
|
|
|
+ case 1:
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .HuataigetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ 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: item.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 2:
|
|
|
+ if (
|
|
|
+ this.orderInfo.jqpolicyno ||
|
|
|
+ this.orderInfo.sypolicyno
|
|
|
+ ) {
|
|
|
+ this.$api.letter
|
|
|
+ .pythongetPolicyPrint({
|
|
|
+ subOrderNo: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+ case "中煤财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .ZhongmeigetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data && res.data[0]) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data[0],
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api.letter
|
|
|
+ .ZhongmeigetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "1", // 1:标志
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data && res.data[0]) {
|
|
|
+ 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: item.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: item.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);
|
|
|
+ }
|
|
|
});
|
|
|
- let obj = {
|
|
|
- carImageList: carImageList,
|
|
|
- ownerImageList: ownerImageList,
|
|
|
- policyImageList: policyImageList,
|
|
|
- insuredImageList: insuredImageList,
|
|
|
- carCheckImageList: carCheckImageList,
|
|
|
- };
|
|
|
- this.$refs.detailsDialog.imageFun(obj);
|
|
|
});
|
|
|
- let oldfileList = [];
|
|
|
- let businessList = [];
|
|
|
- let accidentList = [];
|
|
|
- if (res.data.orderstatus == "3") {
|
|
|
- if (res.data.isExternal == 1) {
|
|
|
- this.$api.letter
|
|
|
- .getPolicyPrintexternalOrder(res.data.id)
|
|
|
- .then((res1) => {
|
|
|
- if (res1.code == 200) {
|
|
|
- if (res1.data.jqPolicy) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res1.data.jqPolicy,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res1.data.jqSign) {
|
|
|
- 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);
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "永诚财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .yongchenggetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqFlagUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqFlagUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
- switch (res.data.inscompany) {
|
|
|
- case "永安财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .getPolicyPrint({
|
|
|
- companyId: item.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) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter
|
|
|
- .getPolicyPrint2({
|
|
|
- companyId: item.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) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .getPolicyPrint({
|
|
|
- companyId: item.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 "华泰财险":
|
|
|
- switch (item.apiType) {
|
|
|
- case 1:
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .HuataigetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- 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: item.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 2:
|
|
|
- if (
|
|
|
- this.orderInfo.jqpolicyno ||
|
|
|
- this.orderInfo.sypolicyno
|
|
|
- ) {
|
|
|
- this.$api.letter
|
|
|
- .pythongetPolicyPrint({
|
|
|
- subOrderNo: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- 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;
|
|
|
- }
|
|
|
-
|
|
|
- break;
|
|
|
- case "中煤财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .ZhongmeigetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data && res.data[0]) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data[0],
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter
|
|
|
- .ZhongmeigetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "1", // 1:标志
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data && res.data[0]) {
|
|
|
- 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: item.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: item.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: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqFlagUrl) {
|
|
|
- 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: item.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: item.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: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter
|
|
|
- .guoRengetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "1", //1:标志
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- 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: item.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: item.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;
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .yongchenggetPolicyPrint({
|
|
|
+ companyId: item.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: item.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: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api.letter
|
|
|
+ .guoRengetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "1", //1:标志
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ 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: item.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: item.id,
|
|
|
+ policyNumber: ele.policyNumber,
|
|
|
|
|
|
- case "紫金财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .zijingetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter
|
|
|
- .zijingetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "1", //1:标志
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- 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: item.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: item.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: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- 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
|
|
|
- .pingangetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: process.env.BASE_URL + res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: process.env.BASE_URL + res.data.jqxFlagUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.syxPolicyUrl) {
|
|
|
- businessList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: process.env.BASE_URL + res.data.syxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (
|
|
|
- res.data.jyxInfoList &&
|
|
|
- res.data.jyxInfoList.length > 0
|
|
|
- ) {
|
|
|
- res.data.jyxInfoList.forEach((val) => {
|
|
|
- accidentList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: "驾意险保单",
|
|
|
- fileurl: process.env.BASE_URL + val.jyx_policy_url,
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- break;
|
|
|
- case "恒邦财险":
|
|
|
- case "安盛天平":
|
|
|
- case "中国人寿":
|
|
|
- case "太平财险":
|
|
|
- case "华农财险":
|
|
|
- case "众安财险":
|
|
|
- case "泰康财险":
|
|
|
- if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .pythongetPolicyPrint({
|
|
|
- subOrderNo: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- 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 "大家财险":
|
|
|
- switch (item.apiType) {
|
|
|
- case 1:
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter
|
|
|
- .obtainWarranty({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "2", //2:保单
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter
|
|
|
- .obtainWarranty({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: "1", //1:标志
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data) {
|
|
|
- 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: item.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: item.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 2:
|
|
|
- if (
|
|
|
- this.orderInfo.jqpolicyno ||
|
|
|
- this.orderInfo.sypolicyno
|
|
|
- ) {
|
|
|
- this.$api.letter
|
|
|
- .pythongetPolicyPrint({
|
|
|
- subOrderNo: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code == 200 && res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
- oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
- 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;
|
|
|
- }
|
|
|
+ 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;
|
|
|
|
|
|
- break;
|
|
|
- default:
|
|
|
- }
|
|
|
+ case "紫金财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
+ });
|
|
|
+ this.$api.letter
|
|
|
+ .zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "1", //1:标志
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ 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: item.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: item.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: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ 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
|
|
|
+ .pingangetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: process.env.BASE_URL + res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: process.env.BASE_URL + res.data.jqxFlagUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.syxPolicyUrl) {
|
|
|
+ businessList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: process.env.BASE_URL + res.data.syxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ res.data.jyxInfoList &&
|
|
|
+ res.data.jyxInfoList.length > 0
|
|
|
+ ) {
|
|
|
+ res.data.jyxInfoList.forEach((val) => {
|
|
|
+ accidentList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: "驾意险保单",
|
|
|
+ fileurl: process.env.BASE_URL + val.jyx_policy_url,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "恒邦财险":
|
|
|
+ case "安盛天平":
|
|
|
+ case "中国人寿":
|
|
|
+ case "太平财险":
|
|
|
+ case "华农财险":
|
|
|
+ case "众安财险":
|
|
|
+ case "泰康财险":
|
|
|
+ if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .pythongetPolicyPrint({
|
|
|
+ subOrderNo: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ 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 "大家财险":
|
|
|
+ switch (item.apiType) {
|
|
|
+ case 1:
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter
|
|
|
+ .obtainWarranty({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "2", //2:保单
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api.letter
|
|
|
+ .obtainWarranty({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: "1", //1:标志
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ 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: item.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: item.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 2:
|
|
|
+ if (
|
|
|
+ this.orderInfo.jqpolicyno ||
|
|
|
+ this.orderInfo.sypolicyno
|
|
|
+ ) {
|
|
|
+ this.$api.letter
|
|
|
+ .pythongetPolicyPrint({
|
|
|
+ subOrderNo: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.data) {
|
|
|
+ if (res.data.jqxPolicyUrl) {
|
|
|
+ oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
|
|
|
- let obj = {
|
|
|
- oldfileList: oldfileList,
|
|
|
- businessList,
|
|
|
- accidentList,
|
|
|
- };
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- this.$refs.detailsDialog.warrantyFun(obj);
|
|
|
- }
|
|
|
+ let obj = {
|
|
|
+ oldfileList: oldfileList,
|
|
|
+ businessList,
|
|
|
+ accidentList,
|
|
|
+ };
|
|
|
|
|
|
- this.$refs.detailsDialog.setBackupVisible(true);
|
|
|
- } else {
|
|
|
- this.$message.error("订单获取失败");
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ this.$refs.detailsDialog.warrantyFun(obj);
|
|
|
+ }
|
|
|
|
|
|
- //列表数据
|
|
|
- getList(data) {
|
|
|
- this.tableConfig.loading = true;
|
|
|
- this.$api.letter.getOrderList({ ...data, ...this.queryFrom, }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.tableData = res.data.content;
|
|
|
- this.queryFrom.pageNum = res.data.pageNum;
|
|
|
- this.queryFrom.pageSize = res.data.pageSize;
|
|
|
- this.queryFrom.totalSize = res.data.totalSize;
|
|
|
- this.tableConfig.loading = false;
|
|
|
+ this.$refs.detailsDialog.setBackupVisible(true);
|
|
|
+ } else {
|
|
|
+ this.$message.error("订单获取失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- } else {
|
|
|
- this.tableConfig.loading = false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ //列表数据
|
|
|
+ getList(data) {
|
|
|
+ this.tableConfig.loading = true;
|
|
|
+ this.$api.letter.getOrderList({ ...data, ...this.queryFrom, }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.tableData = res.data.content;
|
|
|
+ this.queryFrom.pageNum = res.data.pageNum;
|
|
|
+ this.queryFrom.pageSize = res.data.pageSize;
|
|
|
+ this.queryFrom.totalSize = res.data.totalSize;
|
|
|
+ this.tableConfig.loading = false;
|
|
|
|
|
|
- // 修改页面
|
|
|
- modifyFun(row) {
|
|
|
- this.rowForm=row
|
|
|
- this.formDeduction={
|
|
|
- state:1,
|
|
|
- }
|
|
|
- this.$api.letter
|
|
|
- .telemarketingEdit({subOrderId:row.id,state:row.auditStatus=='5'?'2':'1'})
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.dialogVisible = true;
|
|
|
- this.formData = res.data.exportFee
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ this.tableConfig.loading = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- },
|
|
|
- radioChange(e){
|
|
|
- // if(e=='1'){
|
|
|
- this.$api.letter
|
|
|
- .telemarketingEdit({subOrderId:this.rowForm.id,state:e=='0'?'1':'2'})
|
|
|
- .then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.formData = res.data.exportFee
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg)
|
|
|
- }
|
|
|
- });
|
|
|
- // }
|
|
|
- },
|
|
|
- closeVisible() {
|
|
|
- this.dialogVisible = false;
|
|
|
- },
|
|
|
+ // 修改页面
|
|
|
+ modifyFun(row) {
|
|
|
+ this.rowForm = row
|
|
|
+ this.formDeduction = {
|
|
|
+ state: 1,
|
|
|
+ }
|
|
|
+ this.$api.letter
|
|
|
+ .telemarketingEdit({ subOrderId: row.id, state: row.auditStatus == '5' ? '2' : '1' })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.formData = res.data.exportFee
|
|
|
+ let list = JSON.parse(JSON.stringify(res.data.exportFee));
|
|
|
+ list.map(val => {
|
|
|
+ switch (val.insuranceType) {
|
|
|
+ case '交强险':
|
|
|
+ this.formDeduction.jqdiscountrate = val.totalProportion;
|
|
|
+ this.formDeduction.firstjqdiscountrate = val.firstTotalProportion;
|
|
|
+ break;
|
|
|
+ case '商业险':
|
|
|
+ this.formDeduction.sydiscountrate = val.totalProportion;
|
|
|
+ this.formDeduction.firstsydiscountrate = val.firstTotalProportion;
|
|
|
+ break;
|
|
|
+ case '非车险':
|
|
|
+ this.formDeduction.nodiscountrate = val.totalProportion;
|
|
|
+ this.formDeduction.firstnodiscountrate = val.firstTotalProportion;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return val;
|
|
|
+ })
|
|
|
+ this.formDeduction = { ...this.formDeduction, state: 1, }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- importFun() {
|
|
|
- this.$refs.importDialog.open()
|
|
|
- this.$refs.importDialog.$refs.upload.clearFiles();
|
|
|
- },
|
|
|
- tablePageChange(val) {
|
|
|
- this.queryFrom.pageSize = val;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- tableCurrentChange(val) {
|
|
|
- this.queryFrom.pageNum = val;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
+ },
|
|
|
+ radioChange(e) {
|
|
|
+ // if(e=='1'){
|
|
|
+ this.$api.letter
|
|
|
+ .telemarketingEdit({ subOrderId: this.rowForm.id, state: e == '0' ? '1' : '2' })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.formData = res.data.exportFee
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ closeVisible() {
|
|
|
+ this.dialogVisible = false;
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
+ importFun() {
|
|
|
+ this.$refs.importDialog.open()
|
|
|
+ this.$refs.importDialog.$refs.upload.clearFiles();
|
|
|
+ },
|
|
|
+ tablePageChange(val) {
|
|
|
+ this.queryFrom.pageSize = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ tableCurrentChange(val) {
|
|
|
+ this.queryFrom.pageNum = val;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style scoped></style>
|
|
|
-
|