subOrders.vue 6.6 KB

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