|
|
|
@ -97,7 +97,7 @@ |
|
|
|
<script type="text/html" id="toolbarDemo"> |
|
|
|
<div class="layui-btn-container"> |
|
|
|
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add"> 新建</button> |
|
|
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete" |
|
|
|
<button class="layui-btn layui-btn-sm layui-btn-danger data-delete-btn" lay-event="delete" id="delete" |
|
|
|
th:style="'display:'+${display}"> 删除 |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
@ -152,6 +152,24 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
let cols = [ |
|
|
|
{type: "checkbox", width: 50}, |
|
|
|
{field: "aircode", title: '申请编码', width: 250,}, |
|
|
|
{field: 'mname', width: 150, title: '物料名称'}, |
|
|
|
{field: 'mversion', width: 150, title: '规格型号'}, |
|
|
|
{field: 'airUnit', width: 100, title: '计量单位'}, |
|
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
|
{field: 'applicantName', width: 200, title: '提交人'}, |
|
|
|
{field: 'adminorgName', width: 150, title: '提交人部门'}, |
|
|
|
{field: 'applicantTime', width: 200, title: '提交时间', sort: true}, |
|
|
|
{field: 'applyRemark', width: 200, title: '备注'}, |
|
|
|
{field: 'airstate', width: 200, title: '状态'}, |
|
|
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
|
|
|
]; |
|
|
|
let flagForReload = true; |
|
|
|
|
|
|
|
//日期 |
|
|
|
laydate.render({ |
|
|
|
elem: '#startDate', |
|
|
|
@ -201,7 +219,7 @@ |
|
|
|
{field: 'mversion', width: 150, title: '规格型号'}, |
|
|
|
{field: 'airUnit', width: 100, title: '计量单位'}, |
|
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
|
{field: 'quantity', width: 150, title: '数量', sort: true}, |
|
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
|
{field: 'applicantName', width: 200, title: '提交人'}, |
|
|
|
{field: 'adminorgName', width: 150, title: '提交人部门'}, |
|
|
|
@ -215,7 +233,18 @@ |
|
|
|
limit: 15, |
|
|
|
page: true, |
|
|
|
skin: 'line', |
|
|
|
done: function () { |
|
|
|
done: function (res, curr, count) { |
|
|
|
let display = $("#delete").css("display"); |
|
|
|
if (display !== "none") { |
|
|
|
if (flagForReload) { |
|
|
|
flagForReload = false; |
|
|
|
let col1 = {field: 'price', title: '金额', width: 100, sort: true}; |
|
|
|
let col2 = {field: 'mprice', title: '单价', width: 100, sort: true}; |
|
|
|
cols.splice(7, 0, col2); |
|
|
|
cols.splice(8, 0, col1); |
|
|
|
table.reload('currentTableId', {cols: [cols]}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|