|
|
@ -15,7 +15,7 @@ |
|
|
|
<el-table class="c-table" |
|
|
|
<el-table class="c-table" |
|
|
|
:data="list" |
|
|
|
:data="list" |
|
|
|
:max-height="'calc(100vh - ' + (disabled ? 260 : 300) + 'px)'" |
|
|
|
:max-height="'calc(100vh - ' + (disabled ? 260 : 300) + 'px)'" |
|
|
|
:span-method="span1" |
|
|
|
:span-method="span" |
|
|
|
:cell-style="{background:'#fff'}" |
|
|
|
:cell-style="{background:'#fff'}" |
|
|
|
border> |
|
|
|
border> |
|
|
|
<el-table-column prop="name" |
|
|
|
<el-table-column prop="name" |
|
|
@ -135,7 +135,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, defineAsyncComponent, onMounted, toRefs, reactive } from 'vue'; |
|
|
|
import { ref, defineAsyncComponent, onMounted, toRefs, reactive, isTheStrategyRelatedToTheProduct } from 'vue'; |
|
|
|
import { ElLoading, ElMessage } from 'element-plus'; |
|
|
|
import { ElLoading, ElMessage } from 'element-plus'; |
|
|
|
import { saveCredit, findCredit } from '@/api/model'; |
|
|
|
import { saveCredit, findCredit } from '@/api/model'; |
|
|
|
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
|
|
|
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment'; |
|
|
@ -165,6 +165,7 @@ const form = reactive({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
const loading = ref<boolean>(false); |
|
|
|
const loading = ref<boolean>(false); |
|
|
|
const syncVisible = ref<boolean>(false); |
|
|
|
const syncVisible = ref<boolean>(false); |
|
|
|
|
|
|
|
const bankIds = ref<Record<string, any>[]>([]); |
|
|
|
|
|
|
|
|
|
|
|
// 配置项 |
|
|
|
// 配置项 |
|
|
|
const getConfig = async () => { |
|
|
|
const getConfig = async () => { |
|
|
@ -585,7 +586,7 @@ const rowMerge1 = [1, 4, 7, 10, 40, 43, 46]; |
|
|
|
const rowMerge2 = [2, 3, 5, 6, 8, 9, 11, 12, 41, 42, 44, 45, 47, 48]; |
|
|
|
const rowMerge2 = [2, 3, 5, 6, 8, 9, 11, 12, 41, 42, 44, 45, 47, 48]; |
|
|
|
const rowMerge3 = [0, 13, 18, 26, 33, 39, 49]; |
|
|
|
const rowMerge3 = [0, 13, 18, 26, 33, 39, 49]; |
|
|
|
// 表格合并 |
|
|
|
// 表格合并 |
|
|
|
const span1 = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { |
|
|
|
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { |
|
|
|
if (rowMerge3.includes(rowIndex)) { |
|
|
|
if (rowMerge3.includes(rowIndex)) { |
|
|
|
if (!columnIndex) { |
|
|
|
if (!columnIndex) { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -614,36 +615,6 @@ const span1 = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
const span = ({ row, column, rowIndex, columnIndex }: SpanMethodProps) => { |
|
|
|
|
|
|
|
if (!columnIndex || columnIndex === 1) { |
|
|
|
|
|
|
|
if (!rowIndex || rowIndex === 31) { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
rowspan: 5, |
|
|
|
|
|
|
|
colspan: 1, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} else if (rowIndex === 5 || rowIndex === 11 || rowIndex === 39 || rowIndex === 53) { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
rowspan: 2, |
|
|
|
|
|
|
|
colspan: 1, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} else if (rowIndex === 7 || rowIndex === 13 || rowIndex === 17 || rowIndex === 27 || rowIndex === 41 || rowIndex === 45 || rowIndex === 49) { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
rowspan: 4, |
|
|
|
|
|
|
|
colspan: 1, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} else if (rowIndex === 21 || rowIndex === 24 || rowIndex === 36) { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
rowspan: 3, |
|
|
|
|
|
|
|
colspan: 1, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
rowspan: 0, |
|
|
|
|
|
|
|
colspan: 0, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 选择框回调 |
|
|
|
// 选择框回调 |
|
|
|
const checkAll = (row: Record<string, any>, i: number) => { |
|
|
|
const checkAll = (row: Record<string, any>, i: number) => { |
|
|
@ -763,6 +734,7 @@ const addRecord = async () => { |
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
const submit = async (synchronizeUpdate?: number) => { |
|
|
|
const submit = async (synchronizeUpdate?: number) => { |
|
|
|
loading.value = true; |
|
|
|
loading.value = true; |
|
|
|
|
|
|
|
try { |
|
|
|
const param = []; |
|
|
|
const param = []; |
|
|
|
|
|
|
|
|
|
|
|
list.value.forEach((e, i) => { |
|
|
|
list.value.forEach((e, i) => { |
|
|
@ -805,18 +777,38 @@ const submit = async (synchronizeUpdate?: number) => { |
|
|
|
param.push(temp); |
|
|
|
param.push(temp); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
await saveCredit({ |
|
|
|
await saveCredit({ |
|
|
|
id: id.value, |
|
|
|
id: id.value, |
|
|
|
...form, |
|
|
|
...form, |
|
|
|
...getIds(), |
|
|
|
...getIds(), |
|
|
|
synchronizeUpdate, |
|
|
|
synchronizeUpdate, |
|
|
|
dimensionOfTheRatingTableList: param, |
|
|
|
dimensionOfTheRatingTableList: param, |
|
|
|
|
|
|
|
bankIds: bankIds.value, |
|
|
|
}); |
|
|
|
}); |
|
|
|
addRecord(); |
|
|
|
addRecord(); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
loading.value = false; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
const confirmSubmit = () => { |
|
|
|
const confirmSubmit = async () => { |
|
|
|
if (!form.scoreCardName) return ElMessage.error('请输入策略名称!'); |
|
|
|
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; |
|
|
|
syncVisible.value = true; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
submit(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
submit(); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|