|
|
|
@ -78,7 +78,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> |
|
|
|
@ -165,6 +165,39 @@ |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
let cols = [ |
|
|
|
{type: "checkbox", width: 50}, |
|
|
|
{title: '申请编码', width: 150, templet: '#applicationOutCode'}, |
|
|
|
{field: 'mname', width: 150, title: '物料名称'}, |
|
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
|
{field: 'quantity', width: 150, title: '数量', sort: true}, |
|
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
|
{field: 'state', width: 150, title: '流程状态'}, |
|
|
|
{ |
|
|
|
field: 'pass', title: '是否完成出库', minWidth: 120, templet: function (d) { |
|
|
|
if (d.pass === 1) { |
|
|
|
return "是"; |
|
|
|
} else { |
|
|
|
return "否"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{field: 'applicantName', width: 150, title: '申请人'}, |
|
|
|
{field: 'applicantTime', width: 200, title: '申请时间', sort: true}, |
|
|
|
{ |
|
|
|
field: 'istransfer', title: '是否为转移申请', minWidth: 120, templet: function (d) { |
|
|
|
if (d.istransfer === 1) { |
|
|
|
return "是"; |
|
|
|
} else if (d.istransfer === 2) { |
|
|
|
return "否"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '操作', minWidth: 150, toolbar: '#currentTableBar', align: "center"} |
|
|
|
]; |
|
|
|
|
|
|
|
let flagForReload = true; |
|
|
|
|
|
|
|
//日期 |
|
|
|
laydate.render({ |
|
|
|
elem: '#startDate' |
|
|
|
@ -206,7 +239,6 @@ |
|
|
|
{field: 'mname', width: 150, title: '物料名称'}, |
|
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
|
{field: 'quantity', width: 150, title: '数量', sort: true}, |
|
|
|
{field: 'price', title: '金额', minWidth: 150, sort: true}, |
|
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
|
{field: 'state', width: 150, title: '流程状态'}, |
|
|
|
{ |
|
|
|
@ -236,7 +268,17 @@ |
|
|
|
limit: 10, |
|
|
|
page: true, |
|
|
|
skin: 'line', |
|
|
|
done: function () { |
|
|
|
done: function (res, curr, count) { |
|
|
|
let display = $("#delete").css("display"); |
|
|
|
if(display !== "none"){ |
|
|
|
if (flagForReload) { |
|
|
|
flagForReload = false; |
|
|
|
let col = {field: 'price', title: '金额', minWidth: 150, sort: true}; |
|
|
|
cols.splice(6, 0, col); |
|
|
|
table.reload('currentTableId', {cols: [cols]}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|