<!DOCTYPE html>
|
<html>
|
<head>
|
<meta 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">
|
</head>
|
<body>
|
|
<div class="layui-fluid">
|
<div class="layui-card">
|
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<label class="layui-form-label">关键字</label>
|
<div class="layui-input-inline">
|
<input type="text" id="Msg" name="Msg" placeholder="物品名称/编码/规格/批次" autocomplete="off"
|
class="layui-input">
|
</div>
|
</div>
|
|
<div class="layui-inline">
|
<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
|
lay-filter="LAY-app-contlist-search">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
搜索
|
</button>
|
<button class="layui-btn layui-btn-sm layuiadmin-btn-list" data-type="setParent">确定</button>
|
</div>
|
</div>
|
</div>
|
<div class="layui-card-body">
|
<table id="goods-list" lay-filter="goods-list"></table>
|
</div>
|
</div>
|
</div>
|
|
<script src="../../layuiadmin/layui/layui.js"></script>
|
<script src="../../js/public.js"></script>
|
<script src="../../js/jquery-3.5.1.min.js"></script>
|
<script src="../../js/jquery.cookie.js"></script>
|
<script>
|
layui.config({
|
base: '../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'table', 'laypage', 'layer'], function() {
|
var table = layui.table,
|
form = layui.form,
|
laypage = layui.laypage,
|
index1 = parent.layer.getFrameIndex(window.name),
|
layer = layui.layer;
|
|
var active = {
|
setParent: function() {
|
var checkStatus = table.checkStatus('goods-list');
|
var id = '#LAY-app-content-list',
|
goods = $('#goods-list');
|
if (checkStatus.data.length == 0) {
|
parent.layer.msg('请选择待出库的物品!');
|
return true;
|
}
|
window.parent.success(checkStatus.data);
|
parent.layer.close(index1);
|
}
|
};
|
$('.layui-inline .layui-btn').on('click', function() {
|
var othis = $(this),
|
type = othis.data('type');
|
active[type] && active[type].call(this);
|
});
|
|
function refreshTable() {
|
var param = {
|
WareHouseNo:getQueryString('houseId'),
|
Type:getQueryString('Type'),
|
Msg: $("#Msg").val(),
|
};
|
table.render({
|
elem: '#goods-list',
|
height: 'full-100',
|
id: 'goods-list',
|
url: IP + "/BllSo/GetStockGroupList",
|
method: 'POST',
|
where: param,
|
contentType: 'application/json',
|
headers:{ToKen:$.cookie('token')},
|
page: true,
|
limit: pageCnt,
|
limits: pageLimits,
|
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
cols: [
|
[{
|
type: 'checkbox',
|
width: 50,
|
fixed: 'left'
|
}, {
|
field: 'SkuNo',
|
title: '物品编码',
|
width: 100,
|
align: 'center',
|
fixed: 'left'
|
}, {
|
field: 'SkuName',
|
title: '物品名称',
|
align: 'center',
|
width: 250,
|
}, {
|
field: 'LotNo',
|
align: 'center',
|
title: '批次',
|
width: 100
|
}, {
|
field: 'Standard',
|
title: '物品规格',
|
align: 'center',
|
minWidth: 100
|
}, {
|
field: 'Qty',
|
title: '库存数量',
|
width: 100,
|
align: 'center',
|
}]
|
],
|
|
});
|
}
|
// table.reload()
|
// 表单需要的变量
|
|
//监听搜索
|
form.on('submit(LAY-app-contlist-search)', function(data) {
|
|
refreshTable();
|
});
|
refreshTable();
|
|
// var param = {};
|
// sendData(IP + "/Export/GetAllSelect", param, 'post', function(res) {
|
// if (res.code == 1) { //成功
|
|
// for (var i = 0; i < res.Customerdata.length; i++) {
|
// $("#ExportCustomerName").append('<option value =' + res.Customerdata[i].CustomerCode +
|
// '>' + res.Customerdata[i].CustomerName +
|
// '</option>');
|
// }
|
|
// form.render('select');
|
// } else { //不成功
|
// layer.msg(res.msg, {
|
// icon: 2,
|
// time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
// }, function() {});
|
// }
|
// });
|
//获取浏览器参数
|
function getQueryString(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
var r = window.location.search.substr(1).match(reg);
|
if (r != null) return unescape(r[2]);
|
return null;
|
}
|
});
|
</script>
|
</body>
|
</html>
|