quoteHistory.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  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.inscompany)"
  56. :custom-style="{fontSize:'14px'}">查询缴费状态</u-button>
  57. <u-button v-if="item.orderstatus==2" size="mini" type="error" style="margin-right:10px;"
  58. :custom-style="{fontSize:'14px'}" :plain="true" @click="Payment(item.id)">二维码</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"
  61. @click="huataiunderwriting(item.id)" 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) {
  202. let pro = this.quotationType.themeCode;
  203. if (pro == "QD") {
  204. uni.navigateTo({
  205. url: "/pages/orders1/paymentCode?companyId=" + id
  206. })
  207. } else {
  208. uni.navigateTo({
  209. url: "/pages/orders1/paymentCode1?companyId=" + id
  210. })
  211. }
  212. },
  213. //报价单
  214. bjdpreview(id) {
  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(id) {
  245. let params = {
  246. companyId: id,
  247. }
  248. let res = await this.$http.post('/order/huaTaiApi/auditStatusQuery', params)
  249. if (res.code == '200') {
  250. uni.showToast({
  251. title: res.msg,
  252. icon: 'success',
  253. duration: 1000
  254. });
  255. this.querylist();
  256. } else {
  257. uni.showToast({
  258. title: res.msg,
  259. icon: 'none',
  260. duration: 1000
  261. });
  262. }
  263. },
  264. //核保状态查询
  265. async underwriting(id, inscompany) {
  266. switch (inscompany) {
  267. case "中煤财险":
  268. let zmres = await this.$http.post('/order/zhongMeiApi/auditStatusQuery', {
  269. companyId: id
  270. })
  271. if (zmres.code == '200') {
  272. uni.showToast({
  273. title: zmres.msg,
  274. icon: 'none',
  275. duration: 1000
  276. });
  277. this.querylist();
  278. } else {
  279. uni.showToast({
  280. title: zmres.msg,
  281. icon: 'error',
  282. });
  283. }
  284. break;
  285. case "永诚财险":
  286. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  287. if (ycres.code == '200') {
  288. uni.showToast({
  289. title: ycres.msg,
  290. icon: 'none',
  291. duration: 2000
  292. });
  293. this.querylist();
  294. } else {
  295. uni.showToast({
  296. title: ycres.msg,
  297. icon: 'error',
  298. });
  299. }
  300. break;
  301. case "国任财险":
  302. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  303. companyId: id
  304. });
  305. if (grres.code == '200') {
  306. uni.showToast({
  307. title: grres.msg,
  308. icon: 'none',
  309. duration: 2000
  310. });
  311. this.querylist();
  312. } else {
  313. uni.showToast({
  314. title: grres.msg,
  315. icon: 'error',
  316. });
  317. }
  318. break;
  319. case "大家财险":
  320. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  321. companyId: id
  322. });
  323. if (djres.code == '200') {
  324. uni.showToast({
  325. title: djres.msg,
  326. icon: 'none',
  327. duration: 2000
  328. });
  329. this.querylist();
  330. } else {
  331. uni.showToast({
  332. title: djres.msg,
  333. icon: 'error',
  334. });
  335. }
  336. break;
  337. case "渤海财险":
  338. let bhres = await this.$http.post('/order/boHaiApi/auditStatusQuery', {
  339. companyId: id
  340. });
  341. if (bhres.code == '200') {
  342. uni.showToast({
  343. title: bhres.msg,
  344. icon: 'none',
  345. duration: 2000
  346. });
  347. this.querylist();
  348. } else {
  349. uni.showToast({
  350. title: bhres.msg,
  351. icon: 'error',
  352. });
  353. }
  354. break;
  355. default:
  356. let pythonres = await this.$http.post('/insurance/crawler/auditStatusQuery', {
  357. subOrderNo: id
  358. });
  359. if (pythonres.code == '200') {
  360. uni.showToast({
  361. title: pythonres.msg,
  362. icon: 'none',
  363. duration: 2000
  364. });
  365. this.querylist();
  366. } else {
  367. uni.showToast({
  368. title: pythonres.msg,
  369. icon: 'none',
  370. });
  371. }
  372. break;
  373. }
  374. },
  375. //撤单
  376. async cancelorder(item) {
  377. let res = await this.$http.post('/order/zijin/cancel', {
  378. companyId: item
  379. })
  380. if (res.code == '200') {
  381. uni.showToast({
  382. title: res.msg,
  383. icon: 'none',
  384. duration: 1000
  385. });
  386. this.querylist();
  387. } else {
  388. uni.showToast({
  389. title: res.msg,
  390. icon: 'error',
  391. });
  392. }
  393. },
  394. async queryStatus(id, inscompany) {
  395. switch (inscompany) {
  396. case "紫金财险":
  397. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  398. companyId: id
  399. });
  400. if (zjres.code == '200') {
  401. uni.showToast({
  402. title: zjres.msg,
  403. icon: 'none',
  404. duration: 2000
  405. });
  406. this.querylist();
  407. } else {
  408. uni.showToast({
  409. title: zjres.msg,
  410. icon: 'error',
  411. });
  412. }
  413. break;
  414. case "大家财险":
  415. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  416. companyId: id
  417. });
  418. if (djres.code == '200') {
  419. uni.showToast({
  420. title: djres.msg,
  421. icon: 'none',
  422. duration: 2000
  423. });
  424. this.querylist();
  425. } else {
  426. uni.showToast({
  427. title: djres.msg,
  428. icon: 'error',
  429. });
  430. }
  431. break;
  432. case "华泰财险":
  433. let htres = await this.$http.post('/order/huaTaiApi/paymentEnquiry', {
  434. companyId: id
  435. });
  436. if (htres.code == '200') {
  437. uni.showToast({
  438. title: htres.msg,
  439. icon: 'none',
  440. duration: 2000
  441. });
  442. this.querylist();
  443. } else {
  444. uni.showToast({
  445. title: htres.msg,
  446. icon: 'error',
  447. });
  448. }
  449. break;
  450. case "永诚财险":
  451. let ycres = await this.$http.get(
  452. '/api/yongCheng/orderStatusBySuborderId/' + id);
  453. if (ycres.code == '200') {
  454. uni.showToast({
  455. title: ycres.msg,
  456. icon: 'none',
  457. duration: 2000
  458. });
  459. this.querylist();
  460. } else {
  461. uni.showToast({
  462. title: ycres.msg,
  463. icon: 'error',
  464. });
  465. }
  466. break;
  467. case "国任财险":
  468. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  469. companyId: id
  470. });
  471. if (grres.code == '200') {
  472. uni.showToast({
  473. title: grres.msg,
  474. icon: 'none',
  475. duration: 2000
  476. });
  477. this.querylist();
  478. } else {
  479. uni.showToast({
  480. title: grres.msg,
  481. icon: 'error',
  482. });
  483. }
  484. break;
  485. case "中煤财险":
  486. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  487. companyId: id
  488. });
  489. if (zmres.code == '200') {
  490. uni.showToast({
  491. title: zmres.msg,
  492. icon: 'none',
  493. duration: 2000
  494. });
  495. this.querylist();
  496. } else {
  497. uni.showToast({
  498. title: zmres.msg,
  499. icon: 'error',
  500. });
  501. }
  502. break;
  503. case "渤海财险":
  504. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  505. companyId: id
  506. });
  507. if (bhres.code == '200') {
  508. uni.showToast({
  509. title: bhres.msg,
  510. icon: 'none',
  511. duration: 2000
  512. });
  513. this.querylist();
  514. } else {
  515. uni.showToast({
  516. title: bhres.msg,
  517. icon: 'error',
  518. });
  519. }
  520. break;
  521. default:
  522. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  523. subOrderNo: id
  524. });
  525. if (pythonres.code == '200') {
  526. uni.showToast({
  527. title: pythonres.msg,
  528. icon: 'none',
  529. duration: 2000
  530. });
  531. this.querylist();
  532. } else {
  533. uni.showToast({
  534. title: pythonres.msg,
  535. icon: 'error',
  536. });
  537. }
  538. break;
  539. }
  540. },
  541. init() {
  542. this.sublist = this.sublist.map(val => {
  543. val.checked = false;
  544. return val;
  545. })
  546. }
  547. }
  548. }
  549. </script>
  550. <style>
  551. page {
  552. background: #f2f2f2;
  553. }
  554. </style>
  555. <style lang="scss" scoped>
  556. .page {
  557. min-height: calc(100vh - 44px);
  558. background-color: #F8FAFE;
  559. padding: 16px 16px 30px 16px;
  560. }
  561. .car-header {
  562. width: 100%;
  563. height: auto;
  564. background: #FFFFFF;
  565. box-shadow: 0px 4px 10px 0px #DAE3F4;
  566. border-radius: 6px;
  567. padding: 8px 15px;
  568. .head-name {
  569. margin-left: 20px;
  570. &>text {
  571. font-weight: bold;
  572. font-size: 15px;
  573. color: #232832;
  574. }
  575. .name1 text {
  576. font-size: 14px;
  577. font-weight: bold;
  578. color: #333333;
  579. }
  580. }
  581. }
  582. .sub-orders {
  583. width: 100%;
  584. background: white;
  585. border-radius: 6px;
  586. padding: 10px;
  587. box-shadow: 0px 4px 10px 0px #DAE3F4;
  588. border-radius: 6px;
  589. margin-bottom: 10px;
  590. .status {
  591. padding-bottom: 8px;
  592. border-bottom: 1px solid #EFEFEF;
  593. >text {
  594. color: #FF5600;
  595. font-size: 16px;
  596. font-weight: bold;
  597. }
  598. }
  599. .orders-centre {
  600. padding: 6px 0;
  601. border-bottom: 1px solid #EFEFEF;
  602. >text {
  603. font-size: 15px;
  604. font-weight: bold;
  605. color: #232832;
  606. }
  607. .sum {
  608. view {
  609. width: 50%;
  610. color: #2D4D89;
  611. font-size: 13px;
  612. }
  613. }
  614. }
  615. .orders-below {
  616. padding-top: 10px;
  617. }
  618. }
  619. .strong {
  620. font-weight: bold;
  621. }
  622. .arrivalNavigations {
  623. font-size: 14px;
  624. color: rgba(51, 51, 51, 0.8);
  625. margin-right: auto;
  626. position: relative;
  627. }
  628. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  629. .arrivalNavigation {
  630. width: 250rpx;
  631. position: absolute;
  632. left: -10px;
  633. top: 30px;
  634. z-index: 99;
  635. .sideNavigation {
  636. width: 80px;
  637. background-color: #fff;
  638. box-shadow: 0px 4px 10px 0px #DAE3F4;
  639. border-radius: 10rpx;
  640. .sideNavigation-btn>view {
  641. text-align: center;
  642. font-size: 14px;
  643. color: #333333;
  644. text-align: center;
  645. padding: 6px 0;
  646. border-bottom: 1px solid #EFEFEF;
  647. &:last-child {
  648. border: none;
  649. }
  650. }
  651. }
  652. .d4 {
  653. width: 0;
  654. height: 0;
  655. margin-left: 22px;
  656. margin-top: -20rpx;
  657. border-width: 20rpx;
  658. border-style: solid;
  659. border-color: transparent #fff transparent transparent;
  660. transform: rotate(90deg);
  661. /*顺时针旋转90°*/
  662. }
  663. }
  664. </style>