瀏覽代碼

圈存退费

yxb
DESKTOP-2IO5MST\huting 1 年之前
父節點
當前提交
22885c0b8e

+ 7
- 0
pages.json 查看文件

@@ -1110,6 +1110,13 @@
"navigationStyle": "custom"
}
},
{
"path": "refund-deposit-card-selectCar",
"style": {
"navigationBarTitleText": "储值卡圈存-退款-选择车辆",
"navigationStyle": "custom"
}
},
{
"path": "refund-order-balance",
"style": {

+ 1
- 3
subpackage/after-sale/refundPage-selectCar.vue 查看文件

@@ -71,6 +71,7 @@
return new Promise(async (resolve, reject) => {
const res = await request(orderList, options);
const data = stringToJson(res.bizContent);
console.log("data",data)
resolve(data);
}).catch((error) => {
reject(error);
@@ -150,9 +151,6 @@
background: #00B38B;
border-radius: 50%;
}

}


}
</style>

+ 176
- 0
subpackage/orders/refund-deposit-card-selectCar.vue 查看文件

@@ -0,0 +1,176 @@
<template>
<nav-bar title="储值卡圈存-退款-选择车辆"></nav-bar>
<view class="selectCar-box">
<view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" :key="i">
<view class="iten-left">
<image :src="`${$imgUrl}che.png`" mode=""></image>
<text>{{item.vehiclePlate}}</text>
</view>
<view class="choose-item">
<view class="active" v-if="flag==i">
</view>
</view>
</view>
<view v-else>
<empty title='暂无找到相关车辆信息' />
</view>
</view>
</template>

<script setup lang="ts">
import empty from "@/components/empty/empty.vue";
import {
reactive,
ref
} from "vue"
import {
navTo,msg
} from "@/utils/utils"
import {
onLoad,
} from "@dcloudio/uni-app";
import {
orderList
} from "@/utils/network/api.js";
import {
request
} from "@/utils/network/request.js";
import {
getItem,
StorageKeys,
} from "@/utils/storage";
import {
stringToJson
} from "@/utils/network/encryption";
const state = reactive({
list: [] ,//车辆list
});
const flag = ref('0') //默认选择0

onLoad(() => {
quanCheckActionTrue().then((item: any) => {
state.list = item.data
})
});
const quanCheckActionTrue = () => {
var data = {
opId: getItem(StorageKeys.OpenId),
source: 'WECHAT', //渠道为小程序
tabIndex: '0', //0全部
orderStep: '11', //11 为已完成”
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};

return new Promise(async (resolve, reject) => {
const res = await request(orderList, options);
const data = stringToJson(res.bizContent);
console.log("data",data)
resolve(data);
}).catch((error) => {
reject(error);
});
}

const choose = (i, item) => {
flag.value = i
console.log("item",item)
navTo(`/subpackage/orders/refund-deposit-card?cardId=${item.cardId}`)
}
</script>


<style>
page {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background-color: #F3F3F3;
}
</style>
<style lang="scss" scoped>
.flex {
display: flex;
justify-content: center;
}

.selectCar-box {
// width: 100%;
height: 100%;
padding: 30rpx;

.item {
padding: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
height: 130rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
border-radius: 20rpx;
margin-bottom: 30rpx;

.iten-left {
display: flex;
align-items: center;

image {
width: 150rpx;
height: 90rpx;

}

text {
margin-left: 20rpx;
font-size: 32rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #333333;
}
}

.choose-item {
width: 44rpx;
height: 44rpx;
background: #FFFFFF;
border: 2rpx solid #00B38B;
border-radius: 50%;
margin-right: 20rpx;
display: flex;
justify-content: center;
align-items: center;
box-sizing: content-box;
}

.active {
width: 34rpx;
height: 34rpx;
background: #00B38B;
border-radius: 50%;
}
}
}
.submit {
height: 80rpx;
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
border-radius: 40rpx;
font-size: 32rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
position: fixed;
bottom: 70rpx;
width: 670rpx;
left: 50%;
transform: translate(-50%);
text-align: center;
}
</style>

+ 176
- 152
subpackage/orders/refund-deposit-card.vue 查看文件

@@ -1,81 +1,131 @@
<template>
<nav-bar title="申请退款"></nav-bar>
<view class="oderPage">
<view class="details">
<view class="header">
<image :src="`${$imgUrl}order/no1.png`" mode=""></image>
<text>GZ92400001</text>
</view>
<view class="hr">
</view>
<view class="row">
<view class="">
圈存金额:
</view>
<text>10000</text>
</view>
<view class="row">
<view class="">
圈存状态:
</view>
<text>未使用(半条)</text>
</view>
<view class="row">
<view class="">
当前卡内金额读取:
</view>
<text style="color: #FF8000;">99.00元</text>
</view>
</view>
<view class="choice">
<view class="tips">
<text style="color: red;">*</text>退款原因:
</view>
<u-checkbox-group @change="checkboxGroupChange">
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index"
:name="item.name" active-color="#00B38B">{{item.name}}</u-checkbox>
</u-checkbox-group>
</view>

<button class="submit">提交申请</button>
</view>

<view class="selectCar-box">
<view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" :key="i">
<view class="iten-left">
<!-- <image :src="`${$imgUrl}che.png`" mode=""></image> -->
<text>订单编号:{{item.orderId}}</text>
</view>
<view class="choose-item">
<view class="active" v-if="flag==i">
</view>
</view>
</view>
<view v-else>
<empty title='暂无找到相关储值卡圈存信息' />
</view>
<view class="submit" @click="apply()">申请退款</view>
</view>
</template>

<script setup lang="ts">
import empty from "@/components/empty/empty.vue";
import {
ref,
reactive
} from "vue";

const reason = ref('')

// 单选数据列表
const list = reactive([{
name: '退货原因1',
disabled: false
},
{
name: '退货原因2',
disabled: false
},
{
name: '退货原因3',
disabled: false
},
{
name: '退货原因4',
disabled: false
reactive,
ref
} from "vue"
import {
navTo,msg
} from "@/utils/utils"
import {
onLoad,
} from "@dcloudio/uni-app";
import {
refundQuan,queryRefoundResult,queryStoredQuan
} from "@/utils/network/api.js";
import {
request
} from "@/utils/network/request.js";
import {
getItem,
StorageKeys,
} from "@/utils/storage";
import {
stringToJson
} from "@/utils/network/encryption";
const state = reactive({
list: [] ,//车辆list
choiceItem:{}, //选择退款的某一条数据
});
const flag = ref('-1') //默认选择0

onLoad((option:any) => {
console.log("option",option)
StoredQuan(option.cardId);
});
const StoredQuan=(cardId)=>{
const options = {
type: 2,
data: {
"status":0,
"cardId":cardId,
},
method: 'POST',
showLoading: true,
}
], )
request(queryStoredQuan, options).then((res) => {
const data=stringToJson(res.bizContent);
state.list=data.data
console.log("1111",data)
})
}


const checkboxGroupChange = (n) => {
console.log('checkboxGroupChange', n);
const choose = (i, item) => {
flag.value = i
console.log("item",item)
state.choiceItem=item
}

const checkboxChange = (n) => {
console.log('checkboxChange', n);
const apply=()=>{
if(flag.value=='-1'){
msg("请选择退款订单")
return;
}
queryRefound();
console.log("提交")
}
const queryRefound=()=>{
const options = {
type: 2,
data: {
"orderId":state.choiceItem.orderId,
"cardId":state.choiceItem.cardId,
"openId": getItem(StorageKeys.OpenId),
},
method: 'POST',
showLoading: true,
}
request(refundQuan, options).then((res) => {
const data=stringToJson(res.bizContent);
refoundResult();
console.log("222",data)
})
}
const refoundResult=()=>{
const options = {
type: 2,
data: {
"orderId":state.choiceItem.orderId,
"cardId":state.choiceItem.cardId,
},
method: 'POST',
showLoading: true,
}
request(queryRefoundResult, options).then((res) => {
const data=stringToJson(res.bizContent);
if(data.refundStatus=="SUCCESS"){
uni.navigateBack({
delta:2
})
}else if(data.refundStatus=="CLOSED"){
msg('退款关闭')
}else if(data.refundStatus=="HANDLING"){
msg('退款处理中')
}else if(data.refundStatus=="EXCEPTION"){
msg('退款异常')
}
})
}
</script>

@@ -90,108 +140,82 @@
}
</style>
<style lang="scss" scoped>
.oderPage {
flex: 1;
width: 100%;
background-color: #EEF7F7;
.details {
width: 92%;
// height: 300rpx;
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
height: 302rpx;
.flex {
display: flex;
justify-content: center;
}

.selectCar-box {
// width: 100%;
height: 100%;
padding: 30rpx;

.item {
padding: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
height: 130rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
border-radius: 20rpx;
position: relative;
box-sizing: border-box;
margin: 30rpx auto;
.header {
align-items: center;
margin-bottom: 30rpx;

.iten-left {
display: flex;
padding-bottom: 30rpx;
// border-bottom: 1px solid #DCDCDC;
align-items: center;

image {
width: 51rpx;
height: 31rpx;
width: 150rpx;
height: 90rpx;

}

text {
font-size: 30rpx;
margin-left: 20rpx;
font-weight: 600;
}
}

.hr {
width: 100%;
height: 1rpx;
background: #DCDCDC;
position: absolute;
transform: translate(-50%);
left: 50%;
}

.row {
display: flex;
margin: 20rpx 0;
font-size: 26rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #333333;
line-height: 30rpx;

view {
font-size: 26rpx;
font-size: 32rpx;
font-family: Noto Sans S Chinese;
font-weight: 400;
color: #999999;
line-height: 30rpx;

color: #333333;
}
}
}

.choice {
width: 92%;
min-height: 300rpx;
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin: 30rpx auto;
box-sizing: border-box;

.tips {
padding: 20rpx 0;
font-size: 30rpx;
font-weight: 600;
margin-bottom: 30rpx;
.choose-item {
width: 44rpx;
height: 44rpx;
background: #FFFFFF;
border: 2rpx solid #00B38B;
border-radius: 50%;
margin-right: 20rpx;
display: flex;
justify-content: center;
align-items: center;
box-sizing: content-box;
}

::v-deep .u-checkbox {
width: 50% !important;
margin-bottom: 30rpx;
.active {
width: 34rpx;
height: 34rpx;
background: #00B38B;
border-radius: 50%;
}
}
.submit {
height: 80rpx;
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
border-radius: 40rpx;
font-size: 32rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
position: fixed;
bottom: 70rpx;
width: 670rpx;
left: 50%;
transform: translate(-50%);
}
}
.submit {
height: 80rpx;
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
border-radius: 40rpx;
font-size: 32rpx;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
line-height: 80rpx;
position: fixed;
bottom: 70rpx;
width: 670rpx;
left: 50%;
transform: translate(-50%);
text-align: center;
}
</style>

+ 5
- 1
utils/network/api.js 查看文件

@@ -220,4 +220,8 @@ export const queryRecharge="bd8d3b44734c4d05b9c586815d0b98d8" //对公账户充
export const changePass="2ba78074e3004453a26dba1d41ae7568" //对公账户改密服务
// 补卡额
export const queryCardLimit="d6c1e39dccf44919a57c55457a9da21a" //补卡额列表查询接口
export const queryCardLimit="d6c1e39dccf44919a57c55457a9da21a" //补卡额列表查询接口
export const refundQuan="52d32062470345a1915b0adeb458609e" //储值卡圈存-半条流水-微信退费
export const queryRefoundResult="a11d756827f848f79de027a2ec1943c3" //储值卡圈存-半条流水-微信退费结果查询
export const queryStoredQuan="cc907ba2683e481d92398bf6c4d74c57" //储值卡圈存详情-多条件分页查询

Loading…
取消
儲存