This commit is contained in:
2026-06-09 09:50:09 +08:00
parent d0caafca06
commit d85f6d9cb1
2 changed files with 11 additions and 9 deletions

View File

@ -458,7 +458,8 @@ const marketFormRules = computed(() => rules(marketForm.value, undefined, dialog
const marketFormRef = ref() const marketFormRef = ref()
const marketFormItemOptions = computed(() => { const marketFormItemOptions = computed(() => {
return marketFormItem.map((item) => { return marketFormItem.map((item) => {
if (item.prop === 'parentAccountName' || item.prop === 'level') { //
if (item.prop === 'accountName' || item.prop === 'parentAccountName' || item.prop === 'level') {
return { ...item, disabled: dialogType.value === 'edit' } return { ...item, disabled: dialogType.value === 'edit' }
} }
// (level='3') is_base_ts // (level='3') is_base_ts
@ -1220,6 +1221,7 @@ const handleSubmit = async () => {
if (selectedRow.value.role_id * 1 === 6 && selectedRow.value.type * 1 === 2) flag = 2 if (selectedRow.value.role_id * 1 === 6 && selectedRow.value.type * 1 === 2) flag = 2
const params: Record<string, any> = { const params: Record<string, any> = {
user_id: selectedRow.value.id, user_id: selectedRow.value.id,
username: marketForm.value.accountName,
toucun_percent: marketForm.value.positionRatio, toucun_percent: marketForm.value.positionRatio,
point_diffs_json: JSON.stringify(pointDiffObj), point_diffs_json: JSON.stringify(pointDiffObj),
risk_control_id: marketForm.value.riskControlTemplate, risk_control_id: marketForm.value.riskControlTemplate,

View File

@ -70,10 +70,10 @@ export const rules = (marketForm: any, row?: any, isEdit?: boolean): FormRules =
return callback(new Error('头寸最多保留2位小数')); return callback(new Error('头寸最多保留2位小数'));
} }
// 不超过上级最大头寸校验 // // 不超过上级最大头寸校验
if (marketForm.maxPositionRatio && numValue > Number(marketForm.maxPositionRatio)) { // if (marketForm.maxPositionRatio && numValue > Number(marketForm.maxPositionRatio)) {
return callback(new Error(`头寸不能超过上级账户的最大头寸(${marketForm.maxPositionRatio})`)); // return callback(new Error(`头寸不能超过上级账户的最大头寸(${marketForm.maxPositionRatio})`));
} // }
callback(); callback();
}, },
@ -104,10 +104,10 @@ export const rules = (marketForm: any, row?: any, isEdit?: boolean): FormRules =
return callback(new Error('手续费比例最多保留2位小数')); return callback(new Error('手续费比例最多保留2位小数'));
} }
// 不超过上级最大手续费比例校验 // // 不超过上级最大手续费比例校验
if (marketForm.maxCommissionRatio && numValue > Number(marketForm.maxCommissionRatio)) { // if (marketForm.maxCommissionRatio && numValue > Number(marketForm.maxCommissionRatio)) {
return callback(new Error(`手续费比例不能超过上级账户的最大比例(${marketForm.maxCommissionRatio})`)); // return callback(new Error(`手续费比例不能超过上级账户的最大比例(${marketForm.maxCommissionRatio})`));
} // }
callback(); callback();
}, },