@@ -68,6 +68,13 @@ | |||
{ | |||
"root": "subpackage/after-sale", //售后相关 | |||
"pages": [ | |||
{ | |||
"path": "account-recharge/recharge", | |||
"style": { | |||
"navigationBarTitleText": "充值", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "account-recharge/recharge-record", | |||
"style": { |
@@ -26,6 +26,19 @@ | |||
</view> | |||
</view> | |||
<view class="btn btn-primary" @click="rechargeAction">立即充值</view> | |||
<!-- <button @click="state.show = true">支付方式</button> | |||
<u-popup v-model="state.show" mode="bottom" height=400 border-radius="14" closeable=true> | |||
<view class="uni-list"> | |||
<radio-group @change="radioChange"> | |||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in state.items" :key="item.value" style="transform:scale(0.9)"> | |||
<view>{{item.name}}</view> | |||
<view> | |||
<radio :value="item.value" :checked="index === state.current" /> | |||
</view> | |||
</label> | |||
</radio-group> | |||
</view> | |||
</u-popup> --> | |||
</view> | |||
</template> | |||
@@ -102,6 +115,18 @@ | |||
orderNum: "", | |||
cardId: "", //卡号 需要传参 | |||
mockpreBalance: 2000, //fix:模拟余额 目前没有检测状态接口,第一次会模拟圈层检测来检测状态 | |||
show:false, | |||
items: [{ | |||
value: '0', | |||
name: '微信', | |||
checked: 'true' | |||
}, | |||
{ | |||
value: '1', | |||
name: '对公账户' | |||
} | |||
], | |||
current: 0 | |||
}); | |||
@@ -209,7 +234,7 @@ | |||
if (applyResult.orderStatus === "ORDER_NOT_PAY") { | |||
//走支付 | |||
console.log("走支付"); | |||
wxPayment(); | |||
// wxPayment(); | |||
} | |||
}); | |||
} | |||
@@ -678,6 +703,22 @@ | |||
console.log(data); | |||
}); | |||
}; | |||
const radioChange=(evt)=>{ | |||
console.log("evt",evt) | |||
state.show=false; | |||
for (let i = 0; i < state.items.length; i++) { | |||
if (state.items[i].value === evt.detail.value) { | |||
state.current = i; | |||
break; | |||
} | |||
} | |||
if(evt.detail.value==0){ | |||
// 微信支付 | |||
wxPayment(); | |||
}else{ | |||
// 对公账户支付 | |||
} | |||
} | |||
</script> | |||
<style> | |||
@@ -815,4 +856,13 @@ | |||
margin: 200rpx 40rpx 0; | |||
text-align: center; | |||
} | |||
.uni-list{ | |||
padding: 120rpx 10rpx 0 10rpx; | |||
font-size:34rpx; | |||
} | |||
label{ | |||
display: flex; | |||
justify-content: space-between; | |||
margin-top:30rpx; | |||
} | |||
</style> |
@@ -1,16 +1,63 @@ | |||
<template> | |||
<view class='content'> | |||
<view class='search_wrap'> | |||
<input type="text" placeholder='搜索ETC卡号'/><button size='mini'>搜索</button> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch"/><button size='mini' @click='search()'>搜索</button> | |||
</view> | |||
<view class='item'> | |||
<view class='time'><text>时间:2021-07-10 09:37:22</text><text>¥5000</text></view> | |||
<view>ETC卡号:52011328220200045994</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> | |||
</view> | |||
</template> | |||
<script> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {transactionRecord} from "@/utils/network/api.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
list:'', //所有数据 | |||
newList:'', //最终展示的 | |||
name:'', | |||
value:'',//input框里的值 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
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]); | |||
} | |||
} | |||
console.log("state.newList",state.newList) | |||
} | |||
const doSearch=()=>{ | |||
search(); | |||
} | |||
</script> | |||
<style scoped> | |||
@@ -35,11 +82,12 @@ | |||
} | |||
.item{ | |||
width:100%; | |||
border:1rpx solid rgb(203,203,203); | |||
border-radius:10rpx; | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top:30rpx; | |||
background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color:white; | |||
} | |||
.time{ | |||
display:flex; |
@@ -16,14 +16,14 @@ | |||
</u-form-item> | |||
<u-form-item label="验证码"> | |||
<u-input v-model="state.form.code" placeholder='请输入短信验证码'/> | |||
<u-button type="success" size="mini" @click="getCode" v-if="waitTime==0">获取验证码</u-button> | |||
<u-button type="success" size="mini" @click="getCode" v-if="waitTime==1">获取验证码</u-button> | |||
<text class="btn" v-else>{{waitTime}}后重试</text> | |||
</u-form-item> | |||
<u-form-item label="新密码" > | |||
<u-input placeholder='请输入' v-model="state.form.password" /> | |||
<u-input placeholder='请输入' v-model="state.form.password" type='password'/> | |||
</u-form-item> | |||
<u-form-item label="确认密码" > | |||
<u-input placeholder='请输入' v-model="state.form.againPassword" /> | |||
<u-input placeholder='请输入' v-model="state.form.againPassword" type='password'/> | |||
</u-form-item> | |||
</u-form> | |||
<button @click='goLogin()'>确定</button> | |||
@@ -127,4 +127,18 @@ | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
.btn{ | |||
background: #19BE6B; | |||
padding: 0rpx 32rpx; | |||
border-radius: 10rpx; | |||
color: white; | |||
font-size: 24rpx; | |||
height: 46rpx; | |||
line-height: 46rpx; | |||
text-align: center; | |||
} | |||
::v-deep .u-form-item--right__content__slot{ | |||
display:flex !important; | |||
align-items: center; | |||
} | |||
</style> |
@@ -12,27 +12,34 @@ | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/consumption-record`)'> | |||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/consumption-record?name=${state.name}`)'> | |||
<view class='left_content'> | |||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||
<view>消费明细</view> | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/recharge-record`)'> | |||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/recharge-record?name=${state.name}`)'> | |||
<view class='left_content'> | |||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||
<view>充值明细</view> | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
<view class='item' @click='navTo(`/subpackage/personal-center/setting/bank-card/bank-card?name=state.name`)'> | |||
<view class='item' @click='navTo(`/subpackage/personal-center/setting/bank-card/bank-card?name=${state.name}`)'> | |||
<view class='left_content'> | |||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||
<view>银行卡管理</view> | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/recharge?name=${state.name}`)'> | |||
<view class='left_content'> | |||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||
<view>充值服务</view> | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
</view> | |||
<view class='item item_wrap' @click='navTo(`/subpackage/after-sale/account-recharge/login`)'> | |||
<view class='left_content'> | |||
@@ -54,6 +61,7 @@ | |||
}) | |||
onLoad((option : any) => { | |||
state.name=option.name; | |||
console.log("name",state.name) | |||
}) | |||
</script> | |||
@@ -54,8 +54,8 @@ | |||
// .catch((err) => { | |||
// console.log(err); | |||
// }); | |||
navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
// navTo(`/subpackage/after-sale/account-recharge/index?name=scyl12345`); | |||
// navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
navTo(`/subpackage/after-sale/account-recharge/index?name=scyl12345`); | |||
} | |||
const goAccount=()=>{ | |||
navTo(`/subpackage/after-sale/account-recharge/go-account`); |
@@ -1,11 +1,97 @@ | |||
<template> | |||
<view> | |||
充值明细 | |||
<view class='content'> | |||
<view class='search_wrap'> | |||
<input type="text" v-model='state.value' placeholder='搜索ETC卡号' @confirm="doSearch"/><button size='mini' @click='search()'>搜索</button> | |||
</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> | |||
</view> | |||
</template> | |||
<script> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {transactionRecord} from "@/utils/network/api.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
list:'', //所有数据 | |||
newList:'', //最终展示的 | |||
name:'', | |||
value:'',//input框里的值 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
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]); | |||
} | |||
} | |||
console.log("state.newList",state.newList) | |||
} | |||
const doSearch=()=>{ | |||
search(); | |||
} | |||
</script> | |||
<style> | |||
<style scoped> | |||
.content{ | |||
/* background-color:#f6f6f6; */ | |||
min-height:100vh; | |||
padding: 0 30rpx; | |||
overflow: hidden; | |||
font-size: 32rpx; | |||
} | |||
.search_wrap{ | |||
display:flex; | |||
margin:20rpx 0; | |||
} | |||
.search_wrap>input{ | |||
background-color:rgb(238,240,237); | |||
width: 76%; | |||
height: 40rpx; | |||
line-height: 40rpx; | |||
padding: 10rpx 10rpx; | |||
border-radius: 10rpx 0 0 10rpx; | |||
} | |||
.item{ | |||
width:100%; | |||
border-radius:10rpx; | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top:30rpx; | |||
background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
color:white; | |||
} | |||
.time{ | |||
display:flex; | |||
margin-bottom: 16rpx; | |||
justify-content: space-between; | |||
} | |||
</style> |
@@ -0,0 +1,145 @@ | |||
<template> | |||
<view class='wrap'> | |||
<u-form :model="form" ref="form1" label-width=160 border-bottom=false> | |||
<u-form-item label="用户名" border-bottom=true > | |||
<u-input placeholder='请输入用户名' type="text" v-model="state.form.name"/> | |||
</u-form-item> | |||
<u-form-item label="充值金额" > | |||
<u-input placeholder='请输入充值金额' type="text" v-model="state.form.fee"/> | |||
</u-form-item> | |||
<u-form-item label="银行卡"> | |||
<view class='card' @click='goBank()'> | |||
<u-input placeholder='请输入银行卡号' v-model="state.form.cardNumber" type="text" disabled/> | |||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||
</view> | |||
</u-form-item> | |||
<u-form-item label="充值凭证" > | |||
<view class='item' @click="cardDbImageOcr(1)"> | |||
<image v-if="!state.form.url" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||
</image> | |||
<image v-else class="icon" :src="state.form.url"></image> | |||
</view> | |||
</u-form-item> | |||
<button @click='goRecharge()'>充值</button> | |||
</u-form> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import {reactive} from "vue"; | |||
import {etcOcrCard,queryRecharge} from "@/utils/network/api.js"; | |||
import {request} from "@/utils/network/request.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import {pathToBase64} from "@/utils/image-tools/index.js"; | |||
import { navTo } from "@/utils/utils"; | |||
import {onLoad} from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
form:{ | |||
name:'',//对公用户登录名 | |||
fee:'', | |||
cardNumber:'', | |||
url:'', | |||
} | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option.cardNumber) | |||
state.form.cardNumber=option.cardNumber; | |||
}); | |||
const goRecharge=()=>{ | |||
for(var i in state.from){ | |||
if(!state.from[i]){ | |||
msg('请把信息填写完整!') | |||
return; | |||
} | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
'accountId':state.from.name, //账户编号 | |||
'fee':state.from.fee, //公司营业执照统一社会信用代码 | |||
'bankCardId':state.from.cardNumber, //对公名称 | |||
'imageUrl':state.from.url, //密码 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(queryRecharge, options) | |||
.then((res) => { | |||
let data = stringToJson(res.bizContent) | |||
console.log("充值成功",data) | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
} | |||
const goBank=()=>{ | |||
uni.redirectTo({ | |||
//关闭当前页面,跳转到应用内的某个页面。 | |||
url:`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1&value=encodeURIComponent(JSON.stringify(state.from))` | |||
}); | |||
// navTo(`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1`) | |||
} | |||
const cardDbImageOcr = (val : any) => { | |||
var imageType = val; | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
pathToBase64(res.tempFilePaths[0]) | |||
.then((path) => { | |||
var data = { | |||
source: "1", | |||
agencyId: "52010106004", | |||
imageType: imageType, | |||
fileName: res.tempFilePaths[0], | |||
imageBase64: path, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log("cdfdf") | |||
request(etcOcrCard, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.form.url = data.imageUrl; | |||
}); | |||
}) | |||
.catch((error) => { }); | |||
}, | |||
}); | |||
}; | |||
</script> | |||
<style scoped> | |||
.wrap{ | |||
padding: 0 30rpx; | |||
} | |||
/deep/.u-form-item--right__content__slot{ | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
image{ | |||
width: 200rpx; | |||
height:200rpx; | |||
} | |||
button{ | |||
width: 75%; | |||
height: 80rpx; | |||
margin-top:450rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
.card{ | |||
width: 100%; | |||
display: flex; | |||
justify-content: space-between; | |||
} | |||
</style> |
@@ -48,7 +48,7 @@ | |||
{src:'bg-black',checkSrc:'icon-select-black',id:2,color:'#ffffff',title:'黑色'}, | |||
{src:'bg-white',checkSrc:'icon-select-white',id:3,color:'#000000',title:'白色'}, | |||
{src:'bg-white_blue',checkSrc:'icon-select-blue',id:6,color:'#ffffff',title:'蓝白渐变'}, | |||
{src:'green',checkSrc:'icon-select-green',id:11,color:'#ffffff',title:'绿色'}, | |||
{src:'green',checkSrc:'icon-green',id:11,color:'#ffffff',title:'绿色'}, | |||
{src:'rad',checkSrc:'icon-select-red',id:12,color:'#ffffff',title:'红色'}, | |||
] | |||
}) |
@@ -38,8 +38,8 @@ | |||
{src:'bg-green',checkSrc:'icon-select-green',id:4,color:'#000000',title:'渐变绿色'}, | |||
{src:'bg-yellow_green',checkSrc:'icon-select-yellow_green',id:5,color:'#000000',title:'黄绿双拼'}, | |||
{src:'bg-white_blue',checkSrc:'icon-select-blue',id:6,color:'#000000',title:'蓝白渐变'}, | |||
// {src:'bg-white_blue',checkSrc:'icon-select-blue',id:11,color:'#000000',title:'绿色'}, | |||
// {src:'bg-white_blue',checkSrc:'icon-select-blue',id:12,color:'#000000',title:'红色'}, | |||
{src:'green',checkSrc:'icon-green',id:11,color:'#ffffff',title:'绿色'}, | |||
{src:'rad',checkSrc:'icon-select-red',id:12,color:'#ffffff',title:'红色'}, | |||
], | |||
}) | |||
@@ -57,6 +57,7 @@ | |||
}, | |||
// isDefault:0, //是否默认 | |||
}) | |||
const submit = () => { | |||
for(var i in state.form){ | |||
if(!state.form[i]){ |
@@ -1,5 +1,5 @@ | |||
<template> | |||
<view class="container" @click="navTo('/subpackage/personal-center/setting/bank-card/bank-card-add')"> | |||
<view class="container" @click="choice('1111')"> | |||
<view class=""> | |||
<image class="bg" style="width:100%;height: 260rpx;" :src="`${$imgUrl}bank-bg.png`"></image> | |||
<view class="content"> | |||
@@ -51,8 +51,10 @@ | |||
name:'' | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",option) | |||
state.name=option.name; | |||
getBankList(); | |||
state.choiceCard=option.choiceCard; | |||
// getBankList(); | |||
}) | |||
const getBankList=()=>{ | |||
const options = { | |||
@@ -84,6 +86,17 @@ | |||
getBankList(); | |||
}) | |||
} | |||
const choice=(cardNumber)=>{ | |||
if(!state.choiceCard){ | |||
navTo('/subpackage/personal-center/setting/bank-card/bank-card-add') | |||
}else{ | |||
uni.redirectTo({ | |||
//关闭当前页面,跳转到应用内的某个页面。 | |||
url:`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}` | |||
}); | |||
// navTo(`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`) | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> |
@@ -214,3 +214,5 @@ export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登 | |||
export const addBankCard="578a8372a8c0414aa917c84ac8c802b9" //对公账户银行账户添加接口 | |||
export const queryBankCard="769790d75f3648a8925312c7e1496860" //对公账户银行账户查询接口 | |||
export const delBankCard="0a05e54acebe46d29e2fbcaf1db95c75" //对公账户银行账户移除接口 | |||
export const transactionRecord="d713b25213c64633b2c048fb1cfab7c6" //对公账户交易记录查询服务 | |||
export const queryRecharge="bd8d3b44734c4d05b9c586815d0b98d8" //对公账户充值服务 |
@@ -28,7 +28,7 @@ export function request(code, options = {}) { | |||
loginSource: "69af303ba2eb4608a099163f0d2a5dbd", | |||
rbacSource:'MINI_PROGRAM' | |||
} | |||
//Url 地址 | |||
//Url 地址 /api/interfaceMidGroundIn | |||
options.url = 'http://'+ envs[process.env.NODE_ENV].baseUrl +'/ifzt/api/interfaceMidGroundIn' | |||
//判断baseUri是否为空 | |||
if (options.baseUrl) { |