subOrders.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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 class="orders-upper dis f-c">
  18. <view class="dis a-end">
  19. <text class="strong">{{item.inscompany}}</text>
  20. <text class="strong">{{licenseno}}</text>
  21. </view>
  22. </view>
  23. <view class="orders-centre dis f-c strong">
  24. <view class="dis j-s a-c">
  25. <text>¥{{item.sumpremium}}</text>
  26. <view v-for="(statusitem,statusindex) in statusList" :key="statusindex"
  27. v-if="item.orderstatus==statusitem.value" :style="{color:statusitem.color}">
  28. {{statusitem.label}}
  29. </view>
  30. </view>
  31. <view class="dis" style="font-size: 12px;color: #276D6F;">
  32. <text v-if="item.jqpremium">交强险:¥{{item.jqpremium}}</text>
  33. <text v-if="item.sypremium">商业险:¥{{item.sypremium}}</text>
  34. <text>车船税:¥{{item.taxamount}}</text>
  35. </view>
  36. </view>
  37. <view class="orders-below dis j-end">
  38. <u-button size="mini" type="error" :plain="true" :hair-line="false" shape="circle"
  39. @click="bjdpreview(item.id)">报价单</u-button>
  40. <u-button v-if="item.orderstatus==2" size="mini" type="error" :plain="true" :hair-line="false"
  41. shape="circle" @click="Payment(item.id)">付款码</u-button>
  42. <u-button
  43. v-if="item.orderstatus==2 && ['恒邦财险','安盛天平','中国人寿','众安财险','紫金财险'].includes(item.inscompany)"
  44. size="mini" type="error" :plain="true" :hair-line="false" shape="circle"
  45. @click="queryStatus(item.id,item.inscompany)">查询缴费状态</u-button>
  46. <u-button size="mini" type="primary" :plain="true" :hair-line="false" shape="circle"
  47. @click="detial(item.id)">查看详情</u-button>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. modelcname: "",
  58. orderno: "",
  59. insuredname: "",
  60. licenseno: "",
  61. sublist: [],
  62. statusList: [{
  63. label: '报价中',
  64. value: 0,
  65. color: "#1E9600"
  66. },
  67. {
  68. label: '待核保',
  69. value: 1,
  70. color: "#f5af19"
  71. },
  72. {
  73. label: '已核保待缴费',
  74. value: 2,
  75. color: "#f12711"
  76. },
  77. {
  78. label: '已承保',
  79. value: 3,
  80. color: "#7F7FD5"
  81. },
  82. {
  83. label: '核保退回',
  84. value: 4,
  85. color: "#bdc3c7"
  86. }
  87. ],
  88. }
  89. },
  90. onLoad(params) {
  91. let item = JSON.parse(params.orderno);
  92. this.orderno = item.orderno;
  93. this.modelcname = item.modelcname;
  94. this.insuredname = item.insuredname;
  95. this.licenseno = item.licenseno;
  96. this.querylist();
  97. },
  98. methods: {
  99. async querylist() {
  100. let params = {
  101. orderNo: this.orderno
  102. }
  103. let res = await this.$http.post('/insurance/order/queryQuoteHistory', params)
  104. this.sublist = res.data;
  105. },
  106. //查看详情
  107. detial(id) {
  108. uni.navigateTo({
  109. url: "/pages/carInsure1/quoteDetail1?companyId=" + id
  110. })
  111. },
  112. //付款码
  113. Payment(id) {
  114. uni.navigateTo({
  115. url: "/pages/carInsure1/payCode1?companyId=" + id
  116. })
  117. },
  118. //报价单
  119. bjdpreview(id) {
  120. uni.navigateTo({
  121. url: "/pages/orders/quotation?companyId=" + id
  122. })
  123. },
  124. async queryStatus(id, inscompany) {
  125. switch (inscompany) {
  126. case "紫金财险":
  127. let res = await this.$http.post('/order/zijin/getOrderDetail', {
  128. companyId: id
  129. });
  130. if (res.code == '200') {
  131. uni.showToast({
  132. title: res.msg,
  133. icon: 'none',
  134. duration: 2000
  135. });
  136. this.querylist();
  137. } else {
  138. uni.showToast({
  139. title: res.msg,
  140. icon: 'error',
  141. });
  142. }
  143. break;
  144. default:
  145. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  146. subOrderNo: id
  147. });
  148. if (pythonres.code == '200') {
  149. uni.showToast({
  150. title: pythonres.msg,
  151. icon: 'none',
  152. duration: 2000
  153. });
  154. this.querylist();
  155. } else {
  156. uni.showToast({
  157. title: pythonres.msg,
  158. icon: 'error',
  159. });
  160. }
  161. break;
  162. }
  163. }
  164. }
  165. }
  166. </script>
  167. <style>
  168. page {
  169. background: #f2f2f2;
  170. }
  171. </style>
  172. <style lang="scss" scoped>
  173. .car-header {
  174. width: 100%;
  175. height: auto;
  176. background: linear-gradient(to right, #ede574, #e1f5c4);
  177. padding: 20px;
  178. box-sizing: border-box;
  179. position: fixed;
  180. z-index: 99;
  181. .icon-radius {
  182. width: 70px;
  183. height: 70px;
  184. background: white;
  185. border-radius: 50%;
  186. box-shadow: 0 0 4px 1px #999;
  187. padding: 12px;
  188. margin-right: 20px;
  189. image {
  190. width: 100%;
  191. height: 100%;
  192. }
  193. }
  194. .head-name {
  195. &>text {
  196. font-weight: bold;
  197. font-size: 20px;
  198. }
  199. .name1 text {
  200. font-weight: bold;
  201. }
  202. }
  203. }
  204. .sub-orders {
  205. width: 100%;
  206. background: white;
  207. border-radius: 6px;
  208. padding: 20px;
  209. box-shadow: 0 0 4px 1px #dfdfdf;
  210. padding-bottom: 0;
  211. margin-bottom: 10px;
  212. .orders-upper {
  213. view {
  214. &>text:first-child {
  215. margin-right: 10px;
  216. }
  217. &>text:last-child {
  218. font-size: 12px;
  219. }
  220. }
  221. }
  222. .orders-centre {
  223. color: #ff9000;
  224. border-bottom: 2px dashed #dfdfdf;
  225. padding: 10px 0;
  226. .dis {
  227. & text {
  228. margin-right: 5px;
  229. }
  230. }
  231. }
  232. .orders-below {
  233. padding: 10px 0;
  234. & button {
  235. margin-left: 10px;
  236. }
  237. }
  238. }
  239. .pdd {
  240. padding: 10px;
  241. }
  242. .strong {
  243. font-weight: bold;
  244. }
  245. </style>