Commit 40acd004 authored by 季圣华's avatar 季圣华
Browse files

解决累计应收不显示的bug

parent 52f5020a
......@@ -554,13 +554,15 @@
//编辑信息
function editSupplier(supplierTotalInfo) {
var supplierInfo = supplierTotalInfo.split("AaBb");
var beginNeedGet = supplierInfo[5];
var beginNeedPay = supplierInfo[6];
var row = {
supplier : supplierInfo[1],
contacts : supplierInfo[2].replace("undefined",""),
phonenum : supplierInfo[3].replace("undefined",""),
email : supplierInfo[4].replace("undefined",""),
BeginNeedGet : supplierInfo[5],
BeginNeedPay : supplierInfo[6],
BeginNeedGet : beginNeedGet == "0"? "":beginNeedGet,
BeginNeedPay : beginNeedPay == "0"? "":beginNeedPay,
AllNeedGet: "",
AllNeedPay: "",
description : supplierInfo[8].replace("undefined",""),
......@@ -602,7 +604,7 @@
supType: supType
}),
success: function(res){
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney !== "") {
var moneyA = res.data.rows.getAllMoney.toFixed(2)-0;
$.ajax({
type:"get",
......@@ -615,7 +617,7 @@
supType: supType
}),
success: function(res){
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney !== "") {
var moneyB = res.data.rows.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
......
......@@ -120,6 +120,12 @@ public class SupplierService {
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int updateSupplier(String beanJson, Long id)throws Exception {
Supplier supplier = JSONObject.parseObject(beanJson, Supplier.class);
if(supplier.getBeginneedpay() == null) {
supplier.setBeginneedpay(BigDecimal.ZERO);
}
if(supplier.getBeginneedget() == null) {
supplier.setBeginneedget(BigDecimal.ZERO);
}
supplier.setId(id);
int result=0;
try{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment