diff --git a/.env.production b/.env.production
index 7b03b96..bbeca68 100644
--- a/.env.production
+++ b/.env.production
@@ -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'
diff --git a/src/views/system/partner/index.vue b/src/views/system/partner/index.vue
index bb4063a..0e55322 100644
--- a/src/views/system/partner/index.vue
+++ b/src/views/system/partner/index.vue
@@ -195,10 +195,11 @@
>
-->
-
+
+<<<<<<<<< Temporary merge branch 1
-
+
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) {