subOrders.vue 14 KB

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