');
// 名称
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.cid && node.cur_flow) {
html.push(node.cur_flow.title + ' (' + '' + node.cur_flow.status + '' + ')');
}
html.push(' | ');
// 当前流程
html.push('');
if (!node.cid && node.cur_flow) {
html.push(node.cur_flow.name + ' ' + '' + 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('');
const sum = node.lastStage ? ZhCalc.add(node.total_price, node.lastStage.end_qc_tp) : node.total_price;
html.push(node.sum_tp ? node.sum_tp : '');
html.push(' | ');
// 截止本期累计完成/本期完成/未完成
html.push('');
if (node.lastStage) {
html.push(getProgressHtml(node.sum_tp, node.pre_gather_tp, node.gather_tp));
} else {
html.push('');
}
html.push(' | ');
html.push('
');
if (node.children) {
for (const c of node.children) {
html.push(recursiveGetTenderNodeHtml(c, node.children, node.sort_id));
}
}
return html.join('');
}
// 根据TenderTree数据获取Html代码
function getTenderTreeHtml () {
if (tenderTree.length > 0) {
const html = [];
html.push('