diff --git a/ruoyi-admin/src/main/resources/templates/layout/product-list.html b/ruoyi-admin/src/main/resources/templates/layout/product-list.html
index 582d211a..11bc057b 100644
--- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html
+++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html
@@ -29,6 +29,7 @@
总价(¥)
折后总价(¥)
目录总价(¥)
+ 税率(%)
备注
操作
@@ -58,6 +59,7 @@
总价(¥)
折后总价(¥)
目录总价(¥)
+ 税率(%)
备注
操作
@@ -87,6 +89,7 @@
总价(¥)
折后总价(¥)
目录总价(¥)
+ 税率(%)
备注
操作
@@ -294,6 +297,7 @@
}
function generatedTr(index,data,length){
+ debugger
let flag=true
let productTypeParam=productType[index]
let queryParam=productTypeParam.type
@@ -346,6 +350,9 @@
+
+
+
删除
diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html
index 58547a8f..192f4b24 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/add.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html
@@ -604,11 +604,11 @@
if (orderChannel == '1') { // 总代
$paymentMethodSelect.append('全款支付,无需预付款 ');
- $paymentMethodSelect.append('全款支付,需单独备货生产,预付订单总货款30% ');
+ $paymentMethodSelect.append('全款支付,需单独备货生产,预付订单总货款百分比 ');
} else if (orderChannel == '2') { // 直签
$paymentMethodSelect.append('全款支付 ');
- $paymentMethodSelect.append('全款支付,需单独备货生产,预付订单总货款30% ');
- $paymentMethodSelect.append('商业汇票支付,预付订单总货款30% ');
+ $paymentMethodSelect.append('全款支付,需单独备货生产,预付订单总货款百分比 ');
+ $paymentMethodSelect.append('商业汇票支付,预付订单总货款百分比 ');
}
// Clear description and ratio when channel changes
$('#paymentDescription').val('');
diff --git a/ruoyi-admin/src/main/resources/templates/project/order/approve.html b/ruoyi-admin/src/main/resources/templates/project/order/approve.html
index 11db72c0..dc5baffa 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/approve.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/approve.html
@@ -370,12 +370,18 @@
请选择
全款支付,无需预付款
- 全款支付,需单独备货生产,预付订单总货款30%
+
+ 全款支付,需单独备货生产,预付订单总货款百分比
+
全款支付
- 全款支付,需单独备货生产,预付订单总货款30%
- 商业汇票支付,预付订单总货款30%
+
+ 全款支付,需单独备货生产,预付订单总货款百分比
+
+
+ 商业汇票支付,预付订单总货款百分比
+
@@ -673,7 +679,7 @@
// }
// }
- let data = [[${todo}]]
+ let {taxRateData, ...data} = [[${todo}]]
data.approveOpinion = value
data.approveStatus = 3
data.variables = {
@@ -684,6 +690,19 @@
if( $('#actualPurchaseAmount').length>0){
data.variables.actualPurchaseAmount=$('#actualPurchaseAmount').val()
}
+
+ // 如果是商务审批,收集税率数据
+ const taskName = [[${todo.taskName}]];
+ if (taskName && taskName.startsWith('商务')) {
+ const taxRateList = collectTaxRateData();
+ if (taxRateList) {
+ for (let i = 0; i < taxRateList.length; i++) {
+ for (let key in taxRateList[i]) {
+ data['taxRateData[' + i + '].' + key] = taxRateList[i][key];
+ }
+ }
+ }
+ }
top.layer.close(index); // 关闭层
if ([[${todo.taskName == '公司领导'}]]) {
exportPdf(true)
@@ -724,6 +743,19 @@
approveBtn: 0
}
+ // 如果是商务审批,收集税率数据
+ const taskName = [[${todo.taskName}]];
+ if (taskName && taskName.startsWith('商务')) {
+ const taxRateList = collectTaxRateData();
+ if (taxRateList) {
+ for (let i = 0; i < taxRateList.length; i++) {
+ for (let key in taxRateList[i]) {
+ data['taxRateData[' + i + '].' + key] = taxRateList[i][key];
+ }
+ }
+ }
+ }
+
top.layer.close(index); // 关闭层
if ([[${todo.taskName == '公司领导'}]]) {
exportPdf(true)
@@ -1183,14 +1215,16 @@ ${
//判断是否总代
let flag = [[${projectOrderInfo.processTemplate == '1'}]]
let discountFold = [[${projectOrderInfo.discountFold}]]
- console.log(discountFold)
let id = $('[name="projectId"]').val()
window.localStorage.setItem('getDetail', 1)
- $.operate.get(ctx + `sip/project/query/${id}`, function (res) {
+
$('#productTable tbody').html('')
$('#productTable2 tbody').html('')
$('#productTable3 tbody').html('')
- res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => {
+ let softwareProjectProductInfoList = [[${projectOrderInfo.softwareProjectProductInfoList}]]
+ let hardwareProjectProductInfoList = [[${projectOrderInfo.hardwareProjectProductInfoList}]]
+ let maintenanceProjectProductInfoList = [[${projectOrderInfo.maintenanceProjectProductInfoList}]]
+ softwareProjectProductInfoList ? softwareProjectProductInfoList.forEach((ele) => {
ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
@@ -1204,7 +1238,7 @@ ${
ele.guidanceDiscountFormat = ele.guidanceDiscount ? (ele.guidanceDiscount * 100).toFixed(2) : ""
addProduct(ele)
}) : '';
- res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
+ hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => {
ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
@@ -1219,10 +1253,10 @@ ${
addProduct2(ele)
}) : '';
- res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
+ maintenanceProjectProductInfoList ? maintenanceProjectProductInfoList.forEach((ele) => {
- ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
- ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
+ ele.allPriceDisCount = (ele.allPrice * discountFold).toFixed(2)
+ ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
@@ -1255,7 +1289,9 @@ ${
}else{
$('.discount-text').text('现金折扣')
}
- })
+ initTaxRateEditability();
+
+ // $.operate.get(ctx + `sip/project/query/${id}`, function (res) )
}
function downFile(filePath, fileName) {
@@ -1341,6 +1377,89 @@ ${
}
}
+ // 控制税率列的可编辑性
+ function initTaxRateEditability() {
+ const taskName = [[${todo.taskName}]];
+ const isBusinessTask = taskName && taskName.startsWith('商务');
+
+ // 获取所有税率输入框
+ const taxRateInputs = document.querySelectorAll('.tax-rate');
+
+ taxRateInputs.forEach(function (input) {
+ if (isBusinessTask) {
+ // 如果是商务任务,允许编辑
+ input.removeAttribute('readonly');
+ input.removeAttribute('disabled');
+ input.style.backgroundColor = '#fff';
+ input.style.cursor = 'text';
+ } else {
+ // 否则保持只读
+ input.setAttribute('readonly', 'readonly');
+ }
+ });
+ }
+
+ // 收集税率数据
+ function collectTaxRateData() {
+ const taxRateData = [];
+
+ // 收集软件产品税率
+ $('#productTable tbody tr').each(function (index) {
+ const taxRateInput = $(this).find('.tax-rate');
+ if (taxRateInput.length > 0) {
+ const productId = $(this).find('input[name$=".id"]').val();
+ const productCode = $(this).find('input[name$=".productBomCode"]').val();
+ const taxRate = taxRateInput.val();
+ if (productId || taxRate) {
+ taxRateData.push({
+ productId: productId,
+
+ projectId: $('#projectId').val(),
+ taxRate: taxRate || '13'
+ });
+ }
+ }
+ });
+
+ // 收集终端产品税率
+ $('#productTable2 tbody tr').each(function (index) {
+ const taxRateInput = $(this).find('.tax-rate');
+ if (taxRateInput.length > 0) {
+ const productId = $(this).find('input[name$=".id"]').val();
+ const productCode = $(this).find('input[name$=".productBomCode"]').val();
+ const taxRate = taxRateInput.val();
+ if (productId || taxRate) {
+ taxRateData.push({
+ productId: productId,
+
+ projectId: $('#projectId').val(),
+ taxRate: taxRate || '13'
+ });
+ }
+ }
+ });
+
+ // 收集第三类产品税率
+ $('#productTable3 tbody tr').each(function (index) {
+ const taxRateInput = $(this).find('.tax-rate');
+ if (taxRateInput.length > 0) {
+ const productId = $(this).find('input[name$=".id"]').val();
+ const productCode = $(this).find('input[name$=".productBomCode"]').val();
+ const taxRate = taxRateInput.val();
+ if (productId || taxRate) {
+ taxRateData.push({
+ productId: productId,
+ projectId: $('#projectId').val(),
+ taxRate: taxRate || '13'
+ });
+ }
+ }
+ });
+
+ return taxRateData;
+ }
+
+