policy.vue 17 KB

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