|
@@ -389,12 +389,16 @@ module.exports = app => {
|
|
|
const revise = await ctx.service.ledgerRevise.getLastestRevise(ctx.tender.id);
|
|
|
if (!revise) throw '台账修订数据有误';
|
|
|
|
|
|
- const billsFile = revise.bills_file ? this.ctx.app.config.filePath + revise.bills_file : undefined;
|
|
|
+ const billsFile = revise.status === audit.revise.status.checked && revise.bills_file
|
|
|
+ ? this.ctx.app.config.filePath + revise.bills_file
|
|
|
+ : undefined;
|
|
|
const reviseBills = billsFile && fs.existsSync(billsFile)
|
|
|
? JSON.parse(await fs.readFileSync(billsFile, 'utf8'))
|
|
|
: await ctx.service.reviseBills.getData(ctx.tender.id);
|
|
|
|
|
|
- const posFile = revise.pos_file ? this.ctx.app.config.filePath + revise.pos_file : undefined;
|
|
|
+ const posFile = revise.status === audit.revise.status.checked && revise.pos_file
|
|
|
+ ? this.ctx.app.config.filePath + revise.pos_file
|
|
|
+ : undefined;
|
|
|
const revisePos = posFile && fs.existsSync(posFile)
|
|
|
? JSON.parse(await fs.readFileSync(posFile, 'utf8'))
|
|
|
: await ctx.service.revisePos.getData(ctx.tender.id);
|