|
@@ -1400,8 +1400,6 @@ const stageSelectConverse = {
|
|
|
if (!gsDefine || !gsDefine.enable || !gsDefine.setting || gsDefine.setting === '') return;
|
|
|
const gsCustom = csRela.cDefine ? csRela.cDefine.stage_select : null;
|
|
|
if (gsCustom) {
|
|
|
- console.log(gsCustom[0]);
|
|
|
- console.log(data.mem_stage_sum_bills[0]);
|
|
|
for (const t of options.table) {
|
|
|
switch (t) {
|
|
|
case 'mem_stage_sum_bills':
|
|
@@ -1436,11 +1434,11 @@ const loadCooperationData = {
|
|
|
}
|
|
|
},
|
|
|
_completeSign: function (auditor) {
|
|
|
- if (!auditor) return '';
|
|
|
- return 'public/upload/sign/' + auditor.sign_path;
|
|
|
+ if (!auditor || !auditor.end_time) return '';
|
|
|
+ return auditor.sign_path ? 'public/upload/sign/' + auditor.sign_path : '';
|
|
|
},
|
|
|
_loadImCooperationData: function (ctx, data, options, csRela) {
|
|
|
- console.log(ctx.rpt_roleSign);
|
|
|
+
|
|
|
let coSignOrder = [];
|
|
|
if (csRela && csRela.tplDefine && csRela.tplDefine.audit_select && csRela.cDefine && csRela.cDefine.audit_select) {
|
|
|
if (csRela.cDefine.audit_select) {
|
|
@@ -1453,8 +1451,10 @@ const loadCooperationData = {
|
|
|
}
|
|
|
|
|
|
const stageCooperation = [];
|
|
|
+ let finish = true;
|
|
|
for (const sa of data.stage_audit) {
|
|
|
if (sa.end_time) stageCooperation.push(data.ledger_cooperation.filter(x => {return x.user_id === sa.aid}));
|
|
|
+ if (finish && !sa.end_time) finish = false;
|
|
|
}
|
|
|
for (const d of data[options.table]) {
|
|
|
const bills = data.mem_stage_bills.find(x => {return x.id === d.lid});
|
|
@@ -1465,11 +1465,13 @@ const loadCooperationData = {
|
|
|
d.cooperation.push(this._findSign(relaId, stageCooperation[i], sa));
|
|
|
}
|
|
|
|
|
|
- for (const [i, cs] of coSignOrder.entries()) {
|
|
|
- if (data.stage_audit[cs] && data.stage_audit[cs].end_time) {
|
|
|
- d['co_sign' + (i+1)] = d.cooperation[cs] || this._completeSign(data.stage_audit[cs]);
|
|
|
- d['co_opinion' + (i+1)] = data.stage_audit[cs].opinion || '';
|
|
|
- d['co_time' + (i+1)] = data.stage_audit[cs].end_time;
|
|
|
+ if (finish) {
|
|
|
+ for (const [i, cs] of coSignOrder.entries()) {
|
|
|
+ if (data.stage_audit[cs] && data.stage_audit[cs].end_time) {
|
|
|
+ d['co_sign' + (i+1)] = d.cooperation[cs] || this._completeSign(data.stage_audit[cs]);
|
|
|
+ d['co_opinion' + (i+1)] = data.stage_audit[cs].opinion || '';
|
|
|
+ d['co_time' + (i+1)] = data.stage_audit[cs].end_time;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|