提交修改
This commit is contained in:
parent
94853b0e61
commit
df9e1dd0d8
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
dist
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
@ -12,7 +12,7 @@ import Login from './views/components/login.vue'
|
|||||||
|
|
||||||
watch(() => appStore().isEffecti,(v) => {
|
watch(() => appStore().isEffecti,(v) => {
|
||||||
openpop.value = false
|
openpop.value = false
|
||||||
if(!v && getToken()){
|
if(!v && getToken() && !appStore().loginPage){
|
||||||
openpop.value = true
|
openpop.value = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
82
src/api/home.ts
Normal file
82
src/api/home.ts
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
//查询运营商 换电站 电池 机器人
|
||||||
|
interface Querydata{
|
||||||
|
poCode?:String //运营商编码
|
||||||
|
stationCode?:String //换电站编码
|
||||||
|
timeBegin?:String //开始时间,示例值(2024-10-01 00:00:00)
|
||||||
|
timeEnd?:String //结束时间,示例值(2025-04-01 23:59:59)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function gethdztotal(params?:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data1',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询 公司 用户 车辆
|
||||||
|
export function getgyctotal() {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data2',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//订单-按换电站统计
|
||||||
|
export function gethdztj(params?:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data3',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//交易-不安换电站统计
|
||||||
|
export function getjytj(params?:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data4',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//近6个月订单统计
|
||||||
|
export function getddtj(params?:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data5',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//近6个月交易统计
|
||||||
|
export function get6jytj(params?:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data6',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//同比 环比
|
||||||
|
export function gettbhb(type:number) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/home/data7',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// export function addhdz(data:Addobj) {
|
||||||
|
// return server.request({
|
||||||
|
// url: '/cloud/batterystation/fee/detail/add',
|
||||||
|
// method: 'post',
|
||||||
|
// data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
@ -32,7 +32,7 @@ interface Addata{
|
|||||||
status?:String|Number //状态:1-启用,0-禁用
|
status?:String|Number //状态:1-启用,0-禁用
|
||||||
logo?:String //logo地址
|
logo?:String //logo地址
|
||||||
delFlag?:String //删除标识:1-已删除,0-未删除
|
delFlag?:String //删除标识:1-已删除,0-未删除
|
||||||
accountBalance?:String //账户余额
|
accountBalance?:String|Number //账户余额
|
||||||
}
|
}
|
||||||
export function addyunys(data:Addata) {
|
export function addyunys(data:Addata) {
|
||||||
return server.request({
|
return server.request({
|
||||||
|
|||||||
@ -2,17 +2,17 @@ import server from '@/utils/request'
|
|||||||
|
|
||||||
//新增
|
//新增
|
||||||
interface Addobj{
|
interface Addobj{
|
||||||
ownerType:String //户主类型:1-个人,2-企业
|
ownerType:String //户主类型:1-个人,2-企业
|
||||||
ownerId:String //户主ID
|
ownerId:String //户主ID
|
||||||
stationCode:String //引入站点
|
stationCode:String //引入站点
|
||||||
pkId?:String
|
pkId?:String
|
||||||
totalAmount?:String //账户总金额,分:总金额=充值金额+赠送金额
|
totalAmount?:String|Number //账户总金额,分:总金额=充值金额+赠送金额
|
||||||
rechargeAmount?:String //充值余额,分
|
rechargeAmount?:String|Number //充值余额,分
|
||||||
giftAmount?:String //赠送金额,分
|
giftAmount?:String|Number //赠送金额,分
|
||||||
point?:String //积分余额
|
point?:String|Number //积分余额
|
||||||
deposit?:String //押金
|
deposit?:String|Number //押金
|
||||||
snCode?:String //SN码
|
snCode?:String //SN码
|
||||||
rent?:String //租金
|
rent?:String|Number //租金
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addhdz(data:Addobj) {
|
export function addhdz(data:Addobj) {
|
||||||
|
|||||||
@ -4,34 +4,34 @@ import server from '@/utils/request'
|
|||||||
interface Addobj{
|
interface Addobj{
|
||||||
orderType:String|Number //类型:1-换电,2-充电
|
orderType:String|Number //类型:1-换电,2-充电
|
||||||
plateNum:String //车牌号
|
plateNum:String //车牌号
|
||||||
orderTime:String //订单时间,示例值(yyyy-MM-dd HH:mm:ss)
|
orderTime?:String //订单时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
stationCode:String //换电站编码
|
stationCode:String //换电站编码
|
||||||
stationName:String //换电站名称
|
stationName:String //换电站名称
|
||||||
accountCode:String //金额账号
|
accountCode?:String //金额账号
|
||||||
amount:String|Number //订单金额
|
amount?:String|Number //订单金额
|
||||||
status:String|Number //订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消 //1-等待受理,2-换电中,3-换电完成,4-出现异常,5-未结算,6-订单取消,7-已结算
|
status?:String|Number //订单状态:1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消 //1-等待受理,2-换电中,3-换电完成,4-出现异常,5-未结算,6-订单取消,7-已结算
|
||||||
feeType:String //计算费用方式:1-ODO,2-SOC,3-按电量
|
feeType?:String //计算费用方式:1-ODO,2-SOC,3-按电量
|
||||||
basicFee:String //基础费用
|
basicFee?:String //基础费用
|
||||||
serviceTimeBegin:String|Number //服务开始时间
|
serviceTimeBegin?:String|Number //服务开始时间
|
||||||
serviceTimeEnd:String //服务结束时间
|
serviceTimeEnd?:String //服务结束时间
|
||||||
serviceFee:String|Number //服务费
|
serviceFee?:String|Number //服务费
|
||||||
lastRentBatCarOdo:String //上次租赁电池时车辆里程
|
lastRentBatCarOdo?:String //上次租赁电池时车辆里程
|
||||||
nowReturnBatCarOdo:String //归还电池时车辆里程
|
nowReturnBatCarOdo?:String //归还电池时车辆里程
|
||||||
odoAmount:String|Number //按ODO换电费
|
odoAmount?:String|Number //按ODO换电费
|
||||||
electAmount:String|Number //总充电量
|
electAmount?:String|Number //总充电量
|
||||||
rentBatNo:String|Number //租借电池包仓位
|
rentBatNo?:String|Number //租借电池包仓位
|
||||||
rentBatCode:String //租用电池包编码
|
rentBatCode?:String //租用电池包编码
|
||||||
rentBatSoc:String //租用电池包SOC
|
rentBatSoc?:String //租用电池包SOC
|
||||||
returnBatCode:String //归还电池包编码
|
returnBatCode?:String //归还电池包编码
|
||||||
returnBatNo:String|Number //归还电池包仓位
|
returnBatNo?:String|Number //归还电池包仓位
|
||||||
returnBatSoc:String //归还电池包SOC
|
returnBatSoc?:String //归还电池包SOC
|
||||||
returnBatRentSoc:String //归还电池租出时soc
|
returnBatRentSoc?:String //归还电池租出时soc
|
||||||
returnBatRentStationCode:String //归还电池租出的换电站编码
|
returnBatRentStationCode?:String //归还电池租出的换电站编码
|
||||||
returnBatRentStationName:String //归还电池租出的换电站
|
returnBatRentStationName?:String //归还电池租出的换电站
|
||||||
changeMode:String|Number //换电模式:1-全自动,2-半自动,3-人工干预
|
changeMode?:String|Number //换电模式:1-全自动,2-半自动,3-人工干预
|
||||||
changeLane:String|Number //换电车道 1-A 车道;2-B 车道
|
changeLane?:String|Number //换电车道 1-A 车道;2-B 车道
|
||||||
userId:String //换电车主ID
|
userId?:String //换电车主ID
|
||||||
tradeNo:String //交易编码
|
tradeNo?:String //交易编码
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addhdz(data:Addobj) {
|
export function addhdz(data:Addobj) {
|
||||||
@ -55,14 +55,16 @@ export function update(data:Addobj) {
|
|||||||
interface Querydata{
|
interface Querydata{
|
||||||
pageSize:String|Number //每页条数
|
pageSize:String|Number //每页条数
|
||||||
pageNo:String|Number //页数
|
pageNo:String|Number //页数
|
||||||
orderNo:String //订单编码
|
orderNo?:String //订单编码
|
||||||
plateNum:String //车牌号
|
plateNum?:String //车牌号
|
||||||
orderTimeBegin:String //订单时间开始,示例值(yyyy-MM-dd HH:mm:ss)
|
orderTimeBegin?:String //订单时间开始,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
orderTimeEnd:String //订单时间结束
|
orderTimeEnd?:String //订单时间结束
|
||||||
stationCode:String //换电站编码
|
stationCode?:String //换电站编码
|
||||||
stationName:String //换电站名称
|
stationName?:String //换电站名称
|
||||||
userId:String //换电车主ID
|
userId?:String //换电车主ID
|
||||||
tradeNo:String //交易编码
|
tradeNo?:String //交易编码
|
||||||
|
status?:String //订单状态
|
||||||
|
ccode?:String //公司编码
|
||||||
}
|
}
|
||||||
export function getjqrlist(params:Querydata) {
|
export function getjqrlist(params:Querydata) {
|
||||||
return server.request({
|
return server.request({
|
||||||
@ -104,3 +106,35 @@ export function jsfeiy(orderNo:string) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//批量支付
|
||||||
|
export function batchpayment(data:string) {
|
||||||
|
return server.request({
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
url: '/cloud/order/swap/wechat/nativepay',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取ip
|
||||||
|
export function getip() {
|
||||||
|
return server.request({
|
||||||
|
url: '/resource/util/ip',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询支付订单状态
|
||||||
|
export function paystatus(outTradeNo:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/order/swap/paystatus/query',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
outTradeNo
|
||||||
|
}
|
||||||
|
},false)
|
||||||
|
}
|
||||||
|
|||||||
@ -2,15 +2,26 @@ import server from '@/utils/request'
|
|||||||
|
|
||||||
//新增
|
//新增
|
||||||
interface Addobj{
|
interface Addobj{
|
||||||
userId:String //预约人ID
|
userId:String //预约人ID
|
||||||
uname:String //预约人姓名
|
uname:String //预约人姓名
|
||||||
phone:String //手机号码
|
phone:String //手机号码
|
||||||
plateNum:String //车牌号
|
plateNum:String //车牌号
|
||||||
stationCode:String //换电站编码
|
stationCode:String //换电站编码
|
||||||
stationName:String //换电站名称
|
stationName:String //换电站名称
|
||||||
swapDay:String //预约换电日期,示例值(yyyyMMdd)
|
swapDay:String //预约换电日期,示例值(yyyyMMdd)
|
||||||
swapDuration:String //预约换电时间段,示例值(8:00-10:00)
|
swapDuration:String //预约换电时间段,示例值(8:00-10:00)
|
||||||
status:String|Number //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
status:String|Number //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||||
|
|
||||||
|
// source:String //来源:1-小程序,2-云端,3-站端
|
||||||
|
// ucode:String //预约人编码
|
||||||
|
// uname:String //预约人姓名
|
||||||
|
// phone:String //手机号码
|
||||||
|
// plateNum:String //车牌号
|
||||||
|
// stationCode:String //换电站编码
|
||||||
|
// stationName:String //换电站名称
|
||||||
|
// swapDay:String //预约换电日期,示例值(yyyyMMdd)
|
||||||
|
// reservationTime?:String //预约时间
|
||||||
|
// swapDuration?:String //预约换电时间段,示例值(8:00-10:00)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addhdz(data:Addobj) {
|
export function addhdz(data:Addobj) {
|
||||||
@ -33,9 +44,13 @@ export function update(data:Addobj) {
|
|||||||
//查询
|
//查询
|
||||||
interface Querydata{
|
interface Querydata{
|
||||||
pageSize:String|Number //每页条数
|
pageSize:String|Number //每页条数
|
||||||
pageNo:String|Number //页数
|
pageNo:String|Number //页数
|
||||||
userId:String //车主id
|
ucode?:String //车主id
|
||||||
status:String //状态
|
status?:String //状态
|
||||||
|
plateNum?:String //车牌号
|
||||||
|
swapDayBegin?:String //预约换电日期开始,示例值(yyyyMMdd)
|
||||||
|
swapDayEnd?:String //预约换电日期结束
|
||||||
|
stationCode?:String //换电站编码
|
||||||
}
|
}
|
||||||
export function getjqrlist(params:Querydata) {
|
export function getjqrlist(params:Querydata) {
|
||||||
return server.request({
|
return server.request({
|
||||||
|
|||||||
106
src/api/swapstation/cdcl.ts
Normal file
106
src/api/swapstation/cdcl.ts
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
//新增
|
||||||
|
interface Addobj{
|
||||||
|
pkId?:String
|
||||||
|
name:String //名称
|
||||||
|
stationCode:String //换电站编码
|
||||||
|
stationName:String //换电站名称
|
||||||
|
miniLimit:String|Number //最低数量
|
||||||
|
status?:String|Number //状态:0-未启用,1-启用
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addhdz(data:Addobj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改
|
||||||
|
export function update(data:Addobj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询
|
||||||
|
interface Querydata{
|
||||||
|
stationCode:String //换电站编码
|
||||||
|
status:String|Number //状态
|
||||||
|
}
|
||||||
|
export function getjqrlist(params:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export function delhdz(id:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/del',
|
||||||
|
method: 'post',
|
||||||
|
data:{
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
interface Addxq{
|
||||||
|
pkId?:String
|
||||||
|
stationCode:String //换电站编码
|
||||||
|
stationName:String //换电站名称
|
||||||
|
strategyId:String //策略ID
|
||||||
|
beginTime:String //开始时间,示例值(20:01:32)
|
||||||
|
endTime:String //结束时间,示例值(23:05:41)
|
||||||
|
chargingPower?:String //充电功率
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增详情
|
||||||
|
export function addxq(data:Addxq) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/detail/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改详情
|
||||||
|
export function updatexq(data:Addxq) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/detail/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//删除详情
|
||||||
|
export function delxq(id:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/detail/del',
|
||||||
|
method: 'post',
|
||||||
|
data:{
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//查询详情
|
||||||
|
export function getxql(strategyId:String) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/cd/strategy/detail/list',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
strategyId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -53,7 +53,7 @@ interface Querydata{
|
|||||||
pkId?:String
|
pkId?:String
|
||||||
name?:String //站点名称
|
name?:String //站点名称
|
||||||
code?:String //站点编码
|
code?:String //站点编码
|
||||||
status?:String //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
status?:any //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
type?:String //站点类型ID
|
type?:String //站点类型ID
|
||||||
}
|
}
|
||||||
export function gethdzlist(params:Querydata) {
|
export function gethdzlist(params:Querydata) {
|
||||||
@ -87,6 +87,7 @@ export function getqrcode(params:Codeqs) {
|
|||||||
return server.request({
|
return server.request({
|
||||||
url: '/cloud/batterystation/xcx/qrcode/get',
|
url: '/cloud/batterystation/xcx/qrcode/get',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params,
|
||||||
|
responseType:'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
19
src/api/swapstation/mqtt.ts
Normal file
19
src/api/swapstation/mqtt.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
//新增
|
||||||
|
interface Querydata{
|
||||||
|
pageSize:String|Number //每页条数
|
||||||
|
pageNo:String|Number //页数
|
||||||
|
stationCode?:String //换电站
|
||||||
|
direction?:String //传送方向
|
||||||
|
type?:String //消息类型: 状态信息类、事件记录类、请求与响应类 query
|
||||||
|
messageFunction?:String //方法 stationInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
export function mqttlist(params:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/mqttmessage/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -107,4 +107,24 @@ export function Bingwx(params:Wxbin) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//解绑微信用户
|
||||||
|
export function unbindwx(id:String|Number) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/vehicle/wechatuser/relation/del',
|
||||||
|
method: 'post',
|
||||||
|
params:{id}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询车辆绑关联微信用户
|
||||||
|
export function getcarwxlist(PlantNo:any) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/vehicle/relationuser/list',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
PlantNo
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -48,7 +48,9 @@ let init = true
|
|||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
if(to.path === "/login"){
|
if(to.path === "/login"){
|
||||||
appStore().setloginPage()
|
appStore().setloginPage(true)
|
||||||
|
}else{
|
||||||
|
appStore().setloginPage(false)
|
||||||
}
|
}
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
/* has token*/
|
/* has token*/
|
||||||
|
|||||||
@ -27,8 +27,8 @@ const store = defineStore({
|
|||||||
seteff(v:boolean) {
|
seteff(v:boolean) {
|
||||||
this.isEffecti = v
|
this.isEffecti = v
|
||||||
},
|
},
|
||||||
setloginPage() {
|
setloginPage(v:boolean) {
|
||||||
this.loginPage = true
|
this.loginPage = v
|
||||||
},
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
if (this.sidebar.hide) {
|
if (this.sidebar.hide) {
|
||||||
|
|||||||
@ -46,7 +46,7 @@ export class Service {
|
|||||||
//https://api.evo-techina.com'
|
//https://api.evo-techina.com'
|
||||||
|
|
||||||
|
|
||||||
baseConfig: AxiosRequestConfig = { baseURL:import.meta.env.VITE_APP_BASE_API, timeout: 30000 };
|
baseConfig: AxiosRequestConfig = { baseURL:import.meta.env.VITE_APP_BASE_API, timeout: 60000 };
|
||||||
|
|
||||||
isloading:Boolean = true
|
isloading:Boolean = true
|
||||||
|
|
||||||
@ -157,7 +157,8 @@ export class Service {
|
|||||||
return Promise.reject('S0405')
|
return Promise.reject('S0405')
|
||||||
//return Promise.reject()
|
//return Promise.reject()
|
||||||
}else if(code == 'D0402'){
|
}else if(code == 'D0402'){
|
||||||
return Promise.reject()
|
return []
|
||||||
|
//return Promise.reject()
|
||||||
}else if (code == 500) {
|
}else if (code == 500) {
|
||||||
ElMessage({ message: msg, type: "error" });
|
ElMessage({ message: msg, type: "error" });
|
||||||
return Promise.reject(new Error(msg));
|
return Promise.reject(new Error(msg));
|
||||||
|
|||||||
@ -187,3 +187,11 @@ export async function blobValidate(data: Blob) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//格式日期
|
||||||
|
export function formatDate(s:any) {
|
||||||
|
if(s){
|
||||||
|
return (s+'').replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
@ -7,18 +7,33 @@
|
|||||||
{{name}}
|
{{name}}
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<a v-if="showcode" :href="url" style="display: flex;align-items: center;padding-right: 30px;color: #80aedd;">
|
<!-- <a v-if="showcode" :href="url" style="display: flex;align-items: center;padding-right: 30px;color: #80aedd;">
|
||||||
<div style="padding-right: 6px;">下载小程序码</div><el-icon><Download /></el-icon>
|
<div style="padding-right: 6px;">下载小程序码</div><el-icon><Download /></el-icon>
|
||||||
</a>
|
</a> -->
|
||||||
|
<div v-if="showcode" @click="xcxcode" style="display: flex;align-items: center;padding-right: 30px;color: #80aedd;cursor: pointer;">
|
||||||
|
<div style="padding-right: 6px;">查看小程序码</div>
|
||||||
|
<!-- <el-icon><Download /></el-icon> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-icon v-if="showcls" color="#ccc" @click="handleClose" style="cursor: pointer;">
|
<el-icon v-if="showcls" color="#ccc" @click="handleClose" style="cursor: pointer;">
|
||||||
<CloseBold />
|
<CloseBold />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
width="450"
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
|
||||||
|
<img :src="urlcode" width="400" height="400" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
// import{ getqrcode } from '@/api/swapstation/hdz'
|
import{ getqrcode } from '@/api/swapstation/hdz'
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
name?:string
|
name?:string
|
||||||
showjt?:boolean
|
showjt?:boolean
|
||||||
@ -33,6 +48,8 @@
|
|||||||
})
|
})
|
||||||
//${import.meta.env.VITE_APP_BASE_API} http://192.168.5.200:9103
|
//${import.meta.env.VITE_APP_BASE_API} http://192.168.5.200:9103
|
||||||
let url = `${import.meta.env.VITE_APP_BASE_API}/cloud/batterystation/xcx/qrcode/get?path=pages/home/index?code=${props.hdzcode}&width=400&env_version=trial`
|
let url = `${import.meta.env.VITE_APP_BASE_API}/cloud/batterystation/xcx/qrcode/get?path=pages/home/index?code=${props.hdzcode}&width=400&env_version=trial`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
close: []
|
close: []
|
||||||
@ -42,15 +59,23 @@
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let openpop = ref(false)
|
||||||
|
let urlcode = ref<any>('')
|
||||||
//获取小程序码
|
//获取小程序码
|
||||||
// function xcxcode(){
|
function xcxcode(){
|
||||||
// getqrcode({
|
getqrcode({
|
||||||
// path:'pages/home/index',
|
path:`pages/home/index?code=${props.hdzcode}`,
|
||||||
// width:'400',
|
width:'400',
|
||||||
// env_version:'trial' //要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop"。默认是正式版。
|
env_version:'trial' //要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop"。默认是正式版。
|
||||||
// }).then((rps:any) => {
|
}).then((rps:any) => {
|
||||||
// console.log(rps)
|
openpop.value = true
|
||||||
// })
|
|
||||||
// }
|
let reader = new FileReader()
|
||||||
|
reader.readAsDataURL(rps) // 转换为base64
|
||||||
|
reader.onload = function () {
|
||||||
|
urlcode.value = reader.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -7,7 +7,99 @@
|
|||||||
@click="testsx()">测试失效</el-button> -->
|
@click="testsx()">测试失效</el-button> -->
|
||||||
|
|
||||||
<el-row :gutter="20" class="mgb20">
|
<el-row :gutter="20" class="mgb20">
|
||||||
<el-col v-for="(item, index) in messageList" :key="index" :span="messageList.length -1 == index?4:5">
|
|
||||||
|
<!--运营商-->
|
||||||
|
<el-col :span="4">
|
||||||
|
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
|
<div class="grid-message" style="background: #fff;border-radius:15px">
|
||||||
|
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#409EFF'}">
|
||||||
|
<component is="Promotion" />
|
||||||
|
</el-icon>
|
||||||
|
<div class="grid-msg-right" style="border: none;" @click="toRout('/system/operator')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#409EFF'}">
|
||||||
|
{{ operatotal }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">运营商</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!--换电站-->
|
||||||
|
<el-col :span="6">
|
||||||
|
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
|
<div class="grid-message" style="background: #fff;border-radius:15px">
|
||||||
|
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#28b3a1'}">
|
||||||
|
<component is="Flag" />
|
||||||
|
</el-icon>
|
||||||
|
<div class="grid-msg-right" @click="toRout('/swapstation/hdz')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#28b3a1'}">
|
||||||
|
{{ hdztotal }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">换电站</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid-msg-right" style="border: none;" @click="toRout('/swapstation/hdz',{status: 1})">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#b5a210'}">
|
||||||
|
{{ kyhdz }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">可用换电站</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!--电池总量-->
|
||||||
|
<el-col :span="7">
|
||||||
|
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
|
<div class="grid-message" style="background: #fff;border-radius:15px">
|
||||||
|
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#67C23A'}">
|
||||||
|
<component is="SuccessFilled" />
|
||||||
|
</el-icon>
|
||||||
|
<div class="grid-msg-right" @click="toRout('/swapstation/battery')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#67C23A'}">
|
||||||
|
{{ rzcompany }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">认证公司</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid-msg-right" @click="toRout('/swapstation/battery')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#bc92c9'}">
|
||||||
|
{{ rzuser }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">认证用户</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid-msg-right" style="border: none;" @click="toRout('/swapstation/battery')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#3aaec2'}">
|
||||||
|
{{ rzvehicle }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">认证车辆</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!--机器人数量-->
|
||||||
|
<el-col :span="7">
|
||||||
|
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
|
<div class="grid-message" style="background: #fff;border-radius:15px">
|
||||||
|
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#E6A23C'}">
|
||||||
|
<component is="BellFilled" />
|
||||||
|
</el-icon>
|
||||||
|
<div class="grid-msg-right" @click="toRout('swapstation/robot')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#E6A23C'}">
|
||||||
|
{{ robottotal }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">机器人总数</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid-msg-right" style="border: none;" @click="toRout('swapstation/robot')">
|
||||||
|
<div class="grid-msg-num" :style="{ color: '#34a312'}">
|
||||||
|
{{ kyrobot }}
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px;">可用机器人</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col v-for="(item, index) in messageList" :key="index" :span="messageList.length -1 == index?4:5">
|
||||||
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
<div style="width: 100%;border-radius: 12px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
<div class="grid-message" style="background: #fff;border-radius:15px">
|
<div class="grid-message" style="background: #fff;border-radius:15px">
|
||||||
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{ background: item.color }">
|
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{ background: item.color }">
|
||||||
@ -21,37 +113,38 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" class="mgb20">
|
<el-row :gutter="20" class="mgb20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div style="width: 100%;height: 200px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
<div style="width: 100%;height: 200px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;cursor:pointer;">
|
||||||
<div style="width:31%;height: 92px;border-radius: 10px 0 0 0;text-align: center;background: #fff;">
|
<div style="width:31%;height: 92px;border-radius: 10px 0 0 0;text-align: center;background: #fff;" @click="toRout('/vehicle/company')">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #409eff;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">认证公司</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #409eff;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">电池总量</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #409eff;">989</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #409eff;">{{ dctotal }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 92px;text-align: center;background: #fff;">
|
<div style="width:31%;height: 92px;text-align: center;background: #fff;" @click="toRout('/vehicle/wxuser')">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #67c23a;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">认证用户</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #67c23a;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电电池</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #67c23a;">662</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #67c23a;">{{cddctotal}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 90px;border-radius: 0 10px 0 0;text-align: center;background: #fff;">
|
<div style="width:31%;height: 90px;border-radius: 0 10px 0 0;text-align: center;background: #fff;" @click="toRout('/vehicle/car')">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #e6a23c;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">认证车辆</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #e6a23c;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">可用电池</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #e6a23c;">599</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #e6a23c;">{{kydctotal}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;width:100%;height: 90px;border-radius: 0 0 10px 10px;margin-top: 18px;justify-content: space-between;">
|
<div style="display: flex;width:100%;height: 90px;border-radius: 0 0 10px 10px;margin-top: 18px;justify-content: space-between;">
|
||||||
<div style="width:31%;height: 90px;border-radius: 0 0 0 10px;text-align: center;background: #fff;">
|
<div style="width:31%;height: 90px;border-radius: 0 0 0 10px;text-align: center;background: #fff;">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #20b2aa;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩总数量</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #20b2aa;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩总数量</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #20b2aa;">789</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #20b2aa;">--</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 90px;text-align: center;background: #fff;">
|
<div style="width:31%;height: 90px;text-align: center;background: #fff;">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #b7a948;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩在用数量</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #b7a948;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩在用数量</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #b7a948;">489</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #b7a948;">--</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 90px;border-radius: 0 0 10px 0;text-align: center;background: #fff;">
|
<div style="width:31%;height: 90px;border-radius: 0 0 10px 0;text-align: center;background: #fff;">
|
||||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #83abc3;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩可用数量</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #83abc3;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电桩可用数量</div>
|
||||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #83abc3;">367</div>
|
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #83abc3;">--</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,17 +152,32 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div style="width: 100%;height: 200px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
<div style="width: 100%;height: 200px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<div style="width:31%;height: 200px;border-radius: 10px 0 0 10px;text-align: center;background: #fff;">
|
<div style="width:31%;height: 200px;border-radius: 10px 0 0 10px;text-align: center;background: #fff; cursor: pointer;" @click="toRout('/order/replabatt')">
|
||||||
<div style="width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #409eff;border-radius: 20px 20px 0 0;border-bottom: 3px solid #ebf5ff;">换电订单数</div>
|
<div style="width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #409eff;border-radius: 20px 20px 0 0;border-bottom: 3px solid #ebf5ff;">换电订单数</div>
|
||||||
<div style="height: 150px;line-height: 150px;font-size: 40px;font-weight: bold;color: #409eff;">89</div>
|
<div style="height: 150px;line-height: 150px;font-size: 40px;font-weight: bold;color: #409eff;">{{totalOrder}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 200px;text-align: center;background: #fff;">
|
<div style="width:31%;height: 200px;text-align: center;background: #fff;">
|
||||||
<div style="width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #67c23a;border-radius: 20px 20px 0 0;border-bottom: 3px solid #ebf5ff;">充电订单数</div>
|
<div style="width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #67c23a;border-radius: 20px 20px 0 0;border-bottom: 3px solid #ebf5ff;">充电订单数</div>
|
||||||
<div style="height: 150px;line-height: 150px;font-size: 40px;font-weight: bold;color: #67c23a;">66</div>
|
<div style="height: 150px;line-height: 150px;font-size: 40px;font-weight: bold;color: #67c23a;">--</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:31%;height: 200px;border-radius: 0 10px 10px 0;text-align: center;background: #fff;">
|
<div style="width:31%;height: 200px;border-radius: 0 10px 10px 0;text-align: center;background: #fff;">
|
||||||
<div style="width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #e6a23c;border-radius: 20px 20px 0 0;border-bottom: 3px solid #ebf5ff;">订单金额</div>
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #e6a23c;border-radius: 20px 20px 0 0;">收入金额{{totalmoney > 10000000?'(万元)':'(元)'}}</div>
|
||||||
<div style="height: 150px;line-height: 150px;font-size: 40px;font-weight: bold;color: #e6a23c;">599</div>
|
<div style="height: 60px;line-height: 50px;font-size: 40px;font-weight: bold;color: #e6a23c;">
|
||||||
|
<el-tooltip
|
||||||
|
class="box-item"
|
||||||
|
effect="dark"
|
||||||
|
:content="Math.trunc(totalmoney/100)+' 元'"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
|
{{ jyamount }}
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #747d90;border-top: 6px solid #ebf5ff;">支出金额{{totalRefund > 10000000?'(万元)':'(元)'}}</div>
|
||||||
|
<div style="height: 60px;line-height: 50px;font-size: 40px;font-weight: bold;color: #747d90;">{{zcamount}}</div>
|
||||||
|
<!-- <div style="height: 75px;font-weight: bold;font-size: 18px;color: #747d90;">
|
||||||
|
<div style="padding-bottom: 10px;">支出金额</div>
|
||||||
|
<div style="font-size: 22px;">9999{{zcamount}}</div>
|
||||||
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -77,26 +185,224 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20" class="mgb20">
|
<el-row :gutter="20" class="mgb20">
|
||||||
<el-col :span="8">
|
<el-col :span="9">
|
||||||
<div ref="refChart4" class="chart-cont2" style="padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
<div ref="refChart4" class="chart-cont2" style="padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="15">
|
||||||
<div ref="refChart5" class="chart-cont2" style="padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
<div ref="refChart5" class="chart-cont2" style="padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row :gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="9">
|
||||||
<div ref="refChart6" class="chart-cont2" style="height: 240px;padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
<!-- <el-table
|
||||||
|
style="width:100%;"
|
||||||
|
:data="tbList"
|
||||||
|
height="240"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column label="日期" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="同比" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="同比增长" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="环比" align="center" prop="miniLimit" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="环比增长" align="center" prop="miniLimit" :show-overflow-tooltip="true" />
|
||||||
|
</el-table> -->
|
||||||
|
<div style="border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;">
|
||||||
|
<el-row style="height: 40px;padding: 0 10px;line-height: 40px;background: #20b2aa;border-radius: 10px 10px 0 0;color: #fff;">
|
||||||
|
<el-col :span="4" style="text-align: center;">日期</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">订单量</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">同比</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">同比增长</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">环比</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">环比增长</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="tbhbdata.month" style="padding:18px 0;">
|
||||||
|
<el-col :span="4" style="text-align: center;">{{tbhbdata.month}}</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">{{tbhbdata.quantity}}</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">{{tbhbdata.lastMonthQuantity}}</el-col>
|
||||||
|
|
||||||
|
<!-- <el-col v-if="jytb > 0" :span="4" style="text-align: center;color: #f89898;">+{{jytb}}</el-col>
|
||||||
|
<el-col v-else-if="jytb == 0 " :span="4" style="text-align: center;">{{jytb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="text-align: center;color: #1664b5;">{{jytb}}</el-col> -->
|
||||||
|
|
||||||
|
<template v-if="tbhbdata.lastMonthQuantity == 0">
|
||||||
|
<el-col v-if="jytb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;text-align: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>{{jytb}}</el-col>
|
||||||
|
<el-col v-else-if="jytb == 0 " :span="4" style="text-align: center;">{{jytb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;"><el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>{{jytb}}</el-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<el-col v-if="jytb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jytb/tbhbdata.lastMonthQuantity)*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
<el-col v-else-if="jytb == 0" :span="4" style="text-align: center;">0%</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;">
|
||||||
|
<el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jytb*-1/tbhbdata.lastMonthQuantity)*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="4" style="text-align: center;">{{tbhbdata.lastYearQuantity}}</el-col>
|
||||||
|
<!-- <el-col v-if="jyhb > 0" :span="4" style="text-align: center;color: #f89898;">+{{jyhb}}</el-col>
|
||||||
|
<el-col v-else-if="jyhb == 0" :span="4" style="text-align: center;">{{jyhb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="text-align: center;color: #1664b5;">{{jyhb}}</el-col> -->
|
||||||
|
|
||||||
|
|
||||||
|
<template v-if="tbhbdata.lastYearQuantity == 0">
|
||||||
|
<el-col v-if="jyhb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>
|
||||||
|
{{jyhb}}</el-col>
|
||||||
|
<el-col v-else-if="jyhb == 0" :span="4" style="text-align: center;">{{jyhb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;text-align: center;color: #f89898;">
|
||||||
|
<el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>
|
||||||
|
{{jyhb}}</el-col>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-col v-if="jyhb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jyhb/tbhbdata.lastYearQuantity)*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
<el-col v-else-if="jyhb == 0" :span="4" style="text-align: center;">0%</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;">
|
||||||
|
<el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jyhb*-1/tbhbdata.lastYearQuantity)*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 20px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;">
|
||||||
|
<el-row style="height: 40px;padding: 0 10px;line-height: 40px;background: #e6a23c;border-radius: 10px 10px 0 0;color: #fff;">
|
||||||
|
<el-col :span="4" style="text-align: center;">日期</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">交易金额</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">同比</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">同比增长</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">环比</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">环比增长</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="tbhbdata.month" style="padding: 18px 0;">
|
||||||
|
<el-col :span="4" style="text-align: center;">{{tbhbdata.month}}</el-col>
|
||||||
|
<el-col :span="4" style="text-align: center;">{{Math.trunc(tbhbdata.tradeAmount/100)}}</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4" style="text-align: center;">{{Math.trunc(tbhbdata.lastMonthTradeAmount/100)}}</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-col v-if="jetb > 0" :span="4" style="text-align: center;color: #f89898;">+{{jetb}}</el-col>
|
||||||
|
<el-col v-else-if="jetb == 0 " :span="4" style="text-align: center;">{{jetb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="text-align: center;color: #1664b5;">{{jetb}}</el-col> -->
|
||||||
|
|
||||||
|
<template v-if="tbhbdata.lastMonthTradeAmount == 0">
|
||||||
|
|
||||||
|
<el-col v-if="jetb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;text-align: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>{{jetb}}</el-col>
|
||||||
|
<el-col v-else-if="jetb == 0 " :span="4" style="text-align: center;">{{jetb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;"><el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>{{jetb}}</el-col>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
|
||||||
|
<el-col v-if="jetb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jetb/(tbhbdata.lastMonthTradeAmount/100))*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
<el-col v-else-if="jetb == 0" :span="4" style="text-align: center;">0%</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;">
|
||||||
|
<el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jetb*-1/(tbhbdata.lastMonthTradeAmount/100))*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<el-col :span="4" style="text-align: center;">{{Math.trunc(tbhbdata.lastYearTradeAmount/100)}}</el-col>
|
||||||
|
<!-- <el-col v-if="jehb > 0" :span="4" style="text-align: center;color: #f89898;">+{{jehb}}</el-col>
|
||||||
|
<el-col v-else-if="jehb == 0" :span="4" style="text-align: center;">{{jehb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="text-align: center;color: #1664b5;">{{jehb}}</el-col> -->
|
||||||
|
|
||||||
|
|
||||||
|
<template v-if="tbhbdata.lastYearTradeAmount == 0">
|
||||||
|
<el-col v-if="jehb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;text-align: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>{{jehb}}</el-col>
|
||||||
|
<el-col v-else-if="jehb == 0 " :span="4" style="text-align: center;">{{jehb}}</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;"><el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>{{jehb*-1}}</el-col>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-col v-if="jehb > 0" :span="4" style="text-align: center;color: #f89898;">+{{parseInt((jehb/tbhbdata.lastYearTradeAmount)*100+'')}}%</el-col>
|
||||||
|
<el-col v-else-if="jehb == 0" :span="4" style="text-align: center;">{{parseInt((jehb/tbhbdata.lastYearTradeAmount)*100+'')}}%</el-col>
|
||||||
|
<el-col v-else :span="4" style="text-align: center;color: #1664b5;">{{parseInt((jehb/tbhbdata.lastYearTradeAmount)*100+'')}}%</el-col>
|
||||||
|
|
||||||
|
<el-col v-if="jehb > 0" :span="4" style="display: flex;align-items: center;justify-content: center;color: #1664b5;">
|
||||||
|
<el-icon color="#1664b5">
|
||||||
|
<Top />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jetb/(tbhbdata.lastYearTradeAmount/100))*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
<el-col v-else-if="jehb == 0" :span="4" style="text-align: center;">0%</el-col>
|
||||||
|
<el-col v-else :span="4" style="display: flex;align-items: center;justify-content: center;color: #f89898;">
|
||||||
|
<el-icon color="#f89898">
|
||||||
|
<Bottom />
|
||||||
|
</el-icon>
|
||||||
|
{{parseInt((jetb*-1/(tbhbdata.lastYearTradeAmount/100))*100+'')}}%
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="15">
|
||||||
|
<div ref="refChart6" class="chart-cont2" style="height: 210px;padding:10px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);background: #fff;"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="homePage">
|
<script lang="ts" setup name="homePage">
|
||||||
import { nextTick, onMounted, ref } from "vue";
|
import { nextTick, onMounted, ref } from "vue";
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import { onBeforeUnmount } from "vue";
|
import { onBeforeUnmount } from "vue";
|
||||||
import { watch } from "vue";
|
import { watch } from "vue";
|
||||||
import { useElementSize } from "@vueuse/core";
|
import { useElementSize } from "@vueuse/core";
|
||||||
|
import {
|
||||||
|
gethdztotal,
|
||||||
|
getgyctotal,
|
||||||
|
gethdztj,
|
||||||
|
getjytj,
|
||||||
|
getddtj,
|
||||||
|
get6jytj,
|
||||||
|
gettbhb
|
||||||
|
} from '@/api/home'
|
||||||
|
|
||||||
// import { getToken,removeToken } from '@/utils/auth'
|
// import { getToken,removeToken } from '@/utils/auth'
|
||||||
// import { checktoken } from '@/api/login'
|
// import { checktoken } from '@/api/login'
|
||||||
@ -112,6 +418,70 @@ import { useElementSize } from "@vueuse/core";
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
function glnum(n:any){
|
||||||
|
if(n>10000000){
|
||||||
|
return Math.round((n/1000000)*100)/100
|
||||||
|
}
|
||||||
|
return n/100
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let router = useRouter()
|
||||||
|
function toRout(path:string,query:Record<string, any> = {}) {
|
||||||
|
router.push({
|
||||||
|
path,
|
||||||
|
query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//运营商总数
|
||||||
|
let operatotal = ref('')
|
||||||
|
//换电站总数
|
||||||
|
let hdztotal = ref('')
|
||||||
|
//可用换电站
|
||||||
|
let kyhdz = ref('')
|
||||||
|
|
||||||
|
//电池总量
|
||||||
|
let dctotal = ref('')
|
||||||
|
//充电电池
|
||||||
|
let cddctotal = ref('')
|
||||||
|
//可用电池
|
||||||
|
let kydctotal = ref('')
|
||||||
|
|
||||||
|
//机器人总数
|
||||||
|
let robottotal = ref('')
|
||||||
|
//可用机器人
|
||||||
|
let kyrobot = ref('')
|
||||||
|
|
||||||
|
//认证公司
|
||||||
|
let rzcompany = ref('')
|
||||||
|
//认证用户
|
||||||
|
let rzuser = ref('')
|
||||||
|
//认证车辆
|
||||||
|
let rzvehicle = ref('')
|
||||||
|
|
||||||
|
//同比
|
||||||
|
let tbList = ref<any>([])
|
||||||
|
|
||||||
|
//查询运营商 换电站 电池 机器人
|
||||||
|
gethdztotal().then(rps => {
|
||||||
|
operatotal.value = (rps.data as any).proxyer
|
||||||
|
hdztotal.value = (rps.data as any).totalStation
|
||||||
|
kyhdz.value = (rps.data as any).workStation
|
||||||
|
dctotal.value = (rps.data as any).totalDC
|
||||||
|
cddctotal.value = (rps.data as any).chargeDC
|
||||||
|
kydctotal.value = (rps.data as any).availableDC
|
||||||
|
robottotal.value = (rps.data as any).totalRobot
|
||||||
|
kyrobot.value = (rps.data as any).availableRobot
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询 公司 用户 车辆
|
||||||
|
getgyctotal().then(rps => {
|
||||||
|
rzcompany.value = (rps.data as any).conpany
|
||||||
|
rzuser.value = (rps.data as any).totalUser
|
||||||
|
rzvehicle.value = (rps.data as any).totalCar
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const messageList = ref([
|
const messageList = ref([
|
||||||
{
|
{
|
||||||
@ -148,7 +518,7 @@ const messageList = ref([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "message",
|
type: "message",
|
||||||
name: "可用电池数量",
|
name: "机器人数量",
|
||||||
count: 0,
|
count: 0,
|
||||||
color: "#E6A23C",
|
color: "#E6A23C",
|
||||||
icon: "BellFilled",
|
icon: "BellFilled",
|
||||||
@ -175,34 +545,32 @@ const initChart4 = () => {
|
|||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: "换电站收入占比",
|
text: "换电站订单占比",
|
||||||
left: "left",
|
left: "left",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#2363a5',
|
color: '#2363a5',
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
label: {
|
||||||
|
show: true, // 显示标签
|
||||||
|
formatter: '{b}({d}%)' // 使用 formatter 来格式化标签,其中 {b} 是名称,{d} 是百分比,{@2019} 是对应年份的数据值(如果需要的话)
|
||||||
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "item",
|
trigger: "item",
|
||||||
},
|
},
|
||||||
legend: {
|
// legend: {
|
||||||
type: "scroll",
|
// type: "scroll",
|
||||||
orient: "horizontal",
|
// orient: "horizontal",
|
||||||
left: "center",
|
// left: "center",
|
||||||
bottom: 0,
|
// bottom: 0,
|
||||||
},
|
// },
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "数量",
|
name: "数量",
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: ['40%','70%'],
|
radius: ['40%','70%'],
|
||||||
data: [
|
data: bzdata.value,
|
||||||
{ value: 1048, name: "充电订单" },
|
|
||||||
{ value: 735, name: "换电订单" },
|
|
||||||
{ value: 580, name: "认证" },
|
|
||||||
{ value: 484, name: "换电" },
|
|
||||||
{ value: 300, name: "充电" },
|
|
||||||
],
|
|
||||||
padAngle: 2,
|
padAngle: 2,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
@ -232,7 +600,7 @@ const initChart5 = () => {
|
|||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: "换电站信息统计",
|
text: "换电站近半年订单统计",
|
||||||
left: "center",
|
left: "center",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#2363a5',
|
color: '#2363a5',
|
||||||
@ -267,13 +635,14 @@ const initChart5 = () => {
|
|||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
legend: {
|
legend: {
|
||||||
data: [ "换电营收", "换电量"],
|
data: [ "订单", "金额"],
|
||||||
bottom: 0,
|
top:25
|
||||||
|
//bottom: 0,
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
|
data:xdata.value, //["1月", "2月", "3月", "4月", "5月", "6月", "7月"],
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
@ -282,66 +651,68 @@ const initChart5 = () => {
|
|||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "换电营收",
|
name: "订单",
|
||||||
min: 0,
|
// min: 0,
|
||||||
max: 250,
|
// max: 50,
|
||||||
interval: 50,
|
// interval: 50,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: "{value} 元",
|
formatter: "{value}",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "换电量",
|
name: "金额",
|
||||||
min: 0,
|
// min: 0,
|
||||||
max: 25,
|
// max: 50,
|
||||||
interval: 5,
|
// interval: 50,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: "{value} 度",
|
formatter: "{value} 元",
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "换电营收",
|
name: "订单",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
tooltip: {
|
tooltip: {
|
||||||
valueFormatter: function (value: string) {
|
valueFormatter: function (value: string) {
|
||||||
return value + " ml";
|
return value;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [80.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
|
data:yOrder.value, //[80.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
|
||||||
|
yAxisIndex:0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "换电量",
|
name: "金额",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
tooltip: {
|
tooltip: {
|
||||||
valueFormatter: function (value: string) {
|
valueFormatter: function (value: string) {
|
||||||
return value + " ml";
|
return value + " 元";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
|
data:yMoney.value, //[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
|
||||||
|
yAxisIndex:1
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "换电营收",
|
// name: "金额",
|
||||||
type: "line",
|
// type: "line",
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
valueFormatter: function (value: string) {
|
// valueFormatter: function (value: string) {
|
||||||
return value + " ml";
|
// return value + " 元";
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
data: [5.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
|
// data:yMoney.value //[5.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "换电量",
|
// name: "换电量",
|
||||||
type: "line",
|
// type: "line",
|
||||||
tooltip: {
|
// tooltip: {
|
||||||
valueFormatter: function (value: string) {
|
// valueFormatter: function (value: string) {
|
||||||
return value + " ml";
|
// return value + " ml";
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
|
// data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
// 使用刚指定的配置项和数据显示图表。
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
@ -357,9 +728,10 @@ const initChart6 = () => {
|
|||||||
//初始化echarts实例
|
//初始化echarts实例
|
||||||
myChart6 = echarts.init(refChart6.value)
|
myChart6 = echarts.init(refChart6.value)
|
||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
title: {
|
title: {
|
||||||
text: "换电车辆统计",
|
text: "近半年交易统计",
|
||||||
left: "center",
|
left: "center",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#2363a5',
|
color: '#2363a5',
|
||||||
@ -381,10 +753,15 @@ const initChart6 = () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
legend: {
|
||||||
|
data: [ "收入交易","余额支付交易","退款交易","收入金额","余额支付金额","退款金额"],
|
||||||
|
top:25
|
||||||
|
//bottom: 0,
|
||||||
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
data: ["合肥站", "南京站", "长沙站", "石家庄站", "海口站", "无锡汇聚换电站"],
|
data:xjydata.value,
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: "shadow",
|
type: "shadow",
|
||||||
},
|
},
|
||||||
@ -392,15 +769,93 @@ const initChart6 = () => {
|
|||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: "value"
|
type: "value",
|
||||||
}
|
name: "交易",
|
||||||
|
// min: 0,
|
||||||
|
// max: 50,
|
||||||
|
// interval: 50,
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "金额",
|
||||||
|
// min: 0,
|
||||||
|
// max: 50,
|
||||||
|
// interval: 50,
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value} 元",
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
name: "收入交易",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
barWidth:'15%',
|
tooltip: {
|
||||||
data: [80.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4],
|
valueFormatter: function (value: string) {
|
||||||
}
|
return value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:yjydata.value,
|
||||||
|
yAxisIndex:0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "余额支付交易",
|
||||||
|
type: "bar",
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: function (value: string) {
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:walletQuantity.value,
|
||||||
|
yAxisIndex:0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "退款交易",
|
||||||
|
type: "bar",
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: function (value: string) {
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:refundQuantity.value,
|
||||||
|
yAxisIndex:0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "收入金额",
|
||||||
|
type: "line",
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: function (value: string) {
|
||||||
|
return value + " 元";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:jyMoney.value,
|
||||||
|
yAxisIndex:1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "余额支付金额",
|
||||||
|
type: "line",
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: function (value: string) {
|
||||||
|
return value + " 元";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:walletMoney.value,
|
||||||
|
yAxisIndex:1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "退款金额",
|
||||||
|
type: "line",
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: function (value: string) {
|
||||||
|
return value + " 元";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data:refundMoney.value,
|
||||||
|
yAxisIndex:1
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
// 使用刚指定的配置项和数据显示图表。
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
@ -425,21 +880,179 @@ watch(pageWidth, () => {
|
|||||||
resizeChart();
|
resizeChart();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//订单总数
|
||||||
|
let totalOrder = ref('')
|
||||||
|
|
||||||
|
//收入金额
|
||||||
|
let jyamount = ref<any>('')
|
||||||
|
let totalmoney = ref<any>('')
|
||||||
|
//支出金额
|
||||||
|
let zcamount = ref<any>('')
|
||||||
|
let totalRefund = ref<any>('')
|
||||||
|
//换电站订单占比统计
|
||||||
|
let bzdata = ref<any>([])
|
||||||
|
|
||||||
|
//6个月订单统计
|
||||||
|
let xdata = ref<any>([])
|
||||||
|
let yMoney = ref<any>([])
|
||||||
|
let yOrder = ref<any>([])
|
||||||
|
|
||||||
|
//近6个月交易统计
|
||||||
|
let xjydata = ref<any>([])
|
||||||
|
let yjydata = ref<any>([])
|
||||||
|
let jyMoney = ref<any>([])
|
||||||
|
|
||||||
|
let walletQuantity = ref<any>([]) //余额支付交易次数
|
||||||
|
let refundQuantity = ref<any>([]) //退款交易
|
||||||
|
|
||||||
|
let walletMoney = ref<any>([]) //余额支付金额
|
||||||
|
let refundMoney = ref<any>([]) //退款金额
|
||||||
|
|
||||||
|
let tbhbdata = ref<any>({})
|
||||||
|
|
||||||
|
let jytb = ref<any>('') //订单量同比
|
||||||
|
let jyhb = ref<any>('') //订单量环比
|
||||||
|
|
||||||
|
let jetb = ref<any>('') //交易金额同比
|
||||||
|
let jehb = ref<any>('') //交易金额环比
|
||||||
|
|
||||||
|
|
||||||
// 初始化渲染
|
// 初始化渲染
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
||||||
|
//6个月订单统计
|
||||||
|
getddtj().then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
xdata.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.month
|
||||||
|
})
|
||||||
|
|
||||||
|
yOrder.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.quantity
|
||||||
|
})
|
||||||
|
|
||||||
|
yMoney.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.totalMoney
|
||||||
|
})
|
||||||
|
|
||||||
|
initChart5()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
//6个月交易
|
||||||
|
get6jytj().then(rps => {
|
||||||
|
xjydata.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.month
|
||||||
|
})
|
||||||
|
|
||||||
|
yjydata.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.inQuantity
|
||||||
|
})
|
||||||
|
|
||||||
|
jyMoney.value = (rps.data as any).map((n:any) => {
|
||||||
|
return Math.trunc(n.inMoney/100)
|
||||||
|
})
|
||||||
|
|
||||||
|
walletQuantity.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.walletQuantity
|
||||||
|
})
|
||||||
|
|
||||||
|
refundQuantity.value = (rps.data as any).map((n:any) => {
|
||||||
|
return n.refundQuantity
|
||||||
|
})
|
||||||
|
walletMoney.value = (rps.data as any).map((n:any) => {
|
||||||
|
return Math.trunc(n.walletMoney/100)
|
||||||
|
})
|
||||||
|
|
||||||
|
refundMoney.value = (rps.data as any).map((n:any) => {
|
||||||
|
return Math.trunc(n.walletMoney/100)
|
||||||
|
})
|
||||||
|
initChart6()
|
||||||
|
})
|
||||||
|
|
||||||
|
//同比 环比
|
||||||
|
gettbhb(1).then(rps => {
|
||||||
|
tbhbdata.value = rps.data
|
||||||
|
|
||||||
|
jytb.value = tbhbdata.value.quantity - tbhbdata.value.lastMonthQuantity //订单量同比
|
||||||
|
jyhb.value = tbhbdata.value.quantity - tbhbdata.value.lastYearQuantity //订单量环比
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jetb.value = Math.trunc((tbhbdata.value.tradeAmount - tbhbdata.value.lastMonthTradeAmount)/100) //交易金额同比
|
||||||
|
jehb.value =Math.trunc((tbhbdata.value.tradeAmount - tbhbdata.value.lastYearTradeAmount)/100) //交易金额环比
|
||||||
|
|
||||||
|
})
|
||||||
|
//gettbhb(2).then(rps => {})
|
||||||
|
|
||||||
|
let year = new Date().getFullYear()
|
||||||
|
let moth:any = String((new Date().getMonth() + 1)).padStart(2,'0')
|
||||||
|
let date = String(new Date().getDate()).padStart(2,'0')
|
||||||
|
// if(moth < 10){
|
||||||
|
// moth = '0'+ moth
|
||||||
|
// }
|
||||||
|
//订单-按换电站统计
|
||||||
|
gethdztj({
|
||||||
|
timeBegin:`${year}-01-01 00:00:00`,
|
||||||
|
timeEnd:`${year}-${moth}-${date} 23:59:59`
|
||||||
|
}).then(rps => {
|
||||||
|
totalOrder.value = (rps.data as any).quantity
|
||||||
|
|
||||||
|
bzdata.value = (rps.data as any).stationOrderDataList.map((n:any) => {
|
||||||
|
return {
|
||||||
|
name:n.stationName,
|
||||||
|
value:n.quantity
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// let keys = Object.keys((rps.data as any).stationRatio)
|
||||||
|
// let values = Object.values((rps.data as any).stationRatio)
|
||||||
|
// bzdata.value = keys.map((n,i) => {
|
||||||
|
// return {
|
||||||
|
// name:n.split('---')[1],
|
||||||
|
// value:values[i]
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// data: [
|
||||||
|
// { value: 1048, name: "充电订单" },
|
||||||
|
// { value: 735, name: "换电订单" },
|
||||||
|
// { value: 580, name: "认证" },
|
||||||
|
// { value: 484, name: "换电" },
|
||||||
|
// { value: 300, name: "充电" },
|
||||||
|
// ],
|
||||||
|
|
||||||
initChart4();
|
initChart4();
|
||||||
initChart5();
|
})
|
||||||
initChart6();
|
|
||||||
window.addEventListener("resize", resizeChart);
|
|
||||||
});
|
|
||||||
});
|
//交易
|
||||||
|
getjytj({
|
||||||
|
timeBegin:`${year}-01-01 00:00:00`,
|
||||||
|
timeEnd:`${year}-${moth}-${date} 23:59:59`
|
||||||
|
}).then(rps => {
|
||||||
|
totalmoney.value = (rps.data as any).totalMoney
|
||||||
|
|
||||||
|
jyamount.value = (rps.data as any).totalMoney
|
||||||
|
|
||||||
|
jyamount.value = glnum(jyamount.value)
|
||||||
|
|
||||||
|
zcamount.value = (rps.data as any).totalRefund
|
||||||
|
|
||||||
|
zcamount.value = glnum(zcamount.value)
|
||||||
|
|
||||||
|
totalRefund.value = (rps.data as any).totalRefund
|
||||||
|
})
|
||||||
|
window.addEventListener("resize", resizeChart)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
//销毁
|
//销毁
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
window.removeEventListener("resize", resizeChart);
|
window.removeEventListener("resize", resizeChart)
|
||||||
});
|
})
|
||||||
|
|
||||||
// defineExpose无需导入,直接使用
|
// defineExpose无需导入,直接使用
|
||||||
// defineExpose({ value });
|
// defineExpose({ value });
|
||||||
@ -464,6 +1077,7 @@ onBeforeUnmount(() => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
border-right:1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-msg-num {
|
.grid-msg-num {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -24,17 +24,22 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="showpop(1)">新增</el-button>
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'600px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="账户编码" min-width="300" align="center" prop="code" :show-overflow-tooltip="true">
|
<el-table-column label="账户编码" min-width="300" align="center" prop="code" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -367,6 +372,7 @@
|
|||||||
return new Date().getTime()
|
return new Date().getTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
@ -388,7 +394,7 @@
|
|||||||
//初始查询换电站
|
//初始查询换电站
|
||||||
let yunList = ref<any>([])
|
let yunList = ref<any>([])
|
||||||
gethdzlist({
|
gethdzlist({
|
||||||
pageSize:20, //每页条数
|
pageSize:100, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
proxyId:'', //归属运营商ID
|
proxyId:'', //归属运营商ID
|
||||||
name:'', //站点名称
|
name:'', //站点名称
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -12,6 +12,18 @@
|
|||||||
<el-form-item label="车牌号" prop="plateNum">
|
<el-form-item label="车牌号" prop="plateNum">
|
||||||
<el-input v-model="queryParams.plateNum" placeholder="请输入车牌号" clearable />
|
<el-input v-model="queryParams.plateNum" placeholder="请输入车牌号" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="订单状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" style="width: 200px;">
|
||||||
|
<el-option label="已创建" value="1" />
|
||||||
|
<el-option label="换电中" value="2" />
|
||||||
|
<el-option label="换电完成" value="3" />
|
||||||
|
<el-option label="充电中" value="4" />
|
||||||
|
<el-option label="充电完成" value="5" />
|
||||||
|
<el-option label="待结算" value="6" />
|
||||||
|
<el-option label="已完成" value="7" />
|
||||||
|
<el-option label="已取消" value="9" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="订单开始时间" prop="orderTimeBegin">
|
<el-form-item label="订单开始时间" prop="orderTimeBegin">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.orderTimeBegin"
|
v-model="queryParams.orderTimeBegin"
|
||||||
@ -45,18 +57,37 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
<div style="display: flex;justify-content: space-between;">
|
||||||
icon="Plus"
|
<div>
|
||||||
@click="showpop(1)">新增</el-button>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Wallet"
|
||||||
|
@click="zfdrawer = true">批量支付</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--@selection-change="selChange"-->
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'550px':'680px'"
|
||||||
>
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55" /> -->
|
||||||
<el-table-column label="订单号" min-width="320" align="center" prop="orderNo" :show-overflow-tooltip="true">
|
<el-table-column label="订单号" min-width="320" align="center" prop="orderNo" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div @click="getdetails(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.orderNo}}</div>
|
<div @click="getdetails(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.orderNo}}</div>
|
||||||
@ -79,7 +110,7 @@
|
|||||||
<div v-else-if="scope.row.status == 3">换电完成</div>
|
<div v-else-if="scope.row.status == 3">换电完成</div>
|
||||||
<div v-else-if="scope.row.status == 4">充电中</div>
|
<div v-else-if="scope.row.status == 4">充电中</div>
|
||||||
<div v-else-if="scope.row.status == 5">充电完成</div>
|
<div v-else-if="scope.row.status == 5">充电完成</div>
|
||||||
<div v-else-if="scope.row.status == 6">待结算</div>
|
<div v-else-if="scope.row.status == 6" style="color: #ff6000;">待结算</div>
|
||||||
<div v-else-if="scope.row.status == 7">已完成</div>
|
<div v-else-if="scope.row.status == 7">已完成</div>
|
||||||
<div v-else-if="scope.row.status == 7">已取消</div>
|
<div v-else-if="scope.row.status == 7">已取消</div>
|
||||||
</template>
|
</template>
|
||||||
@ -387,6 +418,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--批量支付-->
|
||||||
|
<el-drawer
|
||||||
|
v-model="zfdrawer"
|
||||||
|
:with-header="false"
|
||||||
|
size="1200px"
|
||||||
|
>
|
||||||
|
<Payment v-if="zfdrawer" />
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
<!--详情修改-->
|
<!--详情修改-->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
@ -426,7 +466,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="5">订单状态:</el-col>
|
<el-col :span="5">订单状态:</el-col>
|
||||||
<el-col :span="19" style="color: #417ebb;">{{getstu(xqobj.status)}}</el-col>
|
<el-col :span="19" :style="{color:xqobj.status == 6?'#ff6000':'#417ebb'}">{{getstu(xqobj.status)}}</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -594,6 +634,7 @@
|
|||||||
<el-row style="margin-bottom: 20px;padding-bottom: 20px;border-bottom: 1px solid #ccc;">
|
<el-row style="margin-bottom: 20px;padding-bottom: 20px;border-bottom: 1px solid #ccc;">
|
||||||
<el-col :span="xqobj.status == 5?12:24" :style="{textAlign:xqobj.status == 5?'right':'center'}">
|
<el-col :span="xqobj.status == 5?12:24" :style="{textAlign:xqobj.status == 5?'right':'center'}">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="xqobj.status != 7 || xqobj.status != 9"
|
||||||
style="margin-right: 25px;"
|
style="margin-right: 25px;"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@ -635,14 +676,28 @@
|
|||||||
import {
|
import {
|
||||||
getwxlist
|
getwxlist
|
||||||
} from '@/api/operation/wxuser'
|
} from '@/api/operation/wxuser'
|
||||||
|
|
||||||
import { carNum } from '@/utils/validate'
|
import { carNum } from '@/utils/validate'
|
||||||
|
|
||||||
|
import Payment from './payment.vue'
|
||||||
|
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
// } from '@/api/systemSet/dict'
|
// } from '@/api/systemSet/dict'
|
||||||
import { jsonp } from 'vue-jsonp'
|
// import { jsonp } from 'vue-jsonp'
|
||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive,watch} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
//批量支付
|
||||||
|
let zfdrawer = ref(false)
|
||||||
|
watch(zfdrawer,v =>{
|
||||||
|
if(!v){
|
||||||
|
handBtnqu()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
@ -653,7 +708,8 @@
|
|||||||
stationCode:'', //换电站编码
|
stationCode:'', //换电站编码
|
||||||
stationName:'', //换电站名称
|
stationName:'', //换电站名称
|
||||||
userId:'', //换电车主ID
|
userId:'', //换电车主ID
|
||||||
tradeNo:'' //交易编码
|
tradeNo:'', //交易编码
|
||||||
|
status:''
|
||||||
})
|
})
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
@ -713,22 +769,24 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function autoblur() {
|
function autoblur() {
|
||||||
if(addata.userId === ''){
|
if(addata.orderPreUid === ''){
|
||||||
wxuser.value = ''
|
wxuser.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoclear() {
|
function autoclear() {
|
||||||
addata.userId = ''
|
addata.orderPreUid = ''
|
||||||
|
addata.orderPreUname = ''
|
||||||
|
addata.orderPrePhone = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelect(v: any) {
|
function handleSelect(v: any) {
|
||||||
console.log(v)
|
|
||||||
//addata.userId = v.id
|
//addata.userId = v.id
|
||||||
addata.orderPreUid = v.pkId //预约用户
|
addata.orderPreUid = v.pkId //预约用户
|
||||||
addata.orderPreUname = v.name //预约用户名称
|
addata.orderPreUname = v.name //预约用户名称
|
||||||
addata.orderPrePhone = v.phoneNumber //预约用户手机
|
addata.orderPrePhone = v.phoneNumber //预约用户手机
|
||||||
}
|
}
|
||||||
|
|
||||||
function getyys() {
|
function getyys() {
|
||||||
yysList.value.splice(0)
|
yysList.value.splice(0)
|
||||||
getjqrlist(queryParams).then(rps => {
|
getjqrlist(queryParams).then(rps => {
|
||||||
@ -806,7 +864,7 @@
|
|||||||
returnBatRentStationName:'', //归还电池租出的换电站
|
returnBatRentStationName:'', //归还电池租出的换电站
|
||||||
changeMode:'', //换电模式:1-全自动,2-半自动,3-人工干预
|
changeMode:'', //换电模式:1-全自动,2-半自动,3-人工干预
|
||||||
changeLane:'', //换电车道 1-A 车道;2-B 车道
|
changeLane:'', //换电车道 1-A 车道;2-B 车道
|
||||||
userId:'', //换电车主ID
|
//userId:'', //换电车主ID
|
||||||
tradeNo:'', //交易编码
|
tradeNo:'', //交易编码
|
||||||
|
|
||||||
orderPreId:'', //预约订单ID
|
orderPreId:'', //预约订单ID
|
||||||
@ -873,7 +931,7 @@
|
|||||||
addata.returnBatRentStationName = row.returnBatRentStationName
|
addata.returnBatRentStationName = row.returnBatRentStationName
|
||||||
addata.changeMode = row.changeMode
|
addata.changeMode = row.changeMode
|
||||||
addata.changeLane = row.changeLane
|
addata.changeLane = row.changeLane
|
||||||
addata.userId = row.userId
|
//addata.userId = row.userId
|
||||||
addata.tradeNo= row.tradeNo
|
addata.tradeNo= row.tradeNo
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@ -905,7 +963,7 @@
|
|||||||
addata.returnBatRentStationName = ''
|
addata.returnBatRentStationName = ''
|
||||||
addata.changeMode = ''
|
addata.changeMode = ''
|
||||||
addata.changeLane = ''
|
addata.changeLane = ''
|
||||||
addata.userId = '' //??
|
// addata.userId = '' //??
|
||||||
addata.tradeNo = ''
|
addata.tradeNo = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -988,6 +1046,27 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//批量支付
|
||||||
|
let dzarr = ref<any[]>([])
|
||||||
|
function selChange(v:any) {
|
||||||
|
dzarr.value = v
|
||||||
|
}
|
||||||
|
|
||||||
|
function payment() {
|
||||||
|
if(dzarr.value.length > 0){
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'success',
|
||||||
|
// message: '支付成功'
|
||||||
|
// })
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
type: 'warning',
|
||||||
|
message: '请选择订单'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getyys()
|
getyys()
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
479
src/views/order/replabatt/payment.vue
Normal file
479
src/views/order/replabatt/payment.vue
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
|
<el-form
|
||||||
|
ref="querform"
|
||||||
|
:model="queryParams"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="所属公司" prop="ccode">
|
||||||
|
<el-select v-model="queryParams.ccode" style="width: 200px;">
|
||||||
|
<el-option v-for="n in gongslist" :label="n.cname" :value="n.ccode" @click="getcname(n)" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="订单号" prop="orderNo">
|
||||||
|
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车牌号" prop="plateNum">
|
||||||
|
<el-input v-model="queryParams.plateNum" placeholder="请输入车牌号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单开始时间" prop="orderTimeBegin">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.orderTimeBegin"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="订单结束时间" prop="orderTimeEnd">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.orderTimeEnd"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="换电站" prop="stationCode">
|
||||||
|
<el-select v-model="queryParams.stationCode" placeholder="请选择换电站" style="width: 200px;">
|
||||||
|
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="交易编码" prop="tradeNo">
|
||||||
|
<el-input v-model="queryParams.tradeNo" placeholder="请输入交易编码" clearable />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handBtnqu">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Wallet"
|
||||||
|
@click="payment(1)">支付</el-button>
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="600px"
|
||||||
|
@selection-change="selChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column label="订单号" min-width="320" align="center" prop="orderNo" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="订单类型" min-width="80" align="center" prop="sourceFrom" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.status == 1">换电</div>
|
||||||
|
<div v-else-if="scope.row.status == 2">充电</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车牌号" min-width="120" align="center" prop="plateNum" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="订单时间" min-width="200" align="center" prop="orderTime" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="金额账号" min-width="120" align="center" prop="accountCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="订单金额" min-width="120" align="center" prop="amount" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="订单状态" min-width="120" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.status == 1">已创建</div>
|
||||||
|
<div v-else-if="scope.row.status == 2">换电中</div>
|
||||||
|
<div v-else-if="scope.row.status == 3">换电完成</div>
|
||||||
|
<div v-else-if="scope.row.status == 4">充电中</div>
|
||||||
|
<div v-else-if="scope.row.status == 5">充电完成</div>
|
||||||
|
<div v-else-if="scope.row.status == 6" style="color: #ff6000;">待结算</div>
|
||||||
|
<div v-else-if="scope.row.status == 7">已完成</div>
|
||||||
|
<div v-else-if="scope.row.status == 7">已取消</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计费方式" min-width="120" align="center" prop="feeType" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.feeType == 1">ODO</div>
|
||||||
|
<div v-else-if="scope.row.feeType == 2">SOC</div>
|
||||||
|
<div v-else-if="scope.row.feeType == 3">换电量</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="基础费用" min-width="120" align="center" prop="basicFee" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="服务开始时间" min-width="120" align="center" prop="serviceTimeBegin" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="服务结束时间" min-width="120" align="center" prop="serviceTimeEnd" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="服务费" min-width="120" align="center" prop="serviceFee" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="上次租赁电池时车辆里程" min-width="180" align="center" prop="lastRentBatCarOdo" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归还电池时车辆里程" min-width="150" align="center" prop="nowReturnBatCarOdo" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="按ODO换电费" min-width="120" align="center" prop="odoAmount" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="总充电量" min-width="120" align="center" prop="electAmount" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="租借电池包仓位" min-width="120" align="center" prop="rentBatNo" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="租用电池包编码" min-width="120" align="center" prop="rentBatCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="租用电池包SOC" min-width="120" align="center" prop="rentBatSoc" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归还电池包编码" min-width="120" align="center" prop="returnBatCode" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="归还电池包仓位" min-width="120" align="center" prop="returnBatNo" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归还电池包SOC" min-width="120" align="center" prop="returnBatSoc" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归还电池租出时soc" min-width="150" align="center" prop="returnBatRentSoc" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="归还电池租出的换电站" min-width="160" align="center" prop="returnBatRentStationName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="换电模式" min-width="120" align="center" prop="changeMode" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.changeMode == 1">全自动</div>
|
||||||
|
<div v-else-if="scope.row.changeMode == 2">半自动</div>
|
||||||
|
<div v-else-if="scope.row.changeMode == 3">人工干预</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="换电车道" min-width="120" align="center" prop="changeLane" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.changeMode == 1">A车道</div>
|
||||||
|
<div v-else-if="scope.row.changeMode == 2">B车道</div>
|
||||||
|
<div v-else-if="scope.row.changeMode == 3">人工干预</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交易编码" min-width="120" align="center" prop="tradeNo" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
<div v-if="total > 10" style="display: flex;justify-content: right;padding-top:20px;">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="queryParams.pageNo"
|
||||||
|
v-model:page-size="queryParams.pageSize"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
background
|
||||||
|
size="small"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="getyys"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
width="500"
|
||||||
|
:align-center="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@close="zfclose"
|
||||||
|
>
|
||||||
|
<div style="width: 100%;padding: 25px;text-align: center;">
|
||||||
|
<div style="padding-bottom: 15px;font-size: 22px;">请打开微信扫一扫完成支付</div>
|
||||||
|
<div v-if="qscode" style="display: flex;padding-bottom: 15px;align-items: center;justify-content: center;">
|
||||||
|
<div style="padding-right: 10px;">剩余支付时间</div>
|
||||||
|
|
||||||
|
<div style="padding-right: 6px;color: #ff6000;"><span style="font-size: 22px;">{{tmminute}} </span>分</div>
|
||||||
|
<div style="color: #ff6000;"><span style="font-size: 22px;">{{tmsecond}} </span>秒</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="qscode" style="position: relative;width: 200px;height: 200px;margin: 0 auto;">
|
||||||
|
<div v-if="issx" @click="payment()" style="position: absolute;top: 0;left: 0;width: 200px;height: 200px;line-height: 200px;font-size: 20px;color: #fff;background:rgba(0, 0, 0, 0.7);cursor: pointer;">点击重新获取</div>
|
||||||
|
<img :src="qscode" width="200" height="200" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else style="width:200px;height:200px;margin: 0 auto;line-height: 200px;text-align: center;">正在生成二维码...</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts" name="UserPage">
|
||||||
|
import {
|
||||||
|
gethdzlist
|
||||||
|
} from '@/api/swapstation/hdz'
|
||||||
|
import {
|
||||||
|
getjqrlist,
|
||||||
|
batchpayment,
|
||||||
|
getip,
|
||||||
|
paystatus
|
||||||
|
} from '@/api/order/replabatt'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getlist
|
||||||
|
} from '@/api/operation/company'
|
||||||
|
// import {
|
||||||
|
// getdict
|
||||||
|
// } from '@/api/systemSet/dict'
|
||||||
|
// import { jsonp } from 'vue-jsonp'
|
||||||
|
import { ref,reactive} from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
// const emit = defineEmits<{
|
||||||
|
// close: []
|
||||||
|
// }>()
|
||||||
|
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
orderNo:'', //订单编码
|
||||||
|
plateNum:'', //车牌号
|
||||||
|
orderTimeBegin:'', //订单时间开始,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
|
orderTimeEnd:'', //订单时间结束
|
||||||
|
stationCode:'', //换电站编码
|
||||||
|
stationName:'', //换电站名称
|
||||||
|
userId:'', //换电车主ID
|
||||||
|
tradeNo:'', //交易编码
|
||||||
|
status:'6', //订单状态
|
||||||
|
ccode:'' //公司编码
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let total = ref(0)
|
||||||
|
let yysList = ref<any>([])
|
||||||
|
function handBtnqu(){
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
let cname = ref('')
|
||||||
|
//初始查询公司
|
||||||
|
let gongslist = ref<any>([])
|
||||||
|
getlist({
|
||||||
|
pageSize:100, //每页条数
|
||||||
|
pageNo:1 //页数
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
gongslist.value = list?list:[]
|
||||||
|
queryParams.ccode = gongslist.value[0].ccode
|
||||||
|
cname.value = gongslist.value[0].cname
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function getcname(n:any){
|
||||||
|
cname.value = n.cname
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始查询换电站
|
||||||
|
let yunList = ref<any>([])
|
||||||
|
gethdzlist({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
proxyId:'', //归属运营商ID
|
||||||
|
name:'', //站点名称
|
||||||
|
code:'', //站点编码
|
||||||
|
status:'', //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
|
type:'', //站点类型ID
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
yunList.value = list?list:[]
|
||||||
|
//queryParams.stationCode = list[0].code
|
||||||
|
//getyys()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let wxuser = ref('')
|
||||||
|
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
getjqrlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
yysList.value = (rps.data as any).records
|
||||||
|
total.value = (rps.data as any).total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSizeChange(val:number) {
|
||||||
|
queryParams.pageSize = val
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
//重置
|
||||||
|
let querform = ref()
|
||||||
|
function resetQuery() {
|
||||||
|
querform.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//批量支付
|
||||||
|
let dzarr = ref<any[]>([])
|
||||||
|
|
||||||
|
//获取ip
|
||||||
|
getip().then(rps => {
|
||||||
|
payqs.payerClientIp = rps.data
|
||||||
|
})
|
||||||
|
|
||||||
|
let openpop = ref(false)
|
||||||
|
|
||||||
|
//总金额
|
||||||
|
let totalAmount = ref<any>(0)
|
||||||
|
//订单号
|
||||||
|
let orderNo = ref('')
|
||||||
|
function selChange(v:any) {
|
||||||
|
dzarr.value = v
|
||||||
|
totalAmount.value = 0
|
||||||
|
let odrarr = []
|
||||||
|
if(v.length > 0){
|
||||||
|
odrarr = v.map((e:any) => {
|
||||||
|
e.amount = e.amount*1
|
||||||
|
totalAmount.value += e.amount
|
||||||
|
return e.orderNo
|
||||||
|
})
|
||||||
|
}
|
||||||
|
orderNo.value = odrarr.join()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
let payqs = reactive<any>({
|
||||||
|
//wuid:'', //公司编码,
|
||||||
|
ccode:'', //公司编码
|
||||||
|
description:'', //订单总描述 公司名称+日期
|
||||||
|
total:0, //支付金额,单位:分
|
||||||
|
timeExp:'', //支付结束时间
|
||||||
|
attach:{ //订单附加信息
|
||||||
|
type: 2, //"1-充值,2-订单。类型 number"
|
||||||
|
orderNo:'', //"订单号",
|
||||||
|
trader:'', //交易发起人
|
||||||
|
tradercode:'', //uni.getStorageSync('wxuid') //交易人编码
|
||||||
|
description:''
|
||||||
|
//walletCode:'' //钱包编码
|
||||||
|
// ownerId:'', //"户主ID,个人wuid,企业:公司编码",
|
||||||
|
// walletCode:'' //"钱包编码"
|
||||||
|
},
|
||||||
|
// goodsDetail:[
|
||||||
|
// {
|
||||||
|
// merchantGoodsId:'', //商户侧商品编码
|
||||||
|
// wechatpayGoodsId:'', //微信支付定义的统一商品编号(没有可不传)
|
||||||
|
// goodsName:'', //商品的实际名称
|
||||||
|
// quantity:1, //商品数量
|
||||||
|
// unitPrice:0 //商品价格
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
payerClientIp:'', //用户IP
|
||||||
|
//deviceId:'', //用户设备型号
|
||||||
|
//stationCode:''
|
||||||
|
})
|
||||||
|
let timer:any = null
|
||||||
|
|
||||||
|
let qscode = ref('')
|
||||||
|
function zfclose() {
|
||||||
|
payqs.attach = JSON.parse(payqs.attach)
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//失效倒计时
|
||||||
|
let minute = ref<any>(29)
|
||||||
|
let second = ref<any>(59)
|
||||||
|
|
||||||
|
let tmminute = ref<any>(29)
|
||||||
|
let tmsecond = ref<any>(59)
|
||||||
|
|
||||||
|
let djstimet:any = null
|
||||||
|
//是否失效
|
||||||
|
let issx = ref(false)
|
||||||
|
function payment(type?:number) {
|
||||||
|
if(dzarr.value.length > 0){
|
||||||
|
|
||||||
|
//失效时间
|
||||||
|
let sxtime:any = new Date().getTime()
|
||||||
|
sxtime = sxtime + 30 * 60 * 1000
|
||||||
|
sxtime = new Date(sxtime)
|
||||||
|
let sxyear = sxtime.getFullYear()
|
||||||
|
let sxmoth = String((sxtime.getMonth() + 1)).padStart(2,'0')
|
||||||
|
let sxdate = String(sxtime.getDate()).padStart(2,'0')
|
||||||
|
let sxhhour = String(sxtime.getHours()).padStart(2,'0')
|
||||||
|
let sxminute = String(sxtime.getMinutes()).padStart(2,'0')
|
||||||
|
let sxSeconds = String(sxtime.getSeconds()).padStart(2,'0')
|
||||||
|
|
||||||
|
payqs.timeExp = `${sxyear}-${sxmoth}-${sxdate} ${sxhhour}:${sxminute}:${sxSeconds}`
|
||||||
|
|
||||||
|
payqs.ccode = queryParams.ccode
|
||||||
|
payqs.total = totalAmount
|
||||||
|
payqs.attach.orderNo = orderNo.value
|
||||||
|
|
||||||
|
payqs.attach.tradercode = queryParams.ccode
|
||||||
|
let dateTime = new Date()
|
||||||
|
let year = dateTime.getFullYear()
|
||||||
|
let moth:any = String((dateTime.getMonth() + 1)).padStart(2,'0')
|
||||||
|
//let date = String(dateTime.getDate()).padStart(2,'0')
|
||||||
|
|
||||||
|
let ddms = `${cname.value}支付${year}年${moth}月订单`
|
||||||
|
payqs.description = ddms
|
||||||
|
payqs.attach.description = ddms
|
||||||
|
if(type == 1){
|
||||||
|
payqs.attach = JSON.stringify(payqs.attach)
|
||||||
|
}else{
|
||||||
|
issx.value = false
|
||||||
|
}
|
||||||
|
openpop.value = true
|
||||||
|
|
||||||
|
qscode.value = ''
|
||||||
|
if(timer){
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(djstimet){
|
||||||
|
clearInterval(djstimet)
|
||||||
|
}
|
||||||
|
|
||||||
|
batchpayment(payqs).then(rps => {
|
||||||
|
qscode.value = (rps.data as any).codeUrl
|
||||||
|
|
||||||
|
djstimet = setInterval(() => {
|
||||||
|
second.value--
|
||||||
|
tmsecond.value = second.value
|
||||||
|
if(second.value == 0 && minute.value == 0) {
|
||||||
|
tmminute.value = '00'
|
||||||
|
tmsecond.value = '00'
|
||||||
|
issx.value = true
|
||||||
|
clearInterval(djstimet)
|
||||||
|
}
|
||||||
|
if(second.value == 0) {
|
||||||
|
second.value = 59
|
||||||
|
|
||||||
|
|
||||||
|
tmsecond.value = 59
|
||||||
|
|
||||||
|
minute.value--
|
||||||
|
if(minute.value < 10){
|
||||||
|
tmminute.value = '0'+ minute.value
|
||||||
|
}else{
|
||||||
|
tmminute.value = minute.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(second.value < 10){
|
||||||
|
tmsecond.value = '0' + second.value
|
||||||
|
}else{
|
||||||
|
tmsecond.value = second.value
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
|
timer = setInterval(() => {
|
||||||
|
paystatus((rps.data as any).OutTradeNo).then(rps => {
|
||||||
|
if((rps.data as any).tradeState == 'SUCCESS'){ //'NOTPAY' 订单未支付
|
||||||
|
ElMessage({
|
||||||
|
type: 'warning',
|
||||||
|
message: '支付成功'
|
||||||
|
})
|
||||||
|
openpop.value = false
|
||||||
|
handBtnqu()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},5000)
|
||||||
|
})
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'success',
|
||||||
|
// message: '支付成功'
|
||||||
|
// })
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
type: 'warning',
|
||||||
|
message: '请选择订单'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
>
|
>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" style="width: 200px" placeholder="请选择状态">
|
<el-select v-model="queryParams.status" style="width: 180px" placeholder="请选择状态">
|
||||||
<el-option label="预约成功" value="1" />
|
<el-option label="预约成功" value="1" />
|
||||||
<el-option label="到店使用" value="2" />
|
<el-option label="已使用" value="2" />
|
||||||
<el-option label="取消" value="3" />
|
<el-option label="已取消" value="3" />
|
||||||
<el-option label="过期" value="4" />
|
<el-option label="已过期" value="4" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="预约车主" prop="userId">
|
<!-- <el-form-item label="预约车主" prop="userId">
|
||||||
<el-input v-model="queryParams.userId" placeholder="请输入车主" clearable />
|
<el-input v-model="queryParams.userId" placeholder="请输入车主" clearable />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
|
||||||
<el-form-item label="预约人" prop="userId">
|
<el-form-item label="预约人" prop="ucode">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="qswxuser"
|
v-model="qswxuser"
|
||||||
@ -30,6 +30,39 @@
|
|||||||
@clear="qsautoclear"
|
@clear="qsautoclear"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="车牌号" prop="plateNum">
|
||||||
|
<el-input v-model="queryParams.plateNum" placeholder="请输入车牌号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item v-if="yunList.length > 0" label="换电站" prop="stationCode">
|
||||||
|
<el-select style="width: 200px;" v-model="queryParams.stationCode" placeholder="请选择换电站">
|
||||||
|
<el-option
|
||||||
|
v-for="n in yunList"
|
||||||
|
:label="n.name"
|
||||||
|
:value="n.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="开始日期" prop="swapDayBegin">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.swapDayBegin"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 150px;"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束日期" prop="swapDayEnd">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.swapDayEnd"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 150px;"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handBtnqu">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handBtnqu">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -37,31 +70,40 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<div style="display: flex;justify-content: space-between;">
|
||||||
type="primary"
|
<el-button
|
||||||
plain
|
type="primary"
|
||||||
icon="Plus"
|
plain
|
||||||
@click="showpop(1)">新增</el-button>
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'550px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="预约人姓名" min-width="120" align="center" prop="uname" :show-overflow-tooltip="true" />
|
<el-table-column label="预约人姓名" min-width="120" align="center" prop="uname" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
<el-table-column label="手机号码" min-width="120" align="center" prop="phone" :show-overflow-tooltip="true" />
|
<el-table-column label="手机号码" min-width="120" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="车牌号" min-width="120" align="center" prop="plateNum" :show-overflow-tooltip="true" />
|
<el-table-column label="车牌号" min-width="120" align="center" prop="plateNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电站名称" min-width="120" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
<el-table-column label="换电站名称" min-width="120" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="预约换电日期" min-width="120" align="center" prop="swapDay" :show-overflow-tooltip="true" />
|
<el-table-column label="预约换电日期" min-width="120" align="center" prop="swapDay" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{formatDa(scope.row.swapDay)}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="换电时间段" min-width="120" align="center" prop="swapDuration" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时间段" min-width="120" align="center" prop="swapDuration" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="状态" min-width="120" align="center" prop="status" :show-overflow-tooltip="true">
|
<el-table-column label="状态" min-width="120" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.status == 1">预约成功</div>
|
<div v-if="scope.row.status == 1" style="color: #59c325;">预约成功</div>
|
||||||
<div v-else-if="scope.row.status == 2">到店使用</div>
|
<div v-else-if="scope.row.status == 2" style="color: #b88230;">已使用</div>
|
||||||
<div v-else-if="scope.row.status == 3">取消</div>
|
<div v-else-if="scope.row.status == 3">已取消</div>
|
||||||
<div v-else-if="scope.row.status == 4">过期</div>
|
<div v-else-if="scope.row.status == 4">已过期</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||||
@ -204,19 +246,35 @@
|
|||||||
delhdz
|
delhdz
|
||||||
} from '@/api/order/reservation'
|
} from '@/api/order/reservation'
|
||||||
import { carNum } from '@/utils/validate'
|
import { carNum } from '@/utils/validate'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getwxlist
|
||||||
|
} from '@/api/operation/wxuser'
|
||||||
|
|
||||||
|
import { formatDate } from '@/utils/ruoyi'
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
// } from '@/api/systemSet/dict'
|
// } from '@/api/systemSet/dict'
|
||||||
import { jsonp } from 'vue-jsonp'
|
import { jsonp } from 'vue-jsonp'
|
||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
|
||||||
|
function formatDa(s:any) {
|
||||||
|
return formatDate(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
userId:'', //换电车主ID
|
ucode:'', //换电车主ID
|
||||||
status:''
|
status:'',
|
||||||
|
plateNum:'', //车牌号
|
||||||
|
swapDayBegin:'', //预约换电日期开始,示例值(yyyyMMdd)
|
||||||
|
swapDayEnd:'', //预约换电日期结束
|
||||||
|
stationCode:'' //换电站编码
|
||||||
})
|
})
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
@ -230,7 +288,7 @@
|
|||||||
//初始查询换电站
|
//初始查询换电站
|
||||||
let yunList = ref<any>([])
|
let yunList = ref<any>([])
|
||||||
gethdzlist({
|
gethdzlist({
|
||||||
pageSize:20, //每页条数
|
pageSize:100, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
proxyId:'', //归属运营商ID
|
proxyId:'', //归属运营商ID
|
||||||
name:'', //站点名称
|
name:'', //站点名称
|
||||||
@ -263,9 +321,9 @@
|
|||||||
yysList.value.splice(0)
|
yysList.value.splice(0)
|
||||||
getjqrlist(queryParams).then(rps => {
|
getjqrlist(queryParams).then(rps => {
|
||||||
if(rps.data){
|
if(rps.data){
|
||||||
yysList.value = rps.data
|
//yysList.value = rps.data
|
||||||
// yysList.value = (rps.data as any).records
|
yysList.value = (rps.data as any).records
|
||||||
// total.value = (rps.data as any).total
|
total.value = (rps.data as any).total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -292,6 +350,7 @@
|
|||||||
let wxuser = ref('')
|
let wxuser = ref('')
|
||||||
let addata = reactive({
|
let addata = reactive({
|
||||||
userId:'', //预约人ID
|
userId:'', //预约人ID
|
||||||
|
//ucode:'', //预约人编码
|
||||||
uname:'', //预约人姓名
|
uname:'', //预约人姓名
|
||||||
phone:'', //手机号码
|
phone:'', //手机号码
|
||||||
plateNum:'', //车牌号
|
plateNum:'', //车牌号
|
||||||
@ -300,6 +359,17 @@
|
|||||||
swapDay:'', //预约换电日期,示例值(yyyyMMdd)
|
swapDay:'', //预约换电日期,示例值(yyyyMMdd)
|
||||||
swapDuration:'', //预约换电时间段,示例值(8:00-10:00)
|
swapDuration:'', //预约换电时间段,示例值(8:00-10:00)
|
||||||
status:'1' //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
status:'1' //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||||
|
|
||||||
|
// source:'2', //来源:1-小程序,2-云端,3-站端
|
||||||
|
// ucode:'', //预约人编码
|
||||||
|
// uname:'', //预约人姓名
|
||||||
|
// phone:'', //手机号码
|
||||||
|
// plateNum:'', //车牌号
|
||||||
|
// stationCode:'', //换电站编码
|
||||||
|
// stationName:'', //换电站名称
|
||||||
|
// swapDay:'', //预约换电日期,示例值(yyyyMMdd)
|
||||||
|
// //reservationTime:'' //预约时间
|
||||||
|
// swapDuration:'' //预约换电时间段,示例值(8:00-10:00)
|
||||||
})
|
})
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
userId:[
|
userId:[
|
||||||
@ -321,38 +391,34 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
//获取微信用户 ?? 暂时调用qq地图接口做个示例
|
//获取微信用户 ?? 暂时调用qq地图接口做个示例
|
||||||
|
//获取微信用户 ??
|
||||||
async function querySearchAsync (queryString: string, cb:any) {
|
async function querySearchAsync (queryString: string, cb:any) {
|
||||||
if(queryString !== ''){
|
getwxlist({
|
||||||
const url = 'https://apis.map.qq.com/ws/place/v1/suggestion' // 关键字查询??
|
pageSize:100, //每页条数
|
||||||
jsonp(url, {
|
pageNo:1, //页数
|
||||||
key: '3WDBZ-HMUCX-NIE43-ZPLQ4-OOHAO-OKBES', //ZJABZ-FWV6G-F7ZQ2-QKQKL-KQ3I5-DNBT7
|
phoneNumber:'' //手机号
|
||||||
keyword: queryString,
|
}).then((res) => {
|
||||||
output: 'jsonp',
|
if (res.data && (res.data as any).records.length > 0) {
|
||||||
}).then((res) => {
|
// mapList.value = res.data;
|
||||||
console.log(res)
|
let listss = (res.data as any).records.map((n:any) => {
|
||||||
if (res.status == 0) {
|
return {
|
||||||
// mapList.value = res.data;
|
value: `${n.name?n.name:'--'}——${n.phoneNumber?n.phoneNumber:'--'}`,
|
||||||
let listss
|
name: n.name,
|
||||||
listss = res.data.map((domain:any) => {
|
phoneNumber:n.phoneNumber,
|
||||||
return {
|
id:n.wuid //??
|
||||||
value: domain.title ?`手机号:${domain.title}--昵称:${domain.address}`:domain.address,
|
}
|
||||||
id: '123456' //??
|
|
||||||
}
|
|
||||||
})
|
|
||||||
cb(listss)
|
|
||||||
//return listss
|
|
||||||
// callback(mapList.value);
|
|
||||||
}else{
|
|
||||||
cb([])
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
cb([])
|
|
||||||
})
|
})
|
||||||
}{
|
cb(listss)
|
||||||
cb([])
|
//return listss
|
||||||
|
// callback(mapList.value);
|
||||||
|
}else{
|
||||||
|
cb([])
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
cb([])
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function autoblur() {
|
function autoblur() {
|
||||||
if(addata.userId === ''){
|
if(addata.userId === ''){
|
||||||
@ -366,21 +432,23 @@
|
|||||||
|
|
||||||
function handleSelect(v: any) {
|
function handleSelect(v: any) {
|
||||||
addata.userId = v.id
|
addata.userId = v.id
|
||||||
|
addata.uname = v.name //预约用户名称
|
||||||
|
addata.phone = v.phoneNumber //预约用户手机
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function qsautoblur() {
|
function qsautoblur() {
|
||||||
if(queryParams.userId === ''){
|
if(queryParams.ucode === ''){
|
||||||
qswxuser.value = ''
|
qswxuser.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function qsautoclear() {
|
function qsautoclear() {
|
||||||
queryParams.userId = ''
|
queryParams.ucode = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function qshandleSelect(v: any) {
|
function qshandleSelect(v: any) {
|
||||||
queryParams.userId = v.id
|
queryParams.ucode = v.id
|
||||||
}
|
}
|
||||||
//获取换电站名称
|
//获取换电站名称
|
||||||
function getlabel(n:string){
|
function getlabel(n:string){
|
||||||
@ -410,6 +478,7 @@
|
|||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
|
|
||||||
yysRef.value?.validate((valid:Boolean) => {
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
console.log(addata,'addata')
|
||||||
if (valid) {
|
if (valid) {
|
||||||
savehand().then(() => {
|
savehand().then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="zjtype == 1" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="zjtype == 1 && search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -18,17 +18,32 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
|
||||||
type="primary"
|
<template v-if="zjtype == 1">
|
||||||
plain
|
<div style="display: flex;justify-content: space-between;">
|
||||||
icon="Plus"
|
<el-button
|
||||||
@click="showpop(1)">新增</el-button>
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
</template>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
:max-height="zjtype == 1?'600px':'400px'"
|
:max-height="theight"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column label="电池编码" min-width="150" align="center" prop="batCode" :show-overflow-tooltip="true">
|
<el-table-column label="电池编码" min-width="150" align="center" prop="batCode" :show-overflow-tooltip="true">
|
||||||
@ -287,7 +302,7 @@
|
|||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
// } from '@/api/systemSet/dict'
|
// } from '@/api/systemSet/dict'
|
||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive,computed} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
@ -304,6 +319,19 @@
|
|||||||
update: []
|
update: []
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
let theight = computed(() => {
|
||||||
|
if(props.zjtype == 1 && !search.value){
|
||||||
|
//?'600px':'400px'
|
||||||
|
return '680px'
|
||||||
|
}
|
||||||
|
if(props.zjtype == 1){
|
||||||
|
return '600px'
|
||||||
|
}
|
||||||
|
return '400px'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
|
|||||||
227
src/views/swapstation/cdcl/costdetails.vue
Normal file
227
src/views/swapstation/cdcl/costdetails.vue
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="padding:10px 0 20px;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="650px"
|
||||||
|
>
|
||||||
|
<el-table-column label="开始时间" min-width="150" align="center" prop="beginTime" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="结束时间" min-width="150" align="center" prop="endTime" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="充电功率" min-width="150" align="center" prop="chargingPower" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" width="150" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button>
|
||||||
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
:title="ystit"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="yysRef"
|
||||||
|
:model="addata"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="120px">
|
||||||
|
<el-row :gutter="30">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="开始和结束时间" prop="beginTime">
|
||||||
|
<el-time-picker
|
||||||
|
v-model="tiem"
|
||||||
|
:editable="false"
|
||||||
|
is-range
|
||||||
|
range-separator="至"
|
||||||
|
value-format="HH:mm:ss"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
@change="tiemchange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="充电功率" prop="chargingPower">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.chargingPower"
|
||||||
|
placeholder="请输入充电功率"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleAdd">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
addxq,
|
||||||
|
updatexq,
|
||||||
|
delxq,
|
||||||
|
getxql
|
||||||
|
} from '@/api/swapstation/cdcl'
|
||||||
|
import { ref,reactive} from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
stationCode:String
|
||||||
|
stationName:String
|
||||||
|
strategyId:String
|
||||||
|
list:any[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let yysList = ref<any>([])
|
||||||
|
if(props.list.length > 0){
|
||||||
|
yysList.value = props.list
|
||||||
|
}
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
getxql(props.strategyId).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
yysList.value = rps.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增、修改
|
||||||
|
let type = ref(1)
|
||||||
|
let openpop = ref(false)
|
||||||
|
let ystit = ref('添加充电策略详情')
|
||||||
|
let yysRef = ref()
|
||||||
|
let addata = reactive({
|
||||||
|
pkId:'',
|
||||||
|
stationCode:props.stationCode, //换电站编码
|
||||||
|
stationName:props.stationName, //换电站名称
|
||||||
|
strategyId:props.strategyId, //策略ID
|
||||||
|
beginTime:'', //开始时间,示例值(20:01:32)
|
||||||
|
endTime:'', //结束时间,示例值(23:05:41)
|
||||||
|
chargingPower:'' //充电功率
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = ref({
|
||||||
|
beginTime:[
|
||||||
|
{ required: true, message: "请选择开始和结束时间", trigger: "blur" },
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
//时间选框确定事件
|
||||||
|
let tiem = ref<any[]>([])
|
||||||
|
function tiemchange(v:any) {
|
||||||
|
if(v){
|
||||||
|
addata.beginTime = v[0] //开始时间
|
||||||
|
addata.endTime = v[1] //结束时间
|
||||||
|
}else{
|
||||||
|
addata.beginTime = ''
|
||||||
|
addata.endTime = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showpop(num:any,row?:any){
|
||||||
|
type.value = num
|
||||||
|
openpop.value = true
|
||||||
|
ystit.value = num == 1?'添加充电策略详情':'修改充电策略详情'
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
if(row){
|
||||||
|
tiem.value.push(row.beginTime)
|
||||||
|
tiem.value.push(row.endTime)
|
||||||
|
addata.pkId = row.pkId
|
||||||
|
|
||||||
|
addata.beginTime = row.beginTime //开始时间,示例值(20:01:32)
|
||||||
|
addata.endTime = row.endTime //结束时间,示例值(23:05:41)
|
||||||
|
addata.chargingPower = row.chargingPower?row.chargingPower:'' //充电功率
|
||||||
|
|
||||||
|
}else{
|
||||||
|
tiem.value.splice(0)
|
||||||
|
addata.pkId = ''
|
||||||
|
addata.beginTime = ''
|
||||||
|
addata.endTime = ''
|
||||||
|
addata.chargingPower = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function savehand() {
|
||||||
|
if(type.value == 1){
|
||||||
|
return addxq(addata)
|
||||||
|
}
|
||||||
|
return updatexq(addata)
|
||||||
|
|
||||||
|
}
|
||||||
|
//保存
|
||||||
|
function handleAdd() {
|
||||||
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
savehand().then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: type.value == 1?'添加成功':'修改成功'
|
||||||
|
})
|
||||||
|
setTimeout(()=> {
|
||||||
|
openpop.value = false
|
||||||
|
getyys()
|
||||||
|
},600)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//取消
|
||||||
|
function cancel() {
|
||||||
|
openpop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function handleDelete(row:any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`确定删除?`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
delxq(row.pkId).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
|
getyys()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//getyys()
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
465
src/views/swapstation/cdcl/index.vue
Normal file
465
src/views/swapstation/cdcl/index.vue
Normal file
@ -0,0 +1,465 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
|
<el-form
|
||||||
|
ref="querform"
|
||||||
|
:model="queryParams"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="换电站" prop="stationCode">
|
||||||
|
<el-select v-model="queryParams.stationCode" placeholder="请选择换电站" style="width: 200px;">
|
||||||
|
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" style="width: 200px;">
|
||||||
|
<el-option label="启用" :value="1" />
|
||||||
|
<el-option label="未启用" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handBtnqu">搜索</el-button>
|
||||||
|
<!-- <el-button icon="Refresh" @click="resetQuery">重置</el-button> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
|
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
:max-height="search?'680px':'600px'"
|
||||||
|
>
|
||||||
|
<el-table-column label="名称" min-width="250" align="center" prop="name" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div @click="showdetails(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.name}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="换电站" min-width="250" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="最低数量" min-width="250" align="center" prop="miniLimit" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
:title="ystit"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<el-form
|
||||||
|
ref="yysRef"
|
||||||
|
:model="addata"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="30">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="策略名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.name"
|
||||||
|
placeholder="请输入策略名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="换电站" prop="stationCode">
|
||||||
|
<el-select
|
||||||
|
v-model="addata.stationCode"
|
||||||
|
placeholder="请选择换电站"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="n in yunList"
|
||||||
|
:label="n.name"
|
||||||
|
:value="n.code"
|
||||||
|
@click="getlabel(n.name)"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最低数量" prop="miniLimit">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.miniLimit"
|
||||||
|
placeholder="请输入最低数量"
|
||||||
|
maxlength="3"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="addata.status"
|
||||||
|
placeholder="请选择状态"
|
||||||
|
>
|
||||||
|
<el-option label="启用" :value="1" />
|
||||||
|
<el-option label="未启用" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleAdd">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
v-model="drawer"
|
||||||
|
:with-header="false"
|
||||||
|
size="900px"
|
||||||
|
>
|
||||||
|
<el-row style="margin-bottom: 20px;">
|
||||||
|
<el-col :span="24" style="position: relative;margin-bottom: 20px;padding-bottom: 10px;text-align: center;font-size: 20px;color: #417ebb;border-bottom:1px solid #16599d;">
|
||||||
|
{{detalobj.name}}
|
||||||
|
<el-icon color="#ccc" @click="drawer = false" style="position: absolute;right: 20px;cursor: pointer;">
|
||||||
|
<CloseBold />
|
||||||
|
</el-icon>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-row style="margin-bottom: 20px;">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">换电站:</el-col>
|
||||||
|
<el-col :span="18" style="color: #417ebb;">{{detalobj.stationName}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12" style="text-align: right;">最低数量:</el-col>
|
||||||
|
<el-col :span="6" style="color: #417ebb;">{{detalobj.miniLimit}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">状态:</el-col>
|
||||||
|
<el-col :span="10" style="color: #417ebb;">{{detalobj.status == 1?'启用':'未启用'}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Edit"
|
||||||
|
@click="showpop(2,detalobj)">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="border-top: 2px dashed #9ec9e1;">
|
||||||
|
<!-- <div style="padding: 20px 0 10px;text-align: center;color:#9ec9e1;">策略详情</div> -->
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<costdetails
|
||||||
|
v-if="drawer"
|
||||||
|
style="padding: 20px;"
|
||||||
|
:stationCode="stationCode"
|
||||||
|
:stationName="stationName"
|
||||||
|
:strategyId="strategyId"
|
||||||
|
:list="mxlist"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts" name="UserPage">
|
||||||
|
import {
|
||||||
|
gethdzlist
|
||||||
|
} from '@/api/swapstation/hdz'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getjqrlist,
|
||||||
|
addhdz,
|
||||||
|
update,
|
||||||
|
delhdz
|
||||||
|
} from '@/api/swapstation/cdcl'
|
||||||
|
import { ref,reactive } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
import Costdetails from './costdetails.vue'
|
||||||
|
|
||||||
|
function timestamp() {
|
||||||
|
return new Date().getTime()
|
||||||
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
// pageSize:20, //每页条数
|
||||||
|
// pageNo:1, //页数
|
||||||
|
stationCode:'', //换电站编码
|
||||||
|
status:1
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let total = ref(0)
|
||||||
|
let yysList = ref<any>([])
|
||||||
|
function handBtnqu(){
|
||||||
|
//queryParams.pageNo = 1
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始查询换电站
|
||||||
|
let yunList = ref<any>([])
|
||||||
|
gethdzlist({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
proxyId:'', //归属运营商ID
|
||||||
|
name:'', //站点名称
|
||||||
|
code:'', //站点编码
|
||||||
|
status:'', //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
|
type:'', //站点类型ID
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
yunList.value = list?list:[]
|
||||||
|
queryParams.stationCode = list[0].code
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
getjqrlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
yysList.value = rps.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// function handleSizeChange(val:number) {
|
||||||
|
// queryParams.pageSize = val
|
||||||
|
// getyys()
|
||||||
|
// }
|
||||||
|
|
||||||
|
//重置
|
||||||
|
let querform = ref()
|
||||||
|
function resetQuery() {
|
||||||
|
querform.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//新增、修改
|
||||||
|
let type = ref(1)
|
||||||
|
let openpop = ref(false)
|
||||||
|
let ystit = ref('添加充电策略')
|
||||||
|
let yysRef = ref()
|
||||||
|
let strategyId = ref('')
|
||||||
|
let stationCode = ref('')
|
||||||
|
let stationName = ref('')
|
||||||
|
|
||||||
|
|
||||||
|
let addata = reactive({
|
||||||
|
pkId:'',
|
||||||
|
name:'', //名称
|
||||||
|
stationCode:'', //换电站编码
|
||||||
|
stationName:'', //换电站名称
|
||||||
|
miniLimit:'', //最低数量
|
||||||
|
status:1 //状态:0-未启用,1-启用
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = ref({
|
||||||
|
name:[
|
||||||
|
{ required: true, message: "请输入策略名称", trigger: "blur" }
|
||||||
|
],
|
||||||
|
stationCode:[
|
||||||
|
{ required: true, message: "请选择换电站", trigger: "blur" }
|
||||||
|
],
|
||||||
|
miniLimit:[
|
||||||
|
{ required: true, message: "最低数量", trigger: "blur" }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取换电站名称
|
||||||
|
function getlabel(n:string){
|
||||||
|
addata.stationName = n
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let mxlist = ref<any[]>([])
|
||||||
|
|
||||||
|
let detalobj = ref<any>({})
|
||||||
|
function showdetails(v:any){
|
||||||
|
detalobj.value = v
|
||||||
|
drawer.value = true
|
||||||
|
|
||||||
|
strategyId.value = v.pkId
|
||||||
|
stationName.value = v.stationName
|
||||||
|
stationCode.value = v.stationCode
|
||||||
|
mxlist.value = v.detailList
|
||||||
|
}
|
||||||
|
|
||||||
|
function showpop(num:any,row?:any){
|
||||||
|
type.value = num
|
||||||
|
openpop.value = true
|
||||||
|
|
||||||
|
// if(type.value == 1){
|
||||||
|
// openpop.value = true
|
||||||
|
// }else if(type.value == 2){
|
||||||
|
// drawer.value = true
|
||||||
|
// }
|
||||||
|
|
||||||
|
ystit.value = num == 1?'添加充电策略':'修改充电策略'
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
if(row){
|
||||||
|
addata.pkId = row.pkId
|
||||||
|
|
||||||
|
addata.name = row.name
|
||||||
|
|
||||||
|
addata.stationCode = row.stationCode
|
||||||
|
|
||||||
|
addata.stationName = row.stationName
|
||||||
|
|
||||||
|
addata.miniLimit = row.miniLimit
|
||||||
|
addata.status = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// standardId.value = row.pkId
|
||||||
|
// bzName.value = row.name
|
||||||
|
// stationName.value = row.stationName
|
||||||
|
// stationCode.value = row.stationCode
|
||||||
|
// mxlist.value = row.detailList
|
||||||
|
}else{
|
||||||
|
addata.pkId = ''
|
||||||
|
addata.name = ''
|
||||||
|
addata.stationCode = ''
|
||||||
|
addata.stationName = ''
|
||||||
|
|
||||||
|
addata.miniLimit = ''
|
||||||
|
addata.status = 1
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function savehand() {
|
||||||
|
if(type.value == 1){
|
||||||
|
return addhdz(addata)
|
||||||
|
}
|
||||||
|
return update(addata)
|
||||||
|
|
||||||
|
}
|
||||||
|
//保存
|
||||||
|
function handleAdd() {
|
||||||
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
savehand().then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: type.value == 1?'添加成功':'修改成功'
|
||||||
|
})
|
||||||
|
// if(type.value == 2){
|
||||||
|
// //bzName.value = addata.name
|
||||||
|
// stationName.value = addata.stationName
|
||||||
|
// stationCode.value = addata.stationCode
|
||||||
|
// }
|
||||||
|
setTimeout(()=> {
|
||||||
|
// if(type.value == 1){
|
||||||
|
// openpop.value = false
|
||||||
|
// }
|
||||||
|
openpop.value = false
|
||||||
|
drawer.value = false
|
||||||
|
getyys()
|
||||||
|
},600)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//取消
|
||||||
|
function cancel() {
|
||||||
|
openpop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function handleDelete(row:any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`确定删除?`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
delhdz(row.pkId).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
|
getyys()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//费用标准明细
|
||||||
|
let drawer = ref(false)
|
||||||
|
//let standardId = ref('')
|
||||||
|
function handleClose() {
|
||||||
|
drawer.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetupdate() {
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
// function bzmingx(id:string) {
|
||||||
|
// drawer.value = true
|
||||||
|
// standardId.value = id
|
||||||
|
// }
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
.mktit{
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
background: #98c3ef;
|
||||||
|
}
|
||||||
|
.jqbg{
|
||||||
|
background: #73b9c9;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="zjtype == 1" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="zjtype == 1 && search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -18,11 +18,26 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
|
||||||
type="primary"
|
<template v-if="zjtype == 1">
|
||||||
plain
|
<div style="display: flex;justify-content: space-between;">
|
||||||
icon="Plus"
|
<el-button
|
||||||
@click="showpop(1)">新增</el-button>
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
</template>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
@ -140,6 +155,8 @@
|
|||||||
update: []
|
update: []
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="zjtype == 1" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="zjtype == 1 && search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -18,11 +18,25 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<template v-if="zjtype == 1">
|
||||||
type="primary"
|
<div style="display: flex;justify-content: space-between;">
|
||||||
plain
|
<el-button
|
||||||
icon="Plus"
|
type="primary"
|
||||||
@click="showpop(1)">新增</el-button>
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
</template>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
@ -160,6 +174,8 @@
|
|||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
zjtype?:string|number
|
zjtype?:string|number
|
||||||
stationCode?:string
|
stationCode?:string
|
||||||
|
|||||||
@ -16,10 +16,10 @@
|
|||||||
>
|
>
|
||||||
<el-table-column min-width="100" label="开始时间" align="center" prop="timeBegin" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="开始时间" align="center" prop="timeBegin" :show-overflow-tooltip="true" />
|
||||||
<el-table-column min-width="100" label="结束时间" align="center" prop="timeEnd" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="结束时间" align="center" prop="timeEnd" :show-overflow-tooltip="true" />
|
||||||
<el-table-column min-width="100" label="每公里收费" align="center" prop="eachKmFee" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="每公里收费(元)" align="center" prop="eachKmFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column min-width="100" label="每SOC收费" align="center" prop="eachSocFee" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="每SOC收费(元)" align="center" prop="eachSocFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column min-width="100" label="每度电收费" align="center" prop="eachKwhFee" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="每度电收费(元)" align="center" prop="eachKwhFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column min-width="100" label="谷段服务费" align="center" prop="timeServiceFee" :show-overflow-tooltip="true" />
|
<el-table-column min-width="100" label="谷段服务费(元)" align="center" prop="timeServiceFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
<el-table-column label="操作" align="center" width="150" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每公里收费" prop="eachKmFee">
|
<el-form-item label="每公里收费(元)" prop="eachKmFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachKmFee"
|
v-model="addata.eachKmFee"
|
||||||
placeholder="请输入每公里收费"
|
placeholder="请输入每公里收费"
|
||||||
@ -87,7 +87,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每SOC收费" prop="eachSocFee">
|
<el-form-item label="每SOC收费(元)" prop="eachSocFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachSocFee"
|
v-model="addata.eachSocFee"
|
||||||
placeholder="请输入每SOC收费"
|
placeholder="请输入每SOC收费"
|
||||||
@ -96,7 +96,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每度电收费" prop="eachKwhFee">
|
<el-form-item label="每度电收费(元)" prop="eachKwhFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachKwhFee"
|
v-model="addata.eachKwhFee"
|
||||||
placeholder="请输入每度电收费"
|
placeholder="请输入每度电收费"
|
||||||
@ -105,7 +105,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="谷段服务费" prop="timeServiceFee">
|
<el-form-item label="谷段服务费(元)" prop="timeServiceFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.timeServiceFee"
|
v-model="addata.timeServiceFee"
|
||||||
placeholder="请输入谷段服务费"
|
placeholder="请输入谷段服务费"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -18,32 +18,47 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="showpop(1)">新增</el-button>
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'600px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="费用标准名称" min-width="200" align="center" prop="name" :show-overflow-tooltip="true">
|
<el-table-column label="费用标准名称" min-width="200" align="center" prop="name" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.name}}</div>
|
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="开始日期" min-width="100" align="center" prop="dayBegin" :show-overflow-tooltip="true" />
|
<el-table-column label="开始日期" min-width="100" align="center" prop="dayBegin" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="结束日期" min-width="100" align="center" prop="dayEnd" :show-overflow-tooltip="true" />
|
<template #default="scope">
|
||||||
|
<div>{{scope.row.dayBegin.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束日期" min-width="100" align="center" prop="dayEnd" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{scope.row.dayEnd.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="换电站" min-width="250" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
<el-table-column label="换电站" min-width="250" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="正常换电服务费" min-width="140" align="center" prop="commonRemainFee" :show-overflow-tooltip="true" />
|
<el-table-column label="正常换电服务费(元)" min-width="140" align="center" prop="commonRemainFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电时正常电量范围" min-width="180" align="center" prop="commonRemainSocRange" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时正常电量范围" min-width="180" align="center" prop="commonRemainSocRange" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电时电量剩余过多的soc界定" min-width="220" align="center" prop="moreRemainSoc" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时电量剩余过多的soc界定" min-width="220" align="center" prop="moreRemainSoc" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电时电量剩余过多的服务费" min-width="220" align="center" prop="moreRemainFee" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时电量剩余过多的服务费(元)" min-width="220" align="center" prop="moreRemainFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电时电量剩余一般的soc界定" min-width="220" align="center" prop="fewRemainSoc" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时电量剩余一般的soc界定" min-width="220" align="center" prop="fewRemainSoc" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="换电时电量剩余一般的服务费" min-width="220" align="center" prop="fewRemainFee" :show-overflow-tooltip="true" />
|
<el-table-column label="换电时电量剩余一般的服务费(元)" min-width="220" align="center" prop="fewRemainFee" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-button link type="primary" icon="Collection" @click="bzmingx(scope.row.pkId)">标准明细</el-button> -->
|
<!-- <el-button link type="primary" icon="Collection" @click="bzmingx(scope.row.pkId)">标准明细</el-button> -->
|
||||||
@ -133,7 +148,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="正常换电服务费" prop="commonRemainFee">
|
<el-form-item label="正常换电服务费(元)" prop="commonRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.commonRemainFee"
|
v-model="addata.commonRemainFee"
|
||||||
placeholder="请输入正常换电服务费"
|
placeholder="请输入正常换电服务费"
|
||||||
@ -160,7 +175,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="换电时电量剩余过多的服务费" prop="moreRemainFee">
|
<el-form-item label="换电时电量剩余过多的服务费(元)" prop="moreRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.moreRemainFee"
|
v-model="addata.moreRemainFee"
|
||||||
placeholder="请输入换电时电量剩余过多的服务费"
|
placeholder="请输入换电时电量剩余过多的服务费"
|
||||||
@ -178,7 +193,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="换电时电量剩余一般的服务费" prop="fewRemainFee">
|
<el-form-item label="换电时电量剩余一般的服务费(元)" prop="fewRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.fewRemainFee"
|
v-model="addata.fewRemainFee"
|
||||||
placeholder="请输入换电时电量剩余一般的服务费"
|
placeholder="请输入换电时电量剩余一般的服务费"
|
||||||
@ -187,7 +202,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每公里收费" prop="eachKmFee">
|
<el-form-item label="每公里收费(元)" prop="eachKmFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachKmFee"
|
v-model="addata.eachKmFee"
|
||||||
placeholder="请输入每公里收费"
|
placeholder="请输入每公里收费"
|
||||||
@ -196,7 +211,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每SOC收费" prop="eachSocFee">
|
<el-form-item label="每SOC收费(元)" prop="eachSocFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachSocFee"
|
v-model="addata.eachSocFee"
|
||||||
placeholder="请输入每SOC收费"
|
placeholder="请输入每SOC收费"
|
||||||
@ -205,7 +220,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="每度电收费" prop="eachKwhFee">
|
<el-form-item label="每度电收费(元)" prop="eachKwhFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.eachKwhFee"
|
v-model="addata.eachKwhFee"
|
||||||
placeholder="请输入每度电收费"
|
placeholder="请输入每度电收费"
|
||||||
@ -234,7 +249,7 @@
|
|||||||
>
|
>
|
||||||
<tit @close="handleClose" :name="bzName" />
|
<tit @close="handleClose" :name="bzName" />
|
||||||
<el-row :gutter="25">
|
<el-row :gutter="25">
|
||||||
<el-col :span="7">
|
<el-col :span="8">
|
||||||
<div style="padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
<div style="padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
||||||
<div class="mktit jqbg">费用标准</div>
|
<div class="mktit jqbg">费用标准</div>
|
||||||
<el-form
|
<el-form
|
||||||
@ -287,8 +302,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="正常换电服务费" prop="commonRemainFee">
|
<el-form-item label="正常换电服务费(元)" prop="commonRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.commonRemainFee"
|
v-model="addata.commonRemainFee"
|
||||||
placeholder="请输入正常换电服务费"
|
placeholder="请输入正常换电服务费"
|
||||||
@ -296,7 +311,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="换电时正常电量范围" prop="commonRemainSocRange">
|
<el-form-item label="换电时正常电量范围" prop="commonRemainSocRange">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.commonRemainSocRange"
|
v-model="addata.commonRemainSocRange"
|
||||||
@ -315,7 +330,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="换电时电量剩余过多的服务费" prop="moreRemainFee">
|
<el-form-item label="换电时电量剩余过多的服务费(元)" prop="moreRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.moreRemainFee"
|
v-model="addata.moreRemainFee"
|
||||||
placeholder="请输入换电时电量剩余过多的服务费"
|
placeholder="请输入换电时电量剩余过多的服务费"
|
||||||
@ -333,7 +348,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="换电时电量剩余一般的服务费" prop="fewRemainFee">
|
<el-form-item label="换电时电量剩余一般的服务费(元)" prop="fewRemainFee">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.fewRemainFee"
|
v-model="addata.fewRemainFee"
|
||||||
placeholder="请输入换电时电量剩余一般的服务费"
|
placeholder="请输入换电时电量剩余一般的服务费"
|
||||||
@ -341,6 +356,33 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="每公里收费(元)" prop="eachKmFee">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.eachKmFee"
|
||||||
|
placeholder="请输入每公里收费"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="每SOC收费(元)" prop="eachSocFee">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.eachSocFee"
|
||||||
|
placeholder="请输入每SOC收费"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="每度电收费(元)" prop="eachKwhFee">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.eachKwhFee"
|
||||||
|
placeholder="请输入每度电收费"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24" style="text-align: center;">
|
<el-col :span="24" style="text-align: center;">
|
||||||
<el-button type="success" @click="handleAdd">确 定</el-button>
|
<el-button type="success" @click="handleAdd">确 定</el-button>
|
||||||
<el-button @click="resetupdate">重 置</el-button>
|
<el-button @click="resetupdate">重 置</el-button>
|
||||||
@ -350,7 +392,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="16">
|
||||||
<div style="height: 100%;margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
<div style="height: 100%;margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
||||||
<div class="mktit">费用标准明细</div>
|
<div class="mktit">费用标准明细</div>
|
||||||
<costdetails
|
<costdetails
|
||||||
@ -387,6 +429,8 @@
|
|||||||
return new Date().getTime()
|
return new Date().getTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
// pageSize:20, //每页条数
|
// pageSize:20, //每页条数
|
||||||
// pageNo:1, //页数
|
// pageNo:1, //页数
|
||||||
@ -505,8 +549,8 @@
|
|||||||
addata.pkId = row.pkId
|
addata.pkId = row.pkId
|
||||||
|
|
||||||
addata.stationCode = row.stationCode
|
addata.stationCode = row.stationCode
|
||||||
addata.dayBegin = row.dayBegin
|
addata.dayBegin = row.dayBegin.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')
|
||||||
addata.dayEnd = row.dayEnd
|
addata.dayEnd = row.dayEnd.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')
|
||||||
addata.stationName = row.stationName
|
addata.stationName = row.stationName
|
||||||
addata.name = row.name
|
addata.name = row.name
|
||||||
addata.commonRemainFee = row.commonRemainFee
|
addata.commonRemainFee = row.commonRemainFee
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -55,17 +55,24 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
|
||||||
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="showpop(1)">新增</el-button>
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'600px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="站点名称" min-width="200" align="center" prop="name" :show-overflow-tooltip="true">
|
<el-table-column label="站点名称" min-width="200" align="center" prop="name" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -334,33 +341,54 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
:with-header="false"
|
:with-header="false"
|
||||||
size="88%"
|
size="70%"
|
||||||
>
|
>
|
||||||
<tit @close="handleClose" :name="addata.name" :hdzcode="addata.code" :showcode="true" />
|
<tit @close="handleClose" :name="addata.name" :hdzcode="addata.code" :showcode="true" />
|
||||||
<el-row :gutter="25">
|
<el-row :gutter="25">
|
||||||
<el-col :span="7">
|
<el-col :span="24" style="margin-bottom: 20px;">
|
||||||
<div style="padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
<div style="padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
||||||
<div class="mktit jqbg">基础信息</div>
|
<div class="mktit jqbg">基础信息</div>
|
||||||
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="110px">
|
<!-- <div style="padding: 20px;">
|
||||||
|
<el-row :gutter="50">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-col :span="12" style="border: 1px solid #ccc;text-align: center;"><img :src="urlcode" width="200" height="200" /></el-col>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-row style="border: 1px solid #ccc;border-bottom: none;">
|
||||||
|
<el-col :span="9" style="padding: 10px 0;background: #4e98a9;color: #fff;text-align: center;">运营商</el-col>
|
||||||
|
<el-col :span="15" style="padding: 10px 0;text-align: center;">河北伊特</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-row style="border: 1px solid #ccc;border-bottom: none;">
|
||||||
|
<el-col :span="9" style="padding: 10px 0;background: #4e98a9;color: #fff;text-align: center;">站点名称</el-col>
|
||||||
|
<el-col :span="15" style="padding: 10px 0;text-align: center;">北京一号换电站</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="150px">
|
||||||
<el-row style="padding:20px">
|
<el-row style="padding:20px">
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="运营商" prop="proxyId">
|
<el-form-item label="运营商" prop="proxyId">
|
||||||
<el-select v-model="addata.proxyId" placeholder="请选择运营商">
|
<el-select v-model="addata.proxyId" placeholder="请选择运营商">
|
||||||
<el-option v-for="n in yunList" :label="n.poname" :value="n.pocode" />
|
<el-option v-for="n in yunList" :label="n.poname" :value="n.pocode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点名称" prop="name">
|
<el-form-item label="站点名称" prop="name">
|
||||||
<el-input v-model="addata.name" placeholder="请输入站点名称" clearable />
|
<el-input v-model="addata.name" placeholder="请输入站点名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点编码" prop="code">
|
<el-form-item label="站点编码" prop="code">
|
||||||
<el-input v-model="addata.code" placeholder="请输入站点编码" clearable />
|
<el-input v-model="addata.code" placeholder="请输入站点编码" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="addata.status" placeholder="请选择状态">
|
<el-select v-model="addata.status" placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
@ -371,7 +399,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="站点类型" prop="type">
|
<el-form-item label="站点类型" prop="type">
|
||||||
<el-select v-model="addata.type" placeholder="请选择站点类型">
|
<el-select v-model="addata.type" placeholder="请选择站点类型">
|
||||||
<el-option
|
<el-option
|
||||||
@ -382,7 +410,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="支持车辆类型" prop="carTypeCode">
|
<el-form-item label="支持车辆类型" prop="carTypeCode">
|
||||||
<el-select multiple v-model="addata.carTypeCode" placeholder="请选择车辆类型">
|
<el-select multiple v-model="addata.carTypeCode" placeholder="请选择车辆类型">
|
||||||
<el-option v-for="n in cartypelist" :label="n.typeName" :value="n.typeCode" />
|
<el-option v-for="n in cartypelist" :label="n.typeName" :value="n.typeCode" />
|
||||||
@ -391,7 +419,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="区划" prop="division">
|
<el-form-item label="区划" prop="division">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
ref="cascader"
|
ref="cascader"
|
||||||
@ -409,7 +437,7 @@
|
|||||||
<!-- <el-input v-model="addata.division" placeholder="请选择区划" maxlength="20" /> -->
|
<!-- <el-input v-model="addata.division" placeholder="请选择区划" maxlength="20" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="详细地址" prop="address">
|
<el-form-item label="详细地址" prop="address">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.address"
|
v-model="addata.address"
|
||||||
@ -419,7 +447,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="注册日期" prop="registerDate">
|
<el-form-item label="注册日期" prop="registerDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.registerDate"
|
v-model="addata.registerDate"
|
||||||
@ -430,7 +458,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="激活日期" prop="activeDate">
|
<el-form-item label="激活日期" prop="activeDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.activeDate"
|
v-model="addata.activeDate"
|
||||||
@ -460,7 +488,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="12">
|
||||||
<el-form-item label="经纬度" prop="locationPoint">
|
<el-form-item label="经纬度" prop="locationPoint">
|
||||||
<el-input
|
<el-input
|
||||||
readonly
|
readonly
|
||||||
@ -471,7 +499,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="12">
|
||||||
<el-form-item label="全天营业" prop="openAllDay">
|
<el-form-item label="全天营业" prop="openAllDay">
|
||||||
<el-radio-group v-model="addata.openAllDay">
|
<el-radio-group v-model="addata.openAllDay">
|
||||||
<el-radio value="1">是</el-radio>
|
<el-radio value="1">是</el-radio>
|
||||||
@ -479,7 +507,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="12">
|
||||||
<el-form-item label="通道数" prop="tdQuantity">
|
<el-form-item label="通道数" prop="tdQuantity">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.tdQuantity"
|
v-model="addata.tdQuantity"
|
||||||
@ -525,14 +553,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="text-align: center;">
|
<el-col :span="24" style="text-align: center;">
|
||||||
<el-button type="success" @click="handleAdd">确 定</el-button>
|
<el-button type="success" @click="handleAdd">保 存</el-button>
|
||||||
<el-button @click="resetupdate">重 置</el-button>
|
<el-button @click="resetupdate">重 置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="24">
|
||||||
<div style="margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
<div style="margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
||||||
<div class="mktit">机器人</div>
|
<div class="mktit">机器人</div>
|
||||||
<robot
|
<robot
|
||||||
@ -600,7 +628,8 @@
|
|||||||
gethdzlist,
|
gethdzlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
update,
|
update,
|
||||||
delhdz
|
delhdz,
|
||||||
|
getqrcode
|
||||||
} from '@/api/swapstation/hdz'
|
} from '@/api/swapstation/hdz'
|
||||||
import {
|
import {
|
||||||
getlist
|
getlist
|
||||||
@ -623,18 +652,22 @@
|
|||||||
import Tit from '@/views/components/detailstit.vue'
|
import Tit from '@/views/components/detailstit.vue'
|
||||||
import Latilonmap from '@/views/components/latilonmap.vue'
|
import Latilonmap from '@/views/components/latilonmap.vue'
|
||||||
|
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
function timestamp() {
|
function timestamp() {
|
||||||
return new Date().getTime()
|
return new Date().getTime()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
proxyId:'', //归属运营商ID
|
proxyId:'', //归属运营商ID
|
||||||
name:'', //站点名称
|
name:'', //站点名称
|
||||||
code:'', //站点编码
|
code:'', //站点编码
|
||||||
status:'', //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
status:useRoute().query.status, //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
type:'', //站点类型ID
|
type:'', //站点类型ID
|
||||||
})
|
})
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
@ -787,7 +820,7 @@
|
|||||||
watch(() => addata.dcQuantity,(v)=> {
|
watch(() => addata.dcQuantity,(v)=> {
|
||||||
addata.dcQuantity = addata.dcQuantity.replace(/[^\d]/g,'')
|
addata.dcQuantity = addata.dcQuantity.replace(/[^\d]/g,'')
|
||||||
})
|
})
|
||||||
|
let urlcode = ref<any>('')
|
||||||
function showpop(num:any,row?:any){
|
function showpop(num:any,row?:any){
|
||||||
type.value = num
|
type.value = num
|
||||||
if(type.value == 1){
|
if(type.value == 1){
|
||||||
@ -839,6 +872,19 @@
|
|||||||
dcclist.value = row.dccList
|
dcclist.value = row.dccList
|
||||||
batlist.value = row.dcList
|
batlist.value = row.dcList
|
||||||
|
|
||||||
|
//获取小程序码
|
||||||
|
getqrcode({
|
||||||
|
path:`pages/home/index?code=${addata.code}`,
|
||||||
|
width:'400',
|
||||||
|
env_version:'trial' //要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop"。默认是正式版。
|
||||||
|
}).then((rps:any) => {
|
||||||
|
let reader = new FileReader()
|
||||||
|
reader.readAsDataURL(rps) // 转换为base64
|
||||||
|
reader.onload = function () {
|
||||||
|
urlcode.value = reader.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
slecas.value = ''
|
slecas.value = ''
|
||||||
|
|
||||||
@ -971,6 +1017,8 @@
|
|||||||
options.value = rps.data
|
options.value = rps.data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getyys()
|
getyys()
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
189
src/views/swapstation/mqtt/index.vue
Normal file
189
src/views/swapstation/mqtt/index.vue
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
|
<el-form
|
||||||
|
ref="querform"
|
||||||
|
:model="queryParams"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="换电站" prop="stationCode">
|
||||||
|
<el-select v-model="queryParams.stationCode" placeholder="请选择换电站" style="width: 200px;">
|
||||||
|
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="传送方向" prop="direction">
|
||||||
|
<el-select v-model="queryParams.direction" placeholder="请选择传送方向" style="width: 200px;">
|
||||||
|
<el-option
|
||||||
|
v-for="n in direction"
|
||||||
|
:value="n.dictValue"
|
||||||
|
:label="n.dictName"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="消息类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择信息类型" style="width: 200px;">
|
||||||
|
<el-option
|
||||||
|
v-for="n in msgtype"
|
||||||
|
:value="n.dictValue"
|
||||||
|
:label="n.dictName"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="方法" prop="messageFunction">
|
||||||
|
<el-input v-model="queryParams.messageFunction" placeholder="请输入方法" clearable style="width: 160px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handBtnqu">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
|
|
||||||
|
<!-- <el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip> -->
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="620px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- {{ (queryParams.pageNo - 1) * queryParams.pageSize + index + 1 }} -->
|
||||||
|
<el-table-column type="index" min-width="50" align="center">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<div>{{(queryParams.pageNo - 1) * queryParams.pageSize+ $index + 1}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="换电站" min-width="100" align="center" prop="stationCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="传送方向" min-width="100" align="center" prop="direction" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="消息类型" min-width="100" align="center" prop="type" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="方法" min-width="120" align="center" prop="messageFunction" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="内容" min-width="500" prop="content">
|
||||||
|
<template #default="scope">
|
||||||
|
<div style="word-wrap: break-word;">{{scope.row.content}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div v-if="total > 10" style="display: flex;justify-content: right;padding-top:20px;">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="queryParams.pageNo"
|
||||||
|
v-model:page-size="queryParams.pageSize"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
background
|
||||||
|
size="small"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="getyys"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
gethdzlist
|
||||||
|
} from '@/api/swapstation/hdz'
|
||||||
|
|
||||||
|
import {
|
||||||
|
mqttlist
|
||||||
|
} from '@/api/swapstation/mqtt'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getdict
|
||||||
|
} from '@/api/systemSet/dict'
|
||||||
|
|
||||||
|
import { ref,reactive} from 'vue'
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
stationCode:'', //换电站编码
|
||||||
|
direction:'', //传送方向
|
||||||
|
type:'', //消息类型
|
||||||
|
messageFunction:'' //方法 stationInfo
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let total = ref(0)
|
||||||
|
let yysList = ref<any>([])
|
||||||
|
function handBtnqu(){
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
total.value = 0
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取传送方向字典
|
||||||
|
let direction = ref<any>([])
|
||||||
|
getdict({
|
||||||
|
typeCode:'mqttcsfx'
|
||||||
|
}).then(rps => {
|
||||||
|
direction.value = rps.data
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取消息类型字典
|
||||||
|
let msgtype = ref<any>([])
|
||||||
|
getdict({
|
||||||
|
typeCode:'mqttxxtype'
|
||||||
|
}).then(rps => {
|
||||||
|
msgtype.value = rps.data
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//初始查询换电站
|
||||||
|
let yunList = ref<any>([])
|
||||||
|
|
||||||
|
gethdzlist({
|
||||||
|
pageSize:100, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
proxyId:'', //归属运营商ID
|
||||||
|
name:'', //站点名称
|
||||||
|
code:'', //站点编码
|
||||||
|
status:'', //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
|
type:'', //站点类型ID
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
yunList.value = list?list:[]
|
||||||
|
//queryParams.stationCode = list[0].code
|
||||||
|
//getyys()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
getyys()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
mqttlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
yysList.value = (rps.data as any).records
|
||||||
|
total.value = (rps.data as any).total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSizeChange(val:number) {
|
||||||
|
queryParams.pageSize = val
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
//重置
|
||||||
|
let querform = ref()
|
||||||
|
function resetQuery() {
|
||||||
|
querform.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="zjtype == 1" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="zjtype == 1 && search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -18,11 +18,27 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<template v-if="zjtype == 1">
|
||||||
type="primary"
|
<div style="display: flex;justify-content: space-between;">
|
||||||
plain
|
<el-button
|
||||||
icon="Plus"
|
type="primary"
|
||||||
@click="showpop(1)">新增</el-button>
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
@ -141,6 +157,8 @@
|
|||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
zjtype?:string|number
|
zjtype?:string|number
|
||||||
stationCode?:string
|
stationCode?:string
|
||||||
|
|||||||
@ -85,7 +85,7 @@
|
|||||||
stripe
|
stripe
|
||||||
>
|
>
|
||||||
<el-table-column min-width="160" label="字典名称" align="center" prop="dictName" />
|
<el-table-column min-width="160" label="字典名称" align="center" prop="dictName" />
|
||||||
<el-table-column label="字典编码" align="center" prop="dictCode" />
|
<el-table-column min-width="160" label="字典编码" align="center" prop="dictCode" />
|
||||||
<el-table-column min-width="160" label="字典值" align="center" prop="dictValue" />
|
<el-table-column min-width="160" label="字典值" align="center" prop="dictValue" />
|
||||||
<el-table-column label="排序" align="center" prop="sort" />
|
<el-table-column label="排序" align="center" prop="sort" />
|
||||||
<el-table-column width="160" label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column width="160" label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
@ -340,7 +340,7 @@
|
|||||||
zidform.sort = row.sort
|
zidform.sort = row.sort
|
||||||
}else{
|
}else{
|
||||||
zidform.typeId = typeId.value
|
zidform.typeId = typeId.value
|
||||||
zidform.typeCode =
|
zidform.typeCode = typecode.value
|
||||||
zidform.dictName = ''
|
zidform.dictName = ''
|
||||||
zidform.dictCode = ''
|
zidform.dictCode = ''
|
||||||
zidform.dictValue = ''
|
zidform.dictValue = ''
|
||||||
@ -368,7 +368,13 @@
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
zidpop.value = false
|
zidpop.value = false
|
||||||
showzdv(typeId.value)
|
|
||||||
|
getdict({
|
||||||
|
typeId:typeId.value
|
||||||
|
}).then(rps => {
|
||||||
|
valist.value = rps.data as any
|
||||||
|
})
|
||||||
|
|
||||||
},1000)
|
},1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="position: relative;margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -43,33 +43,39 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="showpop(1)">新增</el-button>
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'550px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="车牌号" min-width="100" align="center" prop="plateNum" :show-overflow-tooltip="true">
|
<el-table-column label="车牌号" min-width="100" align="center" prop="plateNum" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.plateNum}}</div>
|
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.plateNum}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="VIN号" min-width="150" align="center" prop="vinNo" :show-overflow-tooltip="true" />
|
<el-table-column label="VIN号" min-width="180" align="center" prop="vinNo" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="车架号" min-width="150" align="center" prop="frameworkNo" :show-overflow-tooltip="true" />
|
<el-table-column label="车架号" min-width="200" align="center" prop="frameworkNo" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="车主类型" min-width="80" align="center" prop="sourceFrom" :show-overflow-tooltip="true">
|
<el-table-column label="车主类型" min-width="80" align="center" prop="sourceFrom" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.ownerType == 1">个人</div>
|
<div v-if="scope.row.ownerType == 1">个人</div>
|
||||||
<div v-else-if="scope.row.ownerType == 2">企业</div>
|
<div v-else-if="scope.row.ownerType == 2">企业</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="车主名称" min-width="100" align="center" prop="ownerName" :show-overflow-tooltip="true" />
|
<el-table-column label="车主名称" min-width="160" align="center" prop="ownerName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="引擎号" min-width="150" align="center" prop="engineNo" :show-overflow-tooltip="true" />
|
<el-table-column label="引擎号" min-width="220" align="center" prop="engineNo" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="消费方式" min-width="80" align="center" prop="usageType" :show-overflow-tooltip="true">
|
<el-table-column label="消费方式" min-width="80" align="center" prop="usageType" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.usageType == 1">电量</div>
|
<div v-if="scope.row.usageType == 1">电量</div>
|
||||||
@ -79,18 +85,36 @@
|
|||||||
<el-table-column label="座位数" min-width="80" align="center" prop="seatsCount" :show-overflow-tooltip="true" />
|
<el-table-column label="座位数" min-width="80" align="center" prop="seatsCount" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="车身颜色" min-width="100" align="center" prop="carColor" :show-overflow-tooltip="true" />
|
<el-table-column label="车身颜色" min-width="100" align="center" prop="carColor" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="车籍/归属地" min-width="200" align="center" prop="carArea" :show-overflow-tooltip="true" />
|
<el-table-column label="车籍/归属地" min-width="200" align="center" prop="carArea" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="出厂日期" min-width="100" align="center" prop="productionDate" :show-overflow-tooltip="true" />
|
<el-table-column label="出厂日期" min-width="100" align="center" prop="productionDate" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="购车日期" min-width="100" align="center" prop="purchaseDate" :show-overflow-tooltip="true" />
|
<template #default="scope">
|
||||||
<el-table-column label="上牌日期" min-width="100" align="center" prop="boardDate" :show-overflow-tooltip="true" />
|
<div>{{formatDa(scope.row.productionDate)}}</div>
|
||||||
<el-table-column label="首次登记日期" min-width="120" align="center" prop="registrationDate" :show-overflow-tooltip="true" />
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="购车日期" min-width="100" align="center" prop="purchaseDate" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{formatDa(scope.row.purchaseDate)}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上牌日期" min-width="100" align="center" prop="boardDate" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{formatDa(scope.row.boardDate)}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="首次登记日期" min-width="120" align="center" prop="registrationDate" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{formatDa(scope.row.registrationDate)}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="总里程(公里)" min-width="100" align="center" prop="totalMileage" :show-overflow-tooltip="true" />
|
<el-table-column label="总里程(公里)" min-width="100" align="center" prop="totalMileage" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="联系电话" min-width="120" align="center" prop="phone" :show-overflow-tooltip="true" />
|
<el-table-column label="联系电话" min-width="120" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="公司名称" min-width="200" align="center" prop="cname" :show-overflow-tooltip="true" />
|
<el-table-column label="公司名称" min-width="200" align="center" prop="cname" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="组织机构代码" min-width="130" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
<el-table-column label="组织机构代码" min-width="180" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" min-width="300" fixed="right">
|
<el-table-column label="操作" align="center" min-width="100" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="showbdgs(1,scope.row.plateNum)">绑定公司</el-button>
|
<!-- <el-button link type="primary" icon="Edit" @click="showbdgs(1,scope.row.plateNum)">绑定公司</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="showbdgs(2,scope.row.plateNum)">绑定个人</el-button>
|
<el-button link type="primary" icon="Edit" @click="showbdgs(2,scope.row.plateNum)">绑定个人</el-button> -->
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -110,7 +134,231 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--换电站详情-->
|
||||||
|
<el-drawer
|
||||||
|
v-model="xqdaropen"
|
||||||
|
:with-header="false"
|
||||||
|
size="65%"
|
||||||
|
>
|
||||||
|
<!-- <tit @close="handleClose" :name="addata.name" :hdzcode="addata.code" :showcode="true" /> -->
|
||||||
|
<div style="padding: 0;border: 2px solid #98c3ef;border-radius: 10px;">
|
||||||
|
|
||||||
|
<div class="mktit" style="margin-bottom: 20px;">车辆信息</div>
|
||||||
|
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="110px">
|
||||||
|
<el-row :gutter="20" style="padding: 20px;">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车辆类型" prop="typeCode">
|
||||||
|
<el-select v-model="addata.typeCode" placeholder="请选择车辆类型">
|
||||||
|
<el-option v-for="n in cartypelist" :label="n.typeName" :value="n.typeCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="VIN号" prop="vinNo">
|
||||||
|
<el-input v-model="addata.vinNo" maxlength="17" placeholder="请输入VIN号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车架号" prop="frameworkNo">
|
||||||
|
<el-input v-model="addata.frameworkNo" maxlength="17" placeholder="请输入车架号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车主类型" prop="ownerType">
|
||||||
|
<el-radio-group v-model="addata.ownerType">
|
||||||
|
<el-radio value="1">个人</el-radio>
|
||||||
|
<el-radio value="2">企业</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<template v-if="addata.ownerType == '2'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="公司名称" prop="cname">
|
||||||
|
<!-- <el-input v-model="addata.cname" maxlength="30" placeholder="请输入公司名称" clearable /> -->
|
||||||
|
<el-autocomplete
|
||||||
|
v-if="isgongs"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="state"
|
||||||
|
:fetch-suggestions="querySearchAsync"
|
||||||
|
placeholder="请输入公司名称查询"
|
||||||
|
clearable
|
||||||
|
@select="handleSelect"
|
||||||
|
/>
|
||||||
|
<div v-else style="display: flex;align-items: center;color: #ccc;">暂无公司 <span @tap="tocompage" style="padding:0 5px 0 10px;font-size:16px;color:#0050b3;">去添加</span><el-icon color="#0050b3"><Plus /></el-icon></div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="组织机构代码" prop="ccode">
|
||||||
|
<el-input v-model="addata.ccode" maxlength="30" disabled placeholder="请输入组织机构代码" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车主名称" prop="ownerName">
|
||||||
|
<el-input v-model="addata.ownerName" maxlength="15" placeholder="请输入车主名称" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车牌号" prop="plateNum">
|
||||||
|
<el-input v-model="addata.plateNum" disabled placeholder="请输入车牌号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="引擎号" prop="engineNo">
|
||||||
|
<el-input v-model="addata.engineNo" maxlength="17" placeholder="请输入引擎号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="消费方式" prop="usageType">
|
||||||
|
<el-select v-model="addata.usageType" placeholder="请选择消费方式">
|
||||||
|
<el-option label="电量" :value="1" />
|
||||||
|
<el-option label="里程" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="座位数" prop="seatsCount">
|
||||||
|
<el-input v-model="addata.seatsCount" max="3" placeholder="请输入座位数" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车身颜色" prop="carColor">
|
||||||
|
<el-input v-model="addata.carColor" placeholder="请输入车身颜色" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="车籍/归属地" prop="carArea">
|
||||||
|
<!-- <el-input v-model="addata.carArea" placeholder="请输入车籍/归属地" clearable /> -->
|
||||||
|
<el-cascader
|
||||||
|
ref="cascader"
|
||||||
|
v-model="slecas"
|
||||||
|
style="width: 100%;"
|
||||||
|
:options="options"
|
||||||
|
clearable
|
||||||
|
:props="{
|
||||||
|
label:'admdvsName',
|
||||||
|
value:'admdvsNo',
|
||||||
|
children:'subAdmdvsInfoList'
|
||||||
|
}"
|
||||||
|
@change="change"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="出厂日期" prop="productionDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addata.productionDate"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="购车时间" prop="purchaseDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addata.purchaseDate"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="上牌时间" prop="boardDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addata.boardDate"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="首次登记日期" prop="registrationDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addata.registrationDate"
|
||||||
|
value-format="YYYYMMDD"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="总里程(公里)" prop="totalMileage">
|
||||||
|
<el-input v-model="addata.totalMileage" placeholder="请输入总里程" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input v-model="addata.phone" maxlength="11" placeholder="请输入联系电话" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" style="text-align: center;">
|
||||||
|
<el-button type="success" @click="handleAdd">保 存</el-button>
|
||||||
|
<el-button @click="resetupdate">重 置</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 20px;padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
||||||
|
<div class="mktit" style="margin-bottom: 20px;background: #73b9c9;">车辆绑定</div>
|
||||||
|
<!-- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="User" name="first">User</el-tab-pane>
|
||||||
|
<el-tab-pane label="Config" name="second">Config</el-tab-pane>
|
||||||
|
<el-tab-pane label="Role" name="third">Role</el-tab-pane>
|
||||||
|
<el-tab-pane label="Task" name="fourth">Task</el-tab-pane>
|
||||||
|
</el-tabs> -->
|
||||||
|
<div style="padding: 0 20px 20px;">
|
||||||
|
<div style="display: flex;;align-items: center;justify-content: space-between;padding-bottom:20px;">
|
||||||
|
<div>已绑定用户</div>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showbdgs(2,addata.plateNum)">绑定用户</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
style="width: 100%;"
|
||||||
|
:data="caruserlist"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="500px"
|
||||||
|
>
|
||||||
|
<el-table-column label="手机号" min-width="100" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="用户名" min-width="150" align="center" prop="uname" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="unbinduser(scope.row)">解绑</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-tabs type="border-card" class="demo-tabs">
|
||||||
|
<el-tab-pane>
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||||
|
<el-tab-pane label="Role">Role</el-tab-pane>
|
||||||
|
<el-tab-pane label="Task">Task</el-tab-pane>
|
||||||
|
</el-tabs> -->
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
|
||||||
<!-- 添加或修改配置对话框 -->
|
<!-- 添加或修改配置对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -166,7 +414,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="组织机构代码" prop="ccode">
|
<el-form-item label="组织机构代码" prop="ccode">
|
||||||
<el-input v-model="addata.ccode" maxlength="20" placeholder="请输入组织机构代码" clearable />
|
<el-input v-model="addata.ccode" maxlength="20" disabled placeholder="请输入组织机构代码" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
@ -189,8 +437,8 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="消费方式" prop="usageType">
|
<el-form-item label="消费方式" prop="usageType">
|
||||||
<el-select v-model="addata.usageType" placeholder="请选择消费方式">
|
<el-select v-model="addata.usageType" placeholder="请选择消费方式">
|
||||||
<el-option label="电量" value="1" />
|
<el-option label="电量" :value="1" />
|
||||||
<el-option label="里程" value="2" />
|
<el-option label="里程" :value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -226,7 +474,7 @@
|
|||||||
<el-form-item label="出厂日期" prop="productionDate">
|
<el-form-item label="出厂日期" prop="productionDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.productionDate"
|
v-model="addata.productionDate"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYYMMDD"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
@ -237,7 +485,7 @@
|
|||||||
<el-form-item label="购车时间" prop="purchaseDate">
|
<el-form-item label="购车时间" prop="purchaseDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.purchaseDate"
|
v-model="addata.purchaseDate"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYYMMDD"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
@ -248,7 +496,7 @@
|
|||||||
<el-form-item label="上牌时间" prop="boardDate">
|
<el-form-item label="上牌时间" prop="boardDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.boardDate"
|
v-model="addata.boardDate"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYYMMDD"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
@ -259,7 +507,7 @@
|
|||||||
<el-form-item label="首次登记日期" prop="registrationDate">
|
<el-form-item label="首次登记日期" prop="registrationDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="addata.registrationDate"
|
v-model="addata.registrationDate"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYYMMDD"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
@ -290,18 +538,51 @@
|
|||||||
<!--绑定公司-->
|
<!--绑定公司-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="bdgspop"
|
v-model="bdgspop"
|
||||||
title="绑定公司"
|
:title="bdtype == 1?'绑定公司':'绑定个人'"
|
||||||
width="800px"
|
width="1200px"
|
||||||
append-to-body
|
append-to-body
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
ref="wxquerform"
|
||||||
|
:model="wxParams"
|
||||||
|
:inline="true"
|
||||||
|
label-width="auto"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="手机号" prop="phoneNumber">
|
||||||
|
<el-input v-model="wxParams.phoneNumber" placeholder="请输入手机号" clearable style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属公司" prop="cname">
|
||||||
|
<!-- <el-input v-model="addata.cname" maxlength="30" placeholder="请输入公司名称" clearable /> -->
|
||||||
|
<el-autocomplete
|
||||||
|
:disabled="bddisabled"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="wxstate"
|
||||||
|
:fetch-suggestions="querySearchAsync"
|
||||||
|
placeholder="请输入公司名称查询"
|
||||||
|
clearable
|
||||||
|
@select="wxhandleSelect"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户名称" prop="name">
|
||||||
|
<el-input v-model="wxParams.name" placeholder="请输入车主名称" clearable style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="wxhandBtnqu">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="wresetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="gsList"
|
:data="gsList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="800px"
|
max-height="600px"
|
||||||
ref="taskTableRef"
|
ref="taskTableRef"
|
||||||
@select="selectClick"
|
@select="selectClick"
|
||||||
:header-cell-class-name="cellClass"
|
:header-cell-class-name="cellClass"
|
||||||
@ -320,19 +601,20 @@
|
|||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column label="手机号" min-width="150" align="center" prop="phoneNumber" :show-overflow-tooltip="true" />
|
<el-table-column label="手机号" min-width="150" align="center" prop="phoneNumber" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="用户名称" min-width="150" align="center" prop="name" :show-overflow-tooltip="true" />
|
<el-table-column label="用户名称" min-width="150" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="用户昵称" min-width="150" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属公司" min-width="200" align="center" prop="pname" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="用户性别" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
<!-- <el-table-column label="用户昵称" min-width="150" align="center" prop="nickName" :show-overflow-tooltip="true" /> -->
|
||||||
|
<!-- <el-table-column label="用户性别" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.ownerType == 1">男</div>
|
<div v-if="scope.row.ownerType == 1">男</div>
|
||||||
<div v-else-if="scope.row.ownerType == 2">女</div>
|
<div v-else-if="scope.row.ownerType == 2">女</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="账户类型" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
<el-table-column label="用户类型" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.type == 1">个人</div>
|
<div v-if="scope.row.type == 1">个人</div>
|
||||||
<div v-else-if="scope.row.type == 2">公司</div>
|
<div v-else-if="scope.row.type == 2">公司</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@ -355,7 +637,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="savegs">确 定</el-button>
|
<el-button type="primary" @click="savegs">绑 定</el-button>
|
||||||
<el-button @click="cancelgs">取 消</el-button>
|
<el-button @click="cancelgs">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -369,7 +651,9 @@
|
|||||||
update,
|
update,
|
||||||
delhdz,
|
delhdz,
|
||||||
Binggs,
|
Binggs,
|
||||||
Bingwx
|
Bingwx,
|
||||||
|
getcarwxlist,
|
||||||
|
unbindwx
|
||||||
} from '@/api/swapstation/vehicle'
|
} from '@/api/swapstation/vehicle'
|
||||||
import {
|
import {
|
||||||
getdicttype
|
getdicttype
|
||||||
@ -386,6 +670,8 @@
|
|||||||
} from '@/api/operation/wxuser'
|
} from '@/api/operation/wxuser'
|
||||||
|
|
||||||
import { carNum } from '@/utils/validate'
|
import { carNum } from '@/utils/validate'
|
||||||
|
|
||||||
|
import { formatDate } from '@/utils/ruoyi'
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
// } from '@/api/systemSet/dict'
|
// } from '@/api/systemSet/dict'
|
||||||
@ -394,6 +680,12 @@
|
|||||||
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
function formatDa(s:any) {
|
||||||
|
return formatDate(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
//跳转到公司页面
|
//跳转到公司页面
|
||||||
let isgongs = ref(true)
|
let isgongs = ref(true)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -407,7 +699,7 @@
|
|||||||
typeCode:'', //型号编码
|
typeCode:'', //型号编码
|
||||||
vinNo:'', //车辆识别代码VIN号
|
vinNo:'', //车辆识别代码VIN号
|
||||||
frameworkNo:'', //车架号
|
frameworkNo:'', //车架号
|
||||||
ownerType:'1', //车主类型:1-个人,2-企业
|
ownerType:'', //车主类型:1-个人,2-企业
|
||||||
ownerId:'', //车主ID
|
ownerId:'', //车主ID
|
||||||
ownerName:'', //车主名称
|
ownerName:'', //车主名称
|
||||||
plateNum:'', //车牌号
|
plateNum:'', //车牌号
|
||||||
@ -496,7 +788,18 @@
|
|||||||
addata.cname = v.value //公司名称
|
addata.cname = v.value //公司名称
|
||||||
addata.ccode = v.code //组织机构代码
|
addata.ccode = v.code //组织机构代码
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let wxstate = ref('')
|
||||||
|
|
||||||
|
function wxhandleSelect(v: any) {
|
||||||
|
wxParams.pcode = v.code //父账户编码
|
||||||
|
}
|
||||||
|
|
||||||
|
//详情
|
||||||
|
let xqdaropen = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//新增、修改
|
//新增、修改
|
||||||
let type = ref(1)
|
let type = ref(1)
|
||||||
let openpop = ref(false)
|
let openpop = ref(false)
|
||||||
@ -582,14 +885,29 @@
|
|||||||
addata.totalMileage = v.replace(/[^0-9]/g,'')
|
addata.totalMileage = v.replace(/[^0-9]/g,'')
|
||||||
})
|
})
|
||||||
watch(() => addata.phone,v => {
|
watch(() => addata.phone,v => {
|
||||||
addata.phone = v.replace(/[^0-9]/g,'')
|
if(v){
|
||||||
|
addata.phone = v.replace(/[^0-9]/g,'')
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function resetupdate() {
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
function showpop(num:any,row?:any){
|
function showpop(num:any,row?:any){
|
||||||
type.value = num
|
type.value = num
|
||||||
openpop.value = true
|
// openpop.value = true
|
||||||
ystit.value = num == 1?'添加车辆':'修改车辆'
|
ystit.value = num == 1?'添加车辆':'修改车辆'
|
||||||
yysRef.value?.resetFields()
|
yysRef.value?.resetFields()
|
||||||
|
|
||||||
|
|
||||||
|
if(type.value == 1){
|
||||||
|
openpop.value = true
|
||||||
|
}else if(type.value == 2){
|
||||||
|
xqdaropen.value = true
|
||||||
|
}
|
||||||
|
|
||||||
if(row){
|
if(row){
|
||||||
addata.typeCode = row.typeCode
|
addata.typeCode = row.typeCode
|
||||||
addata.vinNo = row.vinNo
|
addata.vinNo = row.vinNo
|
||||||
@ -613,7 +931,9 @@
|
|||||||
addata.phone = row.phone
|
addata.phone = row.phone
|
||||||
addata.cname = row.cname
|
addata.cname = row.cname
|
||||||
state.value = row.cname
|
state.value = row.cname
|
||||||
addata.ccode = row.ccode
|
addata.ccode = row.ccode
|
||||||
|
|
||||||
|
getcaruser(row.plateNum)
|
||||||
}else{
|
}else{
|
||||||
addata.typeCode = ''
|
addata.typeCode = ''
|
||||||
addata.vinNo = ''
|
addata.vinNo = ''
|
||||||
@ -658,6 +978,7 @@
|
|||||||
})
|
})
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
openpop.value = false
|
openpop.value = false
|
||||||
|
xqdaropen.value = false
|
||||||
getyys()
|
getyys()
|
||||||
},600)
|
},600)
|
||||||
})
|
})
|
||||||
@ -717,6 +1038,16 @@
|
|||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1 //页数
|
pageNo:1 //页数
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let wxParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
phoneNumber:'', //手机号
|
||||||
|
name:'', //名称
|
||||||
|
pcode:'' //父账户编码
|
||||||
|
})
|
||||||
|
|
||||||
|
let bddisabled = ref(false)
|
||||||
function showbdgs(type:number,plateNum:string){
|
function showbdgs(type:number,plateNum:string){
|
||||||
bdtype.value = type
|
bdtype.value = type
|
||||||
bdgspop.value = true
|
bdgspop.value = true
|
||||||
@ -731,8 +1062,25 @@
|
|||||||
wxobj.uname = ''
|
wxobj.uname = ''
|
||||||
wxobj.ownerType = ''
|
wxobj.ownerType = ''
|
||||||
wxobj.phone = ''
|
wxobj.phone = ''
|
||||||
wxobj.openid = ''
|
wxobj.openid = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxParams.pageSize = 20 //每页条数
|
||||||
|
wxParams.pageNo = 1 //页数
|
||||||
|
wxParams.phoneNumber = '' //手机号
|
||||||
|
wxParams.name = '' //名称
|
||||||
|
|
||||||
|
if(addata.ownerType == '2'){
|
||||||
|
bddisabled.value = true
|
||||||
|
wxParams.pcode = addata.ccode
|
||||||
|
wxstate.value = addata.cname
|
||||||
|
}else{
|
||||||
|
bddisabled.value = false
|
||||||
|
wxParams.pcode = ''
|
||||||
|
wxstate.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getsglist()
|
getsglist()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,7 +1088,7 @@
|
|||||||
if(bdtype.value == 1){
|
if(bdtype.value == 1){
|
||||||
return getlist(gsqueryParams)
|
return getlist(gsqueryParams)
|
||||||
}
|
}
|
||||||
return getwxlist(gsqueryParams)
|
return getwxlist(wxParams)
|
||||||
}
|
}
|
||||||
|
|
||||||
function bingsave(){
|
function bingsave(){
|
||||||
@ -773,7 +1121,8 @@
|
|||||||
message: '绑定成功'
|
message: '绑定成功'
|
||||||
})
|
})
|
||||||
bdgspop.value = false
|
bdgspop.value = false
|
||||||
getyys()
|
getcaruser(addata.plateNum)
|
||||||
|
//getyys()
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -836,9 +1185,68 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询微信用户
|
||||||
|
|
||||||
|
let wxquerform = ref()
|
||||||
|
|
||||||
|
|
||||||
|
function wxhandBtnqu() {
|
||||||
|
wxParams.pageNo = 1
|
||||||
|
getsglist()
|
||||||
|
}
|
||||||
|
|
||||||
|
function wresetQuery() {
|
||||||
|
wxquerform.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
//车辆绑定
|
||||||
|
let activeName = ref(0)
|
||||||
|
|
||||||
|
//车辆绑定的微信用户
|
||||||
|
let caruserlist = ref<any>([])
|
||||||
|
function getcaruser(plateNum:string){
|
||||||
|
getcarwxlist(plateNum).then(rps => {
|
||||||
|
caruserlist.value = rps.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//解绑微信用户
|
||||||
|
function unbinduser(row:any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`${row.uname}确定解绑车辆?`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
unbindwx(row.pkId).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '解绑成功'
|
||||||
|
})
|
||||||
|
getcaruser(addata.plateNum)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClick() {}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-divider--horizontal{
|
.el-divider--horizontal{
|
||||||
border-color:#5b98cd;
|
border-color:#5b98cd;
|
||||||
}
|
}
|
||||||
|
.mktit{
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
background: #98c3ef;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
495
src/views/vehicle/company/account.vue
Normal file
495
src/views/vehicle/company/account.vue
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
<template>
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<el-form
|
||||||
|
v-if="iskh"
|
||||||
|
ref="yysRef"
|
||||||
|
:model="addata"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="110px">
|
||||||
|
<el-row :gutter="30">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="户主类型" prop="ownerType">
|
||||||
|
<el-select
|
||||||
|
disabled
|
||||||
|
v-model="addata.ownerType"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
label="个人"
|
||||||
|
value="1"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
label="企业"
|
||||||
|
value="2"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="引入站点" prop="stationCode">
|
||||||
|
<el-select
|
||||||
|
v-model="addata.stationCode"
|
||||||
|
placeholder="请选择换电站"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="n in yunList"
|
||||||
|
:label="n.name"
|
||||||
|
:value="n.code"
|
||||||
|
@click="getlabel(n.name)"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="账户总金额(元)" prop="totalAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.totalAmount"
|
||||||
|
placeholder="请输入总金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="充值金额(元)" prop="rechargeAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.rechargeAmount"
|
||||||
|
placeholder="请输入充值金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="赠送金额(元)" prop="giftAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.giftAmount"
|
||||||
|
placeholder="请输入赠送金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="积分余额(元)" prop="point">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.point"
|
||||||
|
placeholder="请输入积分余额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="押金(元)" prop="deposit">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.deposit"
|
||||||
|
placeholder="请输入押金"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="SN码" prop="snCode">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.snCode"
|
||||||
|
placeholder="请输入SN码"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="租金(元)" prop="rent">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.rent"
|
||||||
|
placeholder="请输入租金"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" style="text-align: center;">
|
||||||
|
<el-button type="success" @click="handleAdd">保 存</el-button>
|
||||||
|
<el-button @click="resetupdate">重 置</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-row v-else :gutter="30">
|
||||||
|
<el-col :span="5">暂未开通账户</el-col>
|
||||||
|
<el-col :span="5"><el-button type="primary" @click="showpop(1)">开 通</el-button></el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
:title="ystit"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div style="padding: 20px;">
|
||||||
|
<el-form
|
||||||
|
ref="yysRef"
|
||||||
|
:model="addata"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="90px">
|
||||||
|
<el-row :gutter="30">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="户主类型" prop="ownerType">
|
||||||
|
<el-select
|
||||||
|
disabled
|
||||||
|
v-model="addata.ownerType"
|
||||||
|
placeholder="请选择类型"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
label="个人"
|
||||||
|
value="1"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
label="企业"
|
||||||
|
value="2"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="引入站点" prop="stationCode">
|
||||||
|
<el-select
|
||||||
|
v-model="addata.stationCode"
|
||||||
|
placeholder="请选择换电站"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="n in yunList"
|
||||||
|
:label="n.name"
|
||||||
|
:value="n.code"
|
||||||
|
@click="getlabel(n.name)"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="账户总金额" prop="totalAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.totalAmount"
|
||||||
|
placeholder="请输入总金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="充值金额" prop="rechargeAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.rechargeAmount"
|
||||||
|
placeholder="请输入充值金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="赠送金额" prop="giftAmount">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.giftAmount"
|
||||||
|
placeholder="请输入赠送金额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="积分余额" prop="point">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.point"
|
||||||
|
placeholder="请输入积分余额"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="押金" prop="deposit">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.deposit"
|
||||||
|
placeholder="请输入押金"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="SN码" prop="snCode">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.snCode"
|
||||||
|
placeholder="请输入SN码"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="租金" prop="rent">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.rent"
|
||||||
|
placeholder="请输入租金"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleAdd">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts" name="UserPage">
|
||||||
|
import { ref,reactive,watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
|
import {
|
||||||
|
gethdzlist
|
||||||
|
} from '@/api/swapstation/hdz'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getjqrlist,
|
||||||
|
addhdz,
|
||||||
|
update
|
||||||
|
} from '@/api/order/account'
|
||||||
|
|
||||||
|
import { setNum } from '@/utils/validate'
|
||||||
|
|
||||||
|
function timestamp() {
|
||||||
|
return new Date().getTime()
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
ownerId:string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
ownerType:'', //户主类型:1-个人,2-企业
|
||||||
|
ownerId:props.ownerId, //户主ID
|
||||||
|
code:'', //编码
|
||||||
|
stationCode:'' //引入站点
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let yysList = ref<any>({})
|
||||||
|
|
||||||
|
//初始查询换电站
|
||||||
|
let yunList = ref<any>([])
|
||||||
|
gethdzlist({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
proxyId:'', //归属运营商ID
|
||||||
|
name:'', //站点名称
|
||||||
|
code:'', //站点编码
|
||||||
|
status:'', //状态:1-正常营业,2-正常停运,3-故障停运,4-指令停运,9-其它
|
||||||
|
type:'', //站点类型ID
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
yunList.value = list?list:[]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//新增、修改
|
||||||
|
let type = ref(1)
|
||||||
|
let openpop = ref(false)
|
||||||
|
let ystit = ref('开通账户')
|
||||||
|
let yysRef = ref()
|
||||||
|
let standardId = ref('')
|
||||||
|
let bzName = ref('')
|
||||||
|
let code = ref('')
|
||||||
|
let stationName = ref('')
|
||||||
|
let addata = reactive<any>({
|
||||||
|
pkId:'',
|
||||||
|
ownerType:'2', //户主类型:1-个人,2-企业
|
||||||
|
ownerId:props.ownerId, //户主ID
|
||||||
|
stationCode:'', //引入站点
|
||||||
|
stationName:'', //换电站名称 ??
|
||||||
|
totalAmount:'', //账户总金额,分:总金额=充值金额+赠送金额
|
||||||
|
rechargeAmount:'', //充值余额,分
|
||||||
|
giftAmount:'', //赠送金额,分
|
||||||
|
point:'', //积分余额
|
||||||
|
deposit:'', //押金
|
||||||
|
snCode:'', //SN码
|
||||||
|
rent:'' //租金
|
||||||
|
})
|
||||||
|
|
||||||
|
let iskh = ref(false)
|
||||||
|
|
||||||
|
const rules = ref({
|
||||||
|
ownerType:[
|
||||||
|
{ required: true, message: "请选择户主类型", trigger: "blur" }
|
||||||
|
],
|
||||||
|
ownerId:[
|
||||||
|
{ required: true, message: "请选择户主", trigger: "blur" }
|
||||||
|
],
|
||||||
|
stationCode:[
|
||||||
|
{ required: true, message: "请选择站点", trigger: "blur" }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.totalAmount,v => {
|
||||||
|
addata.totalAmount = setNum(addata.totalAmount)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.rechargeAmount,v => {
|
||||||
|
addata.rechargeAmount = setNum(addata.rechargeAmount)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.giftAmount,v => {
|
||||||
|
addata.giftAmount = setNum(addata.giftAmount)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.point,v => {
|
||||||
|
addata.point = setNum(addata.point)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.deposit,v => {
|
||||||
|
addata.deposit = setNum(addata.deposit)
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.rent,v => {
|
||||||
|
addata.rent = setNum(addata.rent)
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取换电站名称
|
||||||
|
function getlabel(n:string){
|
||||||
|
addata.stationName = n
|
||||||
|
}
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
getjqrlist(queryParams).then(rps => {
|
||||||
|
if(rps.data && (rps.data as any).records.length > 0){
|
||||||
|
const v = (rps.data as any).records[0]
|
||||||
|
addata.stationCode = v.stationCode
|
||||||
|
addata.pkId = v.pkId
|
||||||
|
addata.stationCode = v.stationCode
|
||||||
|
addata.stationName = v.stationName
|
||||||
|
addata.totalAmount = v.totalAmount?v.totalAmount/100:0
|
||||||
|
addata.rechargeAmount = v.rechargeAmount?v.rechargeAmount/100:0
|
||||||
|
addata.giftAmount = v.giftAmount?v.giftAmount/100:0
|
||||||
|
addata.point = v.point?v.point/100:0
|
||||||
|
addata.deposit = v.deposit?v.deposit/100:0
|
||||||
|
addata.snCode = v.snCode?v.snCode:''
|
||||||
|
addata.rent = v.rent?v.rent/100:0
|
||||||
|
|
||||||
|
|
||||||
|
iskh.value = true
|
||||||
|
type.value = 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let mxlist = ref<any[]>([])
|
||||||
|
function showpop(num:any,row?:any){
|
||||||
|
type.value = num
|
||||||
|
|
||||||
|
if(type.value == 1){
|
||||||
|
openpop.value = true
|
||||||
|
}else if(type.value == 2){
|
||||||
|
drawer.value = true
|
||||||
|
}
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
|
||||||
|
addata.pkId = ''
|
||||||
|
addata.stationCode = ''
|
||||||
|
addata.stationName = ''
|
||||||
|
addata.totalAmount = ''
|
||||||
|
addata.rechargeAmount = ''
|
||||||
|
addata.giftAmount = ''
|
||||||
|
addata.point = ''
|
||||||
|
addata.deposit = ''
|
||||||
|
addata.snCode = ''
|
||||||
|
addata.rent = ''
|
||||||
|
}
|
||||||
|
function savehand() {
|
||||||
|
if(type.value == 1){
|
||||||
|
return addhdz(addata)
|
||||||
|
}
|
||||||
|
return update(addata)
|
||||||
|
|
||||||
|
}
|
||||||
|
//保存
|
||||||
|
function handleAdd() {
|
||||||
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
addata.totalAmount = addata.totalAmount*100
|
||||||
|
|
||||||
|
addata.rechargeAmount = addata.rechargeAmount*100
|
||||||
|
addata.giftAmount = addata.giftAmount*100
|
||||||
|
addata.point = addata.point*100
|
||||||
|
addata.deposit = addata.deposit*100
|
||||||
|
addata.rent = addata.rent*100
|
||||||
|
|
||||||
|
|
||||||
|
savehand().then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: type.value == 1?'添加成功':'修改成功'
|
||||||
|
})
|
||||||
|
if(type.value == 2){
|
||||||
|
stationName.value = addata.stationName
|
||||||
|
}
|
||||||
|
setTimeout(()=> {
|
||||||
|
if(type.value == 1){
|
||||||
|
openpop.value = false
|
||||||
|
}
|
||||||
|
getyys()
|
||||||
|
},600)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//取消
|
||||||
|
function cancel() {
|
||||||
|
openpop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
//费用标准明细
|
||||||
|
let drawer = ref(false)
|
||||||
|
//let standardId = ref('')
|
||||||
|
function handleClose() {
|
||||||
|
drawer.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetupdate() {
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
// function bzmingx(id:string) {
|
||||||
|
// drawer.value = true
|
||||||
|
// standardId.value = id
|
||||||
|
// }
|
||||||
|
|
||||||
|
getyys()
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
.mktit{
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
background: #98c3ef;
|
||||||
|
}
|
||||||
|
.jqbg{
|
||||||
|
background: #73b9c9;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -45,26 +45,41 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
<el-button
|
<div style="display: flex;justify-content: space-between;">
|
||||||
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="Plus"
|
icon="Plus"
|
||||||
@click="showpop(1)">新增</el-button>
|
@click="showpop()">新增</el-button>
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'600px':'680px'"
|
||||||
>
|
>
|
||||||
<el-table-column label="区划" width="200" align="center" prop="division" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="公司名称" width="200" align="center" prop="cname" :show-overflow-tooltip="true" />
|
<el-table-column label="公司名称" min-width="200" align="center" prop="cname" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="组织机构代码" width="200" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
<template #default="scope">
|
||||||
<el-table-column label="详细地址" width="400" align="center" prop="address" :show-overflow-tooltip="true" />
|
<div @click="xqshpop(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.cname}}</div>
|
||||||
<el-table-column label="联系人" width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
</template>
|
||||||
<el-table-column label="联系电话" width="160" align="center" prop="phone" :show-overflow-tooltip="true" />
|
</el-table-column>
|
||||||
<el-table-column label="账户余额" width="100" align="center" prop="accountBalance" :show-overflow-tooltip="true" />
|
<el-table-column label="组织机构代码" min-width="200" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="状态" width="100" align="center" prop="status">
|
<el-table-column label="区划" min-width="200" align="center" prop="division" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="详细地址" min-width="400" align="center" prop="address" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系人" min-width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系电话" min-width="160" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="账户余额(元)" min-width="100" align="center" prop="accountBalance" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{scope.row.accountBalance/100}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" min-width="100" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.status == 1">启用</div>
|
<div v-if="scope.row.status == 1">启用</div>
|
||||||
<div v-else style="color: #ccc;">禁用</div>
|
<div v-else style="color: #ccc;">禁用</div>
|
||||||
@ -75,9 +90,9 @@
|
|||||||
<span>{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
<span>{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button>
|
<!-- <el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button> -->
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -213,6 +228,143 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--企业详情-->
|
||||||
|
<el-drawer
|
||||||
|
v-model="xqdaropen"
|
||||||
|
:with-header="false"
|
||||||
|
size="50%"
|
||||||
|
>
|
||||||
|
<!-- <tit @close="handleClose" :name="addata.name" :hdzcode="addata.code" :showcode="true" /> -->
|
||||||
|
<div style="padding:0;border: 2px solid #98c3ef;border-radius: 10px;">
|
||||||
|
|
||||||
|
<div class="mktit" style="margin-bottom: 20px;">基本信息</div>
|
||||||
|
<el-form style="padding: 20px;" ref="yysRef" :model="addata" :rules="rules" label-width="110px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="区划" prop="division">
|
||||||
|
<el-cascader
|
||||||
|
ref="cascader"
|
||||||
|
v-model="slecas"
|
||||||
|
style="width: 100%;"
|
||||||
|
:options="options"
|
||||||
|
clearable
|
||||||
|
:props="{
|
||||||
|
label:'admdvsName',
|
||||||
|
value:'admdvsNo',
|
||||||
|
children:'subAdmdvsInfoList'
|
||||||
|
}"
|
||||||
|
@change="change"
|
||||||
|
/>
|
||||||
|
<!-- <el-input v-model="addata.division" placeholder="请选择区划" maxlength="20" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="公司名称" prop="cname">
|
||||||
|
<el-input v-model="addata.cname" placeholder="请输入公司名称" maxlength="50" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="组织机构代码" prop="ccode">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.ccode"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入组织机构代码"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="详细地址" prop="address">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.address"
|
||||||
|
placeholder="请输入详细地址"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系人" prop="contacts">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.contacts"
|
||||||
|
placeholder="请输入联系人"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.phone"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
maxlength="11"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<!-- <el-form-item label="只读" prop="readonly">
|
||||||
|
<el-radio-group v-model="addata.readonly">
|
||||||
|
<el-radio value="1">是</el-radio>
|
||||||
|
<el-radio value="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="账户余额(元)" prop="accountBalance">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.accountBalance"
|
||||||
|
placeholder="请输入账户余额"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="logo" prop="logo">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
action="http://localhost:5173/dev-api/resource/file/upload"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
>
|
||||||
|
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="addata.status">
|
||||||
|
<el-radio :value="1">启用</el-radio>
|
||||||
|
<el-radio :value="0">禁用</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-col :span="24" style="text-align: center;">
|
||||||
|
<el-button type="success" @click="handleAdd">保 存</el-button>
|
||||||
|
<el-button @click="resetupdate">重 置</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 20px;padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
||||||
|
<div class="mktit" style="margin-bottom: 20px;background: #73b9c9;">账户信息</div>
|
||||||
|
|
||||||
|
<Accountmb v-if="xqdaropen" :ownerId="addata.ccode" />
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-tabs type="border-card" class="demo-tabs">
|
||||||
|
<el-tab-pane>
|
||||||
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||||
|
<el-tab-pane label="Role">Role</el-tab-pane>
|
||||||
|
<el-tab-pane label="Task">Task</el-tab-pane>
|
||||||
|
</el-tabs> -->
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts" name="UserPage">
|
||||||
@ -225,10 +377,17 @@
|
|||||||
import {
|
import {
|
||||||
getArea
|
getArea
|
||||||
} from '@/api/common'
|
} from '@/api/common'
|
||||||
import { ref,reactive } from 'vue'
|
|
||||||
|
import Accountmb from './account.vue'
|
||||||
|
|
||||||
|
import { setNum } from '@/utils/validate'
|
||||||
|
|
||||||
|
import { ref,reactive,watch } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import type { UploadProps } from 'element-plus'
|
import type { UploadProps } from 'element-plus'
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
@ -310,31 +469,24 @@
|
|||||||
{ required: true, message: "请输入组织机构代码", trigger: "blur" },
|
{ required: true, message: "请输入组织机构代码", trigger: "blur" },
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
function showpop(num:any,row?:any){
|
|
||||||
type.value = num
|
watch(() => addata.phone,v => {
|
||||||
|
if(v){
|
||||||
|
addata.phone = v.replace(/[^\d]/g,'')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.accountBalance,v => {
|
||||||
|
if(v){
|
||||||
|
addata.accountBalance =setNum(v)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function showpop(){
|
||||||
|
type.value = 1
|
||||||
openpop.value = true
|
openpop.value = true
|
||||||
ystit.value = num == 1?'添加公司':'修改公司'
|
ystit.value = '添加公司'
|
||||||
yysRef.value?.resetFields()
|
yysRef.value?.resetFields()
|
||||||
if(row){
|
|
||||||
slecas.value = row.divisionNo
|
|
||||||
|
|
||||||
addata.pkId = row.pkId
|
|
||||||
addata.cname = row.cname
|
|
||||||
addata.ccode = row.ccode
|
|
||||||
addata.division = row.division
|
|
||||||
addata.divisionNo = row.divisionNo
|
|
||||||
addata.address = row.address
|
|
||||||
addata.addressProvince = row.addressProvince
|
|
||||||
addata.addressCity = row.addressCity
|
|
||||||
addata.addressArea = row.addressArea
|
|
||||||
addata.contacts = row.contacts
|
|
||||||
addata.phone = row.phone
|
|
||||||
addata.status = row.status
|
|
||||||
addata.logo = row.logo
|
|
||||||
//addata.delFlag = row.delFlag
|
|
||||||
addata.accountBalance = row.accountBalance
|
|
||||||
|
|
||||||
}else{
|
|
||||||
slecas.value = ''
|
slecas.value = ''
|
||||||
|
|
||||||
addata.pkId = ''
|
addata.pkId = ''
|
||||||
@ -350,8 +502,7 @@
|
|||||||
addata.phone = ''
|
addata.phone = ''
|
||||||
addata.status = ''
|
addata.status = ''
|
||||||
addata.logo = ''
|
addata.logo = ''
|
||||||
addata.accountBalance = ''
|
addata.accountBalance = ''
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function savehand() {
|
function savehand() {
|
||||||
if(type.value == 1){
|
if(type.value == 1){
|
||||||
@ -364,6 +515,9 @@
|
|||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
yysRef.value?.validate((valid:Boolean) => {
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if(addata.accountBalance){
|
||||||
|
(addata.accountBalance as any) = (addata.accountBalance as any)*100
|
||||||
|
}
|
||||||
savehand().then(() => {
|
savehand().then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@ -371,6 +525,7 @@
|
|||||||
})
|
})
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
openpop.value = false
|
openpop.value = false
|
||||||
|
xqdaropen.value = false
|
||||||
getyys()
|
getyys()
|
||||||
},600)
|
},600)
|
||||||
})
|
})
|
||||||
@ -404,6 +559,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetupdate() {
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
//获取区划
|
//获取区划
|
||||||
let options = ref<any>([])
|
let options = ref<any>([])
|
||||||
let cascader = ref()
|
let cascader = ref()
|
||||||
@ -434,6 +593,36 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
//企业详情
|
||||||
|
let xqdaropen = ref(false)
|
||||||
|
|
||||||
|
function xqshpop(row:any){
|
||||||
|
type.value = 2
|
||||||
|
xqdaropen.value = true
|
||||||
|
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
if(row){
|
||||||
|
slecas.value = row.divisionNo
|
||||||
|
|
||||||
|
addata.pkId = row.pkId
|
||||||
|
addata.cname = row.cname
|
||||||
|
addata.ccode = row.ccode
|
||||||
|
addata.division = row.division
|
||||||
|
addata.divisionNo = row.divisionNo
|
||||||
|
addata.address = row.address
|
||||||
|
addata.addressProvince = row.addressProvince
|
||||||
|
addata.addressCity = row.addressCity
|
||||||
|
addata.addressArea = row.addressArea
|
||||||
|
addata.contacts = row.contacts
|
||||||
|
addata.phone = row.phone
|
||||||
|
addata.status = row.status
|
||||||
|
addata.logo = row.logo
|
||||||
|
//addata.delFlag = row.delFlag
|
||||||
|
addata.accountBalance = row.accountBalance == null?'':(row.accountBalance/100)+''
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//文件上传
|
//文件上传
|
||||||
let imageUrl = ref('')
|
let imageUrl = ref('')
|
||||||
const handleAvatarSuccess: UploadProps['onSuccess'] = (
|
const handleAvatarSuccess: UploadProps['onSuccess'] = (
|
||||||
@ -457,7 +646,18 @@
|
|||||||
getyys()
|
getyys()
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-divider--horizontal{
|
.el-divider--horizontal{
|
||||||
border-color:#5b98cd;
|
border-color:#5b98cd;
|
||||||
}
|
}
|
||||||
|
.mktit{
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
background: #98c3ef;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
<div v-if="search" class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
<el-form
|
<el-form
|
||||||
ref="querform"
|
ref="querform"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
@ -24,28 +24,46 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||||
|
<div style="display: flex;justify-content: right;">
|
||||||
|
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
|
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
style="width:100%;margin-top: 10px;"
|
style="width:100%;margin-top: 10px;"
|
||||||
:data="yysList"
|
:data="yysList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
:max-height="search?'600px':'680px'"
|
||||||
>
|
>
|
||||||
|
<el-table-column type="index" min-width="50" align="center">
|
||||||
<el-table-column label="手机号" min-width="150" align="center" prop="phoneNumber" :show-overflow-tooltip="true">
|
<template #default="{ $index }">
|
||||||
<template #default="scope">
|
<div>{{(queryParams.pageNo - 1) * queryParams.pageSize+ $index + 1}}</div>
|
||||||
<div @click="showpop(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.phoneNumber}}</div>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号" min-width="150" align="center" prop="phoneNumber" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div @click="showpop(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.phoneNumber?scope.row.phoneNumber:'暂未绑定'}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="用户名称" min-width="150" align="center" prop="name" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{scope.row.name?scope.row.name:'暂未设置'}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="用户昵称" min-width="150" align="center" prop="nickName" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{scope.row.nickName?scope.row.nickName:'暂未设置'}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户名称" min-width="150" align="center" prop="name" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="用户昵称" min-width="150" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="用户性别" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
<el-table-column label="用户性别" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.ownerType == 1">男</div>
|
<div v-if="scope.row.gender == 1">男</div>
|
||||||
<div v-else-if="scope.row.ownerType == 2">女</div>
|
<div v-else-if="scope.row.gender == 2">女</div>
|
||||||
|
<div v-else>暂未设置</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="账户类型" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
<el-table-column label="用户类型" min-width="150" align="center" prop="type" :show-overflow-tooltip="true">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.type == 1">个人</div>
|
<div v-if="scope.row.type == 1">个人</div>
|
||||||
<div v-else-if="scope.row.type == 2">公司</div>
|
<div v-else-if="scope.row.type == 2">公司</div>
|
||||||
@ -144,6 +162,11 @@
|
|||||||
<el-input v-model="addata.name" maxlength="20" placeholder="请输入用户名" clearable />
|
<el-input v-model="addata.name" maxlength="20" placeholder="请输入用户名" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="账户余额(元)">
|
||||||
|
<el-input v-model="totalAmount" disabled placeholder="请输入用户名" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -164,9 +187,14 @@
|
|||||||
import {
|
import {
|
||||||
getlist
|
getlist
|
||||||
} from '@/api/operation/company'
|
} from '@/api/operation/company'
|
||||||
|
import {
|
||||||
|
getjqrlist
|
||||||
|
} from '@/api/order/account'
|
||||||
import { ref,reactive,watch} from 'vue'
|
import { ref,reactive,watch} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
let search = ref(true)
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
@ -305,6 +333,8 @@
|
|||||||
addata.phone = v.replace(/[^\d]/g,'')
|
addata.phone = v.replace(/[^\d]/g,'')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let totalAmount = ref<any>('')
|
||||||
|
|
||||||
function showpop(row?:any){
|
function showpop(row?:any){
|
||||||
openpop.value = true
|
openpop.value = true
|
||||||
yysRef.value?.resetFields()
|
yysRef.value?.resetFields()
|
||||||
@ -312,6 +342,19 @@
|
|||||||
addata.wuid = row.wuid
|
addata.wuid = row.wuid
|
||||||
addata.name = row.name?row.name:''
|
addata.name = row.name?row.name:''
|
||||||
addata.phone = row.phoneNumber?row.phoneNumber:''
|
addata.phone = row.phoneNumber?row.phoneNumber:''
|
||||||
|
|
||||||
|
getjqrlist({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
ownerId:row.wuid //户主ID
|
||||||
|
}).then(rps => {
|
||||||
|
if(rps.data && (rps.data as any).records.length > 0){
|
||||||
|
totalAmount.value = (rps.data as any).records[0].totalAmount
|
||||||
|
totalAmount.value = totalAmount.value/100
|
||||||
|
}else{
|
||||||
|
totalAmount.value = '暂未开通'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user