subOrders.vue 17 KB

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