Commit ecb8a3f7 by guanzhenshan

完成标题

parent 578d072a
......@@ -147,7 +147,7 @@
str_template = str_template.replace('{'+result.head[h].item1 + '_desc}', "说明:无");
}
s += '<td>' + str_template.replace('{' + result.head[h].item1 + '+}', col_2) + '<a style="color:#bbb;" onclick=\"EditDescription(\'' + result.head[h].item1 + '\',\'' + temps+'\',\'' + result.data[i]['month'] + '\')\">修改说明</a></td>';
s += '<td>' + str_template.replace('{' + result.head[h].item1 + '+}', col_2) + '<a style="color:#bbb;" onclick=\"EditDescription(\'' + result.head[h].item1 + '\',\'' + temps + '\',\'' + result.data[i]['month'] + '\',\'' + clearHtml(result.head[h].item2) + '\')\">修改说明</a></td>';
//合计
s += ('<td>' + result.data[i][c] + '</td>');
......@@ -201,8 +201,8 @@
})
}
function EditDescription(col, val, mon) {
layer.prompt({ title: '编辑', value: val }, function (text, index) {
function EditDescription(col, val, mon, name) {
layer.prompt({ title: '编辑 ' + name, value: val }, function (text, index) {
layer.close(index);
SaveDescription(col, text, mon);
});
......@@ -227,8 +227,15 @@
})
}
function exportxls() {
function clearHtml(s) {
// 去除 富文本格式
s = s.replace(/(\n)/g, "");
s = s.replace(/(\t)/g, "");
s = s.replace(/(\r)/g, "");
s = s.replace(/<\/?[^>]*>/g, "");
s = s.replace(/\s*/g, "");
return s;
}
</script>
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment