policy.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  1. <template>
  2. <view class="parent">
  3. <!-- 查询区域Start -->
  4. <view>
  5. <view class=" flexd " style="z-index: 99;">
  6. <view class="search dis a-c j-s" style="background: linear-gradient( 90deg, #0052FF 0%, #6697FF 100%);">
  7. <u-search v-model="pageRequest.licenseNo" @custom="custom" @search="search" :shape="shape"
  8. :height='68' bg-color="rgba(255,255,255,0.5)" color="#fff"
  9. :input-style="{background:'transparent'}" placeholder-color="#fff" :clearabled="clearabled"
  10. :show-action="showAction" :input-align="inputAlign" @clear="clear"
  11. :action-style="{background:'#fff'}" placeholder="请输入车牌号"></u-search>
  12. <image src="/static/image/car-insure/dropdown.png" mode="" @tap="searchPopup"></image>
  13. </view>
  14. <view :class="['dropdown-content', { 'show': showDropdown }]" @tap="searchPopup">
  15. <view :class="['dropdown-content1','dis','f-c','j-s', { 'show1': showDropdown }]" @tap.stop.prevent>
  16. <view style="padding: 0 16px; box-sizing: border-box;">
  17. <!-- <view class="term">
  18. <text>订单状态</text>
  19. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  20. <view class="status-data" :class="item.value==pageRequest.orderStatus? 'active':''"
  21. v-for="(item,index) in statusList" @tap.stop.prevent="statusclick(index)"
  22. :key="index">
  23. {{item.label}}
  24. </view>
  25. </view>
  26. </view> -->
  27. <view class="term">
  28. <text>保险公司</text>
  29. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  30. <view class="status-data" :class="item.id==pageRequest.companyId? 'active':''"
  31. v-for="(item,index) in esmInsCompanyList" @tap="companystatusclick(item.id)"
  32. :key="index">
  33. {{item.namesimple}}
  34. </view>
  35. </view>
  36. </view>
  37. <view class="term">
  38. <text>订单日期</text>
  39. <view class="dis a-c f-wrap j-s" style="margin-top: 10px;">
  40. <view class="status-data" :class="item.value==timespecifications? 'active':''"
  41. v-for="(item,index) in dateList" @tap="dateclick(index)" :key="index">
  42. {{item.label}}
  43. </view>
  44. <view class="dis a-c">
  45. <view class="status-data" :class="startShow? 'active' :''"
  46. @tap="startShowmethod()">
  47. <text v-if="pageRequest.startDate!=''">{{pageRequest.startDate}}</text>
  48. <text v-else>{{transformTime()}}</text>
  49. </view>
  50. <text style="margin: 0 8px;font-size: 12px;">至</text>
  51. <view class="status-data" :class="endShow? 'active' :''" @tap="endShowmethod()">
  52. <text v-if="pageRequest.endDate!=''">{{pageRequest.endDate}}</text>
  53. <text v-else>{{transformTime()}}</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="operateBtn dis ">
  60. <view class="cancel dis a-c j-c" @click="showDropdown=false">
  61. 取消
  62. </view>
  63. <view class="confirm dis a-c j-c" @click="querysearch">
  64. 确定
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view style="padding: 110px 16px 50px 16px;">
  72. <view class=" orderItemPane" v-for="(item,index) in pageResult" :key="index" @click="querydetail(item)">
  73. <view class="orderItemPane-upper dis j-s a-c ">
  74. <view v-for="(statusitem, statusindex) in statusList" :key="statusindex" class="dis a-c"
  75. style="font-weight: bold;" v-if="item.orderstatus == statusitem.value">
  76. <image :src="statusitem.src" mode="" style="width: 22px;height: 22px;margin-right: 5px;">
  77. </image>
  78. <text :style="{color: statusitem.color}">{{statusitem.label}}</text>
  79. </view>
  80. <text class="upper-time moosize">{{item.createtime}}</text>
  81. </view>
  82. <view class="orderItemPane-centre ">
  83. <view class="dis f-c">
  84. <view class="dis a-c j-s " style="padding:4px 0;">
  85. <text>{{item.licenseno}}</text>
  86. <u-icon name="arrow-right" size="14px"
  87. style="margin-left: 5px;color: #C7C6CA;"></u-icon></text>
  88. </view>
  89. <text>订单号:{{item.orderno}}</text>
  90. <text>业务员:{{item.username}}({{item.userid}})</text>
  91. <text>被保人:{{item.insureinfo.name}}</text>
  92. <text>投保险种:{{item.product}}</text>
  93. <text v-if="item.orderstatus=='3'">承保公司:{{item.insCompany}}</text>
  94. </view>
  95. </view>
  96. <view class="orderItemPane-below dis a-c j-end ">
  97. <u-button v-if="item.orderstatus!='3'" :custom-style="{fontSize:'15px'}" type="warning" size="mini"
  98. :hair-line="false" :plain="true" @click="CloseEdit(item.orderno)">编辑</u-button>
  99. </view>
  100. </view>
  101. </view>
  102. <o-empty v-if="pageResult.length==0" />
  103. <!-- 回到顶部 -->
  104. <u-picker v-model="startShow" mode="time" :params="params" @confirm="startconfirm"></u-picker>
  105. <u-picker v-model="endShow" mode="time" :params="params" @confirm="endconfirm"></u-picker>
  106. </view>
  107. </template>
  108. <script>
  109. import {
  110. mapState,
  111. mapMutations
  112. } from "vuex"
  113. // import carOrders from "@/components/modules/orders/carOrders.vue";
  114. import {
  115. watch
  116. } from "vue";
  117. export default {
  118. components: {},
  119. watch: {
  120. stageIndex(newVal, oldVal) {
  121. if (newVal !== oldVal) {
  122. this.pageRequest.orderStatus = newVal;
  123. }
  124. }
  125. },
  126. data() {
  127. return {
  128. show: true,
  129. showDropdown: false,
  130. /* 时间筛选相关 */
  131. startShow: false,
  132. endShow: false,
  133. params: {
  134. year: true, //年
  135. month: true, //月
  136. day: true, //日
  137. },
  138. /* 时间筛选相关 */
  139. pageRequest: { //查询的默认条件
  140. companyId: "",
  141. orderNo: "",
  142. frameNo: "",
  143. insuredName: "",
  144. licenseNo: "",
  145. orderStatus: "3",
  146. userId: "",
  147. deptId: "",
  148. endDate: "",
  149. startDate: "",
  150. pageNum: 1,
  151. pageSize: 20,
  152. },
  153. timespecifications: null,
  154. pageResult: [], //列表数据
  155. /* 搜索框配置 */
  156. shape: 'square',
  157. clearabled: true,
  158. showAction: false,
  159. inputAlign: 'left',
  160. /* 搜索框配置 */
  161. //状态筛选list
  162. statusList: [{
  163. label: '报价中',
  164. value: 0,
  165. color: "#229805",
  166. src: "/static/image/car-insure/state1.png"
  167. },
  168. {
  169. label: '待核保',
  170. value: 1,
  171. color: "#FF5600",
  172. src: "/static/image/car-insure/state2.png"
  173. },
  174. {
  175. label: '已核保待缴费',
  176. value: 2,
  177. color: "#FF0F00",
  178. src: "/static/image/car-insure/state3.png"
  179. },
  180. {
  181. label: '已承保',
  182. value: 3,
  183. color: "#0052FF",
  184. src: "/static/image/car-insure/state4.png"
  185. },
  186. {
  187. label: '核保退回',
  188. value: 4,
  189. color: "#727272",
  190. src: "/static/image/car-insure/state5.png"
  191. }
  192. ],
  193. //日期筛选list
  194. dateList: [{
  195. label: '全部',
  196. value: 0,
  197. },
  198. {
  199. label: '一周内',
  200. value: 1,
  201. },
  202. {
  203. label: '一个月内',
  204. value: 2,
  205. },
  206. {
  207. label: '三个月内',
  208. value: 3,
  209. },
  210. {
  211. label: '六个月内',
  212. value: 4,
  213. },
  214. ],
  215. typeArray: [{
  216. label: '车险',
  217. value: 0,
  218. },
  219. {
  220. label: '意外险',
  221. value: 1,
  222. },
  223. {
  224. label: '寿险',
  225. value: 2,
  226. }
  227. ], //订单的类型
  228. toTopFlag: false, //显示回到顶部按钮
  229. queryLicenseNo: "",
  230. queryFrameNo: "",
  231. insureMore: false,
  232. insureMoreIndex: null,
  233. esmInsCompanyList: [],
  234. }
  235. },
  236. computed: {
  237. ...mapState(['userInfo', 'typeIndex', 'stageIndex'])
  238. },
  239. // 页面触底加载
  240. onReachBottom() {
  241. this.currentPage = this.currentPage + 1;
  242. if (this.totalPages >= this.currentPage) {} else {
  243. return false;
  244. }
  245. },
  246. // 页面滚动触发
  247. onPageScroll(e) { //根据距离顶部距离是否显示回到顶部按钮
  248. if (e.scrollTop > 600) { //当距离大于600时显示回到顶部按钮
  249. this.toTopFlag = true
  250. } else { //当距离小于600时显示回到顶部按钮
  251. this.toTopFlag = false
  252. }
  253. },
  254. onShow() {
  255. const arr = uni.getStorageSync('historyInfo');
  256. if (arr) {
  257. uni.removeStorageSync('historyInfo');
  258. }
  259. this.getOrdersList()
  260. this.esmInsCompany()
  261. },
  262. async onLoad(e) {
  263. this.pageRequest.userId = this.userInfo.sysUser.id;
  264. this.pageRequest.deptId = this.userInfo.sysUser.deptId;
  265. this.getOrdersList()
  266. },
  267. methods: {
  268. ...mapMutations(['setOrderType', 'setOrderStage']),
  269. async getOrdersList() {
  270. let res = await this.$http.post('/insurance/order/queryPageOrder', this.pageRequest);
  271. if (res.code == '200') {
  272. this.pageResult = res.data.content;
  273. }
  274. },
  275. async esmInsCompany() {
  276. let commpanykad = await this.$http.get('/insurance/order/getAgreementInsCompany');
  277. if (commpanykad.code == '200') {
  278. this.esmInsCompanyList = commpanykad.data;
  279. }
  280. },
  281. searchPopup() {
  282. this.showDropdown = !this.showDropdown;
  283. },
  284. //展开
  285. selectMore(val) {
  286. this.insureMore = true;
  287. this.insureMoreIndex = val;
  288. },
  289. packup(val) {
  290. this.insureMore = false;
  291. this.insureMoreIndex = val;
  292. },
  293. //查询事件
  294. querysearch() {
  295. this.getOrdersList();
  296. this.showDropdown = false;
  297. },
  298. //状态筛选
  299. statusclick(e) {
  300. this.pageRequest.orderStatus = e;
  301. },
  302. //保险公司筛选
  303. companystatusclick(e) {
  304. this.pageRequest.companyId = e;
  305. },
  306. startShowmethod() {
  307. this.startShow = true;
  308. this.timespecifications = null;
  309. },
  310. endShowmethod() {
  311. this.endShow = true;
  312. this.timespecifications = null;
  313. },
  314. //日期筛选
  315. dateclick(e) {
  316. /* 0:全部 1:一周内 2:一个月内 3:三个月内 4:六个月内*/
  317. switch (e) {
  318. case 0:
  319. this.pageRequest.startDate = "";
  320. this.pageRequest.endDate = "";
  321. break;
  322. case 1:
  323. this.pageRequest.startDate = this.transformTime(7);
  324. this.pageRequest.endDate = this.transformTime();
  325. break;
  326. case 2:
  327. this.pageRequest.startDate = this.transformTime1(1);
  328. this.pageRequest.endDate = this.transformTime();
  329. break;
  330. case 3:
  331. this.pageRequest.startDate = this.transformTime1(3);
  332. this.pageRequest.endDate = this.transformTime();
  333. break;
  334. case 4:
  335. this.pageRequest.startDate = this.transformTime1(6);
  336. this.pageRequest.endDate = this.transformTime();
  337. break;
  338. default:
  339. }
  340. this.timespecifications = e;
  341. },
  342. startconfirm(e) {
  343. this.pageRequest.startDate = e.year + '-' + e.month + '-' + e.day;
  344. },
  345. endconfirm(e) {
  346. this.pageRequest.endDate = e.year + '-' + e.month + '-' + e.day;
  347. },
  348. //验证车架号
  349. isFrameno(str) {
  350. let mPattern = /^([0-9A-Z]){17}$/;
  351. return mPattern.test(str);
  352. },
  353. isCarBrand(str) {
  354. let mPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}([A-Z0-9挂学警港澳使领]{1}|应急)$/ ||
  355. /^沪[0-9A-Z]{5}$/ || /^陆丰[0-9A-Z]{4}临$/;
  356. return mPattern.test(str.trim())
  357. // return /^陆丰[0-9A-Z]{4}临$/.test(str.trim())
  358. },
  359. //查看子订单
  360. async querydetail(val) {
  361. let params = {
  362. orderno: val.orderno,
  363. insuredname: val.insuredname,
  364. licenseno: val.licenseno,
  365. modelcname: val.carinfo.modelcname,
  366. }
  367. uni.navigateTo({
  368. url: `/pages/tools/policy/subOrders?orderno=${JSON.stringify(params)}`
  369. })
  370. },
  371. //报价历史
  372. quotehistory(val) {
  373. let params = {
  374. orderno: val.orderno,
  375. insuredname: val.insuredname,
  376. licenseno: val.licenseno,
  377. modelcname: val.carinfo.modelcname,
  378. }
  379. uni.navigateTo({
  380. url: `/pages/orders1/quoteHistory?orderno=${JSON.stringify(params)}`
  381. })
  382. },
  383. //编辑
  384. CloseEdit(val) {
  385. uni.navigateTo({
  386. url: "/pages/carInsure2/quote?orderno=" + val
  387. })
  388. // this.navigate({
  389. // url: '/pages/carInsure1/quote1',
  390. // success: (res) => {
  391. // res.eventChannel.emit("acceptData", {
  392. // carInfo: val.carinfo, //车辆信息
  393. // ownerInfo: val.ownerinfo, //车主信息
  394. // policyHolderInfo: val.applyinfo, //
  395. // insuredPersonInfo: val.insureinfo,
  396. // riskList: val.risk,
  397. // kindList: val.king,
  398. // orderno: val.orderno, //车辆
  399. // quoteno: val.quoteno, //车主
  400. // vehicleAndVesselTaxForm: val.vehicleAndVesselTax, //车船税
  401. // })
  402. // }
  403. // }, "navigateTo", true);
  404. },
  405. //回车搜索事件
  406. search(val) {
  407. this.getOrdersList();
  408. },
  409. //搜索按钮事件
  410. custom(val) {
  411. this.getOrdersList();
  412. },
  413. //搜索框清除事件
  414. clear(val) {
  415. },
  416. //关闭订单后查询
  417. closeOrders() {
  418. this.totalSize = 0;
  419. this.ordersList = []; //获取到的订单列表
  420. this.currentPage = 1; //当前的页数
  421. this.totalPages = 1; //总共的页数
  422. },
  423. //当前时间
  424. transformTime(day) {
  425. var date = new Date();
  426. date.setFullYear(date.getFullYear());
  427. date.setTime(date.getTime());
  428. var strYear = date.getFullYear();
  429. var strDay = day ? date.getDate() - day : date.getDate();
  430. var strMonth = date.getMonth() + 1;
  431. if (strMonth < 10) {
  432. strMonth = "0" + strMonth;
  433. }
  434. if (strDay < 10) {
  435. strDay = "0" + strDay;
  436. }
  437. var datastr = strYear + "-" + strMonth + "-" + strDay;
  438. return datastr;
  439. },
  440. transformTime1(month) {
  441. var date = new Date();
  442. date.setFullYear(date.getFullYear());
  443. date.setTime(date.getTime());
  444. var strYear = date.getFullYear();
  445. var strDay = date.getDate();
  446. var strMonth = month ? (date.getMonth() + 1) - month : date.getMonth() + 1;
  447. if (strMonth < 10) {
  448. strMonth = "0" + strMonth;
  449. }
  450. if (strDay < 10) {
  451. strDay = "0" + strDay;
  452. }
  453. var datastr = strYear + "-" + strMonth + "-" + strDay;
  454. return datastr;
  455. },
  456. }
  457. }
  458. </script>
  459. <style>
  460. page {
  461. background-color: #F8FAFE;
  462. }
  463. </style>
  464. <style lang="scss" scoped>
  465. @import '@/style/mixin.scss';
  466. /deep/ uni-tabbar .uni-tabbar-bottom {
  467. position: fixed;
  468. left: 0;
  469. right: 0;
  470. bottom: 0;
  471. }
  472. /deep/ .u-action[data-v-1a326067] {
  473. color: #FFFFFF;
  474. }
  475. /deep/ .u-dropdown__menu__item__arrow[data-v-01c0c507] uni-text {
  476. color: #FFFFFF !important;
  477. }
  478. .dropdown-content {
  479. background-color: rgba(0, 0, 0, 0.6);
  480. height: 0px;
  481. opacity: 0;
  482. transition: opacity 0.3s ease;
  483. .title {
  484. font-size: 14px;
  485. color: #232832;
  486. font-weight: bold;
  487. border-bottom: 1px solid #E1E1E1;
  488. }
  489. .term {
  490. padding-top: 10px;
  491. >text {
  492. color: #232832;
  493. font-weight: bold;
  494. font-size: 13px;
  495. }
  496. }
  497. .operateBtn {
  498. font-weight: bold;
  499. font-size: 16px;
  500. .cancel {
  501. width: 50%;
  502. height: 46px;
  503. color: #0052FF;
  504. background-color: #EAEAEA;
  505. }
  506. .confirm {
  507. width: 50%;
  508. height: 46px;
  509. color: #fff;
  510. background-color: #0052FF;
  511. }
  512. }
  513. }
  514. .dropdown-content1 {
  515. background-color: #fff;
  516. height: 0px;
  517. overflow: hidden;
  518. transition: height 0.4s ease;
  519. }
  520. .show {
  521. height: 100vh;
  522. opacity: 1;
  523. /* 下拉菜单内容的最大高度 */
  524. }
  525. .show1 {
  526. height: 430px;
  527. /* 下拉菜单遮罩最大高度 */
  528. }
  529. .headers {
  530. background-color: rgba(199, 198, 202, 0.4);
  531. width: 100%;
  532. height: 0;
  533. position: absolute;
  534. z-index: 999;
  535. }
  536. .parent {
  537. position: relative;
  538. }
  539. .search-condition {
  540. padding: 0 16px;
  541. .title {
  542. font-size: 14px;
  543. color: #232832;
  544. font-weight: bold;
  545. border-bottom: 1px solid #E1E1E1;
  546. }
  547. .term {
  548. padding-top: 10px;
  549. >text {
  550. color: #232832;
  551. font-weight: bold;
  552. font-size: 13px;
  553. }
  554. }
  555. }
  556. .search {
  557. padding: 13px 16px;
  558. image {
  559. width: 22px;
  560. height: 22px;
  561. margin-left: 20px;
  562. }
  563. }
  564. .slot-content1 {
  565. background-color: #FFFFFF;
  566. padding: 24rpx;
  567. }
  568. .title {
  569. font-weight: bold;
  570. color: #333;
  571. }
  572. .status-data {
  573. padding: 4px 10px;
  574. box-sizing: border-box;
  575. margin: 0 4px 4px 0;
  576. font-size: 12px;
  577. border: 1px solid #eee;
  578. cursor: pointer;
  579. }
  580. .active {
  581. position: relative;
  582. background: rgba(0, 82, 255, 0.1);
  583. color: #0052FF;
  584. border: 1px solid #0052FF;
  585. font-weight: 700;
  586. }
  587. .active::before {
  588. content: "";
  589. position: absolute;
  590. top: 0;
  591. left: 0;
  592. width: 10px;
  593. height: 10px;
  594. background-image: url("/static/image/car-insure/before.png");
  595. background-size: cover;
  596. }
  597. .orderItemPane {
  598. width: 100%;
  599. height: auto;
  600. margin: 10px 0;
  601. border-radius: 10px;
  602. background: #FFFFFF;
  603. box-shadow: 0px 4px 10px 0px #DAE3F4;
  604. border-radius: 12px;
  605. cursor: pointer;
  606. padding: 10px;
  607. }
  608. .orderItemPane-upper {
  609. padding-bottom: 8px;
  610. border-bottom: 1px solid #D4D0D0;
  611. }
  612. .orderItemPane .orderItemPane-centre,
  613. .inscommny-sum>text {
  614. color: rgba(51, 51, 51, 0.8);
  615. font-weight: 400;
  616. }
  617. .orderItemPane-centre text:first-child {
  618. font-weight: bold;
  619. color: #232832;
  620. }
  621. .orderItemPane-below {
  622. height: auto;
  623. &>button {
  624. margin-left: 10px;
  625. }
  626. }
  627. .orderItemPane-extend .extend-button>text {
  628. color: #ff9000;
  629. font-size: 12px;
  630. }
  631. .orderItemPane-extend {
  632. border-bottom-right-radius: 10px;
  633. border-bottom-left-radius: 10px;
  634. }
  635. .classes::before {
  636. content: "·";
  637. color: #ff9000;
  638. margin-right: 10px;
  639. }
  640. .flexd {
  641. position: fixed;
  642. left: 0;
  643. right: 0;
  644. }
  645. .moosize {
  646. font-size: 12px;
  647. color: rgba(51, 51, 51, 0.6);
  648. font-weight: 400;
  649. }
  650. .color {
  651. color: #ff9000;
  652. }
  653. /* 查询区域End */
  654. </style>