Authored by dongjunjie

库存管理,出入库管理 报表card显示逻辑

... ... @@ -118,12 +118,21 @@
if(result.allNumber){
this.cards[0].value = result.allNumber;
}else{
this.cards[0].value = '--';
if(result.allNumber == 0){
this.cards[0].value = 0;
}else{
this.cards[0].value = '--';
}
}
if(result.allAmount){
this.cards[1].value = result.allAmount;
}else{
this.cards[1].value = '--';
if(result.allAmount == 0){
this.cards[1].value = 0;
}else{
this.cards[1].value = '--';
}
}
}
}
... ...
... ... @@ -116,8 +116,25 @@
complete(data){
let result = data.additionInfo;
if(result){
this.cards[0].value = result.allNumber?result.allNumber:'--';
this.cards[1].value = result.allAmount?result.allAmount:'--';
if(result.allNumber){
this.cards[0].value = result.allNumber;
}else{
if(result.allNumber == 0){
this.cards[0].value = 0;
}else{
this.cards[0].value = '--';
}
}
if(result.allAmount){
this.cards[1].value = result.allAmount;
}else{
if(result.allAmount == 0){
this.cards[1].value = 0;
}else{
this.cards[1].value = '--';
}
}
}
}
}
... ...
... ... @@ -119,17 +119,61 @@
{
let result = data.additionInfo;
if (result) {
this.cards[0].value = result.storageTotalNum ? result.storageTotalNum : '--';
this.cards[1].value = result.storageTotalMoney ? result.storageTotalMoney : '--';
this.cards[2].value = result.onSaleTotalNum ? result.onSaleTotalNum : '--';
this.cards[3].value = result.preSaleTotalNum ? result.preSaleTotalNum : '--';
this.cards[4].value = result.outSaleTotalNum ? result.outSaleTotalNum : '--';
if(result.storageTotalNum){
this.cards[0].value = result.storageTotalNum;
}else{
if(result.storageTotalNum == 0){
this.cards[0].value = 0;
}else{
this.cards[0].value = '--';
}
}
if(result.storageTotalMoney){
this.cards[1].value = result.storageTotalMoney;
}else{
if(result.storageTotalMoney == 0){
this.cards[1].value = 0;
}else{
this.cards[1].value = '--';
}
}
if(result.onSaleTotalNum){
this.cards[2].value = result.onSaleTotalNum;
}else{
if(result.onSaleTotalNum == 0){
this.cards[2].value = 0;
}else{
this.cards[2].value = '--';
}
}
if(result.preSaleTotalNum){
this.cards[3].value = result.preSaleTotalNum;
}else{
if(result.preSaleTotalNum == 0){
this.cards[3].value = 0;
}else{
this.cards[3].value = '--';
}
}
if(result.outSaleTotalNum){
this.cards[4].value = result.outSaleTotalNum;
}else{
if(result.outSaleTotalNum == 0){
this.cards[4].value = 0;
}else{
this.cards[4].value = '--';
}
}
result.dateId = result.dateId + "";
let month = result.dateId.substr(4, 2);
let date = result.dateId.substr(6, 2);
this.dateId = month + "月" + date + "日";
}
}
}
}
... ...