Browse Source

[fix] 销售管理

修改销售订单添加物料价格计算:区分美元和人民币的计算
dev
liuxiaoxu 4 months ago
parent
commit
2c50241764
  1. 8
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

8
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -460,19 +460,11 @@
row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2);
row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2);
row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2);
row.materialNoUsd = (parseFloat(row.materialNoRmb) / usdRate).toFixed(2);
row.materialUsd = row.materialNoUsd; // 保持一致,除非有特别的计算逻辑
row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2);
row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2);
} else if (commonCurrency1 === '2') {
// USD为基准货币
row.materialUsd = row.materialNoUsd
row.materialUsdSum = (parseFloat(row.materialUsd) * testMaterialNum).toFixed(2);
row.materialNoUsdSum = (parseFloat(row.materialNoUsd) * testMaterialNum).toFixed(2);
row.materialNoRmb = (parseFloat(row.materialNoUsd) * usdRate).toFixed(2);
row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2);
row.materialNoRmbSum = (parseFloat(row.materialNoRmb) * testMaterialNum).toFixed(2);
row.materialRmbSum = (parseFloat(row.materialRmb) * testMaterialNum).toFixed(2);
}
// 确保getTotalAmount函数存在且正确引用

Loading…
Cancel
Save