@@ -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> |
@@ -29,7 +29,7 @@ | |||
<view class="panel-box"> | |||
<view class="panel"> | |||
<view class="panel-item" @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)"> | |||
<view class="panel-text"><text class="num">2</text><text class="txt">辆</text></view> | |||
<view class="panel-text"><text class="num">{{state.carNumber}}</text><text class="txt">辆</text></view> | |||
<text class="type">车辆</text> | |||
</view> | |||
<view class="panel-item"> | |||
@@ -145,26 +145,26 @@ | |||
<view class="cars box"> | |||
<view class="right-head"> | |||
<view class="tit">我的车辆</view> | |||
<view class="more"> | |||
<view class="more" @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)"> | |||
<text class="more-text">查看全部</text> | |||
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | |||
</view> | |||
</view> | |||
<view class="car-item"> | |||
<view class="car-item" v-for="(item,index) in state.list"> | |||
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> | |||
<view class="car-info"> | |||
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view> | |||
<view class="card-no">卡号:52011328220202006876</view> | |||
<view class="card-no">签号:5202192509222195</view> | |||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view> | |||
<view class="card-no">卡号:{{item.card_id}}</view> | |||
<view class="card-no">签号:{{item.obu_id}}</view> | |||
</view> | |||
<view class="btn-unbind">解除绑定</view> | |||
<view class="btn-unbind" @click="del(item.vehicleId)">解除绑定</view> | |||
</view> | |||
<view class="sub-bind"> | |||
<view class="item-tit"> | |||
<image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image> | |||
<text>我要关联车辆</text> | |||
</view> | |||
<view class="right-arrow"> | |||
<view class="right-arrow" @click="$util.navTo('/subpackage/personal-center/setting/car-information/car-create', true)"> | |||
<view class="sub-tit">增加未关联车辆</view> | |||
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | |||
</view> | |||
@@ -196,7 +196,7 @@ | |||
import navBar from "../../components/nav-bar/nav-bar2.vue"; | |||
import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app"; | |||
import { | |||
userInfoIndex | |||
userInfoIndex,selectCarInfo,delCarInfo | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
@@ -205,6 +205,7 @@ | |||
stringToJson | |||
} from "@/utils/network/encryption.js"; | |||
import filter from '@/components/filter/filter.vue'; | |||
import {vehiclePlateColor} from "@/datas/vehiclePlateColor.js"; | |||
const height = ref(null); | |||
const top = ref(null); | |||
const margin = ref(null); | |||
@@ -229,6 +230,8 @@ | |||
totalAmount: 0, | |||
}, | |||
vehicleManageList: [], | |||
list:'', //车辆信息 | |||
carNumber:'' //车辆数量 | |||
}); | |||
onMounted(() => { | |||
const res = uni.getMenuButtonBoundingClientRect(); | |||
@@ -248,13 +251,38 @@ | |||
onShow((option : any) => { | |||
state.data.opId = getItem(StorageKeys.OpenId); | |||
if(state.data.opId){ | |||
getUserInfo() | |||
getUserInfo(); | |||
} | |||
}); | |||
// 查询车辆信息 | |||
const queryCarMsg = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
"openId":getItem('openId') | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
//调用方式 | |||
request(selectCarInfo, options).then((res) => { | |||
const data = (stringToJson(res.bizContent).vehicleManages) | |||
for(var i=0;i<1;i++){ | |||
for(var j=0;j<vehiclePlateColor.length;j++){ | |||
if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){ | |||
data[i].color=vehiclePlateColor[j]['color'] | |||
} | |||
} | |||
} | |||
state.list=data; | |||
state.carNumber=data.length | |||
console.log("state.list",state.list) | |||
}) | |||
.catch((err) => { | |||
}); | |||
} | |||
const getUserInfo = () => { | |||
const options = { | |||
type: 2, | |||
data: { | |||
@@ -271,11 +299,47 @@ | |||
state.accountInfoVo = data.accountInfoVo; | |||
state.monthFlowingVo = data.monthFlowingVo; | |||
state.vehicleManageList = data.monthFlowingVo | |||
queryCarMsg(); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
} | |||
const del = (id) => { | |||
wx.showModal({ | |||
title: '提示', | |||
content: '是否删除该条车辆信息', | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
let data = { | |||
vehicleId: id, | |||
openId: getItem('openId') | |||
} | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(delCarInfo, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
console.log(data) | |||
state.list = data.vehicleManages | |||
if (data.info == '成功.') { | |||
uni.showToast({ | |||
title: "删除成功", | |||
icon: "none" | |||
}) | |||
queryCarMsg(); | |||
} | |||
}); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
} | |||
</script> | |||
<style> | |||
page { |
@@ -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; |
@@ -1,29 +1,30 @@ | |||
<template> | |||
<u-form :model="form" ref="form1" label-width=140 v-if='state.isShow'> | |||
<!-- <u-form :model="form" ref="form1" label-width=140 v-if='state.isShow'> | |||
<u-form-item label="对公账户" > | |||
<u-input placeholder='请输入你的账户' type="text" v-model="state.form.name" /> | |||
<u-button type="success" size="mini" @click="search" >查询</u-button> | |||
</u-form-item> | |||
</u-form> | |||
<view v-else> | |||
</u-form> --> | |||
<view > | |||
<u-form :model="form" ref="form1" label-width=180 > | |||
<u-form-item label="用户名"> | |||
<u-input placeholder='用户名' type="text" v-model="state.form.name" /> | |||
<u-button type="success" size="mini" @click="search" >查询</u-button> | |||
<!-- <u-button type="success" size="mini" @click="search" >查询</u-button> --> | |||
</u-form-item> | |||
<u-form-item label="手机号" > | |||
<!-- <u-form-item label="手机号" > | |||
<u-input placeholder='手机号' type="number" v-model="state.form.tel" disabled/> | |||
</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> --> | |||
<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> | |||
@@ -33,6 +34,7 @@ | |||
<script setup lang="ts"> | |||
import { reactive,ref } from "vue"; | |||
import { navTo } from "@/utils/utils"; | |||
import {changePass} from "@/utils/network/api.js"; | |||
let waitTime = ref(0); | |||
const state = reactive({ | |||
form:{ | |||
@@ -96,7 +98,36 @@ | |||
}, 1000) | |||
} | |||
const goLogin=()=>{ | |||
navTo(`/subpackage/after-sale/account-recharge/login`); | |||
if(!state.form.name){ | |||
msg("请输入用户名!"); | |||
return; | |||
} | |||
if(!state.form.password){ | |||
msg("请输入密码!"); | |||
return; | |||
} | |||
if(!state.form.againPassword){ | |||
msg("请确认密码!"); | |||
return; | |||
} | |||
let options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
data: { | |||
accountId: state.form.name, | |||
oldPwd: '', | |||
newPwd: state.form.password | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) | |||
}; | |||
//调用方式 | |||
request(changePass, options).then((res) => { | |||
navTo(`/subpackage/after-sale/account-recharge/login`); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
} | |||
</script> | |||
@@ -127,4 +158,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> | |||
@@ -5,12 +5,12 @@ | |||
</view> | |||
<view class="item"> | |||
<text>密码:</text> | |||
<input style='width:412rpx;' class="uni-input" focus placeholder="大小写,数字,位数必须大于7位" v-model='state.password' type='password'/> | |||
<input style='width:412rpx;' class="uni-input" focus placeholder="请输入密码" v-model='state.password' type='password'/> | |||
</view> | |||
<button @click='login()'>登录</button> | |||
<view class='go'> | |||
<text @click='goAccount()'>去开户</text> | |||
<text @click='forgetPassword()'>忘记密码</text> | |||
<!-- <text @click='forgetPassword()'>忘记密码</text> --> | |||
</view> | |||
</template> | |||
@@ -27,34 +27,34 @@ | |||
onLoad((option : any) => { | |||
}); | |||
const login=()=>{ | |||
// if(!state.name){ | |||
// msg("请输入用户名!"); | |||
// return; | |||
// } | |||
// if(!state.password){ | |||
// msg("请输入密码!"); | |||
// return; | |||
// } | |||
// let options = { | |||
// type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
// data: { | |||
// accountId: state.name, | |||
// passWord: state.password | |||
// }, //请求参数 | |||
// method: "POST", //提交方式(默认POST) | |||
// showLoading: true, //是否显示加载中(默认显示) | |||
// }; | |||
if(!state.name){ | |||
msg("请输入用户名!"); | |||
return; | |||
} | |||
if(!state.password){ | |||
msg("请输入密码!"); | |||
return; | |||
} | |||
let options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
data: { | |||
accountId: state.name, | |||
passWord: state.password | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) | |||
}; | |||
// //调用方式 | |||
// request(accountLogin, options).then((res) => { | |||
// let data = stringToJson(res.bizContent) | |||
// console.log(data, "#################"); | |||
// navTo(`/subpackage/after-sale/account-recharge/index`); | |||
// }) | |||
// .catch((err) => { | |||
// console.log(err); | |||
// }); | |||
navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
//调用方式 | |||
request(accountLogin, options).then((res) => { | |||
let data = stringToJson(res.bizContent) | |||
console.log(data, "#################"); | |||
navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
// navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||
// navTo(`/subpackage/after-sale/account-recharge/index?name=scyl12345`); | |||
} | |||
const goAccount=()=>{ |
@@ -33,14 +33,17 @@ | |||
<view class='up_img_wrap message'> | |||
<u-form :model="form" ref="form1" label-width=210 border-bottom=false> | |||
<u-form-item label="对公用户登录名 " border-bottom=true > | |||
<u-input placeholder='请输入6-12位字母加数字组成的账号' type="text" v-model="state.form.name"/> | |||
<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"/> | |||
</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 label="支付密码" > | |||
<u-input placeholder='请输入支付密码' type="text" v-model="state.form.consumePassword"/> | |||
</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> | |||
@@ -53,6 +56,12 @@ | |||
<u-form-item label="经办人手机号" > | |||
<u-input placeholder='请输入经办人手机号' type="text" v-model="state.form.handlerPhone"/> | |||
</u-form-item> | |||
<u-form-item label="银行卡号" > | |||
<u-input placeholder='请输入银行卡号' type="text" v-model="state.form.bankCardId"/> | |||
</u-form-item> | |||
<u-form-item label="开户行" > | |||
<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()'> | |||
@@ -77,7 +86,7 @@ | |||
<script setup lang="ts"> | |||
import {reactive} from "vue"; | |||
import {etcOcrCard,envs,ocrAllQuery,fileUpload} from "@/utils/network/api.js"; | |||
import {etcOcrCard,envs,ocrAllQuery,fileUpload,openRecharge} from "@/utils/network/api.js"; | |||
import {pathToBase64} from "@/utils/image-tools/index.js"; | |||
import { navTo } from "@/utils/utils"; | |||
import {request} from "@/utils/network/request.js"; | |||
@@ -92,16 +101,17 @@ | |||
url4:'', // | |||
name:'',//对公用户登录名 | |||
password:'',//对公用户登录密码 | |||
type:'',//公司证件类型 | |||
consumePassword:'', //支付密码 | |||
// type:'',//公司证件类型 | |||
code:'', //公司证件编码 | |||
companyName:'', | |||
handlerName:'', | |||
handlerPhone:'', | |||
bankAddress:"贵阳银行", //开户行 | |||
bankCardId:"1111", //充值银行卡号 | |||
bankAddress:"", //开户行 | |||
bankCardId:"", //充值银行卡号 | |||
}, | |||
showType:false, //公司证件类型下拉 | |||
typeList:['营业执照','统一社会信用代码证','组织结构代码证'], | |||
// typeList:['营业执照','统一社会信用代码证','组织结构代码证'], | |||
}) | |||
const cardDbImageOcr = (val : any) => { | |||
var imageType = val; | |||
@@ -144,9 +154,9 @@ | |||
}); | |||
}; | |||
// 选择公司证件类型的回调 | |||
const regionConfirmType=(e : any)=>{ | |||
state.form.type=state.typeList[e] | |||
} | |||
// const regionConfirmType=(e : any)=>{ | |||
// state.form.type=state.typeList[e] | |||
// } | |||
//替换图片地址 | |||
const strReplace = (str : string) => { | |||
return str.replace('192.168.101.145:9000', envs[process.env.NODE_ENV].baseUrl) | |||
@@ -155,8 +165,8 @@ | |||
navTo(`/subpackage/personal-center/setting/bank-card/bank-card`); | |||
} | |||
const open=()=>{ | |||
for(var i in state.from){ | |||
if(!state.from[i]){ | |||
for(var i in state.form){ | |||
if(!state.form[i]){ | |||
msg('请把信息填写完整!') | |||
return; | |||
} | |||
@@ -164,26 +174,30 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
'accountId':state.from.code, //账户编号 | |||
'corporateIdNum':state.from.type, //公司营业执照统一社会信用代码 | |||
'corporateName':state.from.name, //对公名称 | |||
'password':state.from.password, //密码 | |||
'photoUrl':state.from.url1, //营业执照图片路径 | |||
'authBookUrl':state.from.url2, //授权书图片路径 | |||
'agentName':state.from.handlerName, //经办人姓名 | |||
'agentTel':state.from.handlerPhone, //经办人手机号 | |||
'idCardImageUrl':state.from.url3, //经办人身份证正面 | |||
'idCardImageUrl':state.from.url4, //经办人身份证反面 | |||
'bankAddress':"贵阳银行", //开户行 | |||
'bankCardId':"1111", //充值银行卡号 | |||
'accountId':state.form.name, //账户编号 | |||
'corporateIdNum':state.form.code, //公司营业执照统一社会信用代码 | |||
'corporateName':state.form.companyName, //对公名称 | |||
'photoUrl':state.form.url1, //营业执照图片路径 | |||
'authBookUrl':state.form.url2, //授权书图片路径 | |||
'agentName':state.form.handlerName, //经办人姓名 | |||
'agentTel':state.form.handlerPhone, //经办人手机号 | |||
'idCardImageUrl':state.form.url3, //经办人身份证正面 | |||
'idCardBackImageUrl':state.form.url4, //经办人身份证反面 | |||
'bankAddress':state.form.bankAddress, //开户行 | |||
'bankCardId':state.form.bankCardId, //充值银行卡号 | |||
'password':state.form.password, //密码 | |||
'consumePassword':state.form.consumePassword,//支付密码 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(sendCode, options) | |||
request(openRecharge, options) | |||
.then((res) => { | |||
let data = stringToJson(res.bizContent) | |||
console.log("开户成功",data) | |||
console.log("开户成功",data.status) | |||
if(data.status==1){ | |||
navTo(`/subpackage/after-sale/account-recharge/login`) | |||
} | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
@@ -244,6 +258,9 @@ | |||
state.form.url1 = data.data.url; | |||
}); | |||
}; | |||
const shiqu=()=>{ | |||
console.log("state.form.handlerPhone",state.form.handlerPhone) | |||
} | |||
</script> | |||
<style scoped> |
@@ -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,149 @@ | |||
<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; | |||
if(option.value){ | |||
state.form=JSON.parse(decodeURIComponent(option.value)) | |||
} | |||
}); | |||
const goRecharge=()=>{ | |||
for(var i in state.form){ | |||
if(!state.form[i]){ | |||
msg('请把信息填写完整!') | |||
return; | |||
} | |||
} | |||
const options = { | |||
type: 2, | |||
data: { | |||
'accountId':state.form.name, //账户编号 | |||
'fee':state.form.fee, //公司营业执照统一社会信用代码 | |||
'bankCardId':state.form.cardNumber, //对公名称 | |||
'imageUrl':state.form.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=()=>{ | |||
const params=encodeURIComponent(JSON.stringify(state.form)); | |||
uni.redirectTo({ | |||
//关闭当前页面,跳转到应用内的某个页面。 | |||
url:`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1&value=${params}` | |||
}); | |||
// 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:'红色'}, | |||
] | |||
}) |
@@ -46,7 +46,7 @@ | |||
</view> | |||
<view class="shibie-wrapper"> | |||
<view class="title"> 识别内容如下 </view> | |||
<u-form label-width="200" :model="state.form" ref="uForm"> | |||
<u-form label-width="230" :model="state.form" ref="uForm"> | |||
<u-form-item label="姓名"> | |||
<u-input v-model="state.form.userName" placeholder='请输入姓名' :disabled="state.isEnableOCRData"/> | |||
</u-form-item> |
@@ -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"> | |||
@@ -48,10 +48,14 @@ | |||
import {navTo} from '@/utils/utils'; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
const state = reactive({ | |||
name:'' | |||
name:'', | |||
params:{}, //传过来的参数 | |||
}) | |||
onLoad((option : any) => { | |||
console.log("option",JSON.parse(decodeURIComponent(option.value))) | |||
state.name=option.name; | |||
state.choiceCard=option.choiceCard; | |||
state.params=JSON.parse(decodeURIComponent(option.value)) | |||
getBankList(); | |||
}) | |||
const getBankList=()=>{ | |||
@@ -84,6 +88,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}&value=${encodeURIComponent(JSON.stringify(state.params))}` | |||
}); | |||
// navTo(`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`) | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> |
@@ -1,31 +1,13 @@ | |||
<template> | |||
<view > | |||
<view class="car-item"> | |||
<view class="car-item" v-for="(item,index) in state.list"> | |||
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> | |||
<view class="car-info"> | |||
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view> | |||
<view class="card-no">卡号:52011328220202006876</view> | |||
<view class="card-no">签号:5202192509222195</view> | |||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view> | |||
<view class="card-no">卡号:{{item.card_id}}</view> | |||
<view class="card-no">签号:{{item.obu_id}}</view> | |||
</view> | |||
<view class="btn-unbind">解除绑定</view> | |||
</view> | |||
<view class="car-item"> | |||
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> | |||
<view class="car-info"> | |||
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view> | |||
<view class="card-no">卡号:52011328220202006876</view> | |||
<view class="card-no">签号:5202192509222195</view> | |||
</view> | |||
<view class="btn-unbind">解除绑定</view> | |||
</view> | |||
<view class="car-item"> | |||
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> | |||
<view class="car-info"> | |||
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view> | |||
<view class="card-no">卡号:52011328220202006876</view> | |||
<view class="card-no">签号:5202192509222195</view> | |||
</view> | |||
<view class="btn-unbind">解除绑定</view> | |||
<view class="btn-unbind" @click="del(item.vehicleId)">解除绑定</view> | |||
</view> | |||
</view> | |||
</template> | |||
@@ -35,10 +17,11 @@ | |||
import {request} from "@/utils/network/request.js"; | |||
import {stringToJson} from "@/utils/network/encryption.js"; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
import {getCarMsg} from "@/utils/network/api.js"; | |||
import {selectCarInfo,delCarInfo} from "@/utils/network/api.js"; | |||
import {getItem} from "@/utils/storage"; | |||
import {vehiclePlateColor} from "@/datas/vehiclePlateColor.js"; | |||
const state = reactive({ | |||
list:'' | |||
}) | |||
onLoad((option : any) => { | |||
queryCarMsg(); | |||
@@ -47,20 +30,64 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
// "openId":getItem('openId') | |||
"openId":getItem('openId') | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
//调用方式 | |||
request(getCarMsg, options).then((res) => { | |||
const data = stringToJson(res.bizContent) | |||
console.log("车辆管理信息查询",data); | |||
request(selectCarInfo, options).then((res) => { | |||
const data = stringToJson(res.bizContent).vehicleManages | |||
for(var i=0;i<data.length;i++){ | |||
for(var j=0;j<vehiclePlateColor.length;j++){ | |||
if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){ | |||
data[i].color=vehiclePlateColor[j]['color'] | |||
} | |||
} | |||
} | |||
console.log("data",data) | |||
state.list=data; | |||
}) | |||
.catch((err) => { | |||
}); | |||
} | |||
// 删除 | |||
const del = (id) => { | |||
wx.showModal({ | |||
title: '提示', | |||
content: '是否删除该条车辆信息', | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
let data = { | |||
vehicleId: id, | |||
openId: getItem('openId') | |||
} | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(delCarInfo, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
console.log(data) | |||
state.list = data.vehicleManages | |||
if (data.info == '成功.') { | |||
uni.showToast({ | |||
title: "删除成功", | |||
icon: "none" | |||
}) | |||
queryCarMsg(); | |||
} | |||
}); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
} | |||
</script> | |||
<style scoped> |
@@ -207,10 +207,13 @@ export const judageSalesman="35744a8e282a42ddbc63814303e9e441" //判断是否 | |||
export const judageQuanProduct="fe71273c1a394eaa999825afe7daa59b" //判断是否有权益产品 | |||
export const getGlobalParam="d0579171c82443cb9b243c113309119a" //全局配置 | |||
export const getUserMsg="c4a499a2a63042b9a2d4e88fc77d3fc0" //通过opneId查询用户信息 | |||
export const getCarMsg="1030" //车辆管理信息查询 | |||
// 单位账户充值 | |||
export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登录 | |||
export const openRecharge="3d68404d529d4b30963c6d3638003e6f " //单位账户开户 | |||
export const addBankCard="578a8372a8c0414aa917c84ac8c802b9" //对公账户银行账户添加接口 | |||
export const queryBankCard="769790d75f3648a8925312c7e1496860" //对公账户银行账户查询接口 | |||
export const delBankCard="0a05e54acebe46d29e2fbcaf1db95c75" //对公账户银行账户移除接口 | |||
export const transactionRecord="d713b25213c64633b2c048fb1cfab7c6" //对公账户交易记录查询服务 | |||
export const queryRecharge="bd8d3b44734c4d05b9c586815d0b98d8" //对公账户充值服务 | |||
export const changePass="2ba78074e3004453a26dba1d41ae7568" //对公账户改密服务 |
@@ -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) { |