|
|
<%@ 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>
|
|
|
<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>
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<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"></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>
|
|
|
<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>
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<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"></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> |
...
|
...
|
|