修改车辆
This commit is contained in:
parent
e3907fbd38
commit
94853b0e61
@ -6,5 +6,5 @@ VITE_APP_ENV = 'development'
|
|||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.5.213:9100/gateway'
|
VITE_APP_BASE_API = 'http://192.168.5.213:9100/gateway'
|
||||||
VITE_APP_BASE_API = '/dev-api'
|
#VITE_APP_BASE_API = '/dev-api'
|
||||||
#VITE_APP_BASE_API = 'https://api.evo-techina.com'
|
#VITE_APP_BASE_API = 'https://api.evo-techina.com'
|
||||||
|
|||||||
63
src/api/operation/company.ts
Normal file
63
src/api/operation/company.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
//查询
|
||||||
|
interface Query{
|
||||||
|
pageSize:String|Number //每页条数
|
||||||
|
pageNo:String|Number //页数
|
||||||
|
divisionNo?:String //区划编码
|
||||||
|
cname?:String
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getlist(params:Query) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/company/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增
|
||||||
|
interface Addata{
|
||||||
|
division:String //区划名称
|
||||||
|
divisionNo:String //区划编码
|
||||||
|
cname:String //公司名称
|
||||||
|
ccode:String //组织机构代码
|
||||||
|
address?:String //地址
|
||||||
|
addressProvince?:String //地址-省
|
||||||
|
addressCity?:String //地址-市
|
||||||
|
addressArea?:String //地址-区县
|
||||||
|
contacts?:String //联系人
|
||||||
|
phone?:String //联系电话
|
||||||
|
status?:String|Number //状态:1-启用,0-禁用
|
||||||
|
logo?:String //logo地址
|
||||||
|
delFlag?:String //删除标识:1-已删除,0-未删除
|
||||||
|
accountBalance?:String //账户余额
|
||||||
|
}
|
||||||
|
export function addyunys(data:Addata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/company/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改
|
||||||
|
export function updateyys(data:Addata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/company/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export function delyys(id:String) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/company/del',
|
||||||
|
method: 'post',
|
||||||
|
data:{
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
51
src/api/operation/wxuser.ts
Normal file
51
src/api/operation/wxuser.ts
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
//查询
|
||||||
|
interface Querydata{
|
||||||
|
pageSize:String|number //每页条数
|
||||||
|
pageNo:String|number //页数
|
||||||
|
wuid?:String //微信用户id
|
||||||
|
phoneNumber?:String //手机号
|
||||||
|
nickName?:String //用户昵称
|
||||||
|
gender?:String //用户性别:1-男;2-女
|
||||||
|
name?:String //名称
|
||||||
|
type?:String //类型:1-独立账户,2-公司员工子账户
|
||||||
|
pcode?:String //父账户编码
|
||||||
|
}
|
||||||
|
export function getwxlist(params:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/wechat/user/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//关联公司
|
||||||
|
interface Globj{
|
||||||
|
wuid:String
|
||||||
|
pcode:String //公司编码
|
||||||
|
pname:String //公司名称
|
||||||
|
}
|
||||||
|
|
||||||
|
export function gulgs(data:Globj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/wechat/user/companyrelation',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新手机号 名称
|
||||||
|
interface Addobj{
|
||||||
|
wuid:String
|
||||||
|
phone:String //手机号
|
||||||
|
name:String //用户名
|
||||||
|
}
|
||||||
|
|
||||||
|
export function update(data:Addobj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/wechat/user/alterphone',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -9,7 +9,7 @@ interface Addobj{
|
|||||||
stationName:String //换电站名称
|
stationName:String //换电站名称
|
||||||
accountCode:String //金额账号
|
accountCode:String //金额账号
|
||||||
amount:String|Number //订单金额
|
amount:String|Number //订单金额
|
||||||
status:String|Number //订单状态: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 //服务开始时间
|
||||||
@ -82,3 +82,25 @@ export function delhdz(id:string) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//换电步骤
|
||||||
|
export function gethdbz(orderNo:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/order/swap/step/list',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
orderNo
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算费用
|
||||||
|
export function jsfeiy(orderNo:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/order/swap/cost',
|
||||||
|
method: 'post',
|
||||||
|
data:{
|
||||||
|
orderNo
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -3,14 +3,16 @@ import server from '@/utils/request'
|
|||||||
//新增
|
//新增
|
||||||
interface Addobj{
|
interface Addobj{
|
||||||
typeCode:String //电池型号编码
|
typeCode:String //电池型号编码
|
||||||
|
typeName:String //电池型号名称
|
||||||
batCode:String //电池编码
|
batCode:String //电池编码
|
||||||
sourceFrom:String|Number //初始来源:1-站,2-车
|
sourceFrom:String|Number //初始来源:1-站,2-车
|
||||||
status:String|Number //状态:1-出租中,2-充电中,3-充电完毕,4-故障,5-其它
|
status:String|Number //状态:1-出租中,2-充电中,3-充电完毕,4-故障,5-其它
|
||||||
pkId?:String
|
pkId?:String
|
||||||
productionDate?:String //生产日期
|
productionDate?:String //生产日期
|
||||||
registrationDate?:String //注册时间
|
registrationDate?:String //注册时间
|
||||||
sourceCode?:String //站码或车牌照
|
sourceCode?:String //站码或车牌照
|
||||||
stationCode?:String //换电站编码
|
stationCode?:String //换电站编码
|
||||||
|
stationName:String //换电站名称
|
||||||
soc?:String|Number //当前电量
|
soc?:String|Number //当前电量
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,3 +60,32 @@ export function delhdz(id:string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//查询追溯
|
||||||
|
export function getzhuis(batteryCode:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/dc/trace/list',
|
||||||
|
method: 'get',
|
||||||
|
params:{
|
||||||
|
batteryCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加追溯
|
||||||
|
interface Addzs{
|
||||||
|
batCode:string //电池编码
|
||||||
|
pointType:String //轨迹点类型:1-电站,2-车辆
|
||||||
|
beginTime:String //开始时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
|
pointCode:String //轨迹点编码
|
||||||
|
pointName:String //轨迹点名称
|
||||||
|
endTime?:String //结束时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
|
}
|
||||||
|
export function addzhuis(data:Addzs) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/dc/trace/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -76,3 +76,17 @@ export function delhdz(id:string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//获取小程序码
|
||||||
|
interface Codeqs{
|
||||||
|
path:String
|
||||||
|
width:String
|
||||||
|
env_version:String
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getqrcode(params:Codeqs) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/batterystation/xcx/qrcode/get',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -75,4 +75,36 @@ export function delhdz(id:string) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Bings{
|
||||||
|
plateNum:String
|
||||||
|
ccode:String
|
||||||
|
cname:String
|
||||||
|
}
|
||||||
|
|
||||||
|
//绑定公司
|
||||||
|
export function Binggs(params:Bings) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/vehicle/company/relation',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
interface Wxbin{
|
||||||
|
ucode:String //用户编码
|
||||||
|
uname:String //用户名称
|
||||||
|
plateNum:String //车牌号
|
||||||
|
ownerType:String //车主类型:1-个人,2-企业
|
||||||
|
phone:String //关联人手机号
|
||||||
|
openid?:String //微信用户标识
|
||||||
|
}
|
||||||
|
|
||||||
|
//绑定微信用户
|
||||||
|
export function Bingwx(params:Wxbin) {
|
||||||
|
return server.request({
|
||||||
|
url: '/cloud/vehicle/wechatuser/relation/add',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
57
src/api/systemSet/xcximg.ts
Normal file
57
src/api/systemSet/xcximg.ts
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import server from '@/utils/request'
|
||||||
|
|
||||||
|
//新增
|
||||||
|
interface Addobj{
|
||||||
|
appid?:String //小程序appid
|
||||||
|
type?:String //类型:1-logo,2-轮播图
|
||||||
|
name?:String //名称
|
||||||
|
picUrl?:String //图片地址
|
||||||
|
sort?:String //排序
|
||||||
|
linkFlag?:String //链接标识
|
||||||
|
outLinks?:String //外链地址
|
||||||
|
status?:String //状态:1-可用,0-不可用
|
||||||
|
}
|
||||||
|
|
||||||
|
export function adddicttype(data:Addobj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/resource/wechat/swiper/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
},false)
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改
|
||||||
|
export function update(data:Addobj) {
|
||||||
|
return server.request({
|
||||||
|
url: '/resource/wechat/swiper/update',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
},false)
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询
|
||||||
|
interface Querydata{
|
||||||
|
type?:String|Number //类型:1-服务条款,2-隐私协议
|
||||||
|
appid?:String
|
||||||
|
status?:String //状态:1-可用,0-不可用
|
||||||
|
}
|
||||||
|
export function getdicttype(params:Querydata) {
|
||||||
|
return server.request({
|
||||||
|
url: '/resource/wechat/swiper/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
export function deltype(id:string) {
|
||||||
|
return server.request({
|
||||||
|
url: '/resource/wechat/swiper/del',
|
||||||
|
method: 'post',
|
||||||
|
data:{
|
||||||
|
id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -156,7 +156,9 @@ export class Service {
|
|||||||
//return Promise.reject("登录已过期,请重新登录。");
|
//return Promise.reject("登录已过期,请重新登录。");
|
||||||
return Promise.reject('S0405')
|
return Promise.reject('S0405')
|
||||||
//return Promise.reject()
|
//return Promise.reject()
|
||||||
} else if (code == 500) {
|
}else if(code == 'D0402'){
|
||||||
|
return Promise.reject()
|
||||||
|
}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));
|
||||||
} else if (code == 601) {
|
} else if (code == 601) {
|
||||||
|
|||||||
@ -6,23 +6,33 @@
|
|||||||
<div style="font-size: 20px;color:#0d8ed7;font-weight: bold;text-align: center;">
|
<div style="font-size: 20px;color:#0d8ed7;font-weight: bold;text-align: center;">
|
||||||
{{name}}
|
{{name}}
|
||||||
</div>
|
</div>
|
||||||
<el-icon v-if="showcls" color="#ccc" @click="handleClose" style="cursor: pointer;">
|
<div style="display: flex;">
|
||||||
<CloseBold />
|
<a v-if="showcode" :href="url" style="display: flex;align-items: center;padding-right: 30px;color: #80aedd;">
|
||||||
</el-icon>
|
<div style="padding-right: 6px;">下载小程序码</div><el-icon><Download /></el-icon>
|
||||||
|
</a>
|
||||||
|
<el-icon v-if="showcls" color="#ccc" @click="handleClose" style="cursor: pointer;">
|
||||||
|
<CloseBold />
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
//import { ref } from 'vue'
|
//import { ref } from 'vue'
|
||||||
|
// import{ getqrcode } from '@/api/swapstation/hdz'
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
name?:string
|
name?:string
|
||||||
showjt?:boolean
|
showjt?:boolean
|
||||||
showcls?:boolean
|
showcls?:boolean
|
||||||
|
showcode?:boolean,
|
||||||
|
hdzcode?:string
|
||||||
}>(), {
|
}>(), {
|
||||||
name:'',
|
name:'',
|
||||||
showjt:true,
|
showjt:true,
|
||||||
showcls:true
|
showcls:true,
|
||||||
|
showcode:false
|
||||||
})
|
})
|
||||||
|
//${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`
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
close: []
|
close: []
|
||||||
@ -31,4 +41,16 @@
|
|||||||
function handleClose() {
|
function handleClose() {
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取小程序码
|
||||||
|
// function xcxcode(){
|
||||||
|
// getqrcode({
|
||||||
|
// path:'pages/home/index',
|
||||||
|
// width:'400',
|
||||||
|
// env_version:'trial' //要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop"。默认是正式版。
|
||||||
|
// }).then((rps:any) => {
|
||||||
|
// console.log(rps)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -57,7 +57,11 @@
|
|||||||
stripe
|
stripe
|
||||||
max-height="600px"
|
max-height="600px"
|
||||||
>
|
>
|
||||||
<el-table-column label="订单号" min-width="120" 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">
|
||||||
|
<div @click="getdetails(scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.orderNo}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<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.status == 1">换电</div>
|
<div v-if="scope.row.status == 1">换电</div>
|
||||||
@ -65,18 +69,19 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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="orderTime" :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="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="amount" :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">已创建</div>
|
||||||
<div v-else-if="scope.row.status == 2">换电中</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 == 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">待结算</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>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计费方式" min-width="120" align="center" prop="feeType" :show-overflow-tooltip="true">
|
<el-table-column label="计费方式" min-width="120" align="center" prop="feeType" :show-overflow-tooltip="true">
|
||||||
@ -221,13 +226,14 @@
|
|||||||
<el-col :span="12">
|
<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 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-option label="未结算" value="5" />
|
<el-option label="充电完成" value="5" />
|
||||||
<el-option label="订单取消" value="6" />
|
<el-option label="待结算" value="6" />
|
||||||
<el-option label="已结算" value="7" />
|
<el-option label="已完成" value="7" />
|
||||||
|
<el-option label="已取消" value="9" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -380,6 +386,236 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--详情修改-->
|
||||||
|
<el-drawer
|
||||||
|
v-model="drawer"
|
||||||
|
:with-header="false"
|
||||||
|
size="1200px"
|
||||||
|
>
|
||||||
|
<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;">
|
||||||
|
订单详情
|
||||||
|
<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: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">订单号:</el-col>
|
||||||
|
<el-col :span="20" style="color: #417ebb;">{{xqobj.orderNo}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">订单类型:</el-col>
|
||||||
|
<el-col :span="18" style="color: #417ebb;">{{xqobj.orderType == 1?'换电':'充电'}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">车牌号:</el-col>
|
||||||
|
<el-col :span="20" style="color: #417ebb;">{{xqobj.plateNum}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">订单状态:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{getstu(xqobj.status)}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">订单时间:</el-col>
|
||||||
|
<el-col :span="18" style="color: #417ebb;">{{xqobj.orderTime}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">金额账号:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.accountCode}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">订单金额:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.amount}}元</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">计费方式:</el-col>
|
||||||
|
<el-col :span="18" style="color: #417ebb;">{{xqobj.feeType}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">基础费用:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.basicFee}}元</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">服务开始时间:</el-col>
|
||||||
|
<el-col :span="16" style="color: #417ebb;">{{xqobj.serviceTimeBegin}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">服务结束时间:</el-col>
|
||||||
|
<el-col :span="16" style="color: #417ebb;">{{xqobj.serviceTimeEnd}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">服务费:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.serviceFee}}元</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">上次租赁电池时车辆里程:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.lastRentBatCarOdo}}公里</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10">归还电池时车辆里程:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.nowReturnBatCarOdo}}公里</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">按ODO换电费:</el-col>
|
||||||
|
<el-col :span="16" style="color: #417ebb;">{{xqobj.odoAmount}}元</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">总充电量:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.electAmount}}度</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">租借电池包仓位:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.rentBatNo}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">租用电池包编码:</el-col>
|
||||||
|
<el-col :span="16" style="color: #417ebb;">{{xqobj.rentBatCode}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">租用电池包SOC:</el-col>
|
||||||
|
<el-col :span="10" style="color: #417ebb;">{{xqobj.rentBatSoc}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">归还电池包编码:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.returnBatCode}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">归还电池包仓位:</el-col>
|
||||||
|
<el-col :span="16" style="color: #417ebb;">{{xqobj.returnBatNo}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9">归还电池包SOC:</el-col>
|
||||||
|
<el-col :span="10" style="color: #417ebb;"></el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">归还电池租出时SOC:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.returnBatSoc}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">归还电池租出的换电站:</el-col>
|
||||||
|
<el-col :span="13" style="color: #417ebb;">{{xqobj.returnBatRentStationName}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row style="margin-bottom: 30px;">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">换电模式:</el-col>
|
||||||
|
<el-col :span="10" style="color: #417ebb;">{{ xqobj.changeMode}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">换电车道:</el-col>
|
||||||
|
<el-col :span="12" style="color: #417ebb;">{{xqobj.changeLane == 1?'A车道':'B车道'}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">交易编码:</el-col>
|
||||||
|
<el-col :span="19" style="color: #417ebb;">{{xqobj.tradeNo}}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<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-button
|
||||||
|
style="margin-right: 25px;"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Edit"
|
||||||
|
@click="showpop(2,xqobj)">修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="xqobj.status == 5" :span="12">
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 25px;"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="CopyDocument"
|
||||||
|
@click="feiyong((xqobj as any).orderNo)">计算费用</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="padding-bottom: 20px;">换电步骤</div>
|
||||||
|
<div style="height: 300px;">
|
||||||
|
<el-steps direction="vertical" :active="hdbz.length" align-center>
|
||||||
|
<el-step v-for="n in hdbz" icon="CircleCheck" :title="`${n.step}----${n.stepTime}`" />
|
||||||
|
</el-steps>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts" name="UserPage">
|
||||||
@ -391,8 +627,14 @@
|
|||||||
getjqrlist,
|
getjqrlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
update,
|
update,
|
||||||
delhdz
|
delhdz,
|
||||||
|
jsfeiy,
|
||||||
|
gethdbz
|
||||||
} from '@/api/order/replabatt'
|
} from '@/api/order/replabatt'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getwxlist
|
||||||
|
} from '@/api/operation/wxuser'
|
||||||
import { carNum } from '@/utils/validate'
|
import { carNum } from '@/utils/validate'
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
@ -401,7 +643,6 @@
|
|||||||
import { ref,reactive} from 'vue'
|
import { ref,reactive} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
@ -444,40 +685,33 @@
|
|||||||
|
|
||||||
|
|
||||||
let wxuser = ref('')
|
let wxuser = ref('')
|
||||||
//获取微信用户 ?? 暂时调用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.pkId //??
|
||||||
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 === ''){
|
||||||
wxuser.value = ''
|
wxuser.value = ''
|
||||||
@ -489,7 +723,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleSelect(v: any) {
|
function handleSelect(v: any) {
|
||||||
addata.userId = v.id
|
console.log(v)
|
||||||
|
//addata.userId = v.id
|
||||||
|
addata.orderPreUid = v.pkId //预约用户
|
||||||
|
addata.orderPreUname = v.name //预约用户名称
|
||||||
|
addata.orderPrePhone = v.phoneNumber //预约用户手机
|
||||||
}
|
}
|
||||||
function getyys() {
|
function getyys() {
|
||||||
yysList.value.splice(0)
|
yysList.value.splice(0)
|
||||||
@ -512,6 +750,26 @@
|
|||||||
querform.value?.resetFields()
|
querform.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消
|
||||||
|
|
||||||
|
function getstu(n:any){
|
||||||
|
if(n == 1){
|
||||||
|
return '已创建'
|
||||||
|
}else if(n == 2){
|
||||||
|
return '换电中'
|
||||||
|
}else if(n == 3){
|
||||||
|
return '换电完成'
|
||||||
|
}else if(n == 4){
|
||||||
|
return '充电中'
|
||||||
|
}else if(n == 5){
|
||||||
|
return '充电完成'
|
||||||
|
}else if(n == 6){
|
||||||
|
return '待结算'
|
||||||
|
}else if(n == 7){
|
||||||
|
return '已完成'
|
||||||
|
}
|
||||||
|
return '已取消'
|
||||||
|
}
|
||||||
|
|
||||||
//新增、修改
|
//新增、修改
|
||||||
let type = ref(1)
|
let type = ref(1)
|
||||||
@ -548,8 +806,13 @@
|
|||||||
returnBatRentStationName:'', //归还电池租出的换电站
|
returnBatRentStationName:'', //归还电池租出的换电站
|
||||||
changeMode:'', //换电模式:1-全自动,2-半自动,3-人工干预
|
changeMode:'', //换电模式:1-全自动,2-半自动,3-人工干预
|
||||||
changeLane:'', //换电车道 1-A 车道;2-B 车道
|
changeLane:'', //换电车道 1-A 车道;2-B 车道
|
||||||
userId:'123', //换电车主ID
|
userId:'', //换电车主ID
|
||||||
tradeNo:'' //交易编码
|
tradeNo:'', //交易编码
|
||||||
|
|
||||||
|
orderPreId:'', //预约订单ID
|
||||||
|
orderPreUid:'', //预约用户
|
||||||
|
orderPreUname:'', //预约用户名称
|
||||||
|
orderPrePhone:'' //预约用户手机
|
||||||
})
|
})
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
orderType:[
|
orderType:[
|
||||||
@ -559,8 +822,11 @@
|
|||||||
// { required: true, message: "请选择车主", trigger: "blur" }
|
// { required: true, message: "请选择车主", trigger: "blur" }
|
||||||
// ],
|
// ],
|
||||||
plateNum:[
|
plateNum:[
|
||||||
// { required: true, message: "请输入车牌号", trigger: "blur" },
|
{ required: true, message: "请输入车牌号", trigger: "blur" },
|
||||||
{ validator:carNum, trigger: "blur"}
|
{ validator:carNum, trigger: "blur"}
|
||||||
|
],
|
||||||
|
stationCode:[
|
||||||
|
{ required: true, message: "请选择换电站", trigger: "blur" }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -639,7 +905,7 @@
|
|||||||
addata.returnBatRentStationName = ''
|
addata.returnBatRentStationName = ''
|
||||||
addata.changeMode = ''
|
addata.changeMode = ''
|
||||||
addata.changeLane = ''
|
addata.changeLane = ''
|
||||||
addata.userId = '123' //??
|
addata.userId = '' //??
|
||||||
addata.tradeNo = ''
|
addata.tradeNo = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -661,12 +927,28 @@
|
|||||||
})
|
})
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
openpop.value = false
|
openpop.value = false
|
||||||
|
drawer.value = false
|
||||||
getyys()
|
getyys()
|
||||||
},600)
|
},600)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//计算费用
|
||||||
|
function feiyong(orderNo:string){
|
||||||
|
jsfeiy(orderNo).then(() => {
|
||||||
|
queryParams.orderNo = orderNo
|
||||||
|
getjqrlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
xqobj.value = (rps.data as any).records[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
gethdbz(orderNo).then((rps:any) => {
|
||||||
|
hdbz.value = rps.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//取消
|
//取消
|
||||||
function cancel() {
|
function cancel() {
|
||||||
@ -694,6 +976,18 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//详情 修改
|
||||||
|
let drawer = ref(false)
|
||||||
|
let hdbz = ref<any[]>([])
|
||||||
|
let xqobj = ref<any>({})
|
||||||
|
function getdetails(n:any) {
|
||||||
|
xqobj.value = n
|
||||||
|
drawer.value = true
|
||||||
|
gethdbz(n.orderNo).then((rps:any) => {
|
||||||
|
hdbz.value = rps.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
getyys()
|
getyys()
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@ -36,13 +36,15 @@
|
|||||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.batCode}}</div>
|
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.batCode}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="电池型号编码" min-width="150" align="center" prop="typeCode" :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="150" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||||
|
<!-- <el-table-column label="电池型号编码" min-width="150" align="center" prop="typeCode" :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.status == 1">站</div>
|
<div v-if="scope.row.status == 1">站</div>
|
||||||
<div v-else-if="scope.row.status == 2">车</div>
|
<div v-else-if="scope.row.status == 2">车</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="状态" min-width="80" align="center" prop="status" :show-overflow-tooltip="true">
|
<el-table-column label="状态" min-width="80" 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">出租中</div>
|
||||||
@ -56,12 +58,14 @@
|
|||||||
<el-table-column label="生产日期" min-width="110" align="center" prop="productionDate" :show-overflow-tooltip="true" />
|
<el-table-column label="生产日期" min-width="110" align="center" prop="productionDate" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="注册时间" min-width="110" align="center" prop="registrationDate" :show-overflow-tooltip="true" />
|
<el-table-column label="注册时间" min-width="110" align="center" prop="registrationDate" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
<el-table-column label="站码或车牌照" min-width="110" align="center" prop="sourceCode" :show-overflow-tooltip="true" />
|
<!-- <el-table-column label="站码或车牌照" min-width="110" align="center" prop="sourceCode" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column v-if="zjtype == 1" label="换电站编码" min-width="130" align="center" prop="stationCode" :show-overflow-tooltip="true" />
|
|
||||||
|
<el-table-column v-if="zjtype == 1" label="换电站" min-width="130" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||||
|
<!-- <el-table-column v-if="zjtype == 1" label="换电站编码" min-width="130" align="center" prop="stationCode" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column label="当前电量" min-width="80" align="center" prop="soc" :show-overflow-tooltip="true" />
|
<el-table-column label="当前电量" min-width="80" align="center" prop="soc" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
<el-table-column label="操作" align="center" width="160" 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="Tickets" @click="zhuixpop(scope.row.batCode)">追溯</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>
|
||||||
@ -95,8 +99,10 @@
|
|||||||
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="130px">
|
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="130px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="电池型号编码" prop="typeCode">
|
<el-form-item label="电池型号" prop="typeCode">
|
||||||
<el-input v-model="addata.typeCode" placeholder="请输入电池型号编码" clearable />
|
<el-select v-model="addata.typeCode" @change="dchand" placeholder="请选择电池型号">
|
||||||
|
<el-option @click.native="getdcname(n.typeName)" v-for="n in dctypelist" :label="n.typeName" :value="n.typeCode" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -146,7 +152,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24" v-if="addata.sourceFrom == '2'">
|
||||||
<el-form-item label="站码或车牌照" prop="sourceCode">
|
<el-form-item label="站码或车牌照" prop="sourceCode">
|
||||||
<el-input v-model="addata.sourceCode" placeholder="请输入站码或车牌照" clearable />
|
<el-input v-model="addata.sourceCode" placeholder="请输入站码或车牌照" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -154,7 +160,7 @@
|
|||||||
<el-col v-if="zjtype == 1" :span="24">
|
<el-col v-if="zjtype == 1" :span="24">
|
||||||
<el-form-item label="换电站" prop="stationCode">
|
<el-form-item label="换电站" prop="stationCode">
|
||||||
<el-select v-model="addata.stationCode" placeholder="请选择换电站">
|
<el-select v-model="addata.stationCode" placeholder="请选择换电站">
|
||||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
<el-option @click.native="gethdzname(n.name)" v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -172,6 +178,93 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--电池追溯-->
|
||||||
|
<el-drawer
|
||||||
|
v-model="zspop"
|
||||||
|
:with-header="false"
|
||||||
|
size="600"
|
||||||
|
>
|
||||||
|
<div>电池轨迹</div>
|
||||||
|
<div style="height: 500px;padding: 20px;overflow-y:auto;">
|
||||||
|
<el-steps direction="vertical" :active="gjlist.length">
|
||||||
|
<el-step v-for="n in gjlist" :title="`${n.pointName}----${n.beginTime}`" />
|
||||||
|
</el-steps>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<el-button type="primary" @click="zhuishand">添加追溯</el-button>
|
||||||
|
<el-button @click="zspop = false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
<!-- 添加电池追溯 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="dczspop"
|
||||||
|
title="添加电池追溯"
|
||||||
|
width="600px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form ref="dczsRef" :model="addzsdata" :rules="zsrules" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="电池编码" prop="batCode">
|
||||||
|
<el-input v-model="addzsdata.batCode" placeholder="请输入电池编码" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="轨迹点类型" prop="pointType">
|
||||||
|
<el-radio-group v-model="addzsdata.pointType">
|
||||||
|
<el-radio value="1">站</el-radio>
|
||||||
|
<el-radio value="2">车</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="addzsdata.pointType == '1'" :span="24">
|
||||||
|
<el-form-item label="换电站" prop="pointCode">
|
||||||
|
<el-select v-model="addzsdata.pointCode" placeholder="请选择换电站">
|
||||||
|
<el-option @click.native="getgjdname(n.name)" v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-else :span="24">
|
||||||
|
<el-form-item label="车牌照" prop="pointCode">
|
||||||
|
<el-input v-model="addzsdata.pointCode" placeholder="请输入车牌照" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="开始时间" prop="beginTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addzsdata.beginTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="addzsdata.endTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="请选择日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="adddczs">确 定</el-button>
|
||||||
|
<el-button @click="dczspop = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts" name="UserPage">
|
||||||
@ -183,8 +276,14 @@
|
|||||||
getjqrlist,
|
getjqrlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
update,
|
update,
|
||||||
delhdz
|
delhdz,
|
||||||
|
getzhuis,
|
||||||
|
addzhuis
|
||||||
} from '@/api/swapstation/battery'
|
} from '@/api/swapstation/battery'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getdicttype
|
||||||
|
} from '@/api/systemSet/modelno'
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
// } from '@/api/systemSet/dict'
|
// } from '@/api/systemSet/dict'
|
||||||
@ -219,6 +318,21 @@
|
|||||||
getyys()
|
getyys()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//初始查询电池型号
|
||||||
|
let dctypelist = ref<any[]>([])
|
||||||
|
getdicttype({
|
||||||
|
pageSize:50, //每页条数
|
||||||
|
pageNo:1
|
||||||
|
}).then(rps => {
|
||||||
|
dctypelist.value = (rps.data as any).records
|
||||||
|
})
|
||||||
|
|
||||||
|
function dchand(v:any) {
|
||||||
|
console.log(v)
|
||||||
|
}
|
||||||
|
|
||||||
//初始查询换电站
|
//初始查询换电站
|
||||||
let yunList = ref<any>([])
|
let yunList = ref<any>([])
|
||||||
if(props.zjtype == 1){
|
if(props.zjtype == 1){
|
||||||
@ -283,6 +397,7 @@
|
|||||||
let slecas = ref('')
|
let slecas = ref('')
|
||||||
let addata = reactive({
|
let addata = reactive({
|
||||||
typeCode:'', //电池型号编码
|
typeCode:'', //电池型号编码
|
||||||
|
typeName:'', //电池型号名称
|
||||||
batCode:'', //电池编码
|
batCode:'', //电池编码
|
||||||
sourceFrom:'', //初始来源:1-站,2-车
|
sourceFrom:'', //初始来源:1-站,2-车
|
||||||
status:'', //状态:1-出租中,2-充电中,3-充电完毕,4-故障,5-其它
|
status:'', //状态:1-出租中,2-充电中,3-充电完毕,4-故障,5-其它
|
||||||
@ -291,8 +406,18 @@
|
|||||||
registrationDate:'', //注册时间
|
registrationDate:'', //注册时间
|
||||||
sourceCode:'', //站码或车牌照
|
sourceCode:'', //站码或车牌照
|
||||||
stationCode:'', //换电站编码
|
stationCode:'', //换电站编码
|
||||||
|
stationName:'', //换电站名称
|
||||||
soc:'' //当前电量
|
soc:'' //当前电量
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function getdcname(n:string) {
|
||||||
|
addata.typeName = n
|
||||||
|
}
|
||||||
|
|
||||||
|
function gethdzname(n:string) {
|
||||||
|
addata.stationName = n
|
||||||
|
}
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
typeCode:[
|
typeCode:[
|
||||||
{ required: true, message: "请输入电池型号编码", trigger: "blur" }
|
{ required: true, message: "请输入电池型号编码", trigger: "blur" }
|
||||||
@ -350,7 +475,11 @@
|
|||||||
//保存
|
//保存
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
yysRef.value?.validate((valid:Boolean) => {
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if(addata.sourceFrom == '1'){
|
||||||
|
addata.sourceCode = addata.stationCode
|
||||||
|
}
|
||||||
savehand().then(() => {
|
savehand().then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@ -392,6 +521,73 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//追溯
|
||||||
|
let zspop = ref(false)
|
||||||
|
let dccode = ref('')
|
||||||
|
let gjlist = ref<any[]>([])
|
||||||
|
function zhuixpop(code:string) {
|
||||||
|
dccode.value = code
|
||||||
|
getzhuis(dccode.value).then(rps => {
|
||||||
|
gjlist.value = rps.data as any
|
||||||
|
})
|
||||||
|
zspop.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加追溯
|
||||||
|
let dczspop = ref(false)
|
||||||
|
let addzsdata = reactive({
|
||||||
|
batCode:'', //电池编码
|
||||||
|
pointType:'1', //轨迹点类型:1-电站,2-车辆
|
||||||
|
beginTime:'', //开始时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
|
pointCode:'', //轨迹点编码
|
||||||
|
pointName:'', //轨迹点名称
|
||||||
|
endTime:'' //结束时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||||
|
})
|
||||||
|
|
||||||
|
const zsrules = ref({
|
||||||
|
batCode:[
|
||||||
|
{ required: true, message: "请输入电池编码", trigger: "blur" }
|
||||||
|
],
|
||||||
|
pointType:[
|
||||||
|
{ required: true, message: "请选择类型", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
pointCode:[
|
||||||
|
{ required: true, message: "请选择轨迹点", trigger: "blur" }
|
||||||
|
],
|
||||||
|
beginTime:[
|
||||||
|
{ required: true, message: "请选择开始时间", trigger: "blur" }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
let dczsRef = ref()
|
||||||
|
|
||||||
|
function zhuishand() {
|
||||||
|
dczsRef.value?.resetFields()
|
||||||
|
dczspop.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function adddczs() {
|
||||||
|
|
||||||
|
dczsRef.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
addzhuis(addzsdata).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '添加成功'
|
||||||
|
})
|
||||||
|
getzhuis(dccode.value).then(rps => {
|
||||||
|
gjlist.value = rps.data as any
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getgjdname(name:string) {
|
||||||
|
addzsdata.pointName = name
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-divider--horizontal{
|
.el-divider--horizontal{
|
||||||
|
|||||||
@ -143,7 +143,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts">
|
||||||
import {
|
import {
|
||||||
gethdzlist
|
gethdzlist
|
||||||
} from '@/api/swapstation/hdz'
|
} from '@/api/swapstation/hdz'
|
||||||
|
|||||||
@ -124,7 +124,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts">
|
||||||
import {
|
import {
|
||||||
getmxlist,
|
getmxlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
|
|||||||
@ -186,6 +186,33 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="每公里收费" prop="eachKmFee">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.eachKmFee"
|
||||||
|
placeholder="请输入每公里收费"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<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="12">
|
||||||
|
<el-form-item label="每度电收费" prop="eachKwhFee">
|
||||||
|
<el-input
|
||||||
|
v-model="addata.eachKwhFee"
|
||||||
|
placeholder="请输入每度电收费"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -435,7 +462,10 @@
|
|||||||
moreRemainSoc:'', //换电时电量剩余过多的soc界定
|
moreRemainSoc:'', //换电时电量剩余过多的soc界定
|
||||||
moreRemainFee:'', //换电时电量剩余过多的服务费
|
moreRemainFee:'', //换电时电量剩余过多的服务费
|
||||||
fewRemainSoc:'', //换电时电量剩余一般的soc界定
|
fewRemainSoc:'', //换电时电量剩余一般的soc界定
|
||||||
fewRemainFee:'' //换电时电量剩余一般的服务费
|
fewRemainFee:'', //换电时电量剩余一般的服务费
|
||||||
|
eachKmFee:'', //每公里收费
|
||||||
|
eachSocFee:'', //每SOC收费
|
||||||
|
eachKwhFee:'' //每度电收费
|
||||||
})
|
})
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
@ -486,6 +516,10 @@
|
|||||||
addata.fewRemainSoc = row.fewRemainSoc
|
addata.fewRemainSoc = row.fewRemainSoc
|
||||||
addata.fewRemainFee = row.fewRemainFee
|
addata.fewRemainFee = row.fewRemainFee
|
||||||
|
|
||||||
|
addata.eachKmFee = row.eachKmFee
|
||||||
|
addata.eachSocFee = row.eachSocFee
|
||||||
|
addata.eachKwhFee = row.eachKwhFee
|
||||||
|
|
||||||
standardId.value = row.pkId
|
standardId.value = row.pkId
|
||||||
bzName.value = row.name
|
bzName.value = row.name
|
||||||
stationName.value = row.stationName
|
stationName.value = row.stationName
|
||||||
@ -504,6 +538,9 @@
|
|||||||
addata.moreRemainFee = ''
|
addata.moreRemainFee = ''
|
||||||
addata.fewRemainSoc = ''
|
addata.fewRemainSoc = ''
|
||||||
addata.fewRemainFee = ''
|
addata.fewRemainFee = ''
|
||||||
|
addata.eachKmFee = ''
|
||||||
|
addata.eachSocFee = ''
|
||||||
|
addata.eachKwhFee = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function savehand() {
|
function savehand() {
|
||||||
|
|||||||
@ -180,6 +180,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="支持车辆类型" prop="carTypeCode">
|
||||||
|
<el-select multiple v-model="addata.carTypeCode" 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-col :span="12">
|
||||||
<el-form-item label="区划" prop="division">
|
<el-form-item label="区划" prop="division">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
@ -329,12 +336,12 @@
|
|||||||
:with-header="false"
|
:with-header="false"
|
||||||
size="88%"
|
size="88%"
|
||||||
>
|
>
|
||||||
<tit @close="handleClose" :name="addata.name" />
|
<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="7">
|
||||||
<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="100px">
|
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="110px">
|
||||||
<el-row style="padding:20px">
|
<el-row style="padding:20px">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="运营商" prop="proxyId">
|
<el-form-item label="运营商" prop="proxyId">
|
||||||
@ -375,6 +382,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="支持车辆类型" prop="carTypeCode">
|
||||||
|
<el-select multiple v-model="addata.carTypeCode" placeholder="请选择车辆类型">
|
||||||
|
<el-option v-for="n in cartypelist" :label="n.typeName" :value="n.typeCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -457,7 +471,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="14">
|
||||||
<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>
|
||||||
@ -465,7 +479,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="10">
|
||||||
<el-form-item label="通道数" prop="tdQuantity">
|
<el-form-item label="通道数" prop="tdQuantity">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="addata.tdQuantity"
|
v-model="addata.tdQuantity"
|
||||||
@ -517,7 +531,6 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<div style="margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
<div style="margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
||||||
@ -582,7 +595,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts">
|
||||||
import {
|
import {
|
||||||
gethdzlist,
|
gethdzlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
@ -596,8 +609,11 @@
|
|||||||
getArea
|
getArea
|
||||||
} from '@/api/common'
|
} from '@/api/common'
|
||||||
import {
|
import {
|
||||||
getdict
|
getdict
|
||||||
} from '@/api/systemSet/dict'
|
} from '@/api/systemSet/dict'
|
||||||
|
import {
|
||||||
|
getdicttype
|
||||||
|
} from '@/api/systemSet/cartype'
|
||||||
import { ref,reactive,watch } from 'vue'
|
import { ref,reactive,watch } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Robot from '../robot/index.vue'
|
import Robot from '../robot/index.vue'
|
||||||
@ -650,6 +666,15 @@
|
|||||||
hdztype.value = rps.data
|
hdztype.value = rps.data
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//车辆类型
|
||||||
|
let cartypelist = ref<any[]>([])
|
||||||
|
getdicttype({
|
||||||
|
pageSize:50, //每页条数
|
||||||
|
pageNo:1
|
||||||
|
}).then(rps => {
|
||||||
|
cartypelist.value = (rps.data as any).records
|
||||||
|
})
|
||||||
|
|
||||||
//换电站状态
|
//换电站状态
|
||||||
let hdzsta = ref<any>([])
|
let hdzsta = ref<any>([])
|
||||||
getdict({
|
getdict({
|
||||||
@ -720,7 +745,8 @@
|
|||||||
jqrQuantity:'', //机器人数量
|
jqrQuantity:'', //机器人数量
|
||||||
cdjQuantity:'', //充电机数量
|
cdjQuantity:'', //充电机数量
|
||||||
dccQuantity:'', //电池仓数量
|
dccQuantity:'', //电池仓数量
|
||||||
dcQuantity:'' //电池数量
|
dcQuantity:'', //电池数量
|
||||||
|
carTypeCode:'' //服务车辆类型
|
||||||
})
|
})
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
proxyId:[
|
proxyId:[
|
||||||
@ -733,7 +759,13 @@
|
|||||||
{ required: true, message: "请输入站点编码", trigger: "blur" },
|
{ required: true, message: "请输入站点编码", trigger: "blur" },
|
||||||
],
|
],
|
||||||
status:[
|
status:[
|
||||||
{ required: true, message: "请输选择状态", trigger: "blur" },
|
{ required: true, message: "请选择状态", trigger: "blur" },
|
||||||
|
],
|
||||||
|
type:[
|
||||||
|
{ required: true, message: "请选择换电站类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
carTypeCode:[
|
||||||
|
{ required: true, message: "请选择支持的车辆类型", trigger: "blur" },
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -774,7 +806,7 @@
|
|||||||
addata.name = row.name
|
addata.name = row.name
|
||||||
addata.code = row.code
|
addata.code = row.code
|
||||||
addata.status = row.status+''
|
addata.status = row.status+''
|
||||||
addata.type = row.type+''
|
addata.type = row.type?row.type+'':''
|
||||||
addata.division = row.division
|
addata.division = row.division
|
||||||
addata.divisionNo = row.divisionNo
|
addata.divisionNo = row.divisionNo
|
||||||
addata.address = row.address
|
addata.address = row.address
|
||||||
@ -787,6 +819,7 @@
|
|||||||
//addata.delFlag = row.delFlag
|
//addata.delFlag = row.delFlag
|
||||||
addata.activeDate = row.activeDate
|
addata.activeDate = row.activeDate
|
||||||
addata.locationPoint = row.locationPoint
|
addata.locationPoint = row.locationPoint
|
||||||
|
addata.carTypeCode = row.carTypeCode?row.carTypeCode.split(','):''
|
||||||
if(addata.locationPoint){
|
if(addata.locationPoint){
|
||||||
let latlng = addata.locationPoint.split(',')
|
let latlng = addata.locationPoint.split(',')
|
||||||
lat.value = latlng[0]
|
lat.value = latlng[0]
|
||||||
@ -833,6 +866,7 @@
|
|||||||
addata.cdjQuantity = ''
|
addata.cdjQuantity = ''
|
||||||
addata.dccQuantity = ''
|
addata.dccQuantity = ''
|
||||||
addata.dcQuantity = ''
|
addata.dcQuantity = ''
|
||||||
|
addata.carTypeCode = ''
|
||||||
|
|
||||||
lat.value = ''
|
lat.value = ''
|
||||||
lng.value = ''
|
lng.value = ''
|
||||||
@ -855,8 +889,10 @@
|
|||||||
|
|
||||||
//保存
|
//保存
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
|
|
||||||
yysRef.value?.validate((valid:Boolean) => {
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
addata.carTypeCode = (addata.carTypeCode as any).join()
|
||||||
savehand().then(() => {
|
savehand().then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
<el-table-column prop="mark" min-width="200" align="center" label="描述" :show-overflow-tooltip="true" />
|
<el-table-column prop="mark" min-width="200" align="center" label="描述" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Document" @click="showzdv(scope.row.pkId)">查看</el-button>
|
<el-button link type="primary" icon="Document" @click="showzdv(scope.row)">查看</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="showtypepop(2,scope.row)">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="showtypepop(2,scope.row)">修改</el-button>
|
||||||
<el-button link type="danger" icon="Delete" @click="deletezid(scope.row)">删除</el-button>
|
<el-button link type="danger" icon="Delete" @click="deletezid(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -313,6 +313,7 @@
|
|||||||
|
|
||||||
let zidform = reactive({
|
let zidform = reactive({
|
||||||
typeId:'', //类型ID
|
typeId:'', //类型ID
|
||||||
|
typeCode:'', //类型code
|
||||||
dictName:'', //字典名称
|
dictName:'', //字典名称
|
||||||
dictCode:'', //字典编码
|
dictCode:'', //字典编码
|
||||||
dictValue:'', //字典值
|
dictValue:'', //字典值
|
||||||
@ -332,12 +333,14 @@
|
|||||||
}
|
}
|
||||||
if(row){
|
if(row){
|
||||||
zidform.typeId = row.typeId
|
zidform.typeId = row.typeId
|
||||||
|
zidform.typeCode = row.typeCode
|
||||||
zidform.dictName = row.dictName
|
zidform.dictName = row.dictName
|
||||||
zidform.dictCode = row.dictCode
|
zidform.dictCode = row.dictCode
|
||||||
zidform.dictValue = row.dictValue
|
zidform.dictValue = row.dictValue
|
||||||
zidform.sort = row.sort
|
zidform.sort = row.sort
|
||||||
}else{
|
}else{
|
||||||
zidform.typeId = typeId.value
|
zidform.typeId = typeId.value
|
||||||
|
zidform.typeCode =
|
||||||
zidform.dictName = ''
|
zidform.dictName = ''
|
||||||
zidform.dictCode = ''
|
zidform.dictCode = ''
|
||||||
zidform.dictValue = ''
|
zidform.dictValue = ''
|
||||||
@ -380,8 +383,10 @@
|
|||||||
let drawer = ref(false)
|
let drawer = ref(false)
|
||||||
let valist = ref<any[]>([])
|
let valist = ref<any[]>([])
|
||||||
let typeId = ref('')
|
let typeId = ref('')
|
||||||
function showzdv(id?:string) {
|
let typecode = ref('')
|
||||||
typeId.value = id as string
|
function showzdv(n:any) {
|
||||||
|
typeId.value = n.pkId
|
||||||
|
typecode.value = n.typecode
|
||||||
valist.value.splice(0) //??
|
valist.value.splice(0) //??
|
||||||
drawer.value = true
|
drawer.value = true
|
||||||
getdict({
|
getdict({
|
||||||
@ -406,7 +411,12 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
message: '删除成功'
|
message: '删除成功'
|
||||||
})
|
})
|
||||||
showzdv(typeId.value)
|
valist.value.splice(0) //??
|
||||||
|
getdict({
|
||||||
|
typeId:typeId.value
|
||||||
|
}).then(rps => {
|
||||||
|
valist.value = rps.data as any
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|||||||
@ -36,9 +36,9 @@
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
max-height="600px"
|
max-height="600px"
|
||||||
>
|
>
|
||||||
<el-table-column label="型号名称" align="center" prop="typeName" />
|
<el-table-column label="型号名称" min-width="100" align="center" prop="typeName" />
|
||||||
<el-table-column label="类型编码" align="center" prop="typeCode" />
|
<el-table-column label="类型编码" min-width="100" align="center" prop="typeCode" />
|
||||||
<el-table-column label="电芯厂商" align="center" prop="batteryCellManuafactory" />
|
<el-table-column label="电芯厂商" min-width="180" align="center" prop="batteryCellManuafactory" />
|
||||||
<el-table-column label="电池材料" align="center" prop="material">
|
<el-table-column label="电池材料" align="center" prop="material">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.material == 1">三元铁锂</div>
|
<div v-if="scope.row.material == 1">三元铁锂</div>
|
||||||
|
|||||||
371
src/views/system/xcximg/index.vue
Normal file
371
src/views/system/xcximg/index.vue
Normal file
@ -0,0 +1,371 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
|
<el-form ref="queryRef" :model="queryParams" :inline="true">
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="图片类型">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择协议类型" clearable style="width: 200px">
|
||||||
|
<el-option :key="1" label="logo" :value="1" />
|
||||||
|
<el-option :key="2" label="轮播图" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable style="width: 200px">
|
||||||
|
<el-option :key="1" label="可用" :value="1" />
|
||||||
|
<el-option :key="2" label="不可用" :value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="app-container" style="margin-bottom: 20px;border-radius: 10px;">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="showpop(1)"
|
||||||
|
>新增</el-button>
|
||||||
|
<el-table
|
||||||
|
:data="dictlist"
|
||||||
|
style="width: 100%;margin-top: 10px;"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
row-key="id"
|
||||||
|
max-height="600px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-table-column min-width="100" label="图片类型" align="center" prop="type">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{ scope.row.type == 1?'logo':'轮播图'}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="60" label="图片" align="center" prop="picUrl">
|
||||||
|
<template #default="scope">
|
||||||
|
<img :src="scope.row.picUrl" style="width: 50px;height: 50px;" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column min-width="150" label="链接" align="center" prop="outLinks" />
|
||||||
|
<el-table-column min-width="150" label="状态" align="center" prop="type">
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{ scope.row.status == 1?'可用':'不可用'}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
<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-column label="创建时间" align="center" width="160" prop="createTime">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||||
|
</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="querytype"
|
||||||
|
/>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--:row-style="{background: '#cde0f3'}"-->
|
||||||
|
|
||||||
|
<!--添加字典类型-->
|
||||||
|
<el-dialog
|
||||||
|
v-model="popshow"
|
||||||
|
:title="poptit"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
align-center
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-form ref="typeform" :model="addObj" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="小程序" prop="appid">
|
||||||
|
<el-select v-model="addObj.appid" placeholder="请选择协议类型" style="width: 100%">
|
||||||
|
<el-option v-for="(n,i) in yxtype" :key="i" :label="n.dictName" :value="n.dictValue" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图片类型" prop="type">
|
||||||
|
<el-select v-model="addObj.type" placeholder="请选择图片类型" style="width: 100%">
|
||||||
|
<el-option :key="1" label="logo" value="1" />
|
||||||
|
<el-option :key="2" label="轮播图" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="图片" prop="picUrl">
|
||||||
|
<el-upload
|
||||||
|
:headers="{
|
||||||
|
Authorization:Token
|
||||||
|
}"
|
||||||
|
:data="{useFor:1}"
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleSuc"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
>
|
||||||
|
<img v-if="addObj.picUrl" :src="addObj.picUrl" class="avatar" />
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
<!-- <el-input v-model="addObj.picUrl" placeholder="请选择图片" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input v-model="addObj.name" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input v-model="addObj.sort" placeholder="请输入排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="链接" prop="outLinks">
|
||||||
|
<el-input v-model="addObj.outLinks" placeholder="请输入链接" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-select v-model="addObj.status" placeholder="请选择协议类型" style="width: 100%">
|
||||||
|
<el-option :key="1" label="可用" value="1" />
|
||||||
|
<el-option :key="2" label="不可用" value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="save">确 定</el-button>
|
||||||
|
<el-button @click="canceltype">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {
|
||||||
|
getdicttype,
|
||||||
|
adddicttype,
|
||||||
|
update,
|
||||||
|
deltype
|
||||||
|
} from '@/api/systemSet/xcximg'
|
||||||
|
import { ref,reactive} from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { showLoading,hideLoading } from '@/utils/loading'
|
||||||
|
import { getdict } from '@/api/systemSet/dict'
|
||||||
|
|
||||||
|
import type { UploadProps } from 'element-plus'
|
||||||
|
import { getToken } from "@/utils/auth";
|
||||||
|
|
||||||
|
const Token = `Bearer ${getToken()}`
|
||||||
|
|
||||||
|
const uploadUrl = `${import.meta.env.VITE_APP_BASE_API}/resource/file/img/upload`
|
||||||
|
//图片上传限制
|
||||||
|
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
||||||
|
if (rawFile.type !== 'image/jpeg') {
|
||||||
|
ElMessage.error('请上传jpg图片')
|
||||||
|
return false
|
||||||
|
} else if (rawFile.size / 1024 / 1024 > 2) {
|
||||||
|
ElMessage.error('上传图片大小不能超过2MB')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
//图片上传成功回调
|
||||||
|
const handleSuc: UploadProps['onSuccess'] = (
|
||||||
|
response,
|
||||||
|
uploadFile
|
||||||
|
) => {
|
||||||
|
if(response.code == 1000){
|
||||||
|
addObj.picUrl = response.msg
|
||||||
|
}
|
||||||
|
//addObj.picUrl = URL.createObjectURL(uploadFile.raw!)
|
||||||
|
console.log(uploadFile)
|
||||||
|
}
|
||||||
|
let yxtype = ref<any>([])
|
||||||
|
getdict({
|
||||||
|
typeCode:'wxxcx'
|
||||||
|
}).then(rps => {
|
||||||
|
yxtype.value = rps.data
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let queryParams = reactive({
|
||||||
|
appid:'',
|
||||||
|
type:'', //类型:1-logo,2-轮播图
|
||||||
|
status:'' //状态:1-可用,0-不可用
|
||||||
|
})
|
||||||
|
|
||||||
|
let dictlist = ref<any>([])
|
||||||
|
function querytype() {
|
||||||
|
dictlist.value.splice(0)
|
||||||
|
getdicttype(queryParams).then(rps => {
|
||||||
|
dictlist.value = rps.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
let queryRef = ref()
|
||||||
|
function resetQuery() {
|
||||||
|
queryRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
function search() {
|
||||||
|
querytype()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSizeChange(val:number) {
|
||||||
|
querytype()
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增、修改
|
||||||
|
let cztype = ref(1)
|
||||||
|
let typeform = ref()
|
||||||
|
let popshow = ref(false)
|
||||||
|
let poptit = ref('添加协议')
|
||||||
|
let addObj = reactive({
|
||||||
|
appid:'',
|
||||||
|
type:'', //类型:1-logo,2-轮播图
|
||||||
|
status:'1', //状态:1-可用,0-不可用
|
||||||
|
pkId:'',
|
||||||
|
name:'', //名称
|
||||||
|
picUrl:'', //图片地址
|
||||||
|
sort:'', //排序
|
||||||
|
linkFlag:'', //链接标识
|
||||||
|
outLinks:'' //外链地址
|
||||||
|
})
|
||||||
|
const rules = {
|
||||||
|
appid: [
|
||||||
|
{ required: true, message: "请选择小程序", trigger: "blur" },
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: "请选择图片类型", trigger: "blur" },
|
||||||
|
],
|
||||||
|
picUrl:[
|
||||||
|
{ required: true, message: "请上传图片", trigger: "blur" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
function caoztype(obj:any) {
|
||||||
|
if(cztype.value == 1){
|
||||||
|
return adddicttype(obj)
|
||||||
|
}
|
||||||
|
return update(obj)
|
||||||
|
}
|
||||||
|
|
||||||
|
function showpop(type:number,row?:any) {
|
||||||
|
cztype.value = type
|
||||||
|
popshow.value = true
|
||||||
|
poptit.value = type == 1?'添加图片':'修改图片'
|
||||||
|
typeform.value?.resetFields()
|
||||||
|
if(row){
|
||||||
|
addObj.pkId = row.pkId
|
||||||
|
addObj.appid = row.appid
|
||||||
|
addObj.type = row.type+''
|
||||||
|
|
||||||
|
addObj.status = row.status +''
|
||||||
|
addObj.name = row.name
|
||||||
|
addObj.picUrl = row.picUrl
|
||||||
|
addObj.sort = row.sort
|
||||||
|
addObj.linkFlag = row.linkFlag
|
||||||
|
addObj.outLinks = row.outLinks
|
||||||
|
}else{
|
||||||
|
addObj.pkId = ''
|
||||||
|
addObj.appid = ''
|
||||||
|
addObj.type = ''
|
||||||
|
addObj.status = '1'
|
||||||
|
addObj.name = ''
|
||||||
|
addObj.picUrl = ''
|
||||||
|
addObj.sort = ''
|
||||||
|
addObj.linkFlag = ''
|
||||||
|
addObj.outLinks = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
function save() {
|
||||||
|
typeform.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
showLoading()
|
||||||
|
caoztype(addObj).then(() => {
|
||||||
|
hideLoading()
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: cztype.value == 1?'添加成功':'修改成功'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
popshow.value = false
|
||||||
|
search()
|
||||||
|
},1000)
|
||||||
|
}).catch(() => {
|
||||||
|
hideLoading()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function handleDelete(row:any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`确定删除图片?`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
deltype(row.pkId).then(rps => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
|
querytype()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function canceltype() {
|
||||||
|
popshow.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
querytype()
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.avatar-uploader .avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.avatar-uploader .el-upload {
|
||||||
|
border: 1px dashed var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-uploader .el-upload:hover {
|
||||||
|
border-color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon.avatar-uploader-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -72,8 +72,8 @@
|
|||||||
<el-table-column label="引擎号" min-width="150" align="center" prop="engineNo" :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="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.ownerType == 1">电量</div>
|
<div v-if="scope.row.usageType == 1">电量</div>
|
||||||
<div v-else-if="scope.row.ownerType == 2">里程</div>
|
<div v-else-if="scope.row.usageType == 2">里程</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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" />
|
||||||
@ -87,9 +87,10 @@
|
|||||||
<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="130" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作" align="center" min-width="100" fixed="right">
|
<el-table-column label="操作" align="center" min-width="300" 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="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="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>
|
||||||
@ -150,7 +151,17 @@
|
|||||||
<template v-if="addata.ownerType == '2'">
|
<template v-if="addata.ownerType == '2'">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="公司名称" prop="cname">
|
<el-form-item label="公司名称" prop="cname">
|
||||||
<el-input v-model="addata.cname" maxlength="30" placeholder="请输入公司名称" clearable />
|
<!-- <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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -275,22 +286,105 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--绑定公司-->
|
||||||
|
<el-dialog
|
||||||
|
v-model="bdgspop"
|
||||||
|
title="绑定公司"
|
||||||
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="gsList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="800px"
|
||||||
|
ref="taskTableRef"
|
||||||
|
@select="selectClick"
|
||||||
|
:header-cell-class-name="cellClass"
|
||||||
|
>
|
||||||
|
<template v-if="bdtype == 1">
|
||||||
|
<el-table-column type="selection" width="40" />
|
||||||
|
<!-- <el-table-column label="区划" width="200" align="center" prop="division" :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="ccode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="详细地址" min-width="300" align="center" prop="address" :show-overflow-tooltip="true" />
|
||||||
|
<!-- <el-table-column label="联系人" width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系电话" width="160" align="center" prop="phone" :show-overflow-tooltip="true" /> -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<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="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">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.ownerType == 1">男</div>
|
||||||
|
<div v-else-if="scope.row.ownerType == 2">女</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="账户类型" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.type == 1">个人</div>
|
||||||
|
<div v-else-if="scope.row.type == 2">公司</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<div v-if="gstotal > 10" style="display: flex;justify-content: right;padding-top:20px;">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="gsqueryParams.pageNo"
|
||||||
|
v-model:page-size="gsqueryParams.pageSize"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
background
|
||||||
|
size="small"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="gstotal"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="getsglist"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="savegs">确 定</el-button>
|
||||||
|
<el-button @click="cancelgs">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="UserPage">
|
<script setup lang="ts" name="UserPage">
|
||||||
import {
|
import {
|
||||||
getjqrlist,
|
getjqrlist,
|
||||||
addhdz,
|
addhdz,
|
||||||
update,
|
update,
|
||||||
delhdz
|
delhdz,
|
||||||
} from '@/api/swapstation/vehicle'
|
Binggs,
|
||||||
import {
|
Bingwx
|
||||||
getdicttype
|
} from '@/api/swapstation/vehicle'
|
||||||
} from '@/api/systemSet/cartype'
|
import {
|
||||||
import {
|
getdicttype
|
||||||
|
} from '@/api/systemSet/cartype'
|
||||||
|
import {
|
||||||
getArea
|
getArea
|
||||||
} from '@/api/common'
|
} from '@/api/common'
|
||||||
|
|
||||||
|
import {
|
||||||
|
getlist
|
||||||
|
} from '@/api/operation/company'
|
||||||
|
import {
|
||||||
|
getwxlist
|
||||||
|
} from '@/api/operation/wxuser'
|
||||||
|
|
||||||
import { carNum } from '@/utils/validate'
|
import { carNum } from '@/utils/validate'
|
||||||
// import {
|
// import {
|
||||||
// getdict
|
// getdict
|
||||||
@ -298,13 +392,22 @@
|
|||||||
import { ref,reactive,watch} from 'vue'
|
import { ref,reactive,watch} from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
//跳转到公司页面
|
||||||
|
let isgongs = ref(true)
|
||||||
|
const router = useRouter()
|
||||||
|
function tocompage() {
|
||||||
|
router.push('/vehicle/company')
|
||||||
|
}
|
||||||
|
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
pageSize:20, //每页条数
|
pageSize:20, //每页条数
|
||||||
pageNo:1, //页数
|
pageNo:1, //页数
|
||||||
typeCode:'', //型号编码
|
typeCode:'', //型号编码
|
||||||
vinNo:'', //车辆识别代码VIN号
|
vinNo:'', //车辆识别代码VIN号
|
||||||
frameworkNo:'', //车架号
|
frameworkNo:'', //车架号
|
||||||
ownerType:'', //车主类型:1-个人,2-企业
|
ownerType:'1', //车主类型:1-个人,2-企业
|
||||||
ownerId:'', //车主ID
|
ownerId:'', //车主ID
|
||||||
ownerName:'', //车主名称
|
ownerName:'', //车主名称
|
||||||
plateNum:'', //车牌号
|
plateNum:'', //车牌号
|
||||||
@ -359,6 +462,40 @@
|
|||||||
querform.value?.resetFields()
|
querform.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询公司
|
||||||
|
let state = ref('')
|
||||||
|
|
||||||
|
async function querySearchAsync (queryString: string, cb:any) {
|
||||||
|
getlist({
|
||||||
|
pageSize:100, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
cname:queryString
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.data && (res.data as any).records.length > 0) {
|
||||||
|
// mapList.value = res.data;
|
||||||
|
let listss = (res.data as any).records.map((n:any) => {
|
||||||
|
return {
|
||||||
|
value: n.cname,
|
||||||
|
code: n.ccode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
cb(listss)
|
||||||
|
//return listss
|
||||||
|
// callback(mapList.value);
|
||||||
|
}else{
|
||||||
|
cb([])
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
cb([])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//function handleSelect() {}
|
||||||
|
|
||||||
|
function handleSelect(v: any) {
|
||||||
|
addata.cname = v.value //公司名称
|
||||||
|
addata.ccode = v.code //组织机构代码
|
||||||
|
}
|
||||||
|
|
||||||
//新增、修改
|
//新增、修改
|
||||||
let type = ref(1)
|
let type = ref(1)
|
||||||
@ -432,9 +569,9 @@
|
|||||||
addata.frameworkNo = v.replace(/[^a-zA-Z0-9]/g,'')
|
addata.frameworkNo = v.replace(/[^a-zA-Z0-9]/g,'')
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => addata.ccode,v => {
|
// watch(() => addata.ccode,v => {
|
||||||
addata.ccode = v.replace(/[^A-Z0-9]/g,'')
|
// addata.ccode = v.replace(/[^A-Z0-9]/g,'')
|
||||||
})
|
// })
|
||||||
watch(() => addata.engineNo,v => {
|
watch(() => addata.engineNo,v => {
|
||||||
addata.engineNo = v.replace(/[^A-Z0-9]/g,'')
|
addata.engineNo = v.replace(/[^A-Z0-9]/g,'')
|
||||||
})
|
})
|
||||||
@ -457,7 +594,7 @@
|
|||||||
addata.typeCode = row.typeCode
|
addata.typeCode = row.typeCode
|
||||||
addata.vinNo = row.vinNo
|
addata.vinNo = row.vinNo
|
||||||
addata.frameworkNo = row.frameworkNo
|
addata.frameworkNo = row.frameworkNo
|
||||||
addata.ownerType = row.ownerType
|
addata.ownerType = row.ownerType+''
|
||||||
addata.ownerName = row.ownerName
|
addata.ownerName = row.ownerName
|
||||||
addata.plateNum = row.plateNum
|
addata.plateNum = row.plateNum
|
||||||
addata.engineNo = row.engineNo
|
addata.engineNo = row.engineNo
|
||||||
@ -475,12 +612,13 @@
|
|||||||
addata.totalMileage = row.totalMileage+''
|
addata.totalMileage = row.totalMileage+''
|
||||||
addata.phone = row.phone
|
addata.phone = row.phone
|
||||||
addata.cname = row.cname
|
addata.cname = row.cname
|
||||||
|
state.value = row.cname
|
||||||
addata.ccode = row.ccode
|
addata.ccode = row.ccode
|
||||||
}else{
|
}else{
|
||||||
addata.typeCode = ''
|
addata.typeCode = ''
|
||||||
addata.vinNo = ''
|
addata.vinNo = ''
|
||||||
addata.frameworkNo = ''
|
addata.frameworkNo = ''
|
||||||
addata.ownerType = ''
|
addata.ownerType = '1'
|
||||||
addata.ownerName = ''
|
addata.ownerName = ''
|
||||||
addata.plateNum = ''
|
addata.plateNum = ''
|
||||||
addata.engineNo = ''
|
addata.engineNo = ''
|
||||||
@ -499,6 +637,7 @@
|
|||||||
addata.phone = ''
|
addata.phone = ''
|
||||||
addata.cname = ''
|
addata.cname = ''
|
||||||
addata.ccode = ''
|
addata.ccode = ''
|
||||||
|
state.value = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function savehand() {
|
function savehand() {
|
||||||
@ -552,6 +691,128 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//绑定公司
|
||||||
|
//查询公司 个人
|
||||||
|
let bdtype = ref(1)
|
||||||
|
let bdgspop = ref(false)
|
||||||
|
let gsList = ref<any>([])
|
||||||
|
let gstotal = ref(0)
|
||||||
|
let bdgsobj = reactive({
|
||||||
|
plateNum:'', //车牌
|
||||||
|
ccode:'', //公司编码
|
||||||
|
cname:'' //公司名称
|
||||||
|
})
|
||||||
|
|
||||||
|
//微信用户
|
||||||
|
let wxobj = reactive({
|
||||||
|
ucode:'', //用户编码
|
||||||
|
uname:'', //用户名称
|
||||||
|
plateNum:'', //车牌号
|
||||||
|
ownerType:'', //车主类型:1-个人,2-企业
|
||||||
|
phone:'', //关联人手机号
|
||||||
|
openid:''
|
||||||
|
})
|
||||||
|
|
||||||
|
let gsqueryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1 //页数
|
||||||
|
})
|
||||||
|
function showbdgs(type:number,plateNum:string){
|
||||||
|
bdtype.value = type
|
||||||
|
bdgspop.value = true
|
||||||
|
|
||||||
|
if(bdtype.value == 1){
|
||||||
|
bdgsobj.ccode = ''
|
||||||
|
bdgsobj.cname = ''
|
||||||
|
bdgsobj.plateNum = plateNum
|
||||||
|
}else{
|
||||||
|
wxobj.plateNum = plateNum
|
||||||
|
wxobj.ucode = ''
|
||||||
|
wxobj.uname = ''
|
||||||
|
wxobj.ownerType = ''
|
||||||
|
wxobj.phone = ''
|
||||||
|
wxobj.openid = ''
|
||||||
|
}
|
||||||
|
getsglist()
|
||||||
|
}
|
||||||
|
|
||||||
|
function qslist() {
|
||||||
|
if(bdtype.value == 1){
|
||||||
|
return getlist(gsqueryParams)
|
||||||
|
}
|
||||||
|
return getwxlist(gsqueryParams)
|
||||||
|
}
|
||||||
|
|
||||||
|
function bingsave(){
|
||||||
|
if(bdtype.value == 1){
|
||||||
|
return Binggs(bdgsobj)
|
||||||
|
}
|
||||||
|
return Bingwx(wxobj)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsglist() {
|
||||||
|
gsList.value.splice(0)
|
||||||
|
qslist().then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
gsList.value = (rps.data as any).records
|
||||||
|
gstotal.value = (rps.data as any).total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function sizeChange(val:number) {
|
||||||
|
gsqueryParams.pageSize = val
|
||||||
|
getsglist()
|
||||||
|
}
|
||||||
|
|
||||||
|
function savegs(){
|
||||||
|
if((bdtype.value == 1 && bdgsobj.ccode) ||(bdtype.value == 2 && wxobj.ucode)){
|
||||||
|
bingsave().then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '绑定成功'
|
||||||
|
})
|
||||||
|
bdgspop.value = false
|
||||||
|
getyys()
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: `请选择${bdtype.value == 1?'公司':'微信用户'}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cancelgs(){
|
||||||
|
bdgspop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//设置单选
|
||||||
|
const taskTableRef = ref()
|
||||||
|
const selectClick = (selection: any, row: any) => {
|
||||||
|
if(selection.length > 1) {
|
||||||
|
let del_row = selection.shift();
|
||||||
|
taskTableRef.value.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中);第二个参数为true时又变成了多选
|
||||||
|
}
|
||||||
|
if(bdtype.value == 1){
|
||||||
|
bdgsobj.ccode = selection[0].ccode
|
||||||
|
bdgsobj.cname = selection[0].cname
|
||||||
|
}else{
|
||||||
|
wxobj.ucode = selection[0].wuid
|
||||||
|
wxobj.uname = selection[0].name
|
||||||
|
wxobj.ownerType = selection[0].type
|
||||||
|
wxobj.phone = selection[0].phoneNumber
|
||||||
|
wxobj.openid = selection[0].openid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cellClass(row: any) {
|
||||||
|
// 隐藏多选框一列的表头即全选框
|
||||||
|
if (row.columnIndex === 0) {
|
||||||
|
return 'disabledCheck'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getyys()
|
getyys()
|
||||||
|
|
||||||
let options = ref<any>([])
|
let options = ref<any>([])
|
||||||
|
|||||||
463
src/views/vehicle/company/index.vue
Normal file
463
src/views/vehicle/company/index.vue
Normal file
@ -0,0 +1,463 @@
|
|||||||
|
<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="divisionNo">
|
||||||
|
<el-cascader
|
||||||
|
ref="qrcasca"
|
||||||
|
v-model="queryParams.divisionNo"
|
||||||
|
style="width: 100%;"
|
||||||
|
:options="options"
|
||||||
|
clearable
|
||||||
|
:props="{
|
||||||
|
label:'admdvsName',
|
||||||
|
value:'admdvsNo',
|
||||||
|
children:'subAdmdvsInfoList',
|
||||||
|
checkStrictly:true
|
||||||
|
}"
|
||||||
|
@change="qrchange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="关联方代码">
|
||||||
|
<el-input v-model="queryParams.typeRelateCode" placeholder="请输入关联方代码" clearable style="width: 240px" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="公司名称" prop="cname">
|
||||||
|
<el-input v-model="queryParams.cname" placeholder="请输入公司名称" clearable style="width: 240px" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="创建时间" style="width: 308px">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</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="Plus"
|
||||||
|
@click="showpop(1)">新增</el-button>
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="600px"
|
||||||
|
>
|
||||||
|
<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="组织机构代码" width="200" align="center" prop="ccode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="详细地址" width="400" align="center" prop="address" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系人" width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系电话" width="160" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="账户余额" width="100" align="center" prop="accountBalance" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="状态" width="100" align="center" prop="status">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.status == 1">启用</div>
|
||||||
|
<div v-else style="color: #ccc;">禁用</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column v-if="columns[6].visible" label="创建时间" align="center" prop="createTime" width="160">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<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 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"
|
||||||
|
:title="ystit"
|
||||||
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-form 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"
|
||||||
|
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-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" name="UserPage">
|
||||||
|
import {
|
||||||
|
getlist,
|
||||||
|
addyunys,
|
||||||
|
updateyys,
|
||||||
|
delyys
|
||||||
|
} from '@/api/operation/company'
|
||||||
|
import {
|
||||||
|
getArea
|
||||||
|
} from '@/api/common'
|
||||||
|
import { ref,reactive } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import type { UploadProps } from 'element-plus'
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
divisionNo:'', //区划编码
|
||||||
|
cname:''
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let total = ref(0)
|
||||||
|
let yysList = ref([])
|
||||||
|
function handBtnqu(){
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询条件区划
|
||||||
|
function qrchange(v:any) {
|
||||||
|
if(v){
|
||||||
|
queryParams.divisionNo = v[v.length - 1]
|
||||||
|
}else{
|
||||||
|
queryParams.divisionNo = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
getlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
total.value = (rps.data as any).total
|
||||||
|
let list = (rps.data as any).records
|
||||||
|
yysList.value = list?list:[]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
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 slecas = ref('')
|
||||||
|
let addata = reactive({
|
||||||
|
pkId:'',
|
||||||
|
division:'', //区划名称
|
||||||
|
divisionNo:'', //区划编码
|
||||||
|
cname:'', //公司名称
|
||||||
|
ccode:'', //组织机构代码
|
||||||
|
address:'', //地址
|
||||||
|
addressProvince:'', //地址-省
|
||||||
|
addressCity:'', //地址-市
|
||||||
|
addressArea:'', //地址-区县
|
||||||
|
contacts:'', //联系人
|
||||||
|
phone:'', //联系电话
|
||||||
|
status:'', //状态:1-启用,0-禁用
|
||||||
|
logo:'', //logo地址
|
||||||
|
delFlag:'', //删除标识:1-已删除,0-未删除
|
||||||
|
accountBalance:'' //账户余额
|
||||||
|
})
|
||||||
|
const rules = ref({
|
||||||
|
division:[
|
||||||
|
{ required: true, message: "请选择区划", trigger: "blur" },
|
||||||
|
],
|
||||||
|
cname:[
|
||||||
|
{ required: true, message: "请输入公司名称", trigger: "blur" },
|
||||||
|
],
|
||||||
|
ccode:[
|
||||||
|
{ required: true, message: "请输入组织机构代码", trigger: "blur" },
|
||||||
|
]
|
||||||
|
})
|
||||||
|
function showpop(num:any,row?:any){
|
||||||
|
type.value = num
|
||||||
|
openpop.value = true
|
||||||
|
ystit.value = num == 1?'添加公司':'修改公司'
|
||||||
|
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 = ''
|
||||||
|
|
||||||
|
addata.pkId = ''
|
||||||
|
addata.cname = ''
|
||||||
|
addata.ccode = ''
|
||||||
|
addata.division = ''
|
||||||
|
addata.divisionNo = ''
|
||||||
|
addata.address = ''
|
||||||
|
addata.addressProvince = ''
|
||||||
|
addata.addressCity = ''
|
||||||
|
addata.addressArea = ''
|
||||||
|
addata.contacts = ''
|
||||||
|
addata.phone = ''
|
||||||
|
addata.status = ''
|
||||||
|
addata.logo = ''
|
||||||
|
addata.accountBalance = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function savehand() {
|
||||||
|
if(type.value == 1){
|
||||||
|
return addyunys(addata)
|
||||||
|
}
|
||||||
|
return updateyys(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(
|
||||||
|
`确定删除公司:${row.cname}`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
delyys(row.pkId).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '删除成功'
|
||||||
|
})
|
||||||
|
getyys()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取区划
|
||||||
|
let options = ref<any>([])
|
||||||
|
let cascader = ref()
|
||||||
|
let alllsle = ref('')
|
||||||
|
|
||||||
|
//处理选中值
|
||||||
|
function change(v:any) {
|
||||||
|
if(cascader.value.getCheckedNodes().length>0){
|
||||||
|
alllsle.value= cascader.value.getCheckedNodes()[0].pathLabels
|
||||||
|
|
||||||
|
addata.division = alllsle.value[2] //区划名称
|
||||||
|
addata.divisionNo = v[2] //区划编码
|
||||||
|
|
||||||
|
addata.addressProvince = alllsle.value[0] //地址-省
|
||||||
|
addata.addressCity = alllsle.value[1] //地址-市
|
||||||
|
addata.addressArea = alllsle.value[2] //地址-区县
|
||||||
|
}else{
|
||||||
|
addata.division = ''
|
||||||
|
addata.divisionNo = ''
|
||||||
|
addata.addressProvince = ''
|
||||||
|
addata.addressCity = ''
|
||||||
|
addata.addressArea = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
getArea({}).then(rps => {
|
||||||
|
options.value = rps.data
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
//文件上传
|
||||||
|
let imageUrl = ref('')
|
||||||
|
const handleAvatarSuccess: UploadProps['onSuccess'] = (
|
||||||
|
response,
|
||||||
|
uploadFile
|
||||||
|
) => {
|
||||||
|
imageUrl.value = URL.createObjectURL(uploadFile.raw!)
|
||||||
|
}
|
||||||
|
|
||||||
|
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
|
||||||
|
if (rawFile.type !== 'image/jpeg') {
|
||||||
|
ElMessage.error('请选择jpg格式')
|
||||||
|
return false
|
||||||
|
} else if (rawFile.size / 1024 / 1024 > 2) {
|
||||||
|
ElMessage.error('请选择小于 2MB的图片')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
getyys()
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
370
src/views/vehicle/wxuser/index.vue
Normal file
370
src/views/vehicle/wxuser/index.vue
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="app-container" style="margin-bottom: 12px;padding-bottom: 5px;border-radius: 10px;">
|
||||||
|
<el-form
|
||||||
|
ref="querform"
|
||||||
|
:model="queryParams"
|
||||||
|
:inline="true"
|
||||||
|
label-width="auto"
|
||||||
|
>
|
||||||
|
<!-- <el-form-item label="车辆类型" prop="typeCode">
|
||||||
|
<el-select v-model="queryParams.typeCode" style="width: 200px;" placeholder="请选择车辆类型">
|
||||||
|
<el-option v-for="n in cartypelist" :label="n.typeName" :value="n.typeCode" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<el-form-item label="手机号" prop="phoneNumber">
|
||||||
|
<el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable style="width: 200px;" />
|
||||||
|
</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-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="yysList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="600px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<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}}</div>
|
||||||
|
</template>
|
||||||
|
</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">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.ownerType == 1">男</div>
|
||||||
|
<div v-else-if="scope.row.ownerType == 2">女</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="账户类型" min-width="150" align="center" prop="gender" :show-overflow-tooltip="true">
|
||||||
|
<template #default="scope">
|
||||||
|
<div v-if="scope.row.type == 1">个人</div>
|
||||||
|
<div v-else-if="scope.row.type == 2">公司</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" min-width="100" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button> -->
|
||||||
|
<el-button v-if="scope.row.type == 1" link type="primary" icon="Connection" @click="showbdgs(scope.row.wuid)">绑定公司</el-button>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<!--绑定公司-->
|
||||||
|
<el-dialog
|
||||||
|
v-model="bdgspop"
|
||||||
|
title="绑定公司"
|
||||||
|
width="800px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
style="width:100%;margin-top: 10px;"
|
||||||
|
:data="gsList"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
max-height="800px"
|
||||||
|
ref="taskTableRef"
|
||||||
|
@select="selectClick"
|
||||||
|
:header-cell-class-name="cellClass"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="40" />
|
||||||
|
<!-- <el-table-column label="区划" width="200" align="center" prop="division" :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="ccode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="详细地址" min-width="300" align="center" prop="address" :show-overflow-tooltip="true" />
|
||||||
|
<!-- <el-table-column label="联系人" width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="联系电话" width="160" align="center" prop="phone" :show-overflow-tooltip="true" /> -->
|
||||||
|
</el-table>
|
||||||
|
<div v-if="gstotal > 10" style="display: flex;justify-content: right;padding-top:20px;">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="gsqueryParams.pageNo"
|
||||||
|
v-model:page-size="gsqueryParams.pageSize"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
background
|
||||||
|
size="small"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="gstotal"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="getsglist"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="savegs">确 定</el-button>
|
||||||
|
<el-button @click="cancelgs">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 修改手机号 名称 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="openpop"
|
||||||
|
title="修改"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-form ref="yysRef" :model="addata" :rules="rules" label-width="110px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<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">
|
||||||
|
<el-form-item label="用户名" prop="name">
|
||||||
|
<el-input v-model="addata.name" maxlength="20" placeholder="请输入用户名" clearable />
|
||||||
|
</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 {
|
||||||
|
getwxlist,
|
||||||
|
gulgs,
|
||||||
|
update
|
||||||
|
} from '@/api/operation/wxuser'
|
||||||
|
import {
|
||||||
|
getlist
|
||||||
|
} from '@/api/operation/company'
|
||||||
|
import { ref,reactive,watch} from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
|
let queryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1, //页数
|
||||||
|
phoneNumber:'' //手机号
|
||||||
|
// wuid:'', //微信用户id
|
||||||
|
// nickName:'', //用户昵称
|
||||||
|
// gender:'', //用户性别:1-男;2-女
|
||||||
|
// name:'', //名称
|
||||||
|
// type:'', //类型:1-独立账户,2-公司员工子账户
|
||||||
|
// pcode:'' //父账户编码
|
||||||
|
})
|
||||||
|
|
||||||
|
//查询
|
||||||
|
let total = ref(0)
|
||||||
|
let yysList = ref<any>([])
|
||||||
|
function handBtnqu(){
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getyys()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getyys() {
|
||||||
|
yysList.value.splice(0)
|
||||||
|
getwxlist(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 bdgspop = ref(false)
|
||||||
|
let gsList = ref<any>([])
|
||||||
|
let gstotal = ref(0)
|
||||||
|
let bdgsobj = reactive({
|
||||||
|
wuid:'',
|
||||||
|
pcode:'', //公司编码
|
||||||
|
pname:'' //公司名称
|
||||||
|
})
|
||||||
|
let gsqueryParams = reactive({
|
||||||
|
pageSize:20, //每页条数
|
||||||
|
pageNo:1 //页数
|
||||||
|
})
|
||||||
|
function showbdgs(wuid:string){
|
||||||
|
bdgspop.value = true
|
||||||
|
bdgsobj.wuid = wuid
|
||||||
|
bdgsobj.pcode = ''
|
||||||
|
bdgsobj.pname = ''
|
||||||
|
getsglist()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsglist() {
|
||||||
|
gsList.value.splice(0)
|
||||||
|
getlist(queryParams).then(rps => {
|
||||||
|
if(rps.data){
|
||||||
|
gsList.value = (rps.data as any).records
|
||||||
|
gstotal.value = (rps.data as any).total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function sizeChange(val:number) {
|
||||||
|
gsqueryParams.pageSize = val
|
||||||
|
getsglist()
|
||||||
|
}
|
||||||
|
|
||||||
|
function savegs(){
|
||||||
|
if(bdgsobj.pcode){
|
||||||
|
gulgs(bdgsobj).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '绑定成功'
|
||||||
|
})
|
||||||
|
bdgspop.value = false
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '请选择公司'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function cancelgs(){
|
||||||
|
bdgspop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//设置单选
|
||||||
|
const taskTableRef = ref()
|
||||||
|
const selectClick = (selection: any, row: any) => {
|
||||||
|
if(selection.length > 1) {
|
||||||
|
let del_row = selection.shift();
|
||||||
|
taskTableRef.value.toggleRowSelection(del_row, false); // 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中);第二个参数为true时又变成了多选
|
||||||
|
}
|
||||||
|
bdgsobj.pcode = selection[0].ccode
|
||||||
|
bdgsobj.pname = selection[0].cname
|
||||||
|
}
|
||||||
|
|
||||||
|
function cellClass(row: any) {
|
||||||
|
// 隐藏多选框一列的表头即全选框
|
||||||
|
if (row.columnIndex === 0) {
|
||||||
|
return 'disabledCheck'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改手机号 用户名
|
||||||
|
let openpop = ref(false)
|
||||||
|
let yysRef = ref()
|
||||||
|
let addata = reactive({
|
||||||
|
wuid:'',
|
||||||
|
phone:'', //手机号
|
||||||
|
name:'' //用户名
|
||||||
|
})
|
||||||
|
const rules = ref({
|
||||||
|
phone:[
|
||||||
|
{ required: true, message: "请输入手机号", trigger: "blur" }
|
||||||
|
],
|
||||||
|
name:[
|
||||||
|
{ required: true, message: "请输入用户名", trigger: "blur" }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(() => addata.phone,v => {
|
||||||
|
addata.phone = v.replace(/[^\d]/g,'')
|
||||||
|
})
|
||||||
|
|
||||||
|
function showpop(row?:any){
|
||||||
|
openpop.value = true
|
||||||
|
yysRef.value?.resetFields()
|
||||||
|
if(row){
|
||||||
|
addata.wuid = row.wuid
|
||||||
|
addata.name = row.name?row.name:''
|
||||||
|
addata.phone = row.phoneNumber?row.phoneNumber:''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
function handleAdd() {
|
||||||
|
yysRef.value?.validate((valid:Boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
update(addata).then(() => {
|
||||||
|
ElMessage({
|
||||||
|
type: 'success',
|
||||||
|
message: '修改成功'
|
||||||
|
})
|
||||||
|
setTimeout(()=> {
|
||||||
|
openpop.value = false
|
||||||
|
getyys()
|
||||||
|
},600)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//取消
|
||||||
|
function cancel() {
|
||||||
|
openpop.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function handleDelete(row:any) {
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
`确定解绑公司${row.plateNum}`,
|
||||||
|
'温馨提示',
|
||||||
|
{
|
||||||
|
// confirmButtonText: '',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getyys()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped >
|
||||||
|
/* 隐藏全选按钮 */
|
||||||
|
:deep(.el-table .disabledCheck .cell .el-checkbox__inner) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.el-divider--horizontal{
|
||||||
|
border-color:#5b98cd;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -8,15 +8,15 @@ export default defineConfig({
|
|||||||
host: "localhost",
|
host: "localhost",
|
||||||
// 是否开启自动打开浏览器
|
// 是否开启自动打开浏览器
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
// proxy: {
|
||||||
"^/dev-api": {
|
// "^/dev-api": {
|
||||||
target: `http://192.168.5.213:9100/gateway`,
|
// target: `http://192.168.5.213:9100/gateway`,
|
||||||
// target: `https://api.evo-techina.com`,
|
// // target: `https://api.evo-techina.com`,
|
||||||
|
|
||||||
changeOrigin: true,
|
// changeOrigin: true,
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '\/' + process.env.VUE_APP_BASE_API)
|
// // rewrite: (path) => path.replace(/^\/api/, '\/' + process.env.VUE_APP_BASE_API)
|
||||||
rewrite: (path) => path.replace(/^\/dev-api/, "/"),
|
// rewrite: (path) => path.replace(/^\/dev-api/, "/"),
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user