|
|
@ -112,6 +112,8 @@ const MerchantInfo = (props) => { |
|
|
|
const [zhiMiniVisible2, setZhiMiniVisible2] = useState(false) |
|
|
|
const [editId, setEditId] = useState(""); // 编辑是所需要的id |
|
|
|
const [companyAddress, setCompanyAddress] = useState([]); // 获取公司地址 |
|
|
|
const [clearAccount, setClearAccount] = useState({}); // 清结算模块 |
|
|
|
const [clearAccountOpen, setClearAccountOpen] = useState({modalOpen: false, data: {}}); // 清结算模块查看modal |
|
|
|
//表头 |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
@ -269,26 +271,26 @@ const MerchantInfo = (props) => { |
|
|
|
const PAY = [ |
|
|
|
{ |
|
|
|
label: '青岛账户', |
|
|
|
value: 1, |
|
|
|
value: "1", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '特约商户账户', |
|
|
|
value: 2, |
|
|
|
value: "2", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '独立账户', |
|
|
|
value: 3, |
|
|
|
value: "3", |
|
|
|
}, |
|
|
|
] |
|
|
|
//手续费承担方 |
|
|
|
const CHARGE_TYPE = [ |
|
|
|
{ |
|
|
|
label: '商户', |
|
|
|
value: 1, |
|
|
|
value: "1", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '青岛', |
|
|
|
value: 2, |
|
|
|
value: "2", |
|
|
|
}, |
|
|
|
] |
|
|
|
//上传按钮 |
|
|
@ -454,7 +456,7 @@ const MerchantInfo = (props) => { |
|
|
|
//创建商户 |
|
|
|
const createData = () => { |
|
|
|
setCreateVisible(true) |
|
|
|
|
|
|
|
setClearAccount({}) |
|
|
|
systemForm.setFieldsValue( |
|
|
|
{ |
|
|
|
tenantName: '', |
|
|
@ -481,6 +483,48 @@ const MerchantInfo = (props) => { |
|
|
|
bank_num: '' |
|
|
|
} |
|
|
|
) |
|
|
|
clearForm.setFieldsValue( |
|
|
|
{ |
|
|
|
pay_type: null |
|
|
|
} |
|
|
|
) |
|
|
|
qingdaoFrom.setFieldsValue({ |
|
|
|
sort_percent: "", |
|
|
|
sort_cycle: "", |
|
|
|
sell_rate: "", |
|
|
|
charge_type: null, |
|
|
|
sell_cycle: "" |
|
|
|
}) |
|
|
|
weiPayFrom.setFieldsValue({ |
|
|
|
weChat_payid: "", |
|
|
|
weChat_shopid: "", |
|
|
|
wechat_aplkey: "", |
|
|
|
wechat_private_key: "" |
|
|
|
}) |
|
|
|
zhiPayForm.setFieldsValue({ |
|
|
|
zhifubao_payid: "", |
|
|
|
zhifubao_shopid: "", |
|
|
|
zhifubao_private_key: "", |
|
|
|
zhifubao_public_key: "" |
|
|
|
}) |
|
|
|
weiMiniForm.setFieldsValue({ |
|
|
|
wechat_public_payid: "", |
|
|
|
wechat_public_shopid: "", |
|
|
|
wechat_public_aplkey: "", |
|
|
|
wechat_public_private_key: "" |
|
|
|
}) |
|
|
|
zhiMiniForm.setFieldsValue({ |
|
|
|
zhifubao_life_payid: "", |
|
|
|
zhifubao_life_shopid: "", |
|
|
|
zhifubao_life_private_key: "", |
|
|
|
zhifubao_life_public_key: "" |
|
|
|
}) |
|
|
|
weiPayForm2.setFieldsValue({ |
|
|
|
weChat_merchant_account: "" |
|
|
|
}) |
|
|
|
weiMiniForm2.setFieldsValue({ |
|
|
|
wechat_public_account: "" |
|
|
|
}) |
|
|
|
} |
|
|
|
//关闭创建商户-点击取消 |
|
|
|
const createOncancel = () => { |
|
|
@ -510,22 +554,22 @@ const MerchantInfo = (props) => { |
|
|
|
var weiPayFrom2Value = {} |
|
|
|
var weiMiniForm2Value = {} |
|
|
|
//systemForm的处理 |
|
|
|
await systemForm.validateFields().then(async (value) => { |
|
|
|
var start = moment(value.last_time[0]?._d).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
var end = moment(value.last_time[1]?._d).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
const { tenantName, tenantCode, tenantType, businessType } = value |
|
|
|
systemFormValue = { tenantCode, tenantName, tenantType, businessType, start, end } |
|
|
|
}) |
|
|
|
//accountForm的处理 |
|
|
|
await accountForm.validateFields().then(async (value) => { |
|
|
|
const { companyName, city, address, connect_name, connect_phone, email } = value |
|
|
|
accountFormValue = { companyName, city, address, connect_name, connect_phone, email } |
|
|
|
}) |
|
|
|
//businessForm处理 |
|
|
|
await businessForm.validateFields().then(async (value) => { |
|
|
|
const { bank_name, bank_address, bank_num } = value |
|
|
|
businessFormValue = { bank_name, bank_address, bank_num } |
|
|
|
}) |
|
|
|
// await systemForm.validateFields().then(async (value) => { |
|
|
|
// var start = moment(value.last_time[0]?._d).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
// var end = moment(value.last_time[1]?._d).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
// const { tenantName, tenantCode, tenantType, businessType } = value |
|
|
|
// systemFormValue = { tenantCode, tenantName, tenantType, businessType, start, end } |
|
|
|
// }) |
|
|
|
// //accountForm的处理 |
|
|
|
// await accountForm.validateFields().then(async (value) => { |
|
|
|
// const { companyName, city, address, connect_name, connect_phone, email } = value |
|
|
|
// accountFormValue = { companyName, city, address, connect_name, connect_phone, email } |
|
|
|
// }) |
|
|
|
// //businessForm处理 |
|
|
|
// await businessForm.validateFields().then(async (value) => { |
|
|
|
// const { bank_name, bank_address, bank_num } = value |
|
|
|
// businessFormValue = { bank_name, bank_address, bank_num } |
|
|
|
// }) |
|
|
|
//clearForm处理 |
|
|
|
await clearForm.validateFields().then(async (value) => { |
|
|
|
const { pay_type } = value |
|
|
@ -541,47 +585,95 @@ const MerchantInfo = (props) => { |
|
|
|
if (singleVisible) { |
|
|
|
//weipayform的处理 |
|
|
|
await weiPayFrom.validateFields().then(async (value) => { |
|
|
|
const { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } = value |
|
|
|
weiPayFromValue = { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } = value |
|
|
|
weiPayFromValue = { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } |
|
|
|
} else { |
|
|
|
const { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } = clearAccount |
|
|
|
weiPayFromValue = { weChat_payid, weChat_shopid, wechat_aplkey, wechat_private_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
//zhiPayForm的处理 |
|
|
|
await zhiPayForm.validateFields().then(async (value) => { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
} else { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = clearAccount |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
//weiMiniForm的处理 |
|
|
|
await weiMiniForm.validateFields().then(async (value) => { |
|
|
|
const { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } = value |
|
|
|
weiMiniFormValue = { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } = value |
|
|
|
weiMiniFormValue = { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } |
|
|
|
} else { |
|
|
|
const { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } = clearAccount |
|
|
|
weiMiniFormValue = { wechat_public_payid, wechat_public_shopid, wechat_public_aplkey, wechat_public_private_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
//zhiMiniForm的处理 |
|
|
|
await zhiMiniForm.validateFields().then(async (value) => { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiMiniFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } = value |
|
|
|
zhiMiniFormValue = { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } |
|
|
|
} else { |
|
|
|
const { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } = clearAccount |
|
|
|
zhiMiniFormValue = { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
if(JSON.stringify(weiPayFromValue) == "{}") return message.error("App(微信支付)未配置!") |
|
|
|
if(JSON.stringify(zhiPayFormValue) == "{}") return message.error("App(支付宝支付)未配置!") |
|
|
|
if(JSON.stringify(weiMiniFormValue) == "{}") return message.error("微信公众号及小程序未配置!") |
|
|
|
if(JSON.stringify(zhiMiniFormValue) == "{}") return message.error("支付宝生活号及小程序未配置!") |
|
|
|
} |
|
|
|
if (specialVisible) { |
|
|
|
//weiPayform2的处理 |
|
|
|
await weiPayForm2.validateFields().then(async (value) => { |
|
|
|
const { weChat_merchant_account } = value |
|
|
|
weiPayFrom2Value = { weChat_merchant_account } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { weChat_merchant_account } = value |
|
|
|
weiPayFrom2Value = { weChat_merchant_account } |
|
|
|
} else { |
|
|
|
const { weChat_merchant_account } = clearAccount |
|
|
|
weiPayFrom2Value = { weChat_merchant_account } |
|
|
|
} |
|
|
|
}) |
|
|
|
//zhiPayForm的处理 |
|
|
|
await zhiPayForm.validateFields().then(async (value) => { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
} else { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = clearAccount |
|
|
|
zhiPayFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
//weiMiniForm的处理 |
|
|
|
await weiMiniForm2.validateFields().then(async (value) => { |
|
|
|
const { wechat_public_account } = value |
|
|
|
weiMiniForm2Value = { wechat_public_account } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { wechat_public_account } = value |
|
|
|
weiMiniForm2Value = { wechat_public_account } |
|
|
|
} else { |
|
|
|
const { wechat_public_account } = clearAccount |
|
|
|
weiMiniForm2Value = { wechat_public_account } |
|
|
|
} |
|
|
|
}) |
|
|
|
//zhiMiniForm的处理 |
|
|
|
await zhiMiniForm.validateFields().then(async (value) => { |
|
|
|
const { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } = value |
|
|
|
zhiMiniFormValue = { zhifubao_payid, zhifubao_shopid, zhifubao_private_key, zhifubao_public_key } |
|
|
|
if(JSON.stringify(value) != "{}") { |
|
|
|
const { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } = value |
|
|
|
zhiMiniFormValue = { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } |
|
|
|
} else { |
|
|
|
const { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } = clearAccount |
|
|
|
zhiMiniFormValue = { zhifubao_life_payid, zhifubao_life_shopid, zhifubao_life_private_key, zhifubao_life_public_key } |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if(JSON.stringify(weiPayFrom2Value) == "{}") return message.error("App(微信支付)未配置!") |
|
|
|
if(JSON.stringify(zhiPayFormValue) == "{}") return message.error("APP(支付宝支付)未配置!") |
|
|
|
if(JSON.stringify(weiMiniForm2Value) == "{}") return message.error("微信公众号及小程序未配置!") |
|
|
|
if(JSON.stringify(zhiMiniFormValue) == "{}") return message.error("支付宝生活号及小程序未配置!") |
|
|
|
} |
|
|
|
const data = editId ? {...systemFormValue, ...accountFormValue, ...businessFormValue,...clearFormValue, |
|
|
|
...qingdaoFormValue, ...weiPayFromValue, ...zhiPayFormValue, ...weiMiniFormValue, |
|
|
|
...zhiMiniFormValue, ...weiPayFrom2Value, ...weiMiniForm2Value, business_license: imgList, id: editId, uid} |
|
|
@ -657,6 +749,101 @@ const MerchantInfo = (props) => { |
|
|
|
bank_num: res?.data?.bank_num || "" |
|
|
|
} |
|
|
|
) |
|
|
|
clearForm.setFieldsValue({ |
|
|
|
pay_type: res?.data?.pay_type || "" |
|
|
|
}) |
|
|
|
if (res?.data?.pay_type == 1) { |
|
|
|
setQingDaoVisible(true) |
|
|
|
setSpecialVisible(false) |
|
|
|
setSingleVisible(false) |
|
|
|
qingdaoFrom.setFieldsValue({ |
|
|
|
sort_percent: res?.data?.sort_percent || "", |
|
|
|
sort_cycle: res?.data?.sort_cycle || "", |
|
|
|
sell_rate: res?.data?.sell_rate || "", |
|
|
|
charge_type: res?.data?.charge_type || "", |
|
|
|
sell_cycle: res?.data?.sell_cycle || "", |
|
|
|
}) |
|
|
|
} else if (res?.data?.pay_type == 2) { |
|
|
|
setSpecialVisible(true) |
|
|
|
setQingDaoVisible(false) |
|
|
|
setSingleVisible(false) |
|
|
|
weiPayForm2.setFieldsValue({ |
|
|
|
weChat_merchant_account: res?.data?.wechat_merchant_account || "", |
|
|
|
}) |
|
|
|
zhiPayForm.setFieldsValue({ |
|
|
|
zhifubao_payid: res?.data?.zhifubao_payid || "", |
|
|
|
zhifubao_shopid: res?.data?.zhifubao_shopid || "", |
|
|
|
zhifubao_private_key: res?.data?.zhifubao_private_key || "", |
|
|
|
zhifubao_public_key: res?.data?.zhifubao_public_key || "", |
|
|
|
}) |
|
|
|
weiMiniForm2.setFieldsValue({ |
|
|
|
wechat_public_account: res?.data?.wechat_public_account || "", |
|
|
|
}) |
|
|
|
zhiMiniForm.setFieldsValue({ |
|
|
|
zhifubao_life_payid: res?.data?.zhifubao_life_payid || "", |
|
|
|
zhifubao_life_shopid: res?.data?.zhifubao_life_shopid || "", |
|
|
|
zhifubao_life_private_key: res?.data?.zhifubao_life_private_key || "", |
|
|
|
zhifubao_life_public_key: res?.data?.zhifubao_life_public_key || "", |
|
|
|
}) |
|
|
|
setClearAccount({ |
|
|
|
weChat_merchant_account: res?.data?.wechat_merchant_account || "", |
|
|
|
zhifubao_payid: res?.data?.zhifubao_payid || "", |
|
|
|
zhifubao_shopid: res?.data?.zhifubao_shopid || "", |
|
|
|
zhifubao_private_key: res?.data?.zhifubao_private_key || "", |
|
|
|
zhifubao_public_key: res?.data?.zhifubao_public_key || "", |
|
|
|
wechat_public_account: res?.data?.wechat_public_account || "", |
|
|
|
zhifubao_life_payid: res?.data?.zhifubao_life_payid || "", |
|
|
|
zhifubao_life_shopid: res?.data?.zhifubao_life_shopid || "", |
|
|
|
zhifubao_life_private_key: res?.data?.zhifubao_life_private_key || "", |
|
|
|
zhifubao_life_public_key: res?.data?.zhifubao_life_public_key || "" |
|
|
|
}) |
|
|
|
} else if(res?.data?.pay_type == 3) { |
|
|
|
setSingleVisible(true) |
|
|
|
setQingDaoVisible(false) |
|
|
|
setSpecialVisible(false) |
|
|
|
weiPayFrom.setFieldsValue({ |
|
|
|
weChat_payid: res?.data?.wechat_payid || "", |
|
|
|
weChat_shopid: res?.data?.wechat_shopid || "", |
|
|
|
wechat_aplkey: res?.data?.wechat_aplkey || "", |
|
|
|
wechat_private_key: res?.data?.wechat_private_key || "", |
|
|
|
}) |
|
|
|
zhiPayForm.setFieldsValue({ |
|
|
|
zhifubao_payid: res?.data?.zhifubao_payid || "", |
|
|
|
zhifubao_shopid: res?.data?.zhifubao_shopid || "", |
|
|
|
zhifubao_private_key: res?.data?.zhifubao_private_key || "", |
|
|
|
zhifubao_public_key: res?.data?.zhifubao_public_key || "", |
|
|
|
}) |
|
|
|
weiMiniForm.setFieldsValue({ |
|
|
|
wechat_public_payid: res?.data?.wechat_public_payid || "", |
|
|
|
wechat_public_shopid: res?.data?.wechat_public_shopid || "", |
|
|
|
wechat_public_aplkey: res?.data?.wechat_public_aplkey || "", |
|
|
|
wechat_public_private_key: res?.data?.wechat_public_private_key || "", |
|
|
|
}) |
|
|
|
zhiMiniForm.setFieldsValue({ |
|
|
|
zhifubao_life_payid: res?.data?.zhifubao_life_payid || "", |
|
|
|
zhifubao_life_shopid: res?.data?.zhifubao_life_shopid || "", |
|
|
|
zhifubao_life_private_key: res?.data?.zhifubao_life_private_key || "", |
|
|
|
zhifubao_life_public_key: res?.data?.zhifubao_life_public_key || "", |
|
|
|
}) |
|
|
|
setClearAccount({ |
|
|
|
weChat_payid: res?.data?.wechat_payid || "", |
|
|
|
weChat_shopid: res?.data?.wechat_shopid || "", |
|
|
|
wechat_aplkey: res?.data?.wechat_aplkey || "", |
|
|
|
wechat_private_key: res?.data?.wechat_private_key || "", |
|
|
|
zhifubao_payid: res?.data?.zhifubao_payid || "", |
|
|
|
zhifubao_shopid: res?.data?.zhifubao_shopid || "", |
|
|
|
zhifubao_private_key: res?.data?.zhifubao_private_key || "", |
|
|
|
zhifubao_public_key: res?.data?.zhifubao_public_key || "", |
|
|
|
wechat_public_payid: res?.data?.wechat_public_payid || "", |
|
|
|
wechat_public_shopid: res?.data?.wechat_public_shopid || "", |
|
|
|
wechat_public_aplkey: res?.data?.wechat_public_aplkey || "", |
|
|
|
wechat_public_private_key: res?.data?.wechat_public_private_key || "", |
|
|
|
zhifubao_life_payid: res?.data?.zhifubao_life_payid || "", |
|
|
|
zhifubao_life_shopid: res?.data?.zhifubao_life_shopid || "", |
|
|
|
zhifubao_life_private_key: res?.data?.zhifubao_life_private_key || "", |
|
|
|
zhifubao_life_public_key: res?.data?.zhifubao_life_public_key || "", |
|
|
|
}) |
|
|
|
} |
|
|
|
setFileList(res?.data?.business_license? res?.data?.business_license : []) |
|
|
|
setImgList(res?.data?.business_license? res?.data?.business_license : []) |
|
|
|
} else { |
|
|
@ -684,6 +871,74 @@ const MerchantInfo = (props) => { |
|
|
|
err => { console.log(err); } |
|
|
|
) |
|
|
|
} |
|
|
|
// 清结算模块查看按钮 |
|
|
|
const $clearAccountLook = (value, title) => { |
|
|
|
if(value?.pay_type == 2 || value?.pay_type == 3) { |
|
|
|
setClearAccountOpen({modalOpen: true, data: value || {}, title}) |
|
|
|
} |
|
|
|
} |
|
|
|
// 清结算模块查看详情 |
|
|
|
const $clearAccountDetail = (value) => { |
|
|
|
let tem = ""; |
|
|
|
// pay_type 2: 特约商户账户 3: 独立账户 |
|
|
|
// APP微信支付 |
|
|
|
let wxApp = |
|
|
|
value?.data?.pay_type == 2 ? |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.wechat_merchant_account}><span className="item-title">微信子商户号:</span>{value?.data?.wechat_merchant_account || "--"}</div> |
|
|
|
</> |
|
|
|
: |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.wechat_payid}><span className="item-title">微信支付应用ID(开放平台):</span>{value?.data?.wechat_payid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_shopid}><span className="item-title">微信支付商户ID:</span>{value?.data?.wechat_shopid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_aplkey}><span className="item-title">微信支付APL_KEY:</span>{value?.data?.wechat_aplkey || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_private_key}><span className="item-title">微信支付开发者密钥:</span>{value?.data?.wechat_private_key || "--"}</div> |
|
|
|
</>; |
|
|
|
// APP支付宝支付 |
|
|
|
let zfbApp = |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.zhifubao_payid}><span className="item-title">支付宝应用ID:</span>{value?.data?.zhifubao_payid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_shopid}><span className="item-title">支付宝支付商户ID:</span>{value?.data?.zhifubao_shopid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_private_key}><span className="item-title">支付宝支付商户私钥:</span>{value?.data?.zhifubao_private_key || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_public_key}><span className="item-title">支付宝公钥:</span>{value?.data?.zhifubao_public_key || "--"}</div> |
|
|
|
</>; |
|
|
|
// 微信公众号及小程序 |
|
|
|
let wxgxcx = |
|
|
|
value?.data?.pay_type == 2 ? |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.wechat_public_account}><span className="item-title">微信子商户号:</span>{value?.data?.wechat_public_account || "--"}</div> |
|
|
|
</> |
|
|
|
: |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.wechat_public_payid}><span className="item-title">微信支付应用ID(公众平台):</span>{value?.data?.wechat_public_payid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_public_shopid}><span className="item-title">微信支付商户ID:</span>{value?.data?.wechat_public_shopid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_public_aplkey}><span className="item-title">微信支付APL_KEY:</span>{value?.data?.wechat_public_aplkey || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.wechat_public_private_key}><span className="item-title">微信支付开发者密钥:</span>{value?.data?.wechat_public_private_key || "--"}</div> |
|
|
|
</>; |
|
|
|
// 支付宝生活号及小程序 |
|
|
|
let zfuxcx = |
|
|
|
<> |
|
|
|
<div className="item" title={value?.data?.zhifubao_life_payid}><span className="item-title">支付宝应用ID:</span>{value?.data?.zhifubao_life_payid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_life_shopid}><span className="item-title">支付宝支付商户ID:</span>{value?.data?.zhifubao_life_shopid || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_life_private_key}><span className="item-title">支付宝支付商户私钥:</span>{value?.data?.zhifubao_life_private_key || "--"}</div> |
|
|
|
<div className="item" title={value?.data?.zhifubao_life_public_key}><span className="item-title">支付宝公钥:</span>{value?.data?.zhifubao_life_public_key || "--"}</div> |
|
|
|
</>; |
|
|
|
switch (value?.title) { |
|
|
|
case "App(微信支付)": |
|
|
|
tem = wxApp; |
|
|
|
break; |
|
|
|
case "APP(支付宝支付)": |
|
|
|
tem = zfbApp; |
|
|
|
break; |
|
|
|
case "微信公众号及小程序": |
|
|
|
tem = wxgxcx; |
|
|
|
break; |
|
|
|
case "支付宝生活号及小程序": |
|
|
|
tem = zfuxcx; |
|
|
|
break; |
|
|
|
} |
|
|
|
return tem |
|
|
|
} |
|
|
|
//启用/停用 |
|
|
|
function stopBtn(record) { |
|
|
|
ajax.updateStatus({ id: record.id,click_status:record.status==1?2:1, uid }).then( |
|
|
@ -713,12 +968,12 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭微信支付 |
|
|
|
const handleCancelWei = () => { |
|
|
|
setweiVisible(false) |
|
|
|
weiPayFrom.setFieldsValue({ |
|
|
|
weChat_payid: "", |
|
|
|
weChat_shopid: '', |
|
|
|
wechat_aplkey: '', |
|
|
|
wechat_private_key: '' |
|
|
|
}) |
|
|
|
// weiPayFrom.setFieldsValue({ |
|
|
|
// weChat_payid: "", |
|
|
|
// weChat_shopid: '', |
|
|
|
// wechat_aplkey: '', |
|
|
|
// wechat_private_key: '' |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
//支付宝支付modal |
|
|
@ -728,9 +983,9 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭支付宝支付 |
|
|
|
const handleCancelZhi = () => { |
|
|
|
setZhifuVisible(false) |
|
|
|
zhiPayForm.setFieldsValue({ |
|
|
|
zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: '' |
|
|
|
}) |
|
|
|
// zhiPayForm.setFieldsValue({ |
|
|
|
// zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: '' |
|
|
|
// }) |
|
|
|
} |
|
|
|
//微信公众号 |
|
|
|
const showWeiMini = () => { |
|
|
@ -739,7 +994,7 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭微信公众号 |
|
|
|
const handleCancelWeiMini = () => { |
|
|
|
setWeiMiniVisible(false) |
|
|
|
weiMiniForm.setFieldsValue({ wechat_public_payid: "", wechat_public_shopid: '', wechat_public_aplkey: '', wechat_public_private_key: '' }) |
|
|
|
// weiMiniForm.setFieldsValue({ wechat_public_payid: "", wechat_public_shopid: '', wechat_public_aplkey: '', wechat_public_private_key: '' }) |
|
|
|
} |
|
|
|
//支付宝生活号 |
|
|
|
const showZhiMini = () => { |
|
|
@ -748,9 +1003,9 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭支付宝生活号 |
|
|
|
const handleCancelZhiMini = () => { |
|
|
|
setZhiMiniVisible(false) |
|
|
|
zhiMiniForm.setFieldsValue({ |
|
|
|
zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: "" |
|
|
|
}) |
|
|
|
// zhiMiniForm.setFieldsValue({ |
|
|
|
// zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: "" |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
/* 特约账户 2*/ |
|
|
@ -761,7 +1016,7 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭微信支付 |
|
|
|
const handleCancelWei2 = () => { |
|
|
|
setweiVisible2(false) |
|
|
|
weiPayForm2.setFieldsValue({ weChat_merchant_account: "" }) |
|
|
|
// weiPayForm2.setFieldsValue({ weChat_merchant_account: "" }) |
|
|
|
} |
|
|
|
|
|
|
|
//支付宝支付modal |
|
|
@ -771,9 +1026,9 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭支付宝支付 |
|
|
|
const handleCancelZhi2 = () => { |
|
|
|
setZhifuVisible2(false) |
|
|
|
zhiPayForm.setFieldsValue({ |
|
|
|
zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: '' |
|
|
|
}) |
|
|
|
// zhiPayForm.setFieldsValue({ |
|
|
|
// zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: '' |
|
|
|
// }) |
|
|
|
} |
|
|
|
//微信公众号 |
|
|
|
const showWeiMini2 = () => { |
|
|
@ -782,7 +1037,7 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭微信公众号 |
|
|
|
const handleCancelWeiMini2 = () => { |
|
|
|
setWeiMiniVisible2(false) |
|
|
|
weiMiniForm2.setFieldsValue({ wechat_public_account: "" }) |
|
|
|
// weiMiniForm2.setFieldsValue({ wechat_public_account: "" }) |
|
|
|
} |
|
|
|
//支付宝生活号 |
|
|
|
const showZhiMini2 = () => { |
|
|
@ -791,9 +1046,9 @@ const MerchantInfo = (props) => { |
|
|
|
//关闭支付宝生活号 |
|
|
|
const handleCancelZhiMini2 = () => { |
|
|
|
setZhiMiniVisible2(false) |
|
|
|
zhiMiniForm.setFieldsValue({ |
|
|
|
zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: "" |
|
|
|
}) |
|
|
|
// zhiMiniForm.setFieldsValue({ |
|
|
|
// zhifubao_payid: "", zhifubao_shopid: '', zhifubao_private_key: '', zhifubao_public_key: "" |
|
|
|
// }) |
|
|
|
} |
|
|
|
|
|
|
|
//保存modal的值 |
|
|
@ -1394,7 +1649,7 @@ const MerchantInfo = (props) => { |
|
|
|
options={CHARGE_TYPE} |
|
|
|
// className="select" |
|
|
|
placeholder="请选择" |
|
|
|
className="form-item" |
|
|
|
className="form-item charge-type-sel" |
|
|
|
> |
|
|
|
</Select> |
|
|
|
</Form.Item> |
|
|
@ -2051,21 +2306,32 @@ const MerchantInfo = (props) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* <div className="clearInformation"> |
|
|
|
<div className="clearInformation"> |
|
|
|
<div className="title"><span>清结算信息</span></div> |
|
|
|
<div className="clear"> |
|
|
|
<div className="clear-wrap"> |
|
|
|
<div className="item"><span className="item-title">支付收款账户:</span>{records.pay_type}</div> |
|
|
|
<div className="item"><div className="item-title">清分比例(%):</div><span>{records.sort_percent}</span></div> |
|
|
|
<div className="item"><div className="item-title">清分周期(T):</div><span>{records.sort_cycle}</span></div> |
|
|
|
<div className="item"><div className="item-title">结算费率(%):</div>{records.sell_rate}</div> |
|
|
|
<div className="item"><div className="item-title">手续费承担方:</div>{records.charge_type}</div> |
|
|
|
<div className="item"><div className="item-title">结算周期(T):</div>{records.sell_cycle}</div> |
|
|
|
<div className="item"><span className="item-title">支付收款账户:</span>{records.pay_type == 1 ? PAY[0].label : records.pay_type == 2 ? PAY[1].label : records.pay_type == 3 ? PAY[2].label : "暂无"}</div> |
|
|
|
{ records.pay_type == 1 ? |
|
|
|
<> |
|
|
|
<div className="item"><div className="item-title">清分比例(%):</div><span>{records.sort_percent}</span></div> |
|
|
|
<div className="item"><div className="item-title">清分周期(T):</div><span>{records.sort_cycle}</span></div> |
|
|
|
<div className="item"><div className="item-title">结算费率(%):</div>{records.sell_rate}</div> |
|
|
|
<div className="item"><div className="item-title">手续费承担方:</div>{records.charge_type}</div> |
|
|
|
<div className="item"><div className="item-title">结算周期(T):</div>{records.sell_cycle}</div> |
|
|
|
</> |
|
|
|
: |
|
|
|
records.pay_type == 2 || records.pay_type == 3 ? |
|
|
|
<> |
|
|
|
<div className="item"><div className="item-title">App(微信支付):</div><span className="on-click-look" onClick={()=> $clearAccountLook(records, "App(微信支付)")}>查看</span></div> |
|
|
|
<div className="item"><div className="item-title">APP(支付宝支付):</div><span className="on-click-look" onClick={()=> $clearAccountLook(records, "APP(支付宝支付)")}>查看</span></div> |
|
|
|
<div className="item"><div className="item-title">微信公众号及小程序:</div><span className="on-click-look" onClick={()=> $clearAccountLook(records, "微信公众号及小程序")}>查看</span></div> |
|
|
|
<div className="item"><div className="item-title">支付宝生活号及小程序:</div><span className="on-click-look" onClick={()=> $clearAccountLook(records, "支付宝生活号及小程序")}>查看</span></div> |
|
|
|
</> |
|
|
|
: null |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> */} |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="operationInformation"> |
|
|
|
<div className="title"><span>操作信息</span></div> |
|
|
@ -2084,7 +2350,18 @@ const MerchantInfo = (props) => { |
|
|
|
</div> |
|
|
|
: '' |
|
|
|
} |
|
|
|
|
|
|
|
<Modal |
|
|
|
className="clear-account-open" |
|
|
|
title={clearAccountOpen?.title} |
|
|
|
open={clearAccountOpen.modalOpen} |
|
|
|
onCancel={() => {setClearAccountOpen({modalOpen: false, data: {}, title: ""})}} |
|
|
|
width={600} |
|
|
|
footer={null} |
|
|
|
> |
|
|
|
<div className="content"> |
|
|
|
{$clearAccountDetail(clearAccountOpen)} |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|