123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <template>
- <view class="content">
- <view class="list" v-for="(item,index) in state.list" @click="details(item.orderStatus,item.id)">
- <view class="title" :style="{'--bgimg':`url(${$imgUrl}etcbg.png)`}">
- <view class="title_left">
- <image :src="`${$imgUrl}etc.png`" mode=""></image>
- <text class="question">ETC使用问题</text>
- </view>
- <text class="statusdcl" v-if="item.orderStatus==0">待处理</text>
- <text class="statusdbc" v-else-if="item.orderStatus==1">待补充</text>
- <text class="statusyjs" v-else>已结束</text>
- </view>
- <view class="bot">
- <view class="details">
- <view><text>工单号码:</text><view>{{item.id}}</view></view>
- <view><text>发生日期:</text><view>{{item.eventOccurrenceDate}}</view></view>
- <view><text>客户诉求:</text><view>{{item.appeal}}</view></view>
- </view>
- <view class="time">{{item.updateTime}}</view>
- </view>
-
- </view>
- <view style="text-align: center;margin: 20rpx;font-size: 30rpx;" v-if="state.flags">我是有底线的~</view>
- <view class="no" v-if="state.list.length==0">暂无自助工单</view>
- </view>
- <image class="add" :src="`${$imgUrl}etcadd.png`" mode="" @click="add()"></image>
- </template>
-
- <script setup lang="ts">
- import {navTo} from "@/utils/utils";
- import { onLoad,onReachBottom } from "@dcloudio/uni-app";
- import {requestNew} from "@/utils/network/request.js";
- import {selfServicePage} from "@/utils/network/api.js";
- import { reactive,ref } from "vue";
- const state = reactive({
- pageNo:1,
- pageSize:10,
- list:[],
- flags: false,
- totalCount:"",
- })
- onLoad(() => {
- list()
- });
- const list=()=>{
- const options = {
- type: 2,
- data: {
- pageNo:state.pageNo,
- pageSize:state.pageSize
- },
- method: "POST",
- showLoading: true,
- };
- requestNew(selfServicePage, options).then((res) => {
- console.log("自助工单列表",res)
- state.totalCount = res.totalCount
- state.list=[...state.list,...res.result]
- });
- }
- const add=()=>{
- navTo(`/subpackage/after-sale/work-order/add-work-order`)
- }
- const details=(orderStatus,id)=>{
- navTo(`/subpackage/after-sale/work-order/add-work-supplement?id=${id}&orderStatus=${orderStatus}`)
- }
- onReachBottom(() => {
- console.log("触底了", state.pageNo * 10)
- if (Number(state.totalCount) == state.list.length) return state.flags = true
- if (state.list.length < state.pageNo * 10) return state.flags = true
- console.log("触底了")
- state.pageNo++
- list()
- })
- </script>
-
- <style lang="scss" scoped>
- .content{
- padding-top: 30rpx;
- box-sizing: border-box;
- }
- .list{
- background: #FFFFFF;
- border-radius: 12rpx;
- border: 1px solid #FFFFFF;
- width: 90%;
- margin: 0 auto;
- font-weight: 400;
- margin-bottom: 30rpx;
- .title{
- padding: 0 20rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 80rpx;
- background-image: var(--bgimg);
- background-size: 100% 100%;
- background-repeat: no-repeat;
- .title_left{
- display: flex;
- align-items: center;
- }
- image{
- width: 50rpx;
- height: 50rpx;
-
- }
- .question{
- font-size: 30rpx;
- color: #01243A;
- margin-left: 10rpx;
- }
- // 待处理
- .statusdcl{
- font-size: 24rpx;
- color: #1458E5;
- background: #E3ECFF;
- border-radius: 6rpx;
- border: 1px solid #1458E5;
- padding: 4rpx 6rpx;
- }
- // 待补充
- .statusdbc{
- font-size: 24rpx;
- color: #42D175;
- background:#E6FFEF;
- border-radius: 6rpx;
- border: 1px solid #42D175;
- padding: 4rpx 6rpx;
- }
- // 已结束
- .statusyjs{
- font-size: 24rpx;
- color: #839AB4;
- background: #DCEFFC;
- border-radius: 6rpx;
- border: 1px solid #839AB4;
- padding: 4rpx 6rpx;
- }
- }
- .bot{
- padding: 0 20rpx;
- .details{
- font-size: 26rpx;
- padding: 10rpx 0 5rpx 0;
- view{
- display: flex;
- margin-bottom: 5rpx;
- text{
- color: #999999;
- width: 21%;
- }
- view{
- color: #002025;
- width: 79%;
- }
- }
- }
- .time{
- font-size: 24rpx;
- color: #999999;
- padding:20rpx 0;
- border-top: 1rpx solid #DCDCDC;
- }
- }
-
- }
- .add{
- position: fixed;
- z-index: 999;
- bottom: 20rpx;
- right: 0rpx;
- width: 174rpx;
- height: 174rpx;
- }
- .no {
- text-align: center;
- padding-top: 100rpx;
- }
- </style>
|