9.9
This commit is contained in:
parent
5e3bf43642
commit
cc71deba29
@ -408,7 +408,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :title="addMerchantTitile" :visible.sync="addMerchants" width="550px">
|
<el-dialog :title="addMerchantTitile" :visible.sync="addMerchants" width="550px">
|
||||||
<el-form :model="form" ref="formAdd" :rules="rules">
|
<el-form :model="form" ref="formAdd" :rules="rules" :inline="true">
|
||||||
<el-form-item label="所属机构" :label-width="formLabelWidth" prop="deptId">
|
<el-form-item label="所属机构" :label-width="formLabelWidth" prop="deptId">
|
||||||
<el-select v-model="form.deptId+''" disabled placeholder="请选择所属机构" style="width: 350px">
|
<el-select v-model="form.deptId+''" disabled placeholder="请选择所属机构" style="width: 350px">
|
||||||
<el-option
|
<el-option
|
||||||
@ -457,11 +457,11 @@
|
|||||||
<el-dialog :title="Ruletitle" :visible.sync="addRule">
|
<el-dialog :title="Ruletitle" :visible.sync="addRule">
|
||||||
<el-form :model="formRule" ref="formRule" :rules="rules">
|
<el-form :model="formRule" ref="formRule" :rules="rules">
|
||||||
<el-form-item label="规则名称" :label-width="formLabelWidth" prop="ruleName">
|
<el-form-item label="规则名称" :label-width="formLabelWidth" prop="ruleName">
|
||||||
<el-input v-model="formRule.ruleName" placeholder="请输入规则名称" autocomplete="off" style="width: 350px" :disabled="!isEditable"></el-input>
|
<el-input v-model="formRule.ruleName" placeholder="请输入规则名称" autocomplete="off" style="width: 350px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规则描述" :label-width="formLabelWidth">
|
<el-form-item label="规则描述" :label-width="formLabelWidth">
|
||||||
<el-input type="textarea" v-model="formRule.description" placeholder="请输入规则描述" autocomplete="off"
|
<el-input type="textarea" v-model="formRule.description" placeholder="请输入规则描述" autocomplete="off"
|
||||||
style="width: 350px" :disabled="!isEditable"></el-input>
|
style="width: 350px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规则类型" :label-width="formLabelWidth" prop="ruleType">
|
<el-form-item label="规则类型" :label-width="formLabelWidth" prop="ruleType">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
@ -495,7 +495,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="交易占比" :label-width="formLabelWidth">
|
<el-form-item label="交易占比" :label-width="formLabelWidth">
|
||||||
|
|
||||||
<el-input v-model="item.proportion" placeholder="请输入交易占比" autocomplete="off" style="width: 300px" :disabled="!isEditable">
|
<el-input v-model="item.proportion" placeholder="请输入交易占比" autocomplete="off" style="width: 300px">
|
||||||
<template slot="append">%</template>
|
<template slot="append">%</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -569,7 +569,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%">
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%">
|
||||||
<el-form :model="form1" ref="form1" :rules="rules">
|
<el-form :model="form1" ref="form1" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="支付通道" :label-width="formLabelWidth" prop="merchantName" width="300px">
|
<el-form-item label="支付通道" :label-width="formLabelWidth" prop="merchantName" width="300px">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form1.merchantName"
|
v-model="form1.merchantName"
|
||||||
@ -690,7 +690,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
addRuleConfig,
|
addRuleConfig,
|
||||||
deleteRuleConfig,
|
deleteRuleConfig,
|
||||||
editRuleConfig,
|
editRuleConfig, enableRuleConfig,
|
||||||
getOilGunList,
|
getOilGunList,
|
||||||
getRuleConfig,
|
getRuleConfig,
|
||||||
listRuleConfig, listRuleConfigs
|
listRuleConfig, listRuleConfigs
|
||||||
@ -724,7 +724,7 @@ export default {
|
|||||||
desc: ''
|
desc: ''
|
||||||
},
|
},
|
||||||
form1: {},
|
form1: {},
|
||||||
formLabelWidth: '80px',
|
formLabelWidth: '100px',
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogVisibleList: false,
|
dialogVisibleList: false,
|
||||||
@ -794,6 +794,7 @@ export default {
|
|||||||
if (res.data === 1) {
|
if (res.data === 1) {
|
||||||
this.$modal.msgSuccess("启用成功")
|
this.$modal.msgSuccess("启用成功")
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.tableData1list()
|
||||||
this.Enable = false
|
this.Enable = false
|
||||||
}else {
|
}else {
|
||||||
this.$modal.msgError("启用失败,请确保交易占比相加满足百分之百")
|
this.$modal.msgError("启用失败,请确保交易占比相加满足百分之百")
|
||||||
@ -851,6 +852,7 @@ export default {
|
|||||||
if (res.data === 1) {
|
if (res.data === 1) {
|
||||||
this.$modal.msgSuccess("修改成功")
|
this.$modal.msgSuccess("修改成功")
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.tableData1list()
|
||||||
this.addRule = false
|
this.addRule = false
|
||||||
}else {
|
}else {
|
||||||
this.$modal.msgError("规则名称不可重复")
|
this.$modal.msgError("规则名称不可重复")
|
||||||
@ -863,6 +865,7 @@ export default {
|
|||||||
if (res.data == 1) {
|
if (res.data == 1) {
|
||||||
this.$modal.msgSuccess("添加成功");
|
this.$modal.msgSuccess("添加成功");
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.tableData1list()
|
||||||
this.addRule = false
|
this.addRule = false
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError("添加失败,规则名称不可重复")
|
this.$modal.msgError("添加失败,规则名称不可重复")
|
||||||
@ -1226,11 +1229,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 商户分账列表
|
// 商户分账列表
|
||||||
tableData1list() {
|
tableData1list() {
|
||||||
listRuleConfigs().then(response => {
|
// listRuleConfigs().then(response => {
|
||||||
|
//
|
||||||
|
// console.log(response.data + " -==- -==-")
|
||||||
|
|
||||||
console.log(response.data + " -==- -==-")
|
// this.tableData1 = response.data;
|
||||||
|
|
||||||
this.tableData1 = response.data;
|
|
||||||
/*this.merchantList.forEach(item => {
|
/*this.merchantList.forEach(item => {
|
||||||
if (item.isOpenRule == "1") {
|
if (item.isOpenRule == "1") {
|
||||||
this.value1 = false;
|
this.value1 = false;
|
||||||
@ -1241,6 +1244,9 @@ export default {
|
|||||||
listOilConfig().then(response => {
|
listOilConfig().then(response => {
|
||||||
this.oilConfigList = response.data;
|
this.oilConfigList = response.data;
|
||||||
})*/
|
})*/
|
||||||
|
// })
|
||||||
|
listRuleConfig().then(res => {
|
||||||
|
this.tableData1 = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
@ -1275,7 +1281,7 @@ export default {
|
|||||||
|
|
||||||
.new-box {
|
.new-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80vh;
|
height: 89vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||||
import com.fuint.api.fuyou.vo.MerchantConfigVo;
|
import com.fuint.api.fuyou.vo.MerchantConfigVo;
|
||||||
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -40,8 +42,9 @@ public class MerchantConfigController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public ResponseObject list(){
|
public ResponseObject list(){
|
||||||
List<MerchantConfig> list = merchantConfigService.selectMerchList();
|
// List<MerchantConfig> list = merchantConfigService.selectMerchList();
|
||||||
return getSuccessResult(list);
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
return getSuccessResult(merchantConfigService.selectMerchList(nowAccountInfo.getStoreId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list2")
|
@GetMapping("/list2")
|
||||||
|
@ -11,6 +11,8 @@ import com.fuint.api.fuyou.service.OilConfigService;
|
|||||||
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
|
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
|
||||||
import com.fuint.api.fuyou.vo.OilConfigVo;
|
import com.fuint.api.fuyou.vo.OilConfigVo;
|
||||||
import com.fuint.api.fuyou.vo.PaymentRuleConfigVo;
|
import com.fuint.api.fuyou.vo.PaymentRuleConfigVo;
|
||||||
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.TokenUtil;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@ -30,6 +32,10 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) {
|
public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) {
|
||||||
|
if (ObjectUtil.isEmpty(paymentRuleConfig.getStoreId())){
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
paymentRuleConfig.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
}
|
||||||
List<PaymentRuleConfigVo> list = baseMapper.selectListByStoreId(paymentRuleConfig);
|
List<PaymentRuleConfigVo> list = baseMapper.selectListByStoreId(paymentRuleConfig);
|
||||||
for (PaymentRuleConfig ruleConfig : list) {
|
for (PaymentRuleConfig ruleConfig : list) {
|
||||||
List<OilConfigVo> oilConfigs = oilConfigService.selectListByRuleConfigId(ruleConfig.getId());
|
List<OilConfigVo> oilConfigs = oilConfigService.selectListByRuleConfigId(ruleConfig.getId());
|
||||||
@ -76,6 +82,11 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
|||||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig)){
|
if (ObjectUtil.isNotEmpty(paymentRuleConfig)){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isEmpty(ruleConfig.getStoreId())){
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
ruleConfig.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
ruleConfig.setDeptId(Math.toIntExact(nowAccountInfo.getDeptId()));
|
||||||
|
}
|
||||||
int row = baseMapper.insert(ruleConfig);
|
int row = baseMapper.insert(ruleConfig);
|
||||||
paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
||||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig)) {
|
if (ObjectUtil.isNotEmpty(paymentRuleConfig)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user