quoteRecords.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <view class="page">
  3. <view class="header">
  4. <uni-NavBar headerTitle="报价记录" background="#fff" rightText="搜索" :isSlot="false" @share="search"
  5. :rightIcon="false" :rightTextStyle="{fontSize:'30rpx'}"></uni-NavBar>
  6. </view>
  7. <view class="data-content dis f-c ">
  8. <view class="view-item dis a-c j-s" v-for="(item,index) in quoteRecordsList" :key="index">
  9. <view class="info dis a-c">
  10. <image class="img mr-1" src="/static/image/car.png" mode=""></image>
  11. <view class="dis f-c j-s">
  12. <text class="license">{{item.licenseNo}}</text>
  13. <text class="count">{{item.quoteNumber}}次报价记录</text>
  14. </view>
  15. </view>
  16. <view class="btn" @click="revisedQuote(item.orderNo)">
  17. 重新报价
  18. </view>
  19. <view class="btn ml-2" @click="historyQuery(item.licenseNo)">
  20. 历史查询
  21. </view>
  22. </view>
  23. <u-loadmore v-if="quoteRecordsList.length!=0" :status="status" />
  24. </view>
  25. <!-- 报价记录弹窗 -->
  26. <uni-Popup :show="quotationRecordShow" @close='quotationRecordShow=false' :headerSlot="true" :closeable="false"
  27. headerTitle="选择出单机构" overflow="auto" maxHeight="1162rpx">
  28. <template #header>
  29. <view class="RecordPopup-header dis j-s a-c">
  30. <view class="license dis a-c">
  31. <image src="/static/image/car.png" mode=""></image>
  32. <text>{{licenseNo}}</text>
  33. </view>
  34. <text class="count">{{insuranceCompanyList.length}}次报价记录</text>
  35. </view>
  36. </template>
  37. <template #content>
  38. <view class="RecordPopup-overflow">
  39. <view class="item mb-2" v-for="(item,index) in insuranceCompanyList" :key="index">
  40. <view class="quotationInfo dis f-c ">
  41. <view class="Info-header dis a-c j-s ">
  42. <view class="dis a-c ">
  43. <image class="insuranceCompany" :src="item.logo" mode=""></image>
  44. <text class="Company-title">{{item.companyName}}</text>
  45. </view>
  46. <view class="time dis a-c ">
  47. <image src="/static/icon/time.png" mode=""></image>
  48. <text>{{item.quoteTime}}</text>
  49. </view>
  50. </view>
  51. <view class=" dis sum">
  52. <text>险种:{{item.productName}}</text>
  53. <text>保费:¥{{item.sumPremium || 0 }}</text>
  54. </view>
  55. </view>
  56. <view class="combination-btn dis ">
  57. <view class="dis a-c j-c " @click="revisedQuote(item.orderNo)">
  58. 重新报价
  59. </view>
  60. <view class="dis a-c j-c " @click="Detailview(item.orderNo)">
  61. 查看
  62. </view>
  63. </view>
  64. </view>
  65. <view class=" dis a-c f-c" v-if="insuranceCompanyList.length==0">
  66. <u-empty mode="car" icon="/static/image/Empty1.png" text="暂无报价记录" width="120" height="120">
  67. </u-empty>
  68. <view class="empty-btn mt-2" @click="quote">
  69. 去报价
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. </uni-Popup>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. quotationRecordShow: true,
  82. pageRequest: {
  83. pages: 1,
  84. size: 20,
  85. licenseNo: "", //车牌号
  86. },
  87. status: 'loadmore',
  88. totalPages: 0, //订单总页数
  89. licenseNo: "",
  90. quoteRecordsList: [], //报价记录列表
  91. insuranceCompanyList: [], //保险公司列表
  92. }
  93. },
  94. onReachBottom() {
  95. if (this.pageRequest.pages >= this.totalPages) return;
  96. this.status = 'loading';
  97. this.pageRequest.pages = ++this.pageRequest.pages;
  98. setTimeout(async () => {
  99. let res = await this.$http.post('/supplementOrder/getHistoryQuoteList', this.pageRequest);
  100. if (res.code == '200') {
  101. this.quoteRecordsList = [...this.quoteRecordsList, ...res.data.records];
  102. }
  103. if (this.pageRequest.pages >= this.totalPages) this.status = 'nomore';
  104. else this.status = 'loading';
  105. }, 1000)
  106. },
  107. onShow() {
  108. },
  109. onLoad(options) {
  110. if (options) {
  111. this.licenseNo = options.license;
  112. this.fetchQuoteHistory();
  113. this.quoteHistory(this.licenseNo);
  114. }
  115. },
  116. methods: {
  117. //报价记录
  118. async fetchQuoteHistory() {
  119. let res = await this.$http.post('/supplementOrder/getHistoryQuoteList', this.pageRequest);
  120. if (res.code == 200) {
  121. this.quoteRecordsList = res.data.records;
  122. this.totalPages = res.data.pages;
  123. }
  124. },
  125. async quoteHistory(licenseNo) {
  126. let res = await this.$http.post('/supplementOrder/getHistoryQuoteByLicenseNo', {
  127. licenseNo: licenseNo,
  128. });
  129. if (res.code == 200) {
  130. this.insuranceCompanyList = res.data;
  131. }
  132. },
  133. //重新报价
  134. revisedQuote(orderNo) {
  135. uni.navigateTo({
  136. url: "/pages/quote/premiumCalc1?ordersNo=" + orderNo
  137. })
  138. },
  139. //报价历史查询
  140. async historyQuery(item) {
  141. this.licenseNo = item;
  142. await this.quoteHistory(item)
  143. this.quotationRecordShow = true;
  144. },
  145. search() {
  146. uni.navigateTo({
  147. url: '/pages/quote/quoteRecordSearch'
  148. })
  149. },
  150. //去报价
  151. quote() {
  152. uni.switchTab({
  153. url: '/pages/index/index'
  154. })
  155. },
  156. //查看详情
  157. Detailview(orderNo) {
  158. this.quotationRecordShow = false;
  159. uni.navigateTo({
  160. url: '/pages/quote/quoteRecordDetail?ordersNo=' + orderNo
  161. })
  162. }
  163. }
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .page {
  168. background-color: #F8F8F8;
  169. }
  170. .header {
  171. position: fixed;
  172. top: 0;
  173. left: 0;
  174. right: 0;
  175. z-index: 9999;
  176. }
  177. .data-content {
  178. padding-top: 180rpx;
  179. .view-item {
  180. padding: 20rpx 30rpx;
  181. box-sizing: border-box;
  182. border-bottom: 1rpx solid #eee;
  183. background-color: #fff;
  184. .info {
  185. flex: 1;
  186. }
  187. .img {
  188. width: 90rpx;
  189. height: 90rpx;
  190. }
  191. .license {
  192. font-size: 34rpx;
  193. color: #333;
  194. font-weight: bold;
  195. }
  196. .count {
  197. font-size: 28rpx;
  198. color: #999;
  199. }
  200. .btn {
  201. padding: 13rpx 20rpx;
  202. box-sizing: border-box;
  203. background: rgba(253, 233, 53, 0.2);
  204. border-radius: 58rpx 58rpx 58rpx 58rpx;
  205. border: 1rpx solid #FDE935;
  206. font-size: 30rpx;
  207. color: #1F1F1F;
  208. }
  209. }
  210. }
  211. // 弹窗样式
  212. .RecordPopup-header {
  213. .license {
  214. image {
  215. width: 48rpx;
  216. height: 48rpx;
  217. }
  218. text {
  219. font-size: 34rpx;
  220. color: #333;
  221. margin-left: 10rpx;
  222. font-weight: bold;
  223. }
  224. }
  225. .count {
  226. font-size: 28rpx;
  227. color: #999;
  228. }
  229. }
  230. // 弹窗内容区
  231. .RecordPopup-overflow {
  232. padding: 30rpx;
  233. box-sizing: border-box;
  234. .item {
  235. background: #FFFFFF;
  236. border-radius: 10rpx 10rpx 10rpx 10rpx;
  237. border: 1rpx solid #EEEEEE;
  238. }
  239. .quotationInfo {
  240. padding: 30rpx 30rpx 24rpx;
  241. box-sizing: border-box;
  242. border-bottom: 1rpx solid #EEEEEE;
  243. .insuranceCompany {
  244. width: 40rpx;
  245. height: 40rpx;
  246. }
  247. // 保险公司
  248. .Company-title {
  249. font-size: 32rpx;
  250. color: #333;
  251. margin-left: 10rpx;
  252. }
  253. // 日期
  254. .time {
  255. image {
  256. width: 22rpx;
  257. height: 22rpx;
  258. }
  259. font-size: 22rpx;
  260. color: #666;
  261. }
  262. .sum {
  263. width: 100%;
  264. font-size: 30rpx;
  265. color: #666;
  266. margin-top: 24rpx;
  267. text {
  268. width: 50%;
  269. }
  270. }
  271. }
  272. .combination-btn {
  273. view {
  274. width: 49%;
  275. padding: 14rpx;
  276. box-sizing: border-box;
  277. font-size: 30rpx;
  278. color: #333;
  279. font-weight: bold;
  280. }
  281. view:last-child {
  282. border-left: 1rpx solid #eee;
  283. }
  284. }
  285. }
  286. .empty-btn {
  287. padding: 13rpx 30rpx;
  288. box-sizing: border-box;
  289. background: rgba(253, 233, 53, 0.2);
  290. border-radius: 58rpx 58rpx 58rpx 58rpx;
  291. border: 1rpx solid #FDE935;
  292. font-size: 30rpx;
  293. color: #1F1F1F;
  294. }
  295. </style>