refactor: 新增权限“隐藏采购信息”,选中后,料单查看明细页面隐藏采购信息
This commit is contained in:
@@ -153,7 +153,12 @@
|
|||||||
<div id="tableHeaderWrapper">
|
<div id="tableHeaderWrapper">
|
||||||
<div id="tableHeader"></div>
|
<div id="tableHeader"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<shiro:hasPermission name="materialOrder:hidePurchaseInfo">
|
||||||
|
<table id="addTable" data-columns="inside-materialOrder_view-table-hidePurchaseInfo" data-custom-header data-inside>
|
||||||
|
</shiro:hasPermission>
|
||||||
|
<shiro:lacksPermission name="materialOrder:hidePurchaseInfo">
|
||||||
<table id="addTable" data-columns="inside-materialOrder_view-table" data-custom-header data-inside>
|
<table id="addTable" data-columns="inside-materialOrder_view-table" data-custom-header data-inside>
|
||||||
|
</shiro:lacksPermission>
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="titleTr">
|
<tr class="titleTr">
|
||||||
<th style="min-width: 20px" class="minimum" data-column="#"><a class="addBtn"
|
<th style="min-width: 20px" class="minimum" data-column="#"><a class="addBtn"
|
||||||
@@ -195,10 +200,12 @@
|
|||||||
<th data-column="insulationCode">隔热代号</th>
|
<th data-column="insulationCode">隔热代号</th>
|
||||||
<th data-column="specialRequest">特殊要求</th>
|
<th data-column="specialRequest">特殊要求</th>
|
||||||
<th data-column="memo">备注</th>
|
<th data-column="memo">备注</th>
|
||||||
|
<shiro:lacksPermission name="materialOrder:hidePurchaseInfo">
|
||||||
<th data-column="supplierIds">供应商列表</th>
|
<th data-column="supplierIds">供应商列表</th>
|
||||||
<th data-column="confirmSuppliers">确认供应商列表</th>
|
<th data-column="confirmSuppliers">确认供应商列表</th>
|
||||||
<th data-column="supplierName">中标供应商</th>
|
<th data-column="supplierName">中标供应商</th>
|
||||||
<th data-column="price">中标价格</th>
|
<th data-column="price">中标价格</th>
|
||||||
|
</shiro:lacksPermission>
|
||||||
<th th:each="data : ${session.eField.list('materialOrderItem')}"
|
<th th:each="data : ${session.eField.list('materialOrderItem')}"
|
||||||
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
th:text="${data.name}" th:data-column="${data.fieldName}"></th>
|
||||||
<th data-column="##">操作</th>
|
<th data-column="##">操作</th>
|
||||||
@@ -241,14 +248,20 @@
|
|||||||
<td><input data-code="insulationCode" placeholder="搜索"/></td>
|
<td><input data-code="insulationCode" placeholder="搜索"/></td>
|
||||||
<td><input data-code="specialRequest" placeholder="搜索"/></td>
|
<td><input data-code="specialRequest" placeholder="搜索"/></td>
|
||||||
<td><input data-code="memo" placeholder="搜索"/></td>
|
<td><input data-code="memo" placeholder="搜索"/></td>
|
||||||
|
<shiro:lacksPermission name="materialOrder:hidePurchaseInfo">
|
||||||
<td><input data-code="supplierNameList" placeholder="搜索"/></td>
|
<td><input data-code="supplierNameList" placeholder="搜索"/></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><input data-code="supplierName" placeholder="搜索"/></td>
|
<td><input data-code="supplierName" placeholder="搜索"/></td>
|
||||||
<td><input data-code="price" placeholder="搜索"/></td>
|
<td><input data-code="price" placeholder="搜索"/></td>
|
||||||
|
</shiro:lacksPermission>
|
||||||
<th:block th:each="data : ${session.eField.list('materialOrderItem')}">
|
<th:block th:each="data : ${session.eField.list('materialOrderItem')}">
|
||||||
<td><input th:data-code="${data.fieldName}" placeholder="搜索"/></td>
|
<td><input th:data-code="${data.fieldName}" placeholder="搜索"/></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
<td><a class="confirmSupplier" onclick="batchConfirmSupplier(this)">批量确认</a></td>
|
<td>
|
||||||
|
<shiro:lacksPermission name="materialOrder:hidePurchaseInfo">
|
||||||
|
<a class="confirmSupplier" onclick="batchConfirmSupplier(this)">批量确认</a>
|
||||||
|
</shiro:lacksPermission>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr class="dataTr" th:each="item, status : ${materialOrder.materialOrderItemList}">-->
|
<!-- <tr class="dataTr" th:each="item, status : ${materialOrder.materialOrderItemList}">-->
|
||||||
<!-- <td data-code="id" th:text="${status.index + 1}"></td>-->
|
<!-- <td data-code="id" th:text="${status.index + 1}"></td>-->
|
||||||
@@ -512,7 +525,14 @@
|
|||||||
'shortDescription', 'longDescription', 'gWeight', 'totalWeight','needCount', 'count','useStockCount', 'unit', 'bigProductType',
|
'shortDescription', 'longDescription', 'gWeight', 'totalWeight','needCount', 'count','useStockCount', 'unit', 'bigProductType',
|
||||||
'bigProductDes', 'smallProductType', 'smallProductDes', 'makeCode', 'makeName', 'diameterL', 'diameterS', 'jacketSpec',
|
'bigProductDes', 'smallProductType', 'smallProductDes', 'makeCode', 'makeName', 'diameterL', 'diameterS', 'jacketSpec',
|
||||||
'wallThicknessL', 'wallThicknessS', 'size', 'pressureLevel', 'endFace', 'material', 'materialType',
|
'wallThicknessL', 'wallThicknessS', 'size', 'pressureLevel', 'endFace', 'material', 'materialType',
|
||||||
'insulationCode', 'specialRequest', 'memo', 'supplierNameList', 'confirmSuppliers', 'supplierName', 'price']
|
'insulationCode', 'specialRequest', 'memo']
|
||||||
|
var hasPurchaseInfo = $('#addTable').attr('data-columns').indexOf('hidePurchaseInfo') === -1;
|
||||||
|
if (hasPurchaseInfo) {
|
||||||
|
tableFieldList.push('supplierNameList');
|
||||||
|
tableFieldList.push('confirmSuppliers');
|
||||||
|
tableFieldList.push('supplierName');
|
||||||
|
tableFieldList.push('price');
|
||||||
|
}
|
||||||
function loadItem() {
|
function loadItem() {
|
||||||
var thisName
|
var thisName
|
||||||
var thisValue
|
var thisValue
|
||||||
@@ -567,12 +587,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
html = html +
|
html = html +
|
||||||
" <td class='fixed'>\n" +
|
" <td class='fixed'>\n"
|
||||||
|
if (hasPurchaseInfo) {
|
||||||
// " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" +
|
// " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" +
|
||||||
" <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/changeSupplier.html?id="+item.id+"\");'>供应商列表</a>\n";
|
html = html + " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/changeSupplier.html?id="+item.id+"\");'>供应商列表</a>\n";
|
||||||
if (item.confirmSuppliers != null || !item.confirmSuppliers){
|
if (item.confirmSuppliers != null || !item.confirmSuppliers){
|
||||||
html = html +" <a class='confirmSupplier' onclick='confirmSupplier("+item.id+")'>确认供应商</a>\n"
|
html = html +" <a class='confirmSupplier' onclick='confirmSupplier("+item.id+")'>确认供应商</a>\n"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
html = html+" "+
|
html = html+" "+
|
||||||
" </td></tr>"
|
" </td></tr>"
|
||||||
|
|
||||||
@@ -597,12 +619,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
html = html +
|
html = html +
|
||||||
" <td class='fixed'>\n" +
|
" <td class='fixed'>\n"
|
||||||
|
if (hasPurchaseInfo) {
|
||||||
// " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" +
|
// " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/priceView.html?id="+item.id+"\");'>查看报价</a>\n" +
|
||||||
" <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/changeSupplier.html?id="+item.id+"\");'>供应商列表</a>\n" ;
|
html = html + " <a href='javascript:Dialog.functionDialog(null, null, \"materialOrder/dialog/changeSupplier.html?id="+item.id+"\");'>供应商列表</a>\n" ;
|
||||||
if (item.confirmSuppliers != null || !item.confirmSuppliers){
|
if (item.confirmSuppliers != null || !item.confirmSuppliers){
|
||||||
html = html + " <a class='confirmSupplier' onclick='confirmSupplier("+item.id+")'>确认供应商</a>\n"
|
html = html + " <a class='confirmSupplier' onclick='confirmSupplier("+item.id+")'>确认供应商</a>\n"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
html = html+" "+
|
html = html+" "+
|
||||||
" </td></tr>"
|
" </td></tr>"
|
||||||
htmlAll += html;
|
htmlAll += html;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script src="/resources/js/permissionData.js?v=240329"></script>
|
<script src="/resources/js/permissionData.js?v=250927"></script>
|
||||||
<script>
|
<script>
|
||||||
var $authoritiesWrapper = $(".authorities-wrapper");
|
var $authoritiesWrapper = $(".authorities-wrapper");
|
||||||
for (var i in permissions) {
|
for (var i in permissions) {
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script src="/resources/js/permissionData.js?v=240329"></script>
|
<script src="/resources/js/permissionData.js?v=250927"></script>
|
||||||
<script src="/resources/js/tableColumnControlPermissionData.js"></script>
|
<script src="/resources/js/tableColumnControlPermissionData.js"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var authorities = [[${authorities}]];
|
var authorities = [[${authorities}]];
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script src="/resources/js/permissionData.js?v=240329"></script>
|
<script src="/resources/js/permissionData.js?v=250927"></script>
|
||||||
<script src="/resources/js/tableColumnControlPermissionData.js"></script>
|
<script src="/resources/js/tableColumnControlPermissionData.js"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var authorities = [[${authorities}]];
|
var authorities = [[${authorities}]];
|
||||||
|
|||||||
@@ -198,6 +198,9 @@ var permissions = [
|
|||||||
}, {
|
}, {
|
||||||
text: "查看",
|
text: "查看",
|
||||||
value: "list"
|
value: "list"
|
||||||
|
}, {
|
||||||
|
text: "隐藏采购信息",
|
||||||
|
value: "hidePurchaseInfo"
|
||||||
}, {
|
}, {
|
||||||
text: "删除",
|
text: "删除",
|
||||||
value: "remove"
|
value: "remove"
|
||||||
|
|||||||
Reference in New Issue
Block a user