policy.vue 17 KB

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