From 0aeb30a0009fedce26008f5df8edba578eefb6f9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 10 May 2024 11:00:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=96=E7=95=A5=E5=90=8C=E6=AD=A5=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/afterLoan/1029/Detail.vue | 36 +++++++++-------- src/views/product/afterLoan/1030/Detail.vue | 36 +++++++++-------- src/views/product/afterLoan/1031/Detail.vue | 36 +++++++++-------- src/views/product/afterLoan/1032/Detail.vue | 36 +++++++++-------- src/views/product/afterLoan/1033/Detail.vue | 36 +++++++++-------- src/views/product/interestRate/772/Detail.vue | 36 +++++++++-------- src/views/product/interestRate/935/Detail.vue | 36 +++++++++-------- src/views/product/interestRate/936/Detail.vue | 36 +++++++++-------- src/views/product/strategy/150/Detail.vue | 36 +++++++++-------- src/views/product/strategy/151/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/152/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/153/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/154/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/155/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/156/Detail.vue | 40 +++++++++++-------- src/views/product/strategy/512/Detail.vue | 36 +++++++++-------- src/views/product/strategy/513/Detail.vue | 36 +++++++++-------- 17 files changed, 358 insertions(+), 278 deletions(-) diff --git a/src/views/product/afterLoan/1029/Detail.vue b/src/views/product/afterLoan/1029/Detail.vue index 63d6ec1..f32a841 100644 --- a/src/views/product/afterLoan/1029/Detail.vue +++ b/src/views/product/afterLoan/1029/Detail.vue @@ -6,11 +6,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 14, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -220,17 +233,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 14, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/afterLoan/1030/Detail.vue b/src/views/product/afterLoan/1030/Detail.vue index 596813e..ccd8287 100644 --- a/src/views/product/afterLoan/1030/Detail.vue +++ b/src/views/product/afterLoan/1030/Detail.vue @@ -6,11 +6,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 15, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -235,17 +248,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 15, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/afterLoan/1031/Detail.vue b/src/views/product/afterLoan/1031/Detail.vue index 1dfa92e..14e18a2 100644 --- a/src/views/product/afterLoan/1031/Detail.vue +++ b/src/views/product/afterLoan/1031/Detail.vue @@ -6,11 +6,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 16, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -420,17 +433,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 16, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/afterLoan/1032/Detail.vue b/src/views/product/afterLoan/1032/Detail.vue index 663b79e..9ecc78a 100644 --- a/src/views/product/afterLoan/1032/Detail.vue +++ b/src/views/product/afterLoan/1032/Detail.vue @@ -6,11 +6,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 17, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -177,17 +190,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 17, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/afterLoan/1033/Detail.vue b/src/views/product/afterLoan/1033/Detail.vue index 5efacc6..c534113 100644 --- a/src/views/product/afterLoan/1033/Detail.vue +++ b/src/views/product/afterLoan/1033/Detail.vue @@ -5,11 +5,15 @@ class="form" :disabled="disabled"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 18, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -221,17 +234,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 18, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/interestRate/772/Detail.vue b/src/views/product/interestRate/772/Detail.vue index e7eba0c..10bb6dc 100644 --- a/src/views/product/interestRate/772/Detail.vue +++ b/src/views/product/interestRate/772/Detail.vue @@ -4,11 +4,15 @@ label-suffix=":" :disabled="disabled"> - +
+ +

不同步已关联产品,请修改策略名称。

+
@@ -205,6 +209,15 @@ const getDetail = async () => { info.value = data.individualCreditModels; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (id.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: id.value, + strategyType: 10, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -335,17 +348,8 @@ const confirmSubmit = async () => { if (!modelName.value) return ElMessage.error('请输入模型名称!'); // 编辑需要判断是否有绑定产品 - if (id.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: id.value, - strategyType: 10, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/interestRate/935/Detail.vue b/src/views/product/interestRate/935/Detail.vue index b8a1589..44d8563 100644 --- a/src/views/product/interestRate/935/Detail.vue +++ b/src/views/product/interestRate/935/Detail.vue @@ -5,11 +5,15 @@ class="form" :disabled="disabled"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ } } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (id.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: id.value, + strategyType: 12, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -287,17 +300,8 @@ const confirmSubmit = async () => { if (!modelName.value) return ElMessage.error('请输入模型名称!'); // 编辑需要判断是否有绑定产品 - if (id.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: id.value, - strategyType: 12, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/interestRate/936/Detail.vue b/src/views/product/interestRate/936/Detail.vue index ac3346e..1a020a2 100644 --- a/src/views/product/interestRate/936/Detail.vue +++ b/src/views/product/interestRate/936/Detail.vue @@ -5,11 +5,15 @@ class="form" :disabled="disabled"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ } } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (id.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: id.value, + strategyType: 13, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -379,17 +392,8 @@ const confirmSubmit = async () => { if (!modelName.value) return ElMessage.error('请输入模型名称!'); // 编辑需要判断是否有绑定产品 - if (id.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: id.value, - strategyType: 13, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/150/Detail.vue b/src/views/product/strategy/150/Detail.vue index 34d74aa..d413ab1 100644 --- a/src/views/product/strategy/150/Detail.vue +++ b/src/views/product/strategy/150/Detail.vue @@ -5,11 +5,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 1, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -381,17 +394,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 1, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/151/Detail.vue b/src/views/product/strategy/151/Detail.vue index 59e7782..e98ced2 100644 --- a/src/views/product/strategy/151/Detail.vue +++ b/src/views/product/strategy/151/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
> = [ ]; const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(151); @@ -229,6 +233,15 @@ const getDetail = async () => { info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 2, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -293,6 +306,7 @@ const submit = async (synchronizeUpdate?: number) => { strategyName: strategyName.value, synchronizeUpdate, creditBlacklistList: param, + bankIds: bankIds.value, }); getStat(295); addRecord(recordParam); @@ -304,16 +318,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 2, - }); - if (res.isRelated) { - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/152/Detail.vue b/src/views/product/strategy/152/Detail.vue index d4497f9..4ebadc7 100644 --- a/src/views/product/strategy/152/Detail.vue +++ b/src/views/product/strategy/152/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
= { }; const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(152); @@ -363,6 +367,15 @@ const getDetail = async () => { info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 3, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -497,6 +510,7 @@ const submit = async (synchronizeUpdate?: number) => { strategyName: strategyName.value, synchronizeUpdate, businessBlacklistList: param, + bankIds: bankIds.value, }); getStat(295); addRecord(param); @@ -508,16 +522,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 3, - }); - if (res.isRelated) { - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/153/Detail.vue b/src/views/product/strategy/153/Detail.vue index a1800e4..e5663bb 100644 --- a/src/views/product/strategy/153/Detail.vue +++ b/src/views/product/strategy/153/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
[] = [ ]; const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(153); @@ -230,6 +234,15 @@ const getDetail = async () => { info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 4, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -301,6 +314,7 @@ const submit = async (synchronizeUpdate?: number) => { strategyName: strategyName.value, synchronizeUpdate, inlineBlacklistList: param, + bankIds: bankIds.value, }); getStat(295); addRecord(param); @@ -312,16 +326,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 4, - }); - if (res.isRelated) { - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/154/Detail.vue b/src/views/product/strategy/154/Detail.vue index 93b6ac9..ac5ee82 100644 --- a/src/views/product/strategy/154/Detail.vue +++ b/src/views/product/strategy/154/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
= ['年', '月', '天']; const have: Array = ['无', '有']; const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 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(); } diff --git a/src/views/product/strategy/155/Detail.vue b/src/views/product/strategy/155/Detail.vue index 92380e0..cad9156 100644 --- a/src/views/product/strategy/155/Detail.vue +++ b/src/views/product/strategy/155/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
= ['年', '月', '天']; const have: Array = ['否', '是']; const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(155); @@ -289,6 +293,15 @@ const getDetail = async () => { info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 6, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -433,6 +446,7 @@ const submit = async (synchronizeUpdate?: number) => { strategyName: strategyName.value, synchronizeUpdate, antiFraudStrategyList: param, + bankIds: bankIds.value, }); getStat(295); addRecord(param); @@ -444,16 +458,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 6, - }); - if (res.isRelated) { - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/156/Detail.vue b/src/views/product/strategy/156/Detail.vue index a5d1795..a1fdf3f 100644 --- a/src/views/product/strategy/156/Detail.vue +++ b/src/views/product/strategy/156/Detail.vue @@ -4,13 +4,16 @@ class="form" :disabled="disabled" v-loading="loading"> - - + +
+ +

不同步已关联产品,请修改策略名称。

+
[]>([]); const loading = ref(false); const syncVisible = ref(false); +const bankIds = ref[]>([]); // 配置项 const getConfig = async () => { const { process } = await getProcessInformationBasedOnRoles(156); @@ -156,6 +160,15 @@ const getDetail = async () => { info.value = data; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (strategyId.value && !props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: strategyId.value, + strategyType: 7, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } finally { } }; @@ -235,6 +248,7 @@ const submit = async (synchronizeUpdate?: number) => { strategyName: strategyName.value, synchronizeUpdate, negativeIndustryStrategyList: param, + bankIds: bankIds.value, }); getStat(295); addRecord(); @@ -246,16 +260,8 @@ const confirmSubmit = async () => { if (!strategyName.value) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (strategyId.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: strategyId.value, - strategyType: 7, - }); - if (res.isRelated) { - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/512/Detail.vue b/src/views/product/strategy/512/Detail.vue index 04d69d8..bed8c84 100644 --- a/src/views/product/strategy/512/Detail.vue +++ b/src/views/product/strategy/512/Detail.vue @@ -5,11 +5,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ form.scoringObject = info.scoringObject; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (!props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: id.value, + strategyType: 8, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } catch (e) {} } else { getConfig(); @@ -265,17 +278,8 @@ const confirmSubmit = async () => { if (!form.scoreCardName) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (id.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: id.value, - strategyType: 8, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); } diff --git a/src/views/product/strategy/513/Detail.vue b/src/views/product/strategy/513/Detail.vue index 9c7a104..3e6331a 100644 --- a/src/views/product/strategy/513/Detail.vue +++ b/src/views/product/strategy/513/Detail.vue @@ -5,11 +5,15 @@ :disabled="disabled" v-loading="loading"> - +
+ +

不同步已关联产品,请修改策略名称。

+
{ form.scoringObject = info.scoringObject; } getConfig(); + + // 编辑需要判断是否有绑定产品 + if (!props.disabled) { + const res = await isTheStrategyRelatedToTheProduct({ + tacticsId: id.value, + strategyType: 9, + }); + if (res.isRelated) bankIds.value = res.bankIds; + } } catch (e) {} } else { getConfig(); @@ -751,17 +764,8 @@ const confirmSubmit = async () => { if (!form.scoreCardName) return ElMessage.error('请输入策略名称!'); // 编辑需要判断是否有绑定产品 - if (id.value) { - const res = await isTheStrategyRelatedToTheProduct({ - tacticsId: id.value, - strategyType: 9, - }); - if (res.isRelated) { - bankIds.value = res.bankIds; - syncVisible.value = true; - } else { - submit(); - } + if (bankIds.value.length) { + syncVisible.value = true; } else { submit(); }