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 771df480..0a4b0f23 100644
--- a/ruoyi-admin/src/main/resources/templates/layout/product-list.html
+++ b/ruoyi-admin/src/main/resources/templates/layout/product-list.html
@@ -98,21 +98,44 @@
const FOLD_ON_FOLD = 0.988;
document.addEventListener("DOMContentLoaded", function () {
// 初始化删除逻辑等
- $('.productTable .delRow').on('click', function () {
- let ele = $(this);
- $.modal.confirm('是否确认删除', function () {
- $(ele).parent().parent().remove();
- updateIndices();
- });
- });
+ // $('.productTable .delRow').on('click', function () {
+ // let ele = $(this);
+ // $.modal.confirm('是否确认删除', function () {
+ // $(ele).parent().parent().remove();
+ // updateIndices();
+ // });
+ // });
- function updateIndices() {
- $('#productTable tbody tr').each(function (index) {
- $(this).find('.indexBox').text(index + 1);
- });
- }
});
+ function delProductRow(that){
+ top.layer.confirm('是否确认删除', {
+ icon: 3,
+ id:'delProductRow'+Math.random(),
+ title: "系统提示",
+ btn: ['确认', '取消']
+ }, function (index) {
+ $.modal.close(index);
+ $(that).parent().parent().remove();
+ updateIndices();
+ });
+ }
+ function updateIndices() {
+ $('.productTable').each(function () {
+ $(this).find("tbody tr").each(function(index){
+ $(this).find('.indexBox').text(index + 1);
+ $(this).find('input, textarea').each(function() {
+ let name = $(this).attr('name');
+ if (name && name.includes("ProductInfoList")) {
+ // 替换名称中的索引值为新的索引
+ let newName = name.replace(/ProductInfoList\[\d+\]/, 'ProductInfoList[' + index + ']');
+ $(this).attr('name', newName);
+ }
+ });
+ })
+
+ });
+ }
function setOrderPriceData(){
let allPrice=0.00;
$('#productTable tbody').find('tr').find('.allPrice').each(function (index) {
@@ -140,8 +163,8 @@
let tr = $(`
${length + 1} |
- |
- |
+ |
+ |
|
|
@@ -169,11 +192,11 @@
|
|
-删除 |
+删除 |
`)
$('#productTable tbody').append(tr)
- initSearchProduct('1')
+ // initSearchProduct('1')
initPrice()
}
@@ -186,8 +209,8 @@
let tr = $(`
${length + 1} |
- |
- |
+ |
+ |
|
|
@@ -215,11 +238,11 @@
|
|
-删除 |
+删除 |
`)
$('#productTable2 tbody').append(tr)
- initSearchProduct('2')
+ // initSearchProduct('2')
initPrice()
}
@@ -264,11 +287,11 @@
|
-删除 |
+删除 |
`)
$('#productTable3 tbody').append(tr)
- initSearchProduct('11,22,99')
+ // initSearchProduct('11,22,99')
initPrice()
}
function getData(that,name){
diff --git a/ruoyi-admin/src/main/resources/templates/project/info/add.html b/ruoyi-admin/src/main/resources/templates/project/info/add.html
index cdbe5f73..1069ef82 100644
--- a/ruoyi-admin/src/main/resources/templates/project/info/add.html
+++ b/ruoyi-admin/src/main/resources/templates/project/info/add.html
@@ -540,22 +540,22 @@
}
function initSearchProduct(type) {
- $('.productTable .delRow').on('click', function () {
- let ele = $(this)
- $.modal.confirm('是否确认删除', function () {
- $(ele).parent().parent().remove()
- $('#productTable tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable2 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable3 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
-
- });
- })
+ // $('.productTable .delRow').on('click', function () {
+ // let ele = $(this)
+ // $.modal.confirm('是否确认删除', function () {
+ // $(ele).parent().parent().remove()
+ // $('#productTable tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable2 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable3 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ //
+ // });
+ // })
}
diff --git a/ruoyi-admin/src/main/resources/templates/project/info/edit.html b/ruoyi-admin/src/main/resources/templates/project/info/edit.html
index bea4228e..54786665 100644
--- a/ruoyi-admin/src/main/resources/templates/project/info/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/project/info/edit.html
@@ -616,22 +616,22 @@
}
function initSearchProduct(type) {
- $('.productTable .delRow').on('click', function () {
- let ele = $(this)
- $.modal.confirm('是否确认删除', function () {
- $(ele).parent().parent().remove()
- $('#productTable tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable2 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable3 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
-
- });
- })
+ // $('.productTable .delRow').on('click', function () {
+ // let ele = $(this)
+ // $.modal.confirm('是否确认删除', function () {
+ // $(ele).parent().parent().remove()
+ // $('#productTable tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable2 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable3 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ //
+ // });
+ // })
}
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 e37c2830..ccd5bcd2 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/add.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html
@@ -637,22 +637,22 @@
}
function initSearchProduct() {
- $('.productTable .delRow').on('click', function () {
- let ele = $(this)
- $.modal.confirm('是否确认删除', function () {
- $(ele).parent().parent().remove()
- $('#productTable tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable2 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
- $('#productTable3 tbody tr').each((index, item) => {
- $(item).find('.indexBox').text(index + 1)
- })
-
- });
- })
+ // $('.productTable .delRow').on('click', function () {
+ // let ele = $(this)
+ // $.modal.confirm('是否确认删除', function () {
+ // $(ele).parent().parent().remove()
+ // $('#productTable tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable2 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ // $('#productTable3 tbody tr').each((index, item) => {
+ // $(item).find('.indexBox').text(index + 1)
+ // })
+ //
+ // });
+ // })
}
diff --git a/ruoyi-admin/src/main/resources/templates/project/order/edit.html b/ruoyi-admin/src/main/resources/templates/project/order/edit.html
index 8b3b77ae..3c34d82e 100644
--- a/ruoyi-admin/src/main/resources/templates/project/order/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/project/order/edit.html
@@ -73,9 +73,9 @@
position: relative;
}
- [name="bgProperty"], #industryTypeBox select {
- pointer-events: none;
- }
+ /*[name="bgProperty"], #industryTypeBox select {*/
+ /* pointer-events: none;*/
+ /*}*/
#projectNameBox {
margin-left: 20px;
@@ -139,8 +139,8 @@
BG* |
|