underwriting1.vue 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557
  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" :data-src="image"
  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" :data-src="image"
  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" :data-src="image"
  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" :data-src="image"
  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" :data-src="image"
  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. previewImgs: [],
  365. sumPermium: "",
  366. carInfo: {},
  367. vehicleModel: {},
  368. orderno: "",
  369. licenseNo: "",
  370. riskList: [],
  371. kindList: [],
  372. name: "",
  373. icon: "",
  374. taxAmount: "",
  375. jqpremium: "",
  376. sypremium: "",
  377. ownerInfo: {},
  378. policyHolderInfo: {},
  379. insuredPersonInfo: {},
  380. agree: false,
  381. jqappoint: "", //交强险特别约定
  382. syappoint: "", //商业特别约定
  383. identifyList: [{
  384. label: '身份证',
  385. id: "01"
  386. },
  387. {
  388. label: '护照',
  389. id: "02"
  390. },
  391. {
  392. label: '港澳台居民居住证',
  393. id: "03"
  394. },
  395. {
  396. label: '组织机构代码证',
  397. id: "04"
  398. },
  399. {
  400. label: '统一社会信用代码证',
  401. id: "05"
  402. },
  403. {
  404. label: '营业执照',
  405. id: "06"
  406. }
  407. ],
  408. showOwerInfo: false, //展示车主信息
  409. showPolicyHolderInfo: false, //展示投保人信息
  410. showInsuredPersonInfo: false, //展示被保人信息
  411. showProposalWay: false, //获取保单方式
  412. showAdvancePayment: false, //展示保费
  413. showAppoint: false, //展示特约
  414. showCarImageInfo: false, //显示车辆影像
  415. carImageList: [],
  416. showOwnerImageInfo: false, //显示车主影像
  417. ownerImageList: [],
  418. showPolicyImageInfo: false, //显示投保人影像
  419. policyImageList: [],
  420. showInsuredImageInfo: false, //显示被保人影像
  421. insuredImageList: [],
  422. showCarCheckImageInfo: false, //显示验车照影像
  423. carCheckImageList: [],
  424. existenceimg: 0,
  425. }
  426. },
  427. async onLoad(params) {
  428. if (!!params.orderno) {
  429. this.orderno = params.orderno;
  430. let res = await this.$http.get('/insOrder/queryOrder?orderno=' + params.orderno);
  431. //获取前一个页面传过来的信息(车辆信息,人员信息,险种信息)
  432. this.icon = "";
  433. this.name = res.data.inscompany;
  434. this.carInfo = res.data.carinfo;
  435. this.ownerInfo = res.data.ownerinfo;
  436. this.policyHolderInfo = res.data.applyinfo;
  437. this.insuredPersonInfo = res.data.insureinfo;
  438. this.riskList = res.data.riskinfo;
  439. this.kindList = res.data.kindinfo;
  440. this.licenseNo = res.data.licenseNo;
  441. this.sumPermium = res.data.sumpremium;
  442. this.taxAmount = res.data.taxamount;
  443. this.jqpremium = res.data.jqpremium;
  444. this.sypremium = res.data.sypremium;
  445. // 图片类型(C01车辆影像,C02车主身份证,C03投保人身份证,C04被保人身份证,C05验车照)
  446. this.getTaskImg('C01', 'carImageList');
  447. this.getTaskImg('C02', 'ownerImageList');
  448. this.getTaskImg('C03', 'policyImageList');
  449. this.getTaskImg('C04', 'insuredImageList');
  450. this.getTaskImg('C05', 'carCheckImageList');
  451. // 影像获取完毕
  452. } else {
  453. uni.showModal({
  454. showCancel: false,
  455. title: "未查询到该订单"
  456. })
  457. }
  458. },
  459. methods: {
  460. ...mapMutations(['setOrdertype', 'setOrderStage']),
  461. // 重新选择车型
  462. toCarInfo() {
  463. this.navigate({
  464. url: '/pages/carInsure1/carInfo1',
  465. success: (res) => {
  466. res.eventChannel.emit("acceptData", {
  467. carInfo: this.carInfo,
  468. ownerInfo: this.ownerInfo,
  469. policyHolderInfo: this.policyHolderInfo,
  470. insuredPersonInfo: this.insuredPersonInfo,
  471. riskList: this.riskList,
  472. kindList: this.kindList
  473. })
  474. }
  475. }, "navigateTo", true);
  476. },
  477. //控制详情的展开和收起
  478. controlShow(type) {
  479. this[type] = !this[type];
  480. },
  481. //阅读并同意协议
  482. agreed() {
  483. if (this.agree == false) {
  484. this.agree = true;
  485. } else {
  486. this.agree = false;
  487. }
  488. },
  489. //保存影像
  490. async getTaskImg(type, typeName) {
  491. let res = await this.$http.get('/insTaskImage/findById?imgtype=' + type + '&taskid=' + this.orderno);
  492. if (res.data.imgList.length > 0) {
  493. this.existenceimg = 1;
  494. } else {
  495. this.existenceimg = 0;
  496. }
  497. this[typeName] = res.data.imgList;
  498. },
  499. async chooseImage(type) {
  500. if (this[type + 'ImageList'].length === 9) {
  501. let isContinue = await this.isFullImg(type);
  502. console.log("是否继续?", isContinue);
  503. if (!isContinue) {
  504. return;
  505. }
  506. }
  507. uni.chooseImage({
  508. count: 9 - this[type + 'ImageList'].length,
  509. success: (res) => {
  510. for (let i = 0; i < res.tempFilePaths.length; i++) {
  511. if (this.name == '永安财险') {
  512. if (Math.round(res.tempFiles[i].size / 1024) > 800) {
  513. uni.showModal({
  514. showCancel: false,
  515. title: "图片过大,请重新上传"
  516. })
  517. } else if ((Math.round(res.tempFiles[i].size / 1024) < 800) && (Math
  518. .round(res
  519. .tempFiles[i].size / 1024) > 100)) {
  520. //#ifdef APP-PLUS
  521. let kb = Math.round((100 / Math.round(res.tempFiles[i].size /
  522. 1024)) *
  523. 100);
  524. uni.compressImage({
  525. src: res.tempFilePaths[i],
  526. quality: kb,
  527. success: res => {
  528. pathToBase64(res.tempFilePath)
  529. .then(base64 => {
  530. this[type + 'ImageList'] = this[
  531. type +
  532. 'ImageList'].concat(base64)
  533. })
  534. }
  535. })
  536. //#endif
  537. //#ifdef H5
  538. const isJpgOrPng = res.tempFiles[i].type === "image/jpeg";
  539. if (!isJpgOrPng) {
  540. uni.showModal({
  541. showCancel: false,
  542. title: "上传图片只能是 JPG 格式!"
  543. })
  544. return false;
  545. }
  546. return new Promise((resolve) => {
  547. // 压缩到400KB,这里的400就是要压缩的大小,可自定义
  548. imageConversion.imageConversion(res.tempFiles[i],
  549. 90)
  550. .then((res) => {
  551. let file = window.URL.createObjectURL(
  552. res) //blob转临时路径
  553. pathToBase64(file)
  554. .then(base64 => {
  555. this[type + 'ImageList'] =
  556. this[type +
  557. 'ImageList']
  558. .imageConversionconcat(
  559. base64)
  560. })
  561. resolve(res);
  562. });
  563. });
  564. //#endif
  565. }
  566. } else {
  567. //#ifdef APP-PLUS
  568. uni.compressImage({
  569. src: res.tempFilePaths[i],
  570. quality: 95,
  571. success: res => {
  572. pathToBase64(res.tempFilePath)
  573. .then(base64 => {
  574. this[type + 'ImageList'] = this[type +
  575. 'ImageList'].concat(base64)
  576. })
  577. }
  578. })
  579. //#endif
  580. //#ifdef H5
  581. const isJpgOrPng = res.tempFiles[i].type === "image/jpeg";
  582. if (!isJpgOrPng) {
  583. uni.showModal({
  584. showCancel: false,
  585. title: "上传图片只能是 JPG 格式!"
  586. })
  587. return false;
  588. }
  589. return new Promise((resolve) => {
  590. // 压缩到400KB,这里的400就是要压缩的大小,可自定义
  591. imageConversion.compressAccurately(res.tempFiles[i], 90)
  592. .then((res) => {
  593. let file = window.URL.createObjectURL(
  594. res) //blob转临时路径
  595. pathToBase64(file)
  596. .then(base64 => {
  597. this[type + 'ImageList'] = this[
  598. type +
  599. 'ImageList'].concat(base64)
  600. })
  601. resolve(res);
  602. });
  603. });
  604. //#endif
  605. }
  606. }
  607. },
  608. fail: (err) => {
  609. console.log("上传失败!!");
  610. },
  611. })
  612. },
  613. isFullImg(type) {
  614. return new Promise((res) => {
  615. uni.showModal({
  616. content: "已经有9张图片了,是否清空现有图片?",
  617. success: (e) => {
  618. if (e.confirm) {
  619. this[type + 'ImageList'] = [];
  620. // this[type+'PreviewImageList']=[];
  621. setTimeout(() => {
  622. res(true);
  623. }, 500);
  624. } else {
  625. res(false)
  626. }
  627. },
  628. fail: () => {
  629. res(false)
  630. }
  631. })
  632. })
  633. },
  634. previewImage(e, type) {
  635. // var current = e.target.dataset.src
  636. // uni.previewImage({
  637. // current: current,
  638. // urls: this[type+'PreviewImageList']
  639. // })
  640. this.previewImgs = [];
  641. this.previewImgs = this[type + 'ImageList'];
  642. var current = e.currentTarget.dataset.src;
  643. this.$refs.previewImage.open(current); // 传入当前选中的图片地址或序号
  644. },
  645. //删除图片
  646. delCheckImage(type, index) {
  647. this[type + 'ImageList'].splice(index, 1);
  648. // this[type+'PreviewImageList'].splice(index,1)
  649. },
  650. //保存影像
  651. async saveTaskImg(param) {
  652. if (this.name == '永安财险') {
  653. let res = await this.$http.post('/api/yongan/UploadImage', param, {
  654. timeout: 30000
  655. });
  656. } else if ((this.name == '中煤财险') || (this.name == '恒邦财险') || (this.name == '永诚财险')) {
  657. //上传影像
  658. let res = await this.$http.post('/insZhongmei/uploadImage', param, {
  659. timeout: 30000
  660. });
  661. }
  662. },
  663. // 上传影像并提交核保
  664. async submitAudit() {
  665. let a = this.carImageList.length;
  666. let b = this.ownerImageList.length;
  667. let c = this.policyImageList.length;
  668. let d = this.insuredImageList.length;
  669. let e = this.carCheckImageList.length;
  670. if ((a == 0 && b == 0 && c == 0 && d == 0 && e == 0) && ["中煤财险", "恒邦财险", "永诚财险"].includes(this.name)) {
  671. return uni.showToast({
  672. title: '请先上传影像',
  673. icon: "none",
  674. duration: 2000
  675. });
  676. }
  677. if (!this.agree) {
  678. return uni.showToast({
  679. title: '请阅读并同意协议',
  680. icon: "none",
  681. duration: 2000
  682. });
  683. }
  684. if ((this.policyHolderInfo.identifyNumber.substring(0, 2) != '14') && (this.policyHolderInfo.addr
  685. .substring(0, 3) == '山西省')) {
  686. uni.showModal({
  687. content: '外地身份证本地地址,请转至人工核保',
  688. cancelText: '继续选择',
  689. confirmText: '人工核保',
  690. success: async (res2) => {
  691. if (res2.confirm) {
  692. this.setOrdertype(0)
  693. this.setOrderStage(1)
  694. this.navigate({
  695. url: "/pages/orders/orders"
  696. }, "switchTab", true);
  697. } else {
  698. let param = {
  699. "auditid": this.userInfo.sysUser
  700. .id, //核保人会员号
  701. "auditopinion": '', //核保意见
  702. "jqapplyno": "", //交强险投保单号
  703. "jqappoint": "", //交强特别约定
  704. "jqpolicyno": "", //交强保单号
  705. "orderno": this.orderno, //订单号
  706. "orderstatus": "0", //订单类型
  707. "syapplyno": "", //商业险投保单号
  708. "syappoint": "", //商业险特别约定
  709. "sypolicyno": "" //商业保单号
  710. }
  711. let res1 = await this.$http.post(
  712. '/insOrder/saveAudit', param);
  713. this.setOrdertype(0)
  714. this.setOrderStage(0)
  715. this.navigate({
  716. url: "/pages/orders/orders"
  717. }, "switchTab", true);
  718. }
  719. }
  720. });
  721. }
  722. uni.showModal({
  723. content: '是否确认提交核保?',
  724. success: async (res) => {
  725. if (res.confirm) {
  726. // 图片类型(C01车辆影像,C02车主身份证,C03投保人身份证,C04被保人身份证,C05验车照)
  727. if (this.carImageList.length > 0) {
  728. var paramImg1 = {
  729. "imgList": this.carImageList,
  730. "imgtype": "C01",
  731. "taskid": this.orderno
  732. }
  733. await this.saveTaskImg(paramImg1);
  734. }
  735. if (this.ownerImageList.length > 0) {
  736. var paramImg2 = {
  737. "imgList": this.ownerImageList,
  738. "imgtype": "C02",
  739. "taskid": this.orderno
  740. }
  741. await this.saveTaskImg(paramImg2);
  742. }
  743. if (this.policyImageList.length > 0) {
  744. var paramImg3 = {
  745. "imgList": this.policyImageList,
  746. "imgtype": "C03",
  747. "taskid": this.orderno
  748. }
  749. await this.saveTaskImg(paramImg3);
  750. }
  751. if (this.insuredImageList.length > 0) {
  752. var paramImg4 = {
  753. "imgList": this.insuredImageList,
  754. "imgtype": "C04",
  755. "taskid": this.orderno
  756. }
  757. await this.saveTaskImg(paramImg4);
  758. }
  759. if (this.carCheckImageList.length > 0) {
  760. var paramImg5 = {
  761. "imgList": this.carCheckImageList,
  762. "imgtype": "C05",
  763. "taskid": this.orderno
  764. }
  765. await this.saveTaskImg(paramImg5);
  766. }
  767. switch (this.name) {
  768. case "永安财险":
  769. /* 永安 */
  770. let result = await this.$http.post('/api/yongan/audit', {
  771. 'orderno': this.orderno,
  772. 'jqappoint': "",
  773. 'syappoint': "",
  774. });
  775. if (result.code == '200') {
  776. uni.showModal({
  777. content: '订单自核成功',
  778. cancelText: '暂不缴费',
  779. confirmText: '立即缴费',
  780. success: (res1) => {
  781. if (res1.confirm) {
  782. uni.navigateTo({
  783. url: "/pages/carInsure1/payCode1?orderno=" +
  784. this.orderno
  785. })
  786. } else {
  787. this.setOrdertype(0)
  788. this.setOrderStage(5)
  789. this.navigate({
  790. url: "/pages/index/index"
  791. }, "switchTab", true);
  792. }
  793. }
  794. });
  795. } else {
  796. uni.showModal({
  797. content: '自核不通过(' + result.msg + ')',
  798. cancelText: '继续选择',
  799. confirmText: '人工核保',
  800. success: async (res2) => {
  801. if (res2.confirm) {
  802. this.setOrdertype(0)
  803. this.setOrderStage(1)
  804. this.navigate({
  805. url: "/pages/orders/orders"
  806. }, "switchTab", true);
  807. } else {
  808. let param = {
  809. "auditid": this.userInfo.sysUser
  810. .id, //核保人会员号
  811. "auditopinion": '', //核保意见
  812. "jqapplyno": "", //交强险投保单号
  813. "jqappoint": "", //交强特别约定
  814. "jqpolicyno": "", //交强保单号
  815. "orderno": this.orderno, //订单号
  816. "orderstatus": "0", //订单类型
  817. "syapplyno": "", //商业险投保单号
  818. "syappoint": "", //商业险特别约定
  819. "sypolicyno": "" //商业保单号
  820. }
  821. let res1 = await this.$http.post(
  822. '/insOrder/saveAudit', param);
  823. this.setOrdertype(0)
  824. this.setOrderStage(0)
  825. this.navigate({
  826. url: "/pages/orders/orders"
  827. }, "switchTab", true);
  828. }
  829. }
  830. });
  831. }
  832. /* 永安 */
  833. break;
  834. case "人保财险":
  835. let result1 = await this.$http.post('/api/insRenbao/audit', {
  836. 'orderno': this.orderno,
  837. 'jqappoint': "",
  838. 'syappoint': "",
  839. });
  840. if (result1.code == '200') {
  841. uni.showModal({
  842. content: '订单自核成功',
  843. cancelText: '暂不缴费',
  844. confirmText: '立即缴费',
  845. success: (res1) => {
  846. if (res1.confirm) {
  847. uni.navigateTo({
  848. url: "/pages/carInsure1/payCode1?orderno=" +
  849. this.orderno
  850. })
  851. } else {
  852. this.setOrdertype(0)
  853. this.setOrderStage(5)
  854. this.navigate({
  855. url: "/pages/index/index"
  856. }, "switchTab", true);
  857. }
  858. }
  859. });
  860. } else {
  861. uni.showModal({
  862. content: '自核不通过(' + result1.msg + ')',
  863. cancelText: '继续选择',
  864. confirmText: '人工核保',
  865. success: async (res2) => {
  866. if (res2.confirm) {
  867. this.setOrdertype(0)
  868. this.setOrderStage(1)
  869. this.navigate({
  870. url: "/pages/orders/orders"
  871. }, "switchTab", true);
  872. } else {
  873. let param = {
  874. "auditid": this.userInfo.sysUser
  875. .id, //核保人会员号
  876. "auditopinion": '', //核保意见
  877. "jqapplyno": "", //交强险投保单号
  878. "jqappoint": "", //交强特别约定
  879. "jqpolicyno": "", //交强保单号
  880. "orderno": this.orderno, //订单号
  881. "orderstatus": "0", //订单类型
  882. "syapplyno": "", //商业险投保单号
  883. "syappoint": "", //商业险特别约定
  884. "sypolicyno": "" //商业保单号
  885. }
  886. let res1 = await this.$http.post(
  887. '/insOrder/saveAudit', param);
  888. this.setOrdertype(0)
  889. this.setOrderStage(0)
  890. this.navigate({
  891. url: "/pages/orders/orders"
  892. }, "switchTab", true);
  893. }
  894. }
  895. });
  896. /* 人保 */
  897. }
  898. break;
  899. case "中煤财险":
  900. /* 中煤 */
  901. if ((this.existenceimg == 0) && ((this.carImageList.length > 0) || (
  902. this.ownerImageList.length > 0) || (this.policyImageList
  903. .length > 0) || (this.insuredImageList.length > 0) || (this
  904. .carCheckImageList.length > 0))) {
  905. let res = await this.$http.post('/insZhongmei/submitImage', {
  906. 'orderno': this.orderno,
  907. });
  908. if (res.code == '200') {
  909. let result = await this.$http.post('/insZhongmei/audit', {
  910. 'orderno': this.orderno,
  911. 'jqappoint': "",
  912. 'syappoint': "",
  913. });
  914. if (result.code == '200') {
  915. uni.showModal({
  916. content: '订单自核成功',
  917. cancelText: '暂不缴费',
  918. confirmText: '立即缴费',
  919. success: (res1) => {
  920. if (res1.confirm) {
  921. uni.navigateTo({
  922. url: "/pages/carInsure1/payCode1?orderno=" +
  923. this.orderno
  924. })
  925. } else {
  926. this.setOrdertype(0)
  927. this.setOrderStage(5)
  928. this.navigate({
  929. url: "/pages/index/index"
  930. }, "switchTab", true);
  931. }
  932. }
  933. });
  934. } else {
  935. uni.showModal({
  936. content: '自核不通过(' + result.msg + ')',
  937. cancelText: '继续选择',
  938. confirmText: '人工核保',
  939. success: async (res2) => {
  940. if (res2.confirm) {
  941. this.setOrdertype(0)
  942. this.setOrderStage(1)
  943. this.navigate({
  944. url: "/pages/orders/orders"
  945. }, "switchTab", true);
  946. } else {
  947. let param = {
  948. "auditid": this.userInfo
  949. .sysUser
  950. .id, //核保人会员号
  951. "auditopinion": '', //核保意见
  952. "jqapplyno": "", //交强险投保单号
  953. "jqappoint": "", //交强特别约定
  954. "jqpolicyno": "", //交强保单号
  955. "orderno": this
  956. .orderno, //订单号
  957. "orderstatus": "0", //订单类型
  958. "syapplyno": "", //商业险投保单号
  959. "syappoint": "", //商业险特别约定
  960. "sypolicyno": "" //商业保单号
  961. }
  962. let res1 = await this.$http.post(
  963. '/insOrder/saveAudit',
  964. param);
  965. this.setOrdertype(0)
  966. this.setOrderStage(0)
  967. this.navigate({
  968. url: "/pages/orders/orders"
  969. }, "switchTab", true);
  970. }
  971. }
  972. });
  973. }
  974. } else {
  975. return uni.showToast({
  976. icon: 'none',
  977. title: res.msg + ',请重新申请核保',
  978. duration: 1500
  979. });
  980. }
  981. } else {
  982. let result = await this.$http.post('/insZhongmei/audit', {
  983. 'orderno': this.orderno,
  984. 'jqappoint': "",
  985. 'syappoint': "",
  986. });
  987. if (result.code == '200') {
  988. uni.showModal({
  989. content: '订单自核成功',
  990. cancelText: '暂不缴费',
  991. confirmText: '立即缴费',
  992. success: (res1) => {
  993. if (res1.confirm) {
  994. uni.navigateTo({
  995. url: "/pages/carInsure1/payCode1?orderno=" +
  996. this.orderno
  997. })
  998. } else {
  999. this.setOrdertype(0)
  1000. this.setOrderStage(5)
  1001. this.navigate({
  1002. url: "/pages/index/index"
  1003. }, "switchTab", true);
  1004. }
  1005. }
  1006. });
  1007. } else {
  1008. uni.showModal({
  1009. content: '自核不通过(' + result.msg + ')',
  1010. cancelText: '继续选择',
  1011. confirmText: '人工核保',
  1012. success: async (res2) => {
  1013. if (res2.confirm) {
  1014. this.setOrdertype(0)
  1015. this.setOrderStage(1)
  1016. this.navigate({
  1017. url: "/pages/orders/orders"
  1018. }, "switchTab", true);
  1019. } else {
  1020. let param = {
  1021. "auditid": this.userInfo
  1022. .sysUser
  1023. .id, //核保人会员号
  1024. "auditopinion": '', //核保意见
  1025. "jqapplyno": "", //交强险投保单号
  1026. "jqappoint": "", //交强特别约定
  1027. "jqpolicyno": "", //交强保单号
  1028. "orderno": this.orderno, //订单号
  1029. "orderstatus": "0", //订单类型
  1030. "syapplyno": "", //商业险投保单号
  1031. "syappoint": "", //商业险特别约定
  1032. "sypolicyno": "" //商业保单号
  1033. }
  1034. let res1 = await this.$http.post(
  1035. '/insOrder/saveAudit', param);
  1036. this.setOrdertype(0)
  1037. this.setOrderStage(0)
  1038. this.navigate({
  1039. url: "/pages/orders/orders"
  1040. }, "switchTab", true);
  1041. }
  1042. }
  1043. });
  1044. }
  1045. }
  1046. break;
  1047. case "恒邦财险":
  1048. /* 恒邦 */
  1049. if ((this.existenceimg == 0) && ((this.carImageList.length > 0) || (
  1050. this.ownerImageList.length > 0) || (this.policyImageList
  1051. .length > 0) || (this.insuredImageList.length > 0) || (this
  1052. .carCheckImageList.length > 0))) {
  1053. let res = await this.$http.post('/ins/hengbang/submitImage', {
  1054. 'orderno': this.orderno,
  1055. });
  1056. if (res.code == '200') {
  1057. let result = await this.$http.post('/ins/hengbang/audit', {
  1058. 'orderno': this.orderno,
  1059. 'jqappoint': "",
  1060. 'syappoint': "",
  1061. });
  1062. if (result.code == '200') {
  1063. uni.showModal({
  1064. content: '订单自核成功',
  1065. cancelText: '暂不缴费',
  1066. confirmText: '立即缴费',
  1067. success: (res1) => {
  1068. if (res1.confirm) {
  1069. uni.navigateTo({
  1070. url: "/pages/carInsure1/payCode1?orderno=" +
  1071. this.orderno
  1072. })
  1073. } else {
  1074. this.setOrdertype(0)
  1075. this.setOrderStage(5)
  1076. this.navigate({
  1077. url: "/pages/index/index"
  1078. }, "switchTab", true);
  1079. }
  1080. }
  1081. });
  1082. } else {
  1083. uni.showModal({
  1084. content: '自核不通过(' + result.msg + ')',
  1085. cancelText: '继续选择',
  1086. confirmText: '人工核保',
  1087. success: async (res2) => {
  1088. if (res2.confirm) {
  1089. this.setOrdertype(0)
  1090. this.setOrderStage(1)
  1091. this.navigate({
  1092. url: "/pages/orders/orders"
  1093. }, "switchTab", true);
  1094. } else {
  1095. let param = {
  1096. "auditid": this.userInfo
  1097. .sysUser
  1098. .id, //核保人会员号
  1099. "auditopinion": '', //核保意见
  1100. "jqapplyno": "", //交强险投保单号
  1101. "jqappoint": "", //交强特别约定
  1102. "jqpolicyno": "", //交强保单号
  1103. "orderno": this
  1104. .orderno, //订单号
  1105. "orderstatus": "0", //订单类型
  1106. "syapplyno": "", //商业险投保单号
  1107. "syappoint": "", //商业险特别约定
  1108. "sypolicyno": "" //商业保单号
  1109. }
  1110. let res1 = await this.$http.post(
  1111. '/insOrder/saveAudit',
  1112. param);
  1113. this.setOrdertype(0)
  1114. this.setOrderStage(0)
  1115. this.navigate({
  1116. url: "/pages/orders/orders"
  1117. }, "switchTab", true);
  1118. }
  1119. }
  1120. });
  1121. }
  1122. } else {
  1123. return uni.showToast({
  1124. icon: 'none',
  1125. title: res.msg + ',请重新申请核保',
  1126. duration: 1500
  1127. });
  1128. }
  1129. } else {
  1130. let result = await this.$http.post('/ins/hengbang/audit', {
  1131. 'orderno': this.orderno,
  1132. 'jqappoint': "",
  1133. 'syappoint': "",
  1134. });
  1135. if (result.code == '200') {
  1136. uni.showModal({
  1137. content: '订单自核成功',
  1138. cancelText: '暂不缴费',
  1139. confirmText: '立即缴费',
  1140. success: (res1) => {
  1141. if (res1.confirm) {
  1142. uni.navigateTo({
  1143. url: "/pages/carInsure1/payCode1?orderno=" +
  1144. this.orderno
  1145. })
  1146. } else {
  1147. this.setOrdertype(0)
  1148. this.setOrderStage(5)
  1149. this.navigate({
  1150. url: "/pages/index/index"
  1151. }, "switchTab", true);
  1152. }
  1153. }
  1154. });
  1155. } else {
  1156. uni.showModal({
  1157. content: '自核不通过(' + result.msg + ')',
  1158. cancelText: '继续选择',
  1159. confirmText: '人工核保',
  1160. success: async (res2) => {
  1161. if (res2.confirm) {
  1162. this.setOrdertype(0)
  1163. this.setOrderStage(1)
  1164. this.navigate({
  1165. url: "/pages/orders/orders"
  1166. }, "switchTab", true);
  1167. } else {
  1168. let param = {
  1169. "auditid": this.userInfo
  1170. .sysUser
  1171. .id, //核保人会员号
  1172. "auditopinion": '', //核保意见
  1173. "jqapplyno": "", //交强险投保单号
  1174. "jqappoint": "", //交强特别约定
  1175. "jqpolicyno": "", //交强保单号
  1176. "orderno": this.orderno, //订单号
  1177. "orderstatus": "0", //订单类型
  1178. "syapplyno": "", //商业险投保单号
  1179. "syappoint": "", //商业险特别约定
  1180. "sypolicyno": "" //商业保单号
  1181. }
  1182. let res1 = await this.$http.post(
  1183. '/insOrder/saveAudit', param);
  1184. this.setOrdertype(0)
  1185. this.setOrderStage(0)
  1186. this.navigate({
  1187. url: "/pages/orders/orders"
  1188. }, "switchTab", true);
  1189. }
  1190. }
  1191. });
  1192. }
  1193. }
  1194. break;
  1195. case "永诚财险":
  1196. /* 永诚 */
  1197. if ((this.existenceimg == 0) && ((this.carImageList.length > 0) || (
  1198. this.ownerImageList.length > 0) || (this.policyImageList
  1199. .length > 0) || (this.insuredImageList.length > 0) || (this
  1200. .carCheckImageList.length > 0))) {
  1201. let res = await this.$http.post('/ins/yongcheng/submitImage', {
  1202. 'orderno': this.orderno,
  1203. });
  1204. if (res.code == '200') {
  1205. let result = await this.$http.post('/ins/yongcheng/audit', {
  1206. 'orderno': this.orderno,
  1207. 'jqappoint': "",
  1208. 'syappoint': "",
  1209. });
  1210. if (result.code == '200') {
  1211. uni.showModal({
  1212. content: '订单自核成功',
  1213. cancelText: '暂不缴费',
  1214. confirmText: '立即缴费',
  1215. success: (res1) => {
  1216. if (res1.confirm) {
  1217. uni.navigateTo({
  1218. url: "/pages/carInsure1/payCode1?orderno=" +
  1219. this.orderno
  1220. })
  1221. } else {
  1222. this.setOrdertype(0)
  1223. this.setOrderStage(5)
  1224. this.navigate({
  1225. url: "/pages/index/index"
  1226. }, "switchTab", true);
  1227. }
  1228. }
  1229. });
  1230. } else {
  1231. uni.showModal({
  1232. content: '自核不通过(' + result.msg + ')',
  1233. cancelText: '继续选择',
  1234. confirmText: '人工核保',
  1235. success: async (res2) => {
  1236. if (res2.confirm) {
  1237. this.setOrdertype(0)
  1238. this.setOrderStage(1)
  1239. this.navigate({
  1240. url: "/pages/orders/orders"
  1241. }, "switchTab", true);
  1242. } else {
  1243. let param = {
  1244. "auditid": this.userInfo
  1245. .sysUser
  1246. .id, //核保人会员号
  1247. "auditopinion": '', //核保意见
  1248. "jqapplyno": "", //交强险投保单号
  1249. "jqappoint": "", //交强特别约定
  1250. "jqpolicyno": "", //交强保单号
  1251. "orderno": this
  1252. .orderno, //订单号
  1253. "orderstatus": "0", //订单类型
  1254. "syapplyno": "", //商业险投保单号
  1255. "syappoint": "", //商业险特别约定
  1256. "sypolicyno": "" //商业保单号
  1257. }
  1258. let res1 = await this.$http.post(
  1259. '/insOrder/saveAudit',
  1260. param);
  1261. this.setOrdertype(0)
  1262. this.setOrderStage(0)
  1263. this.navigate({
  1264. url: "/pages/orders/orders"
  1265. }, "switchTab", true);
  1266. }
  1267. }
  1268. });
  1269. }
  1270. } else {
  1271. return uni.showToast({
  1272. icon: 'none',
  1273. title: res.msg + ',请重新申请核保',
  1274. duration: 1500
  1275. });
  1276. }
  1277. } else {
  1278. let result = await this.$http.post('/ins/yongcheng/audit', {
  1279. 'orderno': this.orderno,
  1280. 'jqappoint': "",
  1281. 'syappoint': "",
  1282. });
  1283. if (result.code == '200') {
  1284. uni.showModal({
  1285. content: '订单自核成功',
  1286. cancelText: '暂不缴费',
  1287. confirmText: '立即缴费',
  1288. success: (res1) => {
  1289. if (res1.confirm) {
  1290. uni.navigateTo({
  1291. url: "/pages/carInsure1/payCode1?orderno=" +
  1292. this.orderno
  1293. })
  1294. } else {
  1295. this.setOrdertype(0)
  1296. this.setOrderStage(5)
  1297. this.navigate({
  1298. url: "/pages/index/index"
  1299. }, "switchTab", true);
  1300. }
  1301. }
  1302. });
  1303. } else {
  1304. uni.showModal({
  1305. content: '自核不通过(' + result.msg + ')',
  1306. cancelText: '继续选择',
  1307. confirmText: '人工核保',
  1308. success: async (res2) => {
  1309. if (res2.confirm) {
  1310. this.setOrdertype(0)
  1311. this.setOrderStage(1)
  1312. this.navigate({
  1313. url: "/pages/orders/orders"
  1314. }, "switchTab", true);
  1315. } else {
  1316. let param = {
  1317. "auditid": this.userInfo
  1318. .sysUser
  1319. .id, //核保人会员号
  1320. "auditopinion": '', //核保意见
  1321. "jqapplyno": "", //交强险投保单号
  1322. "jqappoint": "", //交强特别约定
  1323. "jqpolicyno": "", //交强保单号
  1324. "orderno": this.orderno, //订单号
  1325. "orderstatus": "0", //订单类型
  1326. "syapplyno": "", //商业险投保单号
  1327. "syappoint": "", //商业险特别约定
  1328. "sypolicyno": "" //商业保单号
  1329. }
  1330. let res1 = await this.$http.post(
  1331. '/insOrder/saveAudit', param);
  1332. this.setOrdertype(0)
  1333. this.setOrderStage(0)
  1334. this.navigate({
  1335. url: "/pages/orders/orders"
  1336. }, "switchTab", true);
  1337. }
  1338. }
  1339. });
  1340. }
  1341. }
  1342. break;
  1343. }
  1344. } else if (res.cancel) {
  1345. console.log('用户点击取消');
  1346. }
  1347. }
  1348. });
  1349. }
  1350. }
  1351. }
  1352. </script>
  1353. <style lang="scss" scoped>
  1354. @import '@/style/mixin.scss';
  1355. /* 头部车辆信息和特权Start */
  1356. .carInfo {
  1357. height: 290upx;
  1358. background: -webkit-linear-gradient(0deg, rgba($themeColor, 0.6), rgba($themeColor, 0.8));
  1359. background-size: 100% 100%;
  1360. }
  1361. .carInfo .topLeft {
  1362. width: 120upx;
  1363. font-size: 90upx;
  1364. color: #FFFFFF;
  1365. }
  1366. .carInfo .topRight .brandName {
  1367. width: 400upx;
  1368. overflow: hidden;
  1369. text-overflow: ellipsis;
  1370. white-space: nowrap;
  1371. }
  1372. .carInfo .other {
  1373. background-color: #FFFFFF;
  1374. height: 80upx;
  1375. border-radius: 15upx;
  1376. box-sizing: border-box;
  1377. }
  1378. .carInfo .other .privilege {
  1379. background-color: rgba($themeColor, 0.6);
  1380. font-size: 24upx;
  1381. color: #FFFFFF;
  1382. font-weight: bold;
  1383. width: 60upx;
  1384. }
  1385. .carInfo .other .content {
  1386. width: 460upx;
  1387. margin-left: 15upx;
  1388. overflow: hidden;
  1389. text-overflow: ellipsis;
  1390. white-space: nowrap;
  1391. }
  1392. .carInfo .other .icon {
  1393. width: 30upx;
  1394. }
  1395. /* 头部车辆信息和特权End */
  1396. /* 人员信息Start */
  1397. .personInfo,
  1398. .advancePayment,
  1399. .imageInfo,
  1400. .appoint {
  1401. margin-bottom: 20upx;
  1402. background: #FFFFFF;
  1403. padding: 0upx 30upx;
  1404. }
  1405. .personInfo .title,
  1406. .advancePayment .title,
  1407. .imageInfo .title,
  1408. .appoint .title {
  1409. height: 80upx;
  1410. font-size: 32upx;
  1411. box-shadow: inset 0 -3upx 0px #fafafa;
  1412. }
  1413. .showStatus {
  1414. font-size: 26upx;
  1415. color: $themeColor;
  1416. }
  1417. .personInfo .content .row,
  1418. .advancePayment .content .row {
  1419. height: 80upx;
  1420. border-bottom: 1px solid #F9F9F9;
  1421. }
  1422. .personInfo .content .row .left,
  1423. .advancePayment .content .row .left {
  1424. width: 170upx;
  1425. flex-shrink: 0;
  1426. font-size: 28upx;
  1427. }
  1428. .appoint .content .row {
  1429. height: auto;
  1430. margin-top: 10upx;
  1431. }
  1432. .appoint .content .row>view {
  1433. width: 240upx;
  1434. flex-shrink: 1;
  1435. font-size: 28upx;
  1436. }
  1437. .appoint .content .row>textarea {
  1438. padding: 15upx;
  1439. box-sizing: border-box;
  1440. font-size: 26upx;
  1441. min-height: 160upx;
  1442. height: 100upx;
  1443. border: 1px solid #fafafa;
  1444. }
  1445. .personInfo .content .row .right,
  1446. .advancePayment .content .row .right,
  1447. .appoint .content .row .right {
  1448. font-size: 28upx;
  1449. }
  1450. /* 人员信息End */
  1451. .uni-uploader__file {
  1452. position: relative;
  1453. }
  1454. .delImgIcon {
  1455. width: 40upx;
  1456. height: 40upx;
  1457. background-color: #999;
  1458. position: absolute;
  1459. right: 0upx;
  1460. top: 0upx;
  1461. color: #FFFFFF;
  1462. }
  1463. /* 底部按钮Start */
  1464. .bottomBtn {
  1465. z-index: 99;
  1466. position: fixed;
  1467. bottom: 0;
  1468. left: 0;
  1469. right: 0;
  1470. border-top: 1px solid #F1F1F1;
  1471. background-color: #FFFFFF;
  1472. height: 150upx;
  1473. }
  1474. .bottomBtn .agree {
  1475. height: 60upx;
  1476. font-size: 24upx;
  1477. }
  1478. .bottomBtn .agree .tip {
  1479. color: $themeColor;
  1480. margin: 0upx 10upx;
  1481. }
  1482. .bottomBtn .btnView {
  1483. height: 100upx;
  1484. border-top: 1px solid #F1F1F1;
  1485. }
  1486. .bottomBtn .listener {
  1487. width: 120upx;
  1488. font-size: 20upx;
  1489. line-height: 1;
  1490. color: #999;
  1491. }
  1492. .bottomBtn .listener .icon {
  1493. font-size: 40upx;
  1494. padding: 0;
  1495. line-height: 1.2;
  1496. }
  1497. .bottomBtn .btn {
  1498. font-size: 34upx;
  1499. background-color: $themeColor;
  1500. color: #fff;
  1501. width: 280upx;
  1502. flex-shrink: 0;
  1503. }
  1504. /* 底部按钮End */
  1505. </style>