瀏覽代碼

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

jingbb 1 年之前
父節點
當前提交
def5a82eba
共有 1 個文件被更改,包括 3 次插入1 次删除
  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