subOrders.vue 6.8 KB

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