Browse Source

成本分配列表-详情辅料sheet-美元计算

jingbb 1 year ago
parent
commit
def5a82eba
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/cost-allocation-total/costDetailDrawer.vue

+ 3 - 1
src/views/cost-allocation-total/costDetailDrawer.vue

@@ -842,7 +842,9 @@ export default {
       priceExcludingtaxAll = 0
       this.$refs.unitTabs.ingData.map(item=>{
           if(item.goodsName!=='合计'){
-            item.usdAmount = ((item.priceExcludingtax?Number(item.priceExcludingtax):0)/this.detailsPlanNum.exchangeRate)
+            if((!item.usdAmount|| item.usdAmount=='')||item.rmbAmount == item.usdAmount){
+              item.usdAmount = ((item.priceExcludingtax?Number(item.priceExcludingtax):0)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
+            }
             if(item.rmbAmount !== item.usdAmount){  usdAmountAll+=item.usdAmount?Number(item.usdAmount):0   }
             transferCostAll+=item.transferCostAll?Number(item.transferCost):0
             rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0