'use strict';
/**
*
*
* @author Mai
* @date 2018/10/11
* @version
*/
const tenderListSpec = (function(){
function getTenderNodeHtml(node, arr, pid) {
const html = [];
html.push('
');
// 名称
html.push('');
if (node.cid) {
html.push(' ', node.name);
} else {
html.push('');
html.push(arr.indexOf(node) === arr.length - 1 ? '└' : '├');
html.push('');
//html.push('', node[c.field], '');
html.push('', node.name, '');
}
html.push(' | ');
// 计量模式
html.push('');
if (node.measure_type) {
html.push(node.measure_type === measureType.tz.value ? '0号台账' : '工程量清单');
}
html.push(' | ');
// 计量进度
html.push('');
if (!node.cid && node.cur_flow) {
if (node.progress) {
html.push(node.progress.title + ' (' + '' + node.progress.status + '' + ')');
} else {
html.push(node.cur_flow.title + ' (' + '' + node.cur_flow.status + '' + ')');
}
}
html.push(' | ');
// 当前流程
html.push('');
if (!node.cid && node.cur_flow) {
if (node.stage_status !== undefined) {
const curUser = node.cur_flow.name + (node.cur_flow.role ? '-'+node.cur_flow.role : '');
html.push((node.stage_status === auditConst.stage.status.uncheck || node.ledger_status === auditConst.ledger.status.uncheck)
? curUser
: `${curUser}`
);
html.push(`${node.progress.status}`);
} else {
html.push((node.lastStage && node.lastStage.status === auditConst.stage.status.uncheck) || (!node.lastStage && node.ledger_status === auditConst.ledger.status.uncheck ) ? '' :
'');
html.push(node.cur_flow.name+ (node.cur_flow.role ? '-'+node.cur_flow.role : ''));
html.push((node.lastStage && node.lastStage.status === auditConst.stage.status.uncheck) || (!node.lastStage && node.ledger_status === auditConst.ledger.status.uncheck ) ? ' ':
' ');
html.push('' + node.cur_flow.status + '');
}
}
html.push(' | ');
// 上一流程审批时间
// html.push('');
// if (!node.cid && node.pre_flow) {
// html.push(node.pre_flow.name + ' ' + moment(node.pre_flow.time).format('YYYY-MM-DD'));
// }
// html.push(' | ');
// 签约合同价
html.push('');
html.push(node.contract_price || '');
html.push(' | ');
// 0号台账合同
html.push('');
html.push(node.total_price || '');
html.push(' | ');
// 本期完成
html.push('');
html.push(node.gather_tp || '');
html.push(' | ');
// 截止本期合同
html.push('');
html.push(node.end_contract_tp || '');
html.push(' | ');
// 截止本期变更
html.push('');
html.push(node.end_qc_tp || '');
html.push(' | ');
// 截止本期完成
html.push('');
html.push(node.end_gather_tp || '');
html.push(' | ');
// 截止上期完成
html.push('');
html.push(node.pre_gather_tp || '');
html.push(' | ');
// 预付款
html.push('');
html.push(node.advance_tp || '');
html.push(' | ');
// 本期应付
html.push('');
html.push(node.yf_tp || '');
html.push(' | ');
// 截止本期应付
html.push('');
html.push(node.end_yf_tp || '');
html.push(' | ');
html.push('
');
return html.join('');
}
function getTenderTreeHeaderHtml() {
const html = [];
html.push('