Commit 06d193a8 authored by 沈翠玲's avatar 沈翠玲

处理bug

parent 783608c2
...@@ -3,8 +3,8 @@ import { ref, toRefs } from 'vue'; ...@@ -3,8 +3,8 @@ import { ref, toRefs } from 'vue';
import { getDictByCode } from '@/api/menu'; import { getDictByCode } from '@/api/menu';
const dictStore = useDictStore(); const dictStore = useDictStore();
const res = ref({});
export const useDict = (...args) => { export const useDict = (...args) => {
const res = ref({});
return (() => { return (() => {
args.forEach(async (dictType, index) => { args.forEach(async (dictType, index) => {
res.value[dictType] = []; res.value[dictType] = [];
...@@ -13,12 +13,16 @@ export const useDict = (...args) => { ...@@ -13,12 +13,16 @@ export const useDict = (...args) => {
res.value[dictType] = dicts; res.value[dictType] = dicts;
} else { } else {
getDictByCode(dictType).then(resp => { getDictByCode(dictType).then(resp => {
res.value[dictType] = resp.result.map(d => ({ if (resp && resp.result && resp.result.length) {
label: d.desc, res.value[dictType] = resp.result.map(d => ({
value: d.value label: d.desc,
})); value: d.value
dictStore.setDict({ key: dictType, value: res.value[dictType] }); }));
}); dictStore.setDict({ key: dictType, value: res.value[dictType] });
}
}).catch(e => {
console.log('eee', e)
})
} }
}); });
return toRefs(res.value); return toRefs(res.value);
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
<td>{{ item?.loan?.sumRepayAmount }}</td> <td>{{ item?.loan?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td> <td class="label">累计减免金额</td>
<td>{{ item?.loan?.sumReductionAmount }}</td> <td>{{ item?.loan?.sumReductionAmount }}</td>
<td class="label">减免金额</td>
<td>{{ item?.reduceAmount }}</td>
<td class="label">剩余待还金额</td> <td class="label">剩余待还金额</td>
<td>{{ item?.loan?.remainingAmount }}</td> <td>{{ item?.loan?.remainingAmount }}</td>
</tr> </tr>
......
...@@ -299,7 +299,13 @@ ...@@ -299,7 +299,13 @@
getTree(); getTree();
step.value = 0; step.value = 0;
radio.value = 0; radio.value = 0;
radio.value === 0 && getStatisis(param); const p = {}
if (lonsArr.value && lonsArr.value.length) {
p['loanIds'] = lonsArr.value.map((v) => v.id);
} else {
p = { ...pageParams.value };
}
radio.value === 0 && getStatisis(p);
SaveBol.value = false; SaveBol.value = false;
currentTenant.value = null; currentTenant.value = null;
editRowIndex.value = -1; editRowIndex.value = -1;
......
...@@ -304,6 +304,8 @@ ...@@ -304,6 +304,8 @@
<td>{{ item?.loan?.sumRepayAmount }}</td> <td>{{ item?.loan?.sumRepayAmount }}</td>
<td class="label">累计减免金额</td> <td class="label">累计减免金额</td>
<td>{{ item?.loan?.sumReductionAmount }}</td> <td>{{ item?.loan?.sumReductionAmount }}</td>
<td class="label">减免金额</td>
<td>{{ item?.reduceAmount }}</td>
<td class="label">剩余待还金额</td> <td class="label">剩余待还金额</td>
<td>{{ item?.loan?.remainingAmount }}</td> <td>{{ item?.loan?.remainingAmount }}</td>
</tr> </tr>
...@@ -1062,7 +1064,7 @@ ...@@ -1062,7 +1064,7 @@
<ElButton <ElButton
type="primary" type="primary"
onClick={() => returnCrash(row, '分期还款')} onClick={() => returnCrash(row, '分期还款')}
disabled={row.repayStatus === 'over'} disabled={row.repayStatus === 'over' || splitDeData.value.flowStatus !== 'pass'}
> >
还款 还款
</ElButton> </ElButton>
...@@ -1196,7 +1198,7 @@ ...@@ -1196,7 +1198,7 @@
<ElButton <ElButton
type="primary" type="primary"
onClick={() => returnCrash(row, '结清减免还款')} onClick={() => returnCrash(row, '结清减免还款')}
disabled={row.flowStatus !== 'pass'} disabled={row.repayStatus === 'over' || row.flowStatus !== 'pass'}
> >
还款 还款
</ElButton> </ElButton>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment