subOrders.vue 8.4 KB

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