quoteHistory.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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 j-s">
  19. <text class="strong">{{item.inscompany}}</text>
  20. <text class="strong">{{item.createtime}}</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. <text v-if="item.jypremium">驾意险:¥{{item.jypremium}}</text>
  36. </view>
  37. <view v-if="item.auditopinion" class="dis f-c" style="font-size: 12px;">
  38. <text>审核意见</text>
  39. <text>{{item.auditopinion}}</text>
  40. </view>
  41. </view>
  42. <view class="orders-below dis j-end">
  43. <u-button
  44. v-if="item.orderstatus==2 && ['恒邦财险','安盛天平','中国人寿','众安财险','太平财险','紫金财险','永诚财险','国任财险','大家财险','华泰财险','中煤财险'].includes(item.inscompany)"
  45. size="mini" type="error" :plain="true" :hair-line="false" shape="circle"
  46. @click="queryStatus(item.id,item.inscompany)">查询缴费状态</u-button>
  47. <u-button v-if="item.orderstatus==2" size="mini" type="error" :plain="true" :hair-line="false"
  48. shape="circle" @click="revokeCode(item.id)">撤销二维码</u-button>
  49. <u-button v-if="item.orderstatus==4 && item.inscompany=='华泰财险'" size="mini" type="error"
  50. :plain="true" :hair-line="false" shape="circle"
  51. @click="underwritingCode(item.id)">核保状态查询</u-button>
  52. <u-button v-if="item.orderstatus==2" size="mini" type="error" :plain="true" :hair-line="false"
  53. shape="circle" @click="Payment(item.id)">付款码</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. orderStatus: ""
  111. }
  112. let res = await this.$http.post('/insurance/order/queryQuoteHistory', params)
  113. this.sublist = res.data;
  114. },
  115. //查看详情
  116. detial(id) {
  117. uni.navigateTo({
  118. url: "/pages/carInsure1/quoteDetail1?companyId=" + id
  119. })
  120. },
  121. //付款码
  122. Payment(id) {
  123. uni.navigateTo({
  124. url: "/pages/carInsure1/payCode1?companyId=" + id
  125. })
  126. },
  127. //撤销二维码
  128. async revokeCode(id) {
  129. let res = await this.$http.post('/order/qrCode/destructionQrCode?areaCompanyId=' + id)
  130. if (res.code == '200') {
  131. uni.showToast({
  132. title: res.msg,
  133. icon: 'success',
  134. duration: 1000
  135. });
  136. this.querylist();
  137. } else {
  138. uni.showToast({
  139. title: res.msg,
  140. icon: 'none',
  141. duration: 1000
  142. });
  143. }
  144. },
  145. /** 缴费状态查询 */
  146. async queryStatus(id, inscompany) {
  147. switch (inscompany) {
  148. case "紫金财险":
  149. let zjres = await this.$http.post('/order/zijin/getOrderDetail', {
  150. companyId: id
  151. });
  152. if (zjres.code == '200') {
  153. uni.showToast({
  154. title: zjres.msg,
  155. icon: 'none',
  156. duration: 2000
  157. });
  158. this.querylist();
  159. } else {
  160. uni.showToast({
  161. title: zjres.msg,
  162. icon: 'error',
  163. });
  164. }
  165. break;
  166. case "大家财险":
  167. let djres = await this.$http.post('/api/dajia/verifyPayment', {
  168. companyId: id
  169. });
  170. if (djres.code == '200') {
  171. uni.showToast({
  172. title: djres.msg,
  173. icon: 'none',
  174. duration: 2000
  175. });
  176. this.querylist();
  177. } else {
  178. uni.showToast({
  179. title: djres.msg,
  180. icon: 'error',
  181. });
  182. }
  183. break;
  184. case "华泰财险":
  185. let htres = await this.$http.post('/order/huaTaiApi/paymentEnquiry', {
  186. companyId: id
  187. });
  188. if (htres.code == '200') {
  189. uni.showToast({
  190. title: htres.msg,
  191. icon: 'none',
  192. duration: 2000
  193. });
  194. this.querylist();
  195. } else {
  196. uni.showToast({
  197. title: htres.msg,
  198. icon: 'error',
  199. });
  200. }
  201. break;
  202. case "永诚财险":
  203. let ycres = await this.$http.get('/api/yongCheng/orderStatusBySuborderId/' + id);
  204. if (ycres.code == '200') {
  205. uni.showToast({
  206. title: ycres.msg,
  207. icon: 'none',
  208. duration: 2000
  209. });
  210. this.querylist();
  211. } else {
  212. uni.showToast({
  213. title: ycres.msg,
  214. icon: 'error',
  215. });
  216. }
  217. break;
  218. case "国任财险":
  219. let grres = await this.$http.post('/api/guoRen/updateOrderInfo', {
  220. companyId: id
  221. });
  222. if (grres.code == '200') {
  223. uni.showToast({
  224. title: grres.msg,
  225. icon: 'none',
  226. duration: 2000
  227. });
  228. this.querylist();
  229. } else {
  230. uni.showToast({
  231. title: grres.msg,
  232. icon: 'error',
  233. });
  234. }
  235. break;
  236. case "中煤财险":
  237. let zmres = await this.$http.post('/order/zhongMeiApi/paymentEnquiry', {
  238. companyId: id
  239. });
  240. if (zmres.code == '200') {
  241. uni.showToast({
  242. title: zmres.msg,
  243. icon: 'none',
  244. duration: 2000
  245. });
  246. this.querylist();
  247. } else {
  248. uni.showToast({
  249. title: zmres.msg,
  250. icon: 'error',
  251. });
  252. }
  253. break;
  254. default:
  255. let pythonres = await this.$http.post('/insurance/crawler/verifyPayment', {
  256. subOrderNo: id
  257. });
  258. if (pythonres.code == '200') {
  259. uni.showToast({
  260. title: pythonres.msg,
  261. icon: 'none',
  262. duration: 2000
  263. });
  264. this.querylist();
  265. } else {
  266. uni.showToast({
  267. title: pythonres.msg,
  268. icon: 'error',
  269. });
  270. }
  271. break;
  272. }
  273. },
  274. /** 华泰核保状态查询 */
  275. async underwritingCode(id) {
  276. let params = {
  277. companyId: id,
  278. }
  279. let res = await this.$http.post('/order/huaTaiApi/auditStatusQuery', params)
  280. if (res.code == '200') {
  281. uni.showToast({
  282. title: res.msg,
  283. icon: 'success',
  284. duration: 1000
  285. });
  286. this.querylist();
  287. } else {
  288. uni.showToast({
  289. title: res.msg,
  290. icon: 'none',
  291. duration: 1000
  292. });
  293. }
  294. },
  295. //报价单
  296. bjdpreview(id) {
  297. uni.navigateTo({
  298. url: "/pages/orders/quotation?companyId=" + id
  299. })
  300. },
  301. }
  302. }
  303. </script>
  304. <style>
  305. page {
  306. background: #f2f2f2;
  307. }
  308. </style>
  309. <style lang="scss" scoped>
  310. .car-header {
  311. width: 100%;
  312. height: auto;
  313. background: linear-gradient(to right, #ede574, #e1f5c4);
  314. padding: 20px;
  315. box-sizing: border-box;
  316. position: fixed;
  317. z-index: 99;
  318. .icon-radius {
  319. width: 70px;
  320. height: 70px;
  321. background: white;
  322. border-radius: 50%;
  323. box-shadow: 0 0 4px 1px #999;
  324. padding: 12px;
  325. margin-right: 20px;
  326. image {
  327. width: 100%;
  328. height: 100%;
  329. }
  330. }
  331. .head-name {
  332. &>text {
  333. font-weight: bold;
  334. font-size: 20px;
  335. }
  336. .name1 text {
  337. font-weight: bold;
  338. }
  339. }
  340. }
  341. .sub-orders {
  342. width: 100%;
  343. background: white;
  344. border-radius: 6px;
  345. padding: 20px;
  346. box-shadow: 0 0 4px 1px #dfdfdf;
  347. padding-bottom: 0;
  348. margin-bottom: 10px;
  349. .orders-upper {
  350. view {
  351. &>text:first-child {
  352. margin-right: 10px;
  353. }
  354. &>text:last-child {
  355. font-size: 12px;
  356. }
  357. }
  358. }
  359. .orders-centre {
  360. color: #ff9000;
  361. padding: 10px 0;
  362. border-bottom: 2px dashed #dfdfdf;
  363. .dis {
  364. & text {
  365. margin-right: 5px;
  366. }
  367. }
  368. }
  369. .orders-below {
  370. padding: 10px 0;
  371. & button {
  372. margin-left: 10px;
  373. }
  374. }
  375. }
  376. .pdd {
  377. padding: 10px;
  378. }
  379. .strong {
  380. font-weight: bold;
  381. }
  382. </style>