|
@@ -422,7 +422,6 @@ module.exports = app => {
|
|
|
preStageData;
|
|
|
responseData.data = await ctx.service.pos.getPosDataWithAddStageOrder(condition);
|
|
|
// 根据当前人,或指定对象查询数据
|
|
|
- // console.time('cur');
|
|
|
const curWhere = JSON.parse(ctx.request.body.data);
|
|
|
if (ctx.stage.readOnly) {
|
|
|
curStageData = await ctx.service.stagePos.getAuditorStageData2(ctx.tender.id,
|
|
@@ -430,23 +429,16 @@ module.exports = app => {
|
|
|
} else {
|
|
|
curStageData = await ctx.service.stagePos.getLastestStageData2(ctx.tender.id, ctx.stage.id, curWhere);
|
|
|
}
|
|
|
- // console.timeEnd('cur');
|
|
|
// 查询截止上期数据
|
|
|
- // console.time('pre');
|
|
|
if (ctx.stage.order > 1) {
|
|
|
preStageData = await ctx.service.stagePosFinal.getFinalData(ctx.tender.data, ctx.stage.order - 1);
|
|
|
} else {
|
|
|
preStageData = [];
|
|
|
}
|
|
|
- // console.timeEnd('pre');
|
|
|
- // console.time('assign');
|
|
|
- // console.log('cur: ' + curStageData.length);
|
|
|
- // console.log('pre: ' + preStageData.length);
|
|
|
this.ctx.helper.assignRelaData(responseData.data, [
|
|
|
{ data: curStageData, fields: ['contract_qty', 'qc_qty', 'postil'], prefix: '', relaId: 'pid' },
|
|
|
{ data: preStageData, fields: ['contract_qty', 'qc_qty'], prefix: 'pre_', relaId: 'pid' },
|
|
|
]);
|
|
|
- // console.timeEnd('assign');
|
|
|
ctx.body = responseData;
|
|
|
} catch (err) {
|
|
|
this.log(err);
|
|
@@ -561,7 +553,6 @@ module.exports = app => {
|
|
|
if (!data.cid) {
|
|
|
throw '查询数据错误';
|
|
|
}
|
|
|
- console.log(data);
|
|
|
const detailData = await this._getChangeDetailData(ctx.tender.id, ctx.stage.id, data.cid, data.is_import);
|
|
|
ctx.body = { err: 0, msg: '', data: detailData };
|
|
|
} catch (err) {
|
|
@@ -962,7 +953,6 @@ module.exports = app => {
|
|
|
|
|
|
ctx.body = responseData;
|
|
|
} catch (err) {
|
|
|
- console.log(err);
|
|
|
this.log(err);
|
|
|
ctx.body = { err: 1, msg: err.toString(), data: null };
|
|
|
}
|
|
@@ -1269,7 +1259,6 @@ module.exports = app => {
|
|
|
}
|
|
|
const cacheKey = 'smsCode:' + ctx.session.sessionUser.accountId;
|
|
|
const cacheCode = await app.redis.get(cacheKey);
|
|
|
- // console.log(cacheCode);
|
|
|
if (cacheCode === null || code === undefined || cacheCode !== (code + pa.auth_mobile)) {
|
|
|
throw '验证码不正确!';
|
|
|
}
|