subOrders.vue 7.8 KB

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