customer.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. <template>
  2. <view class="parent">
  3. <!-- 查询区域Start -->
  4. <view>
  5. <view class=" flexd " style="z-index: 99;">
  6. <view class="search dis f-c">
  7. <view class="dis a-c j-start ">
  8. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  9. <text style="margin: auto;">客户管理</text>
  10. </view>
  11. <view class="dis j-s a-c mt-5">
  12. <u-search style="box-shadow: 0px 4px 10px 0px #DAE3F4;border-radius: 6px;"
  13. v-model="pageRequest.param" @custom="custom" @search="search" :shape="shape" :height='68'
  14. bg-color="#fff" color="#000" :input-style="{background:'transparent'}"
  15. placeholder-color="rgba(51,51,51,0.6)" :clearabled="clearabled" :show-action="showAction"
  16. :input-align="inputAlign" @clear="clear" :action-style="{background:'#fff'}"
  17. placeholder="请输入车牌号、保险公司查询"></u-search>
  18. <image src="/static/image/addStaff/screen.png" mode="" @tap="searchPopup"></image>
  19. </view>
  20. </view>
  21. <view :class="['dropdown-content', { 'show': showDropdown }]" @tap="searchPopup">
  22. <view :class="['dropdown-content1','dis','f-c','j-s', { 'show1': showDropdown }]" @tap.stop.prevent>
  23. <view style="padding: 0 16px; box-sizing: border-box;">
  24. <view class="term">
  25. <text>日期筛选</text>
  26. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  27. <view class="dis a-c j-c">
  28. <text>交强终保日期:</text>
  29. <view class="status-data" @tap="jqShowmethod()">
  30. <text v-if="pageRequest.jqEndDate!=''">{{pageRequest.jqEndDate}}</text>
  31. <text v-else>{{transformTime()}}</text>
  32. </view>
  33. </view>
  34. <view class="dis a-c j-c mt-2">
  35. <text>商业终保日期:</text>
  36. <view class="status-data" @tap="syShowmethod()">
  37. <text v-if="pageRequest.syEndDate!=''">{{pageRequest.syEndDate}}</text>
  38. <text v-else>{{transformTime()}}</text>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="operateBtn dis ">
  45. <view class="cancel dis a-c j-c" @click="showDropdown=false">
  46. 取消
  47. </view>
  48. <view class="confirm dis a-c j-c" @click="querysearch">
  49. 确定
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view style="padding: 160px 16px 50px 16px;">
  57. <view class="Paging dis f-c " v-for="(item,index) in list" :key="index">
  58. <view class="pa-title dis a-c j-s">
  59. <view class="dis a-c ">
  60. <image :src="item.iconImg" mode=""></image>
  61. <text>{{item.insCompany}}</text>
  62. </view>
  63. <u-button size="mini" type="primary" :custom-style="{fontSize:'14px'}" :plain="true"
  64. @click="details(item.orderno)">查看详情</u-button>
  65. </view>
  66. <view class="pa-cent dis f-c mt-2">
  67. <view class="dis j-s a-c">
  68. <text style="color: #333;">车牌号:{{item.licenseno}}</text>
  69. <u-tag :text="item.product" mode="light" type="warning" border-color="#fff" />
  70. </view>
  71. <text v-if="item.jqenddate">交强险终保日期:{{item.jqenddate}}</text>
  72. <text v-if="item.syenddate">商业险终保日期:{{item.syenddate}}</text>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 回到顶部 -->
  77. <u-picker v-model="jqendShow" mode="time" :params="params" @confirm="jqconfirm"></u-picker>
  78. <u-picker v-model="syendShow" mode="time" :params="params" @confirm="syconfirm"></u-picker>
  79. </view>
  80. </template>
  81. <script>
  82. import {
  83. mapState,
  84. mapMutations
  85. } from "vuex"
  86. import {
  87. watch
  88. } from "vue";
  89. export default {
  90. data() {
  91. return {
  92. show: true,
  93. showDropdown: false,
  94. /* 时间筛选相关 */
  95. jqendShow: false,
  96. syendShow: false,
  97. endShow: false,
  98. params: {
  99. year: true, //年
  100. month: true, //月
  101. day: true, //日
  102. hour: true,
  103. minute: true,
  104. second: true,
  105. },
  106. /* 时间筛选相关 */
  107. pageRequest: { //查询的默认条件
  108. jqEndDate: "",
  109. syEndDate: "",
  110. userId: "",
  111. param: "",
  112. pageNum: 1,
  113. pageSize: 20,
  114. },
  115. pageResult: [], //列表数据
  116. /* 搜索框配置 */
  117. shape: 'square',
  118. clearabled: true,
  119. showAction: false,
  120. inputAlign: 'left',
  121. /* 搜索框配置 */
  122. toTopFlag: false, //显示回到顶部按钮
  123. queryLicenseNo: "",
  124. queryFrameNo: "",
  125. insureMore: false,
  126. insureMoreIndex: null,
  127. esmInsCompanyList: [],
  128. list: [],
  129. }
  130. },
  131. computed: {
  132. ...mapState(['userInfo', 'typeIndex', 'stageIndex'])
  133. },
  134. // 页面触底加载
  135. onReachBottom() {
  136. this.currentPage = this.currentPage + 1;
  137. if (this.totalPages >= this.currentPage) {} else {
  138. return false;
  139. }
  140. },
  141. // 页面滚动触发
  142. onPageScroll(e) { //根据距离顶部距离是否显示回到顶部按钮
  143. if (e.scrollTop > 600) { //当距离大于600时显示回到顶部按钮
  144. this.toTopFlag = true
  145. } else { //当距离小于600时显示回到顶部按钮
  146. this.toTopFlag = false
  147. }
  148. },
  149. onShow() {},
  150. async onLoad(e) {
  151. this.pageRequest.userId = this.userInfo.sysUser.id;
  152. this.pageRequest.jqEndDate = this.transformTime();
  153. this.pageRequest.syEndDate = this.transformTime();
  154. this.querylist();
  155. },
  156. methods: {
  157. details(id) {
  158. uni.navigateTo({
  159. url: "/pages/tools/customer/custormerDetail?companyId=" + id
  160. })
  161. },
  162. async querylist() {
  163. let res = await this.$http.post('/insurance/order/getExpirationInsure', this.pageRequest);
  164. if (res.code == '200') {
  165. let data = res.data.records;
  166. this.$base.insCompanyList.map(val => {
  167. data.map(ele => {
  168. if (ele.insCompany == val.name) {
  169. ele.iconImg = val.icon;
  170. }
  171. return ele;
  172. })
  173. })
  174. this.list = data;
  175. }
  176. },
  177. back() {
  178. uni.navigateBack({
  179. delta: 1, // 返回的页面数,如果是1表示返回上一页
  180. success: function() {}
  181. });
  182. },
  183. jqShowmethod() {
  184. this.jqendShow = true;
  185. },
  186. syShowmethod() {
  187. this.syendShow = true;
  188. },
  189. searchPopup() {
  190. this.showDropdown = !this.showDropdown;
  191. },
  192. //查询事件
  193. querysearch() {
  194. this.querylist();
  195. this.showDropdown = false;
  196. },
  197. //状态筛选
  198. statusclick(e) {
  199. this.pageRequest.orderStatus = e;
  200. },
  201. jqconfirm(e) {
  202. this.pageRequest.jqEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  203. .second;
  204. },
  205. syconfirm(e) {
  206. this.pageRequest.syEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  207. .second;
  208. },
  209. //当前时间
  210. transformTime(day) {
  211. var date = new Date();
  212. date.setFullYear(date.getFullYear());
  213. date.setTime(date.getTime());
  214. var strYear = date.getFullYear();
  215. var strDay = day ? date.getDate() - day : date.getDate();
  216. var strMonth = date.getMonth() + 1;
  217. if (strMonth < 10) {
  218. strMonth = "0" + strMonth;
  219. }
  220. if (strDay < 10) {
  221. strDay = "0" + strDay;
  222. }
  223. var datastr = strYear + "-" + strMonth + "-" + strDay + ' 00:00:00';
  224. return datastr;
  225. },
  226. //回车搜索事件
  227. search(val) {
  228. this.querylist();
  229. },
  230. //搜索按钮事件
  231. custom(val) {
  232. this.querylist();
  233. },
  234. //搜索框清除事件
  235. clear(val) {
  236. },
  237. }
  238. }
  239. </script>
  240. <style>
  241. page {
  242. background-color: #F8FAFE;
  243. }
  244. </style>
  245. <style lang="scss" scoped>
  246. @import '@/style/mixin.scss';
  247. /deep/ uni-tabbar .uni-tabbar-bottom {
  248. position: fixed;
  249. left: 0;
  250. right: 0;
  251. bottom: 0;
  252. }
  253. /deep/ .u-action[data-v-1a326067] {
  254. color: #FFFFFF;
  255. }
  256. /deep/ .u-dropdown__menu__item__arrow[data-v-01c0c507] uni-text {
  257. color: #FFFFFF !important;
  258. }
  259. .dropdown-content {
  260. background-color: rgba(0, 0, 0, 0.6);
  261. height: 0px;
  262. opacity: 0;
  263. transition: opacity 0.3s ease;
  264. .title {
  265. font-size: 14px;
  266. color: #232832;
  267. font-weight: bold;
  268. border-bottom: 1px solid #E1E1E1;
  269. }
  270. .term {
  271. padding-top: 10px;
  272. >text {
  273. color: #232832;
  274. font-weight: bold;
  275. font-size: 13px;
  276. }
  277. }
  278. .operateBtn {
  279. font-weight: bold;
  280. font-size: 16px;
  281. .cancel {
  282. width: 50%;
  283. height: 46px;
  284. color: #0052FF;
  285. background-color: #EAEAEA;
  286. }
  287. .confirm {
  288. width: 50%;
  289. height: 46px;
  290. color: #fff;
  291. background-color: #0052FF;
  292. }
  293. }
  294. }
  295. .dropdown-content1 {
  296. background-color: #fff;
  297. height: 0px;
  298. overflow: hidden;
  299. transition: height 0.4s ease;
  300. }
  301. .show {
  302. height: 100vh;
  303. opacity: 1;
  304. /* 下拉菜单内容的最大高度 */
  305. }
  306. .show1 {
  307. height: 200px;
  308. /* 下拉菜单遮罩最大高度 */
  309. }
  310. .headers {
  311. background-color: rgba(199, 198, 202, 0.4);
  312. width: 100%;
  313. height: 0;
  314. position: absolute;
  315. z-index: 999;
  316. }
  317. .parent {
  318. position: relative;
  319. }
  320. .search-condition {
  321. padding: 0 16px;
  322. .title {
  323. font-size: 14px;
  324. color: #232832;
  325. font-weight: bold;
  326. border-bottom: 1px solid #E1E1E1;
  327. }
  328. .term {
  329. padding-top: 10px;
  330. >text {
  331. color: #232832;
  332. font-weight: bold;
  333. font-size: 13px;
  334. }
  335. }
  336. }
  337. .search {
  338. height: auto;
  339. width: 100%;
  340. z-index: 999999;
  341. padding: 16px;
  342. padding-top: 50px;
  343. height: auto;
  344. background: #F8FAFE;
  345. background-image: url("/static/image/addStaff/bfg.png");
  346. background-size: 100% 100%;
  347. text {
  348. font-size: 18px;
  349. font-weight: bold;
  350. color: #000;
  351. }
  352. image {
  353. width: 22px;
  354. height: 22px;
  355. margin-left: 20px;
  356. }
  357. }
  358. .slot-content1 {
  359. background-color: #FFFFFF;
  360. padding: 24rpx;
  361. }
  362. .title {
  363. font-weight: bold;
  364. color: #333;
  365. }
  366. .status-data {
  367. padding: 4px 10px;
  368. box-sizing: border-box;
  369. font-size: 12px;
  370. border: 1px solid #eee;
  371. cursor: pointer;
  372. }
  373. .active {
  374. position: relative;
  375. background: rgba(0, 82, 255, 0.1);
  376. color: #0052FF;
  377. border: 1px solid #0052FF;
  378. font-weight: 700;
  379. }
  380. .active::before {
  381. content: "";
  382. position: absolute;
  383. top: 0;
  384. left: 0;
  385. width: 10px;
  386. height: 10px;
  387. background-image: url("/static/image/car-insure/before.png");
  388. background-size: cover;
  389. }
  390. .orderItemPane {
  391. width: 100%;
  392. height: auto;
  393. margin: 10px 0;
  394. border-radius: 10px;
  395. background: #FFFFFF;
  396. box-shadow: 0px 4px 10px 0px #DAE3F4;
  397. border-radius: 12px;
  398. cursor: pointer;
  399. padding: 10px;
  400. }
  401. .orderItemPane-upper {
  402. padding-bottom: 8px;
  403. border-bottom: 1px solid #D4D0D0;
  404. }
  405. .orderItemPane .orderItemPane-centre,
  406. .inscommny-sum>text {
  407. color: rgba(51, 51, 51, 0.8);
  408. font-weight: 400;
  409. }
  410. .orderItemPane-centre text:first-child {
  411. font-weight: bold;
  412. color: #232832;
  413. }
  414. .orderItemPane-below {
  415. height: auto;
  416. &>button {
  417. margin-left: 10px;
  418. }
  419. }
  420. .orderItemPane-extend .extend-button>text {
  421. color: #ff9000;
  422. font-size: 12px;
  423. }
  424. .orderItemPane-extend {
  425. border-bottom-right-radius: 10px;
  426. border-bottom-left-radius: 10px;
  427. }
  428. .classes::before {
  429. content: "·";
  430. color: #ff9000;
  431. margin-right: 10px;
  432. }
  433. .flexd {
  434. position: fixed;
  435. left: 0;
  436. right: 0;
  437. }
  438. .moosize {
  439. font-size: 12px;
  440. color: rgba(51, 51, 51, 0.6);
  441. font-weight: 400;
  442. }
  443. .color {
  444. color: #ff9000;
  445. }
  446. .Paging {
  447. width: 100%;
  448. height: auto;
  449. background: #FFFFFF;
  450. box-shadow: 0px 4px 10px 0px #DAE3F4;
  451. border-radius: 6px;
  452. padding: 10px;
  453. box-sizing: border-box;
  454. margin-bottom: 10px;
  455. .pa-title {
  456. padding-bottom: 6px;
  457. border-bottom: 1px solid #f2f2f2;
  458. text {
  459. font-size: 14px;
  460. color: #333;
  461. font-weight: bold;
  462. margin-left: 6px;
  463. }
  464. image {
  465. width: 20px;
  466. height: 20px;
  467. }
  468. }
  469. .pa-cent {
  470. text {
  471. font-size: 13px;
  472. color: rgba(51, 51, 51, 0.8);
  473. font-weight: 400;
  474. }
  475. image {
  476. width: 20px;
  477. height: 20px;
  478. }
  479. }
  480. }
  481. /* 查询区域End */
  482. </style>