Browse Source

fix(): 修改商户管理模块对接参数

develop
陈宇航 1 year ago
parent
commit
2b7153c1f4
  1. 4
      src/pages/MerchantMgm/InvoiceConf/loadable.jsx
  2. 6
      src/pages/MerchantMgm/MerchantInfo/loadable.jsx

4
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("最小开票金额不能大于最大开票金额");
}

6
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)

Loading…
Cancel
Save