123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- <!-- ETC注销-订单详情 -->
- <template>
- <view>
- <image :src="`${$imgUrl}applyCard/bg-nav.png`" style='height: 300rpx;width: 100%;'></image>
- <view class="props-txt-wrap">
- <view class="pro-txt" :class="{'pro-txt-primary':state.step >= 1}">发起业务</view>
- <view class="pro-txt pro-center" :class="{'pro-txt-primary':state.step >= 2}">审核中</view>
- <view class="pro-txt" :class="{'pro-txt-primary':state.step >= 3}">完成</view>
- </view>
- <view class="pros-wrap">
- <view :class="state.step >= 1 ? 'item-circle' : 'item-circle-no'">1</view>
- <view :class="state.step >= 2 ? 'item-line-solid' : 'item-line'"></view>
- <view :class="state.step >= 2 ? 'item-circle' : 'item-circle-no'">2</view>
- <view :class="state.step >= 3 ? 'item-line-solid' : 'item-line'"></view>
- <view :class="state.step >= 3 ? 'item-circle' : 'item-circle-no'">3</view>
- </view>
- </view>
- <view class="content">
- <view class="title">基础信息</view>
- <view class="content-box" v-for="(item,index) in state.orderBaseInfo" :key="index">
- <order-info-item :label="item.label" :value="item.value"></order-info-item>
- </view>
-
- <view class="title">卡/OBU设备信息</view>
- <view class="card-box as-layout-horizontal as-gravity-center-start">
- <image :src="`${$imgUrl}card2.png`" mode="" class="left"></image>
- <view class="right">
- <view class="number">2023022700012</view>
- <view class="info as-layout-horizontal">
- <view class="card-type">储蓄卡</view>
- <view class="card-status">正常</view>
- </view>
- </view>
- </view>
- <view class="card-box as-layout-horizontal as-gravity-center-start">
- <image :src="`${$imgUrl}card1.png`" mode="" class="left"></image>
- <view class="right">
- <view class="number">2023022700012</view>
- <view class="info as-layout-horizontal">
- <view class="card-status">正常</view>
- </view>
- </view>
- </view>
-
- <view class="title">退货信息</view>
- <view class="content-box" v-for="(item,index) in state.orderReturnInfo" :key="index">
- <order-info-item :label="item.label" :value="item.value"></order-info-item>
- </view>
-
- <view class="title">退费信息</view>
- <view class="content-box" v-for="(item,index) in state.orderReturnMoneyInfo" :key="index">
- <order-info-item :label="item.label" :value="item.value"></order-info-item>
- </view>
-
- <view class="title">剪卡图片</view>
- <view class="imgs">
- <image v-for="(img,index) in state.imgList" :key="index" :src="img" @click="checkBigImg(index,state.imgList)" mode="aspectFill"></image>
- </view>
-
- </view>
- </template>
-
- <script setup lang="ts">
- import {reactive} from "vue";
- import orderInfoItem from "./components/order-info-item";
- import {checkBigImg, msg} from "@/utils/utils";
- import {onLoad,onUnload} from "@dcloudio/uni-app";
- import {request} from "@/utils/network/request";
- import {stringToJson} from "@/utils/network/encryption";
- import {orderDetail} from "@/utils/network/api";
-
- const state = reactive({
- //当前步骤
- step: 2,
- //订单信息
- orderInfo:{} as any,
- //基本信息
- orderBaseInfo: [{
- label: '审核进度:',
- value: '',
- field:'orderStep'
- },
- {
- label: '审核时间:',
- value: '',
- field:'insertTime'
- },
- {
- label: '审核不通过原因:',
- value: '',
- field:'cancelReason'
- },
- {
- label: '用户名称:',
- value: '',
- field:'customerName'
- },
- {
- label: '用户证件类型:',
- value: '',
- field:'customerIdtype'
- },
- {
- label: '用户证件号:',
- value: '',
- field:'customerIdnum'
- },
- {
- label: '收费类型:',
- value: '',
- field:'vehicleClass'
- },
- {
- label: '订单车牌号:',
- value: '',
- field:'vehiclePlate'
- },
- ],
-
- //退货信息
- orderReturnInfo: [{
- label: '退货物流公司:',
- value: 'courierCompany',
- field:''
- },
- {
- label: '退货单号:',
- value: '',
- field:'trackingNumber'
- },
- ],
-
- //退费信息
- orderReturnMoneyInfo: [{
- label: '联系人姓名:',
- value: '',
- field:'consignee'
- },
- {
- label: '手机号:',
- value: '',
- field:'consigneeTel'
- },
- {
- label: '开户行:',
- value: '',
- field:'region'
- },
- {
- label: '退费银行卡号:',
- value: '',
- field:'postalCode'
- },
- ],
-
- //图片信息
- imgList:[
- "https://img1.baidu.com/it/u=2677796618,1424998349&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1678294800&t=99803143786f4f6513c2b2aeae748a15",
- "https://img0.baidu.com/it/u=2754207011,3515217180&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1678294800&t=f021d6844b5a5635fdc8f126563f35a2",
- "https://img1.baidu.com/it/u=4151437824,901633886&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1678294800&t=33569726b5df7290d219739b72787fca",
- "https://img0.baidu.com/it/u=2504452063,280205584&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1678294800&t=607bc76442b793b4e5c23f4aee8d537a"
- ]
- });
-
- //获取订单详情
- const getOrderDetails = (id) => {
- if(!id) {
- msg('无效的订单id');
- return;
- }
- const options = {
- type: 2,
- data: {"id": id},
- method: 'POST',
- showLoading: true,
- }
- request(orderDetail, options).then((res) => {
- state.orderInfo = stringToJson(res.bizContent);
- setOrderData();
- })
- }
-
- //设置订单数据
- const setOrderData = () =>{
- state.orderBaseInfo.map((item) => {
- item.value = state.orderInfo[item.field];
- })
-
- state.orderReturnInfo.map((item)=>{
- item.value = state.orderInfo[item.field];
- })
-
- state.orderReturnMoneyInfo.map((item)=>{
- item.value = (state.orderInfo.orderInfoExt as {})[item.field];
- })
- }
-
- onLoad((options)=>{
- getOrderDetails(options.id);
- })
-
- onUnload(()=>{
-
- })
-
- </script>
-
- <style lang="scss" scoped>
- .props-txt-wrap {
- position: absolute;
- top: -50rpx;
- left: 30rpx;
- right: 30rpx;
- height: 200rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .pro-txt {
- font-size: 28rpx;
- color: #333333;
- }
-
- .pro-txt-primary {
- color: #ffffff;
- }
-
- .pro-center {
- margin-left: -50rpx;
- }
- }
-
- .pros-wrap {
- position: absolute;
- top: 20rpx;
- left: 30rpx;
- right: 30rpx;
- height: 180rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .item-circle-no {
- width: 52rpx;
- height: 52rpx;
- background: rgba(255, 255, 255, 0.5);
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #25D8C9;
- font-size: 30rpx;
- font-weight: 700;
- }
-
- .item-circle {
- width: 52rpx;
- height: 52rpx;
- background: #FFFFFF;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #25D8C9;
- font-size: 30rpx;
- font-weight: 700;
- }
-
- .item-line-solid {
- width: calc(calc(100% - 270rpx) / 2);
- height: 2rpx;
- background-color: #FFFFFF;
- margin: 0 12rpx;
- }
-
- .item-line {
- border: 1px dashed rgba(255, 255, 255, 0.5);
- width: calc(calc(100% - 270rpx) / 2);
- margin: 0 12rpx;
- }
- }
-
- .content {
- padding: -40rpx 30rpx 0rpx;
- margin-top: -130rpx;
- background: #ffffff;
- border-radius: 30rpx 30rpx 0rpx 30rpx;
- position: relative;
- min-height: 100rpx;
-
- .title{
- font-size: 30rpx;
- color: #333333;
- font-weight: 600;
- padding: 30rpx 30rpx 0rpx;
- }
- .content-box{
- padding: 28rpx 30rpx 0rpx;
- }
-
- .imgs{
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- padding: 0rpx 30rpx 30rpx;
- align-items: center;
- justify-content: space-between;
- image{
- width: calc(calc(100% - 30rpx) / 2);
- height: 200rpx;
- margin-top: 30rpx;
- }
- }
-
- .card-box{
- background: #FFFFFF;
- box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223,223,223,0.8);
- border-radius: 20rpx;
- margin: 30rpx 30rpx 0rpx;
- padding: 30rpx;
- .left{
- width: 100rpx;
- height: 90rpx;
- }
- .right{
- margin-left: 30rpx;
- .number{
- font-size: 32rpx;
- font-family: Noto Sans S Chinese;
- font-weight: 400;
- color: #333333;
- }
- .info{
- margin-top: 20rpx;
- .card-type{
- margin-right: 20rpx;
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- }
- .card-status{
- height: 40rpx;
- line-height: 40rpx;
- background: #D3F2EF;
- border-radius: 6rpx;
- font-size: 20rpx;
- font-family: Noto Sans S Chinese;
- font-weight: 400;
- color: #0A8F8A;
- text-align: center;
- padding: 0rpx 30rpx
- }
- }
- }
- }
- }
- </style>
|