quoteHistory.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. <template>
  2. <view @click.native="init" class="page">
  3. <view class="car-header dis a-c">
  4. <image src="/static/image/car-insure/Group.png" mode="" style="width: 40px;height: 40px;"></image>
  5. <view class="dis f-c head-name">
  6. <text>{{licenseno}}</text>
  7. <view class="name1">
  8. <text style="margin-right: 10px;">{{insuredname}}</text>
  9. <text>{{modelcname}}</text>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="pdd mt-3">
  14. <view class="sub-orders " v-for="(item,index) in sublist" :key="index">
  15. <view class="status dis a-c j-s">
  16. <view v-for="(statusitem, statusindex) in statusList" :key="statusindex" class="dis a-c"
  17. style="font-weight: bold;" v-if="item.orderstatus == statusitem.value">
  18. <image :src="statusitem.src" mode="" style="width: 22px;height: 22px;margin-right: 5px;">
  19. </image>
  20. <text :style="{color: statusitem.color}">{{statusitem.label}}</text>
  21. </view>
  22. <text>¥{{item.sumpremium}}</text>
  23. </view>
  24. <view class="orders-centre">
  25. <text>{{item.inscompany}}</text>
  26. <view class="sum dis f-wrap">
  27. <view v-if="item.jqpremium">交强险:¥{{item.jqpremium}}</view>
  28. <view v-if="item.sypremium">商业险:¥{{item.sypremium}}</view>
  29. <view>车船税:¥{{item.taxamount}}</view>
  30. <view v-if="item.jypremium">驾意险:¥{{item.jypremium}}</view>
  31. </view>
  32. <view v-if="item.auditopinion" class="dis f-c" style="font-size: 12px;">
  33. <text>审核意见</text>
  34. <text>{{item.auditopinion}}</text>
  35. </view>
  36. </view>
  37. <view class="orders-below dis j-end">
  38. <text class="arrivalNavigations" :data-id="item.id" @tap.stop.prevent="Moremethods">更多
  39. <view class="arrivalNavigation" v-if="item.checked">
  40. <view class="d4"></view>
  41. <view class="sideNavigation">
  42. <view class="sideNavigation-btn">
  43. <view @click="bjdpreview(item.id)">报价单</view>
  44. <view v-if="item.orderstatus==2 && ['紫金财险'].includes(item.inscompany)"
  45. @click="cancelorder(item.id)">撤单</view>
  46. <view v-if="item.orderstatus==2" @click="revokeCode(item.id)">撤销二维码</view>
  47. <!-- <view @click="orderTrajectory(item.id)">订单轨迹</view> -->
  48. </view>
  49. </view>
  50. </view>
  51. </text>
  52. <u-button
  53. v-if="item.orderstatus==2 && ['恒邦财险','安盛天平','中国人寿','众安财险','太平财险','紫金财险','永诚财险','国任财险','大家财险','华泰财险','中煤财险','华农财险','渤海财险'].includes(item.inscompany)"
  54. size="mini" type="error" :plain="true" style="margin-right:10px;"
  55. @click="queryStatus(item.id,item)" :custom-style="{fontSize:'14px'}">查询缴费状态</u-button>
  56. <u-button v-if="item.orderstatus==2" size="mini" type="error" style="margin-right:10px;"
  57. :custom-style="{fontSize:'14px'}" :plain="true"
  58. @click="Payment(item.id,item.apiType)">二维码</u-button>
  59. <u-button v-if="(item.orderstatus==4 || item.orderstatus==1) && item.inscompany=='华泰财险'" size="mini"
  60. :custom-style="{fontSize:'14px'}" type="error" :plain="true" @click="huataiunderwriting(item)"
  61. style="margin-right:10px;">更新订单</u-button>
  62. <u-button
  63. v-if="item.orderstatus==1 && ['中煤财险','永诚财险','国任财险','大家财险','渤海财险','恒邦财险','安盛天平','中国人寿','众安财险','太平财险','华农财险'].includes(item.inscompany)"
  64. style="margin-right:10px;" size="mini" type="error" :plain="true"
  65. :custom-style="{fontSize:'14px'}" @click="underwriting(item.id,item.inscompany)">更新订单</u-button>
  66. <u-button :custom-style="{fontSize:'14px'}" size="mini" type="primary" :plain="true"
  67. @click="detial(item.id)">查看详情</u-button>
  68. </view>
  69. </view>
  70. </view>
  71. <o-empty v-if="sublist.length==0" />
  72. <!-- <u-popup v-model="trajectoryShow" mode="center" border-radius="8" width="80%">
  73. <u-steps mode="number" :list="numList" :current="2" direction="column" style="padding: 20px;"></u-steps>
  74. </u-popup> -->
  75. </view>
  76. </template>
  77. <script>
  78. import store from '@/store';
  79. import {
  80. mapState,
  81. mapMutations
  82. } from "vuex"
  83. export default {
  84. data() {
  85. return {
  86. show: true,
  87. modeClass: 'fade',
  88. // trajectoryShow: false,
  89. // trajectoryList: [],
  90. MoreShow: false,
  91. moreindex: "",
  92. companyId: "",
  93. modelcname: "",
  94. orderno: "",
  95. insuredname: "",
  96. licenseno: "",
  97. sublist: [],
  98. numList: [{
  99. name: '报价中'
  100. }, {
  101. name: '待核保'
  102. },
  103. {
  104. name: '核保退回'
  105. }, {
  106. name: '已核保待缴费'
  107. }, {
  108. name: '已承保'
  109. },
  110. ],
  111. statusList: [{
  112. label: '报价中',
  113. value: 0,
  114. color: "#229805",
  115. src: "/static/image/car-insure/state1.png"
  116. },
  117. {
  118. label: '待核保',
  119. value: 1,
  120. color: "#FF5600",
  121. src: "/static/image/car-insure/state2.png"
  122. },
  123. {
  124. label: '已核保待缴费',
  125. value: 2,
  126. color: "#FF0F00",
  127. src: "/static/image/car-insure/state3.png"
  128. },
  129. {
  130. label: '已承保',
  131. value: 3,
  132. color: "#0052FF",
  133. src: "/static/image/car-insure/state4.png"
  134. },
  135. {
  136. label: '核保退回',
  137. value: 4,
  138. color: "#727272",
  139. src: "/static/image/car-insure/state5.png"
  140. }
  141. ],
  142. }
  143. },
  144. computed: {
  145. ...mapState(['userInfo', 'quotationType']),
  146. },
  147. onLoad(params) {
  148. let item = JSON.parse(params.orderno);
  149. this.orderno = item.orderno;
  150. this.modelcname = item.modelcname;
  151. this.insuredname = item.insuredname;
  152. this.licenseno = item.licenseno;
  153. this.querylist();
  154. },
  155. methods: {
  156. handle(type) {
  157. this.show = !this.show
  158. this.modeClass = type
  159. },
  160. async querylist() {
  161. let params = {
  162. orderNo: this.orderno,
  163. orderStatus: ""
  164. }
  165. let res = await this.$http.post('/insurance/order/queryQuoteHistory', params)
  166. this.sublist = res.data;
  167. this.sublist.map(val => {
  168. val.checked = false;
  169. return val;
  170. })
  171. },
  172. //更多操作
  173. Moremethods(e) {
  174. let id = e.currentTarget.dataset.id;
  175. let list = this.sublist;
  176. this.sublist = list.map(val => {
  177. if (val.id == id) {
  178. val.checked = !val.checked;
  179. console.log(val);
  180. } else {
  181. val.checked = false;
  182. }
  183. return val;
  184. })
  185. },
  186. // //订单轨迹
  187. // async orderTrajectory(id) {
  188. // let res = await this.$http.get('/insurance/track/queryBySuborder?suborder=' + id);
  189. // if (res.code == '200') {
  190. // this.trajectoryList = res.data;
  191. // this.trajectoryShow = true;
  192. // }
  193. // },
  194. //查看详情
  195. detial(id) {
  196. uni.navigateTo({
  197. url: "/pages/carInsure2/quoteDetail?companyId=" + id
  198. })
  199. },
  200. //付款码
  201. Payment(id, type) {
  202. let pro = this.quotationType.themeCode;
  203. if (pro == "QD") {
  204. uni.navigateTo({
  205. url: "/pages/orders1/paymentCode?companyId=" + id + '&apiType=' + type,
  206. })
  207. } else {
  208. uni.navigateTo({
  209. url: "/pages/orders1/paymentCode1?companyId=" + id + '&apiType=' + type,
  210. })
  211. }
  212. },
  213. //报价单
  214. bjdpreview(id, type) {
  215. let pro = this.quotationType.themeCode;
  216. if (pro == "QD") {
  217. uni.navigateTo({
  218. url: "/pages/orders1/quotation?companyId=" + id
  219. })
  220. } else {
  221. uni.navigateTo({
  222. url: "/pages/orders1/quotation1?companyId=" + id
  223. })
  224. }
  225. },
  226. //撤销二维码
  227. async revokeCode(id) {
  228. let res = await this.$http.post('/order/qrCode/destructionQrCode?areaCompanyId=' + id)
  229. if (res.code == '200') {
  230. uni.showToast({
  231. title: res.msg,
  232. icon: 'success',
  233. duration: 1000
  234. });
  235. this.querylist();
  236. } else {
  237. uni.showToast({
  238. title: res.msg,
  239. icon: 'none',
  240. duration: 1000
  241. });
  242. }
  243. },
  244. async huataiunderwriting(item) {
  245. let api = item.apiType == '2' ? '/insurance/crawler/auditStatusQuery' :
  246. '/order/huaTaiApi/auditStatusQuery';
  247. let params = {
  248. companyId: item.id,
  249. }
  250. let res = await this.$http.post(`${api}`, params)
  251. if (res.code == '200') {
  252. uni.showToast({
  253. title: res.msg,
  254. icon: 'success',
  255. duration: 1000
  256. });
  257. this.querylist();
  258. } else {
  259. uni.showToast({
  260. title: res.msg,
  261. icon: 'none',
  262. duration: 1000
  263. });
  264. }
  265. },
  266. //核保状态查询
  267. async underwriting(id, inscompany) {
  268. switch (inscompany) {
  269. case "中煤财险":
  270. let zmres = await this.$http.post('/order/zhongMeiApi/auditStatusQuery', {
  271. companyId: id
  272. })
  273. if (zmres.code == '200') {
  274. uni.showToast({
  275. title: zmres.msg,
  276. icon: 'none',
  277. duration: 1000
  278. });
  279. this.querylist();
  280. } else {
  281. uni.showToast({
  282. title: zmres.msg,
  283. icon: 'error',
  284. });
  285. }
  286. break;
  287. case "永诚财险":
  288. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  289. if (ycres.code == '200') {
  290. uni.showToast({
  291. title: ycres.msg,
  292. icon: 'none',
  293. duration: 2000
  294. });
  295. this.querylist();
  296. } else {
  297. uni.showToast({
  298. title: ycres.msg,
  299. icon: 'error',
  300. });
  301. }
  302. break;
  303. case "国任财险":
  304. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  305. companyId: id
  306. });
  307. if (grres.code == '200') {
  308. uni.showToast({
  309. title: grres.msg,
  310. icon: 'none',
  311. duration: 2000
  312. });
  313. this.querylist();
  314. } else {
  315. uni.showToast({
  316. title: grres.msg,
  317. icon: 'error',
  318. });
  319. }
  320. break;
  321. case "大家财险":
  322. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  323. companyId: id
  324. });
  325. if (djres.code == '200') {
  326. uni.showToast({
  327. title: djres.msg,
  328. icon: 'none',
  329. duration: 2000
  330. });
  331. this.querylist();
  332. } else {
  333. uni.showToast({
  334. title: djres.msg,
  335. icon: 'error',
  336. });
  337. }
  338. break;
  339. case "渤海财险":
  340. let bhres = await this.$http.post('/order/boHaiApi/auditStatusQuery', {
  341. companyId: id
  342. });
  343. if (bhres.code == '200') {
  344. uni.showToast({
  345. title: bhres.msg,
  346. icon: 'none',
  347. duration: 2000
  348. });
  349. this.querylist();
  350. } else {
  351. uni.showToast({
  352. title: bhres.msg,
  353. icon: 'error',
  354. });
  355. }
  356. break;
  357. default:
  358. let pythonres = await this.$http.post('/insurance/crawler/auditStatusQuery', {
  359. subOrderNo: id
  360. });
  361. if (pythonres.code == '200') {
  362. uni.showToast({
  363. title: pythonres.msg,
  364. icon: 'none',
  365. duration: 2000
  366. });
  367. this.querylist();
  368. } else {
  369. uni.showToast({
  370. title: pythonres.msg,
  371. icon: 'none',
  372. });
  373. }
  374. break;
  375. }
  376. },
  377. //撤单
  378. async cancelorder(item) {
  379. let res = await this.$http.post('/order/zijin/cancel', {
  380. companyId: item
  381. })
  382. if (res.code == '200') {
  383. uni.showToast({
  384. title: res.msg,
  385. icon: 'none',
  386. duration: 1000
  387. });
  388. this.querylist();
  389. } else {
  390. uni.showToast({
  391. title: res.msg,
  392. icon: 'error',
  393. });
  394. }
  395. },
  396. async queryStatus(id, item) {
  397. switch (item.inscompany) {
  398. case "紫金财险":
  399. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  400. companyId: id
  401. });
  402. if (zjres.code == '200') {
  403. uni.showToast({
  404. title: zjres.msg,
  405. icon: 'none',
  406. duration: 2000
  407. });
  408. this.querylist();
  409. } else {
  410. uni.showToast({
  411. title: zjres.msg,
  412. icon: 'error',
  413. });
  414. }
  415. break;
  416. case "大家财险":
  417. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  418. companyId: id
  419. });
  420. if (djres.code == '200') {
  421. uni.showToast({
  422. title: djres.msg,
  423. icon: 'none',
  424. duration: 2000
  425. });
  426. this.querylist();
  427. } else {
  428. uni.showToast({
  429. title: djres.msg,
  430. icon: 'error',
  431. });
  432. }
  433. break;
  434. case "华泰财险":
  435. let api = item.apiType == '2' ? '/insurance/crawler/verifyPayment' :
  436. '/order/huaTaiApi/paymentEnquiry';
  437. let htres = await this.$http.post(`${api}`, {
  438. [item.apiType == 2 ? "subOrderNo" : "companyId"]: id
  439. });
  440. if (htres.code == '200') {
  441. uni.showToast({
  442. title: htres.msg,
  443. icon: 'none',
  444. duration: 2000
  445. });
  446. this.querylist();
  447. } else {
  448. uni.showToast({
  449. title: htres.msg,
  450. icon: 'error',
  451. });
  452. }
  453. break;
  454. case "永诚财险":
  455. let ycres = await this.$http.get(
  456. '/api/yongCheng/orderStatusBySuborderId/' + id);
  457. if (ycres.code == '200') {
  458. uni.showToast({
  459. title: ycres.msg,
  460. icon: 'none',
  461. duration: 2000
  462. });
  463. this.querylist();
  464. } else {
  465. uni.showToast({
  466. title: ycres.msg,
  467. icon: 'error',
  468. });
  469. }
  470. break;
  471. case "国任财险":
  472. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  473. companyId: id
  474. });
  475. if (grres.code == '200') {
  476. uni.showToast({
  477. title: grres.msg,
  478. icon: 'none',
  479. duration: 2000
  480. });
  481. this.querylist();
  482. } else {
  483. uni.showToast({
  484. title: grres.msg,
  485. icon: 'error',
  486. });
  487. }
  488. break;
  489. case "中煤财险":
  490. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  491. companyId: id
  492. });
  493. if (zmres.code == '200') {
  494. uni.showToast({
  495. title: zmres.msg,
  496. icon: 'none',
  497. duration: 2000
  498. });
  499. this.querylist();
  500. } else {
  501. uni.showToast({
  502. title: zmres.msg,
  503. icon: 'error',
  504. });
  505. }
  506. break;
  507. case "渤海财险":
  508. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  509. companyId: id
  510. });
  511. if (bhres.code == '200') {
  512. uni.showToast({
  513. title: bhres.msg,
  514. icon: 'none',
  515. duration: 2000
  516. });
  517. this.querylist();
  518. } else {
  519. uni.showToast({
  520. title: bhres.msg,
  521. icon: 'error',
  522. });
  523. }
  524. break;
  525. default:
  526. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  527. subOrderNo: id
  528. });
  529. if (pythonres.code == '200') {
  530. uni.showToast({
  531. title: pythonres.msg,
  532. icon: 'none',
  533. duration: 2000
  534. });
  535. this.querylist();
  536. } else {
  537. uni.showToast({
  538. title: pythonres.msg,
  539. icon: 'error',
  540. });
  541. }
  542. break;
  543. }
  544. },
  545. init() {
  546. this.sublist = this.sublist.map(val => {
  547. val.checked = false;
  548. return val;
  549. })
  550. }
  551. }
  552. }
  553. </script>
  554. <style>
  555. page {
  556. background: #f2f2f2;
  557. }
  558. </style>
  559. <style lang="scss" scoped>
  560. .page {
  561. min-height: calc(100vh - 44px);
  562. background-color: #F8FAFE;
  563. padding: 16px 16px 30px 16px;
  564. }
  565. .car-header {
  566. width: 100%;
  567. height: auto;
  568. background: #FFFFFF;
  569. box-shadow: 0px 4px 10px 0px #DAE3F4;
  570. border-radius: 6px;
  571. padding: 8px 15px;
  572. .head-name {
  573. margin-left: 20px;
  574. &>text {
  575. font-weight: bold;
  576. font-size: 15px;
  577. color: #232832;
  578. }
  579. .name1 text {
  580. font-size: 14px;
  581. font-weight: bold;
  582. color: #333333;
  583. }
  584. }
  585. }
  586. .sub-orders {
  587. width: 100%;
  588. background: white;
  589. border-radius: 6px;
  590. padding: 10px;
  591. box-shadow: 0px 4px 10px 0px #DAE3F4;
  592. border-radius: 6px;
  593. margin-bottom: 10px;
  594. .status {
  595. padding-bottom: 8px;
  596. border-bottom: 1px solid #EFEFEF;
  597. >text {
  598. color: #FF5600;
  599. font-size: 16px;
  600. font-weight: bold;
  601. }
  602. }
  603. .orders-centre {
  604. padding: 6px 0;
  605. border-bottom: 1px solid #EFEFEF;
  606. >text {
  607. font-size: 15px;
  608. font-weight: bold;
  609. color: #232832;
  610. }
  611. .sum {
  612. view {
  613. width: 50%;
  614. color: #2D4D89;
  615. font-size: 13px;
  616. }
  617. }
  618. }
  619. .orders-below {
  620. padding-top: 10px;
  621. }
  622. }
  623. .strong {
  624. font-weight: bold;
  625. }
  626. .arrivalNavigations {
  627. font-size: 14px;
  628. color: rgba(51, 51, 51, 0.8);
  629. margin-right: auto;
  630. position: relative;
  631. }
  632. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  633. .arrivalNavigation {
  634. width: 250rpx;
  635. position: absolute;
  636. left: -10px;
  637. top: 30px;
  638. z-index: 99;
  639. .sideNavigation {
  640. width: 80px;
  641. background-color: #fff;
  642. box-shadow: 0px 4px 10px 0px #DAE3F4;
  643. border-radius: 10rpx;
  644. .sideNavigation-btn>view {
  645. text-align: center;
  646. font-size: 14px;
  647. color: #333333;
  648. text-align: center;
  649. padding: 6px 0;
  650. border-bottom: 1px solid #EFEFEF;
  651. &:last-child {
  652. border: none;
  653. }
  654. }
  655. }
  656. .d4 {
  657. width: 0;
  658. height: 0;
  659. margin-left: 22px;
  660. margin-top: -20rpx;
  661. border-width: 20rpx;
  662. border-style: solid;
  663. border-color: transparent #fff transparent transparent;
  664. transform: rotate(90deg);
  665. /*顺时针旋转90°*/
  666. }
  667. }
  668. </style>