|
|
@ -112,6 +112,27 @@ |
|
|
th:style="'display:'+${display}">删除</a> |
|
|
th:style="'display:'+${display}">删除</a> |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<script type="text/html" id="approvalState"> |
|
|
|
|
|
{{# |
|
|
|
|
|
let allApproval = d.allApproval; |
|
|
|
|
|
let pass = d.pass; |
|
|
|
|
|
let colorString = ""; |
|
|
|
|
|
if (pass === 3) { |
|
|
|
|
|
if (allApproval) { |
|
|
|
|
|
colorString = '#31bdeca1'; |
|
|
|
|
|
} else { |
|
|
|
|
|
colorString = '#ffb800a1'; |
|
|
|
|
|
} |
|
|
|
|
|
} else if (pass === 1) { |
|
|
|
|
|
colorString = '#16b777a1'; |
|
|
|
|
|
} else { |
|
|
|
|
|
colorString = '#ff211ea1'; |
|
|
|
|
|
} |
|
|
|
|
|
}} |
|
|
|
|
|
<div style="border-radius: 50px;background-color: {{= colorString}}">{{d.state}}</div> |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> |
|
|
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> |
|
|
@ -190,7 +211,7 @@ |
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
{field: 'state', width: 150, title: '流程状态'}, |
|
|
{field: 'state', width: 150, title: '流程状态',templet:'#approvalState',align:"center"}, |
|
|
{field: 'applicantName', width: 150, title: '申请人'}, |
|
|
{field: 'applicantName', width: 150, title: '申请人'}, |
|
|
{field: 'adminorgName', width: 150, title: '申请人部门'}, |
|
|
{field: 'adminorgName', width: 150, title: '申请人部门'}, |
|
|
{field: 'useAdminorgName', width: 150, title: '使用部门'}, |
|
|
{field: 'useAdminorgName', width: 150, title: '使用部门'}, |
|
|
@ -258,7 +279,7 @@ |
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
{field: 'mcode', width: 150, title: '存货编码'}, |
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
{field: 'quantity', width: 100, title: '数量', sort: true}, |
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
{field: 'depositoryName', width: 150, title: '仓库名称'}, |
|
|
{field: 'state', width: 150, title: '流程状态'}, |
|
|
{field: 'state', width: 150, title: '流程状态',templet:'#approvalState',align:"center"}, |
|
|
{field: 'applicantName', width: 150, title: '申请人'}, |
|
|
{field: 'applicantName', width: 150, title: '申请人'}, |
|
|
{field: 'applicantTime', width: 200, title: '申请时间', sort: true}, |
|
|
{field: 'applicantTime', width: 200, title: '申请时间', sort: true}, |
|
|
{ |
|
|
{ |
|
|
@ -289,48 +310,12 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$.each(res['data'], function (i, j) { |
|
|
|
|
|
let allApproval = j["allApproval"]; |
|
|
|
|
|
let pass = j["pass"]; |
|
|
|
|
|
if (pass === 3) { |
|
|
|
|
|
if (allApproval) { |
|
|
|
|
|
Layui_SetDataTableRowColor('table', i + 1, '#31bdec'); |
|
|
|
|
|
} else { |
|
|
|
|
|
Layui_SetDataTableRowColor('table', i + 1, '#ffb800'); |
|
|
|
|
|
} |
|
|
|
|
|
} else if (pass === 1) { |
|
|
|
|
|
Layui_SetDataTableRowColor('table', i + 1, '#16b777'); |
|
|
|
|
|
} else { |
|
|
|
|
|
Layui_SetDataTableRowColor('table', i + 1, '#ff211e'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用于给table行上色的方法 |
|
|
|
|
|
function Layui_SetDataTableRowColor(TabDivId, RowIndex, ColorString) { |
|
|
|
|
|
try { |
|
|
|
|
|
let rowItem = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")"); |
|
|
|
|
|
let column = $(rowItem[0].childNodes[7]); |
|
|
|
|
|
if (column != null) //找到对象了 |
|
|
|
|
|
{ |
|
|
|
|
|
// console.log(div); |
|
|
|
|
|
column.css("background-color", ColorString); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
console.log('没有找到对象'); |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
// console.log(e.message); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 监听搜索操作 |
|
|
// 监听搜索操作 |
|
|
form.on('submit(data-search-btn)', function (data) { |
|
|
form.on('submit(data-search-btn)', function (data) { |
|
|
var req = {}; |
|
|
var req = {}; |
|
|
|