subOrders.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  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. console.log(type);
  204. let pro = this.quotationType.themeCode;
  205. if (pro == "QD") {
  206. uni.navigateTo({
  207. url: "/pages/orders1/paymentCode?companyId=" + id + '&apiType=' + type,
  208. })
  209. } else {
  210. uni.navigateTo({
  211. url: "/pages/orders1/paymentCode1?companyId=" + id + '&apiType=' + type,
  212. })
  213. }
  214. },
  215. //报价单
  216. bjdpreview(id) {
  217. let pro = this.quotationType.themeCode;
  218. console.log(pro);
  219. if (pro == "QD") {
  220. uni.navigateTo({
  221. url: "/pages/orders1/quotation?companyId=" + id
  222. })
  223. } else {
  224. uni.navigateTo({
  225. url: "/pages/orders1/quotation1?companyId=" + id
  226. })
  227. }
  228. },
  229. //撤销二维码
  230. async revokeCode(id) {
  231. let res = await this.$http.post('/order/qrCode/destructionQrCode?areaCompanyId=' + id)
  232. if (res.code == '200') {
  233. uni.showToast({
  234. title: res.msg,
  235. icon: 'success',
  236. duration: 1000
  237. });
  238. this.querylist();
  239. } else {
  240. uni.showToast({
  241. title: res.msg,
  242. icon: 'none',
  243. duration: 1000
  244. });
  245. }
  246. },
  247. async huataiunderwriting(item) {
  248. let api = item.apiType == '2' ? '/insurance/crawler/auditStatusQuery' :
  249. '/order/huaTaiApi/auditStatusQuery';
  250. let params = {
  251. companyId: item.id,
  252. }
  253. let res = await this.$http.post(`${api}`, params)
  254. if (res.code == '200') {
  255. uni.showToast({
  256. title: res.msg,
  257. icon: 'success',
  258. duration: 1000
  259. });
  260. this.querylist();
  261. } else {
  262. uni.showToast({
  263. title: res.msg,
  264. icon: 'none',
  265. duration: 1000
  266. });
  267. }
  268. },
  269. //核保状态查询
  270. async underwriting(id, inscompany) {
  271. switch (inscompany) {
  272. case "中煤财险":
  273. let zmres = await this.$http.post('/order/zhongMeiApi/auditStatusQuery', {
  274. companyId: id
  275. })
  276. if (zmres.code == '200') {
  277. uni.showToast({
  278. title: zmres.msg,
  279. icon: 'none',
  280. duration: 1000
  281. });
  282. this.querylist();
  283. } else {
  284. uni.showToast({
  285. title: zmres.msg,
  286. icon: 'none',
  287. });
  288. }
  289. break;
  290. case "永诚财险":
  291. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  292. if (ycres.code == '200') {
  293. uni.showToast({
  294. title: ycres.msg,
  295. icon: 'none',
  296. duration: 2000
  297. });
  298. this.querylist();
  299. } else {
  300. uni.showToast({
  301. title: ycres.msg,
  302. icon: 'none',
  303. });
  304. }
  305. break;
  306. case "国任财险":
  307. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  308. companyId: id
  309. });
  310. if (grres.code == '200') {
  311. uni.showToast({
  312. title: grres.msg,
  313. icon: 'none',
  314. duration: 2000
  315. });
  316. this.querylist();
  317. } else {
  318. uni.showToast({
  319. title: grres.msg,
  320. icon: 'none',
  321. });
  322. }
  323. break;
  324. case "大家财险":
  325. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  326. companyId: id
  327. });
  328. if (djres.code == '200') {
  329. uni.showToast({
  330. title: djres.msg,
  331. icon: 'none',
  332. duration: 2000
  333. });
  334. this.querylist();
  335. } else {
  336. uni.showToast({
  337. title: djres.msg,
  338. icon: 'none',
  339. });
  340. }
  341. break;
  342. case "渤海财险":
  343. let bhres = await this.$http.post('/order/boHaiApi/auditStatusQuery', {
  344. companyId: id
  345. });
  346. if (bhres.code == '200') {
  347. uni.showToast({
  348. title: bhres.msg,
  349. icon: 'none',
  350. duration: 2000
  351. });
  352. this.querylist();
  353. } else {
  354. uni.showToast({
  355. title: bhres.msg,
  356. icon: 'none',
  357. });
  358. }
  359. break;
  360. default:
  361. let pythonres = await this.$http.post('/insurance/crawler/auditStatusQuery', {
  362. companyId: id
  363. });
  364. if (pythonres.code == '200') {
  365. uni.showToast({
  366. title: pythonres.msg,
  367. icon: 'none',
  368. duration: 2000
  369. });
  370. this.querylist();
  371. } else {
  372. uni.showToast({
  373. title: pythonres.msg,
  374. icon: 'none',
  375. });
  376. }
  377. break;
  378. }
  379. },
  380. //撤单
  381. async cancelorder(item) {
  382. let res = await this.$http.post('/order/zijin/cancel', {
  383. companyId: item
  384. })
  385. if (res.code == '200') {
  386. uni.showToast({
  387. title: res.msg,
  388. icon: 'none',
  389. duration: 1000
  390. });
  391. this.querylist();
  392. } else {
  393. uni.showToast({
  394. title: res.msg,
  395. icon: 'none',
  396. });
  397. }
  398. },
  399. async queryStatus(id, item) {
  400. switch (item.inscompany) {
  401. case "紫金财险":
  402. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  403. companyId: id
  404. });
  405. if (zjres.code == '200') {
  406. uni.showToast({
  407. title: zjres.msg,
  408. icon: 'none',
  409. duration: 2000
  410. });
  411. this.querylist();
  412. } else {
  413. uni.showToast({
  414. title: zjres.msg,
  415. icon: 'none',
  416. });
  417. }
  418. break;
  419. case "大家财险":
  420. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  421. companyId: id
  422. });
  423. if (djres.code == '200') {
  424. uni.showToast({
  425. title: djres.msg,
  426. icon: 'none',
  427. duration: 2000
  428. });
  429. this.querylist();
  430. } else {
  431. uni.showToast({
  432. title: djres.msg,
  433. icon: 'none',
  434. });
  435. }
  436. break;
  437. case "华泰财险":
  438. let api = item.apiType == '2' ? '/insurance/crawler/verifyPayment' :
  439. '/order/huaTaiApi/paymentEnquiry';
  440. let htres = await this.$http.post(`${api}`, {
  441. [item.apiType == 2 ? "subOrderNo" : "companyId"]: id
  442. });
  443. if (htres.code == '200') {
  444. uni.showToast({
  445. title: htres.msg,
  446. icon: 'none',
  447. duration: 2000
  448. });
  449. this.querylist();
  450. } else {
  451. uni.showToast({
  452. title: htres.msg,
  453. icon: 'error',
  454. });
  455. }
  456. break;
  457. case "永诚财险":
  458. let ycres = await this.$http.get(
  459. '/api/yongCheng/orderStatusBySuborderId/' + id);
  460. if (ycres.code == '200') {
  461. uni.showToast({
  462. title: ycres.msg,
  463. icon: 'none',
  464. duration: 2000
  465. });
  466. this.querylist();
  467. } else {
  468. uni.showToast({
  469. title: ycres.msg,
  470. icon: 'none',
  471. });
  472. }
  473. break;
  474. case "国任财险":
  475. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  476. companyId: id
  477. });
  478. if (grres.code == '200') {
  479. uni.showToast({
  480. title: grres.msg,
  481. icon: 'none',
  482. duration: 2000
  483. });
  484. this.querylist();
  485. } else {
  486. uni.showToast({
  487. title: grres.msg,
  488. icon: 'none',
  489. });
  490. }
  491. break;
  492. case "中煤财险":
  493. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  494. companyId: id
  495. });
  496. if (zmres.code == '200') {
  497. uni.showToast({
  498. title: zmres.msg,
  499. icon: 'none',
  500. duration: 2000
  501. });
  502. this.querylist();
  503. } else {
  504. uni.showToast({
  505. title: zmres.msg,
  506. icon: 'none',
  507. });
  508. }
  509. break;
  510. case "渤海财险":
  511. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  512. companyId: id
  513. });
  514. if (bhres.code == '200') {
  515. uni.showToast({
  516. title: bhres.msg,
  517. icon: 'none',
  518. duration: 2000
  519. });
  520. this.querylist();
  521. } else {
  522. uni.showToast({
  523. title: bhres.msg,
  524. icon: 'none',
  525. });
  526. }
  527. break;
  528. default:
  529. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  530. subOrderNo: id
  531. });
  532. if (pythonres.code == '200') {
  533. uni.showToast({
  534. title: pythonres.msg,
  535. icon: 'none',
  536. duration: 2000
  537. });
  538. this.querylist();
  539. } else {
  540. uni.showToast({
  541. title: pythonres.msg,
  542. icon: 'none',
  543. });
  544. }
  545. break;
  546. }
  547. },
  548. init() {
  549. this.sublist = this.sublist.map(val => {
  550. val.checked = false;
  551. return val;
  552. })
  553. }
  554. }
  555. }
  556. </script>
  557. <style>
  558. page {
  559. background: #f2f2f2;
  560. }
  561. </style>
  562. <style lang="scss" scoped>
  563. .page {
  564. min-height: calc(100vh - 44px);
  565. background-color: #F8FAFE;
  566. padding: 16px 16px 30px 16px;
  567. }
  568. .car-header {
  569. width: 100%;
  570. height: auto;
  571. background: #FFFFFF;
  572. box-shadow: 0px 4px 10px 0px #DAE3F4;
  573. border-radius: 6px;
  574. padding: 8px 15px;
  575. .head-name {
  576. margin-left: 20px;
  577. &>text {
  578. font-weight: bold;
  579. font-size: 15px;
  580. color: #232832;
  581. }
  582. .name1 text {
  583. font-size: 14px;
  584. font-weight: bold;
  585. color: #333333;
  586. }
  587. }
  588. }
  589. .sub-orders {
  590. width: 100%;
  591. background: white;
  592. border-radius: 6px;
  593. padding: 10px;
  594. box-shadow: 0px 4px 10px 0px #DAE3F4;
  595. border-radius: 6px;
  596. margin-bottom: 10px;
  597. .status {
  598. padding-bottom: 8px;
  599. border-bottom: 1px solid #EFEFEF;
  600. >text {
  601. color: #FF5600;
  602. font-size: 16px;
  603. font-weight: bold;
  604. }
  605. }
  606. .orders-centre {
  607. padding: 6px 0;
  608. border-bottom: 1px solid #EFEFEF;
  609. >text {
  610. font-size: 15px;
  611. font-weight: bold;
  612. color: #232832;
  613. }
  614. .sum {
  615. view {
  616. width: 50%;
  617. color: #2D4D89;
  618. font-size: 13px;
  619. }
  620. }
  621. }
  622. .orders-below {
  623. padding-top: 10px;
  624. >view {
  625. uni-button {
  626. margin-left: 5px;
  627. }
  628. }
  629. }
  630. }
  631. .strong {
  632. font-weight: bold;
  633. }
  634. .arrivalNavigations {
  635. font-size: 14px;
  636. color: rgba(51, 51, 51, 0.8);
  637. margin-right: auto;
  638. position: relative;
  639. }
  640. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  641. .arrivalNavigation {
  642. width: 250rpx;
  643. position: absolute;
  644. left: -10px;
  645. top: 30px;
  646. z-index: 99;
  647. .sideNavigation {
  648. width: 80px;
  649. background-color: #fff;
  650. box-shadow: 0px 4px 10px 0px #DAE3F4;
  651. border-radius: 10rpx;
  652. .sideNavigation-btn>view {
  653. text-align: center;
  654. font-size: 14px;
  655. color: #333333;
  656. text-align: center;
  657. padding: 6px 0;
  658. border-bottom: 1px solid #EFEFEF;
  659. &:last-child {
  660. border: none;
  661. }
  662. }
  663. }
  664. .d4 {
  665. width: 0;
  666. height: 0;
  667. margin-left: 22px;
  668. margin-top: -20rpx;
  669. border-width: 20rpx;
  670. border-style: solid;
  671. border-color: transparent #fff transparent transparent;
  672. transform: rotate(90deg);
  673. /*顺时针旋转90°*/
  674. }
  675. }
  676. </style>