Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
c6acb9e3
Commit
c6acb9e3
authored
Nov 07, 2017
by
季圣华
Browse files
修复保存单据失败的bug
parent
ca43b7fd
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/webapp/js/pages/materials/in_out.js
View file @
c6acb9e3
...
@@ -1998,16 +1998,21 @@
...
@@ -1998,16 +1998,21 @@
OrganId = $('#OrganId').combobox('getValue');
OrganId = $('#OrganId').combobox('getValue');
}
}
var accountMoneyList = $("#AccountId").attr("data-accountmoneyarr"); //账户金额列表-多账户
var accountMoneyList = $("#AccountId").attr("data-accountmoneyarr"); //账户金额列表-多账户
var accountMoneyArr;
if(accountMoneyList) {
accountMoneyList = accountMoneyList.replace("[","").replace("]","").toString();
accountMoneyList = accountMoneyList.replace("[","").replace("]","").toString();
var reg=new RegExp("\"","g"); //创建正则RegExp对象
var reg=new RegExp("\"","g"); //创建正则RegExp对象
accountMoneyList = accountMoneyList.replace(reg,""); //替换所有的双引号
accountMoneyList = accountMoneyList.replace(reg,""); //替换所有的双引号
var accountMoneyArr = accountMoneyList.split(","); //转为数组
accountMoneyArr = accountMoneyList.split(","); //转为数组
}
if(listSubType === "采购"||listSubType === "零售退货"||listSubType === "销售退货"){
if(listSubType === "采购"||listSubType === "零售退货"||listSubType === "销售退货"){
//付款为负数
//付款为负数
ChangeAmount = 0 - ChangeAmount;
ChangeAmount = 0 - ChangeAmount;
TotalPrice = 0 - TotalPrice;
TotalPrice = 0 - TotalPrice;
if(accountMoneyArr) {
accountMoneyArr = changeListFmtMinus(accountMoneyArr); //将数组单个金额中的数值转为负数
accountMoneyArr = changeListFmtMinus(accountMoneyArr); //将数组单个金额中的数值转为负数
}
}
}
//零售时候,可以从会员预付款中扣款
//零售时候,可以从会员预付款中扣款
var thisPayType = "现付";
var thisPayType = "现付";
if(listSubType === "零售") {
if(listSubType === "零售") {
...
@@ -2054,7 +2059,7 @@
...
@@ -2054,7 +2059,7 @@
PayType: thisPayType, //现付/预付款
PayType: thisPayType, //现付/预付款
Remark: $.trim($("#Remark").val()),
Remark: $.trim($("#Remark").val()),
AccountIdList: $("#AccountId").attr("data-accountarr"), //账户列表-多账户
AccountIdList: $("#AccountId").attr("data-accountarr"), //账户列表-多账户
AccountMoneyList: JSON.stringify(accountMoneyArr), //账户金额列表-多账户
AccountMoneyList:
accountMoneyArr ?
JSON.stringify(accountMoneyArr)
:""
, //账户金额列表-多账户
Discount: $.trim($("#Discount").val()),
Discount: $.trim($("#Discount").val()),
DiscountMoney: $.trim($("#DiscountMoney").val()),
DiscountMoney: $.trim($("#DiscountMoney").val()),
DiscountLastMoney: $.trim($("#DiscountLastMoney").val()),
DiscountLastMoney: $.trim($("#DiscountLastMoney").val()),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment