quoteHistory.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <view>
  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 v-if="item.orderstatus==2" class="triangle"></view>
  18. <view class="orders-upper dis f-c">
  19. <view class="dis a-end j-s">
  20. <text class="strong">{{item.inscompany}}</text>
  21. <text class="strong">{{item.createtime}}</text>
  22. </view>
  23. </view>
  24. <view class="orders-centre dis f-c strong">
  25. <view class="dis j-s a-c">
  26. <text>¥{{item.sumpremium}}</text>
  27. <view v-for="(statusitem,statusindex) in statusList" :key="statusindex"
  28. v-if="item.orderstatus==statusitem.value" :style="{color:statusitem.color}">
  29. {{statusitem.label}}
  30. </view>
  31. </view>
  32. <view class="dis" style="font-size: 12px;color: #276D6F;">
  33. <text v-if="item.jqpremium">交强险:¥{{item.jqpremium}}</text>
  34. <text v-if="item.sypremium">商业险:¥{{item.sypremium}}</text>
  35. <text>车船税:¥{{item.taxamount}}</text>
  36. <text v-if="item.jypremium">驾意险:¥{{item.jypremium}}</text>
  37. </view>
  38. <view v-if="item.auditopinion" class="dis f-c" style="font-size: 12px;">
  39. <text>审核意见</text>
  40. <text>{{item.auditopinion}}</text>
  41. </view>
  42. </view>
  43. <view class="orders-below dis j-end">
  44. <u-button
  45. v-if="item.orderstatus==2 && ['恒邦财险','安盛天平','中国人寿','众安财险','太平财险','紫金财险','永诚财险','国任财险','大家财险','华泰财险','中煤财险','华农财险'].includes(item.inscompany)"
  46. size="mini" type="error" :plain="true" :hair-line="false" shape="circle"
  47. @click="queryStatus(item.id,item.inscompany)">查询缴费状态</u-button>
  48. <u-button v-if="item.orderstatus==2" size="mini" type="error" :plain="true" :hair-line="false"
  49. shape="circle" @click="revokeCode(item.id)">撤销二维码</u-button>
  50. <u-button v-if="item.orderstatus==4 && item.inscompany=='华泰财险'" size="mini" type="error"
  51. :plain="true" :hair-line="false" shape="circle"
  52. @click="underwritingCode(item.id)">核保状态查询</u-button>
  53. <u-button v-if="item.orderstatus==2" size="mini" type="error" :plain="true" :hair-line="false"
  54. shape="circle" @click="Payment(item.id)">付款码</u-button>
  55. <u-button size="mini" type="primary" :plain="true" :hair-line="false" shape="circle"
  56. @click="detial(item.id)">查看详情</u-button>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import store from '@/store';
  64. import {
  65. mapState,
  66. mapMutations
  67. } from "vuex"
  68. export default {
  69. data() {
  70. return {
  71. modelcname: "",
  72. orderno: "",
  73. insuredname: "",
  74. licenseno: "",
  75. sublist: [],
  76. statusList: [{
  77. label: '报价中',
  78. value: 0,
  79. color: "#1E9600"
  80. },
  81. {
  82. label: '待核保',
  83. value: 1,
  84. color: "#f5af19"
  85. },
  86. {
  87. label: '已核保待缴费',
  88. value: 2,
  89. color: "#f12711"
  90. },
  91. {
  92. label: '已承保',
  93. value: 3,
  94. color: "#7F7FD5"
  95. },
  96. {
  97. label: '核保退回',
  98. value: 4,
  99. color: "#bdc3c7"
  100. }
  101. ],
  102. }
  103. },
  104. computed: {
  105. ...mapState(['userInfo']),
  106. },
  107. onLoad(params) {
  108. let item = JSON.parse(params.orderno);
  109. this.orderno = item.orderno;
  110. this.modelcname = item.modelcname;
  111. this.insuredname = item.insuredname;
  112. this.licenseno = item.licenseno;
  113. this.querylist();
  114. },
  115. methods: {
  116. async querylist() {
  117. let params = {
  118. orderNo: this.orderno,
  119. orderStatus: ""
  120. }
  121. let res = await this.$http.post('/insurance/order/queryQuoteHistory', params)
  122. this.sublist = res.data;
  123. },
  124. //查看详情
  125. detial(id) {
  126. uni.navigateTo({
  127. url: "/pages/carInsure1/quoteDetail1?companyId=" + id
  128. })
  129. },
  130. //付款码
  131. Payment(id) {
  132. let pro = this.userInfo.sysUser.managementSource;
  133. if (pro == "3") {
  134. uni.navigateTo({
  135. url: "/pages/carInsure1/payCode2?companyId=" + id
  136. })
  137. } else {
  138. uni.navigateTo({
  139. url: "/pages/carInsure1/payCode1?companyId=" + id
  140. })
  141. }
  142. },
  143. //撤销二维码
  144. async revokeCode(id) {
  145. let res = await this.$http.post('/order/qrCode/destructionQrCode?areaCompanyId=' + id)
  146. if (res.code == '200') {
  147. uni.showToast({
  148. title: res.msg,
  149. icon: 'success',
  150. duration: 1000
  151. });
  152. this.querylist();
  153. } else {
  154. uni.showToast({
  155. title: res.msg,
  156. icon: 'none',
  157. duration: 1000
  158. });
  159. }
  160. },
  161. /** 缴费状态查询 */
  162. async queryStatus(id, inscompany) {
  163. switch (inscompany) {
  164. case "紫金财险":
  165. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  166. companyId: id
  167. });
  168. if (zjres.code == '200') {
  169. uni.showToast({
  170. title: zjres.msg,
  171. icon: 'none',
  172. duration: 2000
  173. });
  174. this.querylist();
  175. } else {
  176. uni.showToast({
  177. title: zjres.msg,
  178. icon: 'error',
  179. });
  180. }
  181. break;
  182. case "大家财险":
  183. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  184. companyId: id
  185. });
  186. if (djres.code == '200') {
  187. uni.showToast({
  188. title: djres.msg,
  189. icon: 'none',
  190. duration: 2000
  191. });
  192. this.querylist();
  193. } else {
  194. uni.showToast({
  195. title: djres.msg,
  196. icon: 'error',
  197. });
  198. }
  199. break;
  200. case "华泰财险":
  201. let htres = await this.$http.post('/order/huaTaiApi/paymentEnquiry', {
  202. companyId: id
  203. });
  204. if (htres.code == '200') {
  205. uni.showToast({
  206. title: htres.msg,
  207. icon: 'none',
  208. duration: 2000
  209. });
  210. this.querylist();
  211. } else {
  212. uni.showToast({
  213. title: htres.msg,
  214. icon: 'error',
  215. });
  216. }
  217. break;
  218. case "永诚财险":
  219. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  220. if (ycres.code == '200') {
  221. uni.showToast({
  222. title: ycres.msg,
  223. icon: 'none',
  224. duration: 2000
  225. });
  226. this.querylist();
  227. } else {
  228. uni.showToast({
  229. title: ycres.msg,
  230. icon: 'error',
  231. });
  232. }
  233. break;
  234. case "国任财险":
  235. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  236. companyId: id
  237. });
  238. if (grres.code == '200') {
  239. uni.showToast({
  240. title: grres.msg,
  241. icon: 'none',
  242. duration: 2000
  243. });
  244. this.querylist();
  245. } else {
  246. uni.showToast({
  247. title: grres.msg,
  248. icon: 'error',
  249. });
  250. }
  251. break;
  252. case "中煤财险":
  253. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  254. companyId: id
  255. });
  256. if (zmres.code == '200') {
  257. uni.showToast({
  258. title: zmres.msg,
  259. icon: 'none',
  260. duration: 2000
  261. });
  262. this.querylist();
  263. } else {
  264. uni.showToast({
  265. title: zmres.msg,
  266. icon: 'error',
  267. });
  268. }
  269. break;
  270. default:
  271. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  272. subOrderNo: id
  273. });
  274. if (pythonres.code == '200') {
  275. uni.showToast({
  276. title: pythonres.msg,
  277. icon: 'none',
  278. duration: 2000
  279. });
  280. this.querylist();
  281. } else {
  282. uni.showToast({
  283. title: pythonres.msg,
  284. icon: 'error',
  285. });
  286. }
  287. break;
  288. }
  289. },
  290. /** 华泰核保状态查询 */
  291. async underwritingCode(id) {
  292. let params = {
  293. companyId: id,
  294. }
  295. let res = await this.$http.post('/order/huaTaiApi/auditStatusQuery', params)
  296. if (res.code == '200') {
  297. uni.showToast({
  298. title: res.msg,
  299. icon: 'success',
  300. duration: 1000
  301. });
  302. this.querylist();
  303. } else {
  304. uni.showToast({
  305. title: res.msg,
  306. icon: 'none',
  307. duration: 1000
  308. });
  309. }
  310. },
  311. }
  312. }
  313. </script>
  314. <style>
  315. page {
  316. background: #f2f2f2;
  317. }
  318. </style>
  319. <style lang="scss" scoped>
  320. .triangle {
  321. width: 0;
  322. height: 0;
  323. border-right: 60px solid transparent;
  324. border-top: 30px solid #f12711;
  325. position: absolute;
  326. top: 0;
  327. left: 0;
  328. border-top-left-radius: 6px;
  329. }
  330. .car-header {
  331. width: 100%;
  332. height: auto;
  333. background: linear-gradient(to right, #ede574, #e1f5c4);
  334. padding: 20px;
  335. box-sizing: border-box;
  336. position: fixed;
  337. z-index: 99;
  338. .icon-radius {
  339. width: 70px;
  340. height: 70px;
  341. background: white;
  342. border-radius: 50%;
  343. box-shadow: 0 0 4px 1px #999;
  344. padding: 12px;
  345. margin-right: 20px;
  346. image {
  347. width: 100%;
  348. height: 100%;
  349. }
  350. }
  351. .head-name {
  352. &>text {
  353. font-weight: bold;
  354. font-size: 20px;
  355. }
  356. .name1 text {
  357. font-weight: bold;
  358. }
  359. }
  360. }
  361. .sub-orders {
  362. width: 100%;
  363. background: white;
  364. border-radius: 6px;
  365. padding: 20px;
  366. box-shadow: 0 0 4px 1px #dfdfdf;
  367. padding-bottom: 0;
  368. margin-bottom: 10px;
  369. position: relative;
  370. .orders-upper {
  371. view {
  372. &>text:first-child {
  373. margin-right: 10px;
  374. }
  375. &>text:last-child {
  376. font-size: 12px;
  377. }
  378. }
  379. }
  380. .orders-centre {
  381. color: #ff9000;
  382. padding: 10px 0;
  383. border-bottom: 2px dashed #dfdfdf;
  384. .dis {
  385. & text {
  386. margin-right: 5px;
  387. }
  388. }
  389. }
  390. .orders-below {
  391. padding: 10px 0;
  392. & button {
  393. margin-left: 10px;
  394. }
  395. }
  396. }
  397. .pdd {
  398. padding: 10px;
  399. }
  400. .strong {
  401. font-weight: bold;
  402. }
  403. </style>