subOrders.vue 16 KB

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