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