subOrders.vue 9.9 KB

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