<!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, maximum-scale=1">
|
<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" style="padding:0">
|
<div class="layui-card">
|
<div class="layui-card-body" style="padding: 5px; height:800px;">
|
<div style="background-color:#0085E8;">
|
<span style="color: white;"><i class="layui-icon layui-icon-form"></i>待发区找货</span>
|
</div>
|
<div class="layui-form-item" style="padding:15px;margin:0px">
|
<div class="layui-row">
|
<div class="layui-col-xs3">
|
<label class="layui-form-label" style="width:60px;padding-left:0px;">源单号</label>
|
</div>
|
<div class="layui-col-xs8">
|
<input type="text" name="HBarCode" id="HBarCode" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
</div>
|
<div class="layui-tab-item layui-show">
|
<table class="layui-hide" id="bzd-table" lay-filter="bzd-table"></table>
|
</div>
|
<div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">退出</button>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script>
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'form', 'laydate', 'table', 'element'], function () {
|
var $ = layui.$
|
, layer = layui.layer
|
, table = layui.table
|
, form = layui.form
|
|
//判断是否登录 未登录则跳到登录页
|
//if (sessionStorage.login != "login") {
|
// layer.confirm("登录失效,请重新登录!", {
|
// icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
|
// }, function () { window.location.href = "../../user/login.html"; });
|
//}
|
|
//主表列表
|
var option = {
|
elem: '#bzd-table'
|
//, toolbar: '#toolbarDemo'
|
, page: true
|
//, height: 256
|
//, cellMinWidth: 90
|
, cols: [[
|
{ type: 'numbers', title: '序号' }
|
, { field: '条码编号', title: '条码编号' }
|
, { field: '批号', title: '批号' }
|
, { field: '仓库ID', title: '仓库ID', hide: true }
|
, { field: '仓库名称', title: '仓库名称' }
|
, { field: '仓库编码', title: '仓库编码' }
|
, { field: '仓位ID', title: '仓位ID', hide: true }
|
, { field: '仓位名称', title: '仓位名称', hide: true }
|
, { field: '仓位编码', title: '仓位编码' }
|
, { field: '物料ID', title: '物料ID', hide: true }
|
, { field: '物料名称', title: '物料名称' }
|
, { field: '物料编码', title: '物料编码' }
|
, { field: '源单号', title: '源单号' }
|
]]
|
, text: {
|
none: '暂无相关数据,请先扫描实物条码!' //默认:无数据。注:该属性为 layui 2.2.5 开始新增
|
}
|
};
|
|
|
//初始加载表格
|
option.data = [];
|
table.render(option);
|
|
|
//进入页面默认光标在源单号上
|
$("#HBarCode").focus();
|
|
//扫实物条码
|
$('#HBarCode').on('keydown', function (event) {
|
var HBarCode = $('#HBarCode').val();
|
if (event.keyCode == 13) {
|
if (!HBarCode) {
|
layer.msg("请扫描条码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/LookingFor/GetWaitingLookingFor",
|
type: "GET",
|
data: { "HBarCode": HBarCode },
|
success: function (result) {
|
if (result.count == 1) { // 说明验证成功了,
|
var data = result.data;
|
option.data = data;
|
table.render(option);
|
layer.close(index);
|
}
|
else {
|
option.data = [];
|
table.render(option);
|
layer.close(index);
|
layer.msg("此条码无记录,请扫描正确的条码!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
});
|
layer.close(index);
|
$('#HBarCode').val("");
|
}
|
});
|
|
|
|
//退出按钮
|
form.on('submit(Cancel)', function () {
|
parent.location.href = "../../../views/index.html"
|
//window.close();//关闭当前页
|
})
|
|
// 以上为leyui模块
|
});
|
|
</script>
|
|
</body>
|
</html>
|