|
|
@ -15,6 +15,7 @@ |
|
|
<div class="layuimini-container"> |
|
|
<div class="layuimini-container"> |
|
|
<div class="layuimini-main"> |
|
|
<div class="layuimini-main"> |
|
|
<input style="display:none;" id="nowDay" th:value="${nowDay}"> |
|
|
<input style="display:none;" id="nowDay" th:value="${nowDay}"> |
|
|
|
|
|
<input style="display:none;" id="display" th:value="${display}"> |
|
|
|
|
|
|
|
|
<fieldset class="table-search-fieldset" > |
|
|
<fieldset class="table-search-fieldset" > |
|
|
<legend>搜索信息</legend> |
|
|
<legend>搜索信息</legend> |
|
|
@ -130,6 +131,24 @@ |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let cols = [ |
|
|
|
|
|
{type: "checkbox", width: 50}, |
|
|
|
|
|
{field: 'code', width: 150, title: '存货编码', sort: true}, |
|
|
|
|
|
{field: 'mname', width: 120, title: '物料名称', sort: false}, |
|
|
|
|
|
{field: 'typeName', width: 150, title: '物料种类'}, |
|
|
|
|
|
{field: 'version', width: 200, title: '规格型号', sort: false}, |
|
|
|
|
|
{field: 'unit', width: 150, title: '计量单位'}, |
|
|
|
|
|
{field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, |
|
|
|
|
|
{title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, |
|
|
|
|
|
{field: 'texture', width: 100, title: '材质'}, |
|
|
|
|
|
{field: 'brand', width: 150, title: '品牌'}, |
|
|
|
|
|
{field: 'shelfLife', width: 150, title: '保质期'}, |
|
|
|
|
|
{field: 'productionPlace', width: 150, title: '产地'}, |
|
|
|
|
|
{field: 'remark', width: 150, title: '备注'}, |
|
|
|
|
|
|
|
|
|
|
|
]; |
|
|
|
|
|
let flagForRelod = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
table.render({ |
|
|
table.render({ |
|
|
elem: "#currentTableId", |
|
|
elem: "#currentTableId", |
|
|
@ -166,21 +185,35 @@ |
|
|
{field: 'mname', width: 120, title: '物料名称', sort: false}, |
|
|
{field: 'mname', width: 120, title: '物料名称', sort: false}, |
|
|
{field: 'typeName', width: 150, title: '物料种类'}, |
|
|
{field: 'typeName', width: 150, title: '物料种类'}, |
|
|
{field: 'version', width: 200, title: '规格型号', sort: false}, |
|
|
{field: 'version', width: 200, title: '规格型号', sort: false}, |
|
|
{field: 'texture', width: 100, title: '材质'}, |
|
|
|
|
|
{field: 'unit', width: 150, title: '计量单位'}, |
|
|
{field: 'unit', width: 150, title: '计量单位'}, |
|
|
|
|
|
{field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, |
|
|
|
|
|
{title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}, |
|
|
|
|
|
{field: 'texture', width: 100, title: '材质'}, |
|
|
{field: 'brand', width: 150, title: '品牌'}, |
|
|
{field: 'brand', width: 150, title: '品牌'}, |
|
|
{field: 'shelfLife', width: 150, title: '保质期'}, |
|
|
{field: 'shelfLife', width: 150, title: '保质期'}, |
|
|
{field: 'productionPlace', width: 150, title: '产地'}, |
|
|
{field: 'productionPlace', width: 150, title: '产地'}, |
|
|
{field: 'remark', width: 150, title: '备注'}, |
|
|
{field: 'remark', width: 150, title: '备注'}, |
|
|
{field: 'state', title: '状态', minWidth: 100, templet: '#switchTpl'}, |
|
|
|
|
|
{title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"} |
|
|
|
|
|
] |
|
|
] |
|
|
], |
|
|
], |
|
|
limits: [10, 15, 20, 25, 50,100], |
|
|
limits: [10, 15, 20, 25, 50,100], |
|
|
limit: 10, |
|
|
limit: 10, |
|
|
page: true, |
|
|
page: true, |
|
|
skin: 'line', |
|
|
skin: 'line', |
|
|
|
|
|
done: function (res, curr, count) { |
|
|
|
|
|
let display = $("#display").val(); |
|
|
|
|
|
if("inline-block" === display){ |
|
|
|
|
|
if(flagForRelod){ |
|
|
|
|
|
flagForRelod = false; |
|
|
|
|
|
let col = {field: 'price', width: 150, title: '物料单价'}; |
|
|
|
|
|
cols.splice(6,0,col); |
|
|
|
|
|
table.reload('currentTableId',{cols:[cols]}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|