subOrders.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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/tools/policy/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 djapi = item.apiType == '2' ? '/insurance/crawler/auditStatusQuery' :
  324. '/api/dajia/verifyPayment';
  325. let djres = await this.$http.post(`${djapi}`, {
  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 djapi = item.apiType == '2' ? '/insurance/crawler/verifyPayment' :
  421. '/api/dajia/verifyPayment';
  422. let djres = await this.$http.post(`${djapi}`, {
  423. [item.apiType == 2 ? "subOrderNo" : "companyId"]: id
  424. });
  425. if (djres.code == '200') {
  426. uni.showToast({
  427. title: djres.msg,
  428. icon: 'none',
  429. duration: 2000
  430. });
  431. this.querylist();
  432. } else {
  433. uni.showToast({
  434. title: djres.msg,
  435. icon: 'none',
  436. });
  437. }
  438. break;
  439. case "华泰财险":
  440. let htapi = item.apiType == '2' ? '/insurance/crawler/verifyPayment' :
  441. '/order/huaTaiApi/paymentEnquiry';
  442. let htres = await this.$http.post(`${htapi}`, {
  443. [item.apiType == 2 ? "subOrderNo" : "companyId"]: id
  444. });
  445. if (htres.code == '200') {
  446. uni.showToast({
  447. title: htres.msg,
  448. icon: 'none',
  449. duration: 2000
  450. });
  451. this.querylist();
  452. } else {
  453. uni.showToast({
  454. title: htres.msg,
  455. icon: 'error',
  456. });
  457. }
  458. break;
  459. case "永诚财险":
  460. let ycres = await this.$http.get(
  461. '/api/yongCheng/orderStatusBySuborderId/' + id);
  462. if (ycres.code == '200') {
  463. uni.showToast({
  464. title: ycres.msg,
  465. icon: 'none',
  466. duration: 2000
  467. });
  468. this.querylist();
  469. } else {
  470. uni.showToast({
  471. title: ycres.msg,
  472. icon: 'none',
  473. });
  474. }
  475. break;
  476. case "国任财险":
  477. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  478. companyId: id
  479. });
  480. if (grres.code == '200') {
  481. uni.showToast({
  482. title: grres.msg,
  483. icon: 'none',
  484. duration: 2000
  485. });
  486. this.querylist();
  487. } else {
  488. uni.showToast({
  489. title: grres.msg,
  490. icon: 'none',
  491. });
  492. }
  493. break;
  494. case "中煤财险":
  495. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  496. companyId: id
  497. });
  498. if (zmres.code == '200') {
  499. uni.showToast({
  500. title: zmres.msg,
  501. icon: 'none',
  502. duration: 2000
  503. });
  504. this.querylist();
  505. } else {
  506. uni.showToast({
  507. title: zmres.msg,
  508. icon: 'none',
  509. });
  510. }
  511. break;
  512. case "渤海财险":
  513. let bhres = await this.$http.post('/order/boHaiApi/getOrderDetail', {
  514. companyId: id
  515. });
  516. if (bhres.code == '200') {
  517. uni.showToast({
  518. title: bhres.msg,
  519. icon: 'none',
  520. duration: 2000
  521. });
  522. this.querylist();
  523. } else {
  524. uni.showToast({
  525. title: bhres.msg,
  526. icon: 'none',
  527. });
  528. }
  529. break;
  530. default:
  531. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  532. subOrderNo: id
  533. });
  534. if (pythonres.code == '200') {
  535. uni.showToast({
  536. title: pythonres.msg,
  537. icon: 'none',
  538. duration: 2000
  539. });
  540. this.querylist();
  541. } else {
  542. uni.showToast({
  543. title: pythonres.msg,
  544. icon: 'none',
  545. });
  546. }
  547. break;
  548. }
  549. },
  550. init() {
  551. this.sublist = this.sublist.map(val => {
  552. val.checked = false;
  553. return val;
  554. })
  555. }
  556. }
  557. }
  558. </script>
  559. <style>
  560. page {
  561. background: #f2f2f2;
  562. }
  563. </style>
  564. <style lang="scss" scoped>
  565. .page {
  566. min-height: calc(100vh - 44px);
  567. background-color: #F8FAFE;
  568. padding: 16px 16px 30px 16px;
  569. }
  570. .car-header {
  571. width: 100%;
  572. height: auto;
  573. background: #FFFFFF;
  574. box-shadow: 0px 4px 10px 0px #DAE3F4;
  575. border-radius: 6px;
  576. padding: 8px 15px;
  577. .head-name {
  578. margin-left: 20px;
  579. &>text {
  580. font-weight: bold;
  581. font-size: 15px;
  582. color: #232832;
  583. }
  584. .name1 text {
  585. font-size: 14px;
  586. font-weight: bold;
  587. color: #333333;
  588. }
  589. }
  590. }
  591. .sub-orders {
  592. width: 100%;
  593. background: white;
  594. border-radius: 6px;
  595. padding: 10px;
  596. box-shadow: 0px 4px 10px 0px #DAE3F4;
  597. border-radius: 6px;
  598. margin-bottom: 10px;
  599. .status {
  600. padding-bottom: 8px;
  601. border-bottom: 1px solid #EFEFEF;
  602. >text {
  603. color: #FF5600;
  604. font-size: 16px;
  605. font-weight: bold;
  606. }
  607. }
  608. .orders-centre {
  609. padding: 6px 0;
  610. border-bottom: 1px solid #EFEFEF;
  611. >text {
  612. font-size: 15px;
  613. font-weight: bold;
  614. color: #232832;
  615. }
  616. .sum {
  617. view {
  618. width: 50%;
  619. color: #2D4D89;
  620. font-size: 13px;
  621. }
  622. }
  623. }
  624. .orders-below {
  625. padding-top: 10px;
  626. >view {
  627. uni-button {
  628. margin-left: 5px;
  629. }
  630. }
  631. }
  632. }
  633. .strong {
  634. font-weight: bold;
  635. }
  636. .arrivalNavigations {
  637. font-size: 14px;
  638. color: rgba(51, 51, 51, 0.8);
  639. margin-right: auto;
  640. position: relative;
  641. }
  642. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  643. .arrivalNavigation {
  644. width: 250rpx;
  645. position: absolute;
  646. left: -10px;
  647. top: 30px;
  648. z-index: 99;
  649. .sideNavigation {
  650. width: 80px;
  651. background-color: #fff;
  652. box-shadow: 0px 4px 10px 0px #DAE3F4;
  653. border-radius: 10rpx;
  654. .sideNavigation-btn>view {
  655. text-align: center;
  656. font-size: 14px;
  657. color: #333333;
  658. text-align: center;
  659. padding: 6px 0;
  660. border-bottom: 1px solid #EFEFEF;
  661. &:last-child {
  662. border: none;
  663. }
  664. }
  665. }
  666. .d4 {
  667. width: 0;
  668. height: 0;
  669. margin-left: 22px;
  670. margin-top: -20rpx;
  671. border-width: 20rpx;
  672. border-style: solid;
  673. border-color: transparent #fff transparent transparent;
  674. transform: rotate(90deg);
  675. /*顺时针旋转90°*/
  676. }
  677. }
  678. </style>