fix(order):修正订单折扣计算逻辑与供应商选择功能

- 修改订单审批页面中软件、硬件及维护产品的折扣计算方式
- 更新edit页面中的供应商根据订单渠道自动填充逻辑
- 调整product-list模板中折扣显示文本内容
dev_1.0.0
chenhao 2025-10-09 14:56:54 +08:00
parent 724520c48e
commit 6185245482
4 changed files with 11 additions and 5 deletions

View File

@ -268,7 +268,7 @@
border: 1px solid; border: 1px solid;
flex-direction: row; flex-direction: row;
justify-content: flex-end; justify-content: flex-end;
"><div style="width: 65svw;display: flex;justify-content: center;"><span ><span class="discount-text">利润折扣</span>,折扣<span id="allPriceCountValueSpan"></span> "><div style="width: 65svw;display: flex;justify-content: center;"><span ><span class="discount-text">利润折扣</span>,折扣<span id="allPriceCountValueSpan"></span>
<select id="allPriceCountValue" onchange="changeAllPriceCount(${id})" > <select id="allPriceCountValue" onchange="changeAllPriceCount(${id})" >
<option value="1" ${(!discountFold || discountFold===1)?'selected':''} >100%</option> <option value="1" ${(!discountFold || discountFold===1)?'selected':''} >100%</option>
<option value="0.988" ${discountFold===0.988?'selected':''} >98.8%</option> <option value="0.988" ${discountFold===0.988?'selected':''} >98.8%</option>

View File

@ -613,7 +613,9 @@
} }
function updatePaymentOptions() { function updatePaymentOptions() {
var orderChannel = $('[name="orderChannel"]').val(); let orderChannel = $('[name="orderChannel"]').val();
$('[name="supplier"]').val(orderChannel === '1' ? "广州佳都技术有限公司":"紫光汇智信息技术有限公司")
var $paymentMethodSelect = $('#paymentMethod'); var $paymentMethodSelect = $('#paymentMethod');
$paymentMethodSelect.empty(); $paymentMethodSelect.empty();
$paymentMethodSelect.append('<option value="">请选择</option>'); $paymentMethodSelect.append('<option value="">请选择</option>');

View File

@ -1231,7 +1231,7 @@ ${
let maintenanceProjectProductInfoList = [[${projectOrderInfo.maintenanceProjectProductInfoList}]] let maintenanceProjectProductInfoList = [[${projectOrderInfo.maintenanceProjectProductInfoList}]]
softwareProjectProductInfoList ? softwareProjectProductInfoList.forEach((ele) => { softwareProjectProductInfoList ? softwareProjectProductInfoList.forEach((ele) => {
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold) ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount) ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
@ -1245,7 +1245,7 @@ ${
}) : ''; }) : '';
hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => { hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => {
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold) ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount) ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
@ -1260,7 +1260,7 @@ ${
}) : ''; }) : '';
maintenanceProjectProductInfoList ? maintenanceProjectProductInfoList.forEach((ele) => { maintenanceProjectProductInfoList ? maintenanceProjectProductInfoList.forEach((ele) => {
ele.allPriceDisCount = preciseCurrencyRound(ele.allPrice * discountFold) ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount) ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : "" ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""

View File

@ -927,6 +927,10 @@
// 调用原有的更新付款选项函数 // 调用原有的更新付款选项函数
updatePaymentOptions(false); updatePaymentOptions(false);
let orderChannel = $('[name="orderChannel"]').val();
$('[name="supplier"]').val(orderChannel === '1' ? "广州佳都技术有限公司":"紫光汇智信息技术有限公司")
}); });
updatePaymentOptions(true); updatePaymentOptions(true);
// Set payment method from database // Set payment method from database