|
@ -1097,6 +1097,9 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
} |
|
|
} |
|
|
if (data.configuration) { |
|
|
if (data.configuration) { |
|
|
formData.value.configuration = JSON.parse(data.configuration) |
|
|
formData.value.configuration = JSON.parse(data.configuration) |
|
|
|
|
|
if(!Array.isArray(formData.value.configuration.overflowLocationCode)&&formData.value.configuration.overflowLocationCode.length>0){ |
|
|
|
|
|
formData.value.configuration.overflowLocationCode = formData.value.configuration.overflowLocationCode.split(',') |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 判断是获取客户列表还是供应上列表 |
|
|
// 判断是获取客户列表还是供应上列表 |
|
@ -1198,6 +1201,10 @@ const submitForm = async () => { |
|
|
Value:str |
|
|
Value:str |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
let configuration = {...formData.value.configuration} |
|
|
|
|
|
if(Array.isArray(configuration.overflowLocationCode)){ |
|
|
|
|
|
configuration.overflowLocationCode = configuration.overflowLocationCode.join(',') |
|
|
|
|
|
} |
|
|
let data = { |
|
|
let data = { |
|
|
id: formData.value.id, |
|
|
id: formData.value.id, |
|
|
strategyCode: formData.value.strategyCode, //策略代码 |
|
|
strategyCode: formData.value.strategyCode, //策略代码 |
|
@ -1207,7 +1214,7 @@ const submitForm = async () => { |
|
|
status: formData.value.status ? 0 : 1, //状态 |
|
|
status: formData.value.status ? 0 : 1, //状态 |
|
|
//规则条件集合 |
|
|
//规则条件集合 |
|
|
condition: JSON.stringify(arr), |
|
|
condition: JSON.stringify(arr), |
|
|
configuration: JSON.stringify(formData.value.configuration) |
|
|
configuration:JSON.stringify(configuration) |
|
|
} |
|
|
} |
|
|
if (formType.value === 'create') { |
|
|
if (formType.value === 'create') { |
|
|
await RuleApi.createRule(data) |
|
|
await RuleApi.createRule(data) |
|
|