customer.vue 14 KB

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