underwriting1.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108
  1. <template>
  2. <view :style="getHeight" style="background-color: #F5F5F5;">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <!-- 头部 -->
  6. <view class="carInfo w-100 px-3 box-sizing">
  7. <view class="d-flex">
  8. <view class="icon iconfont icon-tree-round-car flex-shrink topLeft"></view>
  9. <view class="topRight d-flex flex-1 p-3 flex-column" style="color: #FFFFFF;">
  10. <view class="d-flex flex-1">
  11. <view class="font-lg d-flex a-center">{{this.licenseNo}}
  12. <view class="icon iconfont icon-bianji1 ml-2" @tap="toCarInfo"></view>
  13. </view>
  14. </view>
  15. <view class="brandName">{{carInfo.modelcname}}</view>
  16. </view>
  17. </view>
  18. <view class="other d-flex j-sb px-3">
  19. <view class="d-flex flex-1 a-center">
  20. <view class="privilege d-flex a-center j-center flex-shrink px-2">特权</view>
  21. <view class="content">每月自动查违章,无违章领奖励</view>
  22. </view>
  23. <view class="flex-shrink icon iconfont icon-youjiantou d-flex a-center font-sm"></view>
  24. </view>
  25. </view>
  26. <!-- 车主信息 -->
  27. <view>
  28. <view class="personInfo">
  29. <view class="title d-flex a-center j-center j-sb">
  30. <text style="font-weight: bold;">车主</text>
  31. <view class="showStatus" @tap="controlShow('showOwerInfo')">{{showOwerInfo?'收起':'展开'}}</view>
  32. </view>
  33. <view class="content" v-if="showOwerInfo">
  34. <view class="row d-flex a-center">
  35. <view class="left">姓名:</view>
  36. <view class="right d-flex flex-1">{{ownerInfo.name}}</view>
  37. </view>
  38. <view class="row d-flex a-center">
  39. <view class="left">证件类型:</view>
  40. <block v-for="(item,index) in identifyList" :key="index">
  41. <template v-if="item.id == ownerInfo.identifyType">
  42. <view class="right d-flex flex-1">{{item.label}}</view>
  43. </template>
  44. </block>
  45. </view>
  46. <view class="row d-flex a-center">
  47. <view class="left">手机号:</view>
  48. <view class="right d-flex flex-1">{{ownerInfo.mobile}}</view>
  49. </view>
  50. <view class="row d-flex a-center">
  51. <view class="left">证件号:</view>
  52. <view class="right d-flex flex-1">{{ownerInfo.identifyNumber}}</view>
  53. </view>
  54. <view class="row d-flex a-center"
  55. style="height:auto;min-height: 80upx;padding: 15upx 0;box-sizing: border-box; ">
  56. <view class="left">地址:</view>
  57. <view class="right d-flex flex-1">{{ownerInfo.addr}}</view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 投保人信息 -->
  62. <view class="personInfo">
  63. <view class="title d-flex a-center j-sb">
  64. <text style="font-weight: bold;">投保人</text>
  65. <view class="showStatus" @tap="controlShow('showPolicyHolderInfo')">
  66. {{showPolicyHolderInfo?'收起':'展开'}}
  67. </view>
  68. </view>
  69. <view class="content" v-if="showPolicyHolderInfo">
  70. <view class="row d-flex a-center">
  71. <view class="left">姓名:</view>
  72. <view class="right d-flex flex-1">{{policyHolderInfo.name}}</view>
  73. </view>
  74. <view class="row d-flex a-center">
  75. <view class="left">证件类型:</view>
  76. <block v-for="(item,index) in identifyList" :key="index">
  77. <template v-if="item.id == policyHolderInfo.identifyType">
  78. <view class="right d-flex flex-1">{{item.label}}</view>
  79. </template>
  80. </block>
  81. </view>
  82. <view class="row d-flex a-center">
  83. <view class="left">手机号:</view>
  84. <view class="right d-flex flex-1">{{policyHolderInfo.mobile}}</view>
  85. </view>
  86. <view class="row d-flex a-center">
  87. <view class="left">证件号:</view>
  88. <view class="right d-flex flex-1">{{policyHolderInfo.identifyNumber}}</view>
  89. </view>
  90. <view class="row d-flex a-center"
  91. style="height:auto;min-height: 80upx;padding: 15upx 0;box-sizing: border-box; ">
  92. <view class="left">地址:</view>
  93. <view class="right d-flex flex-1">{{policyHolderInfo.addr}}</view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- 被保人信息 -->
  98. <view class="personInfo">
  99. <view class="title d-flex a-center j-sb">
  100. <text style="font-weight: bold;">被保人</text>
  101. <view class="showStatus" @tap="controlShow('showInsuredPersonInfo')">
  102. {{showInsuredPersonInfo?'收起':'展开'}}
  103. </view>
  104. </view>
  105. <view class="content" v-if="showInsuredPersonInfo">
  106. <view class="row d-flex a-center">
  107. <view class="left">姓名:</view>
  108. <view class="right d-flex flex-1">{{insuredPersonInfo.name}}</view>
  109. </view>
  110. <view class="row d-flex a-center">
  111. <view class="left">证件类型:</view>
  112. <block v-for="(item,index) in identifyList" :key="index">
  113. <template v-if="item.id == insuredPersonInfo.identifyType">
  114. <view class="right d-flex flex-1">{{item.label}}</view>
  115. </template>
  116. </block>
  117. </view>
  118. <view class="row d-flex a-center">
  119. <view class="left">手机号:</view>
  120. <view class="right d-flex flex-1">{{insuredPersonInfo.mobile}}</view>
  121. </view>
  122. <view class="row d-flex a-center">
  123. <view class="left">证件号:</view>
  124. <view class="right d-flex flex-1">{{insuredPersonInfo.identifyNumber}}</view>
  125. </view>
  126. <view class="row d-flex a-center"
  127. style="height:auto;min-height: 80upx;padding: 15upx 0;box-sizing: border-box; ">
  128. <view class="left">地址:</view>
  129. <view class="right d-flex flex-1">{{insuredPersonInfo.addr}}</view>
  130. </view>
  131. </view>
  132. </view>
  133. <!-- 车辆影像信息Start -->
  134. <view class="imageInfo">
  135. <view class="title d-flex a-center j-sb">
  136. <text style="font-weight: bold;">车辆影像信息</text>
  137. <view class="showStatus" @tap="controlShow('showCarImageInfo')">{{showCarImageInfo?'收起':'展开'}}
  138. </view>
  139. </view>
  140. <view class="uni-uploader" v-if="showCarImageInfo">
  141. <view class="uni-uploader-body">
  142. <view class="uni-uploader__files">
  143. <block v-for="(image,index) in carImageList" :key="index">
  144. <view class="uni-uploader__file">
  145. <image class="uni-uploader__img" :src="image.url" :data-src="image.url"
  146. @tap="previewImage($event,'car')"></image>
  147. <view class="delImgIcon iconfont icon-cuo d-flex a-center j-center"
  148. @tap="delCheckImage('car',index)"></view>
  149. </view>
  150. </block>
  151. <view class="uni-uploader__input-box" style="box-sizing: border-box;">
  152. <view class="uni-uploader__input" @tap="chooseImage('car')"></view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <!-- 车辆影像信息End -->
  159. <!-- 车主影像信息Start -->
  160. <view class="imageInfo">
  161. <view class="title d-flex a-center j-sb">
  162. <text style="font-weight: bold;">车主影像信息</text>
  163. <view class="showStatus" @tap="controlShow('showOwnerImageInfo')">{{showOwnerImageInfo?'收起':'展开'}}
  164. </view>
  165. </view>
  166. <view class="uni-uploader" v-if="showOwnerImageInfo">
  167. <view class="uni-uploader-body">
  168. <view class="uni-uploader__files">
  169. <block v-for="(image,index) in ownerImageList" :key="index">
  170. <view class="uni-uploader__file">
  171. <image class="uni-uploader__img" :src="image.url" :data-src="image.url"
  172. @tap="previewImage($event,'owner')"></image>
  173. <view class="delImgIcon iconfont icon-cuo d-flex a-center j-center"
  174. @tap="delCheckImage('owner',index)"></view>
  175. </view>
  176. </block>
  177. <view class="uni-uploader__input-box" style="box-sizing: border-box;">
  178. <view class="uni-uploader__input" @tap="chooseImage('owner')"></view>
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. <!-- 车主影像信息End -->
  185. <!-- 投保人影像信息Start -->
  186. <view class="imageInfo">
  187. <view class="title d-flex a-center j-sb">
  188. <text style="font-weight: bold;">投保人影像信息</text>
  189. <view class="showStatus" @tap="controlShow('showPolicyImageInfo')">
  190. {{showPolicyImageInfo?'收起':'展开'}}
  191. </view>
  192. </view>
  193. <view class="uni-uploader" v-if="showPolicyImageInfo">
  194. <view class="uni-uploader-body">
  195. <view class="uni-uploader__files">
  196. <block v-for="(image,index) in policyImageList" :key="index">
  197. <view class="uni-uploader__file">
  198. <image class="uni-uploader__img" :src="image.url" :data-src="image.url"
  199. @tap="previewImage($event,'policy')"></image>
  200. <view class="delImgIcon iconfont icon-cuo d-flex a-center j-center"
  201. @tap="delCheckImage('policy',index)"></view>
  202. </view>
  203. </block>
  204. <view class="uni-uploader__input-box" style="box-sizing: border-box;">
  205. <view class="uni-uploader__input" @tap="chooseImage('policy')"></view>
  206. </view>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. <!-- 投保人影像信息End -->
  212. <!-- 被保人影像信息Start -->
  213. <view class="imageInfo">
  214. <view class="title d-flex a-center j-sb">
  215. <text style="font-weight: bold;">被保人影像信息</text>
  216. <view class="showStatus" @tap="controlShow('showInsuredImageInfo')">
  217. {{showInsuredImageInfo?'收起':'展开'}}
  218. </view>
  219. </view>
  220. <view class="uni-uploader" v-if="showInsuredImageInfo">
  221. <view class="uni-uploader-body">
  222. <view class="uni-uploader__files">
  223. <block v-for="(image,index) in insuredImageList" :key="index">
  224. <view class="uni-uploader__file">
  225. <image class="uni-uploader__img" :src="image.url" :data-src="image.url"
  226. @tap="previewImage($event,'insured')"></image>
  227. <view class="delImgIcon iconfont icon-cuo d-flex a-center j-center"
  228. @tap="delCheckImage('insured',index)"></view>
  229. </view>
  230. </block>
  231. <view class="uni-uploader__input-box" style="box-sizing: border-box;">
  232. <view class="uni-uploader__input" @tap="chooseImage('insured')"></view>
  233. </view>
  234. </view>
  235. </view>
  236. </view>
  237. </view>
  238. <!-- 被保人影像信息End -->
  239. <!-- 验车照Start -->
  240. <view class="imageInfo">
  241. <view class="title d-flex a-center j-sb">
  242. <text style="font-weight: bold;">验车照</text>
  243. <view class="showStatus" @tap="controlShow('showCarCheckImageInfo')">
  244. {{showCarCheckImageInfo?'收起':'展开'}}
  245. </view>
  246. </view>
  247. <view class="uni-uploader" v-if="showCarCheckImageInfo">
  248. <view class="uni-uploader-body">
  249. <view class="uni-uploader__files">
  250. <block v-for="(image,index) in carCheckImageList" :key="index">
  251. <view class="uni-uploader__file">
  252. <image class="uni-uploader__img" :src="image.url" :data-src="image.url"
  253. @tap="previewImage($event,'carCheck')"></image>
  254. <view class="delImgIcon iconfont icon-cuo d-flex a-center j-center "
  255. @tap="delCheckImage('carCheck',index)"></view>
  256. </view>
  257. </block>
  258. <view class="uni-uploader__input-box" style="box-sizing: border-box;">
  259. <view class="uni-uploader__input" @tap="chooseImage('carCheck')"></view>
  260. </view>
  261. </view>
  262. </view>
  263. </view>
  264. </view>
  265. <!-- 验车照End -->
  266. <!-- 特约 -->
  267. <block v-for="(item,index) in riskList" :key="index">
  268. <template>
  269. <view class="appoint">
  270. <view class="title d-flex a-center j-sb">
  271. <text style="font-weight: bold;">特约</text>
  272. <view class="showStatus" @tap="controlShow('showAppoint')">{{showAppoint?'收起':'展开'}}</view>
  273. </view>
  274. <view class="content" v-if="showAppoint">
  275. <view class="row d-flex a-center j-sb">
  276. <view class="d-flex a-center j-center">交强特约险:</view>
  277. <textarea maxlength="100" v-model="jqappoint"
  278. placeholder="请输入交强险特别约定,最多可输入300个字符" /></textarea>
  279. </view>
  280. <view class="row d-flex a-center j-sb">
  281. <view>商业特约险:</view>
  282. <textarea class="mb-32" style="width: 100%;" maxlength="300" v-model="syappoint"
  283. placeholder="请输入商业险特别约定,最多可输入300个字符" /></textarea>
  284. </view>
  285. </view>
  286. </view>
  287. </template>
  288. </block>
  289. <view class="advancePayment">
  290. <view class="title d-flex a-center j-sb">
  291. <text style="font-weight: bold;">保费</text>
  292. <view class="showStatus" @tap="controlShow('showAdvancePayment')">{{showAdvancePayment?'收起':'展开'}}
  293. </view>
  294. </view>
  295. <view class="content" v-if="showAdvancePayment">
  296. <block v-for="(item,index) in riskList" :key="index">
  297. <template v-if="item.riskCode == '0507'">
  298. <view class="row d-flex a-center j-sb">
  299. <view class="d-flex a-center">交强险</view>
  300. <view>¥{{jqpremium}}</view>
  301. </view>
  302. </template>
  303. </block>
  304. <view class="row d-flex a-center j-sb">
  305. <view>车船税</view>
  306. <view>¥{{taxAmount}}</view>
  307. </view>
  308. <block v-for="(item,index) in riskList" :key="index">
  309. <template v-if="item.riskCode == '0510'">
  310. <view class="row d-flex a-center j-sb">
  311. <view class="d-flex a-center">商业险</view>
  312. <view>¥{{sypremium}}</view>
  313. </view>
  314. </template>
  315. </block>
  316. </view>
  317. </view>
  318. </view>
  319. <view style="height: 160upx;"></view>
  320. <view class="bottomBtn">
  321. <view class="agree d-flex a-center">
  322. <checkbox @tap="agreed" :checked="agree" style="transform:scale(0.6)"></checkbox> 我已确认并同意 <text
  323. class="tip">保险条款</text> | <text class="tip">投保须知</text> | <text class="tip">隐私条款</text>
  324. </view>
  325. <view class="btnView d-flex">
  326. <view class="d-flex flex-1 a-center">
  327. <view class="d-flex flex-column a-center listener">
  328. <view class="icon iconfont icon-xiaomishu"></view> 客服
  329. </view>
  330. <view style="font-weight: bold;font-size: 34upx;color: #333; ">¥{{sumPermium}}</view>
  331. </view>
  332. <view class="btn d-flex a-center j-center" @tap="submitAudit">申请核保</view>
  333. </view>
  334. </view>
  335. <previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="previewImgs"></previewImage>
  336. </view>
  337. </template>
  338. <script>
  339. import {
  340. mapState,
  341. mapMutations
  342. } from "vuex"
  343. import previewImage from '@/components/common/previewImage/previewImage.vue'; //引用插件
  344. // import wPicker from "@/components/w-picker/w-picker.vue";
  345. import {
  346. pathToBase64,
  347. base64ToPath
  348. } from '@/common/image-tools-base64.js';
  349. import * as imageConversion from 'image-conversion'
  350. export default {
  351. components: {
  352. // wPicker,
  353. previewImage
  354. },
  355. computed: {
  356. ...mapState(['userInfo']),
  357. getHeight() {
  358. let height = uni.getSystemInfoSync().windowHeight;
  359. return `minHeight: ${height}px;`;
  360. }
  361. },
  362. data() {
  363. return {
  364. quoteno: "", //报价号
  365. previewImgs: [],
  366. sumPermium: "",
  367. carInfo: {},
  368. vehicleModel: {},
  369. companyId: "",
  370. licenseNo: "",
  371. riskList: [],
  372. kindList: [],
  373. name: "",
  374. icon: "",
  375. taxAmount: "",
  376. jqpremium: "",
  377. sypremium: "",
  378. ownerInfo: {},
  379. policyHolderInfo: {},
  380. insuredPersonInfo: {},
  381. agree: false,
  382. jqappoint: "", //交强险特别约定
  383. syappoint: "", //商业特别约定
  384. identifyList: [{
  385. label: '身份证',
  386. id: "01"
  387. },
  388. {
  389. label: '护照',
  390. id: "02"
  391. },
  392. {
  393. label: '港澳台居民居住证',
  394. id: "03"
  395. },
  396. {
  397. label: '组织机构代码证',
  398. id: "04"
  399. },
  400. {
  401. label: '统一社会信用代码证',
  402. id: "05"
  403. },
  404. {
  405. label: '营业执照',
  406. id: "06"
  407. }
  408. ],
  409. showOwerInfo: false, //展示车主信息
  410. showPolicyHolderInfo: false, //展示投保人信息
  411. showInsuredPersonInfo: false, //展示被保人信息
  412. showProposalWay: false, //获取保单方式
  413. showAdvancePayment: false, //展示保费
  414. showAppoint: false, //展示特约
  415. showCarImageInfo: false, //显示车辆影像
  416. carImageList: [],
  417. showOwnerImageInfo: false, //显示车主影像
  418. ownerImageList: [],
  419. showPolicyImageInfo: false, //显示投保人影像
  420. policyImageList: [],
  421. showInsuredImageInfo: false, //显示被保人影像
  422. insuredImageList: [],
  423. showCarCheckImageInfo: false, //显示验车照影像
  424. carCheckImageList: [],
  425. existenceimg: 0,
  426. }
  427. },
  428. async onLoad(params) {
  429. if (!!params.companyId) {
  430. this.companyId = params.companyId;
  431. let param = {
  432. companyId: params.companyId
  433. };
  434. let res = await this.$http.post('/insurance/order/getByCompanyId', param);
  435. //获取前一个页面传过来的信息(车辆信息,人员信息,险种信息)
  436. this.icon = "";
  437. this.name = res.data.inscompany;
  438. this.quoteno = res.data.quoteno;
  439. this.carInfo = res.data.carinfo;
  440. this.ownerInfo = res.data.ownerinfo;
  441. this.policyHolderInfo = res.data.applyinfo;
  442. this.insuredPersonInfo = res.data.insureinfo;
  443. this.riskList = res.data.riskinfo;
  444. this.kindList = res.data.kindinfo;
  445. this.licenseNo = res.data.licenseno;
  446. this.sumPermium = res.data.sumpremium;
  447. this.taxAmount = res.data.taxamount;
  448. this.jqpremium = res.data.jqpremium;
  449. this.sypremium = res.data.sypremium;
  450. // 图片类型(C01车辆影像,C02车主身份证,C03投保人身份证,C04被保人身份证,C05验车照)
  451. this.imageEcho(this.quoteno)
  452. // 影像获取完毕
  453. } else {
  454. uni.showModal({
  455. showCancel: false,
  456. title: "未查询到该订单"
  457. })
  458. }
  459. },
  460. methods: {
  461. ...mapMutations(['setOrdertype', 'setOrderStage']),
  462. //影像查询
  463. async imageEcho(quotenos) {
  464. let imgres = await this.$http.get('/ins/taskImage/findByQuoteNo?quoteNo=' + quotenos);
  465. if (imgres.code == "200") {
  466. Object.keys(imgres.data).forEach((keys) => {
  467. imgres.data[keys].forEach((ele) => {
  468. ele.url = this.$base.baseUrl + ele.url;
  469. return ele;
  470. });
  471. });
  472. console.log(imgres.data)
  473. this.carImageList = imgres.data.C01;
  474. this.ownerImageList = imgres.data.C02;
  475. this.policyImageList = imgres.data.C03;
  476. this.insuredImageList = imgres.data.C04;
  477. this.carCheckImageList = imgres.data.C05;
  478. }
  479. },
  480. // 重新选择车型
  481. toCarInfo() {
  482. this.navigate({
  483. url: '/pages/carInsure1/carInfo1',
  484. success: (res) => {
  485. res.eventChannel.emit("acceptData", {
  486. carInfo: this.carInfo,
  487. ownerInfo: this.ownerInfo,
  488. policyHolderInfo: this.policyHolderInfo,
  489. insuredPersonInfo: this.insuredPersonInfo,
  490. riskList: this.riskList,
  491. kindList: this.kindList
  492. })
  493. }
  494. }, "navigateTo", true);
  495. },
  496. //控制详情的展开和收起
  497. controlShow(type) {
  498. this[type] = !this[type];
  499. },
  500. //阅读并同意协议
  501. agreed() {
  502. if (this.agree == false) {
  503. this.agree = true;
  504. } else {
  505. this.agree = false;
  506. }
  507. },
  508. //保存影像
  509. async getTaskImg(type, typeName) {
  510. let res = await this.$http.get('/insTaskImage/findById?imgtype=' + type + '&taskid=' + this.orderno);
  511. if (res.data.imgList.length > 0) {
  512. this.existenceimg = 1;
  513. } else {
  514. this.existenceimg = 0;
  515. }
  516. this[typeName] = res.data.imgList;
  517. },
  518. async chooseImage(type) {
  519. if (this[type + 'ImageList'].length === 9) {
  520. let isContinue = await this.isFullImg(type);
  521. console.log("是否继续?", isContinue);
  522. if (!isContinue) {
  523. return;
  524. }
  525. }
  526. uni.chooseImage({
  527. count: 9 - this[type + 'ImageList'].length,
  528. success: (res) => {
  529. for (let i = 0; i < res.tempFilePaths.length; i++) {
  530. if (this.name == '永安财险') {
  531. if (Math.round(res.tempFiles[i].size / 1024) > 800) {
  532. uni.showModal({
  533. showCancel: false,
  534. title: "图片过大,请重新上传"
  535. })
  536. } else if ((Math.round(res.tempFiles[i].size / 1024) < 800) && (Math
  537. .round(res
  538. .tempFiles[i].size / 1024) > 100)) {
  539. //#ifdef APP-PLUS
  540. let kb = Math.round((100 / Math.round(res.tempFiles[i].size /
  541. 1024)) *
  542. 100);
  543. uni.compressImage({
  544. src: res.tempFilePaths[i],
  545. quality: kb,
  546. success: res => {
  547. pathToBase64(res.tempFilePath)
  548. .then(base64 => {
  549. this[type + 'ImageList'] = this[
  550. type +
  551. 'ImageList'].concat(base64)
  552. })
  553. }
  554. })
  555. //#endif
  556. //#ifdef H5
  557. const isJpgOrPng = res.tempFiles[i].type === "image/jpeg";
  558. if (!isJpgOrPng) {
  559. uni.showModal({
  560. showCancel: false,
  561. title: "上传图片只能是 JPG 格式!"
  562. })
  563. return false;
  564. }
  565. return new Promise((resolve) => {
  566. // 压缩到400KB,这里的400就是要压缩的大小,可自定义
  567. imageConversion.imageConversion(res.tempFiles[i],
  568. 90)
  569. .then((res) => {
  570. let file = window.URL.createObjectURL(
  571. res) //blob转临时路径
  572. pathToBase64(file)
  573. .then(base64 => {
  574. this[type + 'ImageList'] =
  575. this[type +
  576. 'ImageList']
  577. .imageConversionconcat(
  578. base64)
  579. })
  580. resolve(res);
  581. });
  582. });
  583. //#endif
  584. }
  585. } else {
  586. //#ifdef APP-PLUS
  587. uni.compressImage({
  588. src: res.tempFilePaths[i],
  589. quality: 95,
  590. success: res => {
  591. pathToBase64(res.tempFilePath)
  592. .then(base64 => {
  593. this[type + 'ImageList'] = this[type +
  594. 'ImageList'].concat(base64)
  595. })
  596. }
  597. })
  598. //#endif
  599. //#ifdef H5
  600. const isJpgOrPng = res.tempFiles[i].type === "image/jpeg";
  601. if (!isJpgOrPng) {
  602. uni.showModal({
  603. showCancel: false,
  604. title: "上传图片只能是 JPG 格式!"
  605. })
  606. return false;
  607. }
  608. return new Promise((resolve) => {
  609. // 压缩到400KB,这里的400就是要压缩的大小,可自定义
  610. imageConversion.compressAccurately(res.tempFiles[i], 90)
  611. .then((res) => {
  612. let file = window.URL.createObjectURL(
  613. res) //blob转临时路径
  614. pathToBase64(file)
  615. .then(base64 => {
  616. this[type + 'ImageList'] = this[
  617. type +
  618. 'ImageList'].concat(base64)
  619. })
  620. resolve(res);
  621. });
  622. });
  623. //#endif
  624. }
  625. }
  626. },
  627. fail: (err) => {
  628. console.log("上传失败!!");
  629. },
  630. })
  631. },
  632. isFullImg(type) {
  633. return new Promise((res) => {
  634. uni.showModal({
  635. content: "已经有9张图片了,是否清空现有图片?",
  636. success: (e) => {
  637. if (e.confirm) {
  638. this[type + 'ImageList'] = [];
  639. // this[type+'PreviewImageList']=[];
  640. setTimeout(() => {
  641. res(true);
  642. }, 500);
  643. } else {
  644. res(false)
  645. }
  646. },
  647. fail: () => {
  648. res(false)
  649. }
  650. })
  651. })
  652. },
  653. previewImage(e, type) {
  654. // var current = e.target.dataset.src
  655. // uni.previewImage({
  656. // current: current,
  657. // urls: this[type+'PreviewImageList']
  658. // })
  659. this.previewImgs = [];
  660. this.previewImgs = this[type + 'ImageList'];
  661. var current = e.currentTarget.dataset.src;
  662. this.$refs.previewImage.open(current); // 传入当前选中的图片地址或序号
  663. },
  664. //删除图片
  665. delCheckImage(type, index) {
  666. this[type + 'ImageList'].splice(index, 1);
  667. // this[type+'PreviewImageList'].splice(index,1)
  668. },
  669. // 上传影像并提交核保
  670. async submitAudit() {
  671. if (!this.agree) {
  672. return uni.showToast({
  673. title: '请阅读并同意协议',
  674. icon: "none",
  675. duration: 2000
  676. });
  677. }
  678. uni.showModal({
  679. content: '是否确认提交核保?',
  680. success: async (res) => {
  681. if (res.confirm) {
  682. switch (this.name) {
  683. case "永安财险":
  684. let yaimage = await this.$http.post('/order/yongAn/submitImage', {
  685. companyId: this.companyId
  686. });
  687. if (yaimage.code == '200') {
  688. let yaaudit = await this.$http.post('/order/yongAn/audit', {
  689. companyId: this.companyId,
  690. jqappoint: "",
  691. syappoint: ""
  692. });
  693. if (yaaudit.code == '200') {
  694. uni.showModal({
  695. content: '订单自核成功',
  696. cancelText: '暂不缴费',
  697. confirmText: '立即缴费',
  698. success: (res1) => {
  699. if (res1.confirm) {
  700. uni.navigateTo({
  701. url: "/pages/carInsure1/payCode1?companyId=" +
  702. this.companyId
  703. })
  704. } else {
  705. this.navigate({
  706. url: "/pages/index/index"
  707. }, "switchTab", true);
  708. }
  709. }
  710. });
  711. }
  712. } else {
  713. uni.showModal({
  714. content: '自核不通过(' + result.msg + ')',
  715. confirmText: '继续选择',
  716. success: async (res2) => {
  717. if (res2.confirm) {
  718. this.navigate({
  719. url: "/pages/orders/orders"
  720. }, "switchTab", true);
  721. }
  722. }
  723. });
  724. }
  725. break;
  726. case "中煤财险":
  727. let zmimage = await this.$http.post('/order/zhongMeiApi/submitImage', {
  728. companyId: this.companyId
  729. });
  730. if (zmimage.code == '200') {
  731. let zmaudit = await this.$http.post('/order/zhongMeiApi/audit', {
  732. companyId: this.companyId,
  733. jqappoint: "",
  734. syappoint: ""
  735. });
  736. if (zmaudit.code == '200') {
  737. uni.showModal({
  738. content: '订单自核成功',
  739. cancelText: '暂不缴费',
  740. confirmText: '立即缴费',
  741. success: (res1) => {
  742. if (res1.confirm) {
  743. uni.navigateTo({
  744. url: "/pages/carInsure1/payCode1?companyId=" +
  745. this.companyId
  746. })
  747. } else {
  748. this.navigate({
  749. url: "/pages/index/index"
  750. }, "switchTab", true);
  751. }
  752. }
  753. });
  754. }
  755. } else {
  756. uni.showModal({
  757. content: '自核不通过(' + result.msg + ')',
  758. confirmText: '继续选择',
  759. success: async (res2) => {
  760. if (res2.confirm) {
  761. this.navigate({
  762. url: "/pages/orders/orders"
  763. }, "switchTab", true);
  764. }
  765. }
  766. });
  767. }
  768. break;
  769. case "永诚财险":
  770. let ycimage = await this.$http.post('/api/yongCheng/UploadImage', {
  771. companyId: this.companyId
  772. });
  773. if (ycimage.code == '200') {
  774. let ycaudit = await this.$http.post('/api/yongCheng/audit', {
  775. companyId: this.companyId,
  776. });
  777. if (ycaudit.code == '200') {
  778. uni.showModal({
  779. content: '订单自核成功',
  780. cancelText: '暂不缴费',
  781. confirmText: '立即缴费',
  782. success: (res1) => {
  783. if (res1.confirm) {
  784. uni.navigateTo({
  785. url: "/pages/carInsure1/payCode1?companyId=" +
  786. this.companyId
  787. })
  788. } else {
  789. this.navigate({
  790. url: "/pages/index/index"
  791. }, "switchTab", true);
  792. }
  793. }
  794. });
  795. }
  796. } else {
  797. uni.showModal({
  798. content: '自核不通过(' + result.msg + ')',
  799. confirmText: '继续选择',
  800. success: async (res2) => {
  801. if (res2.confirm) {
  802. this.navigate({
  803. url: "/pages/orders/orders"
  804. }, "switchTab", true);
  805. }
  806. }
  807. });
  808. }
  809. break;
  810. case "紫金财险":
  811. let zjimage = await this.$http.post('/order/zijin/submitImage', {
  812. companyId: this.companyId
  813. });
  814. if (zjimage.code == '200') {
  815. let zjaudit = await this.$http.post('/order/zijin/audit', {
  816. companyId: this.companyId,
  817. });
  818. if (zjaudit.code == '200') {
  819. uni.showModal({
  820. content: '订单自核成功',
  821. cancelText: '暂不缴费',
  822. confirmText: '立即缴费',
  823. success: (res1) => {
  824. if (res1.confirm) {
  825. uni.navigateTo({
  826. url: "/pages/carInsure1/payCode1?companyId=" +
  827. this.companyId
  828. })
  829. } else {
  830. this.navigate({
  831. url: "/pages/index/index"
  832. }, "switchTab", true);
  833. }
  834. }
  835. });
  836. }
  837. } else {
  838. uni.showModal({
  839. content: '自核不通过(' + result.msg + ')',
  840. confirmText: '继续选择',
  841. success: async (res2) => {
  842. if (res2.confirm) {
  843. this.navigate({
  844. url: "/pages/orders/orders"
  845. }, "switchTab", true);
  846. }
  847. }
  848. });
  849. }
  850. break;
  851. case "恒邦财险":
  852. case "安盛天平":
  853. case "众安财险":
  854. case "中国人寿":
  855. let pythonimage = await this.$http.post(
  856. '/insurance/crawler/submitImage', {
  857. subOrderNo: this.companyId
  858. });
  859. if (pythonimage.code == '200') {
  860. let pythonaudit = await this.$http.post(
  861. '/insurance/crawler/audit', {
  862. subOrderNo: this.companyId,
  863. });
  864. if (pythonaudit.code == '200') {
  865. uni.showModal({
  866. content: '订单自核成功',
  867. cancelText: '暂不缴费',
  868. confirmText: '立即缴费',
  869. success: (res1) => {
  870. if (res1.confirm) {
  871. uni.navigateTo({
  872. url: "/pages/carInsure1/payCode1?companyId=" +
  873. this.companyId
  874. })
  875. } else {
  876. this.navigate({
  877. url: "/pages/index/index"
  878. }, "switchTab", true);
  879. }
  880. }
  881. });
  882. }
  883. } else {
  884. uni.showModal({
  885. content: '自核不通过(' + result.msg + ')',
  886. confirmText: '继续选择',
  887. success: async (res2) => {
  888. if (res2.confirm) {
  889. this.navigate({
  890. url: "/pages/orders/orders"
  891. }, "switchTab", true);
  892. }
  893. }
  894. });
  895. }
  896. break;
  897. }
  898. } else if (res.cancel) {}
  899. }
  900. });
  901. }
  902. }
  903. }
  904. </script>
  905. <style lang="scss" scoped>
  906. @import '@/style/mixin.scss';
  907. /* 头部车辆信息和特权Start */
  908. .carInfo {
  909. height: 290upx;
  910. background: -webkit-linear-gradient(0deg, rgba($themeColor, 0.6), rgba($themeColor, 0.8));
  911. background-size: 100% 100%;
  912. }
  913. .carInfo .topLeft {
  914. width: 120upx;
  915. font-size: 90upx;
  916. color: #FFFFFF;
  917. }
  918. .carInfo .topRight .brandName {
  919. width: 400upx;
  920. overflow: hidden;
  921. text-overflow: ellipsis;
  922. white-space: nowrap;
  923. }
  924. .carInfo .other {
  925. background-color: #FFFFFF;
  926. height: 80upx;
  927. border-radius: 15upx;
  928. box-sizing: border-box;
  929. }
  930. .carInfo .other .privilege {
  931. background-color: rgba($themeColor, 0.6);
  932. font-size: 24upx;
  933. color: #FFFFFF;
  934. font-weight: bold;
  935. width: 60upx;
  936. }
  937. .carInfo .other .content {
  938. width: 460upx;
  939. margin-left: 15upx;
  940. overflow: hidden;
  941. text-overflow: ellipsis;
  942. white-space: nowrap;
  943. }
  944. .carInfo .other .icon {
  945. width: 30upx;
  946. }
  947. /* 头部车辆信息和特权End */
  948. /* 人员信息Start */
  949. .personInfo,
  950. .advancePayment,
  951. .imageInfo,
  952. .appoint {
  953. margin-bottom: 20upx;
  954. background: #FFFFFF;
  955. padding: 0upx 30upx;
  956. }
  957. .personInfo .title,
  958. .advancePayment .title,
  959. .imageInfo .title,
  960. .appoint .title {
  961. height: 80upx;
  962. font-size: 32upx;
  963. box-shadow: inset 0 -3upx 0px #fafafa;
  964. }
  965. .showStatus {
  966. font-size: 26upx;
  967. color: $themeColor;
  968. }
  969. .personInfo .content .row,
  970. .advancePayment .content .row {
  971. height: 80upx;
  972. border-bottom: 1px solid #F9F9F9;
  973. }
  974. .personInfo .content .row .left,
  975. .advancePayment .content .row .left {
  976. width: 170upx;
  977. flex-shrink: 0;
  978. font-size: 28upx;
  979. }
  980. .appoint .content .row {
  981. height: auto;
  982. margin-top: 10upx;
  983. }
  984. .appoint .content .row>view {
  985. width: 240upx;
  986. flex-shrink: 1;
  987. font-size: 28upx;
  988. }
  989. .appoint .content .row>textarea {
  990. padding: 15upx;
  991. box-sizing: border-box;
  992. font-size: 26upx;
  993. min-height: 160upx;
  994. height: 100upx;
  995. border: 1px solid #fafafa;
  996. }
  997. .personInfo .content .row .right,
  998. .advancePayment .content .row .right,
  999. .appoint .content .row .right {
  1000. font-size: 28upx;
  1001. }
  1002. /* 人员信息End */
  1003. .uni-uploader__file {
  1004. position: relative;
  1005. }
  1006. .delImgIcon {
  1007. width: 40upx;
  1008. height: 40upx;
  1009. background-color: #999;
  1010. position: absolute;
  1011. right: 0upx;
  1012. top: 0upx;
  1013. color: #FFFFFF;
  1014. }
  1015. /* 底部按钮Start */
  1016. .bottomBtn {
  1017. z-index: 99;
  1018. position: fixed;
  1019. bottom: 0;
  1020. left: 0;
  1021. right: 0;
  1022. border-top: 1px solid #F1F1F1;
  1023. background-color: #FFFFFF;
  1024. height: 150upx;
  1025. }
  1026. .bottomBtn .agree {
  1027. height: 60upx;
  1028. font-size: 24upx;
  1029. }
  1030. .bottomBtn .agree .tip {
  1031. color: $themeColor;
  1032. margin: 0upx 10upx;
  1033. }
  1034. .bottomBtn .btnView {
  1035. height: 100upx;
  1036. border-top: 1px solid #F1F1F1;
  1037. }
  1038. .bottomBtn .listener {
  1039. width: 120upx;
  1040. font-size: 20upx;
  1041. line-height: 1;
  1042. color: #999;
  1043. }
  1044. .bottomBtn .listener .icon {
  1045. font-size: 40upx;
  1046. padding: 0;
  1047. line-height: 1.2;
  1048. }
  1049. .bottomBtn .btn {
  1050. font-size: 34upx;
  1051. background-color: $themeColor;
  1052. color: #fff;
  1053. width: 280upx;
  1054. flex-shrink: 0;
  1055. }
  1056. /* 底部按钮End */
  1057. </style>