quoteHistory.vue 9.4 KB

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