diff --git a/src/main/resources/templates/pages/depository/table-in.html b/src/main/resources/templates/pages/depository/table-in.html
index 0686dc7e..c9d63f58 100644
--- a/src/main/resources/templates/pages/depository/table-in.html
+++ b/src/main/resources/templates/pages/depository/table-in.html
@@ -111,6 +111,8 @@
th:style="'display:'+${display}">删除
+
+
diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html
index 2ae3ebd3..553833fe 100644
--- a/src/main/resources/templates/pages/depository/table-out.html
+++ b/src/main/resources/templates/pages/depository/table-out.html
@@ -112,6 +112,27 @@
th:style="'display:'+${display}">删除
+
+
@@ -127,7 +148,7 @@
function selectMaterialByName(obj) {
}
- layui.use(['form', 'table', 'laydate','dropdown'], function () {
+ layui.use(['form', 'table', 'laydate', 'dropdown'], function () {
var $ = layui.jquery,
form = layui.form,
table = layui.table,
@@ -190,7 +211,7 @@
{field: 'mcode', width: 150, title: '存货编码'},
{field: 'quantity', width: 100, title: '数量', sort: true},
{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: 'adminorgName', width: 150, title: '申请人部门'},
{field: 'useAdminorgName', width: 150, title: '使用部门'},
@@ -258,7 +279,7 @@
{field: 'mcode', width: 150, title: '存货编码'},
{field: 'quantity', width: 100, title: '数量', sort: true},
{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: '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) {
var req = {};