给这个数据表格加下拉框,下面一些是必要样式
然后加自己需要的样式
在templet标签可以放自己需要的东西,比如下拉框、字符串、按钮等等……
var tableIns = table.render({
elem: ‘#demo’,
toolbar: ‘#toolbarDemo’,
url: ‘数据接口路径’,
defaultToolbar: [],
limit: 100,
cols: [[ //表头
{ field: “OrRepairDetailID”, title: “OrRepairDetailID”, hide: true, },//隐藏列
{ field: ‘OrRepairDetailID’, title: ‘修理项目’, templet: '#Cool, align: ‘center’ },
{ field: ‘RepairTechonlogy’, title: ‘维修工艺’, edit: ‘text’, align: ‘center’ },
{ field: ‘RepairCharge’, title: ‘维修费’, edit: ‘text’, align: ‘center’ },
{ field: ‘Discount’, title: ‘折扣’, edit: ‘text’, align: ‘center’ },
{ field: ‘AmountPaid’, title: ‘实收金额’, edit: ‘text’, align: ‘center’ },//
{ field: ‘RepairProperName’, title: ‘维修性质’, templet: '#Cooll, align: ‘center’ },
{ field: ‘Remark’, width: ‘35%’, title: ‘备注’, align: ‘center’, edit: ‘text’ },
{ title: ‘操作’, align: ‘center’, toolbar: ‘#bar’ }
]]
, data: [{
“OrRepairDetailID”: “”,
“RepairTechonlogy”: “”,
“RepairCharge”: “”,
“Discount”: “”,
“AmountPaid”: “”,
“RepairProperName”: “”,
“Remark”: “”,
}]