|
@@ -33,9 +33,24 @@ module.exports = app => {
|
|
|
tender.ledger_tp = cache.ledger_tp ? JSON.parse(cache.ledger_tp) : {};
|
|
|
|
|
|
uid = uid + '';
|
|
|
+ cache.ledger_flow_cur_uid = cache.ledger_flow_cur_uid ? cache.ledger_flow_cur_uid.split(',') : [];
|
|
|
+ cache.ledger_flow_pre_uid = cache.ledger_flow_pre_uid ? cache.ledger_flow_pre_uid.split(',') : [];
|
|
|
cache.stage_flow_cur_uid = cache.stage_flow_cur_uid ? cache.stage_flow_cur_uid.split(',') : [];
|
|
|
cache.stage_flow_pre_uid = cache.stage_flow_pre_uid ? cache.stage_flow_pre_uid.split(',') : [];
|
|
|
- if (!cache.stage_count || (cache.stage_count === 1 && cache.stage_status === auditConst.stage.status.uncheck && cache.stage_flow_cur_uid.indexOf(uid) < 0)) {
|
|
|
+ if (!cache.stage_count) {
|
|
|
+ tender.cur_flow = (cache.ledger_status === auditConst.ledger.status.checkNo)
|
|
|
+ ? JSON.parse(cache.ledger_flow_pre_info) : JSON.parse(cache.ledger_flow_cur_info || cache.ledger_flow_pre_info);
|
|
|
+ tender.cur_flow.title = '台账';
|
|
|
+ tender.pre_flow = cache.ledger_flow_pre_info ? JSON.parse(cache.ledger_flow_pre_info) : null;
|
|
|
+ tender.stage_tp = {};
|
|
|
+ tender.stage_count = 0;
|
|
|
+ tender.stage_status = cache.stage_status;
|
|
|
+ tender.progress = {
|
|
|
+ title: '台账',
|
|
|
+ status: auditConst.ledger.tiStatusString[cache.ledger_status],
|
|
|
+ status_class: auditConst.ledger.tiStatusStringClass[cache.ledger_status],
|
|
|
+ };
|
|
|
+ } else if (cache.stage_count === 1 && cache.stage_status === auditConst.stage.status.uncheck && cache.stage_flow_cur_uid.indexOf(uid) < 0) {
|
|
|
tender.cur_flow = JSON.parse(cache.ledger_flow_cur_info || cache.ledger_flow_pre_info);
|
|
|
tender.cur_flow.title = '台账';
|
|
|
tender.pre_flow = cache.ledger_flow_pre_info ? JSON.parse(cache.ledger_flow_pre_info) : null;
|
|
@@ -98,7 +113,13 @@ module.exports = app => {
|
|
|
|
|
|
async loadTenderCache(tender, uid) {
|
|
|
const cache = await this.getDataById(tender.id);
|
|
|
- if (cache) this._analysisTenderCache(tender, cache, uid);
|
|
|
+ if (cache) {
|
|
|
+ try {
|
|
|
+ this._analysisTenderCache(tender, cache, uid);
|
|
|
+ } catch(err) {
|
|
|
+ console.log(tender);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
async insertTenderCache(transaction, tid, uid) {
|