layui templet


function toUrl(refUrl) {
window.open(refUrl, "服務報告", "_blank");
}
function mm(logName,sourceType,refUrl) {
/* */
if (sourceType==='TSE_MM'||sourceType==='FAE_MM') {
return '<a style="text-decoration :underline ; text-underline: #00a0e9;" onclick="toUrl(\''+refUrl+'\')">'+logName+'</a>';
} else {
return logName;
}
}
layui.use(['jquery', 'table', 'laypage', 'form'], function () {
$ = layui.jquery;
var table = layui.table;
var forLineId=$("#forLineId").val();
table.render({
id: 'dit'
,elem: '#dit'
,method:"post"
, url: $("#PageContext").val() + '/workLog/listPage?forLineId='+forLineId
, cols: [[
{type: 'numbers', width: '5%'},
{field: 'logDate', width: '15%', title: '服務日期', sort: false},
{field: 'userName', width: '12%', title: '服務人', sort: false},
{field: 'logName', width: '68%', title: '服務內容', sort: false,templet:'<div>{{ mm(d.logName,d.sourceType,d.refUrl)}}</div>'}
]]
, page: true
, limit: 10//每頁條數
, limits: [10, 20, 30, 40, 50]
, height: 480
});


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM