no message

This commit is contained in:
wangh 2024-02-02 09:04:04 +08:00
parent 3bf7dc3b70
commit 6c39c09d98
4 changed files with 185 additions and 109 deletions

View File

@ -239,7 +239,7 @@ import {
export default {
name: "details1",
name: "details",
props:[
'PpurchaseId',
'PorderNumber',
@ -539,6 +539,7 @@ export default {
this.auditFlag=true
}
let judgmentPermissions2 = await this.judgmentPermissions("进货入库");
console.log("judgmentPermissions2",judgmentPermissions2)
if (judgmentPermissions2 > 0){
this.storageFlag = false
}else {

View File

@ -185,125 +185,130 @@
</el-form-item>
<el-row v-if="ruleForm.deptType !== '3'">
<el-col :span="20">
<el-form-item label="额度设置方式" prop="">
<el-radio-group v-model="ruleForm.turnoverType">
<el-radio label=1>无限制</el-radio>
<el-radio label=2>时间限制</el-radio>
<el-radio label=3>预付费</el-radio>
<el-radio label=4>后付费</el-radio>
<el-radio label=5>年付费</el-radio>
<el-radio label=6>可创建油站站点数量</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<template v-if="ruleForm.turnoverType === '2'">
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
<el-date-picker
v-model="ruleForm.turnoverTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</template>
<template v-if="ruleForm.turnoverType === '3'">
<el-col :span="6">
<el-form-item label="预付金额">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
<template v-if="ruleForm.deptType !== '3'">
<el-row >
<el-col :span="20">
<el-form-item label="额度设置方式" prop="">
<el-radio-group v-model="ruleForm.turnoverType" @input="changeTheBillingRule">
<el-radio label=1>无限制</el-radio>
<el-radio label=2>时间限制</el-radio>
<el-radio label=3>预付费</el-radio>
<el-radio label=4>后付费</el-radio>
<el-radio label=5>年付费</el-radio>
<el-radio label=6>可创建油站站点数量</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="可跑流量">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '4'">
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际交易量">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="系统服务费">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '5'">
<el-col :span="10">
<el-form-item label="时间范围">
<template v-if="ruleForm.turnoverType === '2'">
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
<el-date-picker
v-model="ruleForm.turnoverTime"
v-model="timeFrame"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item label="价格">
<el-input v-model="ruleForm.turnoverTime"></el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '3'">
<el-col :span="6">
<el-form-item label="预付金额">
<el-input-number v-model="ruleForm.prepaidAmount" @input="rateCalculation()">
<template slot="append"></template>
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="可跑流量">
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '6'">
<el-col :span="10">
<template v-if="ruleForm.turnoverType === '4'">
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.rates" @input="rateCalculation()">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际交易量">
<el-input v-model="ruleForm.turnoverLimit" :disabled="true">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="系统服务费">
<el-input v-model="ruleForm.prepaidAmount" :disabled="true">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '5'">
<el-col :span="10">
<el-form-item label="时间范围">
<el-date-picker
v-model="ruleForm.timeFrame"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="价格">
<el-input v-model="ruleForm.prepaidAmount"></el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '6'">
<el-col :span="10">
<el-form-item label="可创建油站数量" label-width="110px">
<el-input-number v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
:max="1000" label="可创建油站数量"></el-input-number>
</el-form-item>
</el-col>
</template>
</el-row>
</template>
<el-form-item label="可创建油站数量" label-width="110px">
<el-input-number v-model="ruleForm.turnoverTime" @change="handleChangeInputNumber" :min="1"
:max="1000" label="可创建油站数量"></el-input-number>
</el-form-item>
</el-col>
</template>
</el-row>
<el-row v-if="ruleForm.deptType === '3'">
<el-form-item label="时间范围">
@ -473,14 +478,18 @@ import {
import {getToken} from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import BigNumber from 'bignumber.js';
export default {
export default {
name: "User",
dicts: ['node_type'],
data() {
return {
timeFrame:[],
value10:true,
parentName:'请选择',
cascader:[],
@ -497,9 +506,15 @@ import {
leaderPhone:'',
// parentName:'',
deptName: '',
turnoverLimit: '',
turnoverLimit: 0,
turnoverType: "1",
turnoverTime: '',
turnoverStartTime:null,
turnoverEndTime:null,
rates:0,
storeNum:0,
prepaidAmount:0,
},
@ -653,7 +668,8 @@ import {
message: "请输入正确的手机号码",
trigger: "blur"
}
]
],
oldValue:''
}
};
},
@ -661,7 +677,11 @@ import {
//
deptName(val) {
this.$refs.tree.filter(val);
}
},
'ruleForm.turnoverType': function(newValue,oldValue) {
console.log("oldValue",oldValue)
this.oldValue = oldValue
},
},
filters:{
/* 翻译角色 */
@ -683,7 +703,54 @@ import {
},
components: { Treeselect },
methods: {
//
async changeTheBillingRule(event) {
//
if (this.pdinfo == 2) {
await this.$confirm('此操作将更改计费规则, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.rateClearing()
}).catch(() => {
console.log("event",event)
this.ruleForm.turnoverType = this.oldValue
});
}
},
//
rateClearing () {
this.timeFrame =[]
this.ruleForm.turnoverLimit = 0
this.ruleForm.turnoverTime = ''
this.ruleForm.turnoverStartTime = null
this.ruleForm.turnoverEndTime = null
this.ruleForm.rates = 0
this.ruleForm.storeNum = 0
this.ruleForm.prepaidAmount = 0
},
//
rateCalculation () {
if (this.ruleForm.turnoverType === '3') {
//
const turnoverLimit = new BigNumber(this.ruleForm.prepaidAmount?this.ruleForm.prepaidAmount:0);
//
const feeRate = new BigNumber(this.ruleForm.rates?this.ruleForm.rates:0);
if (feeRate == 0) return
const fee = turnoverLimit.dividedBy(feeRate.dividedBy(100));
this.ruleForm.turnoverLimit = fee.toFixed(2)
}else if (this.ruleForm.turnoverType === '4'){
//
const turnoverLimit = new BigNumber(this.ruleForm.turnoverLimit?this.ruleForm.turnoverLimit:0);
const feeRate = new BigNumber(this.ruleForm.rates?this.ruleForm.rates:0);
if (feeRate == 0) return
const fee = turnoverLimit.times(feeRate.dividedBy(100));
this.ruleForm.prepaidAmount = fee.toFixed(2)
}
},
//
initPage() {
this.activeName= 'list',
@ -748,8 +815,13 @@ import {
submitForms(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.timeFrame){
this.ruleForm.turnoverStartTime = this.timeFrame[0]
this.ruleForm.turnoverEndTime = this.timeFrame[1]
}
deptadd(this.ruleForm).then(res=>{
// console.log(res)
if(res.code == 200){
this.$message({
message: '操作成功',
@ -857,7 +929,6 @@ import {
// this.ruleForm.leaderName = res.data.leaderName
// this.ruleForm.leaderPhone = res.data.leaderPhone
// this.ruleForm.turnoverType = res.data.turnoverType
// this.ruleForm.turnoverTime = res.data.turnoverTime
// this.ruleForm.turnoverType = res.data.turnoverType
if(res.data.status == 'qy'){
this.value10 = true

View File

@ -19,5 +19,6 @@
and mobile like concat('%', #{supplier.mobile}, '%')
</if>
</where>
order by create_time desc
</select>
</mapper>

View File

@ -42,6 +42,9 @@ public class UserRealm extends AuthorizingRealm {
//根据用户名去数据库查询用户信息
LambdaQueryWrapper<TAccount> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(TAccount::getAccountName,accountName);
queryWrapper.eq(TAccount::getAccountStatus,"1");
// queryWrapper.eq(TAccount::getIsActive,"1");
TAccount tAccount = accountMapper.selectOne(queryWrapper);
if (tAccount == null) {
throw new AccountException("用户名不正确");