subOrders.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  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. <text>( {{item.agreementName}} )</text>
  27. <view class="sum dis f-wrap">
  28. <view v-if="item.jqpremium">交强险:¥{{item.jqpremium}}</view>
  29. <view v-if="item.sypremium">商业险:¥{{item.sypremium}}</view>
  30. <view>车船税:¥{{item.taxamount}}</view>
  31. <view v-if="item.jypremium">驾意险:¥{{item.jypremium}}</view>
  32. </view>
  33. <view v-if="item.auditopinion" class="dis f-c" style="font-size: 12px;">
  34. <text>审核意见</text>
  35. <text>{{item.auditopinion}}</text>
  36. </view>
  37. </view>
  38. <view class="orders-below dis j-end a-c">
  39. <text class="arrivalNavigations" :data-id="item.id" @tap.stop.prevent="Moremethods">更多
  40. <view class="arrivalNavigation" v-if="item.checked">
  41. <view class="d4"></view>
  42. <view class="sideNavigation">
  43. <view class="sideNavigation-btn">
  44. <view @click="bjdpreview(item.id)">报价单</view>
  45. <view v-if="item.orderstatus==2 && ['紫金财险'].includes(item.inscompany)"
  46. @click="cancelorder(item.id)">撤单</view>
  47. <view v-if="item.orderstatus==2" @click="revokeCode(item.id)">撤销二维码</view>
  48. <!-- <view @click="orderTrajectory(item.id)">订单轨迹</view> -->
  49. </view>
  50. </view>
  51. </view>
  52. </text>
  53. <u-button
  54. v-if="item.orderstatus==2 && ['恒邦财险','安盛天平','中国人寿','众安财险','太平财险','紫金财险','永诚财险','国任财险','大家财险','华泰财险','中煤财险','华农财险','渤海财险'].includes(item.inscompany)"
  55. size="mini" :custom-style="{fontSize:'14px'}" type="error" :plain="true"
  56. style="margin-right:10px;" @click="queryStatus(item.id,item.inscompany)">查询缴费状态</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 size="mini" type="primary" :custom-style="{fontSize:'14px'}" :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. }
  164. let res = await this.$http.post('/insurance/order/querySuborder', params)
  165. this.sublist = res.data;
  166. this.sublist.map(val => {
  167. val.checked = false;
  168. return val;
  169. })
  170. },
  171. //更多操作
  172. Moremethods(e) {
  173. let id = e.currentTarget.dataset.id;
  174. let list = this.sublist;
  175. this.sublist = list.map(val => {
  176. if (val.id == id) {
  177. val.checked = !val.checked;
  178. } else {
  179. val.checked = false;
  180. }
  181. return val;
  182. })
  183. },
  184. //查看详情
  185. detial(id) {
  186. uni.navigateTo({
  187. url: "/pages/carInsure2/quoteDetail?companyId=" + id
  188. })
  189. },
  190. //付款码
  191. Payment(id) {
  192. let pro = this.quotationType.themeCode;
  193. if (pro == "QD") {
  194. uni.navigateTo({
  195. url: "/pages/orders1/paymentCode?companyId=" + id
  196. })
  197. } else {
  198. uni.navigateTo({
  199. url: "/pages/orders1/paymentCode1?companyId=" + id
  200. })
  201. }
  202. },
  203. //报价单
  204. bjdpreview(id) {
  205. let pro = this.quotationType.themeCode;
  206. if (pro == "QD") {
  207. uni.navigateTo({
  208. url: "/pages/orders1/quotation?companyId=" + id
  209. })
  210. } else {
  211. uni.navigateTo({
  212. url: "/pages/orders1/quotation1?companyId=" + id
  213. })
  214. }
  215. },
  216. //撤销二维码
  217. async revokeCode(id) {
  218. let res = await this.$http.post('/order/qrCode/destructionQrCode?areaCompanyId=' + id)
  219. if (res.code == '200') {
  220. uni.showToast({
  221. title: res.msg,
  222. icon: 'success',
  223. duration: 1000
  224. });
  225. this.querylist();
  226. } else {
  227. uni.showToast({
  228. title: res.msg,
  229. icon: 'none',
  230. duration: 1000
  231. });
  232. }
  233. },
  234. async huataiunderwriting(id) {
  235. let params = {
  236. companyId: id,
  237. }
  238. let res = await this.$http.post('/order/huaTaiApi/auditStatusQuery', params)
  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. //核保状态查询
  255. async underwriting(id, inscompany) {
  256. switch (inscompany) {
  257. case "中煤财险":
  258. let zmres = await this.$http.post('/order/zhongMeiApi/auditStatusQuery', {
  259. companyId: id
  260. })
  261. if (zmres.code == '200') {
  262. uni.showToast({
  263. title: zmres.msg,
  264. icon: 'none',
  265. duration: 1000
  266. });
  267. this.querylist();
  268. } else {
  269. uni.showToast({
  270. title: zmres.msg,
  271. icon: 'none',
  272. });
  273. }
  274. break;
  275. case "永诚财险":
  276. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  277. if (ycres.code == '200') {
  278. uni.showToast({
  279. title: ycres.msg,
  280. icon: 'none',
  281. duration: 2000
  282. });
  283. this.querylist();
  284. } else {
  285. uni.showToast({
  286. title: ycres.msg,
  287. icon: 'none',
  288. });
  289. }
  290. break;
  291. case "国任财险":
  292. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  293. companyId: id
  294. });
  295. if (grres.code == '200') {
  296. uni.showToast({
  297. title: grres.msg,
  298. icon: 'none',
  299. duration: 2000
  300. });
  301. this.querylist();
  302. } else {
  303. uni.showToast({
  304. title: grres.msg,
  305. icon: 'none',
  306. });
  307. }
  308. break;
  309. case "大家财险":
  310. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  311. companyId: id
  312. });
  313. if (djres.code == '200') {
  314. uni.showToast({
  315. title: djres.msg,
  316. icon: 'none',
  317. duration: 2000
  318. });
  319. this.querylist();
  320. } else {
  321. uni.showToast({
  322. title: djres.msg,
  323. icon: 'none',
  324. });
  325. }
  326. break;
  327. case "渤海财险":
  328. let bhres = await this.$http.post('/order/boHaiApi/auditStatusQuery', {
  329. companyId: id
  330. });
  331. if (bhres.code == '200') {
  332. uni.showToast({
  333. title: bhres.msg,
  334. icon: 'none',
  335. duration: 2000
  336. });
  337. this.querylist();
  338. } else {
  339. uni.showToast({
  340. title: bhres.msg,
  341. icon: 'none',
  342. });
  343. }
  344. break;
  345. default:
  346. let pythonres = await this.$http.post('/insurance/crawler/auditStatusQuery', {
  347. companyId: id
  348. });
  349. if (pythonres.code == '200') {
  350. uni.showToast({
  351. title: pythonres.msg,
  352. icon: 'none',
  353. duration: 2000
  354. });
  355. this.querylist();
  356. } else {
  357. uni.showToast({
  358. title: pythonres.msg,
  359. icon: 'none',
  360. });
  361. }
  362. break;
  363. }
  364. },
  365. //撤单
  366. async cancelorder(item) {
  367. let res = await this.$http.post('/order/zijin/cancel', {
  368. companyId: item
  369. })
  370. if (res.code == '200') {
  371. uni.showToast({
  372. title: res.msg,
  373. icon: 'none',
  374. duration: 1000
  375. });
  376. this.querylist();
  377. } else {
  378. uni.showToast({
  379. title: res.msg,
  380. icon: 'none',
  381. });
  382. }
  383. },
  384. async queryStatus(id, inscompany) {
  385. switch (inscompany) {
  386. case "紫金财险":
  387. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  388. companyId: id
  389. });
  390. if (zjres.code == '200') {
  391. uni.showToast({
  392. title: zjres.msg,
  393. icon: 'none',
  394. duration: 2000
  395. });
  396. this.querylist();
  397. } else {
  398. uni.showToast({
  399. title: zjres.msg,
  400. icon: 'none',
  401. });
  402. }
  403. break;
  404. case "大家财险":
  405. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  406. companyId: id
  407. });
  408. if (djres.code == '200') {
  409. uni.showToast({
  410. title: djres.msg,
  411. icon: 'none',
  412. duration: 2000
  413. });
  414. this.querylist();
  415. } else {
  416. uni.showToast({
  417. title: djres.msg,
  418. icon: 'none',
  419. });
  420. }
  421. break;
  422. case "华泰财险":
  423. let htres = await this.$http.post('/order/huaTaiApi/paymentEnquiry', {
  424. companyId: id
  425. });
  426. if (htres.code == '200') {
  427. uni.showToast({
  428. title: htres.msg,
  429. icon: 'none',
  430. duration: 2000
  431. });
  432. this.querylist();
  433. } else {
  434. uni.showToast({
  435. title: htres.msg,
  436. icon: 'none',
  437. });
  438. }
  439. break;
  440. case "永诚财险":
  441. let ycres = await this.$http.get(
  442. '/api/yongCheng/orderStatusBySuborderId/' + id);
  443. if (ycres.code == '200') {
  444. uni.showToast({
  445. title: ycres.msg,
  446. icon: 'none',
  447. duration: 2000
  448. });
  449. this.querylist();
  450. } else {
  451. uni.showToast({
  452. title: ycres.msg,
  453. icon: 'none',
  454. });
  455. }
  456. break;
  457. case "国任财险":
  458. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  459. companyId: id
  460. });
  461. if (grres.code == '200') {
  462. uni.showToast({
  463. title: grres.msg,
  464. icon: 'none',
  465. duration: 2000
  466. });
  467. this.querylist();
  468. } else {
  469. uni.showToast({
  470. title: grres.msg,
  471. icon: 'none',
  472. });
  473. }
  474. break;
  475. case "中煤财险":
  476. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  477. companyId: id
  478. });
  479. if (zmres.code == '200') {
  480. uni.showToast({
  481. title: zmres.msg,
  482. icon: 'none',
  483. duration: 2000
  484. });
  485. this.querylist();
  486. } else {
  487. uni.showToast({
  488. title: zmres.msg,
  489. icon: 'none',
  490. });
  491. }
  492. break;
  493. case "渤海财险":
  494. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  495. companyId: id
  496. });
  497. if (bhres.code == '200') {
  498. uni.showToast({
  499. title: bhres.msg,
  500. icon: 'none',
  501. duration: 2000
  502. });
  503. this.querylist();
  504. } else {
  505. uni.showToast({
  506. title: bhres.msg,
  507. icon: 'none',
  508. });
  509. }
  510. break;
  511. default:
  512. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  513. subOrderNo: id
  514. });
  515. if (pythonres.code == '200') {
  516. uni.showToast({
  517. title: pythonres.msg,
  518. icon: 'none',
  519. duration: 2000
  520. });
  521. this.querylist();
  522. } else {
  523. uni.showToast({
  524. title: pythonres.msg,
  525. icon: 'none',
  526. });
  527. }
  528. break;
  529. }
  530. },
  531. init() {
  532. this.sublist = this.sublist.map(val => {
  533. val.checked = false;
  534. return val;
  535. })
  536. }
  537. }
  538. }
  539. </script>
  540. <style>
  541. page {
  542. background: #f2f2f2;
  543. }
  544. </style>
  545. <style lang="scss" scoped>
  546. .page {
  547. min-height: calc(100vh - 44px);
  548. background-color: #F8FAFE;
  549. padding: 16px 16px 30px 16px;
  550. }
  551. .car-header {
  552. width: 100%;
  553. height: auto;
  554. background: #FFFFFF;
  555. box-shadow: 0px 4px 10px 0px #DAE3F4;
  556. border-radius: 6px;
  557. padding: 8px 15px;
  558. .head-name {
  559. margin-left: 20px;
  560. &>text {
  561. font-weight: bold;
  562. font-size: 15px;
  563. color: #232832;
  564. }
  565. .name1 text {
  566. font-size: 14px;
  567. font-weight: bold;
  568. color: #333333;
  569. }
  570. }
  571. }
  572. .sub-orders {
  573. width: 100%;
  574. background: white;
  575. border-radius: 6px;
  576. padding: 10px;
  577. box-shadow: 0px 4px 10px 0px #DAE3F4;
  578. border-radius: 6px;
  579. margin-bottom: 10px;
  580. .status {
  581. padding-bottom: 8px;
  582. border-bottom: 1px solid #EFEFEF;
  583. >text {
  584. color: #FF5600;
  585. font-size: 16px;
  586. font-weight: bold;
  587. }
  588. }
  589. .orders-centre {
  590. padding: 6px 0;
  591. border-bottom: 1px solid #EFEFEF;
  592. >text {
  593. font-size: 15px;
  594. font-weight: bold;
  595. color: #232832;
  596. }
  597. .sum {
  598. view {
  599. width: 50%;
  600. color: #2D4D89;
  601. font-size: 13px;
  602. }
  603. }
  604. }
  605. .orders-below {
  606. padding-top: 10px;
  607. }
  608. }
  609. .strong {
  610. font-weight: bold;
  611. }
  612. .arrivalNavigations {
  613. font-size: 14px;
  614. color: rgba(51, 51, 51, 0.8);
  615. margin-right: auto;
  616. position: relative;
  617. }
  618. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  619. .arrivalNavigation {
  620. width: 250rpx;
  621. position: absolute;
  622. left: -10px;
  623. top: 30px;
  624. z-index: 99;
  625. .sideNavigation {
  626. width: 80px;
  627. background-color: #fff;
  628. box-shadow: 0px 4px 10px 0px #DAE3F4;
  629. border-radius: 10rpx;
  630. .sideNavigation-btn>view {
  631. text-align: center;
  632. font-size: 14px;
  633. color: #333333;
  634. text-align: center;
  635. padding: 6px 0;
  636. border-bottom: 1px solid #EFEFEF;
  637. &:last-child {
  638. border: none;
  639. }
  640. }
  641. }
  642. .d4 {
  643. width: 0;
  644. height: 0;
  645. margin-left: 22px;
  646. margin-top: -20rpx;
  647. border-width: 20rpx;
  648. border-style: solid;
  649. border-color: transparent #fff transparent transparent;
  650. transform: rotate(90deg);
  651. /*顺时针旋转90°*/
  652. }
  653. }
  654. </style>