You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
357 lines
14 KiB
357 lines
14 KiB
<!DOCTYPE html>
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
<head>
|
|
<th:block th:include="include :: header('原料材料列表')" />
|
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
|
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
|
|
</head>
|
|
<body class="gray-bg">
|
|
<div class="container-div">
|
|
<div class="row">
|
|
<div class="col-sm-12 search-collapse">
|
|
<form id="formId">
|
|
<div class="select-list">
|
|
<ul>
|
|
<li>
|
|
<label>原料代码:</label>
|
|
<input type="text" name="rawMaterialCode"/>
|
|
</li>
|
|
<li>
|
|
<label>原料名称:</label>
|
|
<input type="text" name="rawMaterialName"/>
|
|
</li>
|
|
<li>
|
|
<label>料号是否停用:</label>
|
|
<select name="whetherStop" th:with="type=${@dict.getType('sys_whether')}">
|
|
<option value="">所有</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>供应商料号:</label>
|
|
<input type="text" name="supplierNumber"/>
|
|
</li>
|
|
<li>
|
|
<label>供应商名称:</label>
|
|
<!-- <select name="supplierName">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<input type="text" name="supplierName"/>
|
|
|
|
</li>
|
|
<li>
|
|
<label>主供应商:</label>
|
|
<!-- <select name="primarySupplier">-->
|
|
<!-- <option value="">所有</option>-->
|
|
<!-- <option value="-1">代码生成请选择字典属性</option>-->
|
|
<!-- </select>-->
|
|
<input type="text" name="primarySupplier"/>
|
|
|
|
</li>
|
|
<li>
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:rawmaterial:add">
|
|
<i class="fa fa-plus"></i> 添加
|
|
</a>
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:rawmaterial:edit">
|
|
<i class="fa fa-edit"></i> 修改
|
|
</a>
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:rawmaterial:remove">
|
|
<i class="fa fa-remove"></i> 删除
|
|
</a>
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:rawmaterial:export">
|
|
<i class="fa fa-download"></i> 导出
|
|
</a>
|
|
</div>
|
|
<div class="col-sm-12 select-table table-striped">
|
|
<table id="bootstrap-table" style="white-space:nowrap"></table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:include="include :: footer" />
|
|
<th:block th:include="include :: select2-js"/>
|
|
|
|
<script th:inline="javascript">
|
|
var editFlag = [[${@permission.hasPermi('system:rawmaterial:edit')}]];
|
|
var removeFlag = [[${@permission.hasPermi('system:rawmaterial:remove')}]];
|
|
var materialCategoryDatas = [[${@dict.getType('sys_raw_material_category')}]];
|
|
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
|
|
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
|
|
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]];
|
|
var whetherStopDatas = [[${@dict.getType('sys_whether')}]];
|
|
var limitWhetherDatas = [[${@dict.getType('sys_whether')}]];
|
|
var whetherSemiManufacturesDatas = [[${@dict.getType('sys_whether')}]];
|
|
var gpItemSelectionDatas = [[${@dict.getType('sys_gp_Item_selection')}]];
|
|
var prefix = ctx + "system/rawmaterial";
|
|
|
|
$(function() {
|
|
var options = {
|
|
url: prefix + "/list",
|
|
createUrl: prefix + "/add",
|
|
updateUrl: prefix + "/edit/{id}",
|
|
removeUrl: prefix + "/remove",
|
|
exportUrl: prefix + "/export",
|
|
clickToSelect: true,
|
|
modalName: "原料材料",
|
|
columns: [{
|
|
checkbox: true
|
|
},
|
|
{
|
|
field: 'rawMaterialId',
|
|
title: '原料id',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'rawMaterialCode',
|
|
title: '原料代码'
|
|
},
|
|
{
|
|
field: 'rawMaterialName',
|
|
title: '原料名称'
|
|
},
|
|
{
|
|
field: 'materialCategory',
|
|
title: '原料类别',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(materialCategoryDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'rawMaterialColour',
|
|
title: '颜色',
|
|
// visible: false
|
|
},
|
|
{
|
|
field: 'typeMachine',
|
|
title: '机种'
|
|
},
|
|
|
|
{
|
|
field: 'specificationModel',
|
|
title: '规格型号'
|
|
},
|
|
{
|
|
field: 'inventoryUnit',
|
|
title: '库存单位',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(inventoryUnitDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'exportSales',
|
|
title: '内外销',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(exportSalesDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'purchasingUnit',
|
|
title: '采购单位',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(purchasingUnitDatas, value);
|
|
},
|
|
visible: false
|
|
|
|
},
|
|
{
|
|
field: 'purchasePrice',
|
|
title: '采购价格'
|
|
},
|
|
{
|
|
field: 'limitCollectionAmount',
|
|
title: '限额领用数',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'stockUnitWeight',
|
|
title: '库存单位重量',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'safetyStock',
|
|
title: '安全库存'
|
|
},
|
|
{
|
|
field: 'purchaseLeadTime',
|
|
title: '采购提前期',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'specialUse',
|
|
title: '专用部门或人',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'whetherStop',
|
|
title: '料号是否停用',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(whetherStopDatas, value);
|
|
}
|
|
},
|
|
{
|
|
field: 'createrName',
|
|
title: '创建人',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'limitWhether',
|
|
title: '限额领用否',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(limitWhetherDatas, value);
|
|
},
|
|
visible: false
|
|
|
|
},
|
|
{
|
|
field: 'dedicatedWhether',
|
|
title: '是否专用'
|
|
},
|
|
{
|
|
field: 'minimumBatchSize',
|
|
title: '最小批量',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'whetherSemiManufactures',
|
|
title: '是否半成品',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(whetherSemiManufacturesDatas, value);
|
|
},
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'customsName',
|
|
title: '海关名称',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'supplierNumber',
|
|
title: '供应商料号'
|
|
},
|
|
{
|
|
field: 'rawMaterialDiameter',
|
|
title: '直径'
|
|
},
|
|
{
|
|
field: 'supplierCode',
|
|
title: '供应商代码'
|
|
},
|
|
{
|
|
field: 'supplierName',
|
|
title: '供应商名称'
|
|
},
|
|
{
|
|
field: 'warehouseLocation',
|
|
title: '库位'
|
|
},
|
|
{
|
|
field: 'purchaseEquivalent',
|
|
title: '采购单位对应多少库存单位',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'maximumPurchaseQuantity',
|
|
title: '最大采购量',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'costPrice',
|
|
title: '成本价'
|
|
},
|
|
{
|
|
field: 'primarySupplier',
|
|
title: '主供应商'
|
|
},
|
|
{
|
|
field: 'subSupplier',
|
|
title: '次供应商'
|
|
},
|
|
{
|
|
field: 'maximumInventory',
|
|
title: '最高库存'
|
|
},
|
|
{
|
|
field: 'detentionDays',
|
|
title: '滞留天数'
|
|
},
|
|
{
|
|
field: 'gpItemSelection',
|
|
title: 'GP项选择',
|
|
formatter: function(value, row, index) {
|
|
return $.table.selectDictLabel(gpItemSelectionDatas, value);
|
|
},
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'createrTime',
|
|
title: '创建日期',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'defaultWarehouse',
|
|
title: '默认仓库'
|
|
},
|
|
{
|
|
field: 'hsNumber',
|
|
title: '海关HS号',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'standbyOne',
|
|
title: '备用一',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'standbyTwo',
|
|
title: '备用二',
|
|
visible: false
|
|
},
|
|
{
|
|
field: 'firstAddTime',
|
|
title: '录入时间',
|
|
formatter: function (value, row, index) {
|
|
if (value == null) {
|
|
return " ";
|
|
} else {
|
|
return value;
|
|
}
|
|
}
|
|
},
|
|
{
|
|
field: 'updateInfoTime',
|
|
title: '上次修改时间',
|
|
formatter: function (value, row, index) {
|
|
if (value == null) {
|
|
return " ";
|
|
} else {
|
|
var vArr = value.split(',')
|
|
return vArr[0];
|
|
}
|
|
}
|
|
}
|
|
// {
|
|
// title: '操作',
|
|
// align: 'center',
|
|
// formatter: function(value, row, index) {
|
|
// var actions = [];
|
|
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.rawMaterialId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.rawMaterialId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
// return actions.join('');
|
|
// }
|
|
// }
|
|
]
|
|
};
|
|
$.table.init(options);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|