|
@@ -60,7 +60,8 @@ module.exports = app => {
|
|
|
return preDetail;
|
|
|
}
|
|
|
|
|
|
- async addFormDetail(trInfo, code, s_time) {
|
|
|
+ // async addFormDetail(trInfo, code, s_time) {
|
|
|
+ async addFormDetail(ctx, trInfo, code, s_time) {
|
|
|
const transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
if (!(trInfo.is_del === 0 && trInfo.rpt_audit)) {
|
|
@@ -68,7 +69,9 @@ module.exports = app => {
|
|
|
}
|
|
|
const preDetail = await this.addCommomCheck(trInfo, code);
|
|
|
const rptTpl = await this.ctx.service.rptTpl.getDataById(trInfo.rpt_id);
|
|
|
- const pageRst = this.ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ const pageRst = await this.ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ // rptTpl.source_type = 101;
|
|
|
+ // const pageRst = await ctx.service.jpcReport.getPreviewPagesWithDiscreteDataCommon(ctx, rptTpl, 'A4', this.app.baseDir, null);
|
|
|
const newDetail = {
|
|
|
tender_id: this.ctx.paymentTender.id,
|
|
|
tr_id: trInfo.id,
|
|
@@ -164,10 +167,10 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async addDetail(trInfo, code, s_time) {
|
|
|
+ async addDetail(ctx, trInfo, code, s_time) {
|
|
|
switch (trInfo.type) {
|
|
|
case paymentConst.modes_value_object.form:
|
|
|
- return this.addFormDetail(trInfo, code, s_time);
|
|
|
+ return this.addFormDetail(ctx, trInfo, code, s_time);
|
|
|
case paymentConst.modes_value_object.safe:
|
|
|
return this.addSafeDetail(trInfo, code, s_time);
|
|
|
default:
|
|
@@ -352,7 +355,8 @@ module.exports = app => {
|
|
|
detail.auditors = await this.ctx.service.paymentDetailAudit.getAuditors(detail.id, detail.times);
|
|
|
detail.curAuditor = await this.ctx.service.paymentDetailAudit.getCurAuditor(detail.id, detail.times);
|
|
|
detail.rptAudits = await this.ctx.service.paymentRptAudit.getListByDetail(detail.id);
|
|
|
- const auditorIds = this._.map(detail.auditors, 'aid'), rptAuditIds = this._.map(detail.rptAudits, 'uid');
|
|
|
+ const auditorIds = this._.map(detail.auditors, 'aid'),
|
|
|
+ rptAuditIds = this._.map(detail.rptAudits, 'uid');
|
|
|
|
|
|
if (accountId === detail.uid) { // 原报
|
|
|
detail.curTimes = detail.times;
|