解决累计应收不显示的bug
This commit is contained in:
@@ -554,13 +554,15 @@
|
|||||||
//编辑信息
|
//编辑信息
|
||||||
function editSupplier(supplierTotalInfo) {
|
function editSupplier(supplierTotalInfo) {
|
||||||
var supplierInfo = supplierTotalInfo.split("AaBb");
|
var supplierInfo = supplierTotalInfo.split("AaBb");
|
||||||
|
var beginNeedGet = supplierInfo[5];
|
||||||
|
var beginNeedPay = supplierInfo[6];
|
||||||
var row = {
|
var row = {
|
||||||
supplier : supplierInfo[1],
|
supplier : supplierInfo[1],
|
||||||
contacts : supplierInfo[2].replace("undefined",""),
|
contacts : supplierInfo[2].replace("undefined",""),
|
||||||
phonenum : supplierInfo[3].replace("undefined",""),
|
phonenum : supplierInfo[3].replace("undefined",""),
|
||||||
email : supplierInfo[4].replace("undefined",""),
|
email : supplierInfo[4].replace("undefined",""),
|
||||||
BeginNeedGet : supplierInfo[5],
|
BeginNeedGet : beginNeedGet == "0"? "":beginNeedGet,
|
||||||
BeginNeedPay : supplierInfo[6],
|
BeginNeedPay : beginNeedPay == "0"? "":beginNeedPay,
|
||||||
AllNeedGet: "",
|
AllNeedGet: "",
|
||||||
AllNeedPay: "",
|
AllNeedPay: "",
|
||||||
description : supplierInfo[8].replace("undefined",""),
|
description : supplierInfo[8].replace("undefined",""),
|
||||||
@@ -602,7 +604,7 @@
|
|||||||
supType: supType
|
supType: supType
|
||||||
}),
|
}),
|
||||||
success: function(res){
|
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;
|
var moneyA = res.data.rows.getAllMoney.toFixed(2)-0;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"get",
|
type:"get",
|
||||||
@@ -615,7 +617,7 @@
|
|||||||
supType: supType
|
supType: supType
|
||||||
}),
|
}),
|
||||||
success: function(res){
|
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 moneyB = res.data.rows.getAllMoney.toFixed(2)-0;
|
||||||
var money = moneyA+moneyB;
|
var money = moneyA+moneyB;
|
||||||
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
|
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
|
||||||
|
|||||||
@@ -120,6 +120,12 @@ public class SupplierService {
|
|||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int updateSupplier(String beanJson, Long id)throws Exception {
|
public int updateSupplier(String beanJson, Long id)throws Exception {
|
||||||
Supplier supplier = JSONObject.parseObject(beanJson, Supplier.class);
|
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);
|
supplier.setId(id);
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
|
|||||||
Reference in New Issue
Block a user