quoteHistory.vue 18 KB

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