customer.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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. insCompanyList: [{
  93. name: "中煤财险",
  94. icon: "../../../static/insuranceicon/zhongmei.png"
  95. }, //华农
  96. {
  97. name: "恒邦财险",
  98. icon: "../../../static/insuranceicon/hengbang.png"
  99. },
  100. {
  101. name: "安盛天平",
  102. icon: "../../../static/insuranceicon/ansheng.png"
  103. },
  104. {
  105. name: "中国人寿",
  106. icon: "../../../static/insuranceicon/renshou.png"
  107. },
  108. {
  109. name: "众安财险",
  110. icon: "../../../static/insuranceicon/zhongan.png"
  111. },
  112. {
  113. name: "永诚财险",
  114. icon: "../../../static/insuranceicon/yongcheng.png"
  115. },
  116. {
  117. name: "永安财险",
  118. icon: "../../../static/insuranceicon/yongan.png"
  119. },
  120. {
  121. name: "紫金财险",
  122. icon: "../../../static/insuranceicon/zijin.png"
  123. },
  124. {
  125. name: "国任财险",
  126. icon: "../../../static/insuranceicon/guoren.png"
  127. },
  128. {
  129. name: "华泰财险",
  130. icon: "../../../static/insuranceicon/huatai.png"
  131. },
  132. {
  133. name: "大家财险",
  134. icon: "../../../static/insuranceicon/dajia.png"
  135. },
  136. {
  137. name: "太平财险",
  138. icon: "../../../static/insuranceicon/taiping.png"
  139. },
  140. {
  141. name: "华农财险",
  142. icon: "../../../static/insuranceicon/huanong.png"
  143. },
  144. {
  145. name: "渤海财险",
  146. icon: "../../../static/insuranceicon/bohai.png"
  147. },
  148. ],
  149. show: true,
  150. showDropdown: false,
  151. /* 时间筛选相关 */
  152. jqendShow: false,
  153. syendShow: false,
  154. endShow: false,
  155. params: {
  156. year: true, //年
  157. month: true, //月
  158. day: true, //日
  159. hour: true,
  160. minute: true,
  161. second: true,
  162. },
  163. /* 时间筛选相关 */
  164. pageRequest: { //查询的默认条件
  165. jqEndDate: "",
  166. syEndDate: "",
  167. userId: "",
  168. param: "",
  169. pageNum: 1,
  170. pageSize: 20,
  171. },
  172. pageResult: [], //列表数据
  173. /* 搜索框配置 */
  174. shape: 'square',
  175. clearabled: true,
  176. showAction: false,
  177. inputAlign: 'left',
  178. /* 搜索框配置 */
  179. toTopFlag: false, //显示回到顶部按钮
  180. queryLicenseNo: "",
  181. queryFrameNo: "",
  182. insureMore: false,
  183. insureMoreIndex: null,
  184. esmInsCompanyList: [],
  185. list: [],
  186. }
  187. },
  188. computed: {
  189. ...mapState(['userInfo', 'typeIndex', 'stageIndex'])
  190. },
  191. // 页面触底加载
  192. onReachBottom() {
  193. this.currentPage = this.currentPage + 1;
  194. if (this.totalPages >= this.currentPage) {} else {
  195. return false;
  196. }
  197. },
  198. // 页面滚动触发
  199. onPageScroll(e) { //根据距离顶部距离是否显示回到顶部按钮
  200. if (e.scrollTop > 600) { //当距离大于600时显示回到顶部按钮
  201. this.toTopFlag = true
  202. } else { //当距离小于600时显示回到顶部按钮
  203. this.toTopFlag = false
  204. }
  205. },
  206. onShow() {},
  207. async onLoad(e) {
  208. this.pageRequest.userId = this.userInfo.sysUser.id;
  209. this.pageRequest.jqEndDate = this.transformTime();
  210. this.pageRequest.syEndDate = this.transformTime();
  211. this.querylist();
  212. },
  213. methods: {
  214. details(id) {
  215. uni.navigateTo({
  216. url: "/pages/tools/customer/custormerDetail?companyId=" + id
  217. })
  218. },
  219. async querylist() {
  220. let res = await this.$http.post('/insurance/order/getExpirationInsure', this.pageRequest);
  221. if (res.code == '200') {
  222. let data = res.data.records;
  223. this.insCompanyList.map(val => {
  224. data.map(ele => {
  225. if (ele.insCompany == val.name) {
  226. ele.iconImg = val.icon;
  227. }
  228. return ele;
  229. })
  230. })
  231. this.list = data;
  232. }
  233. },
  234. back() {
  235. uni.navigateBack({
  236. delta: 1, // 返回的页面数,如果是1表示返回上一页
  237. success: function() {}
  238. });
  239. },
  240. jqShowmethod() {
  241. this.jqendShow = true;
  242. },
  243. syShowmethod() {
  244. this.syendShow = true;
  245. },
  246. searchPopup() {
  247. this.showDropdown = !this.showDropdown;
  248. },
  249. //查询事件
  250. querysearch() {
  251. this.querylist();
  252. this.showDropdown = false;
  253. },
  254. //状态筛选
  255. statusclick(e) {
  256. this.pageRequest.orderStatus = e;
  257. },
  258. jqconfirm(e) {
  259. this.pageRequest.jqEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  260. .second;
  261. },
  262. syconfirm(e) {
  263. this.pageRequest.syEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  264. .second;
  265. },
  266. //当前时间
  267. transformTime(day) {
  268. var date = new Date();
  269. date.setFullYear(date.getFullYear());
  270. date.setTime(date.getTime());
  271. var strYear = date.getFullYear();
  272. var strDay = day ? date.getDate() - day : date.getDate();
  273. var strMonth = date.getMonth() + 1;
  274. if (strMonth < 10) {
  275. strMonth = "0" + strMonth;
  276. }
  277. if (strDay < 10) {
  278. strDay = "0" + strDay;
  279. }
  280. var datastr = strYear + "-" + strMonth + "-" + strDay + ' 00:00:00';
  281. return datastr;
  282. },
  283. //回车搜索事件
  284. search(val) {
  285. this.querylist();
  286. },
  287. //搜索按钮事件
  288. custom(val) {
  289. this.querylist();
  290. },
  291. //搜索框清除事件
  292. clear(val) {
  293. },
  294. }
  295. }
  296. </script>
  297. <style>
  298. page {
  299. background-color: #F8FAFE;
  300. }
  301. </style>
  302. <style lang="scss" scoped>
  303. @import '@/style/mixin.scss';
  304. /deep/ uni-tabbar .uni-tabbar-bottom {
  305. position: fixed;
  306. left: 0;
  307. right: 0;
  308. bottom: 0;
  309. }
  310. /deep/ .u-action[data-v-1a326067] {
  311. color: #FFFFFF;
  312. }
  313. /deep/ .u-dropdown__menu__item__arrow[data-v-01c0c507] uni-text {
  314. color: #FFFFFF !important;
  315. }
  316. .dropdown-content {
  317. background-color: rgba(0, 0, 0, 0.6);
  318. height: 0px;
  319. opacity: 0;
  320. transition: opacity 0.3s ease;
  321. .title {
  322. font-size: 14px;
  323. color: #232832;
  324. font-weight: bold;
  325. border-bottom: 1px solid #E1E1E1;
  326. }
  327. .term {
  328. padding-top: 10px;
  329. >text {
  330. color: #232832;
  331. font-weight: bold;
  332. font-size: 13px;
  333. }
  334. }
  335. .operateBtn {
  336. font-weight: bold;
  337. font-size: 16px;
  338. .cancel {
  339. width: 50%;
  340. height: 46px;
  341. color: #0052FF;
  342. background-color: #EAEAEA;
  343. }
  344. .confirm {
  345. width: 50%;
  346. height: 46px;
  347. color: #fff;
  348. background-color: #0052FF;
  349. }
  350. }
  351. }
  352. .dropdown-content1 {
  353. background-color: #fff;
  354. height: 0px;
  355. overflow: hidden;
  356. transition: height 0.4s ease;
  357. }
  358. .show {
  359. height: 100vh;
  360. opacity: 1;
  361. /* 下拉菜单内容的最大高度 */
  362. }
  363. .show1 {
  364. height: 200px;
  365. /* 下拉菜单遮罩最大高度 */
  366. }
  367. .headers {
  368. background-color: rgba(199, 198, 202, 0.4);
  369. width: 100%;
  370. height: 0;
  371. position: absolute;
  372. z-index: 999;
  373. }
  374. .parent {
  375. position: relative;
  376. }
  377. .search-condition {
  378. padding: 0 16px;
  379. .title {
  380. font-size: 14px;
  381. color: #232832;
  382. font-weight: bold;
  383. border-bottom: 1px solid #E1E1E1;
  384. }
  385. .term {
  386. padding-top: 10px;
  387. >text {
  388. color: #232832;
  389. font-weight: bold;
  390. font-size: 13px;
  391. }
  392. }
  393. }
  394. .search {
  395. height: auto;
  396. width: 100%;
  397. z-index: 999999;
  398. padding: 16px;
  399. padding-top: 50px;
  400. height: auto;
  401. background: #F8FAFE;
  402. background-image: url("/static/image/addStaff/bfg.png");
  403. background-size: 100% 100%;
  404. text {
  405. font-size: 18px;
  406. font-weight: bold;
  407. color: #000;
  408. }
  409. image {
  410. width: 22px;
  411. height: 22px;
  412. margin-left: 20px;
  413. }
  414. }
  415. .slot-content1 {
  416. background-color: #FFFFFF;
  417. padding: 24rpx;
  418. }
  419. .title {
  420. font-weight: bold;
  421. color: #333;
  422. }
  423. .status-data {
  424. padding: 4px 10px;
  425. box-sizing: border-box;
  426. font-size: 12px;
  427. border: 1px solid #eee;
  428. cursor: pointer;
  429. }
  430. .active {
  431. position: relative;
  432. background: rgba(0, 82, 255, 0.1);
  433. color: #0052FF;
  434. border: 1px solid #0052FF;
  435. font-weight: 700;
  436. }
  437. .active::before {
  438. content: "";
  439. position: absolute;
  440. top: 0;
  441. left: 0;
  442. width: 10px;
  443. height: 10px;
  444. background-image: url("/static/image/car-insure/before.png");
  445. background-size: cover;
  446. }
  447. .orderItemPane {
  448. width: 100%;
  449. height: auto;
  450. margin: 10px 0;
  451. border-radius: 10px;
  452. background: #FFFFFF;
  453. box-shadow: 0px 4px 10px 0px #DAE3F4;
  454. border-radius: 12px;
  455. cursor: pointer;
  456. padding: 10px;
  457. }
  458. .orderItemPane-upper {
  459. padding-bottom: 8px;
  460. border-bottom: 1px solid #D4D0D0;
  461. }
  462. .orderItemPane .orderItemPane-centre,
  463. .inscommny-sum>text {
  464. color: rgba(51, 51, 51, 0.8);
  465. font-weight: 400;
  466. }
  467. .orderItemPane-centre text:first-child {
  468. font-weight: bold;
  469. color: #232832;
  470. }
  471. .orderItemPane-below {
  472. height: auto;
  473. &>button {
  474. margin-left: 10px;
  475. }
  476. }
  477. .orderItemPane-extend .extend-button>text {
  478. color: #ff9000;
  479. font-size: 12px;
  480. }
  481. .orderItemPane-extend {
  482. border-bottom-right-radius: 10px;
  483. border-bottom-left-radius: 10px;
  484. }
  485. .classes::before {
  486. content: "·";
  487. color: #ff9000;
  488. margin-right: 10px;
  489. }
  490. .flexd {
  491. position: fixed;
  492. left: 0;
  493. right: 0;
  494. }
  495. .moosize {
  496. font-size: 12px;
  497. color: rgba(51, 51, 51, 0.6);
  498. font-weight: 400;
  499. }
  500. .color {
  501. color: #ff9000;
  502. }
  503. .Paging {
  504. width: 100%;
  505. height: auto;
  506. background: #FFFFFF;
  507. box-shadow: 0px 4px 10px 0px #DAE3F4;
  508. border-radius: 6px;
  509. padding: 10px;
  510. box-sizing: border-box;
  511. margin-bottom: 10px;
  512. .pa-title {
  513. padding-bottom: 6px;
  514. border-bottom: 1px solid #f2f2f2;
  515. text {
  516. font-size: 14px;
  517. color: #333;
  518. font-weight: bold;
  519. margin-left: 6px;
  520. }
  521. image {
  522. width: 20px;
  523. height: 20px;
  524. }
  525. }
  526. .pa-cent {
  527. text {
  528. font-size: 13px;
  529. color: rgba(51, 51, 51, 0.8);
  530. font-weight: 400;
  531. }
  532. image {
  533. width: 20px;
  534. height: 20px;
  535. }
  536. }
  537. }
  538. /* 查询区域End */
  539. </style>