subOrders.vue 17 KB

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