Merge remote-tracking branch 'origin/tx' into tx
# Conflicts: # .env.production # src/views/system/partner/index.vue
This commit is contained in:
commit
ae9d341026
|
@ -9,3 +9,4 @@ ENV = 'production'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.21:8090'
|
# VUE_APP_BASE_API = 'http://192.168.2.21:8090'
|
||||||
# VUE_APP_BASE_API = 'https://zc.chuangtewl.com'
|
# VUE_APP_BASE_API = 'https://zc.chuangtewl.com'
|
||||||
VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api'
|
VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api'
|
||||||
|
VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api'
|
||||||
|
|
|
@ -195,10 +195,11 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色">
|
||||||
|
<<<<<<<<< Temporary merge branch 1
|
||||||
<el-select v-model="form.roleIds" placeholder="请选择角色">
|
<el-select v-model="form.roleIds" placeholder="请选择角色">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
|
@ -243,7 +244,7 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="form.roleIds == 4">
|
||||||
<el-form-item label="分账状态" prop="dividendStatus">
|
<el-form-item label="分账状态" prop="dividendStatus">
|
||||||
<el-radio-group v-model="form.dividendStatus">
|
<el-radio-group v-model="form.dividendStatus">
|
||||||
<el-radio
|
<el-radio
|
||||||
|
@ -284,6 +285,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
dicts: ['sys_normal_disable', 'sys_user_sex','et_dividend_item','rl_user_type','rl_dividend_switch'],
|
dicts: ['sys_normal_disable', 'sys_user_sex','et_dividend_item','rl_user_type','rl_dividend_switch'],
|
||||||
|
computed: {
|
||||||
|
filteredRoleOptions() {
|
||||||
|
return this.roleOptions.filter(item => item.roleKey !== 'common' && item.roleKey !== 'agent');
|
||||||
|
},
|
||||||
|
},
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -321,6 +327,7 @@ export default {
|
||||||
form: {
|
form: {
|
||||||
dividendStatus: "0"
|
dividendStatus: "0"
|
||||||
},
|
},
|
||||||
|
inputDividendProportion: 30, // 用于输入的百分比
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label"
|
||||||
|
@ -369,9 +376,11 @@ export default {
|
||||||
agentList:[],
|
agentList:[],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
agentId: [
|
||||||
|
{ required: true, message: "请选择代理商", trigger: "blur" },
|
||||||
|
],
|
||||||
dividendProportion: [
|
dividendProportion: [
|
||||||
{ required: true, message: "分账比例不能为空", trigger: "blur" },
|
{ required: true, message: "分账比例不能为空", trigger: "blur" },
|
||||||
{ pattern: /^\d+$/, message: '分账比例必须为正整数', trigger: 'blur' }
|
|
||||||
],
|
],
|
||||||
cityId: [
|
cityId: [
|
||||||
{ required: true, message: "代理城市不能为空", trigger: "blur" },
|
{ required: true, message: "代理城市不能为空", trigger: "blur" },
|
||||||
|
@ -409,7 +418,7 @@ export default {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(this.dicts,'dictsdicts');
|
console.log(this.dicts,'dictsdicts');
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
||||||
// this.getDeptTree();
|
// this.getDeptTree();
|
||||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
this.initPassword = response.msg;
|
this.initPassword = response.msg;
|
||||||
|
@ -418,11 +427,20 @@ export default {
|
||||||
this.getAgentList()
|
this.getAgentList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleInput() {
|
||||||
|
// 当输入时,将输入的百分比转换为原始值
|
||||||
|
console.log(111111111111)
|
||||||
|
const proportion = parseFloat(this.inputDividendProportion);
|
||||||
|
if (!isNaN(proportion)) {
|
||||||
|
console.log(22222222222)
|
||||||
|
this.form.dividendProportion = proportion / 100;
|
||||||
|
}
|
||||||
|
},
|
||||||
getAgentList() {
|
getAgentList() {
|
||||||
let data = {
|
let data = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 30,
|
pageSize: 30,
|
||||||
|
|
||||||
}
|
}
|
||||||
listAgent(this.addDateRange(data)).then(response => {
|
listAgent(this.addDateRange(data)).then(response => {
|
||||||
console.log(response,'responseresponseresponse');
|
console.log(response,'responseresponseresponse');
|
||||||
|
@ -433,7 +451,7 @@ export default {
|
||||||
// }));
|
// }));
|
||||||
console.log( this.options,' this.options this.options');
|
console.log( this.options,' this.options this.options');
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
formatDividendProportion(row) {
|
formatDividendProportion(row) {
|
||||||
let dividendProportion = row.dividendProportion;
|
let dividendProportion = row.dividendProportion;
|
||||||
|
@ -567,9 +585,11 @@ export default {
|
||||||
this.roleOptions = response.roles;
|
this.roleOptions = response.roles;
|
||||||
this.areaOptions = response.areas;
|
this.areaOptions = response.areas;
|
||||||
this.$set(this.form, "postIds", response.postIds);
|
this.$set(this.form, "postIds", response.postIds);
|
||||||
this.$set(this.form, "roleIds", response.roleIds);
|
this.$set(this.form, "roleIds", response.roleIds[0]);
|
||||||
// console.log(1111111111111)
|
|
||||||
this.$set(this.form, "areas", response.areas);
|
this.$set(this.form, "areas", response.areas);
|
||||||
|
this.form.roleIds = response.roleIds[0]; // 取出第一个角色 ID
|
||||||
|
console.log("回显-=====roleIds[0]",response.roleIds[0])
|
||||||
|
this.inputDividendProportion = this.form.dividendProportion * 100;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改系统用户";
|
this.title = "修改系统用户";
|
||||||
this.form.password = "";
|
this.form.password = "";
|
||||||
|
@ -603,6 +623,10 @@ export default {
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
this.form.userType = '03';
|
this.form.userType = '03';
|
||||||
|
this.form.roleIds = [this.form.roleIds];
|
||||||
|
console.log("提交roleIds=========="+this.form.roleIds)
|
||||||
|
this.form.dividendProportion = this.inputDividendProportion; // 转换为0.3
|
||||||
|
// console.log('保存的分账比例:', this.form.dividendProportion);
|
||||||
this.form.dividendStatus = this.form.dividendStatus === "1" ? 1:0;
|
this.form.dividendStatus = this.form.dividendStatus === "1" ? 1:0;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user