From 7851738d27e9deb5df64de7935603163b1c7f785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Thu, 29 Aug 2024 10:29:31 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B8=81=E7=A7=8D=E9=80=89=E6=8B=A9=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/customerQuote/add.html | 73 ++++++++++++++----- 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html index bd8d9152..7c61c40e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html @@ -57,13 +57,23 @@
-
-
- - -
+
+ +
+ + + + + + + + + + +
@@ -190,7 +200,7 @@ // 根据data.data.confirmTax的值(0或1)来选中对应的单选按钮 if(data.data.confirmTax === '0' || data.data.confirmTax === '1') { console.log("data.data.confirmTax:",data.data.confirmTax) - $('input:radio[name="confirmFax"][value="' + data.data.confirmTax + '"]').attr('checked', 'checked'); + $('input:radio[name="confirmTax"][value="' + data.data.confirmTax + '"]').attr('checked', "checked"); } else { // 如果返回的值不是预期的0或1,可处理异常情况 console.warn("Unexpected confirmTax value:", data.data.confirmTax); @@ -327,20 +337,20 @@ } }, - { title: '最新报价',field: 'materialSole', - editable: { - type: 'number', - mode: 'inline', - title: '对外售价', - validate: function (value) { - if (!value) { - return '对外售价不能为空'; - } - if (isNaN(value)) { - return '对外售价必须为数字'; - } - } - } + { title: '最新报价',field: 'materialSole',align: 'center', + // editable: { + // type: 'number', + // mode: 'inline', + // title: '对外售价', + // validate: function (value) { + // if (!value) { + // return '对外售价不能为空'; + // } + // if (isNaN(value)) { + // return '对外售价必须为数字'; + // } + // } + // } }, {title: '国内税率',field: 'countTax',align: 'center',}, @@ -544,6 +554,29 @@ // getBusinessMembers(); getCustomerCode(); }); + $(document).ready(function() { + $("#commonCurrency_add").on('change', function() { + var selectedValue = $(this).val(); + var $radioTax = $('input:radio[name="confirmTax"][value="1"]'); + var $radioNo = $('input:radio[name="confirmTax"][value="0"]'); + // 设置含税单选按钮选中 + if(selectedValue ==="1"){ + console.log("1:"+selectedValue); + $radioNo.removeAttr('checked'); + $radioTax.attr('checked','checked'); + + // $("input[name='confirmFax']").val(1); + console.log($radioTax.prop('checked')); + }else if(selectedValue ==="2"){ + console.log("2:"+selectedValue); + $radioTax.prop('checked',false); + $radioNo.prop('checked',true); + // $radioTax.removeAttr('checked'); + // $radioNo.attr('checked','checked'); + console.log($radioNo.prop('checked')); + } + }); + }); function getCustomerCode(){ //获取单号 $.ajax({