quoteHistory.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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']),
  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.userInfo.sysUser.managementSource;
  203. if (pro == '3') {
  204. uni.navigateTo({
  205. url: "/pages/carInsure1/payCode2?companyId=" + id
  206. })
  207. } else {
  208. uni.navigateTo({
  209. url: "/pages/orders1/paymentCode?companyId=" + id
  210. })
  211. }
  212. },
  213. //报价单
  214. bjdpreview(id) {
  215. let pro = this.userInfo.sysUser.managementSource;
  216. if (pro == '3') {
  217. uni.navigateTo({
  218. url: "/pages/orders/quotation1?companyId=" + id
  219. })
  220. } else {
  221. uni.navigateTo({
  222. url: "/pages/orders1/quotation?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. break;
  357. }
  358. },
  359. //撤单
  360. async cancelorder(item) {
  361. let res = await this.$http.post('/order/zijin/cancel', {
  362. companyId: item
  363. })
  364. if (res.code == '200') {
  365. uni.showToast({
  366. title: res.msg,
  367. icon: 'none',
  368. duration: 1000
  369. });
  370. this.querylist();
  371. } else {
  372. uni.showToast({
  373. title: res.msg,
  374. icon: 'error',
  375. });
  376. }
  377. },
  378. async queryStatus(id, inscompany) {
  379. switch (inscompany) {
  380. case "紫金财险":
  381. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  382. companyId: id
  383. });
  384. if (zjres.code == '200') {
  385. uni.showToast({
  386. title: zjres.msg,
  387. icon: 'none',
  388. duration: 2000
  389. });
  390. this.querylist();
  391. } else {
  392. uni.showToast({
  393. title: zjres.msg,
  394. icon: 'error',
  395. });
  396. }
  397. break;
  398. case "大家财险":
  399. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  400. companyId: id
  401. });
  402. if (djres.code == '200') {
  403. uni.showToast({
  404. title: djres.msg,
  405. icon: 'none',
  406. duration: 2000
  407. });
  408. this.querylist();
  409. } else {
  410. uni.showToast({
  411. title: djres.msg,
  412. icon: 'error',
  413. });
  414. }
  415. break;
  416. case "华泰财险":
  417. let htres = await this.$http.post('/order/huaTaiApi/paymentEnquiry', {
  418. companyId: id
  419. });
  420. if (htres.code == '200') {
  421. uni.showToast({
  422. title: htres.msg,
  423. icon: 'none',
  424. duration: 2000
  425. });
  426. this.querylist();
  427. } else {
  428. uni.showToast({
  429. title: htres.msg,
  430. icon: 'error',
  431. });
  432. }
  433. break;
  434. case "永诚财险":
  435. let ycres = await this.$http.get(
  436. '/api/yongCheng/orderStatusBySuborderId/' + id);
  437. if (ycres.code == '200') {
  438. uni.showToast({
  439. title: ycres.msg,
  440. icon: 'none',
  441. duration: 2000
  442. });
  443. this.querylist();
  444. } else {
  445. uni.showToast({
  446. title: ycres.msg,
  447. icon: 'error',
  448. });
  449. }
  450. break;
  451. case "国任财险":
  452. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  453. companyId: id
  454. });
  455. if (grres.code == '200') {
  456. uni.showToast({
  457. title: grres.msg,
  458. icon: 'none',
  459. duration: 2000
  460. });
  461. this.querylist();
  462. } else {
  463. uni.showToast({
  464. title: grres.msg,
  465. icon: 'error',
  466. });
  467. }
  468. break;
  469. case "中煤财险":
  470. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  471. companyId: id
  472. });
  473. if (zmres.code == '200') {
  474. uni.showToast({
  475. title: zmres.msg,
  476. icon: 'none',
  477. duration: 2000
  478. });
  479. this.querylist();
  480. } else {
  481. uni.showToast({
  482. title: zmres.msg,
  483. icon: 'error',
  484. });
  485. }
  486. break;
  487. case "渤海财险":
  488. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  489. companyId: id
  490. });
  491. if (bhres.code == '200') {
  492. uni.showToast({
  493. title: bhres.msg,
  494. icon: 'none',
  495. duration: 2000
  496. });
  497. this.querylist();
  498. } else {
  499. uni.showToast({
  500. title: bhres.msg,
  501. icon: 'error',
  502. });
  503. }
  504. break;
  505. default:
  506. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  507. subOrderNo: id
  508. });
  509. if (pythonres.code == '200') {
  510. uni.showToast({
  511. title: pythonres.msg,
  512. icon: 'none',
  513. duration: 2000
  514. });
  515. this.querylist();
  516. } else {
  517. uni.showToast({
  518. title: pythonres.msg,
  519. icon: 'error',
  520. });
  521. }
  522. break;
  523. }
  524. },
  525. init() {
  526. this.sublist = this.sublist.map(val => {
  527. val.checked = false;
  528. return val;
  529. })
  530. }
  531. }
  532. }
  533. </script>
  534. <style>
  535. page {
  536. background: #f2f2f2;
  537. }
  538. </style>
  539. <style lang="scss" scoped>
  540. .page {
  541. min-height: calc(100vh - 44px);
  542. background-color: #F8FAFE;
  543. padding: 16px 16px 30px 16px;
  544. }
  545. .car-header {
  546. width: 100%;
  547. height: auto;
  548. background: #FFFFFF;
  549. box-shadow: 0px 4px 10px 0px #DAE3F4;
  550. border-radius: 6px;
  551. padding: 8px 15px;
  552. .head-name {
  553. margin-left: 20px;
  554. &>text {
  555. font-weight: bold;
  556. font-size: 15px;
  557. color: #232832;
  558. }
  559. .name1 text {
  560. font-size: 14px;
  561. font-weight: bold;
  562. color: #333333;
  563. }
  564. }
  565. }
  566. .sub-orders {
  567. width: 100%;
  568. background: white;
  569. border-radius: 6px;
  570. padding: 10px;
  571. box-shadow: 0px 4px 10px 0px #DAE3F4;
  572. border-radius: 6px;
  573. margin-bottom: 10px;
  574. .status {
  575. padding-bottom: 8px;
  576. border-bottom: 1px solid #EFEFEF;
  577. >text {
  578. color: #FF5600;
  579. font-size: 16px;
  580. font-weight: bold;
  581. }
  582. }
  583. .orders-centre {
  584. padding: 6px 0;
  585. border-bottom: 1px solid #EFEFEF;
  586. >text {
  587. font-size: 15px;
  588. font-weight: bold;
  589. color: #232832;
  590. }
  591. .sum {
  592. view {
  593. width: 50%;
  594. color: #2D4D89;
  595. font-size: 13px;
  596. }
  597. }
  598. }
  599. .orders-below {
  600. padding-top: 10px;
  601. }
  602. }
  603. .strong {
  604. font-weight: bold;
  605. }
  606. .arrivalNavigations {
  607. font-size: 14px;
  608. color: rgba(51, 51, 51, 0.8);
  609. margin-right: auto;
  610. position: relative;
  611. }
  612. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  613. .arrivalNavigation {
  614. width: 250rpx;
  615. position: absolute;
  616. left: -10px;
  617. top: 30px;
  618. z-index: 99;
  619. .sideNavigation {
  620. width: 80px;
  621. background-color: #fff;
  622. box-shadow: 0px 4px 10px 0px #DAE3F4;
  623. border-radius: 10rpx;
  624. .sideNavigation-btn>view {
  625. text-align: center;
  626. font-size: 14px;
  627. color: #333333;
  628. text-align: center;
  629. padding: 6px 0;
  630. border-bottom: 1px solid #EFEFEF;
  631. &:last-child {
  632. border: none;
  633. }
  634. }
  635. }
  636. .d4 {
  637. width: 0;
  638. height: 0;
  639. margin-left: 22px;
  640. margin-top: -20rpx;
  641. border-width: 20rpx;
  642. border-style: solid;
  643. border-color: transparent #fff transparent transparent;
  644. transform: rotate(90deg);
  645. /*顺时针旋转90°*/
  646. }
  647. }
  648. </style>