@@ -1159,22 +1159,12 @@ | |||
"path": "refund-deposit-card", | |||
"style": { | |||
"navigationBarTitleText": "储值卡圈存-退款" | |||
// "navigationStyle": "custom", | |||
// "mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||
// "transparentTitle": "always", | |||
// "titlePenetrate": "YES" | |||
// } | |||
} | |||
}, | |||
{ | |||
"path": "refund-deposit-card-selectCar", | |||
"style": { | |||
"navigationBarTitleText": "储值卡圈存-退款-选择车辆" | |||
// "navigationStyle": "custom", | |||
// "mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||
// "transparentTitle": "always", | |||
// "titlePenetrate": "YES" | |||
// } | |||
} | |||
}, | |||
{ |
@@ -720,7 +720,7 @@ | |||
}; | |||
const goRecord=()=>{ | |||
uni.navigateTo({ | |||
url:"/subpackage/personal-center/consumption-record" | |||
url:`/subpackage/personal-center/consumption-record?cardId=${state.cardId}` | |||
}) | |||
} | |||
</script> |
@@ -62,6 +62,9 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
title:'1', | |||
isValueCard:'3', | |||
// isValueCard:'1,3', | |||
}; | |||
const options = { | |||
type: 2, |
@@ -2,12 +2,12 @@ | |||
<view class="wrapper"> | |||
<navBar title="九州ETC"></navBar> | |||
<view class="search-box"> | |||
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image> | |||
<input class="search" placeholder="请输入业务名称" /> | |||
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill" @click="search()"></image> | |||
<input class="search" placeholder="请输入业务名称" v-model="state.searchVal" @confirm="search()"/> | |||
</view> | |||
<view class="content"> | |||
<view class="left"> | |||
<view v-for="(item,index) in menu.list" :key="index" | |||
<view v-for="(item,index) in menuShow.list" :key="index" | |||
:class="activeTab === item.name ? 'menu active' : 'menu'" @click="tabHandle(item.name,index)"> | |||
<view :class="activeTab === item.name ? 'border on' : 'border'"></view> | |||
<view class="menu-text">{{item.name}}</view> | |||
@@ -15,8 +15,8 @@ | |||
</view> | |||
<view class="right"> | |||
<view class="right-content"> | |||
<block v-if="menu.list.length > 0"> | |||
<view v-for="(item,index) in menu.list[tableSelectIndex].children" :key='index' class="item-box" @click="toNext(item.link)"> | |||
<block v-if="menuShow.list.length > 0"> | |||
<view v-for="(item,index) in menuShow.list[tableSelectIndex].children" :key='index' class="item-box" @click="toNext(item.link)"> | |||
<view class="item bg-blue" :style="{ '--background': bgBlue }"> | |||
<image :src="`${fileURLList}${item.iconPath}`" mode="aspectFill"/> | |||
<!-- <image :src="`${item.iconPath}`" /> --> | |||
@@ -68,15 +68,59 @@ | |||
console.log(tableSelectIndex.value) | |||
} | |||
const menu = reactive({ | |||
list: [] | |||
list: [] //请求的真正的不会变得 | |||
}); | |||
const menuShow = reactive({ | |||
list: [] ,//展示的 | |||
}); | |||
const state = reactive({ | |||
searchVal:'', //input输入值 | |||
newArr:[] | |||
}); | |||
onLoad(() => { | |||
queryMenuConfigAction().then((val : any) => { | |||
menu.list = val.menuList?val.menuList:[] | |||
menu.list = val.menuList?val.menuList:[], | |||
menu.list=deepClone(menu.list) | |||
state.newArr=deepClone(menu.list); | |||
menuShow.list = val.menuList?val.menuList:[] | |||
}) | |||
}); | |||
// 深拷贝 | |||
const deepClone=(obj)=> { | |||
if (typeof obj !== 'object' || obj === null) { | |||
return obj; | |||
} | |||
let clone = Array.isArray(obj) ? [] : {}; | |||
for (let key in obj) { | |||
if (obj.hasOwnProperty(key)) { | |||
clone[key] = deepClone(obj[key]); | |||
} | |||
} | |||
return clone; | |||
} | |||
const search=()=>{ | |||
for(var i=0;i<menu.list.length;i++){ | |||
state.newArr[i]['children']=[]; | |||
for(var j=0;j<menu.list[i]['children'].length;j++){ | |||
const name=menu.list[i]['children'][j].name; | |||
if(name.indexOf(state.searchVal)>=0){ | |||
state.newArr[i]['children'].push(menu.list[i]['children'][j]) | |||
} | |||
} | |||
} | |||
// 清除没有孩子的父亲 | |||
const lastArr=[] | |||
for(var k=0;k<state.newArr.length;k++){ | |||
if(state.newArr[k]['children'].length!=0){ | |||
lastArr.push(state.newArr[k]) | |||
} | |||
} | |||
console.log("lastArr",lastArr) | |||
menuShow.list=lastArr | |||
} | |||
const queryMenuConfigAction = () => { | |||
var data = { | |||
openId: getItem(StorageKeys.OpenId), | |||
@@ -141,7 +185,7 @@ | |||
height: 100%; | |||
padding: 0 10rpx; | |||
font-size: 28rpx; | |||
color: #00b38b; | |||
color: black; | |||
} | |||
.content { |
@@ -61,6 +61,8 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard:"", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -44,7 +44,9 @@ const quanCheckActionTrue = () => { | |||
opId: getItem(StorageKeys.OpenId), | |||
source: "WECHAT", | |||
tabIndex: "0", | |||
orderStep: "11" | |||
orderStep: "11", | |||
isValueCard:"", | |||
title:"1", | |||
}; | |||
const options = { | |||
type: 2, |
@@ -61,6 +61,8 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard:"", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -62,7 +62,8 @@ | |||
source: 'WECHAT', | |||
tabIndex: '0', | |||
orderStep: '11', | |||
// isValueCard: '2' | |||
isValueCard: '', | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -61,7 +61,9 @@ | |||
opId: getItem(StorageKeys.OpenId), | |||
source: 'WECHAT', | |||
tabIndex: '0', | |||
orderStep: '11' | |||
orderStep: '11', | |||
isValueCard:"", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -61,6 +61,8 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard:"", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -59,7 +59,8 @@ | |||
source: 'WECHAT', | |||
tabIndex: '0', | |||
orderStep: '11', | |||
// isValueCard: '2' | |||
isValueCard: '', | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -45,7 +45,8 @@ const quanCheckActionTrue = () => { | |||
source: "WECHAT", | |||
tabIndex: "0", | |||
orderStep: "11", | |||
// isValueCard: "2", | |||
isValueCard: "", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -45,7 +45,7 @@ | |||
<text><text style="color: red">*</text>退货物流公司:</text> | |||
<view style="display: flex"> | |||
<u-input v-model="form.courierCompany" class="input" @click="showPicker" | |||
placeholder="请选择" /> | |||
placeholder="请选择" disabled="disabled"/> | |||
<u-icon name="arrow-right" style="margin-left: 10px;display: flex;"></u-icon> | |||
</view> | |||
</view> |
@@ -61,6 +61,8 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard:"", | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -61,7 +61,8 @@ | |||
source: 'WECHAT', //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: '2' | |||
isValueCard: '1', | |||
title:'1', | |||
}; | |||
const options = { | |||
type: 2, |
@@ -1,63 +1,82 @@ | |||
<template> | |||
<view class='content'> | |||
<view class='search_wrap'> | |||
<!-- <view class='search_wrap'> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch"/><button size='mini' @click='search()'>搜索</button> | |||
</view> | |||
</view> --> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> | |||
<view>ETC卡号:{{item.cardId}}</view> | |||
<view>ETC卡号:{{item.cardId}}<text class="payStatus">{{item.payStatusC}}</text></view> | |||
<view>充值金额:¥{{item.rechargeMoney/100}}</view> | |||
<view>申请时间:{{item.insertTime}}</view> | |||
<!-- <view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee}}</text></view> --> | |||
</view> | |||
</view> | |||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的</view> | |||
</template> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {transactionRecord} from "@/utils/network/api.js"; | |||
import {queryCardRecord} from "@/utils/network/api.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
import { onLoad,onReachBottom} from "@dcloudio/uni-app"; | |||
import {getItem} from "@/utils/storage"; | |||
import {getCodeName} from "@/datas/queryKey.js"; | |||
const state = reactive({ | |||
list:'', //所有数据 | |||
newList:'', //最终展示的 | |||
name:'', | |||
cardId:'', | |||
value:'',//input框里的值 | |||
pageNo:1, | |||
pageSize: 16, | |||
flags:false, | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
state.cardId=option.cardId; | |||
getList(); | |||
}) | |||
const getList=()=>{ | |||
// const options = { | |||
// type: 2, | |||
// data: { | |||
// 'accountId': state.name | |||
// }, | |||
// method: "POST", | |||
// showLoading: true, | |||
// }; | |||
// request(transactionRecord, options).then((res) => { | |||
// const data = stringToJson(res.bizContent); | |||
// state.list=data.qtkCorporateAccountDetails; | |||
// for(var i=0;i<state.list.length;i++){ | |||
// state.list[i].tradeConfirmTime=state.list[i].tradeConfirmTime.split('T').join(' '); | |||
// } | |||
// state.newList=state.list; | |||
// console.log("交易记录",data) | |||
// }) | |||
} | |||
const search=()=>{ | |||
state.newList=[]; | |||
for (var i = 0; i < state.list.length; i++) { | |||
if (state.list[i].cardId.indexOf(state.value) >= 0) { | |||
state.newList.push(state.list[i]); | |||
const options = { | |||
type: 2, | |||
data: { | |||
'cardId': state.cardId, | |||
'openId': getItem('openId'), | |||
'pageNo': state.pageNo, | |||
'pageSize': state.pageSize | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(queryCardRecord, options).then((res) => { | |||
state.newList=[...stringToJson(res.bizContent).data,...state.newList] | |||
// getCodeName('VCR_ORDER_PAY_STATUS',payStatus) | |||
for(var i=0;i<state.newList.length;i++){ | |||
console.log("getCodeName",getCodeName('VCR_ORDER_STATUS',state.newList[i]['status'])) | |||
state.newList[i]['payStatusC']=getCodeName('VCR_ORDER_PAY_STATUS',state.newList[i]['payStatus']) | |||
// if(getCodeName('VCR_ORDER_PAY_STATUS',state.newList[i]['payStatus'])) | |||
} | |||
} | |||
console.log("state.newList",state.newList) | |||
} | |||
const doSearch=()=>{ | |||
search(); | |||
console.log("交易记录",state.newList) | |||
}) | |||
} | |||
// 触底加载 | |||
onReachBottom(()=>{ | |||
if(state.newList.length<state.pageNo*16) return state.flags = true | |||
console.log("触底了") | |||
state.pageNo++ | |||
getList() | |||
}) | |||
// const search=()=>{ | |||
// state.newList=[]; | |||
// for (var i = 0; i < state.list.length; i++) { | |||
// if (state.list[i].cardId.indexOf(state.value) >= 0) { | |||
// state.newList.push(state.list[i]); | |||
// } | |||
// } | |||
// console.log("state.newList",state.newList) | |||
// } | |||
// const doSearch=()=>{ | |||
// search(); | |||
// } | |||
</script> | |||
<style scoped> | |||
@@ -86,12 +105,17 @@ | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top:30rpx; | |||
background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color:white; | |||
/* background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); */ | |||
background:white; | |||
color:black; | |||
} | |||
.time{ | |||
display:flex; | |||
margin-bottom: 16rpx; | |||
justify-content: space-between; | |||
} | |||
.payStatus{ | |||
color: red; | |||
float: right; | |||
} | |||
</style> |
@@ -113,9 +113,12 @@ | |||
"opId": getItem(StorageKeys.OpenId), | |||
"source": "WECHAT", | |||
"vehiclePlate": "", | |||
"tabIndex": '3', | |||
"tabIndex": '0', | |||
"pageNo": params.pageNum, | |||
"pageSize": params.pageSize | |||
"pageSize": params.pageSize, | |||
"isValueCard":"", | |||
"title":"0", | |||
"orderStep":"10" | |||
}, | |||
method: 'POST', | |||
showLoading: params.pageNum === 1 ? true : false, |
@@ -62,7 +62,8 @@ | |||
source: 'WECHAT', | |||
tabIndex: '0', | |||
orderStep: '11', | |||
isValueCard: '2' | |||
isValueCard: '', | |||
title:"1" | |||
}; | |||
const options = { | |||
type: 2, |
@@ -227,3 +227,4 @@ export const refundQuan="52d32062470345a1915b0adeb458609e" //储值卡圈存- | |||
export const queryRefoundResult="a11d756827f848f79de027a2ec1943c3" //储值卡圈存-半条流水-微信退费结果查询 | |||
export const queryStoredQuan="cc907ba2683e481d92398bf6c4d74c57" //储值卡圈存详情-多条件分页查询 | |||
export const queryTrajectory="d6414e83a2a34c4cb0f3da33a0e901bd" //我的上个月轨迹查询 | |||
export const queryCardRecord="2124c3086aa04faf84d70c01930cc90c" //用户储值卡充值记录-分页查询 |