feat(currency): 实现精确货币四舍五入函数
- 添加 preciseCurrencyRound 函数以提高货币计算精度 - 替换所有 toFixed(2) 调用为 preciseCurrencyRound以避免浮点数误差 - 更新折扣和金额计算逻辑以使用新的四舍五入方法 - 修正项目订单和产品信息中的货币显示格式- 调整JavaScript文件版本号以确保更新生效 - 移除sunxuepu@pcitech.com从CSS邮件列表中 - 添加待办事项完成页面控制器方法dev_1.0.0
parent
c96a90d69a
commit
4729ed87ce
|
|
@ -245,7 +245,12 @@ var closeItem = function(dataId){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function preciseCurrencyRound(amount,decimalPlace) {
|
||||||
|
if (decimalPlace){
|
||||||
|
return Number(Math.round(amount + `e${decimalPlace}`) + `e-${decimalPlace}`);
|
||||||
|
}
|
||||||
|
return Number(Math.round(amount + 'e2') + 'e-2');
|
||||||
|
}
|
||||||
/** 创建选项卡 */
|
/** 创建选项卡 */
|
||||||
function createMenuItem(dataUrl, menuName, isRefresh) {
|
function createMenuItem(dataUrl, menuName, isRefresh) {
|
||||||
var panelUrl = window.frameElement.getAttribute('data-id'),
|
var panelUrl = window.frameElement.getAttribute('data-id'),
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<script th:src="@{/ajax/libs/layer/layer.min.js?v=3.7.0}"></script>
|
<script th:src="@{/ajax/libs/layer/layer.min.js?v=3.7.0}"></script>
|
||||||
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.8.18}"></script>
|
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.8.18}"></script>
|
||||||
|
|
||||||
<script th:src="@{/ruoyi/js/common.js?v=4.8.0}"></script>
|
<script th:src="@{/ruoyi/js/common.js?v=4.8.1}"></script>
|
||||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
|
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
|
||||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js?v=1.22.6}"></script>
|
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js?v=1.22.6}"></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,7 @@
|
||||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
|
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.8.0}"></script>
|
||||||
<script th:src="@{/ruoyi/js/common.js?v=4.8.0}"></script>
|
<script th:src="@{/ruoyi/js/common.js?v=4.8.0}"></script>
|
||||||
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
|
<script th:src="@{/ruoyi/index.js?v=20201203}"></script>
|
||||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
window.history.forward(1);
|
window.history.forward(1);
|
||||||
|
|
|
||||||
|
|
@ -183,16 +183,17 @@
|
||||||
}
|
}
|
||||||
let shipmentAmount = $('#shipmentAmount');
|
let shipmentAmount = $('#shipmentAmount');
|
||||||
if (shipmentAmount){
|
if (shipmentAmount){
|
||||||
allPrice = Number(allPrice).toFixed(2);
|
allPrice = preciseCurrencyRound(Number(allPrice));
|
||||||
shipmentAmount.val(allPrice)
|
shipmentAmount.val(allPrice)
|
||||||
$('#displayshipmentAmount').val(formatAmountNumber(allPrice))
|
$('#displayshipmentAmount').val(formatAmountNumber(allPrice))
|
||||||
}
|
}
|
||||||
let actualPurchaseAmount = $('#actualPurchaseAmount');
|
let actualPurchaseAmount = $('#actualPurchaseAmount');
|
||||||
if (actualPurchaseAmount.length>0 && !actualPurchaseAmount.val()){
|
if (actualPurchaseAmount.length>0 && !actualPurchaseAmount.val()){
|
||||||
allPriceDiscount = Number(allPriceDiscount)*Number(allPrice).toFixed(2);
|
allPriceDiscount = preciseCurrencyRound(Number(allPriceDiscount)*Number(allPrice));
|
||||||
actualPurchaseAmount.val(allPriceDiscount)
|
actualPurchaseAmount.val(allPriceDiscount)
|
||||||
$('#displayactualPurchaseAmount').val(formatAmountNumber(allPriceDiscount))
|
$('#displayactualPurchaseAmount').val(formatAmountNumber(allPriceDiscount))
|
||||||
}
|
}
|
||||||
|
calculateAndDistributeCataloguePrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function setTotalData(show, discountFold, id) {
|
function setTotalData(show, discountFold, id) {
|
||||||
|
|
@ -282,7 +283,7 @@
|
||||||
$('.price-column').find('.price').each(function (index) {
|
$('.price-column').find('.price').each(function (index) {
|
||||||
let price = $(this).val();
|
let price = $(this).val();
|
||||||
let quantity = $(this)?.parent()?.parent()?.find('.quantity')?.val();
|
let quantity = $(this)?.parent()?.parent()?.find('.quantity')?.val();
|
||||||
let discountPrice = ((price*discountFold).toFixed(2)*quantity).toFixed(2);
|
let discountPrice =preciseCurrencyRound( preciseCurrencyRound(price*discountFold)*quantity);
|
||||||
$(this)?.parent()?.parent()?.find('.allPrice-discount').val(discountPrice)
|
$(this)?.parent()?.parent()?.find('.allPrice-discount').val(discountPrice)
|
||||||
$(this)?.parent()?.parent()?.find('.allPrice-discount-format').val(formatAmountNumber(discountPrice))
|
$(this)?.parent()?.parent()?.find('.allPrice-discount-format').val(formatAmountNumber(discountPrice))
|
||||||
allPriceDiscount+=parseFloat(discountPrice)
|
allPriceDiscount+=parseFloat(discountPrice)
|
||||||
|
|
@ -303,8 +304,6 @@
|
||||||
let length = $('#productTable2 tbody').find('tr').length
|
let length = $('#productTable2 tbody').find('tr').length
|
||||||
$('#productTable2 tbody').append(generatedTr(1,data,length))
|
$('#productTable2 tbody').append(generatedTr(1,data,length))
|
||||||
initPrice()
|
initPrice()
|
||||||
// 添加产品后重新计算和分配目录单价
|
|
||||||
calculateAndDistributeCataloguePrice()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generatedTr(index,data,length){
|
function generatedTr(index,data,length){
|
||||||
|
|
@ -489,7 +488,7 @@
|
||||||
function calculatePriceFor8813A3YA(updateProductCount) {
|
function calculatePriceFor8813A3YA(updateProductCount) {
|
||||||
// 计算规则:其它产品目录总价 * 5.33%,需要排除固定产品
|
// 计算规则:其它产品目录总价 * 5.33%,需要排除固定产品
|
||||||
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
||||||
return (excludedTotalPrice * 0.0533).toFixed(2);
|
return preciseCurrencyRound(excludedTotalPrice * 0.0533);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -501,7 +500,7 @@
|
||||||
function calculatePriceFor8813A3YB(updateProductCount) {
|
function calculatePriceFor8813A3YB(updateProductCount) {
|
||||||
// 计算规则:其它产品目录总价 * 5.33% * 3 * 0.8,需要排除固定产品
|
// 计算规则:其它产品目录总价 * 5.33% * 3 * 0.8,需要排除固定产品
|
||||||
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
||||||
return (excludedTotalPrice * 0.0533 * 3 * 0.8).toFixed(2);
|
return preciseCurrencyRound(excludedTotalPrice * 0.0533 * 3 * 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -513,7 +512,7 @@
|
||||||
function calculatePriceFor8813A7U4(updateProductCount) {
|
function calculatePriceFor8813A7U4(updateProductCount) {
|
||||||
// 计算规则:目录总价 * 1.5%,需要排除固定产品
|
// 计算规则:目录总价 * 1.5%,需要排除固定产品
|
||||||
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
||||||
return (excludedTotalPrice * 0.015).toFixed(2);
|
return preciseCurrencyRound(excludedTotalPrice * 0.015);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -525,7 +524,7 @@
|
||||||
function calculatePriceFor8813A7U2(updateProductCount) {
|
function calculatePriceFor8813A7U2(updateProductCount) {
|
||||||
// 计算规则:目录总价 * 1.5% * 3 * 0.8,需要排除固定产品
|
// 计算规则:目录总价 * 1.5% * 3 * 0.8,需要排除固定产品
|
||||||
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
let excludedTotalPrice = calculateTotalCataloguePriceExcludingFixed();
|
||||||
return (excludedTotalPrice * 0.015 * 3 * 0.8).toFixed(2);
|
return preciseCurrencyRound(excludedTotalPrice * 0.015 * 3 * 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -538,17 +537,17 @@
|
||||||
let quantity = parseFloat($row.find('.quantity').val()) || 0;
|
let quantity = parseFloat($row.find('.quantity').val()) || 0;
|
||||||
|
|
||||||
// 重新计算单价
|
// 重新计算单价
|
||||||
let price = (cataloguePrice * discount).toFixed(2);
|
let price = preciseCurrencyRound(cataloguePrice * discount);
|
||||||
$row.find('.price').val(price);
|
$row.find('.price').val(price);
|
||||||
$row.find('.price-formmat').val(formatAmountNumber(price));
|
$row.find('.price-formmat').val(formatAmountNumber(price));
|
||||||
|
|
||||||
// 重新计算总价
|
// 重新计算总价
|
||||||
let allPrice = (price * quantity).toFixed(2);
|
let allPrice = preciseCurrencyRound(price * quantity);
|
||||||
$row.find('.allPrice').val(allPrice);
|
$row.find('.allPrice').val(allPrice);
|
||||||
$row.find('.allPrice-formmat').val(formatAmountNumber(allPrice));
|
$row.find('.allPrice-formmat').val(formatAmountNumber(allPrice));
|
||||||
|
|
||||||
// 重新计算目录总价
|
// 重新计算目录总价
|
||||||
let catalogueAllPrice = (cataloguePrice * quantity).toFixed(2);
|
let catalogueAllPrice = preciseCurrencyRound(cataloguePrice * quantity);
|
||||||
$row.find('.catalogueAllPrice').val(catalogueAllPrice);
|
$row.find('.catalogueAllPrice').val(catalogueAllPrice);
|
||||||
$row.find('.catalogueAllPrice-formmat').val(formatAmountNumber(catalogueAllPrice));
|
$row.find('.catalogueAllPrice-formmat').val(formatAmountNumber(catalogueAllPrice));
|
||||||
}
|
}
|
||||||
|
|
@ -576,13 +575,13 @@
|
||||||
// if (getFlag()) {
|
// if (getFlag()) {
|
||||||
// allPrice *= FOLD_ON_FOLD
|
// allPrice *= FOLD_ON_FOLD
|
||||||
// }
|
// }
|
||||||
$(this).parent().parent().find('.allPrice').val(allPrice.toFixed(2))
|
$(this).parent().parent().find('.allPrice').val(preciseCurrencyRound(allPrice))
|
||||||
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice.toFixed(2)))
|
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(preciseCurrencyRound(allPrice)))
|
||||||
|
|
||||||
}
|
}
|
||||||
if (cateVal && num) {
|
if (cateVal && num) {
|
||||||
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
|
$(this).parent().parent().find('.catalogueAllPrice').val(preciseCurrencyRound(num * cateVal))
|
||||||
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber((num * cateVal).toFixed(2)))
|
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber(preciseCurrencyRound(num * cateVal)))
|
||||||
}
|
}
|
||||||
setOrderPriceData()
|
setOrderPriceData()
|
||||||
})
|
})
|
||||||
|
|
@ -592,42 +591,42 @@
|
||||||
let quantity = $(this).parent().parent().find('.quantity').val()
|
let quantity = $(this).parent().parent().find('.quantity').val()
|
||||||
let discount=$(this).parent().parent().find('.discount').val()
|
let discount=$(this).parent().parent().find('.discount').val()
|
||||||
if (discount && val){
|
if (discount && val){
|
||||||
$(this).parent().parent().find('.price').val((val * discount).toFixed(2))
|
$(this).parent().parent().find('.price').val(preciseCurrencyRound(val * discount))
|
||||||
let price = $(this).parent().parent().find('.price').val()
|
let price = $(this).parent().parent().find('.price').val()
|
||||||
$(this).parent().parent().find('.price-formmat').val(formatAmountNumber(price))
|
$(this).parent().parent().find('.price-formmat').val(formatAmountNumber(price))
|
||||||
if (quantity){
|
if (quantity){
|
||||||
$(this).parent().parent().find('.allPrice').val((quantity * val * discount).toFixed(2))
|
$(this).parent().parent().find('.allPrice').val(preciseCurrencyRound(quantity * val * discount))
|
||||||
let allPrice = $(this).parent().parent().find('.allPrice').val()
|
let allPrice = $(this).parent().parent().find('.allPrice').val()
|
||||||
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
|
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (quantity && val) {
|
if (quantity && val) {
|
||||||
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
|
$(this).parent().parent().find('.catalogueAllPrice').val(preciseCurrencyRound(val * quantity))
|
||||||
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber((val * quantity).toFixed(2)))
|
$(this).parent().parent().find('.catalogueAllPrice-formmat').val(formatAmountNumber(preciseCurrencyRound(val * quantity)))
|
||||||
}
|
}
|
||||||
setOrderPriceData()
|
setOrderPriceData()
|
||||||
})
|
})
|
||||||
$('.productTable .guidance-discount-format').on('input', function () {
|
$('.productTable .guidance-discount-format').on('input', function () {
|
||||||
let val = $(this).val()
|
let val = $(this).val()
|
||||||
let discount = (val/100).toFixed(4)
|
let discount = preciseCurrencyRound(val/100,4)
|
||||||
// let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
// let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
||||||
$(this).parent().parent().find('.guidanceDiscount').val(discount)
|
$(this).parent().parent().find('.guidanceDiscount').val(discount)
|
||||||
// $(this).parent().parent().find('.price').val((cataloguePrice * val).toFixed(2))
|
// $(this).parent().parent().find('.price').val(preciseCurrencyRound(cataloguePrice * val))
|
||||||
// $(this).parent().parent().find('.price-formmat').val(Number((cataloguePrice * val).toFixed(2)).toLocaleString("en-US"))
|
// $(this).parent().parent().find('.price-formmat').val(Number(preciseCurrencyRound(cataloguePrice * val))).toLocaleString("en-US"))
|
||||||
// let price = $(this).parent().parent().find('.price').val()
|
// let price = $(this).parent().parent().find('.price').val()
|
||||||
// let quantity = $(this).parent().parent().find('.quantity').val()
|
// let quantity = $(this).parent().parent().find('.quantity').val()
|
||||||
// if (price && quantity) {
|
// if (price && quantity) {
|
||||||
// $(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2))
|
// $(this).parent().parent().find('.allPrice').val(preciseCurrencyRound(price * quantity))
|
||||||
// $(this).parent().parent().find('.allPrice-formmat').val(Number((price * quantity).toFixed(2)).toLocaleString("en-US"))
|
// $(this).parent().parent().find('.allPrice-formmat').val(Number(preciseCurrencyRound(price * quantity)).toLocaleString("en-US"))
|
||||||
// }
|
// }
|
||||||
setOrderPriceData()
|
setOrderPriceData()
|
||||||
})
|
})
|
||||||
$('.productTable .discount-format').on('change', function () {
|
$('.productTable .discount-format').on('change', function () {
|
||||||
let percentageDiscount = $(this).val()
|
let percentageDiscount = $(this).val()
|
||||||
let discount = (percentageDiscount/100).toFixed(4)
|
let discount = preciseCurrencyRound(percentageDiscount/100,4)
|
||||||
$(this).parent().parent().find('.discount').val(discount)
|
$(this).parent().parent().find('.discount').val(discount)
|
||||||
let val = $(this).parent().parent().parent().find('.cataloguePrice').val()
|
let val = $(this).parent().parent().parent().find('.cataloguePrice').val()
|
||||||
$(this).parent().parent().parent().find('.price').val((val * discount).toFixed(2))
|
$(this).parent().parent().parent().find('.price').val(preciseCurrencyRound(val * discount))
|
||||||
let price = $(this).parent().parent().parent().find('.price').val()
|
let price = $(this).parent().parent().parent().find('.price').val()
|
||||||
$(this).parent().parent().parent().find('.price-formmat').val(formatAmountNumber(price))
|
$(this).parent().parent().parent().find('.price-formmat').val(formatAmountNumber(price))
|
||||||
let num = $(this).parent().parent().parent().find('.quantity').val()
|
let num = $(this).parent().parent().parent().find('.quantity').val()
|
||||||
|
|
@ -637,7 +636,7 @@
|
||||||
// if (getFlag()) {
|
// if (getFlag()) {
|
||||||
// allPriceNumber *= FOLD_ON_FOLD
|
// allPriceNumber *= FOLD_ON_FOLD
|
||||||
// }
|
// }
|
||||||
$(this).parent().parent().parent().find('.allPrice').val(allPriceNumber.toFixed(2))
|
$(this).parent().parent().parent().find('.allPrice').val(preciseCurrencyRound(allPriceNumber))
|
||||||
let allPrice = $(this).parent().parent().parent().find('.allPrice').val()
|
let allPrice = $(this).parent().parent().parent().find('.allPrice').val()
|
||||||
$(this).parent().parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
|
$(this).parent().parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPrice))
|
||||||
setOrderPriceData()
|
setOrderPriceData()
|
||||||
|
|
@ -645,18 +644,18 @@
|
||||||
$('.productTable .price-formmat').change('input', function () {
|
$('.productTable .price-formmat').change('input', function () {
|
||||||
let val = $(this).val()
|
let val = $(this).val()
|
||||||
let num = $(this).parent().parent().find('.quantity').val()
|
let num = $(this).parent().parent().find('.quantity').val()
|
||||||
$(this).parent().parent().find('.price').val(Number(val).toFixed(2))
|
$(this).parent().parent().find('.price').val(preciseCurrencyRound(Number(val)))
|
||||||
let allPriceNumber = val * num
|
let allPriceNumber = val * num
|
||||||
// if (getFlag()) {
|
// if (getFlag()) {
|
||||||
// allPriceNumber *= FOLD_ON_FOLD
|
// allPriceNumber *= FOLD_ON_FOLD
|
||||||
// }
|
// }
|
||||||
$(this).parent().parent().find('.allPrice').val(allPriceNumber.toFixed(2))
|
$(this).parent().parent().find('.allPrice').val(preciseCurrencyRound(allPriceNumber))
|
||||||
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(allPriceNumber.toFixed(2)))
|
$(this).parent().parent().find('.allPrice-formmat').val(formatAmountNumber(preciseCurrencyRound(allPriceNumber)))
|
||||||
|
|
||||||
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
|
||||||
let discount = (val*1.0000/cataloguePrice).toFixed(4);
|
let discount = preciseCurrencyRound(val*1.0000/cataloguePrice,4);
|
||||||
$(this).parent().parent().find('.discount').val(discount)
|
$(this).parent().parent().find('.discount').val(discount)
|
||||||
$(this).parent().parent().find('.discount-format').val((discount * 100).toFixed(2))
|
$(this).parent().parent().find('.discount-format').val(preciseCurrencyRound(discount * 100))
|
||||||
setOrderPriceData()
|
setOrderPriceData()
|
||||||
// $(this).val(formatAmountNumber(val))
|
// $(this).val(formatAmountNumber(val))
|
||||||
})
|
})
|
||||||
|
|
@ -701,26 +700,26 @@
|
||||||
let quantity = parseFloat($row.find('.quantity').val()) || 0;
|
let quantity = parseFloat($row.find('.quantity').val()) || 0;
|
||||||
|
|
||||||
// Calculate unit price (单价)
|
// Calculate unit price (单价)
|
||||||
let price = (cataloguePrice * discount).toFixed(2);
|
let price = preciseCurrencyRound(cataloguePrice * discount);
|
||||||
$row.find('.price').val(price);
|
$row.find('.price').val(price);
|
||||||
$row.find('.price-formmat').val(formatAmountNumber(price));
|
$row.find('.price-formmat').val(formatAmountNumber(price));
|
||||||
|
|
||||||
// Calculate total price (总价) if quantity exists
|
// Calculate total price (总价) if quantity exists
|
||||||
if (quantity > 0) {
|
if (quantity > 0) {
|
||||||
let allPrice = (price * quantity).toFixed(2);
|
let allPrice = preciseCurrencyRound(price * quantity);
|
||||||
$row.find('.allPrice').val(allPrice);
|
$row.find('.allPrice').val(allPrice);
|
||||||
$row.find('.allPrice-formmat').val(formatAmountNumber(allPrice));
|
$row.find('.allPrice-formmat').val(formatAmountNumber(allPrice));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate catalogue total price (目录总价) if quantity exists
|
// Calculate catalogue total price (目录总价) if quantity exists
|
||||||
if (quantity > 0) {
|
if (quantity > 0) {
|
||||||
let catalogueAllPrice = (cataloguePrice * quantity).toFixed(2);
|
let catalogueAllPrice = preciseCurrencyRound(cataloguePrice * quantity);
|
||||||
$row.find('.catalogueAllPrice').val(catalogueAllPrice);
|
$row.find('.catalogueAllPrice').val(catalogueAllPrice);
|
||||||
$row.find('.catalogueAllPrice-formmat').val(formatAmountNumber(catalogueAllPrice));
|
$row.find('.catalogueAllPrice-formmat').val(formatAmountNumber(catalogueAllPrice));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update discount format display
|
// Update discount format display
|
||||||
let discountFormat = (discount * 100).toFixed(2);
|
let discountFormat = preciseCurrencyRound(discount * 100);
|
||||||
$row.find('.discount').val(discount);
|
$row.find('.discount').val(discount);
|
||||||
$row.find('.discount-format').val(discountFormat);
|
$row.find('.discount-format').val(discountFormat);
|
||||||
if (updatePriceProductList.includes(rows[0].productCode)){
|
if (updatePriceProductList.includes(rows[0].productCode)){
|
||||||
|
|
|
||||||
|
|
@ -557,7 +557,7 @@
|
||||||
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
||||||
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
||||||
let discount = $(ele).val() || 0
|
let discount = $(ele).val() || 0
|
||||||
let res = Number((price * quantity * discount).toFixed(2))
|
let res = preciseCurrencyRound(Number((price * quantity * discount)))
|
||||||
$(ele).parent().parent().find('.amount').val(res)
|
$(ele).parent().parent().find('.amount').val(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -454,7 +454,7 @@
|
||||||
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
let price = Number($(ele).parent().parent().find('.price').val()) || 0
|
||||||
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
let quantity = Number($(ele).parent().parent().find('.quantity').val()) || 0
|
||||||
let discount = $(ele).val() || 0
|
let discount = $(ele).val() || 0
|
||||||
let res = Number((price * quantity * discount).toFixed(2))
|
let res = preciseCurrencyRound(Number((price * quantity * discount)))
|
||||||
$(ele).parent().parent().find('.amount').val(res)
|
$(ele).parent().parent().find('.amount').val(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -531,7 +531,7 @@
|
||||||
title: '折扣',
|
title: '折扣',
|
||||||
width: 90,
|
width: 90,
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
let showValue=value?(value*100).toFixed(2)+'%':'0%';
|
let showValue=value?preciseCurrencyRound(value*100)+'%':'0%';
|
||||||
var html = $.common.sprintf("" +
|
var html = $.common.sprintf("" +
|
||||||
"<input readonly class='form-control discount' style='display: none' type='number' name='orderListList[%s].discount' value='%s' step='0.0001' max='1' min='0' required>" +
|
"<input readonly class='form-control discount' style='display: none' type='number' name='orderListList[%s].discount' value='%s' step='0.0001' max='1' min='0' required>" +
|
||||||
"<input readonly class='form-control' type='text' value='%s' required>", index, value,showValue);
|
"<input readonly class='form-control' type='text' value='%s' required>", index, value,showValue);
|
||||||
|
|
|
||||||
|
|
@ -362,8 +362,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
|
||||||
addProduct(ele)
|
addProduct(ele)
|
||||||
})
|
})
|
||||||
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
|
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
|
||||||
|
|
@ -372,8 +372,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound((ele.discount*100)) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
|
||||||
addProduct2(ele)
|
addProduct2(ele)
|
||||||
})
|
})
|
||||||
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
|
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
|
||||||
|
|
@ -382,8 +382,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound((ele.discount*100)) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
|
||||||
addProduct3(ele)
|
addProduct3(ele)
|
||||||
})
|
})
|
||||||
if (!canUpdate){
|
if (!canUpdate){
|
||||||
|
|
|
||||||
|
|
@ -919,8 +919,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct(ele)
|
addProduct(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
data.hardwareProjectProductInfoList ? data.hardwareProjectProductInfoList.forEach((ele) => {
|
data.hardwareProjectProductInfoList ? data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -928,8 +928,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct2(ele)
|
addProduct2(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
data.maintenanceProjectProductInfoList ? data.maintenanceProjectProductInfoList.forEach((ele) => {
|
data.maintenanceProjectProductInfoList ? data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -937,8 +937,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct3(ele)
|
addProduct3(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
return
|
return
|
||||||
|
|
@ -953,8 +953,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct(ele)
|
addProduct(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -962,8 +962,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct2(ele)
|
addProduct2(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -971,8 +971,8 @@ ${
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct3(ele)
|
addProduct3(ele)
|
||||||
}) : ''
|
}) : ''
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1231,44 +1231,44 @@ ${
|
||||||
let maintenanceProjectProductInfoList = [[${projectOrderInfo.maintenanceProjectProductInfoList}]]
|
let maintenanceProjectProductInfoList = [[${projectOrderInfo.maintenanceProjectProductInfoList}]]
|
||||||
softwareProjectProductInfoList ? softwareProjectProductInfoList.forEach((ele) => {
|
softwareProjectProductInfoList ? softwareProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
||||||
ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
|
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold)
|
||||||
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
||||||
|
|
||||||
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount * 100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
|
||||||
ele.zdDiscount = discountFold * 100 + '%'
|
ele.zdDiscount = discountFold * 100 + '%'
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount * 100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
|
||||||
addProduct(ele)
|
addProduct(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => {
|
hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
||||||
ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
|
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold)
|
||||||
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
||||||
|
|
||||||
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount * 100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount * 100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
|
||||||
ele.zdDiscount = discountFold * 100 + '%'
|
ele.zdDiscount = discountFold * 100 + '%'
|
||||||
|
|
||||||
addProduct2(ele)
|
addProduct2(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
maintenanceProjectProductInfoList ? maintenanceProjectProductInfoList.forEach((ele) => {
|
maintenanceProjectProductInfoList ? maintenanceProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
||||||
ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
|
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold)
|
||||||
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
|
||||||
|
|
||||||
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount * 100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount * 100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
|
||||||
ele.zdDiscount = discountFold * 100 + '%'
|
ele.zdDiscount = discountFold * 100 + '%'
|
||||||
addProduct3(ele)
|
addProduct3(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
|
|
|
||||||
|
|
@ -1271,8 +1271,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct(ele)
|
addProduct(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -1280,8 +1280,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct2(ele)
|
addProduct2(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||||
|
|
@ -1289,8 +1289,8 @@
|
||||||
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
|
||||||
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
|
||||||
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
|
||||||
ele.discountFormat = ele.discount ? (ele.discount*100).toFixed(2) : ""
|
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
|
||||||
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount*100).toFixed(2) : ""
|
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
|
||||||
addProduct3(ele)
|
addProduct3(ele)
|
||||||
}) : '';
|
}) : '';
|
||||||
window.localStorage.removeItem('getDetail')
|
window.localStorage.removeItem('getDetail')
|
||||||
|
|
@ -1323,11 +1323,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const descriptionTemplates = {
|
const descriptionTemplates = {
|
||||||
'1-1': '备货完成供货商发起付款通知后,总代按照订单金额支付全款。',
|
'1-1': '全款支付-备货完成供货商发起付款通知后,总代按照订单金额支付全款。',
|
||||||
'1-2': '总代预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,总代需1个月内支付尾款完成提货,否则备货押金不予退还。',
|
'1-2': '全款支付-总代预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,总代需1个月内支付尾款完成提货,否则备货押金不予退还。',
|
||||||
'2-1': '备货完成供货商发起付款通知后,进货商需3个工作日内付订单全部款项,即可享受订单约定的现金折扣。',
|
'2-1': '全款支付-备货完成供货商发起付款通知后,进货商需3个工作日内付订单全部款项,即可享受订单约定的现金折扣。',
|
||||||
'2-2': '进货商预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,进货商需3个工作日内付全部剩余款项,即可享受订单约定的现金折扣。',
|
'2-2': '全款支付-进货商预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,进货商需3个工作日内付全部剩余款项,即可享受订单约定的现金折扣。',
|
||||||
'2-3': '进货商预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,供货商需在1个月内提交剩余款项额度的商业汇票完成提货,否则备货押金不予退还。'
|
'2-3': '商业汇票支付-进货商预付{ratio}%订单金额作为备货押金后开始备货生产,备货完成供货商发起付款通知后,供货商需在1个月内提交剩余款项额度的商业汇票完成提货,否则备货押金不予退还。'
|
||||||
};
|
};
|
||||||
|
|
||||||
function updateDescriptionText() {
|
function updateDescriptionText() {
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
}
|
}
|
||||||
let guidanceDiscount=[[${productInfo.guidanceDiscount}]]
|
let guidanceDiscount=[[${productInfo.guidanceDiscount}]]
|
||||||
if (guidanceDiscount){
|
if (guidanceDiscount){
|
||||||
$('#guidanceDiscountFormat').val((guidanceDiscount*100).toFixed(2))
|
$('#guidanceDiscountFormat').val(preciseCurrencyRound(guidanceDiscount*100))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
field: 'guidanceDiscount',
|
field: 'guidanceDiscount',
|
||||||
title: '指导折扣',
|
title: '指导折扣',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
return value?(value * 100).toFixed(2) + '%' :'-';
|
return value?preciseCurrencyRound(value * 100) + '%' :'-';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,12 @@ public class TodoController extends BaseController {
|
||||||
mmap.put("user", getSysUser());
|
mmap.put("user", getSysUser());
|
||||||
return prefix + "/todo";
|
return prefix + "/todo";
|
||||||
}
|
}
|
||||||
|
@GetMapping("/complete")
|
||||||
|
public String complete(ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("user", getSysUser());
|
||||||
|
return prefix + "/complete";
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 查询待办列表
|
* 查询待办列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
private TaskService taskService;
|
private TaskService taskService;
|
||||||
|
|
||||||
|
|
||||||
private static final List<String> CSS_EMAIL_LIST = Arrays.asList("wangxiaojun@pcitech.com", "sunxuepu@pcitech.com", "huiwang@pcitech.com", "zhaoqian1@pcitech.com", "pci-ict@pcitech.com");
|
private static final List<String> CSS_EMAIL_LIST = Arrays.asList("wangxiaojun@pcitech.com", "huiwang@pcitech.com", "zhaoqian1@pcitech.com", "pci-ict@pcitech.com");
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBuApproveConfigService approveConfigService;
|
private IBuApproveConfigService approveConfigService;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue