Browse Source

修改金额可见权限

lwx_dev
erdanergou 3 years ago
parent
commit
626457a580
  1. 18
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  2. 2
      src/main/resources/templates/pages/application/application-review.html
  3. 2
      src/main/resources/templates/pages/application/form-step-look_back.html
  4. 2
      src/main/resources/templates/pages/application/form-step-look_minRecordOut.html
  5. 6
      src/main/resources/templates/pages/depository/table-in_mobile.html
  6. 48
      src/main/resources/templates/pages/depository/table-out.html
  7. 2
      target/classes/templates/pages/application/application-review.html
  8. 2
      target/classes/templates/pages/application/form-step-look_back.html
  9. 2
      target/classes/templates/pages/application/form-step-look_minRecordOut.html

18
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -1631,6 +1631,15 @@ public class PageController {
recordP.setUnit(sumUnit.toString()); recordP.setUnit(sumUnit.toString());
mv.addObject("record", recordP); mv.addObject("record", recordP);
mv.addObject("recordMinList", applicationOutRecordMinByParent); mv.addObject("recordMinList", applicationOutRecordMinByParent);
Integer role = userToken.getIsadmin();
if (role == null) {
role = 1;
}
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0 ) {
mv.addObject("display", "table-row");
} else {
mv.addObject("display", "none");
}
return mv; return mv;
} }
@ -1860,6 +1869,13 @@ public class PageController {
mv.addObject("edisplay", "none"); mv.addObject("edisplay", "none");
} }
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) {
mv.addObject("pdisplay", "table-row");
} else {
mv.addObject("pdisplay", "none");
}
mv.addObject("recordMinP", recordMinP); mv.addObject("recordMinP", recordMinP);
@ -2027,7 +2043,7 @@ public class PageController {
} }
if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) { if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) {
mv.addObject("display", "inline-block"); mv.addObject("display", "table-row");
} else { } else {
mv.addObject("display", "none"); mv.addObject("display", "none");

2
src/main/resources/templates/pages/application/application-review.html

@ -55,7 +55,7 @@
<td>计量单位</td> <td>计量单位</td>
<td id="unit" th:text="${record.getUnit()}">单位</td> <td id="unit" th:text="${record.getUnit()}">单位</td>
</tr> </tr>
<tr> <tr th:style="'display:'+${display}">
<td>金额</td> <td>金额</td>
<td id="price" th:text="${record.getPrice()}">金额</td> <td id="price" th:text="${record.getPrice()}">金额</td>
</tr> </tr>

2
src/main/resources/templates/pages/application/form-step-look_back.html

@ -67,7 +67,7 @@
<td>数量</td> <td>数量</td>
<td id="quantity" th:text="${record.getQuantity()}">409</td> <td id="quantity" th:text="${record.getQuantity()}">409</td>
</tr> </tr>
<tr> <tr th:style="'display:'+${display}">
<td>金额</td> <td>金额</td>
<td id="price" th:text="${record.getPrice()}">2016-11-28</td> <td id="price" th:text="${record.getPrice()}">2016-11-28</td>
</tr> </tr>

2
src/main/resources/templates/pages/application/form-step-look_minRecordOut.html

@ -78,7 +78,7 @@
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr th:style="'display:'+${pdisplay}">
<td>金额</td> <td>金额</td>
<td> <td>
<input id="price" type="text" th:value="${recordMinP.getPrice()}" readonly <input id="price" type="text" th:value="${recordMinP.getPrice()}" readonly

6
src/main/resources/templates/pages/depository/table-in_mobile.html

@ -8,10 +8,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all"> <link rel="stylesheet" href="/static/lib/layui-v2.6.3/css/layui.css" media="all">
<link rel="stylesheet" href="/static/css/public.css" media="all"> <link rel="stylesheet" href="/static/css/public.css" media="all">
<link rel="stylesheet" href="/static/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
</head> </head>
<body> <body>
<div class="layuimini-container"> <div class="layuimini-container">
<a href="javascript:" data-refresh="刷新"><i class="fa fa-refresh"></i></a>
<div class="layuimini-main"> <div class="layuimini-main">
<div class="layui-collapse"> <div class="layui-collapse">
<div class="layui-colla-item"> <div class="layui-colla-item">
<h2 class="layui-colla-title">搜索</h2> <h2 class="layui-colla-title">搜索</h2>
@ -97,10 +100,11 @@
} }
layui.use(['form', 'flow', 'laydate'], function () { layui.use(['form', 'flow', 'laydate','miniAdmin'], function () {
var $ = layui.jquery, var $ = layui.jquery,
form = layui.form, form = layui.form,
flow = layui.flow, flow = layui.flow,
miniAdmin = layui.miniAdmin;
laydate = layui.laydate; laydate = layui.laydate;
let takingPre = 0; let takingPre = 0;

48
src/main/resources/templates/pages/depository/table-out.html

@ -78,7 +78,7 @@
<script type="text/html" id="toolbarDemo"> <script type="text/html" id="toolbarDemo">
<div class="layui-btn-container"> <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-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}"> 删除 th:style="'display:'+${display}"> 删除
</button> </button>
</div> </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({ laydate.render({
elem: '#startDate' elem: '#startDate'
@ -206,7 +239,6 @@
{field: 'mname', width: 150, title: '物料名称'}, {field: 'mname', width: 150, title: '物料名称'},
{field: 'mcode', width: 150, title: '存货编码'}, {field: 'mcode', width: 150, title: '存货编码'},
{field: 'quantity', width: 150, title: '数量', sort: true}, {field: 'quantity', width: 150, title: '数量', sort: true},
{field: 'price', title: '金额', minWidth: 150, sort: true},
{field: 'depositoryName', width: 150, title: '仓库名称'}, {field: 'depositoryName', width: 150, title: '仓库名称'},
{field: 'state', width: 150, title: '流程状态'}, {field: 'state', width: 150, title: '流程状态'},
{ {
@ -236,7 +268,17 @@
limit: 10, limit: 10,
page: true, page: true,
skin: 'line', 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]});
}
}
} }
}); });

2
target/classes/templates/pages/application/application-review.html

@ -55,7 +55,7 @@
<td>计量单位</td> <td>计量单位</td>
<td id="unit" th:text="${record.getUnit()}">单位</td> <td id="unit" th:text="${record.getUnit()}">单位</td>
</tr> </tr>
<tr> <tr th:style="'display:'+${display}">
<td>金额</td> <td>金额</td>
<td id="price" th:text="${record.getPrice()}">金额</td> <td id="price" th:text="${record.getPrice()}">金额</td>
</tr> </tr>

2
target/classes/templates/pages/application/form-step-look_back.html

@ -67,7 +67,7 @@
<td>数量</td> <td>数量</td>
<td id="quantity" th:text="${record.getQuantity()}">409</td> <td id="quantity" th:text="${record.getQuantity()}">409</td>
</tr> </tr>
<tr> <tr th:style="'display:'+${display}">
<td>金额</td> <td>金额</td>
<td id="price" th:text="${record.getPrice()}">2016-11-28</td> <td id="price" th:text="${record.getPrice()}">2016-11-28</td>
</tr> </tr>

2
target/classes/templates/pages/application/form-step-look_minRecordOut.html

@ -78,7 +78,7 @@
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr th:style="'display:'+${pdisplay}">
<td>金额</td> <td>金额</td>
<td> <td>
<input id="price" type="text" th:value="${recordMinP.getPrice()}" readonly <input id="price" type="text" th:value="${recordMinP.getPrice()}" readonly

Loading…
Cancel
Save