Merge remote-tracking branch 'origin/tx' into tx

# Conflicts:
#	.env.production
#	src/views/system/partner/index.vue
This commit is contained in:
邱贞招 2024-10-24 15:28:48 +08:00
commit ae9d341026
2 changed files with 33 additions and 8 deletions

View File

@ -9,3 +9,4 @@ ENV = 'production'
# 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/prod-api'
VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api'

View File

@ -195,10 +195,11 @@
></el-option>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色">
<<<<<<<<< Temporary merge branch 1
<el-select v-model="form.roleIds" placeholder="请选择角色">
<el-option
v-for="item in roleOptions"
@ -243,7 +244,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="form.roleIds == 4">
<el-form-item label="分账状态" prop="dividendStatus">
<el-radio-group v-model="form.dividendStatus">
<el-radio
@ -284,6 +285,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "User",
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 },
data() {
return {
@ -321,6 +327,7 @@ export default {
form: {
dividendStatus: "0"
},
inputDividendProportion: 30, //
defaultProps: {
children: "children",
label: "label"
@ -369,9 +376,11 @@ export default {
agentList:[],
//
rules: {
agentId: [
{ required: true, message: "请选择代理商", trigger: "blur" },
],
dividendProportion: [
{ required: true, message: "分账比例不能为空", trigger: "blur" },
{ pattern: /^\d+$/, message: '分账比例必须为正整数', trigger: 'blur' }
],
cityId: [
{ required: true, message: "代理城市不能为空", trigger: "blur" },
@ -409,7 +418,7 @@ export default {
setTimeout(() => {
console.log(this.dicts,'dictsdicts');
}, 200);
// this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg;
@ -418,11 +427,20 @@ export default {
this.getAgentList()
},
methods: {
handleInput() {
//
console.log(111111111111)
const proportion = parseFloat(this.inputDividendProportion);
if (!isNaN(proportion)) {
console.log(22222222222)
this.form.dividendProportion = proportion / 100;
}
},
getAgentList() {
let data = {
pageNum: 1,
pageSize: 30,
}
listAgent(this.addDateRange(data)).then(response => {
console.log(response,'responseresponseresponse');
@ -433,7 +451,7 @@ export default {
// }));
console.log( this.options,' this.options this.options');
});
},
formatDividendProportion(row) {
let dividendProportion = row.dividendProportion;
@ -567,9 +585,11 @@ export default {
this.roleOptions = response.roles;
this.areaOptions = response.areas;
this.$set(this.form, "postIds", response.postIds);
this.$set(this.form, "roleIds", response.roleIds);
// console.log(1111111111111)
this.$set(this.form, "roleIds", response.roleIds[0]);
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.title = "修改系统用户";
this.form.password = "";
@ -603,6 +623,10 @@ export default {
submitForm: function() {
this.$refs["form"].validate(valid => {
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;
if (valid) {
if (this.form.userId != undefined) {