From 0da73fc2cb4b635e8499ae743d8ccfaadd409764 Mon Sep 17 00:00:00 2001 From: wangjiuyun <1595161655@qq.com> Date: Sun, 8 Jun 2025 15:14:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=A4=E7=BC=96=E8=BE=91=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=A4=96=E5=A4=A7=E4=BD=93=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/project/info/add.html | 15 +++ .../templates/project/info/edit.html | 46 +++++--- .../templates/project/info/project.html | 8 +- .../templates/project/info/selectPeople.html | 2 +- .../templates/project/order/add.html | 53 ++++++--- .../templates/project/order/edit.html | 110 ++++++++++-------- .../templates/project/order/selectPeople.html | 2 +- 7 files changed, 145 insertions(+), 91 deletions(-) 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 55edb707..1e4669a6 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/add.html @@ -66,6 +66,9 @@ input, textarea, .productTable td { position: relative; } + .productTable label[id*="iscount"]{ + top: -30px !important; + }
@@ -321,12 +324,24 @@ } $.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) { softwareProjectProductInfoList = res.rows + softwareProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) }) $.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) { hardwareProjectProductInfoList = res.rows + hardwareProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) }) $.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) { maintenanceProjectProductInfoList = res.rows + maintenanceProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) }) } 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 9aef84a0..0c828d67 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/edit.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/edit.html @@ -66,6 +66,9 @@ input, textarea, .productTable td { position: relative; } + .productTable label[id*="iscount"]{ + top: -30px !important; + }
@@ -216,7 +219,7 @@ 产品编号 产品型号 描述 - 数量 + 数量 目录单价(RMB) 指导折扣 折扣 @@ -239,7 +242,7 @@ 产品编号 产品型号 描述 - 数量 + 数量 目录单价(RMB) 指导折扣 折扣 @@ -262,7 +265,7 @@ 产品编号 产品型号 描述 - 数量 + 数量 目录单价(RMB) 指导折扣 折扣 @@ -344,6 +347,10 @@ $.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) { softwareProjectProductInfoList = res.rows + softwareProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || [] softwareProjectProductInfoListAll.forEach((ele) => { addProduct(ele) @@ -351,6 +358,10 @@ }) $.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) { hardwareProjectProductInfoList = res.rows + hardwareProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || [] hardwareProjectProductInfoListAll.forEach((ele) => { addProduct2(ele) @@ -359,6 +370,10 @@ }) $.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) { maintenanceProjectProductInfoList = res.rows + maintenanceProjectProductInfoList.unshift({ + model:'', + productCode:'' + }) let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || [] maintenanceProjectProductInfoListAll.forEach((ele) => { addProduct3(ele) @@ -490,8 +505,7 @@ // 添加软件 function initData() { - console.log(123, [[${projectInfo.competitorList}]]) - let competitorList=[[${projectInfo.competitorList}]] + let competitorList=[[${projectInfo.competitorList}]]||[] competitorList.forEach((ele,index)=>{ if(ele){ $(`input[type="checkbox"][value="${ele}"]`).attr('checked',true) @@ -523,13 +537,13 @@ @@ -558,13 +572,13 @@ ${softwareProjectProductInfoList.map((ele) => { @@ -593,13 +607,13 @@ ${hardwareProjectProductInfoList.map((ele) => { @@ -706,7 +720,7 @@ ${maintenanceProjectProductInfoList.map((ele) => { } function initPrice() { - $('#productTable .quantity').on('input', function () { + $('.productTable .quantity').on('input', function () { let num = $(this).val() let priceVal = $(this).parent().parent().find('.price').val() let cateVal = $(this).parent().parent().find('.cataloguePrice').val() @@ -717,14 +731,14 @@ ${maintenanceProjectProductInfoList.map((ele) => { $(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2)) } }) - $('#productTable .cataloguePrice').on('input', function () { + $('.productTable .cataloguePrice').on('input', function () { let val = $(this).val() $(this).parent().parent().find('.price').val(val) let quantity = $(this).parent().parent().find('.quantity').val() if (quantity && val) $(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2)) }) - $('#productTable .guidanceDiscount').on('input', function () { + $('.productTable .guidanceDiscount').on('input', function () { let val = $(this).val() let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val() $(this).parent().parent().find('.discount').val(val) @@ -735,12 +749,12 @@ ${maintenanceProjectProductInfoList.map((ele) => { $(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2)) } }) - $('#productTable .discount').on('input', function () { + $('.productTable .discount').on('input', function () { let discount = $(this).val() let val = $(this).parent().parent().find('.cataloguePrice').val() $(this).parent().parent().find('.price').val((val * discount).toFixed(2)) }) - $('#productTable .price').change('input', function () { + $('.productTable .price').change('input', function () { let val = $(this).val() let num = $(this).parent().parent().find('.quantity').val() $(this).parent().parent().find('.allPrice').val((val * num).toFixed(2)) diff --git a/ruoyi-admin/src/main/resources/templates/project/info/project.html b/ruoyi-admin/src/main/resources/templates/project/info/project.html index f20e2c85..8a4aff0a 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/project.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/project.html @@ -416,13 +416,15 @@ width: 1050, yes: function (index, layero) { let body = parent.layer.getChildFrame('body', index) - if ($(body.find('#form-product-add').get(0)).validate().form()) { - $.operate.save(prefix + "/add", body.find('#form-product-add').serialize(), function (res) { + if ($(body.find('#form-order-add').get(0)).validate().form()) { + $.operate.save( ctx + "project/order/add", body.find('#form-order-add').serialize(), function (res) { if (res.code == web_status.SUCCESS) { - $.table.search() parent.layer.close(index) } }); + }else{ + $.modal.alertWarning("请完善表单"); + } }, }; diff --git a/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html b/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html index df1fe2a4..0c55949b 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/selectPeople.html @@ -74,7 +74,7 @@ title: '人员名称' }, { - field: 'phonenumber ', + field: 'phonenumber', title: '人员电话' }, { 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 5ebb4927..606e57ba 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html @@ -75,10 +75,13 @@ margin-left: 20px; display: inline-block; } + .productTable label[id*="iscount"]{ + top: -30px !important; + }
-
+
新建订单
@@ -165,8 +168,7 @@ - + @@ -215,6 +217,7 @@ - + @@ -366,7 +369,7 @@
公司直发
汇智责任人 - Email @@ -222,7 +225,7 @@
进货商联系人 Email