"path": "refund-deposit-card", | "path": "refund-deposit-card", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "储值卡圈存-退款" | "navigationBarTitleText": "储值卡圈存-退款" | ||||
// "navigationStyle": "custom", | |||||
// "mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||||
// "transparentTitle": "always", | |||||
// "titlePenetrate": "YES" | |||||
// } | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"path": "refund-deposit-card-selectCar", | "path": "refund-deposit-card-selectCar", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "储值卡圈存-退款-选择车辆" | "navigationBarTitleText": "储值卡圈存-退款-选择车辆" | ||||
// "navigationStyle": "custom", | |||||
// "mp-alipay": { //在支付宝小程序中如果不生效 就加上这两行代码 就会生效啦 | |||||
// "transparentTitle": "always", | |||||
// "titlePenetrate": "YES" | |||||
// } | |||||
} | } | ||||
}, | }, | ||||
{ | { |
}; | }; | ||||
const goRecord=()=>{ | const goRecord=()=>{ | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url:"/subpackage/personal-center/consumption-record" | |||||
url:`/subpackage/personal-center/consumption-record?cardId=${state.cardId}` | |||||
}) | }) | ||||
} | } | ||||
</script> | </script> |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
title:'1', | |||||
isValueCard:'3', | |||||
// isValueCard:'1,3', | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
<view class="wrapper"> | <view class="wrapper"> | ||||
<navBar title="九州ETC"></navBar> | <navBar title="九州ETC"></navBar> | ||||
<view class="search-box"> | <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> | ||||
<view class="content"> | <view class="content"> | ||||
<view class="left"> | <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)"> | :class="activeTab === item.name ? 'menu active' : 'menu'" @click="tabHandle(item.name,index)"> | ||||
<view :class="activeTab === item.name ? 'border on' : 'border'"></view> | <view :class="activeTab === item.name ? 'border on' : 'border'"></view> | ||||
<view class="menu-text">{{item.name}}</view> | <view class="menu-text">{{item.name}}</view> | ||||
</view> | </view> | ||||
<view class="right"> | <view class="right"> | ||||
<view class="right-content"> | <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 }"> | <view class="item bg-blue" :style="{ '--background': bgBlue }"> | ||||
<image :src="`${fileURLList}${item.iconPath}`" mode="aspectFill"/> | <image :src="`${fileURLList}${item.iconPath}`" mode="aspectFill"/> | ||||
<!-- <image :src="`${item.iconPath}`" /> --> | <!-- <image :src="`${item.iconPath}`" /> --> | ||||
console.log(tableSelectIndex.value) | console.log(tableSelectIndex.value) | ||||
} | } | ||||
const menu = reactive({ | const menu = reactive({ | ||||
list: [] | |||||
list: [] //请求的真正的不会变得 | |||||
}); | |||||
const menuShow = reactive({ | |||||
list: [] ,//展示的 | |||||
}); | |||||
const state = reactive({ | |||||
searchVal:'', //input输入值 | |||||
newArr:[] | |||||
}); | }); | ||||
onLoad(() => { | onLoad(() => { | ||||
queryMenuConfigAction().then((val : any) => { | 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 = () => { | const queryMenuConfigAction = () => { | ||||
var data = { | var data = { | ||||
openId: getItem(StorageKeys.OpenId), | openId: getItem(StorageKeys.OpenId), | ||||
height: 100%; | height: 100%; | ||||
padding: 0 10rpx; | padding: 0 10rpx; | ||||
font-size: 28rpx; | font-size: 28rpx; | ||||
color: #00b38b; | |||||
color: black; | |||||
} | } | ||||
.content { | .content { |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard:"", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
opId: getItem(StorageKeys.OpenId), | opId: getItem(StorageKeys.OpenId), | ||||
source: "WECHAT", | source: "WECHAT", | ||||
tabIndex: "0", | tabIndex: "0", | ||||
orderStep: "11" | |||||
orderStep: "11", | |||||
isValueCard:"", | |||||
title:"1", | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard:"", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
// isValueCard: '2' | |||||
isValueCard: '', | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
opId: getItem(StorageKeys.OpenId), | opId: getItem(StorageKeys.OpenId), | ||||
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11' | |||||
orderStep: '11', | |||||
isValueCard:"", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard:"", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
// isValueCard: '2' | |||||
isValueCard: '', | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: "WECHAT", | source: "WECHAT", | ||||
tabIndex: "0", | tabIndex: "0", | ||||
orderStep: "11", | orderStep: "11", | ||||
// isValueCard: "2", | |||||
isValueCard: "", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
<text><text style="color: red">*</text>退货物流公司:</text> | <text><text style="color: red">*</text>退货物流公司:</text> | ||||
<view style="display: flex"> | <view style="display: flex"> | ||||
<u-input v-model="form.courierCompany" class="input" @click="showPicker" | <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> | <u-icon name="arrow-right" style="margin-left: 10px;display: flex;"></u-icon> | ||||
</view> | </view> | ||||
</view> | </view> |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard:"", | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', //渠道为小程序 | source: 'WECHAT', //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: '2' | |||||
isValueCard: '1', | |||||
title:'1', | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
<template> | <template> | ||||
<view class='content'> | <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> | <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='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> | </view> | ||||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的</view> | |||||
</template> | </template> | ||||
<script lang="ts" setup> | <script lang="ts" setup> | ||||
import { reactive } from "vue"; | import { reactive } from "vue"; | ||||
import {request} from "@/utils/network/request.js"; | 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 {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({ | const state = reactive({ | ||||
list:'', //所有数据 | list:'', //所有数据 | ||||
newList:'', //最终展示的 | newList:'', //最终展示的 | ||||
name:'', | |||||
cardId:'', | |||||
value:'',//input框里的值 | value:'',//input框里的值 | ||||
pageNo:1, | |||||
pageSize: 16, | |||||
flags:false, | |||||
}) | }) | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
console.log("option",option) | console.log("option",option) | ||||
state.name=option.name; | |||||
state.cardId=option.cardId; | |||||
getList(); | getList(); | ||||
}) | }) | ||||
const 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> | </script> | ||||
<style scoped> | <style scoped> | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
padding: 30rpx 20rpx; | padding: 30rpx 20rpx; | ||||
margin-top:30rpx; | 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{ | .time{ | ||||
display:flex; | display:flex; | ||||
margin-bottom: 16rpx; | margin-bottom: 16rpx; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
} | } | ||||
.payStatus{ | |||||
color: red; | |||||
float: right; | |||||
} | |||||
</style> | </style> |
"opId": getItem(StorageKeys.OpenId), | "opId": getItem(StorageKeys.OpenId), | ||||
"source": "WECHAT", | "source": "WECHAT", | ||||
"vehiclePlate": "", | "vehiclePlate": "", | ||||
"tabIndex": '3', | |||||
"tabIndex": '0', | |||||
"pageNo": params.pageNum, | "pageNo": params.pageNum, | ||||
"pageSize": params.pageSize | |||||
"pageSize": params.pageSize, | |||||
"isValueCard":"", | |||||
"title":"0", | |||||
"orderStep":"10" | |||||
}, | }, | ||||
method: 'POST', | method: 'POST', | ||||
showLoading: params.pageNum === 1 ? true : false, | showLoading: params.pageNum === 1 ? true : false, |
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '2' | |||||
isValueCard: '', | |||||
title:"1" | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
export const queryRefoundResult="a11d756827f848f79de027a2ec1943c3" //储值卡圈存-半条流水-微信退费结果查询 | export const queryRefoundResult="a11d756827f848f79de027a2ec1943c3" //储值卡圈存-半条流水-微信退费结果查询 | ||||
export const queryStoredQuan="cc907ba2683e481d92398bf6c4d74c57" //储值卡圈存详情-多条件分页查询 | export const queryStoredQuan="cc907ba2683e481d92398bf6c4d74c57" //储值卡圈存详情-多条件分页查询 | ||||
export const queryTrajectory="d6414e83a2a34c4cb0f3da33a0e901bd" //我的上个月轨迹查询 | export const queryTrajectory="d6414e83a2a34c4cb0f3da33a0e901bd" //我的上个月轨迹查询 | ||||
export const queryCardRecord="2124c3086aa04faf84d70c01930cc90c" //用户储值卡充值记录-分页查询 |