提交修改
This commit is contained in:
parent
df9e1dd0d8
commit
00b90f6922
@ -40,7 +40,7 @@ import Login from './views/components/login.vue'
|
||||
|
||||
function update() {
|
||||
openpop.value = false
|
||||
//location.reload()
|
||||
location.reload() //??
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ interface Querydata{
|
||||
url: '/cloud/wechat/user/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
},false)
|
||||
}
|
||||
|
||||
//关联公司
|
||||
|
||||
@ -2,7 +2,9 @@ import server from '@/utils/request'
|
||||
|
||||
//新增
|
||||
interface Addobj{
|
||||
source:String //来源:1-小程序,2-云端,3-站端
|
||||
userId:String //预约人ID
|
||||
ucode:String
|
||||
uname:String //预约人姓名
|
||||
phone:String //手机号码
|
||||
plateNum:String //车牌号
|
||||
@ -10,7 +12,7 @@ interface Addobj{
|
||||
stationName:String //换电站名称
|
||||
swapDay:String //预约换电日期,示例值(yyyyMMdd)
|
||||
swapDuration:String //预约换电时间段,示例值(8:00-10:00)
|
||||
status:String|Number //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||
// status:String|Number //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||
|
||||
// source:String //来源:1-小程序,2-云端,3-站端
|
||||
// ucode:String //预约人编码
|
||||
@ -52,7 +54,7 @@ interface Querydata{
|
||||
swapDayEnd?:String //预约换电日期结束
|
||||
stationCode?:String //换电站编码
|
||||
}
|
||||
export function getjqrlist(params:Querydata) {
|
||||
export function getyylist(params:Querydata) {
|
||||
return server.request({
|
||||
url: '/cloud/order/swap/pre/list',
|
||||
method: 'get',
|
||||
|
||||
@ -61,7 +61,7 @@ export function gethdzlist(params:Querydata) {
|
||||
url: '/cloud/batterystation/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
},false)
|
||||
}
|
||||
|
||||
//删除
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<!-- <a href="https://gitee.com/huanglgln/ruoyi-web-vue3-ts" target="_blank">
|
||||
<el-dropdown-item>项目仓库</el-dropdown-item>
|
||||
</a> -->
|
||||
<el-dropdown-item command="user">个人中心</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="user">个人中心</el-dropdown-item> -->
|
||||
<el-dropdown-item divided command="loginout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
|
||||
@ -129,4 +129,18 @@ export function carNum(rule:any, value:any, callback:any) {
|
||||
return callback()
|
||||
}
|
||||
return callback()
|
||||
}
|
||||
|
||||
export function getDateDaysAgo(days:number = 0,time?:string) {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - days);
|
||||
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
|
||||
if(time){
|
||||
return `${year}-${month}-${day} ${time}`
|
||||
}
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
@ -15,7 +15,7 @@
|
||||
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#409EFF'}">
|
||||
<component is="Promotion" />
|
||||
</el-icon>
|
||||
<div class="grid-msg-right" style="border: none;" @click="toRout('/system/operator')">
|
||||
<div class="grid-msg-right" style="border: none;" @click="toRout('/vehicle/operator')">
|
||||
<div class="grid-msg-num" :style="{ color: '#409EFF'}">
|
||||
{{ operatotal }}
|
||||
</div>
|
||||
@ -55,19 +55,19 @@
|
||||
<el-icon class="grid-msg-icon" style="border-radius: 12px 0 0 12px;" :style="{background:'#67C23A'}">
|
||||
<component is="SuccessFilled" />
|
||||
</el-icon>
|
||||
<div class="grid-msg-right" @click="toRout('/swapstation/battery')">
|
||||
<div class="grid-msg-right" @click="toRout('/vehicle/company')">
|
||||
<div class="grid-msg-num" :style="{ color: '#67C23A'}">
|
||||
{{ rzcompany }}
|
||||
</div>
|
||||
<div style="font-size: 16px;">认证公司</div>
|
||||
</div>
|
||||
<div class="grid-msg-right" @click="toRout('/swapstation/battery')">
|
||||
<div class="grid-msg-right" @click="toRout('/vehicle/wxuser')">
|
||||
<div class="grid-msg-num" :style="{ color: '#bc92c9'}">
|
||||
{{ rzuser }}
|
||||
</div>
|
||||
<div style="font-size: 16px;">认证用户</div>
|
||||
</div>
|
||||
<div class="grid-msg-right" style="border: none;" @click="toRout('/swapstation/battery')">
|
||||
<div class="grid-msg-right" style="border: none;" @click="toRout('/vehicle/car')">
|
||||
<div class="grid-msg-num" :style="{ color: '#3aaec2'}">
|
||||
{{ rzvehicle }}
|
||||
</div>
|
||||
@ -120,15 +120,15 @@
|
||||
<el-col :span="12">
|
||||
<div style="width: 100%;height: 200px;border-radius: 10px;box-shadow: 0 0 20px -5px rgba(84, 151, 232, 0.5);">
|
||||
<div style="display: flex;justify-content: space-between;cursor:pointer;">
|
||||
<div style="width:31%;height: 92px;border-radius: 10px 0 0 0;text-align: center;background: #fff;" @click="toRout('/vehicle/company')">
|
||||
<div style="width:31%;height: 92px;border-radius: 10px 0 0 0;text-align: center;background: #fff;" @click="toRout('/swapstation/battery')">
|
||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #409eff;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">电池总量</div>
|
||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #409eff;">{{ dctotal }}</div>
|
||||
</div>
|
||||
<div style="width:31%;height: 92px;text-align: center;background: #fff;" @click="toRout('/vehicle/wxuser')">
|
||||
<div style="width:31%;height: 92px;text-align: center;background: #fff;" @click="toRout('')">
|
||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #67c23a;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">充电电池</div>
|
||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #67c23a;">{{cddctotal}}</div>
|
||||
</div>
|
||||
<div style="width:31%;height: 90px;border-radius: 0 10px 0 0;text-align: center;background: #fff;" @click="toRout('/vehicle/car')">
|
||||
<div style="width:31%;height: 90px;border-radius: 0 10px 0 0;text-align: center;background: #fff;" @click="toRout('/swapstation/battery')">
|
||||
<div style="width: 100%;height: 40px;line-height: 40px;font-size: 18px;color: #e6a23c;border-radius: 10px 10px 0 0;border-bottom: 3px solid #ebf5ff;">可用电池</div>
|
||||
<div style="height: 55px;line-height: 55px;font-size: 30px;font-weight: bold;color: #e6a23c;">{{kydctotal}}</div>
|
||||
</div>
|
||||
|
||||
@ -14,18 +14,55 @@
|
||||
highlight-current-row
|
||||
max-height="620px"
|
||||
>
|
||||
<el-table-column label="交易编码" min-width="150" align="center" prop="tradeNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易前账户总金额 (分)" min-width="160" align="center" prop="preTotalAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易前充值余额 (分)" min-width="150" align="center" prop="preRechargeAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易前赠送金额 (分)" min-width="150" align="center" prop="preGiftAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易编码" min-width="280" align="center" prop="tradeNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易前账户总金额(元)" min-width="160" align="center" prop="preTotalAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.preTotalAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易前充值余额(元)" min-width="150" align="center" prop="preRechargeAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.preRechargeAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易前赠送金额(元)" min-width="150" align="center" prop="preGiftAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.preGiftAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易总金额 (分)" min-width="140" align="center" prop="tradeTotalAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易充值余额 (分)" min-width="140" align="center" prop="tradeRechargeAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易赠送金额 (分)" min-width="140" align="center" prop="tradeGiftAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易总金额(元)" min-width="140" align="center" prop="tradeTotalAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.tradeTotalAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易后总金额 (分)" min-width="150" align="center" prop="afterTotalAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易后充值余额 (分)" min-width="150" align="center" prop="afterRechargeAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易后赠送金额 (分)" min-width="150" align="center" prop="afterGiftAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易充值余额(元)" min-width="140" align="center" prop="tradeRechargeAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.tradeRechargeAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易赠送金额(元)" min-width="140" align="center" prop="tradeGiftAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.tradeGiftAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易后总金额(元)" min-width="150" align="center" prop="afterTotalAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.afterTotalAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易后充值余额(元)" min-width="150" align="center" prop="afterRechargeAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.afterRechargeAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易后赠送金额(元)" min-width="150" align="center" prop="afterGiftAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.afterGiftAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
@ -85,7 +122,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易前账户总金额 (分)" prop="preTotalAmount">
|
||||
<el-form-item label="交易前账户总金额(元)" prop="preTotalAmount">
|
||||
<el-input
|
||||
v-model="addata.preTotalAmount"
|
||||
placeholder="请输入交易前账户总金额"
|
||||
@ -94,7 +131,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易前充值余额 (分)" prop="preRechargeAmount">
|
||||
<el-form-item label="交易前充值余额(元)" prop="preRechargeAmount">
|
||||
<el-input
|
||||
v-model="addata.preRechargeAmount"
|
||||
placeholder="请输入交易前充值余额"
|
||||
@ -103,7 +140,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易前赠送金额 (分)" prop="preGiftAmount">
|
||||
<el-form-item label="交易前赠送金额(元)" prop="preGiftAmount">
|
||||
<el-input
|
||||
v-model="addata.preGiftAmount"
|
||||
placeholder="请输入交易前赠送金额"
|
||||
@ -112,7 +149,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易总金额 (分)" prop="tradeTotalAmount">
|
||||
<el-form-item label="交易总金额(元)" prop="tradeTotalAmount">
|
||||
<el-input
|
||||
v-model="addata.tradeTotalAmount"
|
||||
placeholder="请输入交易总金额"
|
||||
@ -121,7 +158,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易充值余额 (分)" prop="tradeRechargeAmount">
|
||||
<el-form-item label="交易充值余额(元)" prop="tradeRechargeAmount">
|
||||
<el-input
|
||||
v-model="addata.tradeRechargeAmount"
|
||||
placeholder="请输入交易充值余额"
|
||||
@ -130,7 +167,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易赠送金额 (分)" prop="tradeGiftAmount">
|
||||
<el-form-item label="交易赠送金额(元)" prop="tradeGiftAmount">
|
||||
<el-input
|
||||
v-model="addata.tradeGiftAmount"
|
||||
placeholder="请输入交易赠送金额"
|
||||
@ -139,7 +176,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易后总金额 (分)" prop="afterTotalAmount">
|
||||
<el-form-item label="交易后总金额(元)" prop="afterTotalAmount">
|
||||
<el-input
|
||||
v-model="addata.afterTotalAmount"
|
||||
placeholder="请输入交易后总金额"
|
||||
@ -148,7 +185,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易后充值余额 (分)" prop="afterRechargeAmount">
|
||||
<el-form-item label="交易后充值余额(元)" prop="afterRechargeAmount">
|
||||
<el-input
|
||||
v-model="addata.afterRechargeAmount"
|
||||
placeholder="请输入交易后充值余额"
|
||||
@ -157,7 +194,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="交易后赠送金额 (分)" prop="afterGiftAmount">
|
||||
<el-form-item label="交易后赠送金额(元)" prop="afterGiftAmount">
|
||||
<el-input
|
||||
v-model="addata.afterGiftAmount"
|
||||
placeholder="请输入交易后赠送金额"
|
||||
@ -182,7 +219,10 @@
|
||||
addhdz,
|
||||
delhdz
|
||||
} from '@/api/order/accdetails'
|
||||
import { ref,reactive} from 'vue'
|
||||
|
||||
import { setNum } from '@/utils/validate'
|
||||
|
||||
import { ref,reactive,watch} from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const props = defineProps<{
|
||||
@ -226,8 +266,9 @@
|
||||
let ystit = ref('添加账户明细')
|
||||
let yysRef = ref()
|
||||
let addata = reactive({
|
||||
code:'', //编码
|
||||
tradeNo:'', //交易编码
|
||||
code:'', //编码 ??
|
||||
tradeType:'1', //交易类型 ??
|
||||
tradeNo:'', //交易编码 ??
|
||||
preTotalAmount:'', //交易前账户总金额,分:总金额=充值金额+赠送金额
|
||||
preRechargeAmount:'', //交易前充值余额,分
|
||||
preGiftAmount:'', //交易前赠送金额,分
|
||||
@ -274,6 +315,46 @@
|
||||
]
|
||||
})
|
||||
|
||||
watch(() => addata.preTotalAmount,v => {
|
||||
addata.preTotalAmount = setNum(addata.preTotalAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.preRechargeAmount,v => {
|
||||
addata.preRechargeAmount = setNum(addata.preRechargeAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.preGiftAmount,v => {
|
||||
addata.preGiftAmount = setNum(addata.preGiftAmount)
|
||||
})
|
||||
|
||||
|
||||
|
||||
watch(() => addata.tradeTotalAmount,v => {
|
||||
addata.tradeTotalAmount = setNum(addata.tradeTotalAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.tradeRechargeAmount,v => {
|
||||
addata.tradeRechargeAmount = setNum(addata.tradeRechargeAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.tradeGiftAmount,v => {
|
||||
addata.tradeGiftAmount = setNum(addata.tradeGiftAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.afterTotalAmount,v => {
|
||||
addata.afterTotalAmount = setNum(addata.afterTotalAmount)
|
||||
})
|
||||
|
||||
|
||||
watch(() => addata.afterRechargeAmount,v => {
|
||||
addata.afterRechargeAmount = setNum(addata.afterRechargeAmount)
|
||||
})
|
||||
|
||||
watch(() => addata.afterGiftAmount,v => {
|
||||
addata.afterGiftAmount = setNum(addata.afterGiftAmount)
|
||||
})
|
||||
|
||||
|
||||
function showpop(num:any,row?:any){
|
||||
type.value = num
|
||||
openpop.value = true
|
||||
|
||||
@ -46,21 +46,46 @@
|
||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.code}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="户主类型" min-width="200" align="center" prop="ownerType" :show-overflow-tooltip="true">
|
||||
<el-table-column label="户主类型" min-width="100" align="center" prop="ownerType" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.ownerType == 1">个人</div>
|
||||
<div v-else>企业</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="引入站点" min-width="250" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="账户总金额" min-width="250" align="center" prop="totalAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="充值余额" min-width="250" align="center" prop="rechargeAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="赠送金额" min-width="250" align="center" prop="giftAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="账户总金额(元)" min-width="120" align="center" prop="totalAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.totalAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值余额(元)" min-width="120" align="center" prop="rechargeAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.rechargeAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="赠送金额(元)" min-width="120" align="center" prop="giftAmount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.giftAmount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="积分金额" min-width="250" align="center" prop="point" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="押金" min-width="250" align="center" prop="deposit" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="SN码" min-width="250" align="center" prop="snCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租金" min-width="250" align="center" prop="rent" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="积分金额(元)" min-width="120" align="center" prop="point" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.point/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="押金(元)" min-width="120" align="center" prop="deposit" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.deposit/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="SN码" min-width="150" align="center" prop="snCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租金(元)" min-width="100" align="center" prop="rent" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.rent/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" icon="Collection" @click="bzmingx(scope.row.pkId)">标准明细</el-button> -->
|
||||
@ -99,11 +124,12 @@
|
||||
ref="yysRef"
|
||||
:model="addata"
|
||||
:rules="rules"
|
||||
label-width="90px">
|
||||
label-width="120px">
|
||||
<el-row :gutter="30">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="户主类型" prop="ownerType">
|
||||
<el-select
|
||||
@change="changetype"
|
||||
v-model="addata.ownerType"
|
||||
placeholder="请选择类型"
|
||||
>
|
||||
@ -118,6 +144,21 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="户主名称" prop="ownerId">
|
||||
<el-autocomplete
|
||||
style="width: 100%"
|
||||
v-model="qswxuser"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
:placeholder="addata.ownerType == '1'?'请输入手机号查询':'请输入企业名称查询'"
|
||||
clearable
|
||||
@blur="qsautoblur"
|
||||
@select="qshandleSelect"
|
||||
@clear="qsautoclear"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="引入站点" prop="stationCode">
|
||||
@ -136,7 +177,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="账户总金额" prop="totalAmount">
|
||||
<el-form-item label="账户总金额(元)" prop="totalAmount">
|
||||
<el-input
|
||||
v-model="addata.totalAmount"
|
||||
placeholder="请输入总金额"
|
||||
@ -145,7 +186,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="充值金额" prop="rechargeAmount">
|
||||
<el-form-item label="充值金额(元)" prop="rechargeAmount">
|
||||
<el-input
|
||||
v-model="addata.rechargeAmount"
|
||||
placeholder="请输入充值金额"
|
||||
@ -154,7 +195,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="赠送金额" prop="giftAmount">
|
||||
<el-form-item label="赠送金额(元)" prop="giftAmount">
|
||||
<el-input
|
||||
v-model="addata.giftAmount"
|
||||
placeholder="请输入赠送金额"
|
||||
@ -163,7 +204,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="积分余额" prop="point">
|
||||
<el-form-item label="积分余额(元)" prop="point">
|
||||
<el-input
|
||||
v-model="addata.point"
|
||||
placeholder="请输入积分余额"
|
||||
@ -172,7 +213,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="押金" prop="deposit">
|
||||
<el-form-item label="押金(元)" prop="deposit">
|
||||
<el-input
|
||||
v-model="addata.deposit"
|
||||
placeholder="请输入押金"
|
||||
@ -190,7 +231,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="租金" prop="rent">
|
||||
<el-form-item label="租金(元)" prop="rent">
|
||||
<el-input
|
||||
v-model="addata.rent"
|
||||
placeholder="请输入租金"
|
||||
@ -215,23 +256,23 @@
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
:with-header="false"
|
||||
size="88%"
|
||||
size="50%"
|
||||
>
|
||||
<tit @close="handleClose" name="账户详情" />
|
||||
<el-row :gutter="25">
|
||||
<el-col :span="5">
|
||||
<el-col :span="24">
|
||||
<div style="padding: 0;border: 2px solid #73b9c9;border-radius: 10px;">
|
||||
<div class="mktit jqbg">基本信息</div>
|
||||
<el-form
|
||||
ref="yysRef"
|
||||
:model="addata"
|
||||
:rules="rules"
|
||||
label-position="top"
|
||||
label-width="100px">
|
||||
<el-row style="padding:20px">
|
||||
<el-col :span="24">
|
||||
label-width="120px">
|
||||
<el-row :gutter="25" style="padding: 20px;">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="户主类型" prop="ownerType">
|
||||
<el-select
|
||||
disabled
|
||||
v-model="addata.ownerType"
|
||||
placeholder="请选择类型"
|
||||
>
|
||||
@ -247,7 +288,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="引入站点" prop="stationCode">
|
||||
<el-select
|
||||
v-model="addata.stationCode"
|
||||
@ -263,8 +304,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="账户总金额" prop="totalAmount">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账户总金额(元)" prop="totalAmount">
|
||||
<el-input
|
||||
v-model="addata.totalAmount"
|
||||
placeholder="请输入总金额"
|
||||
@ -272,8 +313,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="充值金额" prop="rechargeAmount">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="充值金额(元)" prop="rechargeAmount">
|
||||
<el-input
|
||||
v-model="addata.rechargeAmount"
|
||||
placeholder="请输入充值金额"
|
||||
@ -281,8 +322,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="赠送金额" prop="giftAmount">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="赠送金额(元)" prop="giftAmount">
|
||||
<el-input
|
||||
v-model="addata.giftAmount"
|
||||
placeholder="请输入赠送金额"
|
||||
@ -290,8 +331,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="积分余额" prop="point">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="积分余额(元)" prop="point">
|
||||
<el-input
|
||||
v-model="addata.point"
|
||||
placeholder="请输入积分余额"
|
||||
@ -299,8 +340,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="押金" prop="deposit">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="押金(元)" prop="deposit">
|
||||
<el-input
|
||||
v-model="addata.deposit"
|
||||
placeholder="请输入押金"
|
||||
@ -308,7 +349,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="SN码" prop="snCode">
|
||||
<el-input
|
||||
v-model="addata.snCode"
|
||||
@ -317,8 +358,8 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="租金" prop="rent">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="租金(元)" prop="rent">
|
||||
<el-input
|
||||
v-model="addata.rent"
|
||||
placeholder="请输入租金"
|
||||
@ -327,7 +368,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" style="text-align: center;">
|
||||
<el-button type="success" @click="handleAdd">确 定</el-button>
|
||||
<el-button type="success" @click="handleAdd">保 存</el-button>
|
||||
<el-button @click="resetupdate">重 置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -335,7 +376,7 @@
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-col :span="24" style="padding-top: 20px;">
|
||||
<div style="height: 100%;margin-bottom: 20px;border: 1px solid #98c3ef; border-radius: 10px;">
|
||||
<div class="mktit">余额明细</div>
|
||||
<baldetails
|
||||
@ -366,6 +407,14 @@
|
||||
delhdz
|
||||
} from '@/api/order/account'
|
||||
|
||||
import {
|
||||
getwxlist
|
||||
} from '@/api/operation/wxuser'
|
||||
|
||||
import {
|
||||
getlist
|
||||
} from '@/api/operation/company'
|
||||
|
||||
import { setNum } from '@/utils/validate'
|
||||
|
||||
function timestamp() {
|
||||
@ -394,7 +443,7 @@
|
||||
//初始查询换电站
|
||||
let yunList = ref<any>([])
|
||||
gethdzlist({
|
||||
pageSize:100, //每页条数
|
||||
pageSize:200, //每页条数
|
||||
pageNo:1, //页数
|
||||
proxyId:'', //归属运营商ID
|
||||
name:'', //站点名称
|
||||
@ -440,10 +489,10 @@
|
||||
let bzName = ref('')
|
||||
let code = ref('')
|
||||
let stationName = ref('')
|
||||
let addata = reactive({
|
||||
let addata = reactive<any>({
|
||||
pkId:'',
|
||||
ownerType:'', //户主类型:1-个人,2-企业
|
||||
ownerId:'123', //户主ID
|
||||
ownerType:'2', //户主类型:1-个人,2-企业
|
||||
ownerId:'', //户主ID
|
||||
stationCode:'', //引入站点
|
||||
stationName:'', //换电站名称 ??
|
||||
totalAmount:'', //账户总金额,分:总金额=充值金额+赠送金额
|
||||
@ -461,10 +510,10 @@
|
||||
],
|
||||
ownerId:[
|
||||
{ required: true, message: "请选择户主", trigger: "blur" }
|
||||
],
|
||||
stationCode:[
|
||||
{ required: true, message: "请选择站点", trigger: "blur" }
|
||||
]
|
||||
// stationCode:[
|
||||
// { required: true, message: "请选择站点", trigger: "blur" }
|
||||
// ]
|
||||
})
|
||||
|
||||
watch(() => addata.totalAmount,v => {
|
||||
@ -516,13 +565,13 @@
|
||||
addata.ownerId = row.ownerId
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationName = row.stationName
|
||||
addata.totalAmount = row.totalAmount+''
|
||||
addata.rechargeAmount = row.rechargeAmount+''
|
||||
addata.giftAmount = row.giftAmount+''
|
||||
addata.point = row.point+''
|
||||
addata.deposit = row.deposit+''
|
||||
addata.snCode = row.snCode+''
|
||||
addata.rent = row.rent+''
|
||||
addata.totalAmount = row.totalAmount?row.totalAmount/100:0
|
||||
addata.rechargeAmount = row.rechargeAmount?row.rechargeAmount/100:0
|
||||
addata.giftAmount = row.giftAmount?row.giftAmount/100:0
|
||||
addata.point = row.point
|
||||
addata.deposit = row.deposit
|
||||
addata.snCode = row.snCode?row.snCode:''
|
||||
addata.rent = row.rent
|
||||
|
||||
standardId.value = row.pkId
|
||||
bzName.value = row.name
|
||||
@ -531,8 +580,8 @@
|
||||
mxlist.value = row.detailList
|
||||
}else{
|
||||
addata.pkId = ''
|
||||
addata.ownerType = ''
|
||||
addata.ownerId = '1' //??
|
||||
addata.ownerType = '2'
|
||||
addata.ownerId = ''
|
||||
addata.stationCode = ''
|
||||
addata.stationName = ''
|
||||
addata.totalAmount = ''
|
||||
@ -555,6 +604,12 @@
|
||||
function handleAdd() {
|
||||
yysRef.value?.validate((valid:Boolean) => {
|
||||
if (valid) {
|
||||
|
||||
addata.totalAmount = addata.totalAmount*100
|
||||
|
||||
addata.rechargeAmount = addata.rechargeAmount*100
|
||||
addata.giftAmount = addata.giftAmount*100
|
||||
|
||||
savehand().then(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
@ -566,6 +621,8 @@
|
||||
setTimeout(()=> {
|
||||
if(type.value == 1){
|
||||
openpop.value = false
|
||||
}else{
|
||||
drawer.value = false
|
||||
}
|
||||
getyys()
|
||||
},600)
|
||||
@ -582,7 +639,7 @@
|
||||
//删除
|
||||
function handleDelete(row:any) {
|
||||
ElMessageBox.confirm(
|
||||
`确定删除:${row.name}`,
|
||||
`确定删除?`,
|
||||
'温馨提示',
|
||||
{
|
||||
// confirmButtonText: '',
|
||||
@ -620,6 +677,74 @@
|
||||
// standardId.value = id
|
||||
// }
|
||||
|
||||
let qswxuser = ref('')
|
||||
|
||||
function changetype() {
|
||||
qswxuser.value = ''
|
||||
addata.ownerId = ''
|
||||
}
|
||||
//获取微信用户
|
||||
function getuser(v:any) {
|
||||
if(addata.ownerType == '1'){
|
||||
return getwxlist({
|
||||
pageSize:100, //每页条数
|
||||
pageNo:1, //页数
|
||||
phoneNumber:v, //手机号
|
||||
// nickName:queryString, //昵称
|
||||
// name:queryString //名称
|
||||
})
|
||||
}
|
||||
return getlist({
|
||||
pageSize:1000, //每页条数
|
||||
pageNo:1, //页数
|
||||
cname:v
|
||||
})
|
||||
}
|
||||
|
||||
async function querySearchAsync (queryString: string, cb:any) {
|
||||
getuser(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) => {
|
||||
if(addata.ownerType == '1'){
|
||||
return {
|
||||
value: `${n.name?n.name:'暂未设置姓名'}—${n.phoneNumber?n.phoneNumber:'暂未绑定手机号'}`,
|
||||
name: n.name,
|
||||
phoneNumber:n.phoneNumber,
|
||||
id:n.wuid //??
|
||||
}
|
||||
}
|
||||
return {
|
||||
value: n.cname,
|
||||
id: n.ccode
|
||||
}
|
||||
|
||||
})
|
||||
cb(listss)
|
||||
//return listss
|
||||
// callback(mapList.value);
|
||||
}else{
|
||||
cb([])
|
||||
}
|
||||
}).catch(() => {
|
||||
cb([])
|
||||
})
|
||||
}
|
||||
|
||||
function qsautoblur() {
|
||||
if(addata.ownerId === ''){
|
||||
qswxuser.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
function qsautoclear() {
|
||||
addata.ownerId = ''
|
||||
}
|
||||
|
||||
function qshandleSelect(v: any) {
|
||||
addata.ownerId = v.id
|
||||
}
|
||||
|
||||
getyys()
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<!--@selection-change="selChange"-->
|
||||
<el-table
|
||||
<el-table
|
||||
style="width:100%;margin-top: 10px;"
|
||||
:data="yysList"
|
||||
border
|
||||
@ -102,7 +102,11 @@
|
||||
<el-table-column label="车牌号" min-width="120" align="center" prop="plateNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="订单时间" min-width="200" align="center" prop="orderTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="金额账号" min-width="120" align="center" prop="accountCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="订单金额" min-width="120" align="center" prop="amount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="订单金额(元)" min-width="120" align="center" prop="amount" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.amount/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" min-width="120" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.status == 1">已创建</div>
|
||||
@ -110,9 +114,9 @@
|
||||
<div v-else-if="scope.row.status == 3">换电完成</div>
|
||||
<div v-else-if="scope.row.status == 4">充电中</div>
|
||||
<div v-else-if="scope.row.status == 5">充电完成</div>
|
||||
<div v-else-if="scope.row.status == 6" style="color: #ff6000;">待结算</div>
|
||||
<div v-else-if="scope.row.status == 6" style="color: #ff6000;">待支付</div>
|
||||
<div v-else-if="scope.row.status == 7">已完成</div>
|
||||
<div v-else-if="scope.row.status == 7">已取消</div>
|
||||
<div v-else-if="scope.row.status == 9">已取消</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计费方式" min-width="120" align="center" prop="feeType" :show-overflow-tooltip="true">
|
||||
@ -122,11 +126,11 @@
|
||||
<div v-else-if="scope.row.feeType == 3">换电量</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="基础费用" min-width="120" align="center" prop="basicFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="服务开始时间" min-width="120" align="center" prop="serviceTimeBegin" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="服务结束时间" min-width="120" align="center" prop="serviceTimeEnd" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="基础费用(元)" min-width="120" align="center" prop="basicFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="服务开始时间" min-width="180" align="center" prop="serviceTimeBegin" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="服务结束时间" min-width="180" align="center" prop="serviceTimeEnd" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="服务费" min-width="120" align="center" prop="serviceFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="服务费(元)" min-width="120" align="center" prop="serviceFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="上次租赁电池时车辆里程" min-width="180" align="center" prop="lastRentBatCarOdo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还电池时车辆里程" min-width="150" align="center" prop="nowReturnBatCarOdo" :show-overflow-tooltip="true" />
|
||||
|
||||
@ -134,9 +138,9 @@
|
||||
<el-table-column label="总充电量" min-width="120" align="center" prop="electAmount" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租借电池包仓位" min-width="120" align="center" prop="rentBatNo" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="租用电池包编码" min-width="120" align="center" prop="rentBatCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租用电池包编码" min-width="300" align="center" prop="rentBatCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="租用电池包SOC" min-width="120" align="center" prop="rentBatSoc" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还电池包编码" min-width="120" align="center" prop="returnBatCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还电池包编码" min-width="300" align="center" prop="returnBatCode" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="归还电池包仓位" min-width="120" align="center" prop="returnBatNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归还电池包SOC" min-width="120" align="center" prop="returnBatSoc" :show-overflow-tooltip="true" />
|
||||
@ -157,7 +161,7 @@
|
||||
<div v-else-if="scope.row.changeMode == 3">人工干预</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易编码" min-width="120" align="center" prop="tradeNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="交易编码" min-width="280" align="center" prop="tradeNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" icon="Edit" @click="showpop(2,scope.row)">修改</el-button> -->
|
||||
@ -249,7 +253,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="订单金额" prop="amount">
|
||||
<el-form-item label="订单金额(元)" prop="amount">
|
||||
<el-input v-model="addata.amount" placeholder="请输入订单金额" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -278,7 +282,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="基础费用" prop="basicFee">
|
||||
<el-form-item label="基础费用(元)" prop="basicFee">
|
||||
<el-input v-model="addata.basicFee" placeholder="请输入基础费用" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -305,7 +309,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务费" prop="serviceFee">
|
||||
<el-form-item label="服务费(元)" prop="serviceFee">
|
||||
<el-input v-model="addata.serviceFee" placeholder="请输入服务费" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -478,7 +482,7 @@
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="5">金额账号:</el-col>
|
||||
<el-col :span="19" style="color: #417ebb;">{{xqobj.accountCode}}</el-col>
|
||||
<el-col :span="19" style="color: #417ebb;">{{xqobj.accountCode?xqobj.accountCode:'--'}}</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -487,13 +491,13 @@
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="5">订单金额:</el-col>
|
||||
<el-col :span="19" style="color: #417ebb;">{{xqobj.amount}}元</el-col>
|
||||
<el-col :span="19" style="color: #417ebb;">{{xqobj.amount/100}}元</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-col :span="18" style="color: #417ebb;">{{feetype(xqobj.feeType)}}</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -613,7 +617,7 @@
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="5">换电模式:</el-col>
|
||||
<el-col :span="10" style="color: #417ebb;">{{ xqobj.changeMode}}</el-col>
|
||||
<el-col :span="10" style="color: #417ebb;">{{hdms(xqobj.changeMode)}}</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -651,11 +655,12 @@
|
||||
</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 v-if="hdbz.length>0">
|
||||
<el-steps :active="hdbz.length" align-center>
|
||||
<el-step v-for="n in hdbz" :icon="(hdbzname(n.step) as any).icon" :title="(hdbzname(n.step) as any).name" :description="n.stepTime" />
|
||||
</el-steps>
|
||||
</div>
|
||||
<el-empty v-else :image-size="120" description="暂未开始" />
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
@ -677,7 +682,8 @@
|
||||
getwxlist
|
||||
} from '@/api/operation/wxuser'
|
||||
|
||||
import { carNum } from '@/utils/validate'
|
||||
import { carNum,setNum,getDateDaysAgo } from '@/utils/validate'
|
||||
|
||||
|
||||
import Payment from './payment.vue'
|
||||
|
||||
@ -687,6 +693,84 @@
|
||||
// import { jsonp } from 'vue-jsonp'
|
||||
import { ref,reactive,watch} from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
|
||||
//换电步骤
|
||||
function hdbzname(n:string|number) {
|
||||
if(n == 1){
|
||||
return {
|
||||
name:'车辆进站',
|
||||
icon:'Star'
|
||||
}
|
||||
}else if(n == 2){
|
||||
return {
|
||||
name:'车辆到达指定位置',
|
||||
icon:'LocationFilled'
|
||||
}
|
||||
}else if(n == 3){
|
||||
return {
|
||||
name:'启动对中机构',
|
||||
icon:'Guide'
|
||||
}
|
||||
}else if(n == 4){
|
||||
return {
|
||||
name:'取新电池',
|
||||
icon:'List'
|
||||
}
|
||||
}else if(n == 5){
|
||||
return {
|
||||
name:'拆旧电池',
|
||||
icon:'Checked'
|
||||
}
|
||||
}else if(n == 6){
|
||||
return {
|
||||
name:'装新电池',
|
||||
icon:'FolderChecked'
|
||||
}
|
||||
}else if(n == 7){
|
||||
return {
|
||||
name:'放旧电池',
|
||||
icon:'Postcard'
|
||||
}
|
||||
}else if(n == 8){
|
||||
return {
|
||||
name:'换电完成',
|
||||
icon:'CircleCheck'
|
||||
}
|
||||
}
|
||||
return {
|
||||
name:'',
|
||||
icon:''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//计费方式
|
||||
function feetype(type:string|number) {
|
||||
if(type == 1){
|
||||
return 'ODO'
|
||||
}
|
||||
if(type == 2){
|
||||
return 'SOC'
|
||||
}
|
||||
if(type == 3){
|
||||
return '换电量'
|
||||
}
|
||||
}
|
||||
|
||||
//换电模式
|
||||
function hdms(type:string|number) {
|
||||
if(type == 1){
|
||||
return '全自动'
|
||||
}
|
||||
if(type == 2){
|
||||
return '半自动'
|
||||
}
|
||||
if(type == 3){
|
||||
return '人工干预'
|
||||
}
|
||||
}
|
||||
|
||||
//批量支付
|
||||
let zfdrawer = ref(false)
|
||||
@ -698,13 +782,15 @@
|
||||
|
||||
let search = ref(true)
|
||||
|
||||
|
||||
|
||||
let queryParams = reactive({
|
||||
pageSize:20, //每页条数
|
||||
pageNo:1, //页数
|
||||
orderNo:'', //订单编码
|
||||
plateNum:'', //车牌号
|
||||
orderTimeBegin:'', //订单时间开始,示例值(yyyy-MM-dd HH:mm:ss)
|
||||
orderTimeEnd:'', //订单时间结束
|
||||
orderTimeBegin:getDateDaysAgo(30,'00:00:00'), //订单时间开始,示例值(yyyy-MM-dd HH:mm:ss)
|
||||
orderTimeEnd:getDateDaysAgo(0,'23:59:59'), //订单时间结束
|
||||
stationCode:'', //换电站编码
|
||||
stationName:'', //换电站名称
|
||||
userId:'', //换电车主ID
|
||||
@ -736,6 +822,7 @@
|
||||
yunList.value = list?list:[]
|
||||
//queryParams.stationCode = list[0].code
|
||||
//getyys()
|
||||
getyys()
|
||||
}
|
||||
})
|
||||
|
||||
@ -752,7 +839,7 @@
|
||||
// mapList.value = res.data;
|
||||
let listss = (res.data as any).records.map((n:any) => {
|
||||
return {
|
||||
value: `用户名:${n.name?n.name:'--'},手机号:${n.phoneNumber?n.phoneNumber:'--'}`,
|
||||
value: `用户名:${n.name?n.name:'暂未设置'},手机号:${n.phoneNumber?n.phoneNumber:'暂未绑定'}`,
|
||||
name: n.name,
|
||||
phoneNumber:n.phoneNumber,
|
||||
id:n.pkId //??
|
||||
@ -789,6 +876,7 @@
|
||||
|
||||
function getyys() {
|
||||
yysList.value.splice(0)
|
||||
total.value = 0
|
||||
getjqrlist(queryParams).then(rps => {
|
||||
if(rps.data){
|
||||
yysList.value = (rps.data as any).records
|
||||
@ -806,8 +894,9 @@
|
||||
let querform = ref()
|
||||
function resetQuery() {
|
||||
querform.value?.resetFields()
|
||||
queryParams.orderTimeBegin = ''
|
||||
queryParams.orderTimeEnd = ''
|
||||
}
|
||||
|
||||
//1-已创建,2-换电中,3-换电完成,4-充电中,5-充电完成,6-待结算,7-已完成,9-已取消
|
||||
|
||||
function getstu(n:any){
|
||||
@ -822,7 +911,7 @@
|
||||
}else if(n == 5){
|
||||
return '充电完成'
|
||||
}else if(n == 6){
|
||||
return '待结算'
|
||||
return '待支付'
|
||||
}else if(n == 7){
|
||||
return '已完成'
|
||||
}
|
||||
@ -835,7 +924,7 @@
|
||||
let ystit = ref('添加电池')
|
||||
let yysRef = ref()
|
||||
let slecas = ref('')
|
||||
let addata = reactive({
|
||||
let addata = reactive<any>({
|
||||
orderType:'', //类型:1-换电,2-充电
|
||||
plateNum:'', //车牌号
|
||||
orderTime:'', //订单时间,示例值(yyyy-MM-dd HH:mm:ss)
|
||||
@ -888,6 +977,19 @@
|
||||
]
|
||||
})
|
||||
|
||||
watch(() => addata.amount, v => {
|
||||
addata.amount = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.basicFee, v => {
|
||||
addata.basicFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.serviceFee, v => {
|
||||
addata.serviceFee = setNum(v)
|
||||
})
|
||||
|
||||
|
||||
//获取换电站名称
|
||||
function getlabel(n:string,type:number = 1){
|
||||
if(type == 1){
|
||||
@ -903,15 +1005,15 @@
|
||||
ystit.value = num == 1?'添加订单':'修改订单'
|
||||
yysRef.value?.resetFields()
|
||||
if(row){
|
||||
addata.orderType = row.orderType
|
||||
addata.orderType = row.orderType+''
|
||||
addata.plateNum = row.plateNum
|
||||
addata.orderTime = row.orderTime
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationName = row.stationName
|
||||
addata.accountCode = row.accountCode
|
||||
addata.amount = row.amount
|
||||
addata.status = row.status
|
||||
addata.feeType = row.feeType
|
||||
addata.amount = row.amount?row.amount/100:0
|
||||
addata.status = row.status?row.status+'':''
|
||||
addata.feeType = row.feeType?row.feeType+'':''
|
||||
addata.basicFee = row.basicFee
|
||||
addata.serviceTimeBegin = row.serviceTimeBegin
|
||||
addata.serviceTimeEnd = row.serviceTimeEnd
|
||||
@ -929,8 +1031,8 @@
|
||||
addata.returnBatRentSoc = row.returnBatRentSoc
|
||||
addata.returnBatRentStationCode = row.returnBatRentStationCode
|
||||
addata.returnBatRentStationName = row.returnBatRentStationName
|
||||
addata.changeMode = row.changeMode
|
||||
addata.changeLane = row.changeLane
|
||||
addata.changeMode = row.changeMode?row.changeMode+'':''
|
||||
addata.changeLane = row.changeLane?row.changeLane+'':''
|
||||
//addata.userId = row.userId
|
||||
addata.tradeNo= row.tradeNo
|
||||
|
||||
@ -1016,7 +1118,7 @@
|
||||
//删除
|
||||
function handleDelete(row:any) {
|
||||
ElMessageBox.confirm(
|
||||
`确定删除订单:${row.batCode}`,
|
||||
`确定删除订单`,
|
||||
'温馨提示',
|
||||
{
|
||||
// confirmButtonText: '',
|
||||
@ -1042,7 +1144,11 @@
|
||||
xqobj.value = n
|
||||
drawer.value = true
|
||||
gethdbz(n.orderNo).then((rps:any) => {
|
||||
hdbz.value = rps.data
|
||||
hdbz.value.splice(0)
|
||||
if(rps.data){
|
||||
hdbz.value = rps.data
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@ -1066,8 +1172,6 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
getyys()
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-divider--horizontal{
|
||||
|
||||
@ -226,7 +226,7 @@
|
||||
//初始查询公司
|
||||
let gongslist = ref<any>([])
|
||||
getlist({
|
||||
pageSize:100, //每页条数
|
||||
pageSize:1000, //每页条数
|
||||
pageNo:1 //页数
|
||||
}).then(rps => {
|
||||
if(rps.data){
|
||||
|
||||
@ -166,6 +166,19 @@
|
||||
|
||||
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="车牌号" prop="plateNum">
|
||||
<el-select v-model="addata.plateNum" placeholder="请选择车牌号">
|
||||
<el-option
|
||||
v-for="n in carlist"
|
||||
:label="n.plateNum"
|
||||
:value="n.plateNum"
|
||||
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input v-model="addata.phone" placeholder="请输入手机号码" clearable />
|
||||
@ -184,7 +197,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="换电日期" prop="swapDay">
|
||||
<el-form-item label="预约日期" prop="swapDay">
|
||||
<el-date-picker
|
||||
v-model="addata.swapDay"
|
||||
value-format="YYYYMMDD"
|
||||
@ -215,14 +228,11 @@
|
||||
<el-option label="14:00 - 15:00" value="14:00-15:00" />
|
||||
<el-option label="15:00 - 16:00" value="15:00-16:00" />
|
||||
<el-option label="16:00 - 17:00" value="16:00-17:00" />
|
||||
<el-option label="17:00 - 18:00" value="17:00-18:00" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="车牌号" prop="plateNum">
|
||||
<el-input v-model="addata.plateNum" placeholder="请输入车牌号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@ -240,22 +250,25 @@
|
||||
} from '@/api/swapstation/hdz'
|
||||
|
||||
import {
|
||||
getjqrlist,
|
||||
getjqrlist,
|
||||
} from '@/api/swapstation/vehicle'
|
||||
|
||||
import {
|
||||
getyylist,
|
||||
addhdz,
|
||||
update,
|
||||
delhdz
|
||||
} from '@/api/order/reservation'
|
||||
import { carNum } from '@/utils/validate'
|
||||
import { carNum,getDateDaysAgo } from '@/utils/validate'
|
||||
|
||||
import {
|
||||
getwxlist
|
||||
} from '@/api/operation/wxuser'
|
||||
|
||||
|
||||
import { formatDate } from '@/utils/ruoyi'
|
||||
// import {
|
||||
// getdict
|
||||
// } from '@/api/systemSet/dict'
|
||||
import { jsonp } from 'vue-jsonp'
|
||||
//import { jsonp } from 'vue-jsonp'
|
||||
import { ref,reactive} from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
@ -264,6 +277,7 @@
|
||||
return formatDate(s)
|
||||
}
|
||||
|
||||
|
||||
let search = ref(true)
|
||||
|
||||
let queryParams = reactive({
|
||||
@ -272,8 +286,8 @@
|
||||
ucode:'', //换电车主ID
|
||||
status:'',
|
||||
plateNum:'', //车牌号
|
||||
swapDayBegin:'', //预约换电日期开始,示例值(yyyyMMdd)
|
||||
swapDayEnd:'', //预约换电日期结束
|
||||
swapDayBegin:getDateDaysAgo(30), //预约换电日期开始,示例值(yyyyMMdd)
|
||||
swapDayEnd:getDateDaysAgo(), //预约换电日期结束
|
||||
stationCode:'' //换电站编码
|
||||
})
|
||||
|
||||
@ -319,7 +333,7 @@
|
||||
|
||||
function getyys() {
|
||||
yysList.value.splice(0)
|
||||
getjqrlist(queryParams).then(rps => {
|
||||
getyylist(queryParams).then(rps => {
|
||||
if(rps.data){
|
||||
//yysList.value = rps.data
|
||||
yysList.value = (rps.data as any).records
|
||||
@ -337,6 +351,10 @@
|
||||
let querform = ref()
|
||||
function resetQuery() {
|
||||
querform.value?.resetFields()
|
||||
|
||||
queryParams.swapDayBegin = ''
|
||||
queryParams.swapDayEnd = ''
|
||||
|
||||
wxuser.value = ''
|
||||
}
|
||||
|
||||
@ -349,8 +367,9 @@
|
||||
let slecas = ref('')
|
||||
let wxuser = ref('')
|
||||
let addata = reactive({
|
||||
source:'2', //来源:1-小程序,2-云端,3-站端
|
||||
userId:'', //预约人ID
|
||||
//ucode:'', //预约人编码
|
||||
ucode:'', //预约人编码
|
||||
uname:'', //预约人姓名
|
||||
phone:'', //手机号码
|
||||
plateNum:'', //车牌号
|
||||
@ -358,7 +377,7 @@
|
||||
stationName:'', //换电站名称
|
||||
swapDay:'', //预约换电日期,示例值(yyyyMMdd)
|
||||
swapDuration:'', //预约换电时间段,示例值(8:00-10:00)
|
||||
status:'1' //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||
//status:'1' //状态:1-预约成功,2-到店使用,3-取消,4-过期
|
||||
|
||||
// source:'2', //来源:1-小程序,2-云端,3-站端
|
||||
// ucode:'', //预约人编码
|
||||
@ -385,24 +404,25 @@
|
||||
{ required: true, message: "请选择换电时间段", trigger: "blur" }
|
||||
],
|
||||
plateNum:[
|
||||
// { required: true, message: "请输入车牌号", trigger: "blur" },
|
||||
{ required: true, message: "请输入车牌号", trigger: "blur" },
|
||||
{ validator:carNum, trigger: "blur"}
|
||||
]
|
||||
})
|
||||
|
||||
//获取微信用户 ?? 暂时调用qq地图接口做个示例
|
||||
//获取微信用户 ??
|
||||
//获取微信用户
|
||||
async function querySearchAsync (queryString: string, cb:any) {
|
||||
getwxlist({
|
||||
pageSize:100, //每页条数
|
||||
pageNo:1, //页数
|
||||
phoneNumber:'' //手机号
|
||||
pageSize:100, //每页条数
|
||||
pageNo:1, //页数
|
||||
phoneNumber:queryString, //手机号
|
||||
// nickName:queryString, //昵称
|
||||
// name: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.name?n.name:'--'}——${n.phoneNumber?n.phoneNumber:'--'}`,
|
||||
value: `${n.name?n.name:'暂未设置姓名'}—${n.phoneNumber?n.phoneNumber:'暂未绑定手机号'}`,
|
||||
name: n.name,
|
||||
phoneNumber:n.phoneNumber,
|
||||
id:n.wuid //??
|
||||
@ -423,17 +443,23 @@
|
||||
function autoblur() {
|
||||
if(addata.userId === ''){
|
||||
wxuser.value = ''
|
||||
addata.plateNum = ''
|
||||
carlist.value.splice(0)
|
||||
}
|
||||
}
|
||||
|
||||
function autoclear() {
|
||||
addata.userId = ''
|
||||
addata.plateNum = ''
|
||||
carlist.value.splice(0)
|
||||
}
|
||||
|
||||
function handleSelect(v: any) {
|
||||
addata.userId = v.id
|
||||
addata.ucode = v.id
|
||||
addata.uname = v.name //预约用户名称
|
||||
addata.phone = v.phoneNumber //预约用户手机
|
||||
getcar(v.id)
|
||||
}
|
||||
|
||||
|
||||
@ -455,35 +481,23 @@
|
||||
addata.stationName = n
|
||||
}
|
||||
|
||||
function showpop(num:any,row?:any){
|
||||
function showpop(num:any){
|
||||
type.value = num
|
||||
openpop.value = true
|
||||
ystit.value = num == 1?'添加预约':'修改预约'
|
||||
ystit.value = '添加预约'
|
||||
yysRef.value?.resetFields()
|
||||
wxuser.value = ''
|
||||
if(row){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
function savehand() {
|
||||
if(type.value == 1){
|
||||
return addhdz(addata)
|
||||
}
|
||||
return update(addata)
|
||||
|
||||
}
|
||||
|
||||
//保存
|
||||
function handleAdd() {
|
||||
|
||||
yysRef.value?.validate((valid:Boolean) => {
|
||||
console.log(addata,'addata')
|
||||
if (valid) {
|
||||
savehand().then(() => {
|
||||
addhdz(addata).then(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: type.value == 1?'预约成功':'修改成功'
|
||||
message: '预约成功'
|
||||
})
|
||||
setTimeout(()=> {
|
||||
openpop.value = false
|
||||
@ -520,6 +534,21 @@
|
||||
})
|
||||
}
|
||||
|
||||
//根据用户id查询车辆
|
||||
let carlist = ref<any>([])
|
||||
function getcar(ownerId:string) {
|
||||
carlist.value.splice(0)
|
||||
getjqrlist({
|
||||
pageSize:100, //每页条数
|
||||
pageNo:1, //页数
|
||||
ownerId //车主ID
|
||||
}).then(rps => {
|
||||
if(rps.data){
|
||||
carlist.value = (rps.data as any).records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getyys()
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
<!-- <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="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="130" align="center" prop="pointName" :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="操作" align="center" width="160" fixed="right">
|
||||
@ -474,10 +474,11 @@
|
||||
addata.sourceFrom = row.sourceFrom+''
|
||||
addata.status = row.status+''
|
||||
addata.pkId = row.pkId
|
||||
addata.productionDate = row.productionDate
|
||||
addata.registrationDate = row.registrationDate
|
||||
addata.sourceCode = row.sourceCode
|
||||
addata.stationCode = row.stationCode
|
||||
addata.productionDate = row.productionDate?row.productionDate:''
|
||||
addata.registrationDate = row.registrationDate?row.registrationDate:''
|
||||
addata.sourceCode = row.sourceCode?row.sourceCode:''
|
||||
addata.stationCode = row.pointCode?row.pointCode:''
|
||||
addata.stationName = row.pointName?row.pointName:''
|
||||
addata.soc = row.soc
|
||||
|
||||
}else{
|
||||
@ -489,7 +490,8 @@
|
||||
addata.productionDate = ''
|
||||
addata.registrationDate = ''
|
||||
addata.sourceCode = ''
|
||||
addata.stationCode = props.zjtype == 1?'':props.stationCode
|
||||
addata.stationCode = props.zjtype == 1?'':props.stationCode
|
||||
addata.stationName = ''
|
||||
addata.soc = ''
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.dccNo}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="300" align="center" prop="stationCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="300" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="状态" min-width="200" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.status == 1">正常</div>
|
||||
@ -95,7 +95,7 @@
|
||||
<el-col v-if="zjtype == 1" :span="24">
|
||||
<el-form-item label="换电站" prop="stationCode">
|
||||
<el-select v-model="addata.stationCode" placeholder="请选择换电站">
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" @click.native="gethdzname(n.name)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -144,10 +144,12 @@
|
||||
const props = withDefaults(defineProps<{
|
||||
zjtype?:string|number
|
||||
stationCode?:string
|
||||
stationName?:string
|
||||
list:any[]
|
||||
}>(), {
|
||||
zjtype:1,
|
||||
stationCode:'',
|
||||
stationName:'',
|
||||
list:() => []
|
||||
})
|
||||
|
||||
@ -237,9 +239,15 @@
|
||||
let addata = reactive({
|
||||
pkId:'',
|
||||
stationCode:'', //换电站编码
|
||||
stationName:'',
|
||||
status:'', //状态:1-正常,2-检修, 3-坏
|
||||
dccNo:'' //电池仓序号
|
||||
})
|
||||
|
||||
function gethdzname(n:string) {
|
||||
addata.stationName = n
|
||||
}
|
||||
|
||||
const rules = ref({
|
||||
stationCode:[
|
||||
{ required: true, message: "请选择换电站", trigger: "blur" }
|
||||
@ -261,13 +269,16 @@
|
||||
yysRef.value?.resetFields()
|
||||
if(row){
|
||||
addata.pkId = row.pkId
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationName = row.stationName
|
||||
addata.status = row.status+''
|
||||
addata.dccNo = row.dccNo+''
|
||||
|
||||
}else{
|
||||
addata.pkId = ''
|
||||
addata.stationCode = props.zjtype == 1?'':props.stationCode
|
||||
addata.stationName = props.zjtype == 1?'':props.stationName
|
||||
|
||||
addata.status = ''
|
||||
addata.dccNo = ''
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.code}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="400" align="center" prop="stationCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="400" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="充电机软件版本" min-width="200" align="center" prop="version" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="充电连接类型" min-width="200" align="center" prop="switchType" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
@ -103,7 +103,7 @@
|
||||
<el-col v-if="zjtype == 1" :span="24">
|
||||
<el-form-item label="换电站" prop="stationCode">
|
||||
<el-select v-model="addata.stationCode" placeholder="请选择换电站">
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" @click.native="gethdzname(n.name)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -179,10 +179,12 @@
|
||||
const props = withDefaults(defineProps<{
|
||||
zjtype?:string|number
|
||||
stationCode?:string
|
||||
stationName?:string
|
||||
list:any[]
|
||||
}>(), {
|
||||
zjtype:1,
|
||||
stationCode:'',
|
||||
stationName:'',
|
||||
list:() => []
|
||||
})
|
||||
|
||||
@ -272,6 +274,7 @@
|
||||
let addata = reactive({
|
||||
pkId:'',
|
||||
stationCode:'', //换电站编码
|
||||
stationName:'',
|
||||
code:'', //充电机编码
|
||||
version:'', //充电机软件版本
|
||||
switchType:'', //充电连接类型:1-连接器,2-充电枪
|
||||
@ -297,7 +300,9 @@
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
function gethdzname(n:string) {
|
||||
addata.stationName = n
|
||||
}
|
||||
|
||||
function showpop(num:any,row?:any){
|
||||
type.value = num
|
||||
@ -306,7 +311,8 @@
|
||||
yysRef.value?.resetFields()
|
||||
if(row){
|
||||
addata.pkId = row.pkId
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationName = row.stationName
|
||||
addata.code = row.code
|
||||
addata.version = row.version
|
||||
addata.switchType = row.switchType+''
|
||||
@ -316,6 +322,8 @@
|
||||
}else{
|
||||
addata.pkId = ''
|
||||
addata.stationCode = props.zjtype == 1?'':props.stationCode
|
||||
addata.stationName = props.zjtype == 1?'':props.stationName
|
||||
|
||||
addata.code = ''
|
||||
addata.version = ''
|
||||
addata.switchType = ''
|
||||
|
||||
@ -16,10 +16,26 @@
|
||||
>
|
||||
<el-table-column min-width="100" label="开始时间" align="center" prop="timeBegin" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="结束时间" align="center" prop="timeEnd" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="每公里收费(元)" align="center" prop="eachKmFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="每SOC收费(元)" align="center" prop="eachSocFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="每度电收费(元)" align="center" prop="eachKwhFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="谷段服务费(元)" align="center" prop="timeServiceFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column min-width="100" label="每公里收费(元)" align="center" prop="eachKmFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachKmFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" label="每SOC收费(元)" align="center" prop="eachSocFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachSocFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" label="每度电收费(元)" align="center" prop="eachKwhFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachKwhFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" label="谷段服务费(元)" align="center" prop="timeServiceFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.timeServiceFee/100}}</div>
|
||||
</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>
|
||||
@ -125,13 +141,15 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
getmxlist,
|
||||
addhdz,
|
||||
update,
|
||||
delhdz
|
||||
} from '@/api/swapstation/costdetails'
|
||||
import { ref,reactive} from 'vue'
|
||||
import {
|
||||
getmxlist,
|
||||
addhdz,
|
||||
update,
|
||||
delhdz
|
||||
} from '@/api/swapstation/costdetails'
|
||||
|
||||
import { setNum } from '@/utils/validate'
|
||||
import { ref,reactive,watch} from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const props = defineProps<{
|
||||
@ -164,7 +182,7 @@
|
||||
let openpop = ref(false)
|
||||
let ystit = ref('添加费用标准明细')
|
||||
let yysRef = ref()
|
||||
let addata = reactive({
|
||||
let addata = reactive<any>({
|
||||
stationCode:props.stationCode, //换电站编码
|
||||
standardId:props.standardId, //收费规则ID
|
||||
timeBegin:'', //开始时间
|
||||
@ -176,6 +194,22 @@
|
||||
timeServiceFee:'' //谷段服务费
|
||||
})
|
||||
|
||||
watch(() => addata.eachKmFee, v => {
|
||||
addata.eachKmFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.eachSocFee, v => {
|
||||
addata.eachSocFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.eachKwhFee, v => {
|
||||
addata.eachKwhFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.timeServiceFee, v => {
|
||||
addata.timeServiceFee = setNum(v)
|
||||
})
|
||||
|
||||
const rules = ref({
|
||||
stationCode:[
|
||||
{ required: true, message: "请选择换电站", trigger: "blur" }
|
||||
@ -215,10 +249,10 @@
|
||||
addata.pkId = row.pkId
|
||||
addata.timeBegin = row.timeBegin
|
||||
addata.timeEnd = row.timeEnd
|
||||
addata.eachKmFee = row.eachKmFee
|
||||
addata.eachSocFee = row.eachSocFee
|
||||
addata.eachKwhFee = row.eachKwhFee
|
||||
addata.timeServiceFee = row.timeServiceFee
|
||||
addata.eachKmFee = row.eachKmFee?row.eachKmFee/100:0
|
||||
addata.eachSocFee = row.eachSocFee?row.eachSocFee/100:0
|
||||
addata.eachKwhFee = row.eachKwhFee?row.eachKwhFee/100:0
|
||||
addata.timeServiceFee = row.timeServiceFee?row.timeServiceFee/100:0
|
||||
|
||||
}else{
|
||||
tiem.value.splice(0)
|
||||
@ -232,10 +266,16 @@
|
||||
}
|
||||
}
|
||||
function savehand() {
|
||||
let addObj = Object.assign({},addata,{
|
||||
eachKmFee:addata.eachKmFee*100,
|
||||
eachSocFee:addata.eachSocFee*100,
|
||||
eachKwhFee:addata.eachKwhFee*100,
|
||||
timeServiceFee:addata.timeServiceFee*100
|
||||
})
|
||||
if(type.value == 1){
|
||||
return addhdz(addata)
|
||||
return addhdz(addObj)
|
||||
}
|
||||
return update(addata)
|
||||
return update(addObj)
|
||||
|
||||
}
|
||||
//保存
|
||||
|
||||
@ -53,12 +53,44 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="换电站" min-width="250" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="正常换电服务费(元)" min-width="140" align="center" prop="commonRemainFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="正常换电服务费(元)" min-width="140" align="center" prop="commonRemainFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.commonRemainFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="换电时正常电量范围" min-width="180" align="center" prop="commonRemainSocRange" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="换电时电量剩余过多的soc界定" min-width="220" align="center" prop="moreRemainSoc" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="换电时电量剩余过多的服务费(元)" min-width="220" align="center" prop="moreRemainFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="换电时电量剩余过多的服务费(元)" min-width="220" align="center" prop="moreRemainFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.moreRemainFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="换电时电量剩余一般的soc界定" min-width="220" align="center" prop="fewRemainSoc" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="换电时电量剩余一般的服务费(元)" min-width="220" align="center" prop="fewRemainFee" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="换电时电量剩余一般的服务费(元)" min-width="220" align="center" prop="fewRemainFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.fewRemainFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="每公里收费(元)" min-width="120" align="center" prop="eachKmFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachKmFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="每SOC收费(元)" min-width="120" align="center" prop="eachSocFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachSocFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="每度电收费(元)" min-width="120" align="center" prop="eachKwhFee" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.eachKwhFee/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template #default="scope">
|
||||
<!-- <el-button link type="primary" icon="Collection" @click="bzmingx(scope.row.pkId)">标准明细</el-button> -->
|
||||
@ -420,7 +452,9 @@
|
||||
update,
|
||||
delhdz
|
||||
} from '@/api/swapstation/swapstation'
|
||||
import { ref,reactive } from 'vue'
|
||||
import { setNum } from '@/utils/validate'
|
||||
|
||||
import { ref,reactive,watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import Tit from '@/views/components/detailstit.vue'
|
||||
import Costdetails from './costdetails.vue'
|
||||
@ -448,7 +482,7 @@
|
||||
//初始查询换电站
|
||||
let yunList = ref<any>([])
|
||||
gethdzlist({
|
||||
pageSize:20, //每页条数
|
||||
pageSize:200, //每页条数
|
||||
pageNo:1, //页数
|
||||
proxyId:'', //归属运营商ID
|
||||
name:'', //站点名称
|
||||
@ -494,7 +528,7 @@
|
||||
let bzName = ref('')
|
||||
let stationCode = ref('')
|
||||
let stationName = ref('')
|
||||
let addata = reactive({
|
||||
let addata = reactive<any>({
|
||||
pkId:'',
|
||||
stationCode:'', //换电站编码
|
||||
dayBegin:'', //开始时间
|
||||
@ -527,6 +561,30 @@
|
||||
]
|
||||
})
|
||||
|
||||
watch(() => addata.commonRemainFee, v => {
|
||||
addata.commonRemainFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.moreRemainFee, v => {
|
||||
addata.moreRemainFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.fewRemainFee, v => {
|
||||
addata.fewRemainFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.eachKmFee, v => {
|
||||
addata.eachKmFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.eachSocFee, v => {
|
||||
addata.eachSocFee = setNum(v)
|
||||
})
|
||||
|
||||
watch(() => addata.eachKwhFee, v => {
|
||||
addata.eachKwhFee = setNum(v)
|
||||
})
|
||||
|
||||
//获取换电站名称
|
||||
function getlabel(n:string){
|
||||
addata.stationName = n
|
||||
@ -553,16 +611,16 @@
|
||||
addata.dayEnd = row.dayEnd.replace(/^(\d{4})(\d{2})(\d{2})$/, '$1-$2-$3')
|
||||
addata.stationName = row.stationName
|
||||
addata.name = row.name
|
||||
addata.commonRemainFee = row.commonRemainFee
|
||||
addata.commonRemainFee = row.commonRemainFee?row.commonRemainFee/100:0
|
||||
addata.commonRemainSocRange = row.commonRemainSocRange
|
||||
addata.moreRemainSoc = row.moreRemainSoc
|
||||
addata.moreRemainFee = row.moreRemainFee
|
||||
addata.moreRemainFee = row.moreRemainFee?row.moreRemainFee/100:0
|
||||
addata.fewRemainSoc = row.fewRemainSoc
|
||||
addata.fewRemainFee = row.fewRemainFee
|
||||
addata.fewRemainFee = row.fewRemainFee?row.fewRemainFee/100:0
|
||||
|
||||
addata.eachKmFee = row.eachKmFee
|
||||
addata.eachSocFee = row.eachSocFee
|
||||
addata.eachKwhFee = row.eachKwhFee
|
||||
addata.eachKmFee = row.eachKmFee?row.eachKmFee/100:0
|
||||
addata.eachSocFee = row.eachSocFee?row.eachSocFee/100:0
|
||||
addata.eachKwhFee = row.eachKwhFee?row.eachKwhFee/100:0
|
||||
|
||||
standardId.value = row.pkId
|
||||
bzName.value = row.name
|
||||
@ -588,10 +646,19 @@
|
||||
}
|
||||
}
|
||||
function savehand() {
|
||||
//后端单位为分 前端单位为元 涉及钱的需乘100
|
||||
let addObj = Object.assign({},addata,{
|
||||
commonRemainFee:addata.commonRemainFee*100,
|
||||
moreRemainFee:addata.moreRemainFee*100,
|
||||
fewRemainFee:addata.fewRemainFee*100,
|
||||
eachKmFee:addata.eachKmFee*100,
|
||||
eachSocFee:addata.eachSocFee*100,
|
||||
eachKwhFee:addata.eachKwhFee*100
|
||||
})
|
||||
if(type.value == 1){
|
||||
return addhdz(addata)
|
||||
return addhdz(addObj)
|
||||
}
|
||||
return update(addata)
|
||||
return update(addObj)
|
||||
|
||||
}
|
||||
//保存
|
||||
|
||||
@ -502,8 +502,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="全天营业" prop="openAllDay">
|
||||
<el-radio-group v-model="addata.openAllDay">
|
||||
<el-radio value="1">是</el-radio>
|
||||
<el-radio value="0">否</el-radio>
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -567,16 +567,18 @@
|
||||
v-if="drawer"
|
||||
zjtype="2"
|
||||
:stationCode="addata.code"
|
||||
:stationName="addata.name"
|
||||
:list="robotlist"
|
||||
@update="getyys"
|
||||
/>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;;border: 1px solid #98c3ef; border-radius: 10px;">
|
||||
<div class="mktit">电机</div>
|
||||
<div class="mktit">充电机</div>
|
||||
<electmach
|
||||
v-if="drawer"
|
||||
zjtype="2"
|
||||
:stationCode="addata.code"
|
||||
:stationName="addata.name"
|
||||
:list="elmlist"
|
||||
@update="getyys"
|
||||
/>
|
||||
@ -587,6 +589,7 @@
|
||||
v-if="drawer"
|
||||
zjtype="2"
|
||||
:stationCode="addata.code"
|
||||
:stationName="addata.name"
|
||||
:list="dcclist"
|
||||
@update="getyys"
|
||||
/>
|
||||
|
||||
@ -61,6 +61,7 @@
|
||||
<el-table-column label="传送方向" min-width="100" align="center" prop="direction" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="消息类型" min-width="100" align="center" prop="type" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="方法" min-width="120" align="center" prop="messageFunction" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" min-width="120" align="center" prop="ctime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="内容" min-width="500" prop="content">
|
||||
<template #default="scope">
|
||||
<div style="word-wrap: break-word;">{{scope.row.content}}</div>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.code}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="200" align="center" prop="stationCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="zjtype == 1" label="换电站" min-width="200" align="center" prop="stationName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="运行模式" min-width="100" align="center" prop="runMode" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.runMode == 1">就地</div>
|
||||
@ -103,7 +103,7 @@
|
||||
<el-col v-if="zjtype == 1" :span="24">
|
||||
<el-form-item label="换电站" prop="stationCode">
|
||||
<el-select v-model="addata.stationCode" placeholder="请选择换电站">
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" />
|
||||
<el-option v-for="n in yunList" :label="n.name" :value="n.code" @click.native="gethdzname(n.name)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -162,10 +162,12 @@
|
||||
const props = withDefaults(defineProps<{
|
||||
zjtype?:string|number
|
||||
stationCode?:string
|
||||
stationName?:string
|
||||
list?:any[]
|
||||
}>(), {
|
||||
zjtype:1,
|
||||
stationCode:'',
|
||||
stationName:'',
|
||||
list:() => []
|
||||
})
|
||||
|
||||
@ -252,13 +254,17 @@
|
||||
let ystit = ref('添加机器人')
|
||||
let yysRef = ref()
|
||||
let slecas = ref('')
|
||||
let addata = reactive({
|
||||
let addata = reactive<any>({
|
||||
pkId:'',
|
||||
stationCode:'', //换电站编码
|
||||
code:'', //机器人编码
|
||||
status:'', //状态:1-正常 2-禁用
|
||||
runMode:'' //运行模式:1-就地,2-远程
|
||||
runMode:'', //运行模式:1-就地,2-远程
|
||||
stationName:''
|
||||
})
|
||||
function gethdzname(n:string) {
|
||||
addata.stationName = n
|
||||
}
|
||||
const rules = ref({
|
||||
stationCode:[
|
||||
{ required: true, message: "请选择换电站", trigger: "blur" }
|
||||
@ -280,7 +286,8 @@
|
||||
yysRef.value?.resetFields()
|
||||
if(row){
|
||||
addata.pkId = row.pkId
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationCode = row.stationCode
|
||||
addata.stationName = row.stationName
|
||||
addata.code = row.code
|
||||
addata.status = row.status+''
|
||||
addata.runMode = row.runMode+''
|
||||
@ -288,6 +295,7 @@
|
||||
}else{
|
||||
addata.pkId = ''
|
||||
addata.stationCode = props.zjtype == 1?'':props.stationCode
|
||||
addata.stationName = props.zjtype == 1?'':props.stationName
|
||||
addata.code = ''
|
||||
addata.status = ''
|
||||
addata.runMode = ''
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="search">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="search">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="querytype(1)">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="querytype(1)">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="search">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="search">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -66,9 +66,14 @@
|
||||
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="poname" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="运营商名称" width="200" align="center" prop="poname" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div @click="showpop(2,scope.row)" style="display: inline-block;color:#16599d;border-bottom: 1px solid #417ebb;cursor:pointer">{{scope.row.poname}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运营商组织机构代码" width="200" align="center" prop="pocode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="区划" width="200" align="center" prop="division" :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" />
|
||||
@ -86,7 +91,7 @@
|
||||
</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="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>
|
||||
@ -171,7 +176,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="addata.contacts"
|
||||
v-model="addata.phone"
|
||||
placeholder="请输入联系电话"
|
||||
maxlength="11"
|
||||
/>
|
||||
@ -181,16 +186,16 @@
|
||||
<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 :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</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 :value="1">启用</el-radio>
|
||||
<el-radio :value="0">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -224,7 +229,7 @@
|
||||
import {
|
||||
getArea
|
||||
} from '@/api/common'
|
||||
import { ref,reactive } from 'vue'
|
||||
import { ref,reactive,watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
let queryParams = reactive({
|
||||
@ -309,6 +314,16 @@
|
||||
{ required: true, message: "请输入运营商组织机构代码", trigger: "blur" },
|
||||
]
|
||||
})
|
||||
|
||||
watch(() => addata.stationCount,v => {
|
||||
addata.stationCount = v.replace(/[^\d]/g,'')
|
||||
})
|
||||
|
||||
watch(() => addata.phone,v => {
|
||||
addata.phone = v.replace(/[^\d]/g,'')
|
||||
})
|
||||
|
||||
|
||||
function showpop(num:any,row?:any){
|
||||
type.value = num
|
||||
openpop.value = true
|
||||
@ -330,7 +345,7 @@
|
||||
addata.phone = row.phone
|
||||
addata.status = row.status
|
||||
addata.readonly = row.readonly
|
||||
addata.stationCount = row.stationCount
|
||||
addata.stationCount = row.stationCount?row.stationCount+'':''
|
||||
}else{
|
||||
slecas.value = ''
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" plain icon="Search" @click="search">搜索</el-button>
|
||||
<el-button type="primary" icon="Search" @click="search">搜索</el-button>
|
||||
<el-button icon="Refresh" plain @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -644,7 +644,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts" name="UserPage">
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
getjqrlist,
|
||||
addhdz,
|
||||
@ -759,7 +759,7 @@
|
||||
|
||||
async function querySearchAsync (queryString: string, cb:any) {
|
||||
getlist({
|
||||
pageSize:100, //每页条数
|
||||
pageSize:1000, //每页条数
|
||||
pageNo:1, //页数
|
||||
cname:queryString
|
||||
}).then((res) => {
|
||||
|
||||
@ -377,11 +377,12 @@
|
||||
addata.stationName = v.stationName
|
||||
addata.totalAmount = v.totalAmount?v.totalAmount/100:0
|
||||
addata.rechargeAmount = v.rechargeAmount?v.rechargeAmount/100:0
|
||||
addata.giftAmount = v.giftAmount?v.giftAmount/100:0
|
||||
addata.point = v.point?v.point/100:0
|
||||
addata.deposit = v.deposit?v.deposit/100:0
|
||||
addata.giftAmount = v.giftAmount?v.giftAmount/100:0
|
||||
|
||||
addata.point = v.point?v.point:0
|
||||
addata.deposit = v.deposit?v.deposit:0
|
||||
addata.snCode = v.snCode?v.snCode:''
|
||||
addata.rent = v.rent?v.rent/100:0
|
||||
addata.rent = v.rent?v.rent:0
|
||||
|
||||
|
||||
iskh.value = true
|
||||
@ -428,9 +429,10 @@
|
||||
|
||||
addata.rechargeAmount = addata.rechargeAmount*100
|
||||
addata.giftAmount = addata.giftAmount*100
|
||||
addata.point = addata.point*100
|
||||
addata.deposit = addata.deposit*100
|
||||
addata.rent = addata.rent*100
|
||||
|
||||
// addata.point = addata.point*100
|
||||
// addata.deposit = addata.deposit*100
|
||||
// addata.rent = addata.rent*100
|
||||
|
||||
|
||||
savehand().then(() => {
|
||||
|
||||
@ -74,11 +74,11 @@
|
||||
<el-table-column label="详细地址" min-width="400" align="center" prop="address" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系人" min-width="130" align="center" prop="contacts" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系电话" min-width="160" align="center" prop="phone" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="账户余额(元)" min-width="100" align="center" prop="accountBalance" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="账户余额(元)" min-width="100" align="center" prop="accountBalance" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<div>{{scope.row.accountBalance/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="状态" min-width="100" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.status == 1">启用</div>
|
||||
@ -184,20 +184,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<!-- <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-form-item label="账户余额(元)" prop="accountBalance">
|
||||
<el-input
|
||||
v-model="addata.accountBalance"
|
||||
placeholder="请输入账户余额"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="logo" prop="logo">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
@ -210,7 +210,7 @@
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="addata.status">
|
||||
@ -302,20 +302,20 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<!-- <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-form-item label="账户余额(元)" prop="accountBalance">
|
||||
<el-input
|
||||
v-model="addata.accountBalance"
|
||||
placeholder="请输入账户余额"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="logo" prop="logo">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
@ -328,7 +328,7 @@
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<!-- </el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="addata.status">
|
||||
@ -455,8 +455,8 @@
|
||||
phone:'', //联系电话
|
||||
status:'', //状态:1-启用,0-禁用
|
||||
logo:'', //logo地址
|
||||
delFlag:'', //删除标识:1-已删除,0-未删除
|
||||
accountBalance:'' //账户余额
|
||||
delFlag:'' //删除标识:1-已删除,0-未删除
|
||||
// accountBalance:'' //账户余额
|
||||
})
|
||||
const rules = ref({
|
||||
division:[
|
||||
@ -476,11 +476,11 @@
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => addata.accountBalance,v => {
|
||||
if(v){
|
||||
addata.accountBalance =setNum(v)
|
||||
}
|
||||
})
|
||||
// watch(() => addata.accountBalance,v => {
|
||||
// if(v){
|
||||
// addata.accountBalance =setNum(v)
|
||||
// }
|
||||
// })
|
||||
|
||||
function showpop(){
|
||||
type.value = 1
|
||||
@ -502,7 +502,7 @@
|
||||
addata.phone = ''
|
||||
addata.status = ''
|
||||
addata.logo = ''
|
||||
addata.accountBalance = ''
|
||||
//addata.accountBalance = ''
|
||||
}
|
||||
function savehand() {
|
||||
if(type.value == 1){
|
||||
@ -515,9 +515,9 @@
|
||||
function handleAdd() {
|
||||
yysRef.value?.validate((valid:Boolean) => {
|
||||
if (valid) {
|
||||
if(addata.accountBalance){
|
||||
(addata.accountBalance as any) = (addata.accountBalance as any)*100
|
||||
}
|
||||
// if(addata.accountBalance){
|
||||
// (addata.accountBalance as any) = (addata.accountBalance as any)*100
|
||||
// }
|
||||
savehand().then(() => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
@ -618,7 +618,7 @@
|
||||
addata.status = row.status
|
||||
addata.logo = row.logo
|
||||
//addata.delFlag = row.delFlag
|
||||
addata.accountBalance = row.accountBalance == null?'':(row.accountBalance/100)+''
|
||||
//addata.accountBalance = row.accountBalance == null?'':(row.accountBalance/100)+''
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,7 +16,9 @@
|
||||
<el-form-item label="手机号" prop="phoneNumber">
|
||||
<el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable style="width: 200px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="用户名称" prop="name">
|
||||
<el-input v-model="queryParams.name" 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>
|
||||
@ -24,11 +26,11 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="app-container" style="margin-bottom: 12px;border-radius: 10px;">
|
||||
<div style="display: flex;justify-content: right;">
|
||||
<!-- <div style="display: flex;justify-content: right;">
|
||||
<el-tooltip class="item" effect="dark" :content="search? '隐藏搜索' : '显示搜索'" placement="top">
|
||||
<el-button size="mini" circle icon="Search" @click="search = !search" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div> -->
|
||||
<el-table
|
||||
style="width:100%;margin-top: 10px;"
|
||||
:data="yysList"
|
||||
@ -198,11 +200,12 @@
|
||||
let queryParams = reactive({
|
||||
pageSize:20, //每页条数
|
||||
pageNo:1, //页数
|
||||
phoneNumber:'' //手机号
|
||||
phoneNumber:'', //手机号
|
||||
name:'' //名称
|
||||
// wuid:'', //微信用户id
|
||||
// nickName:'', //用户昵称
|
||||
// gender:'', //用户性别:1-男;2-女
|
||||
// name:'', //名称
|
||||
|
||||
// type:'', //类型:1-独立账户,2-公司员工子账户
|
||||
// pcode:'' //父账户编码
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user