...
|
...
|
@@ -13,17 +13,40 @@ |
|
|
color: #FF0000;
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
.content{
|
|
|
position:relative;
|
|
|
left:0;
|
|
|
top:0;
|
|
|
z-index:0;
|
|
|
}
|
|
|
#con_ten{
|
|
|
opacity:0.2;
|
|
|
background:#000000;
|
|
|
z-index:0;
|
|
|
position:absolute;
|
|
|
}
|
|
|
#searchForm{
|
|
|
left:0;
|
|
|
}
|
|
|
#dg_01{
|
|
|
position:absolute;
|
|
|
opacity:0.2;
|
|
|
left:0;
|
|
|
background:#000000;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
<div class="content" ms-controller="container">
|
|
|
<div id="con_ten"></div>
|
|
|
<div class="content" ms-controller="container" id="contentfer">
|
|
|
<form class="from-control" id="editForm">
|
|
|
<P class="easyui-panel" title="入库表头" >
|
|
|
<input type="hidden" name="id" ms-duplex="@data.id">
|
|
|
<input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/>
|
|
|
<div id="tt" class="easyui-tabs" style="width: 100%;">
|
|
|
<!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
|
|
|
<div title="出库表头" style="padding: 20px; width: 100%; height: 100%; overflow: auto;"
|
|
|
ms-controller="container">
|
|
|
ms-controller="container"> -->
|
|
|
<table class="kv-table">
|
|
|
<tbody>
|
|
|
<tr>
|
...
|
...
|
@@ -287,11 +310,102 @@ |
|
|
</tr>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
<!-- </div>
|
|
|
<div title="出库表体" style="overflow: auto; padding: 20px; display: none;"></div>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
</form>
|
|
|
</div> <div id='dg_01'></div>
|
|
|
<form id="searchForm">
|
|
|
<table id="dg" style="width:100%;height:554px"
|
|
|
title="出库表体列表" data-options="
|
|
|
rownumbers:true,
|
|
|
singleSelect:false,
|
|
|
autoRowHeight:false,
|
|
|
pagination:true,
|
|
|
fitColumns:true,
|
|
|
striped:true,
|
|
|
collapsible:true,
|
|
|
toolbar:'#tb',
|
|
|
pageSize:10">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th field="id" checkbox="true"></th>
|
|
|
<th field="." formatter="editFormat" width="24">编辑</th>
|
|
|
<th field="storeBillNo" sortable="true" width="70">出库单号</th>
|
|
|
<th field="inStoreBillNo" sortable="true" width="70">进库单号</th>
|
|
|
<th field="copGNo" width="35">货号</th>
|
|
|
<th field="gNo" width="35">项号</th>
|
|
|
<th field="codeTS" width="50">商品编码</th>
|
|
|
<th field="gName" width="50">货物名称</th>
|
|
|
<th field="gModel" width="50">货物规格</th>
|
|
|
<th field="eciGoodsFlagName" width="30">成品料件标志</th>
|
|
|
<th field="currName" width="30">货币</th>
|
|
|
<th field="tinId" width="50">库位编号</th>
|
|
|
<th field="tinName" width="50">库位名称</th>
|
|
|
<th field="countryName" width="50">原产国</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
</table>
|
|
|
<div id="tb" style="padding:0 30px;" ms-controller="container1">
|
|
|
<input type="hidden" name="headId" value="<%=request.getParameter("id")%>">
|
|
|
<div>
|
|
|
<label>出库单号:</label>
|
|
|
<input class="easyui-textbox" type="text" name="storeBillNo" id="storeBillNo"
|
|
|
style="width:170px;height:35px;line-height:35px;"/>
|
|
|
<label>进库单号:</label>
|
|
|
<input class="easyui-textbox" type="text" name="inStoreBillNo" id="inStoreBillNo"
|
|
|
style="width:170px;height:35px;line-height:35px;"/>
|
|
|
<label>货号:</label>
|
|
|
<input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
|
|
|
style="width:170px;height:35px;line-height:35px;"/>
|
|
|
<label>商品编码:</label>
|
|
|
<input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
|
|
|
style="width:170px;height:35px;line-height:35px;"/>
|
|
|
</div>
|
|
|
<div>
|
|
|
<label>成品料件标志:</label>
|
|
|
<select id="eciGoodsFlag" name="eciGoodsFlag" style="width:140px;height:35px;line-height:35px;">
|
|
|
<option></option>
|
|
|
<option ms-for="(k,v) in @eciGoodsFlag"
|
|
|
ms-attr="{id:'sFlag_'+@eciGoodsFlag[k].id,value:@eciGoodsFlag[k].parCode}">
|
|
|
{{v.parName}}
|
|
|
</option>
|
|
|
</select>
|
|
|
<label>货物名称:</label>
|
|
|
<input class="easyui-textbox" type="text" name="gName" id="gName"
|
|
|
style="width:200px;height:35px;line-height:35px;"/>
|
|
|
<label>货物规格:</label>
|
|
|
<input class="easyui-textbox" type="text" name="gModel" id="gModel"
|
|
|
style="width:200px;height:35px;line-height:35px;"/>
|
|
|
</div>
|
|
|
<div>
|
|
|
<label>库位编号:</label>
|
|
|
<input class="easyui-textbox" type="text" name="tinId" id="tinId"
|
|
|
style="width:200px;height:35px;line-height:35px;"/>
|
|
|
<label>库位名称:</label>
|
|
|
<input class="easyui-textbox" type="text" name="tinName" id="tinName"
|
|
|
style="width:200px;height:35px;line-height:35px;"/>
|
|
|
|
|
|
<a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
|
|
|
data-options="selected:true">查询</a>
|
|
|
<a id="add"
|
|
|
href="<%=request.getContextPath()%>/outStoragePre/body/edit?headId=<%=request.getParameter("id")%>"
|
|
|
<%--&seqNo=<%=request.getParameter("seqNo")%>&storeBillNo=<%=request.getParameter("storeBillNo")%>--%>
|
|
|
class="easyui-linkbutton add" iconCls="icon-add">新增</a>
|
|
|
<a href="javascript:doDelete()" class="easyui-linkbutton delete"
|
|
|
iconCls="icon-remove">删除</a>
|
|
|
<a id="import" href="javascript:void(0);" class="easyui-linkbutton add"
|
|
|
iconCls="icon-add">导入</a>
|
|
|
<a id="edithead" class="easyui-linkbutton" >编辑表头</a>
|
|
|
<a id="add" href="<%=request.getContextPath() %>/resource/excel/outStoragePreList.xlsx" class="easyui-linkbutton"
|
|
|
iconCls="icon-save">模板下载</a>
|
|
|
<a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
|
|
|
data-options="selected:true" >物权所有人</a>
|
|
|
<!-- <a id="" href="javascript:return void(0)" class="easyui-linkbutton"
|
|
|
iconCls="icon-redo">发送海关</a> -->
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
</div>
|
|
|
<script>
|
|
|
//定义 avalon
|
...
|
...
|
@@ -301,8 +415,19 @@ |
|
|
goodsType: [],
|
|
|
storeType: []
|
|
|
});
|
|
|
function pagerFilter(data) {
|
|
|
if (data.data) {
|
|
|
data = data.data;
|
|
|
}
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
//定义 avalon
|
|
|
var datavm1 = avalon.define({
|
|
|
$id: "container1",
|
|
|
eciGoodsFlag: []
|
|
|
|
|
|
});
|
|
|
//入库时间
|
|
|
var endTime_start = {
|
|
|
elem: '#outStartDate',
|
...
|
...
|
@@ -433,7 +558,19 @@ |
|
|
initgoodsType();
|
|
|
inittradesCode();
|
|
|
}
|
|
|
|
|
|
function doName(){
|
|
|
var id = ${bookId};
|
|
|
var par = {};
|
|
|
par.id=id;
|
|
|
$.post("<%=request.getContextPath()%>/rest/eptBook/findByPK", par, function(result) {
|
|
|
if(result.status==200){
|
|
|
datavm.data = result.data;
|
|
|
$("#wq").text('物权所有人:'+result.data.contCustom);
|
|
|
}else{
|
|
|
$.messager.alert("提示", result.msg);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function initgoodsType() {
|
|
|
var par = {};
|
|
|
par.parType = 5;
|
...
|
...
|
@@ -479,7 +616,17 @@ |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function initeciGoodsFlag() {
|
|
|
var par = {};
|
|
|
par.parType = 6;
|
|
|
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
|
|
|
if (result.status == 200) {
|
|
|
datavm1.eciGoodsFlag = result.data;
|
|
|
} else {
|
|
|
$.messager.alert("提示", result.msg);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function initstoreType() {
|
|
|
var par = {};
|
|
|
par.parType = 7;
|
...
|
...
|
@@ -490,7 +637,12 @@ |
|
|
//初始化选项值
|
|
|
if (datavm.data.storeType != "") {
|
|
|
//修改
|
|
|
$('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true)
|
|
|
/* $('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true) */
|
|
|
if (datavm.data.storeType == 'SJ01') {
|
|
|
$('#sstoreType_' + datavm.storeType[1].id).attr("selected", true);
|
|
|
}else {
|
|
|
$('#sstoreType_' + datavm.storeType[0].id).attr("selected", true);
|
|
|
}
|
|
|
} else {
|
|
|
//新增
|
|
|
}
|
...
|
...
|
@@ -500,6 +652,7 @@ |
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//保存
|
|
|
function doSave() {
|
|
|
var data = $("#editForm").serializeJson();
|
...
|
...
|
@@ -514,7 +667,20 @@ |
|
|
}
|
|
|
$.post(url, data, function (result) {
|
|
|
if (result.status == 200) {
|
|
|
window.location.href = "<%=request.getContextPath()%>/outStoragePre/list";
|
|
|
<%-- window.location.href = "<%=request.getContextPath()%>/outStoragePre/list"; --%>
|
|
|
var height = $('#contentfer').height();
|
|
|
var width = $('#contentfer').width();
|
|
|
console.log(height);
|
|
|
console.log(width);
|
|
|
$("#con_ten").css('height',height);
|
|
|
$("#con_ten").css('width',width);
|
|
|
$("#con_ten").css('z-index','5');
|
|
|
$("#dg_01").css('z-index','0');
|
|
|
$("#con_ten").css('opacity','0.2');
|
|
|
headId = <%=request.getParameter("id")%>;
|
|
|
if(headId==null){
|
|
|
window.location.href = "<%=request.getContextPath()%>/outStoragePre/list?son=1";
|
|
|
}
|
|
|
} else {
|
|
|
var html = result.msg + "<br/>";
|
|
|
if (result.data) {
|
...
|
...
|
@@ -526,7 +692,32 @@ |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
$(function () {
|
|
|
headId=<%=request.getParameter("id")%>;
|
|
|
if(headId!=null){
|
|
|
initeciGoodsFlag();
|
|
|
doName();
|
|
|
$('#dg').datagrid({
|
|
|
url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',
|
|
|
queryParams: {headId:<%=request.getParameter("id")%>},
|
|
|
pagination: true,
|
|
|
rownumbers: true,
|
|
|
loadFilter: pagerFilter
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
$('#edithead').on('click', function(){
|
|
|
$("#con_ten").css('z-index','0');
|
|
|
$("#con_ten").css('opacity','0');
|
|
|
var height1 = $('#contentfer').height();
|
|
|
var height = $('#searchForm').height();
|
|
|
var width = $('#searchForm').width();
|
|
|
$("#dg_01").css('height',height);
|
|
|
$("#dg_01").css('width',width);
|
|
|
$("#dg_01").css('top',height1)
|
|
|
$("#dg_01").css('z-index','5');
|
|
|
|
|
|
});
|
|
|
$(document).ready(function () {
|
|
|
// laydate(endTime_start);
|
|
|
// laydate(endTime_end);
|
...
|
...
|
@@ -539,7 +730,21 @@ |
|
|
headId = <%=request.getParameter("id")%>
|
|
|
loadData(<%=request.getParameter("id")%>);
|
|
|
<%}%>
|
|
|
var tabs = $('#tt').tabs().tabs('tabs');
|
|
|
var height = $('#contentfer').height();
|
|
|
var width = $('#contentfer').width();
|
|
|
console.log(height);
|
|
|
console.log(width);
|
|
|
$("#con_ten").css('height',height);
|
|
|
$("#con_ten").css('width',width);
|
|
|
$("#con_ten").css('z-index','5');
|
|
|
$("#dg_01").css('z-index','0');
|
|
|
$("#con_ten").css('opacity','0.2');
|
|
|
if(headId==null){
|
|
|
$("#searchForm").css('opacity','0');
|
|
|
$("#con_ten").css('z-index','0');
|
|
|
$("#con_ten").css('opacity','0');
|
|
|
}
|
|
|
<%-- var tabs = $('#tt').tabs().tabs('tabs');
|
|
|
for (var i = 0; i < tabs.length; i++) {
|
|
|
tabs[i].panel('options').tab.unbind().bind('click', {index: i}, function (e) {
|
|
|
if (e.data.index == 1 && headId != null) {
|
...
|
...
|
@@ -550,8 +755,67 @@ |
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
} --%>
|
|
|
});
|
|
|
|
|
|
|
|
|
$('#import').on('click', function(){
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title:'入库申请单导入',
|
|
|
area: ['520px', '300px'],
|
|
|
shadeClose: true, //点击遮罩关闭
|
|
|
content: '<%=request.getContextPath()%>/outStoragePre/body/popImport?headId=<%=request.getParameter("headId")%>'
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function editFormat(val, row, index) {
|
|
|
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont"></i></a>';
|
|
|
return html;
|
|
|
}
|
|
|
|
|
|
var headId = null;
|
|
|
|
|
|
|
|
|
function editRow(id) {
|
|
|
window.location.href = '<%=request.getContextPath() %>/outStoragePre/body/edit?id=' + id + '&headId=' + <%=request.getParameter("headId")%>;
|
|
|
}
|
|
|
|
|
|
function doSearch() {
|
|
|
$('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
|
|
|
$('#dg').datagrid("reload");
|
|
|
}
|
|
|
|
|
|
function doDelete() {
|
|
|
var rows = $('#dg').datagrid('getChecked');
|
|
|
if (rows.length == 0) {
|
|
|
$.messager.alert("提示", "请先选中要删除的行!");
|
|
|
return false;
|
|
|
}
|
|
|
$.messager.confirm("提示", "确定要删除么?", function (r) {
|
|
|
if (r) {
|
|
|
var ids = '';
|
|
|
for (var i = 0; i < rows.length; i++) {
|
|
|
if (ids == '') {
|
|
|
ids = rows[i].id;
|
|
|
} else {
|
|
|
ids += ',' + rows[i].id;
|
|
|
}
|
|
|
}
|
|
|
var par = {};
|
|
|
par.ids = ids;
|
|
|
$.post("<%=request.getContextPath()%>/rest/eptStoreBillOutList/delete", par, function (data) {
|
|
|
if (data.status == 200) {
|
|
|
doSearch();
|
|
|
} else {
|
|
|
$.messager.alert("提示", data.msg);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|