quoteHistory.vue 17 KB

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