diff --git a/fuintAdmin/src/views/convenienceStore/purchase/details.vue b/fuintAdmin/src/views/convenienceStore/purchase/details.vue index 2e6b8322d..152363b97 100644 --- a/fuintAdmin/src/views/convenienceStore/purchase/details.vue +++ b/fuintAdmin/src/views/convenienceStore/purchase/details.vue @@ -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 { diff --git a/fuintAdmin_zt/src/views/Site/index.vue b/fuintAdmin_zt/src/views/Site/index.vue index e991af37c..3e9fbf31e 100644 --- a/fuintAdmin_zt/src/views/Site/index.vue +++ b/fuintAdmin_zt/src/views/Site/index.vue @@ -185,125 +185,130 @@ - - - - - 无限制 - 时间限制 - 预付费 - 后付费 - 年付费 - 可创建油站站点数量 - - - - - - - - - - @@ -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 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml index 04505077f..f3f8c7080 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/convenienceSore/mapper/xml/SupplierMapper.xml @@ -19,5 +19,6 @@ and mobile like concat('%', #{supplier.mobile}, '%') + order by create_time desc \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/UserRealm.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/UserRealm.java index 99b450238..150e1e12e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/UserRealm.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/UserRealm.java @@ -42,6 +42,9 @@ public class UserRealm extends AuthorizingRealm { //根据用户名去数据库查询用户信息 LambdaQueryWrapper 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("用户名不正确");