|
@@ -254,7 +254,7 @@ module.exports = app => {
|
|
|
const modes = ctx.subProject.payment_setting ? JSON.parse(ctx.subProject.payment_setting) : ctx.helper._.cloneDeep(paymentConst.setting_modes);
|
|
|
const checked = data.checked;
|
|
|
if (modes[data.mode_type]) {
|
|
|
- const detailCount = await ctx.service.paymentDetail.getCountByPidType(ctx.session.sessionProject.id, modes[data.mode_type].value);
|
|
|
+ const detailCount = await ctx.service.paymentDetail.getCountByPidType(ctx.subProject.id, modes[data.mode_type].value);
|
|
|
if (detailCount > 0 && !checked) {
|
|
|
throw '已存在对应模块的详情,无法关闭该模块';
|
|
|
}
|
|
@@ -296,7 +296,7 @@ module.exports = app => {
|
|
|
}
|
|
|
const modes = ctx.subProject.payment_setting ? JSON.parse(ctx.subProject.payment_setting) : ctx.helper._.cloneDeep(paymentConst.setting_modes);
|
|
|
for (const m in modes) {
|
|
|
- const detailCount = await ctx.service.paymentDetail.getCountByPidType(ctx.session.sessionProject.id, modes[m].value);
|
|
|
+ const detailCount = await ctx.service.paymentDetail.getCountByPidType(ctx.subProject.id, modes[m].value);
|
|
|
modes[m].can_check = !detailCount;
|
|
|
}
|
|
|
const renderData = {
|