作者 赵超

前段页面合并 与修改

... ... @@ -13,14 +13,38 @@
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 id="tt" class="easyui-tabs" style="width: 100%;">
<div title="入库表头" style="overflow: auto; padding: 20px;">
<div class="content" ms-controller="container">
<!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
<div title="入库表头" style="overflow: auto; padding: 20px;"> -->
<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")%>"/>
<table class="kv-table">
... ... @@ -284,21 +308,107 @@
</tbody>
</table>
</form>
</div>
</div>
<!-- </div>
<div title="入库表体" style="padding: 20px; "></div>
</div>
</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="16">编辑</th>
<th field="storeBillNo" sortable="true" width="70">进库单号</th>
<th field="copGNo" width="100">货号</th>
<th field="gNo" width="50">项号</th>
<th field="codeTS" width="50">商品编码</th>
<th field="gName" width="50">货物名称</th>
<th field="gModel" width="50">货物规格</th>
<th field="eciGoodsFlagName" width="50">成品料件标志</th>
<th field="currName" 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:200px;height:35px;line-height:35px;"/>
<label>货号:</label>
<input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
style="width:200px;height:35px;line-height:35px;"/>
<label>商品编码:</label>
<input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
style="width:200px;height:35px;line-height:35px;"/>
<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>
</div>
<div>
<label>货物名称:</label>
<input class="easyui-textbox" type="text" name="gName" id="gName"
style="width:150px;height:35px;line-height:35px;"/>
<label>货物规格:</label>
<input class="easyui-textbox" type="text" name="gModel" id="gModel"
style="width:150px;height:35px;line-height:35px;"/>
&nbsp;&nbsp;
<a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
data-options="selected:true">查询</a>
<a id="add"
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/inStoragePreList.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>
</div>
</form>
</div>
<script>
//定义 avalon
var datavm = avalon.define({
$id: "container",
data: ${entity},
data:${entity},
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: '#inStartDate',
format: 'YYYY-MM-DD',
... ... @@ -425,7 +535,13 @@
//初始化选项值
if (datavm.data.storeType != "") {
//修改
$('#sstoreType_' + datavm.storeType[datavm.data.storeType - 1].id).attr("selected", true)
/* $('#sstoreType_' + datavm.data.storeType).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 {
//新增
}
... ... @@ -460,6 +576,19 @@
}
});
}
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 doSave() {
var data = $("#editForm").serializeJson();
... ... @@ -473,7 +602,22 @@
}
$.post(url, data, function (result) {
if (result.status == 200) {
window.location.href = "<%=request.getContextPath()%>/inStoragePre/list";
<%-- window.location.href = "<%=request.getContextPath()%>/inStoragePre/list"; --%>
/* $('#editForm').find('input,textarea,select').prop('readonly',true); */
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()%>/inStoragePre/list?son=1";
}
//$("#con_ten").css('display','block');
} else {
var html = result.msg + "<br/>";
if (result.data) {
... ... @@ -495,21 +639,88 @@
}
});
}
function initeciGoodsFlag() {
var par = {};
par.parType = 6;
console.log('我进来了');
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm1.eciGoodsFlag = result.data;
console.log(datavm1.eciGoodsFlag);
} else {
$.messager.alert("提示", result.msg);
}
});
}
$(function () {
headId=<%=request.getParameter("id")%>;
if(headId!=null){
initeciGoodsFlag();
doName();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillInList/pageByHeadId',
queryParams: {headId:<%=request.getParameter("id")%>},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
}
});
$('#import').on('click', function(){
layer.open({
type: 2,
title:'入库申请单导入',
area: ['520px', '300px'],
shadeClose: true, //点击遮罩关闭
content: '<%=request.getContextPath()%>/inStoragePre/body/popImport?headId=<%=request.getParameter("id")%>'
});
});
$('#add').on('click', function(){
var seqNo = $("#seqNo").val();
var htmlherf="";
htmlherf+='<%=request.getContextPath()%>/inStoragePre/body/edit?headId=<%=request.getParameter("id")%>&seqNo='
htmlherf+=seqNo
location.href=htmlherf;
console.log(htmlherf)
});
$('#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);
laydate(preendTime_start);
laydate(preendTime_end);
var headId = null;
<%if(request.getParameter("id")==null){%>
//赋值表体的宽 高
<%if(request.getParameter("id")==null){%>
initFormData();
inittradesCode();
<%}else{%>
headId = <%=request.getParameter("id")%>
loadData(<%=request.getParameter("id")%>);
<%}%>
var tabs = $('#tt').tabs().tabs('tabs');
<%}%>
var height = $('#contentfer').height();
var width = $('#contentfer').width();
$("#con_ten").css('height',height);
$("#con_ten").css('width',width);
$("#con_ten").css('z-index','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) {
... ... @@ -520,8 +731,55 @@
return false;
}
});
}
} --%>
});
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/inStoragePre/body/edit?id=' + id + '&headId=' + <%=request.getParameter("id")%>;
}
function doSearch() {
console.log(clearJson($("#searchForm").serializeJson()));
$('#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/eptStoreBillInList/delete", par, function (data) {
if (data.status == 200) {
doSearch();
} else {
$.messager.alert("提示", data.msg);
}
});
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>入库列表</title>
<jsp:include page="../../template/head.jsp"></jsp:include>
</head>
<body>
<div class="container">
<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="16">编辑</th>
<!-- <th field="platNo2" sortable="true" width="70">外部企业编码</th> -->
<th field="tradesCode" width="80">预录入编号</th>
<!-- <th field="entryId" width="100">报关单号</th> -->
<th field="ordersNo" width="50">提运单号</th>
<th field="storeTypeName" width="50">入库方式</th>
<th field="goodsTypeName" width="50">货物流向</th>
<th field="remark" width="50">发送状态</th>
<th field="inReportName"formatter="findReport" width="50">入库申请状态</th>
<th field="inApprName" formatter="findAPPR" width="50">入库审批状态</th>
</tr>
</thead>
</table>
<div id="tb" style="padding:0 30px;" ms-controller="container">
<!-- <label>外部企业编码:</label>
<input class="easyui-textbox" type="text" name="platNo2" id="platNo2"
style="width:160px;height:35px;line-height:35px;"/> -->
<label>提运单号: </label>
<input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
style="width:160px;height:35px;line-height:35px;"/>
<label>预录入编号: </label>
<input class="easyui-textbox" type="text" name="tradesCode" id="tradesCode"
style="width:160px;height:35px;line-height:35px;"/>
<!-- <label>报关单号: </label>
<input class="easyui-textbox" type="text" name="entryId" id="entryId"
style="width:160px;height:35px;line-height:35px;"/> -->
<label>入库方式: </label>
<select id="storeType" name="storeType" style="width:150px;height:35px;line-height:35px;">
<option></option>
<option ms-for="(k,v) in @storeType"
ms-attr="{id:'storeType_'+@storeType[k].id,value:@storeType[k].id}">
{{v.parName}}
</option>
</select>&nbsp;&nbsp;
<label>货物流向: </label>
<select id="goodsType" name="goodsType" style="width:150px;height:35px;line-height:35px;">
<option></option>
<option ms-for="(k,v) in @goodsType"
ms-attr="{id:'sType_'+@goodsType[k].id,value:@goodsType[k].id}">
{{v.parName}}
</option>
</select>
&nbsp;&nbsp;
<label>入库申请状态:</label>
<select id="status" name="status" style="width:80px;height:35px;line-height:35px;">
<option></option>
<option value="0">申请成功</option>
<option value="1">申请失败 </option>
<option value="2">待申请</option>
</select>
&nbsp;&nbsp;
<label>入库审批状态:</label>
<select id="statusMsg" name="statusMsg" style="width:80px;height:35px;line-height:35px;">
<option></option>
<option value="0">审批成功</option>
<option value="1">审批失败 </option>
<option value="2">待审批 </option>
</select><br>
<!-- <label>提单号/转关单号: </label>
<input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
style="width:160px;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()%>/inStoragePre/edit" class="easyui-linkbutton add"
iconCls="icon-add">新增</a>
<a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>
<a id="" href="javascript:doSend()" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a>
<a id="imp" href="javascript:void(0);" class="easyui-linkbutton add"
iconCls="icon-add">导入</a>
<a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
data-options="selected:true" >物权所有人</a>
</div>
</form>
</div>
<script>
//定义 avalon
var datavm = avalon.define({
$id: "container",
goodsType: [],
storeType: []
});
function pagerFilter(data) {
if (data.data) {
data = data.data;
}
return data;
}
function initgoodsType() {
var par = {};
par.parType = 5;
par.parCode='进库';
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm.goodsType = result.data
} else {
$.messager.alert("提示", result.msg);
}
});
}
function initstoreType() {
var par = {};
par.parType = 4;
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm.storeType = result.data;
} else {
$.messager.alert("提示", result.msg);
}
});
}
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 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/eptStoreBillInHead/delete", par, function (data) {
if (data.status == 200) {
doSearch();
} else {
$.messager.alert("提示", data.msg);
}
});
}
});
}
//入库集报
function doSend(){
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()%>/inStoragePre/inReport", par, function(result) {
if(result.status==200){
$.messager.confirm("提示", "提交成功,是否查看报文内容", function (r) {
if(r){
parent.layer.open({
type: 1,
title:'报文内容',
area: ['600px', '400px'],
shadeClose: true, //点击遮罩关闭
content: "<pre>"+result.data+"</pre>"
});
}
});
}else{
$.messager.alert("提示", result.msg);
}
});
}
});
}
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/inStoragePre/edit?id=' + id;
}
function findReport(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findByPK(' + row.id + ')">'+row.inReportName+'</a>';
return html;
}
function findAPPR(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findAPPRByPK(' + row.id + ')">'+row.inApprName+'</a>';
return html;
}
function findByPK(id){
$.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
if (result.status == 200) {
var seqNo = result.data.seqNo;
findBySeqNo(seqNo);
}else{
$.messager.alert("提示", result.msg);
}
});
}
function findAPPRByPK(id){
$.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
if (result.status == 200) {
var seqNo = result.data.seqNo;
findAPPRBySeqNo(seqNo);
}else{
$.messager.alert("提示", result.msg);
}
});
}
function findBySeqNo(seqNo){
/* if(storeInNo == null || storeInNo== ""){
alert("请输入进库单号")
}else{ */
layer.open({
type: 2,
title: seqNo + '回执内容',
shadeClose: false,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['920px', '420px'],
content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BRET'
});
}
function findAPPRBySeqNo(seqNo){
/* if(storeInNo == null || storeInNo== ""){
alert("请输入进库单号")
}else{ */
layer.open({
type: 2,
title: seqNo + '回执内容',
shadeClose: false,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['920px', '420px'],
content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BAPPR'
});
}
function doSearch() {
$('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
$('#dg').datagrid("reload");
}
$(function () {
initgoodsType();
initstoreType();
doName();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillInHead/page',
queryParams: {},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
$('#imp').on('click', function(){
layer.open({
type: 2,
title:'进库单导入',
area: ['520px', '300px'],
shadeClose: true, //点击遮罩关闭
content: '<%=request.getContextPath()%>/inStoragePre/popImport'
});
});
});
</script>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>入库列表</title>
<jsp:include page="../../template/head.jsp"></jsp:include>
</head>
<body>
<div class="container">
<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="16">编辑</th>
<!-- <th field="platNo2" sortable="true" width="70">外部企业编码</th> -->
<th field="tradesCode" width="80">预录入编号</th>
<!-- <th field="entryId" width="100">报关单号</th> -->
<th field="ordersNo" width="50">提运单号</th>
<th field="storeTypeName" width="50">入库方式</th>
<th field="goodsTypeName" width="50">货物流向</th>
<th field="remark" width="50">发送状态</th>
<th field="inReportName"formatter="findReport" width="50">入库申请状态</th>
<th field="inApprName" formatter="findAPPR" width="50">入库审批状态</th>
</tr>
</thead>
</table>
<div id="tb" style="padding:0 30px;" ms-controller="container">
<!-- <label>外部企业编码:</label>
<input class="easyui-textbox" type="text" name="platNo2" id="platNo2"
style="width:160px;height:35px;line-height:35px;"/> -->
<label>提运单号: </label>
<input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
style="width:160px;height:35px;line-height:35px;"/>
<label>预录入编号: </label>
<input class="easyui-textbox" type="text" name="tradesCode" id="tradesCode"
style="width:160px;height:35px;line-height:35px;"/>
<!-- <label>报关单号: </label>
<input class="easyui-textbox" type="text" name="entryId" id="entryId"
style="width:160px;height:35px;line-height:35px;"/> -->
<label>入库方式: </label>
<select id="storeType" name="storeType" style="width:150px;height:35px;line-height:35px;">
<option></option>
<option ms-for="(k,v) in @storeType"
ms-attr="{id:'storeType_'+@storeType[k].id,value:@storeType[k].id}">
{{v.parName}}
</option>
</select>&nbsp;&nbsp;
<label>货物流向: </label>
<select id="goodsType" name="goodsType" style="width:150px;height:35px;line-height:35px;">
<option></option>
<option ms-for="(k,v) in @goodsType"
ms-attr="{id:'sType_'+@goodsType[k].id,value:@goodsType[k].id}">
{{v.parName}}
</option>
</select>
&nbsp;&nbsp;
<label>入库申请状态:</label>
<select id="status" name="status" style="width:80px;height:35px;line-height:35px;">
<option></option>
<option value="0">申请成功</option>
<option value="1">申请失败 </option>
<option value="2">待申请</option>
</select>
&nbsp;&nbsp;
<label>入库审批状态:</label>
<select id="statusMsg" name="statusMsg" style="width:80px;height:35px;line-height:35px;">
<option></option>
<option value="0">审批成功</option>
<option value="1">审批失败 </option>
<option value="2">待审批 </option>
</select><br>
<!-- <label>提单号/转关单号: </label>
<input class="easyui-textbox" type="text" name="ordersNo" id="ordersNo"
style="width:160px;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()%>/inStoragePre/edit" class="easyui-linkbutton add"
iconCls="icon-add">新增</a>
<a href="javascript:doDelete()" class="easyui-linkbutton delete" iconCls="icon-remove">删除</a>
<a id="" href="javascript:doSend()" class="easyui-linkbutton" iconCls="icon-redo">发送海关</a>
<a id="imp" href="javascript:void(0);" class="easyui-linkbutton add"
iconCls="icon-add">导入</a>
<a href="javascript:doName()" class="easyui-linkbutton" iconCls="icon-search" id="wq"
data-options="selected:true" >物权所有人</a>
</div>
</form>
</div>
<script>
//定义 avalon
var datavm = avalon.define({
$id: "container",
goodsType: [],
storeType: []
});
function pagerFilter(data) {
if (data.data) {
data = data.data;
}
return data;
}
function initgoodsType() {
var par = {};
par.parType = 5;
par.parCode='进库';
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm.goodsType = result.data
} else {
$.messager.alert("提示", result.msg);
}
});
}
function initstoreType() {
var par = {};
par.parType = 4;
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm.storeType = result.data;
} else {
$.messager.alert("提示", result.msg);
}
});
}
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 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/eptStoreBillInHead/delete", par, function (data) {
if (data.status == 200) {
doSearch();
} else {
$.messager.alert("提示", data.msg);
}
});
}
});
}
//入库集报
function doSend(){
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()%>/inStoragePre/inReport", par, function(result) {
if(result.status==200){
$.messager.confirm("提示", "提交成功,是否查看报文内容", function (r) {
if(r){
parent.layer.open({
type: 1,
title:'报文内容',
area: ['600px', '400px'],
shadeClose: true, //点击遮罩关闭
content: "<pre>"+result.data+"</pre>"
});
}
});
}else{
$.messager.alert("提示", result.msg);
}
});
}
});
}
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/inStoragePre/edit?id=' + id;
}
function findReport(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findByPK(' + row.id + ')">'+row.inReportName+'</a>';
return html;
}
function findAPPR(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="findAPPRByPK(' + row.id + ')">'+row.inApprName+'</a>';
return html;
}
function findByPK(id){
$.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
if (result.status == 200) {
var seqNo = result.data.seqNo;
findBySeqNo(seqNo);
}else{
$.messager.alert("提示", result.msg);
}
});
}
function findAPPRByPK(id){
$.post("<%=request.getContextPath() %>/rest/eptStoreBillInHead/findSeqNoByPK", {id:id}, function (result) {
if (result.status == 200) {
var seqNo = result.data.seqNo;
findAPPRBySeqNo(seqNo);
}else{
$.messager.alert("提示", result.msg);
}
});
}
function findBySeqNo(seqNo){
/* if(storeInNo == null || storeInNo== ""){
alert("请输入进库单号")
}else{ */
layer.open({
type: 2,
title: seqNo + '回执内容',
shadeClose: false,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['920px', '420px'],
content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BRET'
});
}
function findAPPRBySeqNo(seqNo){
/* if(storeInNo == null || storeInNo== ""){
alert("请输入进库单号")
}else{ */
layer.open({
type: 2,
title: seqNo + '回执内容',
shadeClose: false,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['920px', '420px'],
content: '<%=request.getContextPath()%>/toBak?sndr='+seqNo+'&type=STI'+'&styp=B2BAPPR'
});
}
function doSearch() {
$('#dg').datagrid("options").queryParams = clearJson($("#searchForm").serializeJson());
$('#dg').datagrid("reload");
}
$(function () {
initgoodsType();
initstoreType();
doName();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillInHead/page',
queryParams: {},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
$('#imp').on('click', function(){
layer.open({
type: 2,
title:'进库单导入',
area: ['520px', '300px'],
shadeClose: true, //点击遮罩关闭
content: '<%=request.getContextPath()%>/inStoragePre/popImport'
});
});
son=<%=request.getParameter("son")%>;
if(son!=null){
$.messager.show({
title:'信息',
msg:'添加成功!',
showType:'fade',
style:{
right:'',
bottom:''
}
});
}
});
</script>
</body>
</html>
... ...
... ... @@ -13,14 +13,37 @@
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 id="tt" class="easyui-tabs" style="width: 100%;">
<div title="入库表头" style="overflow: auto; padding: 20px;">
<div class="content" ms-controller="container">
<!-- <div id="tt" class="easyui-tabs" style="width: 100%;">
<div title="入库表头" style="overflow: auto; padding: 20px;"> -->
<div id="con_ten"></div>
<div class="content" ms-controller="container" id="contentfer">
<P class="easyui-panel" title="入库表头" >
<form class="from-control" id="editForm">
<input type="hidden" name="id" ms-duplex="@data.id">
<input type="hidden" name="bookId" value="<%=request.getAttribute("bookId")%>"/>
... ... @@ -324,10 +347,85 @@
</table>
</form>
</div>
<div id='dg_01'></div>
<input type="hidden" id="headId" name="headId" value="<%=request.getParameter("id")%>"/>
<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="16">编辑</th>
<th field="storeBillNo" sortable="true" width="70">进库单号</th>
<th field="copGNo" width="50">货号</th>
<th field="gNo" width="50">项号</th>
<th field="codeTS" width="50">商品编码</th>
<th field="gName" width="50">货物名称</th>
<th field="qty" width="50">申报数量</th>
<th field="total" width="50">总价</th>
<!-- <th field="gModel" width="50">货物规格</th>
<th field="eciGoodsFlagName" width="50">成品料件标志</th>
<th field="currName" width="50">货币</th> -->
<th field="effectDate" width="100">入库有效期</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:200px;height:35px;line-height:35px;"/>
<label>货号:</label>
<input class="easyui-textbox" type="text" name="copGNo" id="copGNo"
style="width:200px;height:35px;line-height:35px;"/>
<label>商品编码:</label>
<input class="easyui-textbox" type="text" name="codeTS" id="codeTS"
style="width:200px;height:35px;line-height:35px;"/>
<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>
</div>
<div>
<label>货物名称:</label>
<input class="easyui-textbox" type="text" name="gName" id="gName"
style="width:150px;height:35px;line-height:35px;"/>
<label>货物规格:</label>
<input class="easyui-textbox" type="text" name="gModel" id="gModel"
style="width:150px;height:35px;line-height:35px;"/>
&nbsp;&nbsp;
<a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
data-options="selected:true">查询</a>
<a id="add"
<%--&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="edithead" class="easyui-linkbutton" >编辑表头</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>
</div>
</form>
</div>
<div title="入库表体" style="padding: 20px; "></div>
<!-- <div title="入库表体" style="padding: 20px; "></div>
</div>
</div>
</div> -->
<script>
//定义 avalon
var datavm = avalon.define({
... ... @@ -336,6 +434,11 @@
goodsType: [],
storeType: []
});
//定义 avalon
var datavm1 = avalon.define({
$id: "container1",
eciGoodsFlag: []
});
//入库时间
var endTime_start = {
... ... @@ -435,7 +538,24 @@
initstoreType();
initgoodsType();
}
function pagerFilter(data) {
if (data.data) {
data = data.data;
}
return data;
}
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 initgoodsType() {
var par = {};
par.parType = 5;
... ... @@ -445,8 +565,8 @@
datavm.goodsType = result.data;
//初始化选项值
if (datavm.data.goodsType != "") {
//修改
$('#sType_' + datavm.goodsType[datavm.data.goodsType - 1].id).attr("selected", true)
//修改 + datavm.data.goodsType
$('#sType_' + datavm.data.goodsType).attr("selected", true)
} else {
//新增
}
... ... @@ -455,7 +575,19 @@
}
});
}
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 initstoreType(code1) {
var par = {};
par.parType = 4;
... ... @@ -493,6 +625,16 @@
}
});
}
$('#add').on('click', function(){
var seqNo = $("#seqNo").val();
<%-- href="<%=request.getContextPath()%>/inStorage/body/edit?headId=<%=request.getParameter("headId")%>&seqNo=<%=request.getParameter("seqNo")%>"
--%>
var htmlherf="";
htmlherf+='<%=request.getContextPath()%>/inStorage/body/edit?headId=<%=request.getParameter("id")%>&seqNo='
htmlherf+=seqNo
location.href=htmlherf;
console.log(htmlherf);
});
//保存
function doSave() {
var data = $("#editForm").serializeJson();
... ... @@ -506,7 +648,20 @@
}
$.post(url, data, function (result) {
if (result.status == 200) {
window.location.href = "<%=request.getContextPath()%>/inStorage/list";
<%-- window.location.href = "<%=request.getContextPath()%>/inStorage/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()%>/inStorage/list?son=1";
}
} else {
var html = result.msg + "<br/>";
if (result.data) {
... ... @@ -518,6 +673,32 @@
}
});
}
$('#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');
});
$(function () {
headId=<%=request.getParameter("id")%>;
if(headId!=null){
doName();
initeciGoodsFlag();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillInList/pageByHeadId',
queryParams: {headId:<%=request.getParameter("id")%>},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
}
});
$(document).ready(function () {
laydate(endTime_start);
... ... @@ -531,7 +712,17 @@
headId = <%=request.getParameter("id")%>
loadData(<%=request.getParameter("id")%>);
<%}%>
var tabs = $('#tt').tabs().tabs('tabs');
var height = $('#contentfer').height();
var width = $('#contentfer').width();
$("#con_ten").css('height',height);
$("#con_ten").css('width',width);
$("#con_ten").css('z-index','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) {
... ... @@ -542,8 +733,55 @@
return false;
}
});
}
} --%>
});
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
var headId = null;
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/inStorage/body/edit?id=' + id + '&headId=' + <%=request.getParameter("id")%>;
}
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/eptStoreBillInList/delete", par, function (data) {
if (data.status == 200) {
doSearch();
} else {
$.messager.alert("提示", data.msg);
}
});
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -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;"/>
&nbsp;&nbsp;
<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>
</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 {
//新增
}
... ... @@ -499,6 +651,7 @@
}
});
}
//保存
function doSave() {
... ... @@ -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">&#xe65a;</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
... ...
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>入库列表</title>
<jsp:include page="../../template/head.jsp"></jsp:include>
</head>
<body>
<div class="container">
<div id="tt" class="easyui-tabs" style="width: 100%;">
<div title="出库表头" style="padding: 20px; "></div>
<div title="出库表体"
style="overflow: auto; padding: 20px; ">
<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="100">货号</th>
<th field="gNo" width="50">项号</th>
<th field="codeTS" width="50">商品编码</th>
<th field="gName" width="50">货物名称</th>
<th field="gModel" width="50">货物规格</th>
<th field="eciGoodsFlagName" width="50">成品料件标志</th>
<th field="currName" width="50">货币</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="container">
<input type="hidden" name="headId" value="<%=request.getParameter("headId")%>">
<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;"/>
&nbsp;&nbsp;
<a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
data-options="selected:true">查询</a>
<a id="add"
href="<%=request.getContextPath()%>/outStorage/body/edit?headId=<%=request.getParameter("headId")%>"
<%--&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="" href="javascript:return void(0)" class="easyui-linkbutton"
iconCls="icon-redo">发送海关</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
//定义 avalon
var datavm = avalon.define({
$id: "container",
eciGoodsFlag: []
});
function pagerFilter(data) {
if (data.data) {
data = data.data;
}
return data;
}
function initeciGoodsFlag() {
var par = {};
par.parType = 6;
$.post("<%=request.getContextPath()%>/rest/eptParameter/findByType", par, function (result) {
if (result.status == 200) {
datavm.eciGoodsFlag = result.data;
} else {
$.messager.alert("提示", result.msg);
}
});
}
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
var headId = null;
$(function () {
initeciGoodsFlag();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',
queryParams: {headId:<%=request.getParameter("headId")%>},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
<%if(request.getParameter("headId")!=null){%>
headId = <%=request.getParameter("headId")%>;
<%}%>
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 == 0 && headId != null) {
window.location.href = '<%=request.getContextPath() %>/outStorage/edit?id=' + <%=request.getParameter("headId")%>;
}
});
$('#tt').tabs('select', 1);
}
});
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/outStorage/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>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>入库列表</title>
<jsp:include page="../../template/head.jsp"></jsp:include>
</head>
<body>
<div class="container">
<div id="tt" class="easyui-tabs" style="width: 100%;">
<div title="出库表头" style="padding: 20px; "></div>
<div title="出库表体"
style="overflow: auto; padding: 20px; ">
<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="100">货号</th>
<th field="gNo" width="50">项号</th>
<th field="codeTS" width="50">商品编码</th>
<th field="gName" width="50">货物名称</th>
<th field="gModel" width="50">货物规格</th>
<th field="eciGoodsFlagName" width="50">成品料件标志</th>
<th field="currName" width="50">货币</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="container">
<input type="hidden" name="headId" value="<%=request.getParameter("headId")%>">
<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;"/>
&nbsp;&nbsp;
<a href="javascript:doSearch()" class="easyui-linkbutton" iconCls="icon-search"
data-options="selected:true">查询</a>
<a id="add"
href="<%=request.getContextPath()%>/outStorage/body/edit?headId=<%=request.getParameter("headId")%>"
<%--&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="" href="javascript:return void(0)" class="easyui-linkbutton"
iconCls="icon-redo">发送海关</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
//定义 avalon
var datavm = avalon.define({
$id: "container",
eciGoodsFlag: []
});
function pagerFilter(data) {
if (data.data) {
data = data.data;
}
return data;
}
function initeciGoodsFlag() {
var par = {};
par.parType = 6;
$.post("<%=request.getContextPath()%>/rest/eptParameter/findByType", par, function (result) {
if (result.status == 200) {
datavm.eciGoodsFlag = result.data;
console.log(datavm.eciGoodsFlag);
} else {
$.messager.alert("提示", result.msg);
}
});
}
<%-- function initeciGoodsFlag() {
var par = {};
par.parType = 6;
console.log('我进来了');
$.post("<%=request.getContextPath()%>/rest/eptParameter/findForType", par, function (result) {
if (result.status == 200) {
datavm.eciGoodsFlag = result.data;
console.log(datavm.eciGoodsFlag);
} else {
$.messager.alert("提示", result.msg);
}
});
} --%>
function editFormat(val, row, index) {
var html = '<a href="javascript:void(0)" style="text-decoration:none;" onclick="editRow(' + row.id + ')"><i class="iconfont">&#xe65a;</i></a>';
return html;
}
var headId = null;
$(function () {
initeciGoodsFlag();
$('#dg').datagrid({
url: '<%=request.getContextPath()%>/rest/eptStoreBillOutList/pageByHeadId',
queryParams: {headId:<%=request.getParameter("headId")%>},
pagination: true,
rownumbers: true,
loadFilter: pagerFilter
});
<%if(request.getParameter("headId")!=null){%>
headId = <%=request.getParameter("headId")%>;
<%}%>
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 == 0 && headId != null) {
window.location.href = '<%=request.getContextPath() %>/outStorage/edit?id=' + <%=request.getParameter("headId")%>;
}
});
$('#tt').tabs('select', 1);
}
});
function editRow(id) {
window.location.href = '<%=request.getContextPath() %>/outStorage/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
... ...
... ... @@ -262,7 +262,7 @@
<td class="kv-label" style="width: 100px;">备注</td>
<td class="kv-content" colspan="5">
<textarea rows="" cols="" id="remark" name="remark"
ms-duplex="@data.remark | notEmpty"></textarea>
ms-duplex="@data.createPerson | notEmpty"></textarea>
</td>
</tr>
<!-- <tr>
... ...