123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <template>
- <view class="oderPage">
- <view v-for="(item,index) in state.list" class="details">
- <view class="header">
- <image :src="`${$imgUrl}order/no1.png`" mode=""></image>
- <text>{{item.id}}</text>
- </view>
- <view class="hr">
-
- </view>
- <view class="row">
- <view class="">
- 订单车牌号:
- </view>
- <text>{{item.vehiclePlate}}</text>
- </view>
- <view class="row">
- <view class="">
- 旧卡号:
- </view>
- <text>{{item.cardId}}</text>
- </view>
- <view class="row">
- <view class="">
- 旧卡金额:
- </view>
- <text>{{item.cardBalance}}</text>
- </view>
- <view class="line">
- </view>
-
- <button @click="refundTypeAction(item)">余额补领</button>
- </view>
-
- </view>
-
- </template>
-
- <script setup lang="ts">
- import {
- reactive,
- ref
- } from "vue"
- import {
- navTo
- } from "@/utils/utils"
- import {
- onLoad,
- onShow
- } from "@dcloudio/uni-app";
- import {
- queryRefund,
- queryRefundApply
- } from "@/utils/network/api.js";
- import {
- request
- } from "@/utils/network/request.js";
- import {
- msg
- } from "@/utils/utils";
-
- import {
- stringToJson
- } from "@/utils/network/encryption";
-
- const state = reactive({
- vehicleId: '',
- list: []
- });
-
- /*视图进入后操作*/
- onLoad((option) => {
- state.vehicleId = option.vehicleId
- queryRefundAction().then(val => {
- state.list = val.data
- })
- });
- const reason = ref('')
-
- // 单选数据列表
- const radiolist1 = reactive([{
- name: '退货原因1',
- disabled: false
- },
- {
- name: '退货原因2',
- disabled: false
- },
- {
- name: '退货原因3',
- disabled: false
- },
- {
- name: '退货原因4',
- disabled: false
- },
- {
- name: '退货原因5',
- disabled: false
- },
- ], )
-
- const refundTypeAction = (val) => {
- if (val.refundType === 'GLYQR') {
- queryRefundApplyAction(val.id).then(value => {
- console.log(value)
- })
- }
- }
- // 单选
- const radioChange = (n) => {
- console.log('radioChange', n);
- }
-
- const queryRefundAction = () => {
- var data = {
- vehicleId: state.vehicleId
- };
- const options = {
- type: 2,
- data: data,
- method: "POST",
- showLoading: true,
- };
-
- return new Promise(async (resolve, reject) => {
- const res = await request(queryRefund, options);
- const data = stringToJson(res.bizContent);
- resolve(data);
- }).catch((error) => {
- reject(error);
- });
- }
- const queryRefundApplyAction = (id) => {
- var data = {
- id: id
- };
- const options = {
- type: 2,
- data: data,
- method: "POST",
- showLoading: true,
- };
-
- return new Promise(async (resolve, reject) => {
- const res = await request(queryRefundApply, options);
- const data = stringToJson(res.bizContent);
- resolve(data);
- }).catch((error) => {
- reject(error);
- });
- }
- </script>
-
-
- <style>
- page {
- /* width: 100%;
- height: 100%; */
- display: flex;
- flex-direction: column;
- background-color: #F3F3F3;
- box-sizing: border-box;
- }
- </style>
- <style lang="scss" scoped>
- .oderPage {
- background-color: #EEF7F7;
- margin: 30rpx;
-
- .details {
- margin-top: 30rpx;
- position: relative;
- background: #fff;
- border-radius: 20rpx;
- padding: 30rpx;
- height: 370rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
- border-radius: 20rpx;
-
- .header {
- align-items: center;
- display: flex;
- padding-bottom: 30rpx;
- // border-bottom: 1px solid #DCDCDC;
-
- image {
- width: 51rpx;
- height: 31rpx;
- }
-
- text {
- font-size: 30rpx;
- margin-left: 20rpx;
- font-weight: 600;
- }
- }
-
- .hr {
- height: 1rpx;
- background: #DCDCDC;
- width: 100%;
- position: absolute;
- left: 50%;
- transform: translate(-50%);
- }
-
- .row {
- display: flex;
- margin: 34rpx 0;
- font-size: 26rpx;
- font-family: Noto Sans S Chinese;
- font-weight: 400;
- color: #333333;
- line-height: 30rpx;
-
- view {
- font-size: 26rpx;
- font-family: Noto Sans S Chinese;
- font-weight: 400;
- color: #999999;
- line-height: 30rpx;
-
- }
- }
-
- .line {
- width: 100%;
- height: 1rpx;
- background: #DCDCDC;
-
- }
-
- button {
- width: 141rpx;
- height: 61rpx;
- background: #FFFFFF;
- border: 1px solid #00B38B;
- border-radius: 30rpx;
- font-size: 26rpx;
- font-family: Noto Sans S Chinese;
- font-weight: 400;
- color: #00B38B;
- line-height: 61rpx;
- position: absolute;
- right: 30rpx;
- bottom: 20rpx;
- padding: 0;
- }
- }
-
- }
- </style>
|