入库出库单据的js相关调整

This commit is contained in:
季圣华
2017-01-08 11:30:44 +08:00
parent 17387fb03c
commit 90de51bff7
13 changed files with 1344 additions and 3106 deletions

View File

@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
@@ -62,8 +67,8 @@
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebRoot"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
@@ -8,5 +7,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="src" path="WebRoot"/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

View File

@@ -16,7 +16,7 @@ HROS.zoom = (function(){
** 使用SWFObject.js插入flash
** http://www.cnblogs.com/wuxinxi007/archive/2009/10/27/1590709.html
*/
swfobject.embedSWF('js/zoom.swf?onchange=HROS.zoom.check', 'zoombox', '10', '10', '6.0.0', 'expressInstall.swf', '', {allowScriptAccess : 'always', wmode : 'transparent', scale : 'noScale'}, {id : 'accessory_zoom', name : 'zoom_detect'});
//swfobject.embedSWF('js/zoom.swf?onchange=HROS.zoom.check', 'zoombox', '10', '10', '6.0.0', 'expressInstall.swf', '', {allowScriptAccess : 'always', wmode : 'transparent', scale : 'noScale'}, {id : 'accessory_zoom', name : 'zoom_detect'});
},
/*
** 为什么会有个参数o其实我也不知道

View File

@@ -1,6 +1,5 @@
//初始化界面
$(function()
{
$(function(){
var depotList = null;
var depotID = null;
var supplierList = null;
@@ -12,7 +11,17 @@ $(function()
var userdepot=null;
var depotHeadMaxId=null; //获取最大的Id
var accepId=null; //保存的主表id
var url;
var depotHeadID = 0;
var orgDepotHead = "";
var editIndex = undefined;
var listTitle = ""; //单据标题
var listType = ""; //入库 出库
var listSubType = ""; //采购 销售等
var payTypeTitle = "";//付款 收款
var organUrl = ""; //组织数据接口地址
//初始化系统基础信息
getType();
initSystemData_UB();
initSelectInfo_UB();
initSystemData_depot();
@@ -25,16 +34,61 @@ $(function()
initTableData();
ininPager();
initForm();
bindEvent();//绑定操作事件
});
//根据单据名称获取类型
function getType(){
listTitle = $("#tablePanel").prev().text();
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
var cusUrl = path + "/supplier/findBySelect_cus.action"; //客户接口
if(listTitle === "采购入库列表"){
listType = "入库";
listSubType = "采购";
payTypeTitle = "付款";
organUrl = supUrl;
}
else if(listTitle === "销售退货列表"){
listType = "入库";
listSubType = "销售退货";
payTypeTitle = "付款";
organUrl = cusUrl;
}
else if(listTitle === "其它入库列表"){
listType = "入库";
listSubType = "其它";
payTypeTitle = "隐藏";
organUrl = supUrl;
}
else if(listTitle === "销售出库列表"){
listType = "出库";
listSubType = "销售";
payTypeTitle = "收款";
organUrl = cusUrl;
}
else if(listTitle === "采购退货列表"){
listType = "出库";
listSubType = "采购退货";
payTypeTitle = "收款";
organUrl = supUrl;
}
else if(listTitle === "其它出库列表"){
listType = "出库";
listSubType = "其它";
payTypeTitle = "隐藏";
organUrl = cusUrl;
}
else if(listTitle === "调拨出库列表"){
listType = "出库";
listSubType = "调拨";
payTypeTitle = "隐藏";
organUrl = supUrl;
}
}
//初始化系统基础信息
function initSystemData_UB()
{
function initSystemData_UB(){
$.ajax({
type:"post",
url: "<%=path%>/userBusiness/getBasicData.action",
url: path + "/userBusiness/getBasicData.action",
data: ({
KeyId:kid,
Type:"UserDepot"
@@ -63,8 +117,7 @@ function initSystemData_UB()
}
//初始化页面选项卡
function initSelectInfo_UB()
{
function initSelectInfo_UB(){
if(userBusinessList !=null)
{
@@ -78,11 +131,10 @@ function initSelectInfo_UB()
//初始化系统基础信息
function initSystemData_depot()
{
function initSystemData_depot(){
$.ajax({
type:"post",
url: "<%=path%>/depot/getBasicData.action",
url: path + "/depot/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
@@ -99,8 +151,7 @@ function initSystemData_depot()
});
}
//初始化页面选项卡
function initSelectInfo_depot()
{
function initSelectInfo_depot(){
var options = "";
if(depotList !=null)
@@ -119,26 +170,25 @@ function initSelectInfo_depot()
}
}
$("#ProjectId").empty().append(options);
$("#AllocationProjectId").empty().append(options);
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
}
}
//初始化系统基础信息
function initSupplier()
{
function initSupplier(){
$('#OrganId').combobox({
url: "<%=path%>/supplier/findBySelect_sup.action",
url: organUrl,
valueField:'id',
textField:'supplier'
});
}
//初始化系统基础信息
function initSystemData_person()
{
function initSystemData_person(){
$.ajax({
type:"post",
url: "<%=path%>/person/getBasicData.action",
url: path + "/person/getBasicData.action",
//设置为同步
async:false,
dataType: "json",
@@ -155,8 +205,7 @@ function initSystemData_person()
});
}
//初始化页面选项卡
function initSelectInfo_person()
{
function initSelectInfo_person(){
var options1 = "";
if(personList !=null)
@@ -177,11 +226,10 @@ function initSelectInfo_person()
}
}
//获取账户信息
function initSystemData_account()
{
function initSystemData_account(){
$.ajax({
type:"post",
url: "<%=path%>/account/getAccount.action",
url: path + "/account/getAccount.action",
//设置为同步
async:false,
dataType: "json",
@@ -198,8 +246,7 @@ function initSystemData_account()
});
}
//获取账户信息
function initSelectInfo_account()
{
function initSelectInfo_account(){
var options = "";
if(accountList !=null)
{
@@ -214,8 +261,7 @@ function initSelectInfo_account()
}
//防止表单提交重复
function initForm()
{
function initForm(){
$('#depotHeadFM').form({
onSubmit: function(){
return false;
@@ -224,10 +270,12 @@ function initForm()
}
//初始化表格数据
function initTableData()
{
function initTableData(){
var hideType = undefined;
if(payTypeTitle === "隐藏"){
hideType = true; //隐藏当前列
}
$('#tableData').datagrid({
//title:'采购入库列表',
//iconCls:'icon-save',
//width:700,
height:heightInfo,
@@ -241,7 +289,7 @@ function initTableData()
//fitColumns:true,
//单击行是否选中
//checkOnSelect : false,
//url:'<%=path %>/depotHead/findBy.action?pageSize=' + initPageSize,
//url: path + '/depotHead/findBy.action?pageSize=' + initPageSize,
pagination: true,
//交替出现背景
striped : true,
@@ -255,7 +303,7 @@ function initTableData()
{ title: '创建时间',field: 'CreateTime',width:100},
{ title: '操作员',field: 'OperPersonName',width:80},
{ title: '合计',field: 'TotalPrice',width:50},
{ title: '付款',field: 'ChangeAmount',width:50},
{ title: payTypeTitle,field: 'ChangeAmount',width:50,hidden:hideType},
{ title: '单据备注',field: 'Remark',width:100},
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec)
{
@@ -266,9 +314,9 @@ function initTableData()
+ 'AaBb' + rec.ProjectName+ 'AaBb' + rec.OrganName+ 'AaBb' + rec.HandsPersonName+ 'AaBb' + rec.AccountName + 'AaBb' + rec.TotalPrice;
if(1 == value)
{
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">查看</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead('+ rec.Id +');"/>&nbsp;<a onclick="deleteDepotHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
str += '<img src="' + path + '/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">查看</a>&nbsp;&nbsp;';
str += '<img src="' + path + '/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editDepotHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="' + path + '/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead('+ rec.Id +');"/>&nbsp;<a onclick="deleteDepotHead('+ rec.Id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>';
}
return str;
}
@@ -303,8 +351,7 @@ function initTableData()
}
//初始化表格数据-商品列表-编辑状态
function initTableData_material(type,TotalPrice)
{
function initTableData_material(type,TotalPrice){
$('#materialData').datagrid({
height:300,
rownumbers: false,
@@ -337,7 +384,7 @@ function initTableData_material(type,TotalPrice)
valueField:'Id',
textField:'MaterialName',
method:'get',
url: "<%=path%>/material/findBySelect.action"
url: path + "/material/findBySelect.action"
}
}
},
@@ -383,7 +430,7 @@ function initTableData_material(type,TotalPrice)
});
$.ajax({
type:"post",
url:'<%=path %>/depotItem/findBy.action?HeaderId=' + depotHeadID,
url: path + '/depotItem/findBy.action?HeaderId=' + depotHeadID,
dataType: "json",
success: function (res) {
var AllPrice = 0
@@ -405,8 +452,7 @@ function initTableData_material(type,TotalPrice)
}
//初始化表格数据-商品列表-查看状态
function initTableData_material_show(TotalPrice)
{
function initTableData_material_show(TotalPrice){
$('#materialDataShow').datagrid({
height:300,
rownumbers: false,
@@ -424,11 +470,11 @@ function initTableData_material_show(TotalPrice)
striped : true,
showFooter: true,
//loadFilter: pagerFilter,
rownumbers:true,
onClickRow: onClickRow,
pageSize: 50,
pageList: [50,100,150],
columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true},
{ title: '商品名称',field: 'MaterialName',width:230},
{ title: '数量',field: 'OperNumber',width:50},
{ title: '单价',field: 'UnitPrice',width:50},
@@ -443,7 +489,7 @@ function initTableData_material_show(TotalPrice)
});
$.ajax({
type:"post",
url:'<%=path %>/depotItem/findBy.action?HeaderId=' + depotHeadID,
url: path + '/depotItem/findBy.action?HeaderId=' + depotHeadID,
dataType: "json",
success: function (res) {
var AllPrice = TotalPrice;
@@ -461,28 +507,8 @@ function initTableData_material_show(TotalPrice)
});
}
//初始化键盘enter事件
$(document).keydown(function(event)
{
//兼容 IE和firefox 事件
var e = window.event || event;
var k = e.keyCode||e.which||e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="State"||obj.id=="Number"))
{
$("#saveDepotHead").click();
}
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchState"||obj.id=="searchNumber"))
{
$("#searchBtn").click();
}
});
//分页信息处理
function ininPager()
{
function ininPager(){
try
{
var opts = $("#tableData").datagrid('options');
@@ -508,19 +534,18 @@ function ininPager()
}
//删除采购入库信息
function deleteDepotHead(depotHeadID)
{
function deleteDepotHead(depotHeadID){
$.messager.confirm('删除确认','确定要删除此采购入库信息吗?',function(r)
{
if (r)
{
$.ajax({
type:"post",
url: "<%=path %>/depotHead/delete.action",
url: path + "/depotHead/delete.action",
dataType: "json",
data: ({
depotHeadID : depotHeadID,
clientIp:'<%=clientIp %>'
clientIp: clientIp
}),
success: function (tipInfo)
{
@@ -545,8 +570,7 @@ function deleteDepotHead(depotHeadID)
}
//批量删除采购入库
function batDeleteDepotHead()
{
function batDeleteDepotHead(){
var row = $('#tableData').datagrid('getChecked');
if(row.length == 0)
{
@@ -572,12 +596,12 @@ function batDeleteDepotHead()
}
$.ajax({
type:"post",
url: "<%=path %>/depotHead/batchDelete.action",
url: path + "/depotHead/batchDelete.action",
dataType: "json",
async : false,
data: ({
depotHeadIDs : ids,
clientIp:'<%=clientIp %>'
clientIp: clientIp
}),
success: function (tipInfo)
{
@@ -602,18 +626,12 @@ function batDeleteDepotHead()
});
}
}
//增加
var url;
var depotHeadID = 0;
//保存编辑前的名称
var orgDepotHead = "";
function addDepotHead()
{
$("#clientIp").val('<%=clientIp %>');
//新增信息
function addDepotHead(){
$("#clientIp").val(clientIp);
$('#depotHeadFM').form('clear');
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加采购入库信息');
var addTitle = listTitle.replace("列表","信息");
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="' + path + '/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加' + addTitle);
$(".window-mask").css({ width: webW ,height: webH});
$("#Number").val("").focus();
@@ -621,9 +639,96 @@ function addDepotHead()
depotHeadID = 0;
initTableData_material("add"); //商品列表
reject(); //撤销下、刷新商品列表
url = '<%=path %>/depotHead/create.action';
url = path + '/depotHead/create.action';
}
//编辑信息
function editDepotHead(depotHeadTotalInfo){
var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
$("#clientIp").val(clientIp);
$("#ProjectId").focus().val(depotHeadInfo[1]);
var ProjectId=depotHeadInfo[1];
if(ProjectId!='')
{
initSystemData_person(ProjectId);
initSelectInfo_person();
}
$("#Number").val(depotHeadInfo[2]);
$("#OperTime").val(depotHeadInfo[4]);
$('#OrganId').combobox('setValue', depotHeadInfo[5]);
$("#HandsPersonId").val(depotHeadInfo[6]);
$("#AccountId").val(depotHeadInfo[7]);
$("#ChangeAmount").val(depotHeadInfo[8]);
$("#ChangeAmount").attr("data-changeamount", depotHeadInfo[8]);
$("#Remark").val(depotHeadInfo[9]);
var TotalPrice = depotHeadInfo[14];
//orgDepotHead = depotHeadInfo[1];
var editTitle = listTitle.replace("列表","信息");
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="' + path + '/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑' + editTitle);
$(".window-mask").css({ width: webW ,height: webH});
depotHeadID = depotHeadInfo[0];
initTableData_material("edit",TotalPrice); //商品列表
reject(); //撤销下、刷新商品列表
url = path + '/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
}
//查看信息
function showDepotHead(depotHeadTotalInfo){
var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
$("#ProjectIdShow").text(depotHeadInfo[10]);
$("#NumberShow").text(depotHeadInfo[2]);
$("#OperTimeShow").text(depotHeadInfo[4]);
$('#OrganIdShow').text(depotHeadInfo[11]);
$("#HandsPersonIdShow").text(depotHeadInfo[12]);
$("#AccountIdShow").text(depotHeadInfo[13]);
$("#ChangeAmountShow").text(depotHeadInfo[8]);
$("#RemarkShow").text(depotHeadInfo[9]);
var TotalPrice = depotHeadInfo[14];
var showTitle = listTitle.replace("列表","信息");
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="' + path + '/js/easyui-1.3.5/themes/icons/list.png"/>&nbsp;查看' + showTitle);
$(".window-mask").css({ width: webW ,height: webH});
depotHeadID = depotHeadInfo[0];
initTableData_material_show(TotalPrice); //商品列表-查看状态
}
//绑定操作事件
function bindEvent(){
//搜索处理
$("#searchBtn").off("click").on("click",function(){
if($("#searchProjectId").val()=="")
{
$.messager.alert('查询提示','请选择一个仓库!','info');
}
else
{
showDepotHeadDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
});
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
//$("#searchProjectId").val("");
$("#searchState").val("");
$("#searchBeginTime").val("");
$("#searchEndTime").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//保存信息
$("#saveDepotHead").unbind().bind({
click:function()
@@ -638,8 +743,8 @@ $("#saveDepotHead").unbind().bind({
dataType: "json",
async : false,
data: ({
Type:"入库",
SubType:"采购",
Type: listType,
SubType: listSubType,
ProjectId : $.trim($("#ProjectId").val()),
Number : $.trim($("#Number").val()),
OperTime: $("#OperTime").val(),
@@ -649,7 +754,7 @@ $("#saveDepotHead").unbind().bind({
ChangeAmount: $.trim($("#ChangeAmount").val()),
TotalPrice: $("#depotHeadFM .datagrid-footer [field='AllPrice'] div").text(),
Remark: $.trim($("#Remark").val()),
clientIp:'<%=clientIp %>'
clientIp: clientIp
}),
success: function (tipInfo)
{
@@ -687,92 +792,36 @@ $("#saveDepotHead").unbind().bind({
}
});
//编辑信息
function editDepotHead(depotHeadTotalInfo)
//初始化键盘enter事件
$(document).keydown(function(event){
//兼容 IE和firefox 事件
var e = window.event || event;
var k = e.keyCode||e.which||e.charCode;
//兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="State"||obj.id=="Number"))
{
var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
$("#clientIp").val('<%=clientIp %>');
$("#ProjectId").focus().val(depotHeadInfo[1]);
var ProjectId=depotHeadInfo[1];
if(ProjectId!='')
{
initSystemData_person(ProjectId);
initSelectInfo_person();
$("#saveDepotHead").click();
}
$("#Number").val(depotHeadInfo[2]);
$("#OperTime").val(depotHeadInfo[4]);
$('#OrganId').combobox('setValue', depotHeadInfo[5]);
$("#HandsPersonId").val(depotHeadInfo[6]);
$("#AccountId").val(depotHeadInfo[7]);
$("#ChangeAmount").val(depotHeadInfo[8]);
$("#ChangeAmount").attr("data-changeamount", depotHeadInfo[8]);
$("#Remark").val(depotHeadInfo[9]);
var TotalPrice = depotHeadInfo[14];
//orgDepotHead = depotHeadInfo[1];
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑采购入库信息');
$(".window-mask").css({ width: webW ,height: webH});
depotHeadID = depotHeadInfo[0];
initTableData_material("edit",TotalPrice); //商品列表
reject(); //撤销下、刷新商品列表
url = '<%=path %>/depotHead/update.action?depotHeadID=' + depotHeadInfo[0];
}
//查看信息
function showDepotHead(depotHeadTotalInfo)
//搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchState"||obj.id=="searchNumber"))
{
var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
$("#ProjectIdShow").text(depotHeadInfo[10]);
$("#NumberShow").text(depotHeadInfo[2]);
$("#OperTimeShow").text(depotHeadInfo[4]);
$('#OrganIdShow').text(depotHeadInfo[11]);
$("#HandsPersonIdShow").text(depotHeadInfo[12]);
$("#AccountIdShow").text(depotHeadInfo[13]);
$("#ChangeAmountShow").text(depotHeadInfo[8]);
$("#RemarkShow").text(depotHeadInfo[9]);
var TotalPrice = depotHeadInfo[14];
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/list.png"/>&nbsp;查看采购入库信息');
$(".window-mask").css({ width: webW ,height: webH});
depotHeadID = depotHeadInfo[0];
initTableData_material_show(TotalPrice); //商品列表-查看状态
}
//搜索处理
$("#searchBtn").unbind().bind({
click:function()
{
if($("#searchProjectId").val()=="")
{
$.messager.alert('查询提示','请选择一个仓库!','info');
}
else
{
showDepotHeadDetails(1,initPageSize);
var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager');
opts.pageNumber = 1;
opts.pageSize = initPageSize;
pager.pagination('refresh',
{
pageNumber:1,
pageSize:initPageSize
});
}
$("#searchBtn").click();
}
});
}
function showDepotHeadDetails(pageNo,pageSize)
{
function showDepotHeadDetails(pageNo,pageSize){
$.ajax({
type:"post",
url: "<%=path %>/depotHead/findBy.action",
url: path + "/depotHead/findBy.action",
dataType: "json",
data: ({
ProjectId:$.trim($("#searchProjectId").val()),
Type:"入库",
SubType:"采购",
Type: listType,
SubType:listSubType,
State:$.trim($("#searchState").val()),
Number:$.trim($("#searchNumber").val()),
BeginTime:$("#searchBeginTime").val(),
@@ -792,17 +841,7 @@ function showDepotHeadDetails(pageNo,pageSize)
}
});
}
//重置按钮
$("#searchResetBtn").unbind().bind({
click:function(){
//$("#searchProjectId").val("");
$("#searchState").val("");
$("#searchBeginTime").val("");
$("#searchEndTime").val("");
//加载完以后重新初始化
$("#searchBtn").click();
}
});
//自动计算事件
function autoReckon() {
//延时绑定事件
@@ -857,7 +896,6 @@ function autoReckon() {
}
//结束编辑
var editIndex = undefined;
function endEditing() {
if (editIndex == undefined) { return true }
if ($('#materialData').datagrid('validateRow', editIndex)) {
@@ -884,8 +922,7 @@ function onClickRow(index) {
}
}
//新增
function append()
{
function append(){
if (endEditing()) {
$('#materialData').datagrid('appendRow', {});
editIndex = $('#materialData').datagrid('getRows').length - 1;
@@ -933,13 +970,13 @@ function accept(accepId) {
var updated = $("#materialData").datagrid('getChanges', "updated");
$.ajax({
type: "post",
url: "<%=path%>/depotItem/saveDetials.action",
url: path + "/depotItem/saveDetials.action",
data: {
Inserted: JSON.stringify(inserted),
Deleted: JSON.stringify(deleted),
Updated: JSON.stringify(updated),
HeaderId:accepId,
clientIp:'<%=clientIp %>'
clientIp: clientIp
},
success: function (tipInfo)
{
@@ -961,12 +998,11 @@ function accept(accepId) {
}
}
//获取MaxId
function getMaxId()
{
function getMaxId(){
var depotHeadMax=null;
$.ajax({
type:"post",
url: "<%=path%>/depotHead/getMaxId.action",
url: path + "/depotHead/getMaxId.action",
//设置为同步
async:false,
dataType: "json",
@@ -1003,7 +1039,7 @@ function changeAmountFn() {
var ChangeAmount = $("#ChangeAmount").val()-0;
var oldChangeAmount = $("#ChangeAmount").attr("data-changeamount")-0;
$.ajax({
url: "<%=path %>/account/updateAmount.action",
url: path + "/account/updateAmount.action",
type: "get",
dataType: "json",
data:{
@@ -1021,3 +1057,9 @@ function changeAmountFn() {
}
});
}

View File

@@ -2,7 +2,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
@@ -13,14 +12,20 @@
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
@@ -31,11 +36,11 @@
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
</td>
@@ -66,31 +71,31 @@
<td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
</td>
<td>收货仓库</td>
<td>经手人</td>
<td style="padding:5px">
<select name="AllocationProjectId" id="AllocationProjectId" style="width:120px;"></select>
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;"></td>
</tr>
<tr>
<td>经手人</td>
<td>收货仓库</td>
<td style="padding:5px">
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
<select name="AllocationProjectId" id="AllocationProjectId" style="width:120px;"></select>
</td>
<td>备注</td>
<td>单据编号</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
</td>
<td>单据号:</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td></td>
<td style="padding:5px"></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -115,33 +120,33 @@
<td style="padding:5px;width:120px;">
<span id="ProjectIdShow"></span>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td style="padding:5px;width:120px;">
<span id="OperTimeShow"></span>
</td>
<td>收货仓库</td>
<td style="padding:5px;width:120px;">
<span id="AllocationProjectIdShow"></span>
<td>经手人</td>
<td style="padding:5px">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;">
</td>
</tr>
<tr>
<td>仓管员</td>
<td style="padding:5px">
<span id="WareHousePersonIdShow"></span>
<td>收货仓库</td>
<td style="padding:5px;width:120px;">
<span id="AllocationProjectIdShow"></span>
</td>
<td>备注</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td>单据号:</td>
<td>单据编号</td>
<td style="padding:5px">
<span id="NumberShow"></span>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td></td>
<td></td>
<td style="padding:5px"></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -154,6 +159,7 @@
</div>
<script type="text/javascript">
return;
var depotList = null;
var depotID = null;
var supplierList = null;

View File

@@ -2,7 +2,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
@@ -13,14 +12,20 @@
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
@@ -31,11 +36,11 @@
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
</td>
<td>入库时间</td>
<td>单据日期</td>
<td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
</td>
@@ -66,38 +71,32 @@
<td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
</td>
<td>入库时间</td>
<td>单据日期</td>
<td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
</td>
<td>供应商</td>
<td>往来单位</td>
<td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
<td>采购人:</td>
<td style="padding:5px">
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;"></td>
</tr>
<tr>
<td>经手人:</td>
<td style="padding:5px">
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
</td>
<td>结算方式</td>
<td>单据编号</td>
<td style="padding:5px">
<select name="SettlementWay" id="SettlementWay" style="width:120px;">
<option value="现金">现金</option>
<option value="记账">记账</option>
</select>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td>备注:</td>
<td>单据备注:</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
</td>
<td>单据号:</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -122,36 +121,32 @@
<td style="padding:5px;width:120px;">
<span id="ProjectIdShow"></span>
</td>
<td>入库时间</td>
<td>单据日期</td>
<td style="padding:5px;width:120px;">
<span id="OperTimeShow"></span>
</td>
<td>供应商</td>
<td>往来单位</td>
<td style="padding:5px;width:120px;">
<span id="OrganIdShow"></span>
</td>
<td>采购人:</td>
<td style="padding:5px;width:120px;">
<span id="HandsPersonIdShow"></span>
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;"></td>
</tr>
<tr>
<td>仓管员</td>
<td>经手人</td>
<td style="padding:5px">
<span id="WareHousePersonIdShow"></span>
<span id="HandsPersonIdShow"></span>
</td>
<td>结算方式</td>
<td style="padding:5px">
<span id="SettlementWayShow"></span>
</td>
<td>备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td>单据号:</td>
<td>单据编号</td>
<td style="padding:5px">
<span id="NumberShow"></span>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -164,6 +159,7 @@
</div>
<script type="text/javascript">
return;
var depotList = null;
var depotID = null;
var supplierList = null;

View File

@@ -2,7 +2,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
@@ -13,14 +12,20 @@
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
@@ -31,11 +36,11 @@
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
</td>
@@ -66,11 +71,11 @@
<td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
</td>
<td>客户</td>
<td>往来单位</td>
<td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:120px;" />
</td>
@@ -80,15 +85,15 @@
<tr>
<td>经手人:</td>
<td style="padding:5px">
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
</td>
<td>备注</td>
<td>单据编号</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
</td>
<td>单据号:</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
</td>
<td></td>
<td></td>
</tr>
@@ -115,11 +120,11 @@
<td style="padding:5px;width:120px;">
<span id="ProjectIdShow"></span>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td style="padding:5px;width:120px;">
<span id="OperTimeShow"></span>
</td>
<td>客户</td>
<td>往来单位</td>
<td style="padding:5px;width:120px;">
<span id="OrganIdShow"></span>
</td>
@@ -128,20 +133,20 @@
</td>
</tr>
<tr>
<td>仓管员</td>
<td>经手人</td>
<td style="padding:5px">
<span id="WareHousePersonIdShow"></span>
<span id="HandsPersonIdShow"></span>
</td>
<td>备注</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td>单据号:</td>
<td>单据编号</td>
<td style="padding:5px">
<span id="NumberShow"></span>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td></td>
<td></td>
<td style="padding:5px"></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -154,6 +159,7 @@
</div>
<script type="text/javascript">
return;
var depotList = null;
var depotID = null;
var supplierList = null;

View File

@@ -2,7 +2,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
@@ -13,14 +12,20 @@
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
@@ -31,11 +36,11 @@
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
</td>
<td>入库时间</td>
<td>单据日期</td>
<td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
</td>
@@ -64,39 +69,37 @@
<tr>
<td>发货仓库:</td>
<td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
<select name="ProjectId" id="ProjectId" style="width:110px;"></select>
</td>
<td>入库时间</td>
<td>单据日期</td>
<td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:110px;"/>
</td>
<td>供应商</td>
<td>收货单位</td>
<td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:120px;" />
<input id="OrganId" name="OrganId" style="width:110px;" />
</td>
<td>采购人:</td>
<td>经手人:</td>
<td style="padding:5px">
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select>
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td>
</tr>
<tr>
<td>经手人</td>
<td>收款账户</td>
<td style="padding:5px">
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
<select name="AccountId" id="AccountId" style="width:110px;"></select>
</td>
<td>结算方式</td>
<td>收款金额</td>
<td style="padding:5px">
<select name="SettlementWay" id="SettlementWay" style="width:120px;">
<option value="现金">现金</option>
<option value="记账">记账</option>
</select>
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:110px;" />
</td>
<td>备注</td>
<td>单据编号</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 110px;"/>
</td>
<td>单据</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
<td>单据备注</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 110px;"/>
</td>
</tr>
<tr>
@@ -119,39 +122,39 @@
<table>
<tr>
<td>发货仓库:</td>
<td style="padding:5px;width:120px;">
<td style="padding:5px;width:110px;">
<span id="ProjectIdShow"></span>
</td>
<td>入库时间</td>
<td style="padding:5px;width:120px;">
<td>单据日期</td>
<td style="padding:5px;width:110px;">
<span id="OperTimeShow"></span>
</td>
<td>供应商</td>
<td style="padding:5px;width:120px;">
<td>收货单位</td>
<td style="padding:5px;width:110px;">
<span id="OrganIdShow"></span>
</td>
<td>采购人:</td>
<td style="padding:5px;width:120px;">
<td>经手人:</td>
<td style="padding:5px;width:110px;">
<span id="HandsPersonIdShow"></span>
</td>
</tr>
<tr>
<td>仓管员</td>
<td>收款账户</td>
<td style="padding:5px">
<span id="WareHousePersonIdShow"></span>
<span id="AccountIdShow"></span>
</td>
<td>结算方式</td>
<td>收款金额</td>
<td style="padding:5px">
<span id="SettlementWayShow"></span>
<span id="ChangeAmountShow"></span>
</td>
<td>备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
<td>单据号:</td>
<td>单据编号:</td>
<td style="padding:5px">
<span id="NumberShow"></span>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
</tr>
<tr>
<td>商品列表:</td>
@@ -164,6 +167,7 @@
</div>
<script type="text/javascript">
return;
var depotList = null;
var depotID = null;
var supplierList = null;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,6 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
@@ -13,14 +12,20 @@
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
<script src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/materials/in_out.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
@@ -31,11 +36,11 @@
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/>
</td>
@@ -64,33 +69,37 @@
<tr>
<td>发货仓库:</td>
<td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select>
<select name="ProjectId" id="ProjectId" style="width:110px;"></select>
</td>
<td>出库时间</td>
<td>单据日期</td>
<td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/>
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:110px;"/>
</td>
<td>客户</td>
<td>购买单位</td>
<td style="padding:5px">
<input id="OrganId" name="OrganId" style="width:120px;" />
<input id="OrganId" name="OrganId" style="width:110px;" />
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;"></td>
</tr>
<tr>
<td>经手人:</td>
<td style="padding:5px">
<select name="WareHousePersonId" id="WareHousePersonId" style="width:120px;"></select>
<select name="HandsPersonId" id="HandsPersonId" style="width:110px;"></select>
</td>
<td>备注:</td>
</tr>
<tr>
<td>收款账户:</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
<select name="AccountId" id="AccountId" style="width:110px;"></select>
</td>
<td>单据号</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/>
<td>收款金额</td>
<td style="padding:5px">
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:110px;" />
</td>
<td>单据编号:</td>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 110px;"/>
</td>
<td>单据备注:</td>
<td style="padding:5px">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 110px;"/>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
@@ -112,36 +121,39 @@
<table>
<tr>
<td>发货仓库:</td>
<td style="padding:5px;width:120px;">
<td style="padding:5px;width:110px;">
<span id="ProjectIdShow"></span>
</td>
<td>出库时间</td>
<td style="padding:5px;width:120px;">
<td>单据日期</td>
<td style="padding:5px;width:110px;">
<span id="OperTimeShow"></span>
</td>
<td>客户</td>
<td style="padding:5px;width:120px;">
<td>购买单位</td>
<td style="padding:5px;width:110px;">
<span id="OrganIdShow"></span>
</td>
<td style="width:50px;"></td>
<td style="padding:5px;width:120px;">
<td>经手人:</td>
<td style="padding:5px;width:110px;">
<span id="HandsPersonIdShow"></span>
</td>
</tr>
<tr>
<td>仓管员</td>
<td>收款账户</td>
<td style="padding:5px">
<span id="WareHousePersonIdShow"></span>
<span id="AccountIdShow"></span>
</td>
<td>备注</td>
<td>收款金额</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
<span id="ChangeAmountShow"></span>
</td>
<td>单据号:</td>
<td>单据号:</td>
<td style="padding:5px">
<span id="NumberShow"></span>
</td>
<td></td>
<td style="padding:5px"></td>
<td>单据备注:</td>
<td style="padding:5px">
<span id="RemarkShow"></span>
</td>
</tr>
<tr>
<td>商品列表:</td>
@@ -154,6 +166,7 @@
</div>
<script type="text/javascript">
return;
var depotList = null;
var depotID = null;
var supplierList = null;

View File

@@ -167,6 +167,46 @@ public class AccountAction extends BaseAction<AccountModel>
, tipType, "更新结算账户ID为 "+ model.getAccountID() + " " + tipMsg + "", "更新结算账户" + tipMsg));
}
/**
* 更新结算账户金额
* @return
*/
public void updateAmount()
{
Boolean flag = false;
try
{
Account Account = accountService.get(model.getAccountID());
Account.setCurrentAmount(model.getCurrentAmount());
accountService.update(Account);
flag = true;
tipMsg = "成功";
tipType = 0;
}
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>修改结算账户ID为 " + model.getAccountID() + "信息失败", e);
flag = false;
tipMsg = "失败";
tipType = 1;
}
finally
{
try
{
toClient(flag.toString());
}
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>修改结算账户回写客户端结果异常", e);
}
}
logService.create(new Logdetails(getUser(), "更新结算账户", model.getClientIp(),
new Timestamp(System.currentTimeMillis())
, tipType, "更新结算账户ID为 "+ model.getAccountID() + " " + tipMsg + "", "更新结算账户" + tipMsg));
}
/**
* 批量删除指定ID结算账户
* @return