@@ -297,6 +297,13 @@ | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "account-recharge/recharge-weixin", | |||
"style": { | |||
"navigationBarTitleText": "圈存", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "account-recharge/open-account", | |||
"style": { |
@@ -80,6 +80,7 @@ | |||
rechargeMoney: "",//消费明细圈存传过来的金额 | |||
orderNum: 0,//消费明细 传orderNum说明去支付 | |||
payMoney: 0,//0 修复 1 支付 | |||
accountId: "",//对公账户名称 | |||
}); | |||
const deviceList = ref([]); | |||
const connectPrefixName = ref(null); | |||
@@ -123,6 +124,10 @@ | |||
if (option.payMoney) { | |||
state.payMoney = option.payMoney | |||
} | |||
if (option.accountId) { | |||
state.accountId = option.accountId | |||
} | |||
console.log("传过来的参数", option) | |||
}); | |||
@@ -540,7 +545,7 @@ | |||
}; | |||
function oks() { | |||
//routeType 1.激活(订单来) 2.圈存 (/pages/recharge/recharge来)3.ping码解锁 4.信息读取 5从哪里来回哪里去监听bluetoothLink 7消费明细去圈存 | |||
//routeType 1.激活(订单来) 2.圈存 (/pages/recharge/recharge来)3.ping码解锁 4.信息读取 5从哪里来回哪里去监听bluetoothLink 7消费明细去圈存 8单位账户圈存 | |||
if (routeType.value == "1") { | |||
uni.navigateTo({ | |||
url: `/subpackage/after-sale/activation/activate?transfer=${state.transfer}`, | |||
@@ -583,6 +588,10 @@ | |||
uni.navigateTo({ | |||
url: `/subpackage/personal-center/trapping-and-repairing/recharge-two?rechargeMoney=${state.rechargeMoney}&&orderNum=${state.orderNum}&&payMoney=${state.payMoney}`, | |||
}); | |||
} else if (routeType.value == "8") { | |||
uni.navigateTo({ | |||
url: `/subpackage/after-sale/account-recharge/recharge-weixin?accountId=${state.accountId}`, | |||
}); | |||
} else { | |||
return; | |||
} |
@@ -21,12 +21,12 @@ | |||
</radio-group> | |||
</view> | |||
</view> | |||
<!-- <view @click="goRecord"> | |||
<view @click="goRecord"> | |||
<view style="display: flex;align-items: center;"> | |||
<image class="photo" :src="fileURL + 'image/index/consumptionDetails.png'"></image>充值明细 | |||
</view> | |||
<image class="photo1" src="../../static/image/icon-back.png" mode="widthFix"></image> | |||
</view> --> | |||
</view> | |||
</view> | |||
<view class="tips" v-if="source=='WECHAT'">温馨提示: <text class="red">NFC充值</text>仅支持在<text | |||
class="red">安卓手机</text>进行ETC储值卡充值!</view> |
@@ -381,10 +381,6 @@ | |||
(card.money = parseInt(parseInt(res[3].substring(0, 8), 16), 10)), | |||
console.log("======卡信息======", card, card.money); | |||
// if (card.cardId !== state.cardId) { | |||
// msg("设备卡信息与当前充值卡号不匹配,请核对卡号"); | |||
// return; | |||
// } | |||
quanCheckActionTrue().then((val) => { | |||
checkQuanCengEvent(val); | |||
}); |
@@ -6,7 +6,7 @@ | |||
</view> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view class='time'><text>时间:{{item.tradeConfirmTime}}</text><text>¥{{item.fee/100}}</text></view> | |||
<view>ETC卡号:{{item.bankCardId}}</view> | |||
<view>银行卡号:{{item.bankCardId}}</view> | |||
</view> | |||
</view> | |||
</template> |
@@ -5,7 +5,7 @@ | |||
<view>¥{{state.money/100}}</view> | |||
</view> | |||
<view class='item_wrap'> | |||
<view class='item' @click='navTo(`/pages/recharge/recharge-pay`)'> | |||
<view class='item' @click='navTo(`/pages/bluetooth/bluetooth?routeType=8&&accountId=${state.name}`)'> | |||
<view class='left_content'> | |||
<image :src="fileURL + 'image/index/item-1.png'" mode="aspectFill"></image> | |||
<view>去圈存</view> |
@@ -5,8 +5,8 @@ | |||
<input class="uni-input" focus placeholder="请输入用户名" v-model='state.name' /> | |||
</view> | |||
<view class="item"> | |||
<text>密码:</text> | |||
<input style='width:412rpx;' class="uni-input" focus placeholder="请输入密码" v-model='state.password' | |||
<text>对公用户密码:</text> | |||
<input style='width:412rpx;' class="uni-input" focus placeholder="请输入对公用户密码" v-model='state.password' | |||
type='password' /> | |||
</view> | |||
<button @click='login()'>登录</button> | |||
@@ -85,13 +85,13 @@ | |||
.item { | |||
display: flex; | |||
border-bottom: 2rpx solid rgb(239, 239, 239); | |||
padding: 18rpx 36rpx; | |||
padding: 18rpx 24rpx; | |||
font-size: 32rpx; | |||
align-items: center; | |||
} | |||
.item>text { | |||
width: 24%; | |||
width: 32%; | |||
} | |||
button { |
@@ -36,9 +36,8 @@ | |||
<u-input placeholder='请输入7-16位字母加数字组成的账号' type="text" v-model="state.form.name" /> | |||
</u-form-item> | |||
<u-form-item label="对公用户密码"> | |||
<!-- <u-input placeholder='请输入对公用户密码' type="text" v-model="state.form.passWord" /> --> | |||
<view class="form-input"> | |||
<input class="input" v-model="state.form.passWord" placeholder="请输入密码" | |||
<input class="input" v-model="state.form.passWord" placeholder="请输入对公用户密码" | |||
placeholder-class="color: #c0c4cc;" :password="state.isPwdType ? true : false" | |||
type="text" /> | |||
<image :src="`${$imgUrl}login/${ | |||
@@ -46,10 +45,12 @@ | |||
}.png`" class="eye" @click="state.isPwdType = !state.isPwdType" mode="aspectFill"></image> | |||
</view> | |||
</u-form-item> | |||
<view class="tips" style="margin-top: -36rpx;font-size: 24rpx;"><text> * | |||
</text>密码必须包含至少一个数字、一个小写字母、一个大写字母,并且长度至少为8个字符 | |||
</view> | |||
<u-form-item label="支付密码"> | |||
<!-- <u-input placeholder='请输入支付密码' type="text" v-model="state.form.consumePassword" /> --> | |||
<view class="form-input"> | |||
<input class="input" v-model="state.form.consumePassword" placeholder="请再次输入密码" | |||
<input class="input" v-model="state.form.consumePassword" placeholder="请输入6位数字组成支付密码" | |||
placeholder-class="color: #c0c4cc;" :password="state.isAffirmPwdType ? true : false" | |||
type="text" /> | |||
<image :src="`${$imgUrl}login/${ | |||
@@ -57,9 +58,6 @@ | |||
}.png`" class="eye" @click="state.isAffirmPwdType = !state.isAffirmPwdType" mode="aspectFill"></image> | |||
</view> | |||
</u-form-item> | |||
<!-- <u-form-item label="公司证件类型 "> | |||
<u-input v-model="state.form.type" type="select" :select-open="state.showType" @click="state.showType = true" placeholder='请选择'/> | |||
</u-form-item> --> | |||
<u-form-item label="公司证件编码 "> | |||
<u-input placeholder='请输入公司证件编码' type="text" v-model="state.form.code" /> | |||
</u-form-item> | |||
@@ -79,14 +77,6 @@ | |||
<u-input placeholder='请输入开户行' type="text" v-model="state.form.bankAddress" /> | |||
</u-form-item> | |||
</u-form> | |||
<!-- <view class='pay_msg'>付款银行账户信息</view> | |||
<view class='company' @click='goBankCard()'> | |||
<view> | |||
<view><text>123456</text><text>贵阳银行股份有限公司</text></view> | |||
<view class='phone'>123****5678</view> | |||
</view> | |||
<u-icon name="arrow-right" color='#ccc' size='40'></u-icon> | |||
</view> --> | |||
</view> | |||
<view class='attention'> | |||
<view>注意事项:</view> | |||
@@ -208,10 +198,6 @@ | |||
const camera = () => { | |||
state.phoneType = 0 | |||
} | |||
// 选择公司证件类型的回调 | |||
// const regionConfirmType=(e : any)=>{ | |||
// state.form.type=state.typeList[e] | |||
// } | |||
const goBankCard = () => { | |||
navTo(`/subpackage/personal-center/setting/bank-card/bank-card`); | |||
} | |||
@@ -251,7 +237,7 @@ | |||
let data = stringToJson(res.bizContent) | |||
console.log("开户成功", data.status) | |||
uni.showModal({ | |||
content: '申请已受理,请等待审核', | |||
content: '申请已受理,请等待审核,请到【查询服务】的【对公账户查询】查看进度', | |||
showCancel: false, | |||
success: function (res) { | |||
if (res.confirm) { | |||
@@ -293,22 +279,6 @@ | |||
}, | |||
}); | |||
}; | |||
//委托书获取图片给后端 | |||
// const cardFileImageUpdateyy = (val : any) => { | |||
// var data = { | |||
// fileBase64: val, | |||
// }; | |||
// const options = { | |||
// type: 2, | |||
// data: data, | |||
// method: "POST", | |||
// showLoading: true, | |||
// }; | |||
// request(fileUpload, options).then((res) => { | |||
// const data = stringToJson(res.bizContent); | |||
// state.form.url1 = data.data.url; | |||
// }); | |||
// }; | |||
const shiqu = () => { | |||
console.log("state.form.handlerPhone", state.form.handlerPhone) | |||
} |
@@ -0,0 +1,882 @@ | |||
<template> | |||
<view class="wrapper"> | |||
<view class="list"> | |||
<view><text>账户余额:</text>¥{{state.accountMoney/100}}</view> | |||
<view><text>ETC卡号:</text>{{state.cardId}}</view> | |||
<view><text>ETC卡内余额:</text>¥{{card.money/100}}</view> | |||
</view> | |||
<view class="input-box"> | |||
<input v-model="state.money" placeholder="请输入金额" class="input" @input="checkNum" /> | |||
<view class="tips">最低圈存金额不小于10元</view> | |||
</view> | |||
<view class="tabs"> | |||
<view class="tab-tit">请选择或输入圈存金额:</view> | |||
<view class="tab"> | |||
<view v-for="(item,index) in state.moneryArray" @click="tableIndexAction(index)" :key="index" | |||
:class="{'item':state.moneryArray,'active':state.tableIndex===index}">{{item.name}}</view> | |||
</view> | |||
</view> | |||
<view class="btn btn-primary" @click="rechargeAction">立即充值</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption"; | |||
import { | |||
onLoad, | |||
onShow | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
quanCheck, | |||
quanApply, | |||
quanXf, | |||
cardCzPayResultCheck, | |||
cardCzApply, | |||
cardCzPay, | |||
cardCzPayResult, | |||
cardCzXFCheck, | |||
quanConfirm, | |||
wechatAppID, | |||
wechatPayConfigId, | |||
wechatSecret, | |||
aliPayConfigId, | |||
obtainUserId, | |||
getOpenidApi, | |||
accountMoneyApi | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
import { | |||
reactive | |||
} from "vue"; | |||
import { | |||
navTo | |||
} from "@/utils/utils" | |||
import { | |||
msg | |||
} from "@/utils/utils"; | |||
import { | |||
getItem, | |||
StorageKeys, | |||
setItem | |||
} from "@/utils/storage"; | |||
const datas = require("../../../static/etcUtil/datas.js"); | |||
const bluetoothUtil = require("../../../static/etcUtil/index.js"); | |||
const cmd = require("../../../static/etcUtil/cmdConfig.js"); | |||
const tools = require("../../../static/etcUtil/tools.js"); | |||
const NFCAPI = require('../../../static/nfc/NFCAPI.js'); | |||
const state = reactive({ | |||
moneryArray: [{ | |||
name: '50元', | |||
value: 50 | |||
}, { | |||
name: '100元', | |||
value: 100 | |||
}, { | |||
name: '200元', | |||
value: 200 | |||
}, { | |||
name: '300元', | |||
value: 300 | |||
}, { | |||
name: '500元', | |||
value: 500 | |||
}, { | |||
name: '1000元', | |||
value: 1000 | |||
}], | |||
tableIndex: 0, | |||
openid: "", | |||
connectSuccess: undefined, | |||
fee: 5000, | |||
money: 50, | |||
orderNum: "", | |||
transWayName: "蓝牙", | |||
transWay: "blu", //“blu”为蓝牙充值方式、“nfc”为NFC充值方式 | |||
cardId: "", //卡号 需要传参 | |||
mockpreBalance: 2000, //fix:模拟余额 目前没有检测状态接口,第一次会模拟圈存检测来检测状态 | |||
show: false, | |||
items: [{ | |||
value: '0', | |||
name: '微信', | |||
checked: 'true' | |||
}, | |||
{ | |||
value: '1', | |||
name: '对公账户' | |||
} | |||
], | |||
current: 0, | |||
tradeType: 14, | |||
accountId: "",//对公账户id | |||
accountMoney: 0 //对公账户余额 | |||
}); | |||
const selectConfirm = (item : any) => { | |||
state.transWayName = item[0].label | |||
state.transWay = item[0].value | |||
}; | |||
//读卡信息 | |||
const card : any = reactive({ | |||
cardId: "", | |||
netId: "", | |||
cardType: "", | |||
startTime: "", | |||
endTime: "", | |||
userName: "", | |||
idNum: "", | |||
vehiclePlate: "", | |||
vehiclePlateColor: "", | |||
color: "", | |||
version: "", | |||
type: "", | |||
favourable: "", | |||
money: undefined, | |||
v_userType: "", | |||
}); | |||
onLoad((option) => { | |||
state.accountId = option.accountId | |||
getMoney(); | |||
}); | |||
const getMoney = () => { | |||
let options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
data: { | |||
accountId: state.accountId | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) | |||
}; | |||
//调用方式 | |||
request(accountMoneyApi, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.accountMoney = data.money | |||
getCardId(); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
} | |||
const tableIndexAction = (val : any) => { | |||
state.tableIndex = val | |||
state.money = state.moneryArray[val].value | |||
} | |||
/*点击充值按钮*/ | |||
const rechargeAction = () => { | |||
state.fee = state.money * 100; //元换成分 | |||
quanCheckActionTrue().then((val) => { | |||
checkQuanCengEvent(val); | |||
}); | |||
}; | |||
/*读卡*/ | |||
const getCardId = () => { | |||
console.log("======获取卡信息======"); | |||
let cmdArr = [ | |||
cmd.HOME_DIRECTORY, | |||
//选择主目 | |||
cmd.APPLICATION_DIRECTORY, | |||
//选择文件1001--DF01联网收费应用目录 | |||
cmd.CMD_READBINARY, | |||
//15文件--卡片发行基本数据文件 | |||
cmd.CMD_GETBALANCE, | |||
//钱包 | |||
]; | |||
tools.showLoadingAlert("正在执行指令"); | |||
transCmd(cmdArr, function (res : any) { | |||
// 只读卡号 | |||
getCardIdReturnReadCard(res) | |||
}) | |||
}; | |||
function getCardIdReturnReadCard(res : any) { | |||
tools.hideLoadingAlert(); | |||
//10:写卡 20:写OBU | |||
let str = res[2].substring(res[2].length - 4, res[2].length); | |||
let str3 = res[3].substring(res[3].length - 4, res[3].length); | |||
if (str == "9000" || str3 == "9000") { | |||
if (res[2].length > 86 || res[3] >= 12) { | |||
state.cardId = res[2].substring(20, 40); //卡号 | |||
card.cardId = res[2].substring(20, 40); //卡号 | |||
card.money = parseInt(parseInt(res[3].substring(0, 8), 16), 10) | |||
console.log("======卡信息======", card, state.cardId); | |||
} else { | |||
console.error("CMD_READBINARY指令长度不符" + res[2]); | |||
tools.hideLoadingAlert(); | |||
} | |||
} | |||
console.error("CMD_READBINARY指令长度不符" + res[2]); | |||
tools.hideLoadingAlert(); | |||
} | |||
const checkQuanCengEvent = (val : any) => { | |||
if (val.chargeStatus === 1) { | |||
let cmdArr = val.command.split(","); | |||
uni.showLoading({ | |||
title: "写入中", | |||
}); | |||
transCmd(cmdArr, function (res : any) { | |||
let response = res.toString(); | |||
var dic = { | |||
command: val.command, | |||
cosResponse: response, | |||
}; | |||
uni.hideLoading(); | |||
quanApplyAction(dic).then((value : any) => { | |||
console.log("圈存申请完后的结果"); | |||
console.log(value.commandType, value); | |||
//圈存初始化验证通过 , 进行圈存 | |||
if (value.commandType === 2) { | |||
uanConfirmAction(value); | |||
} else { | |||
console.log("第二次70", value) | |||
let cmdArr = value.command.split(","); | |||
uni.showLoading({ | |||
title: "写入中", | |||
}); | |||
transCmd(cmdArr, function (res : any) { | |||
let response = res.toString(); | |||
var dic = { | |||
command: val.command, | |||
cosResponse: response, | |||
}; | |||
uni.hideLoading(); | |||
quanApplyAction(dic).then((values) => { | |||
console.log("圈存申请完后的结果"); | |||
uanConfirmAction(values); | |||
}); | |||
}) | |||
} | |||
}); | |||
}); | |||
} else { | |||
let cmdArr = val.command.split(","); | |||
uni.showLoading({ | |||
title: "写入中", | |||
}); | |||
transCmd(cmdArr, function (res : any) { | |||
var status = res[1].substring(res[1].length - 4, res[1].length); | |||
console.log("打印状态"); | |||
console.log(status); | |||
if (status === "9000") { | |||
console.log("修复指令入参"); | |||
let response = res.toString(); | |||
var dic = { | |||
command: val.command, | |||
cosResponse: response, | |||
rechargeId: val.rechargeId, | |||
}; | |||
quanFixAction(dic).then((value : any) => { | |||
state.orderNum = value.orderId | |||
state.tradeType = value.tradeType | |||
console.log(value); | |||
console.log("修复结果返回"); | |||
var fixStatus = value.fixStatus; | |||
//圈存修复COS指令Response信息不足,重新进行修复初始化 | |||
if (fixStatus === 3) { | |||
let xfcmdArr = value.command.split(","); | |||
bluetoothUtil.transCmd(xfcmdArr, "10", function (resValueData) { | |||
var status = resValueData[1].substring( | |||
resValueData[1].length - 4, | |||
resValueData[1].length | |||
); | |||
console.log("打印状态"); | |||
console.log(status); | |||
if (status === "9000") { | |||
console.log(resValueData); | |||
var valueResponse = resValueData.toString(); | |||
console.log(response); | |||
var applyDic = { | |||
command: value.command, | |||
cosResponse: valueResponse, | |||
rechargeId: value.rechargeId, | |||
}; | |||
console.log("消费成功"); | |||
quanApplyAction(applyDic).then((applyValue) => { | |||
uanConfirmAction(applyValue); | |||
}); | |||
} | |||
}); | |||
} else if (fixStatus === 2) { | |||
uanConfirmSucessAction(value).then((confirmResult) => { | |||
console.log("充值成功") | |||
getCardId(1) | |||
setTimeout(() => { | |||
msg("充值成功"); | |||
navTo(`./result?cardId=${card.cardId}`) | |||
}, 2000) | |||
}); | |||
} else if (fixStatus === 1) { | |||
quanCheckActionTrue().then((val) => { | |||
checkQuanCengEvent(val); | |||
}); | |||
} | |||
}); | |||
uni.hideLoading(); | |||
} | |||
}); | |||
} | |||
}; | |||
/*透传*/ | |||
const transCmd = (cmd : any, click : any) => { | |||
if (state.transWay == 'blu') { | |||
bluetoothUtil.transCmd(cmd, "10", function (res : any) { | |||
click(res); | |||
}); | |||
} else { | |||
//nfc透传 | |||
NFCAPI.transCmd(cmd, function (res : any) { | |||
tools.hideLoadingAlert(); | |||
if (res.code == 0) { | |||
click(res.data); | |||
} else { | |||
//透传失败返回 | |||
tools.alertF(res.msg); | |||
} | |||
}); | |||
} | |||
}; | |||
const quanCheckActionTrue = () => { | |||
console.log("进行真实圈存检测"); | |||
var data = { | |||
cardId: card.cardId, | |||
fee: state.fee, | |||
preBalance: card.money, | |||
tradeType: 12, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(quanCheck, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*充值消费*/ | |||
const cardCzXFCheckAction = () => { | |||
var data = { | |||
cardId: card.cardId, //修复初始化的指令 | |||
openId: getItem(StorageKeys.OpenId), //修复初始化结果 | |||
orderNum: state.orderNum, //充值流水号 | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(cardCzXFCheck, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*圈存修复*/ | |||
const quanFixAction = (val) => { | |||
var data = { | |||
command: val.command, //修复初始化的指令 | |||
cosResponse: val.cosResponse, //修复初始化结果 | |||
rechargeId: val.rechargeId, //充值流水号 | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(quanXf, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*圈存申请*/ | |||
const quanApplyAction = (data) => { | |||
console.log("圈存申请data====", data, data.rechargeId) | |||
var form = { | |||
cardId: card.cardId, | |||
fee: state.fee, | |||
preBalance: card.money, | |||
tradeType: state.tradeType, | |||
command: data.command, | |||
cosResponse: data.cosResponse, | |||
orderId: state.orderNum, | |||
rechargeId: data.rechargeId, | |||
openId: getItem(StorageKeys.OpenId) | |||
}; | |||
const options = { | |||
type: 2, | |||
data: form, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(quanApply, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*圈存确认*/ | |||
const uanConfirmAction = (data : any) => { | |||
console.log("圈存确认进入"); | |||
let cmdArr = data.command.split(","); | |||
console.log(cmdArr); | |||
transCmd(cmdArr, function (res : any) { | |||
console.log("圈存透传"); | |||
console.log(res); | |||
var arraylenth = res.length; | |||
var status = res[arraylenth - 1].substring( | |||
res[arraylenth - 1].length - 4, | |||
res[arraylenth - 1].length | |||
); | |||
console.log("打印圈存确认指令状态"); | |||
if (status === "9000") { | |||
var form = { | |||
command: data.command, | |||
cosResponse: res.toString(), | |||
rechargeId: data.rechargeId, | |||
paidAmount: state.fee, | |||
giftAmount: 0, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: form, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async () => { | |||
const res = await request(quanConfirm, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("data充值成功", data); | |||
getCardId(1) | |||
setTimeout(() => { | |||
msg("充值成功"); | |||
navTo(`./result?cardId=${card.cardId}`) | |||
}, 2000) | |||
}).catch((error) => { | |||
console.log('输出内容', error) | |||
}); | |||
} | |||
}); | |||
}; | |||
const uanConfirmSucessAction = (data) => { | |||
var form = { | |||
command: data.command, | |||
cosResponse: "9000", | |||
rechargeId: data.rechargeId, | |||
paidAmount: state.fee, | |||
giftAmount: 0, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: form, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(quanConfirm, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
console.log("uanConfirmSucessAction", data) | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*充值检测*/ | |||
const czCheckAction = () => { | |||
var form = { | |||
cardId: state.cardId, | |||
openId: getItem(StorageKeys.OpenId), | |||
}; | |||
const options = { | |||
type: 2, | |||
data: form, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(cardCzPayResultCheck, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("充值检测", data) | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
/*充值申请*/ | |||
const cardCzApplyAction = () => { | |||
var data = { | |||
cardId: state.cardId, | |||
openId: getItem(StorageKeys.OpenId), | |||
rechargeMoney: state.fee, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(cardCzApply, options); | |||
const data = stringToJson(res.bizContent); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
}; | |||
//获取微信小程序openid | |||
const getOpenID = () => { | |||
uni.login({ | |||
provider: "weixin", | |||
success: function (e) { | |||
getOpenid(e.code); | |||
}, | |||
fail: function () { | |||
msg("获取不到oppenId,请检查AppID和Secret是否争取"); | |||
}, | |||
}); | |||
}; | |||
const getOpenid = (code) => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"jsCode": code | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
// #ifdef MP-WEIXIN | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
const openidData = stringToJson(result.data); | |||
// setItem("QYorder", result.data); | |||
state.openid = openidData.openid | |||
}); | |||
// #endif | |||
} | |||
//掉起微信支付 | |||
const wxPayment = () => { | |||
// #ifdef MP-WEIXIN | |||
const options = { | |||
type: 2, | |||
data: { | |||
openId: getItem(StorageKeys.OpenId), | |||
wxOpenId: state.openid, | |||
cardId: state.cardId, | |||
orderNum: state.orderNum, | |||
payConfigId: wechatPayConfigId, | |||
body: "储值卡充值", | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(cardCzPay, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
uni.requestPayment({ | |||
provider: "wxpay", | |||
orderInfo: "", | |||
timeStamp: data.timestamp, | |||
nonceStr: data.noncestr, | |||
package: data.wxPackage ? data.wxPackage : "", | |||
signType: data.signType, | |||
paySign: data.sign, | |||
success: function () { | |||
//回调订单状态 | |||
console.log("回调订单状态"); | |||
checkOrder(); | |||
}, | |||
fail: function (err) { | |||
confirm(err, () => { }, "支付失败", false); | |||
}, | |||
}); | |||
}); | |||
// #endif | |||
}; | |||
//掉起支付宝支付 | |||
const aliPayment = () => { | |||
// #ifdef MP-ALIPAY | |||
my.getAuthCode({ | |||
scopes: 'auth_base', | |||
success: res => { | |||
const optionsUser = { | |||
type: 2, | |||
data: { | |||
payConfigId: aliPayConfigId, | |||
code: res.authCode | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(obtainUserId, optionsUser).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
const optionsali = { | |||
type: 2, | |||
data: { | |||
openId: getItem(StorageKeys.OpenId), | |||
wxOpenId: data.openId, | |||
cardId: state.cardId, | |||
orderNum: state.orderNum, | |||
payConfigId: "6a9a54123456578934edfre132b1234", | |||
body: "储值卡充值", | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(cardCzPay, optionsali).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
my.tradePay({ | |||
// 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号 trade_no | |||
tradeNO: data.tranPackage, | |||
success: res => { | |||
console.log("支付成功", res); | |||
checkOrder(); | |||
}, | |||
fail: res => { | |||
confirm(res, () => { }, "支付失败", false); | |||
}, | |||
}); | |||
}); | |||
}); | |||
}, | |||
fail: err => { | |||
console.log('my.getAuthCode 调用失败', err) | |||
} | |||
}); | |||
// #endif | |||
}; | |||
//支付成功改变订单状态 | |||
const checkOrder = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
cardId: state.cardId, | |||
openId: getItem(StorageKeys.OpenId), | |||
orderNum: state.orderNum, | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(cardCzPayResult, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
if (data.tradeState === "SUCCESS") { | |||
getCardId(); | |||
} | |||
console.log(data); | |||
}); | |||
}; | |||
const goRecord = () => { | |||
uni.navigateTo({ | |||
url: `/subpackage/personal-center/consumption-record?cardId=${state.cardId}` | |||
}) | |||
} | |||
// 校验金额输入框 | |||
const checkNum = (event) => { | |||
let sNum = event.target.value.toString(); //先转换成字符串类 | |||
if (sNum.indexOf('.') == 0) {//第一位就是 . | |||
console.log('first str is .') | |||
sNum = '0' + sNum | |||
} | |||
sNum = sNum.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符 | |||
sNum = sNum.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的 | |||
sNum = sNum.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); | |||
sNum = sNum.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');//只能输入两个小数 | |||
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 | |||
if (sNum.indexOf(".") < 0 && sNum != "") { | |||
sNum = parseFloat(sNum); | |||
} | |||
console.log('输入的值1', sNum) | |||
setTimeout(() => { | |||
state.money = sNum | |||
}, 20) | |||
} | |||
</script> | |||
<style> | |||
.account { | |||
height: 224rpx; | |||
width: 690rpx; | |||
margin: 30rpx; | |||
position: relative; | |||
} | |||
.account .account-text { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 20rpx 50rpx; | |||
height: 100%; | |||
} | |||
.account .balance { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: flex-start; | |||
color: #ffffff; | |||
} | |||
.account .balance-tit { | |||
font-size: 26rpx; | |||
margin-bottom: 10rpx; | |||
} | |||
.account .balance-val { | |||
font-size: 56rpx; | |||
} | |||
.account .right-box { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: flex-start; | |||
align-items: flex-end; | |||
} | |||
.account .right-box .no { | |||
font-size: 26rpx; | |||
color: #ffffff; | |||
} | |||
.account .right-box .btn { | |||
font-size: 26rpx; | |||
padding: 0 20rpx; | |||
box-sizing: border-box; | |||
height: 42rpx; | |||
line-height: 42rpx; | |||
color: #28d20f; | |||
background: #ffffff; | |||
border-radius: 21rpx; | |||
display: inline-block; | |||
margin-top: 18rpx; | |||
} | |||
.account .head-bg { | |||
width: 690rpx; | |||
height: 224rpx; | |||
position: absolute; | |||
left: 0; | |||
top: 0; | |||
z-index: -99; | |||
} | |||
.input-box { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
padding: 20rpx 0; | |||
} | |||
.input-box .input { | |||
width: 430rpx; | |||
height: 98rpx; | |||
line-height: 98rpx; | |||
background: #f8f8f8; | |||
border: 1px solid #999999; | |||
border-radius: 6rpx; | |||
font-size: 30rpx; | |||
text-align: center; | |||
} | |||
.input-box .tips { | |||
color: #666666; | |||
font-size: 26rpx; | |||
margin-top: 18rpx; | |||
} | |||
.tabs {} | |||
.tabs .tab-tit { | |||
font-size: 30rpx; | |||
color: #333; | |||
padding: 45rpx 0 22rpx 30rpx; | |||
} | |||
.tabs .tab { | |||
display: flex; | |||
flex-wrap: wrap; | |||
justify-content: space-evenly; | |||
} | |||
.tabs .tab .item { | |||
width: 210rpx; | |||
height: 100rpx; | |||
background: #f6fff7; | |||
border: 1px solid #dcdde1; | |||
box-sizing: border-box; | |||
line-height: 100rpx; | |||
border-radius: 6rpx; | |||
text-align: center; | |||
margin-bottom: 24rpx; | |||
color: #333333; | |||
font-size: 32rpx; | |||
} | |||
.tabs .tab .item.active { | |||
border: 1px solid #24cc49; | |||
color: #24cc49; | |||
} | |||
.btn-primary { | |||
width: 670rpx; | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
color: #ffffff; | |||
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; | |||
} | |||
.list { | |||
width: 97%; | |||
padding: 20rpx 50rpx; | |||
font-size: 30rpx; | |||
background-color: #f8f8f8; | |||
margin-bottom: 20rpx; | |||
} | |||
</style> |
@@ -13,13 +13,6 @@ | |||
<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> | |||
@@ -27,7 +20,7 @@ | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { etcOcrCard, queryRecharge } from "@/utils/network/api.js"; | |||
import { rechargeApi } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption.js"; | |||
import { navTo, uploadFile, msg } from "@/utils/utils"; | |||
@@ -37,11 +30,10 @@ | |||
name: '',//对公用户登录名 | |||
fee: '', | |||
cardNumber: '', | |||
url: '', | |||
} | |||
}, | |||
bankAddress: "" //银行卡名称 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option", option.cardNumber) | |||
if (option.value) { | |||
state.form = JSON.parse(decodeURIComponent(option.value)) | |||
} | |||
@@ -51,6 +43,10 @@ | |||
if (option.name) { | |||
state.form.name = option.name | |||
} | |||
if (option.bankAddress) { | |||
state.bankAddress = option.bankAddress | |||
} | |||
console.log("option", option.cardNumber, state.form, option.bankAddress) | |||
}); | |||
const goRecharge = () => { | |||
for (var i in state.form) { | |||
@@ -63,23 +59,21 @@ | |||
type: 2, | |||
data: { | |||
'accountId': state.form.name, //账户编号 | |||
'fee': state.form.fee * 100, //公司营业执照统一社会信用代码 | |||
'bankCardId': state.form.cardNumber, //对公名称 | |||
'imageUrl': state.form.url, //密码 | |||
'incomeFee': state.form.fee * 100, //公司营业执照统一社会信用代码 | |||
'reciprocalAccount': state.form.cardNumber, //对公名称 | |||
'reciprocalBankName': state.bankAddress | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(queryRecharge, options) | |||
request(rechargeApi, options) | |||
.then((res) => { | |||
let data = stringToJson(res.bizContent) | |||
msg("充值成功") | |||
msg("充值成功,待审核") | |||
setTimeout(() => { | |||
if (data.status == 1) { | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
} | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
}, 1500) | |||
console.log("充值成功", data) | |||
@@ -95,19 +89,7 @@ | |||
url: `/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1&value=${params}` | |||
}); | |||
} | |||
const cardDbImageOcr = (val : any) => { | |||
var imageType = val; | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
uploadFile(res.tempFilePaths[0], "", "").then((data) => { | |||
state.form.url = data; | |||
}) | |||
}, | |||
}); | |||
}; | |||
// 校验金额输入框 | |||
const checkNum = (event) => { | |||
let sNum = event.target.value.toString(); //先转换成字符串类 | |||
@@ -149,7 +131,7 @@ | |||
button { | |||
width: 75%; | |||
height: 80rpx; | |||
margin-top: 450rpx; | |||
margin-top: 550rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; |
@@ -0,0 +1,102 @@ | |||
<template> | |||
<view class="wrapper"> | |||
<image :src="`${$imgUrl}common/reharge-success.png`" class="pic-status" mode="widthFix"></image> | |||
<view class="sub-text"><text>圈存前余额:</text><text>¥{{state.preBalance/100}}</text></view> | |||
<view class="sub-text"><text>圈存金额:</text><text>¥{{state.rechargeAmount/100}}</text></view> | |||
<view class="sub-text"><text>圈存后余额:</text><text>¥{{state.afterMoney/100}}</text></view> | |||
<view class="btn btn-primary" @click="view">返回查看</view> | |||
</view> | |||
</template> | |||
<script lang="ts" setup> | |||
import { reactive } from "vue"; | |||
import { | |||
rechargeMoneyApi | |||
} from "@/utils/network/api.js"; | |||
import { | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption.js"; | |||
const state = reactive({ | |||
cardId: "", | |||
preBalance: 0, //充值前余额 | |||
rechargeAmount: 0,//充值金额 | |||
afterMoney: 0 //充值后金额 | |||
}) | |||
onLoad((option) => { | |||
state.cardId = option.cardId | |||
money() | |||
}) | |||
const money = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"cardId": state.cardId, | |||
}, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
request(rechargeMoneyApi, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.preBalance = data.preBalance | |||
state.rechargeAmount = data.rechargeAmount | |||
state.afterMoney = Number(data.rechargeAmount) + Number(data.preBalance) | |||
console.log("圈存金额查询2", data) | |||
}) | |||
} | |||
const view = () => { | |||
uni.navigateBack({ | |||
delta: 3 | |||
}) | |||
} | |||
</script> | |||
<style> | |||
.wrapper { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
} | |||
.text-result { | |||
font-size: 36rpx; | |||
color: #333; | |||
font-weight: 400; | |||
} | |||
.sub-text { | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: black; | |||
padding-top: 40rpx; | |||
margin-left: 250rpx; | |||
} | |||
.sub-text>text:first-child { | |||
width: 36%; | |||
display: inline-block; | |||
} | |||
.pic-status { | |||
width: 690rpx; | |||
height: 300rpx; | |||
margin: 98rpx 30rpx 25rpx; | |||
} | |||
.btn-primary { | |||
width: 670rpx; | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
color: #ffffff; | |||
margin: 300rpx 40rpx 0; | |||
text-align: center; | |||
} | |||
</style> |
@@ -8,6 +8,7 @@ | |||
<view><text>银行卡号:</text><text>{{state.params['bankCardId']}}</text></view> | |||
<view><text>开户行:</text><text>{{state.params['bankAddress']}}</text></view> | |||
<view><text>审核时间:</text><text>{{state.params['confirmTime']}}</text></view> | |||
<view v-if="state.params['message']"><text>不通过原因:</text><text>{{state.params['message']}}</text></view> | |||
<view><text>创建时间:</text><text>{{state.params['createTime']}}</text></view> | |||
<view><text>审核人员:</text><text>{{state.params['staffName']}}</text></view> | |||
<view><text>经办人身份证正面照:</text> |
@@ -136,7 +136,6 @@ | |||
endTime: state.range[1] ? state.range[1] + 'T00:00:00' : state.range[1], | |||
pageNo: state.pageNo, | |||
pageSize: state.pageSize, | |||
// opId: getItem(StorageKeys.OpenId), | |||
}; | |||
for (var index in data) { | |||
console.log(index, data[index], data[index] == "") |
@@ -1,23 +1,46 @@ | |||
<template> | |||
<view class='content'> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view>ETC卡号:{{item.cardId}}<text class="payStatus">{{item.payStatusC}}</text></view> | |||
<view>充值金额:¥{{item.rechargeMoney/100}}</view> | |||
<view>申请时间:{{item.insertTime}}</view> | |||
<view>圈存状态:{{item.statusC}}</view> | |||
<!-- 支付成功和未圈存 --> | |||
<view class="but-wrap" v-if="item.statusC =='待支付'"> | |||
<text @click="pay(item.rechargeMoney,item.orderNum)">去支付</text> | |||
<view class="top-content"> | |||
<view class="input"> | |||
<text>车牌号:</text> | |||
<input placeholder="请输入车牌号" v-model="state.vehiclePlate" /> | |||
</view> | |||
<view class="but-wrap" v-else-if="item.statusC =='已支付' && item.chargeStatus=='未圈存'"> | |||
<text @click="toTrap(item.rechargeMoney)">修复</text> | |||
<text @click="queryRefound(item.cardId,item.orderNum)">退款</text> | |||
<view class="last input"> | |||
<text>车牌颜色:</text> | |||
<uni-data-select v-model="state.vehiclePlateColor" :localdata="state.colorRange" @change="changeColor" | |||
:clear="false"></uni-data-select> | |||
</view> | |||
<view class="example-body"> | |||
<uni-datetime-picker v-model="state.range" type="daterange" /> | |||
<button size="mini" style="color: #ffffff; | |||
backgroundColor: rgb(118, 200, 77); | |||
borderColor: rgb(118, 200, 77); | |||
font-size: 26rpx; | |||
flex-shrink: 0;margin-left: 20rpx;" @click="search()">搜索</button> | |||
</view> | |||
</view> | |||
<view style="margin-top: 250rpx;"> | |||
<view class='item' v-for="(item,index) in state.newList"> | |||
<view>ETC卡号:{{item.cardId}}<text class="payStatus">{{item.payStatusC}}</text></view> | |||
<view>充值金额:¥{{item.rechargeMoney/100}}</view> | |||
<view>车牌号:{{item.vehiclePlate}}</view> | |||
<view>申请时间:{{item.insertTime}}</view> | |||
<view>圈存状态:{{item.statusC}}</view> | |||
<!-- 支付成功和未圈存 --> | |||
<view class="but-wrap" v-if="item.statusC =='待支付'"> | |||
<text @click="pay(item.rechargeMoney,item.orderNum)">去支付</text> | |||
</view> | |||
<view class="but-wrap" v-else-if="item.statusC =='已支付' && item.chargeStatus=='未圈存'"> | |||
<text @click="toTrap(item.rechargeMoney)">修复</text> | |||
<text @click="queryRefound(item.cardId,item.orderNum)">退款</text> | |||
</view> | |||
</view> | |||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的~</view> | |||
<view class="noContent" v-if="!state.newList.length">暂无消费明细</view> | |||
</view> | |||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的~</view> | |||
</view> | |||
<view class="noContent" v-if="!state.newList.length">暂无消费明细</view> | |||
</template> | |||
<script lang="ts" setup> | |||
@@ -39,29 +62,51 @@ | |||
pageNo: 1, | |||
pageSize: 16, | |||
flags: false, | |||
vehiclePlate: "", | |||
vehiclePlateColor: "", | |||
colorRange: [], | |||
range: ['', ''], | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option", option) | |||
state.cardId = option.cardId; | |||
let getColor = getItem('key')['VEHICLE_COLOR_TYPE']; | |||
for (var k = 0; k < getColor.length; k++) { | |||
let obj = {}; | |||
obj['value'] = getColor[k]['code'] | |||
obj['text'] = getColor[k]['name'] | |||
state.colorRange.push(obj) | |||
} | |||
}) | |||
onShow(() => { | |||
state.pageNo = 1 | |||
state.newList = [] | |||
getList(); | |||
}) | |||
const search = () => { | |||
state.pageNo = 1 | |||
state.newList = [] | |||
getList(); | |||
} | |||
const changeColor = (e) => { | |||
state.vehiclePlateColor = e | |||
console.log(e) | |||
} | |||
const getList = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
'cardId': state.cardId, | |||
// 'cardId': "52011328220202137230", | |||
'openId': getItem('openId'), | |||
'pageNo': state.pageNo, | |||
'pageSize': state.pageSize | |||
'pageSize': state.pageSize, | |||
'vehicleId': state.vehiclePlate ? state.vehiclePlate + "_" + state.vehiclePlateColor : "", | |||
'insertTimeStart': state.range[0] ? state.range[0] + ' 00:00:00' : state.range[0], | |||
'insertTimeEnd': state.range[1] ? state.range[1] + ' 00:00:00' : state.range[1], | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
console.log("data", state.vehiclePlate, state.vehiclePlateColor, state.range) | |||
request(queryCardRecord, options).then((res) => { | |||
let data = [...state.newList, ...stringToJson(res.bizContent).data] | |||
for (var i = 0; i < data.length; i++) { | |||
@@ -181,7 +226,6 @@ | |||
box-sizing: border-box; | |||
padding: 30rpx 20rpx; | |||
margin-top: 30rpx; | |||
/* background:linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); */ | |||
background: white; | |||
color: black; | |||
} | |||
@@ -214,4 +258,67 @@ | |||
box-sizing: border-box; | |||
margin-left: 12rpx; | |||
} | |||
.top-content { | |||
position: fixed; | |||
left: 0; | |||
top: 0; | |||
background-color: white; | |||
width: 100%; | |||
padding: 0 20rpx 20rpx 20rpx; | |||
box-sizing: border-box; | |||
z-index: 999999; | |||
} | |||
input, | |||
.uni-input { | |||
border: 1rpx solid #ccc; | |||
padding: 0 10rpx; | |||
height: 28rpx; | |||
line-height: 28rpx; | |||
} | |||
.input { | |||
display: flex; | |||
align-items: center; | |||
margin-bottom: 16rpx; | |||
} | |||
.input>text { | |||
display: inline-block; | |||
width: 24%; | |||
} | |||
.input>input { | |||
width: 47%; | |||
margin-top: 10rpx; | |||
font-size: 30rpx; | |||
} | |||
/deep/.last .uni-stat__select { | |||
width: 360rpx; | |||
} | |||
.example-body { | |||
display: flex; | |||
align-items: center; | |||
} | |||
/deep/.uni-date { | |||
width: 73% !important; | |||
} | |||
/deep/.uni-date__x-input, | |||
/deep/.uni-select { | |||
font-size: 13px; | |||
height: 24px; | |||
line-height: 24px; | |||
} | |||
/deep/.uni-date-x { | |||
height: 56rpx !important; | |||
} | |||
</style> |
@@ -1,5 +1,5 @@ | |||
<template> | |||
<view class="container" @click="choice(item.bankCardId)" v-for="(item,index) in state.bankListArr"> | |||
<view class="container" @click="choice(item.bankCardId,item.bankAddress)" v-for="(item,index) in state.bankListArr"> | |||
<view class=""> | |||
<image class="bg" style="width:100%;height: 260rpx;" :src="`${$imgUrl}bank-bg.png`"></image> | |||
<view class="content"> | |||
@@ -85,13 +85,13 @@ | |||
}, 1500) | |||
}) | |||
} | |||
const choice = (cardNumber) => { | |||
const choice = (cardNumber, bankAddress) => { | |||
// 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}&value=${encodeURIComponent(JSON.stringify(state.params))}` | |||
url: `/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}&bankAddress=${bankAddress}&value=${encodeURIComponent(JSON.stringify(state.params))}` | |||
}); | |||
// navTo(`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`) | |||
// } |
@@ -290,4 +290,5 @@ export const accountMoneyApi = "7c0846300c6f490abd35120931fcd663" //对公账户 | |||
export const addProductInterestApi = "aa7ce8d0b64a4396a42c57bac6cd2433" //权益产品评价完成调用 | |||
export const cancellRefoundApi = "441ea77c279046d192bc3c6abf07c952" //注销退费查询 | |||
export const rechargeMoneyApi = "9d6c8c65490b426ca65e8add1aa977da" //查询充值成功后的金额 | |||
export const blackApi = "3aeafb995cb84112be87b8edcc303a8f" //黑名单查询 | |||
export const blackApi = "3aeafb995cb84112be87b8edcc303a8f" //黑名单查询 | |||
export const rechargeApi = "c62caa7ea6a249c3a2c3f5d3c6354a37" //单位账户充值 |