From 2b7153c1f434dc6ff1f09e36f415b78f8886ba51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=87=E8=88=AA?= <740464440@qq.com> Date: Fri, 2 Feb 2024 17:59:50 +0800 Subject: [PATCH] =?UTF-8?q?fix():=20=E4=BF=AE=E6=94=B9=E5=95=86=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E5=AF=B9=E6=8E=A5=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MerchantMgm/InvoiceConf/loadable.jsx | 4 +++- src/pages/MerchantMgm/MerchantInfo/loadable.jsx | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/MerchantMgm/InvoiceConf/loadable.jsx b/src/pages/MerchantMgm/InvoiceConf/loadable.jsx index bec64b7..0e76338 100644 --- a/src/pages/MerchantMgm/InvoiceConf/loadable.jsx +++ b/src/pages/MerchantMgm/InvoiceConf/loadable.jsx @@ -65,6 +65,7 @@ function InvoiceConf(props) { // 发票平台 const [InvoicePlatform, setInvoicePlatform] = useState(2); const [editId, setEditId] = useState(""); // 编辑是所需要的id + const [beforeName, setBeforeName] = useState(""); // 编辑前商户名称信息 //开票项目下拉 //商户类型选择 const tenantOption = [ @@ -413,6 +414,7 @@ function InvoiceConf(props) { max_amount: res?.data?.max_amount || "", }); setRateStatus(res?.data?.tax_rate || "0"); + setBeforeName(res?.data?.tenantName); } else { message.error(res.message) } @@ -563,7 +565,7 @@ function InvoiceConf(props) { max_amount, } }) - const data = editId ? { ...editFormValue, id: editId, uid } : { ...editFormValue } + const data = editId ? { ...editFormValue, id: editId, uid, before_name: beforeName} : { ...editFormValue } if(data?.mini_amount && data?.max_amount) { if(parseFloat(data?.mini_amount)> parseFloat(data?.max_amount)) return message.error("最小开票金额不能大于最大开票金额"); } diff --git a/src/pages/MerchantMgm/MerchantInfo/loadable.jsx b/src/pages/MerchantMgm/MerchantInfo/loadable.jsx index b598b93..6a0e336 100644 --- a/src/pages/MerchantMgm/MerchantInfo/loadable.jsx +++ b/src/pages/MerchantMgm/MerchantInfo/loadable.jsx @@ -115,6 +115,7 @@ const MerchantInfo = (props) => { const [clearAccount, setClearAccount] = useState({}); // 清结算模块 const [clearAccountOpen, setClearAccountOpen] = useState({modalOpen: false, data: {}}); // 清结算模块查看modal const [addEdit,setAddEdit] = useState("待配置") // 清结算模块新增编辑 按钮待配置和编辑 + const [beforeName, setBeforeName] = useState(""); // 编辑前商户名称信息 //表头 const columns = [ { @@ -677,7 +678,7 @@ const MerchantInfo = (props) => { } const data = editId ? {...systemFormValue, ...accountFormValue, ...businessFormValue,...clearFormValue, ...qingdaoFormValue, ...weiPayFromValue, ...zhiPayFormValue, ...weiMiniFormValue, - ...zhiMiniFormValue, ...weiPayFrom2Value, ...weiMiniForm2Value, business_license: imgList, id: editId, uid} + ...zhiMiniFormValue, ...weiPayFrom2Value, ...weiMiniForm2Value, business_license: imgList, id: editId, uid, before_name: beforeName} : {...systemFormValue, ...accountFormValue, ...businessFormValue,...clearFormValue, ...qingdaoFormValue, ...weiPayFromValue, ...zhiPayFormValue, ...weiMiniFormValue, ...zhiMiniFormValue, ...weiPayFrom2Value, ...weiMiniForm2Value, business_license: imgList} @@ -735,7 +736,7 @@ const MerchantInfo = (props) => { ) accountForm.setFieldsValue( { - companyName: res?.data?.tenantName || "", + companyName: res?.data?.companyName || "", city: res?.data?.city || [], address: res?.data?.address || "", connect_name: res?.data?.connect_name ||"", @@ -754,6 +755,7 @@ const MerchantInfo = (props) => { clearForm.setFieldsValue({ pay_type: res?.data?.pay_type || null }) + setBeforeName(res?.data?.tenantName) if (res?.data?.pay_type == 1) { setQingDaoVisible(true) setSpecialVisible(false)