subOrders.vue 15 KB

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