123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
- <template>
- <view>
- <!-- 公共组件-每个页面必须引入 -->
- <public-module></public-module>
- <!-- 顶部搜索框区域Start -->
- <view class="search">
- <search @search="search"></search>
- </view>
- <!-- 顶部搜索框区域End -->
- <!-- 查询区域Start -->
- <view class="queryView d-flex">
- <view class="d-flex a-center j-center">
- <picker @change="bindPickerTypeChange" :value="typeIndex" :range="typeArray">
- <view class="d-flex a-center">{{typeArray[typeIndex]}}
- <view class="icon iconfont icon-xiala"></view>
- </view>
- </picker>
- </view>
- <view class="d-flex a-center j-center">
- <picker @change="bindPickerYearChange" :value="yearIndex" :range="yearArray">
- <view class="d-flex a-center">{{yearArray[yearIndex]}}年 <view class="icon iconfont icon-xiala">
- </view>
- </view>
- </picker>
- </view>
- <view class="d-flex a-center j-center">
- <picker @change="bindPickerMonthChange" :value="monthIndex" :range="monthArray">
- <view class="d-flex a-center">{{monthArray[monthIndex]}}月 <view class="icon iconfont icon-xiala">
- </view>
- </view>
- </picker>
- </view>
- </view>
- <!-- 查询区域End -->
- <view class="container-list">
- <view class="container-list-item" v-for="(orderItem,orderIndex) in list " :key="orderIndex"
- @tap="openDetail(orderIndex)">
- <view class="container-list-item-body d-flex">
- <view class="left d-flex flex-1 flex-column">
- <view class="name">{{orderItem.inscompany}}</view>
- <!-- <view class="date">保险公司:</view>
- <view class="date">投保险种:交三</view> -->
- <block v-for="(riskItem,riskIndex) in orderItem.riskinfo" :key="riskIndex">
- <template v-if="riskItem.riskCode == '0507'">
- <view class="date">交强险到期时间:{{riskItem.endDate}}</view>
- </template>
- </block>
- <block v-for="(riskItem,riskIndex) in orderItem.riskinfo" :key="riskIndex">
- <template v-if="riskItem.riskCode == '0510'">
- <view class="date">商业险到期时间:{{riskItem.endDate}}</view>
- </template>
- </block>
- <view class="btn d-flex">
- <span class="d-flex a-center j-center" size="mini"
- style="background: #48A0D3;">备 注</span>
- <span class="d-flex a-center j-center" size="mini" style="background: #48A0D3;">到期提醒</span>
- </view>
- </view>
- <view class="right">
- <view style="font-size:24upx;" class="name d-flex a-center j-center">
- 晋AWEKOI3
- </view>
- <view class="name d-flex a-center j-center" style="font-size:24upx;">
- {{orderItem.inscompany}}
- </view>
- <view class="name d-flex a-center j-center" style="font-size:24upx;">交三
- </view>
- <span class="btn">生效中</span>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from "vuex"
- import search from "@/components/modules/orders/search.vue";
- import ZPagingMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin';
- export default {
- components: {
- search,
- ZPagingMixin
- },
- computed: {
- ...mapState(['userInfo']),
- getHeight() {
- let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(184);
- let bgColor = '#FFFFFF';
- if (this.list.length > 0) {
- bgColor = '#F5F5F5';
- }
- return `height: ${height}px; background-color:${bgColor}`;
- }
- },
- data() {
- return {
- list: [],
- /* 查询区域Start */
- typeArray: ['车险'], //订单的类型
- // typeArray:['车险','意外险','寿险'], //订单的类型
- stageArray: [{
- "label": '待继续',
- "value": '0'
- },
- {
- "label": '核保中',
- "value": '1'
- },
- {
- "label": '已核保',
- "value": '2'
- },
- {
- "label": '已核保待缴费',
- "value": '5'
- },
- {
- "label": '已缴费',
- "value": '6'
- },
- {
- "label": '已承保',
- "value": '7'
- },
- {
- "label": '待修改',
- "value": '3'
- },
- {
- "label": '核保不通过',
- "value": '4'
- },
- {
- "label": '已关闭',
- "value": '99'
- }
- ], //订单的阶段
- yearArray: [], //订单的查询年份
- monthArray: [], //订单的查询月份
- typeIndex: 0, //订单的类型选择
- yearIndex: 0, //订单的年份选择
- monthIndex: 0, //订单的月份选择
- /* 查询区域End */
- queryLicenseNo: ''
- }
- },
- onLoad() {
- // 搜索年选项Start
- this.yearArray = [(new Date().getFullYear() - 1), new Date().getFullYear(), (new Date().getFullYear() + 1)]
- this.yearIndex = this.yearArray.length - 1;
- // 搜索年选项End
- // 搜索月选项Start
- var month = new Date().getMonth() + 1;
- for (var i = 1; i <= 12; i++) {
- if (i < 10) {
- this.monthArray.push('0' + i);
- } else {
- this.monthArray.push(i);
- }
- }
- this.monthIndex = new Date().getMonth();
- this.getOrdersList();
- // 搜索月选项End
- },
- methods: {
- // 订单类型发生变化
- bindPickerTypeChange(e) {
- this.typeIndex = e.target.value;
- },
- isCarBrand(str) {
- let mPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}([A-Z0-9挂学警港澳使领]{1}|应急)$/ ||
- /^沪[0-9A-Z]{5}$/ || /^陆丰[0-9A-Z]{4}临$/;
- return mPattern.test(str.trim())
- // return /^陆丰[0-9A-Z]{4}临$/.test(str.trim())
- },
- search(a) {
- if (this.isCarBrand(a.trim())) {
- this.queryLicenseNo = "";
- this.queryLicenseNo = a.trim();
- this.list = []; //获取到的订单列表
- var infodata = {
- "columnFilters": {
- "orderstatus": {
- "name": "orderstatus",
- "value": "7"
- },
- "licenseNo": {
- "name": "licenseNo",
- "value": this.queryLicenseNo
- },
- "userid": {
- "name": "userid",
- "value": this.userInfo.sysUser.id
- },
- "quotestatus": {
- "name": "quotestatus",
- "value": '1'
- }
- },
- "pageNum": 1,
- "pageSize": 10
- };
- this.getOrdersList(1, 10, infodata); //重新查询订单
- } else {
- return uni.showToast({
- icon: "none",
- title: "请输入正确的车牌号或车架号",
- duration: 1500
- })
- }
- },
- //搜索年发生变化
- bindPickerYearChange(e) {
- this.yearIndex = e.target.value;
- this.monthArray = [];
- for (var i = 1; i <= 12; i++) {
- if (i < 10) {
- this.monthArray.push('0' + i);
- } else {
- this.monthArray.push(i);
- }
- }
- this.list = []; //获取到的订单列表
- this.getOrdersList(1, 10); //重新查询订单
- },
- //搜索月发生变化
- bindPickerMonthChange(e) {
- this.monthIndex = e.target.value
- this.list = []; //获取到的订单列表
- this.getOrdersList(1, 10); //重新查询订单
- },
- //获取订单数据Start
- async getOrdersList() {
- let params = {
- "orderNo": "1731850885233725440"
- };
- let res = await this.$http.post('/insurance/order/querySuborder', params);
- if (res.code == 200) {
- this.list = res.data;
- }
- },
- //获取订单数据End
- //跳转订单详情页面Start(公用)
- openDetail(index) {
- this.navigate({
- url: "/pages/tools/customer/custormerDetail?",
- success: (res) => {
- res.eventChannel.emit("acceptData", {
- item: this.list[index].id
- })
- }
- }, 'navigateTo', true)
- },
- //跳转订单详情页面End(公用)
- }
- }
- </script>
- <style lang="scss" scoped>
- @import '@/style/mixin.scss';
- .container-list-item {
- background: #fff;
- margin-bottom: 20rpx;
- }
- .container-list-item-header .date {
- background: rgba($themeColor, 0.8);
- color: #FFFFFF;
- width: 290upx;
- border-radius: 4upx;
- font-size: 24upx;
- text-align: center;
- }
- .container-list-item-body {
- padding: 20upx 30upx;
- }
- .container-list-item-body .left .name {
- font-size: 28upx;
- font-weight: bold;
- }
- .container-list-item-body .left .date {
- font-size: 24upx;
- color: #A3A5A4;
- }
- .container-list-item-body .left .btn>span {
- padding: 0 20upx;
- width: 120upx;
- /* border: 1px solid #587D93; */
- color: #587D93;
- margin: 10upx 20upx;
- font-size: 24upx;
- border-radius: 10upx;
- color: #FFFFFF;
- font-weight: bold;
- }
- .container-list-item-body .right {
- width: 180upx;
- flex-shrink: 0;
- color: #B2B3B2;
- font-size: 26upx;
- }
- .container-list-item-body .right>span {
- line-height: 70upx;
- }
- .container-list-item-body .right .btn {
- padding: 7upx 30upx;
- background: #DD525E;
- color: #FFFFFF;
- border-radius: 10upx;
- margin: 20upx 0 0 20upx;
- }
- /* 查询区域Start */
- .queryView {
- justify-content: space-around;
- height: 82upx;
- line-height: 80upx;
- }
- .queryView>view {
- border-top: 1px solid rgba($themeColor, 0.6);
- border-bottom: 1px solid rgba($themeColor, 0.6);
- border-left: 1px solid rgba($themeColor, 0.6);
- box-sizing: border-box;
- color: rgba($themeColor, 0.6);
- }
- .queryView>view:nth-child(1) {
- flex: 3;
- }
- .queryView>view:nth-child(2) {
- flex: 3;
- }
- .queryView>view:nth-child(3) {
- border-right: 1px solid rgba($themeColor, 0.6);
- flex: 3;
- }
- /* 查询区域End */
- </style>
|