<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>计量单位组列表</title>
|
<meta name="renderer" content="webkit">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
</head>
|
<body>
|
<div class="layui-fluid">
|
<div class="layui-card">
|
<!--<div class="layui-card-header"></div>-->
|
<div class="layui-card-body" style="padding: 15px;">
|
<form class="layui-form" action="" lay-filter="component-form-group">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label">过滤列</label>
|
<div class="layui-input-inline">
|
<input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="请输入过滤列" class="layui-input">
|
</div>
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">快速查询</button>
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
</div>
|
<table class="layui-hide" id="mainTable"></table>
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script>
|
layui.use(['table', 'form', 'layer'], function () {
|
var table = layui.table
|
, form = layui.form
|
, layer = layui.layer;
|
|
form.on('submit(HQuery)', function () {//选择单位
|
//var sMainStr = JSON.stringify(table.cache['mainTable']);
|
RoadQuery($('#Value').val());
|
});
|
form.on('submit(FH)', function () {//选择单位
|
//var sMainStr = JSON.stringify(table.cache['mainTable']);
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
parent.GetHUnitGroupNameValue(data);
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.close(index);
|
});
|
RoadQuery($('#Value').val());
|
table.render({
|
elem: '#mainTable'
|
// , url: '/demo/table/user/'
|
, data: []
|
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
, cols: [[
|
{ type: 'radio' }
|
, { field: 'HItemID', width: 150, title: '单位组ID', hide: true }
|
, { field: '计量单位组代码', width: 150, title: '计量单位组代码' }
|
, { field: '计量单位组', width: 150, title: '计量单位组', sort: true }
|
]]
|
, page: true
|
, limits: [50, 500, 5000, 50000],
|
limit: 50
|
});
|
///加载显示数据
|
function RoadQuery(Where) {
|
var Value = Where;
|
if (Value == null) {
|
Value = '';
|
}
|
$.ajax({
|
type: "get",
|
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetDepartmentList_Json",
|
url: GetWEBURL() + "/Web/GetUnitGroupList_Json",
|
async: true,
|
data: { "Unit": Value },
|
//data: { "Value": Value },
|
success: function (result) {
|
ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
|
table.reload('mainTable', {
|
data: ajaxReturnData
|
, height: 'full-10'
|
, loading: false
|
, done: function (index, res) {
|
|
}
|
});
|
},
|
error: function (result) {
|
console.log(result);
|
//layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
|
}
|
});
|
};
|
});
|
</script>
|
|
</body>
|
</html>
|