🔀 merge: 合并分支

This commit is contained in:
wangsongsole 2024-02-28 09:40:49 +08:00
commit ca9c35ac1e
2 changed files with 12 additions and 7 deletions

View File

@ -137,9 +137,11 @@ const UseProductPop = forwardRef((props, ref) => {
setState({ loading: true }) setState({ loading: true })
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (directResellerId) { if (directResellerId) {
/* 京东E卡 */
const is_e_card = model.product_type === 3
let param = { let param = {
reseller_id: directResellerId, reseller_id: directResellerId,
type: model.product_type type: is_e_card ? 1 : model.product_type
} }
getProductInfoSelect(param).then((res) => { getProductInfoSelect(param).then((res) => {
handelResponse( handelResponse(
@ -184,7 +186,7 @@ const UseProductPop = forwardRef((props, ref) => {
product_id: productData.product_id, product_id: productData.product_id,
account_type: productData.account_type, account_type: productData.account_type,
map_product_name: productData.map_product_name, map_product_name: productData.map_product_name,
product_type: model.product_type, product_type: productData.is_e_card ? 3 : model.product_type,
card_show: Number(productData.card_show), card_show: Number(productData.card_show),
code_batch_id: productData.code_batch_id, code_batch_id: productData.code_batch_id,
end_time: productData.end_time, end_time: productData.end_time,
@ -249,9 +251,12 @@ const UseProductPop = forwardRef((props, ref) => {
} }
// //
const getFormModel = () => { const getFormModel = () => {
/* 京东E卡 */
const is_e_card = model.product_type === 3
return { return {
product_id: model.product_id, product_id: model.product_id,
product_type: model.product_type, product_type: is_e_card ? 1 : model.product_type,
is_e_card: Number(is_e_card),
product_name: model.product_name, product_name: model.product_name,
contract_price: model.contract_price, contract_price: model.contract_price,
cost_price: model.cost_price, cost_price: model.cost_price,
@ -506,6 +511,7 @@ const UseProductPop = forwardRef((props, ref) => {
> >
<RadioButton value={1}>直充</RadioButton> <RadioButton value={1}>直充</RadioButton>
<RadioButton value={2}>卡密</RadioButton> <RadioButton value={2}>卡密</RadioButton>
<RadioButton value={3}>京东E卡</RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
{model.product_type === 2 ? ( {model.product_type === 2 ? (

View File

@ -31,7 +31,7 @@ export default function Merchant() {
app_id: [{ type: "required", message: "请输入应用ID" }], app_id: [{ type: "required", message: "请输入应用ID" }],
pos_id: [{ type: "required", message: "请输入平台ID" }], pos_id: [{ type: "required", message: "请输入平台ID" }],
store_id: [{ type: "required", message: "请输入店铺ID" }], store_id: [{ type: "required", message: "请输入店铺ID" }],
secret_key: [{ type: "required", message: "请输入偏移量" }], secret_key: [{ type: "required", message: "请输入SM4秘钥" }],
merchant_public_key: [{ type: "required", message: "请输入商户公钥" }], merchant_public_key: [{ type: "required", message: "请输入商户公钥" }],
notify_url: [ notify_url: [
{ type: "required", message: "请输入商户回调通知网关地址" }, { type: "required", message: "请输入商户回调通知网关地址" },
@ -147,15 +147,14 @@ export default function Merchant() {
</FormItem> </FormItem>
) : null} ) : null}
{state.api_mode === 2 ? ( {state.api_mode === 2 ? (
<FormItem labelname="偏移量" prop="secret_key"> <FormItem labelname="SM4秘钥" prop="secret_key">
<Ipt <Ipt
onChange={(value) => setState({ ...state, secret_key: value })} onChange={(value) => setState({ ...state, secret_key: value })}
onClearItem={() => setState({ ...state, secret_key: "" })} onClearItem={() => setState({ ...state, secret_key: "" })}
countShow={false} countShow={false}
value={state.secret_key} value={state.secret_key}
placeholder={"请输入偏移量"} placeholder={"请输入SM4秘钥"}
labelWidth={"0px"} labelWidth={"0px"}
maxLength={20}
height={"36px"} height={"36px"}
width={"520px"} width={"520px"}
alignment={"left"} alignment={"left"}