|
|
|
@ -4,13 +4,16 @@ |
|
|
|
|
class="form" |
|
|
|
|
:disabled="disabled" |
|
|
|
|
v-loading="loading"> |
|
|
|
|
<el-form-item label="策略名称" |
|
|
|
|
prop="fundName"> |
|
|
|
|
<el-input class="w-[320px]" |
|
|
|
|
placeholder="请输入20以内字符" |
|
|
|
|
maxlength="20" |
|
|
|
|
clearable |
|
|
|
|
v-model="strategyName"></el-input> |
|
|
|
|
<el-form-item label="策略名称"> |
|
|
|
|
<div> |
|
|
|
|
<el-input class="w-[320px]" |
|
|
|
|
placeholder="请输入20以内字符" |
|
|
|
|
maxlength="20" |
|
|
|
|
clearable |
|
|
|
|
v-model="strategyName" /> |
|
|
|
|
<p v-if="bankIds.length" |
|
|
|
|
class="text-danger">不同步已关联产品,请修改策略名称。</p> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="策略规则"> |
|
|
|
|
<el-table class="c-table" |
|
|
|
@ -325,6 +328,7 @@ const units: Array<string> = ['年', '月', '天']; |
|
|
|
|
const have: Array<string> = ['无', '有']; |
|
|
|
|
const loading = ref<boolean>(false); |
|
|
|
|
const syncVisible = ref<boolean>(false); |
|
|
|
|
const bankIds = ref<Record<string, any>[]>([]); |
|
|
|
|
// 配置项 |
|
|
|
|
const getConfig = async () => { |
|
|
|
|
const { process } = await getProcessInformationBasedOnRoles(154); |
|
|
|
@ -361,6 +365,15 @@ const getDetail = async () => { |
|
|
|
|
info.value = data; |
|
|
|
|
} |
|
|
|
|
getConfig(); |
|
|
|
|
|
|
|
|
|
// 编辑需要判断是否有绑定产品 |
|
|
|
|
if (strategyId.value && !props.disabled) { |
|
|
|
|
const res = await isTheStrategyRelatedToTheProduct({ |
|
|
|
|
tacticsId: strategyId.value, |
|
|
|
|
strategyType: 5, |
|
|
|
|
}); |
|
|
|
|
if (res.isRelated) bankIds.value = res.bankIds; |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -431,6 +444,7 @@ const submit = async (synchronizeUpdate?: number) => { |
|
|
|
|
strategyName: strategyName.value, |
|
|
|
|
synchronizeUpdate, |
|
|
|
|
enterpriseBlacklistList: param, |
|
|
|
|
bankIds: bankIds.value, |
|
|
|
|
}); |
|
|
|
|
getStat(295); |
|
|
|
|
addRecord(param); |
|
|
|
@ -442,16 +456,8 @@ const confirmSubmit = async () => { |
|
|
|
|
if (!strategyName.value) return ElMessage.error('请输入策略名称!'); |
|
|
|
|
|
|
|
|
|
// 编辑需要判断是否有绑定产品 |
|
|
|
|
if (strategyId.value) { |
|
|
|
|
const res = await isTheStrategyRelatedToTheProduct({ |
|
|
|
|
tacticsId: strategyId.value, |
|
|
|
|
strategyType: 5, |
|
|
|
|
}); |
|
|
|
|
if (res.isRelated) { |
|
|
|
|
syncVisible.value = true; |
|
|
|
|
} else { |
|
|
|
|
submit(); |
|
|
|
|
} |
|
|
|
|
if (bankIds.value.length) { |
|
|
|
|
syncVisible.value = true; |
|
|
|
|
} else { |
|
|
|
|
submit(); |
|
|
|
|
} |
|
|
|
|