yujialong 9 months ago
parent 80f49ab21e
commit da1ace2eff
  1. 4
      src/api/judgment.ts
  2. 49
      src/components/Panel/index.vue
  3. 1
      src/utils/common.ts
  4. 5
      src/views/config/level/Index.vue
  5. 2
      src/views/finance/Fund.vue
  6. 114
      src/views/product/bank/Add.vue
  7. 8
      src/views/product/fund/Add.vue

@ -14,4 +14,6 @@ export const deleteCache = async (data: Record<string, any>): Promise<any> =>
)
).data;
export const getOperation = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/getOperation', { params })).data;
export const queryCache = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/queryCache', { params })).data;
export const getSandTableLastCache = async (data: Record<string, any>): Promise<any> =>
(await axios.post(`/product/product/bank/operation/getSandTableLastCache?cid=${data.cid}&projectId=${data.projectId}`)).data;
export const deleteOperationData = async (data: Record<string, any>): Promise<any> => (await axios.post('/product/product/bank/operation/deleteOperationData', data)).data;

@ -224,7 +224,7 @@
<script setup lang="ts">
import { ref, reactive, onMounted, inject, computed, watch } from 'vue';
import { submitOpe } from '@/api/bank';
import { deleteCache } from '@/api/judgment';
import { deleteCache, getSandTableLastCache, deleteOperationData } from '@/api/judgment';
import { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition, getStartTime } from '@/api/system';
import Settings from '@/settings';
import { useRouter, useRoute } from 'vue-router';
@ -450,8 +450,8 @@ const getCompetitionStatus = async () => {
}
}
};
//
const selectProject = () => {
//
const setNewProject = (reloadPage?: number) => {
Cookies.set('sand-projectId', param.projectId);
getProDetail();
setSubmit(false);
@ -459,12 +459,51 @@ const selectProject = () => {
grade.value = '00';
pannelTab.value = 'first';
reload();
if (reloadPage) {
//
if (route.path === '/') {
location.reload();
} else {
getLevel.value && getLevel.value();
}
}
};
//
const selectProject = async () => {
//
const res = await getSandTableLastCache({
cid: param.cid,
projectId: param.projectId,
});
//
if (res.getLastCache) {
ElMessageBox.confirm('是否要继续上次的操作记录?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'success',
})
.then(async () => {
setNewProject(1);
})
.catch(async () => {
setNewProject();
await deleteOperationData({
cid: param.cid,
projectId: param.projectId,
assessmentId: param.assessmentId,
competitionId: param.competitionId,
});
//
if (route.path === '/') {
location.reload();
} else {
getLevel.value && getLevel.value();
}
});
} else {
setNewProject();
}
};
//
const toReport = () => {
@ -472,7 +511,7 @@ const toReport = () => {
};
//
const reload = async () => {
await deleteCache(getIds());
// await deleteCache(getIds());
reloadCount();
grade.value = '00';
setSubmit(false);
@ -533,7 +572,7 @@ const submit = async () => {
reportId.value = retMap.reportId;
Cookies.set('sand-reportId', retMap.reportId);
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value));
await deleteCache(getIds());
// await deleteCache(getIds());
submiting.value = false;
//

@ -236,6 +236,7 @@ export const getFileExt = (fileName: string): string => {
*/
export const getIds = (): Record<string, any> => {
return {
cid: +Cookies.get('sand-cid'),
checkpointId: +Cookies.get('sand-level') || '',
projectId: +Cookies.get('sand-projectId') || '',
assessmentId: +Cookies.get('sand-assessmentId') || '',

@ -45,6 +45,7 @@
id="tableWrap">
<el-table v-loading="loading"
:data="list"
@sort-change="handleSort"
@selection-change="handleSelectionChange">
<el-table-column label="移动"
width="80">
@ -177,6 +178,7 @@ const levelId = +Cookies.get('sand-level');
const hadChange = ref<number>(0);
const delTitle: string = '删除关卡后,已关联该关卡的判分点将被禁用,确定删除吗?';
const params = reactive({
createDateSort: '',
platformId: 3,
customsPassName: '',
isEnable: '',
@ -213,6 +215,9 @@ onMounted(() => {
});
watch([params, () => route.query], getList);
const handleSort = ({ column, prop, order }: { column: any; prop: string; order: string }) => {
params.createDateSort = order === 'descending' ? 'desc' : order === 'ascending' ? 'asc' : '';
};
//
const save = async () => {

@ -50,7 +50,7 @@
label="基金名称"
min-width="110"></el-table-column>
<el-table-column prop="dailyNetAssetValue"
label="净值"
label="最新单位净值"
min-width="80"></el-table-column>
<el-table-column prop="dailyGrowthRate"
label="日增长率(%)"

@ -201,20 +201,54 @@
]">
<div class="flex-1">
<p class="field-name">选择本产品的担保种类</p>
<div v-for="(item, i) in config.find((e) => e.name === '担保方式')?.recordChildren"
<div class="radio-wrap">
<span class="label">信用贷</span>
<el-radio-group v-model="form.bankGuarantee1">
<el-radio v-for="(item, i) in whethers"
:key="i"
class="mb-2">
<el-checkbox-group v-model="form.bankGuaranteeTypeIds">
<el-checkbox :label="item.id">{{ item.name }}</el-checkbox>
</el-checkbox-group>
<el-checkbox-group class="mb-1"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<div class="radio-wrap my-1">
<span class="label">保证贷</span>
<el-radio-group v-model="form.bankGuarantee2">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<div class="radio-wrap">
<span class="label">抵押贷</span>
<el-radio-group v-model="form.bankGuarantee3">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-checkbox-group v-if="form.bankGuarantee3 === 795"
v-model="form.bankGuaranteeTypeIds">
<el-checkbox v-show="(item.id === 110 && form.bankGuaranteeTypeIds.includes(110)) || (item.id === 111 && form.bankGuaranteeTypeIds.includes(111))"
v-for="(child, j) in item?.subject?.itemList"
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[2]?.subject?.itemList"
:key="j"
:label="child.itemId">{{ child.options }}</el-checkbox>
</el-checkbox-group>
<div class="radio-wrap mt-1">
<span class="label">质押贷</span>
<el-radio-group v-model="form.bankGuarantee4">
<el-radio v-for="(item, i) in whethers"
:key="i"
:label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<el-checkbox-group v-if="form.bankGuarantee4 === 795"
v-model="form.bankGuaranteeTypeIds">
<el-checkbox v-for="(child, j) in config.find((e) => e.name === '担保方式')?.recordChildren[3]?.subject?.itemList"
:key="j"
:label="child.itemId">{{ child.options }}</el-checkbox>
</el-checkbox-group>
</div>
</el-form-item>
<el-form-item label="贷款额度"
@ -318,7 +352,7 @@ interface RuleForm {
productDefinition: string;
productName: string;
productCurrency: number;
bankGuaranteeTypeIds: any[];
bankGuaranteeTypeIds: number[];
currentWorkingLife?: any;
edu: number | string;
educationalRequirements?: any;
@ -340,6 +374,10 @@ interface RuleForm {
productType: number;
providentFundAndSocialSecurity: number | string;
whetherToSupportEarlyRepayment?: any;
bankGuarantee1?: number;
bankGuarantee2?: number;
bankGuarantee3?: number;
bankGuarantee4?: number;
}
const router = useRouter();
@ -390,6 +428,10 @@ const form = reactive<RuleForm>({
productType: computed(() => +route.query.type),
providentFundAndSocialSecurity: '',
whetherToSupportEarlyRepayment: false,
bankGuarantee1: '',
bankGuarantee2: '',
bankGuarantee3: '',
bankGuarantee4: '',
});
const rules = reactive<FormRules<RuleForm>>({
productDefinition: [{ required: true, message: '请输入产品定义', trigger: 'blur' }],
@ -469,13 +511,49 @@ const submit = async (formEl: FormInstance | undefined) => {
param.providentFundAndSocialSecurity = param.providentFundAndSocialSecurity === 795 ? 1 : '';
param.whetherToSupportEarlyRepayment = param.whetherToSupportEarlyRepayment ? 58 : '';
//
param.addBankProductsGuarantyStyleReqList = [];
const graIds = [];
//
param.bankGuarantee1 === 795 &&
graIds.push({
bankGuaranteeTypeId: 108,
pid: '',
});
//
param.bankGuarantee2 === 795 &&
graIds.push({
bankGuaranteeTypeId: 109,
pid: '',
});
//
param.bankGuarantee3 === 795 &&
graIds.push({
bankGuaranteeTypeId: 110,
pid: '',
});
//
param.bankGuarantee4 === 795 &&
graIds.push({
bankGuaranteeTypeId: 111,
pid: '',
});
param.bankGuaranteeTypeIds.forEach((e: number) => {
param.addBankProductsGuarantyStyleReqList.push({
bankGuaranteeTypeId: (e > 22 && e < 33) || (e > 32 && e < 38) ? e : '',
pid: e > 22 && e < 33 ? 110 : e > 32 && e < 38 ? 111 : e,
//
if (param.bankGuarantee3 === 795 && e > 22 && e < 33) {
graIds.push({
bankGuaranteeTypeId: e,
pid: 110,
});
} else if (param.bankGuarantee4 === 795 && e > 32 && e < 38) {
//
graIds.push({
bankGuaranteeTypeId: e,
pid: 111,
});
}
});
param.addBankProductsGuarantyStyleReqList = graIds;
debugger;
let res;
if (id.value) {
param.id = id.value;
@ -528,10 +606,12 @@ const addRecord = async (data: Record<string, any>) => {
}
//
data.bankGuaranteeTypeIds.includes(108) && lcRule.push(handleId(108, '', '', preIds + ',53,108', ''));
data.bankGuaranteeTypeIds.includes(109) && lcRule.push(handleId(109, '', '', preIds + ',53,109', ''));
data.bankGuaranteeTypeIds.includes(110) && lcRule.push(handleId(110, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110', 1));
data.bankGuaranteeTypeIds.includes(111) && lcRule.push(handleId(111, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111', 1));
data.bankGuarantee1 && lcRule.push(handleId(100, 324, data.bankGuarantee1, preIds + ',53,108,100', 1));
data.bankGuarantee2 && lcRule.push(handleId(101, 324, data.bankGuarantee2, preIds + ',53,109,101', 1));
data.bankGuarantee3 && lcRule.push(handleId(102, 324, data.bankGuarantee3, preIds + ',53,110,102', 1));
data.bankGuarantee4 && lcRule.push(handleId(103, 324, data.bankGuarantee4, preIds + ',53,111,103', 1));
data.bankGuarantee3 === 795 && lcRule.push(handleId(110, 13, data.bankGuaranteeTypeIds.filter((e: number) => e > 22 && e < 33).join(), preIds + ',53,110', 1));
data.bankGuarantee4 === 795 && lcRule.push(handleId(111, 14, data.bankGuaranteeTypeIds.filter((e: number) => e > 32 && e < 38).join(), preIds + ',53,111', 1));
lcRule.push(
handleId(54, 15, data.minimumLoan + '~' + data.loanCeiling, preIds + ',54', 5),

@ -162,7 +162,7 @@
<el-input class="w-[100px] mr-2"
placeholder="请输入"
v-model="item.rate"></el-input>
<el-select class="w-[80px]"
<el-select class="w-[90px]"
v-model="item.rateUnit"
placeholder="请选择">
<el-option v-for="item in units"
@ -275,7 +275,7 @@
<el-input class="w-[100px] mr-2"
placeholder="请输入"
v-model="item.rate"></el-input>
<el-select class="w-[80px]"
<el-select class="w-[90px]"
v-model="item.rateUnit"
placeholder="请选择">
<el-option v-for="item in units"
@ -351,14 +351,14 @@ const form = reactive({
input1: '0',
input2: '',
rate: '',
rateUnit: '%',
rateUnit: '',
type: 0,
},
{
input1: '',
input2: '',
rate: '',
rateUnit: '%',
rateUnit: '',
type: 0,
},
],

Loading…
Cancel
Save