yujialong 9 months ago
parent 80f49ab21e
commit da1ace2eff
  1. 4
      src/api/judgment.ts
  2. 57
      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. 126
      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; ).data;
export const getOperation = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/getOperation', { params })).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"> <script setup lang="ts">
import { ref, reactive, onMounted, inject, computed, watch } from 'vue'; import { ref, reactive, onMounted, inject, computed, watch } from 'vue';
import { submitOpe } from '@/api/bank'; 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 { pageStuAssessment, getProjectBySystemId, getProjectDetail, getDetailById, getCompetition, getStartTime } from '@/api/system';
import Settings from '@/settings'; import Settings from '@/settings';
import { useRouter, useRoute } from 'vue-router'; 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); Cookies.set('sand-projectId', param.projectId);
getProDetail(); getProDetail();
setSubmit(false); setSubmit(false);
@ -459,11 +459,50 @@ const selectProject = () => {
grade.value = '00'; grade.value = '00';
pannelTab.value = 'first'; pannelTab.value = 'first';
reload(); reload();
//
if (route.path === '/') { if (reloadPage) {
location.reload(); //
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 { } else {
getLevel.value && getLevel.value(); setNewProject();
} }
}; };
// //
@ -472,7 +511,7 @@ const toReport = () => {
}; };
// //
const reload = async () => { const reload = async () => {
await deleteCache(getIds()); // await deleteCache(getIds());
reloadCount(); reloadCount();
grade.value = '00'; grade.value = '00';
setSubmit(false); setSubmit(false);
@ -533,7 +572,7 @@ const submit = async () => {
reportId.value = retMap.reportId; reportId.value = retMap.reportId;
Cookies.set('sand-reportId', retMap.reportId); Cookies.set('sand-reportId', retMap.reportId);
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value)); localStorage.setItem('sand-taskList', JSON.stringify(taskList.value));
await deleteCache(getIds()); // await deleteCache(getIds());
submiting.value = false; submiting.value = false;
// //

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

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

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

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

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

Loading…
Cancel
Save