quoteRecordSearch.vue 7.4 KB

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