customer.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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.querylist();
  210. },
  211. methods: {
  212. details(id) {
  213. uni.navigateTo({
  214. url: "/pages/tools/customer/custormerDetail?companyId=" + id
  215. })
  216. },
  217. async querylist() {
  218. let res = await this.$http.post('/insurance/order/getExpirationInsure', this.pageRequest);
  219. if (res.code == '200') {
  220. let data = res.data.records;
  221. this.insCompanyList.map(val => {
  222. data.map(ele => {
  223. if (ele.insCompany == val.name) {
  224. ele.iconImg = val.icon;
  225. }
  226. return ele;
  227. })
  228. })
  229. this.list = data;
  230. }
  231. },
  232. back() {
  233. uni.navigateBack({
  234. delta: 1, // 返回的页面数,如果是1表示返回上一页
  235. success: function() {}
  236. });
  237. },
  238. jqShowmethod() {
  239. this.jqendShow = true;
  240. },
  241. syShowmethod() {
  242. this.syendShow = true;
  243. },
  244. searchPopup() {
  245. this.showDropdown = !this.showDropdown;
  246. },
  247. //查询事件
  248. querysearch() {
  249. this.querylist();
  250. this.showDropdown = false;
  251. },
  252. //状态筛选
  253. statusclick(e) {
  254. this.pageRequest.orderStatus = e;
  255. },
  256. jqconfirm(e) {
  257. this.pageRequest.jqEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  258. .second;
  259. },
  260. syconfirm(e) {
  261. this.pageRequest.syEndDate = e.year + '-' + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ":" + e
  262. .second;
  263. },
  264. //当前时间
  265. transformTime(day) {
  266. var date = new Date();
  267. date.setFullYear(date.getFullYear());
  268. date.setTime(date.getTime());
  269. var strYear = date.getFullYear();
  270. var strDay = day ? date.getDate() - day : date.getDate();
  271. var strMonth = date.getMonth() + 1;
  272. if (strMonth < 10) {
  273. strMonth = "0" + strMonth;
  274. }
  275. if (strDay < 10) {
  276. strDay = "0" + strDay;
  277. }
  278. var datastr = strYear + "-" + strMonth + "-" + strDay + ' 00:00:00';
  279. return datastr;
  280. },
  281. //回车搜索事件
  282. search(val) {
  283. this.querylist();
  284. },
  285. //搜索按钮事件
  286. custom(val) {
  287. this.querylist();
  288. },
  289. //搜索框清除事件
  290. clear(val) {
  291. },
  292. }
  293. }
  294. </script>
  295. <style>
  296. page {
  297. background-color: #F8FAFE;
  298. }
  299. </style>
  300. <style lang="scss" scoped>
  301. @import '@/style/mixin.scss';
  302. /deep/ uni-tabbar .uni-tabbar-bottom {
  303. position: fixed;
  304. left: 0;
  305. right: 0;
  306. bottom: 0;
  307. }
  308. /deep/ .u-action[data-v-1a326067] {
  309. color: #FFFFFF;
  310. }
  311. /deep/ .u-dropdown__menu__item__arrow[data-v-01c0c507] uni-text {
  312. color: #FFFFFF !important;
  313. }
  314. .dropdown-content {
  315. background-color: rgba(0, 0, 0, 0.6);
  316. height: 0px;
  317. opacity: 0;
  318. transition: opacity 0.3s ease;
  319. .title {
  320. font-size: 14px;
  321. color: #232832;
  322. font-weight: bold;
  323. border-bottom: 1px solid #E1E1E1;
  324. }
  325. .term {
  326. padding-top: 10px;
  327. >text {
  328. color: #232832;
  329. font-weight: bold;
  330. font-size: 13px;
  331. }
  332. }
  333. .operateBtn {
  334. font-weight: bold;
  335. font-size: 16px;
  336. .cancel {
  337. width: 50%;
  338. height: 46px;
  339. color: #0052FF;
  340. background-color: #EAEAEA;
  341. }
  342. .confirm {
  343. width: 50%;
  344. height: 46px;
  345. color: #fff;
  346. background-color: #0052FF;
  347. }
  348. }
  349. }
  350. .dropdown-content1 {
  351. background-color: #fff;
  352. height: 0px;
  353. overflow: hidden;
  354. transition: height 0.4s ease;
  355. }
  356. .show {
  357. height: 100vh;
  358. opacity: 1;
  359. /* 下拉菜单内容的最大高度 */
  360. }
  361. .show1 {
  362. height: 200px;
  363. /* 下拉菜单遮罩最大高度 */
  364. }
  365. .headers {
  366. background-color: rgba(199, 198, 202, 0.4);
  367. width: 100%;
  368. height: 0;
  369. position: absolute;
  370. z-index: 999;
  371. }
  372. .parent {
  373. position: relative;
  374. }
  375. .search-condition {
  376. padding: 0 16px;
  377. .title {
  378. font-size: 14px;
  379. color: #232832;
  380. font-weight: bold;
  381. border-bottom: 1px solid #E1E1E1;
  382. }
  383. .term {
  384. padding-top: 10px;
  385. >text {
  386. color: #232832;
  387. font-weight: bold;
  388. font-size: 13px;
  389. }
  390. }
  391. }
  392. .search {
  393. height: auto;
  394. width: 100%;
  395. z-index: 999999;
  396. padding: 16px;
  397. padding-top: 50px;
  398. height: auto;
  399. background: #F8FAFE;
  400. background-image: url("/static/image/addStaff/bfg.png");
  401. background-size: 100% 100%;
  402. text {
  403. font-size: 18px;
  404. font-weight: bold;
  405. color: #000;
  406. }
  407. image {
  408. width: 22px;
  409. height: 22px;
  410. margin-left: 20px;
  411. }
  412. }
  413. .slot-content1 {
  414. background-color: #FFFFFF;
  415. padding: 24rpx;
  416. }
  417. .title {
  418. font-weight: bold;
  419. color: #333;
  420. }
  421. .status-data {
  422. padding: 4px 10px;
  423. box-sizing: border-box;
  424. font-size: 12px;
  425. border: 1px solid #eee;
  426. cursor: pointer;
  427. }
  428. .active {
  429. position: relative;
  430. background: rgba(0, 82, 255, 0.1);
  431. color: #0052FF;
  432. border: 1px solid #0052FF;
  433. font-weight: 700;
  434. }
  435. .active::before {
  436. content: "";
  437. position: absolute;
  438. top: 0;
  439. left: 0;
  440. width: 10px;
  441. height: 10px;
  442. background-image: url("/static/image/car-insure/before.png");
  443. background-size: cover;
  444. }
  445. .orderItemPane {
  446. width: 100%;
  447. height: auto;
  448. margin: 10px 0;
  449. border-radius: 10px;
  450. background: #FFFFFF;
  451. box-shadow: 0px 4px 10px 0px #DAE3F4;
  452. border-radius: 12px;
  453. cursor: pointer;
  454. padding: 10px;
  455. }
  456. .orderItemPane-upper {
  457. padding-bottom: 8px;
  458. border-bottom: 1px solid #D4D0D0;
  459. }
  460. .orderItemPane .orderItemPane-centre,
  461. .inscommny-sum>text {
  462. color: rgba(51, 51, 51, 0.8);
  463. font-weight: 400;
  464. }
  465. .orderItemPane-centre text:first-child {
  466. font-weight: bold;
  467. color: #232832;
  468. }
  469. .orderItemPane-below {
  470. height: auto;
  471. &>button {
  472. margin-left: 10px;
  473. }
  474. }
  475. .orderItemPane-extend .extend-button>text {
  476. color: #ff9000;
  477. font-size: 12px;
  478. }
  479. .orderItemPane-extend {
  480. border-bottom-right-radius: 10px;
  481. border-bottom-left-radius: 10px;
  482. }
  483. .classes::before {
  484. content: "·";
  485. color: #ff9000;
  486. margin-right: 10px;
  487. }
  488. .flexd {
  489. position: fixed;
  490. left: 0;
  491. right: 0;
  492. }
  493. .moosize {
  494. font-size: 12px;
  495. color: rgba(51, 51, 51, 0.6);
  496. font-weight: 400;
  497. }
  498. .color {
  499. color: #ff9000;
  500. }
  501. .Paging {
  502. width: 100%;
  503. height: auto;
  504. background: #FFFFFF;
  505. box-shadow: 0px 4px 10px 0px #DAE3F4;
  506. border-radius: 6px;
  507. padding: 10px;
  508. box-sizing: border-box;
  509. margin-bottom: 10px;
  510. .pa-title {
  511. padding-bottom: 6px;
  512. border-bottom: 1px solid #f2f2f2;
  513. text {
  514. font-size: 14px;
  515. color: #333;
  516. font-weight: bold;
  517. margin-left: 6px;
  518. }
  519. image {
  520. width: 20px;
  521. height: 20px;
  522. }
  523. }
  524. .pa-cent {
  525. text {
  526. font-size: 13px;
  527. color: rgba(51, 51, 51, 0.8);
  528. font-weight: 400;
  529. }
  530. image {
  531. width: 20px;
  532. height: 20px;
  533. }
  534. }
  535. }
  536. /* 查询区域End */
  537. </style>