完成进销存单据的账户余额的自动计算功能

This commit is contained in:
季圣华
2017-01-08 19:00:39 +08:00
parent 66d4b2fcf2
commit c9ddc1a8e7
10 changed files with 64 additions and 11 deletions

View File

@@ -306,6 +306,7 @@
<!-- spring整合struts2需要默认为request或者 prototype不能是单例 -->
<bean id="accountAction" class="com.jsh.action.basic.AccountAction" scope="prototype">
<property name="accountService" ref="accountService"/>
<property name="depotHeadService" ref="depotHeadService"/>
<property name="logService" ref="logService"/>
</bean>
<!--结算账户配置结束 -->

View File

@@ -740,12 +740,19 @@
else
{
var OrganId = null, AllocationProjectId = null;
var ChangeAmount = $.trim($("#ChangeAmount").val());
var TotalPrice = $("#depotHeadFM .datagrid-footer [field='AllPrice'] div").text();
if(listSubType !=="调拨"){
OrganId = $('#OrganId').combobox('getValue');
}
else {
AllocationProjectId = $.trim($("#AllocationProjectId").val()); //收货仓库-对方
}
if(listSubType === "采购"||listSubType === "销售退货"){
//付款为负数
ChangeAmount = 0 - ChangeAmount;
TotalPrice = 0 - TotalPrice;
}
$.ajax({
type:"post",
url: url,
@@ -761,8 +768,8 @@
OrganId: OrganId,
HandsPersonId: $.trim($("#HandsPersonId").val()),
AccountId: $.trim($("#AccountId").val()),
ChangeAmount: $.trim($("#ChangeAmount").val()),
TotalPrice: $("#depotHeadFM .datagrid-footer [field='AllPrice'] div").text(),
ChangeAmount: ChangeAmount, //付款/收款
TotalPrice: TotalPrice, //合计
Remark: $.trim($("#Remark").val()),
clientIp: clientIp
}),

View File

@@ -323,8 +323,8 @@
{ title: '最低售价',field: 'LowPrice',width:70},
{ title: '预设售价一',field: 'PresetPriceOne',width:70},
{ title: '预设售价二',field: 'PresetPriceTwo',width:70},
{ title: '备注',field: 'Remark',width:110},
{ title: '操作',field: 'op',align:"center",width:120,formatter:function(value,rec)
{ title: '备注',field: 'Remark',width:90},
{ title: '操作',field: 'op',align:"center",width:150,formatter:function(value,rec)
{
var str = '';
var rowInfo = rec.Id + 'AaBb' + rec.Name+ 'AaBb' + rec.Model + 'AaBb' + rec.Color + 'AaBb' + rec.Unit + 'AaBb' + rec.RetailPrice + 'AaBb' + rec.LowPrice + 'AaBb' + rec.PresetPriceOne + 'AaBb' + rec.PresetPriceTwo + 'AaBb' + rec.Remark;