Commit 0e5da2d6 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents a9d766ac bc03c580
......@@ -287,6 +287,7 @@ export default {
'purchaseOrder.yizhifu': '已支付',
'purchaseOrder.dingdanhao': '订单号',
'purchaseOrder.dingdanzhaiyao': '订单摘要/下单时间',
'purchaseOrder.dingdandingdandigest': '订单摘要',
'purchaseOrder.gongyinghuiyuan': '供应会员',
'purchaseOrder.zongjineyizhifu': '总金额/已支付(元)',
'purchaseOrder.dingdanleixing': '订单类型',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -542,6 +542,8 @@ export default {
'detail.purchase.label51': '操作角色',
'detail.purchase.label52': '操作时间',
'schma.purchase.purchaseType.help': '采购类型',
'schma.purchase.purchaseType.help.text': '有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购',
'schma.purchase.orderNo': '请输入订单编号',
'schma.purchase.orderThe': '请输入订单摘要',
'schma.purchase.supplyMembersName': '请输入供应会员名称',
......@@ -974,4 +976,5 @@ export default {
'table.purchase.zhongbiaoshuliang': '中标数量',
'table.purchase.duiying': '对应',
'table.purchase.zhi': '至',
}
......@@ -79,7 +79,7 @@ const ExchangePrReceived: React.FC = () => {
align: 'center',
render: (text, record) => (
<Link
to={`/memberCenter/afterService/exchangeManage/exchangePrAddWarehousing/warehousingDetail?id=${record.deliveryId}`}
to={`/memberCenter/afterService/exchangeManage/exchangePrAddWarehousing/warehousingDetail?id=${record.returnStorageId}`}
>
{text}
</Link>
......
......@@ -47,8 +47,11 @@ const AccountDetail: React.FC<{}> = () => {
//timer
const [openTimer, setOpenTimer] = useState(0); // timer
useEffect(() => {
console.log(openTimer)
if(openTimer === 1) runTimerJump()
if(openTimer === 1) {
runTimerJump()
} else {
clearInterval(timeChange)
}
}, [openTimer])
const runTimerJump = () => {
timeChange = setInterval(() => pollPayResult(), 3000)
......@@ -230,7 +233,7 @@ const AccountDetail: React.FC<{}> = () => {
setScanVisible(false)
getAccountInfo()
refTrade.current.reload()
clearInterval(timeChange)
setOpenTimer(0)
}
return (
......
......@@ -141,17 +141,16 @@ export const rechargeSchema: ISchema = {
type: "array:number",
"x-component": 'CardCheckBox',
"x-component-props": {
dataSource: [
// {id: 1, name: '支付宝', logoUrl: alipay},
{ id: 2, name: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type.dataSource.2' }), logoUrl: wxpay }
],
dataSource: [],
// {id: 1, name: '支付宝', logoUrl: alipay},
// { id: 2, name: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type.dataSource.2' }), logoUrl: wxpay }
type: 'radio' // CardCheckBox 单选模式
},
"title": intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type' }),
"x-rules": [
{
required: true,
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.typemessage' })
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.schema.rechargeSchema.type.message' })
}
],
}
......
......@@ -5,7 +5,7 @@ import MellowCard from '@/components/MellowCard';
import { BIND_PHONE, EDetailContext, formItemLayout, formItemLayoutCompany, prefixSelector, prefixSelectorEle, tailFormItemLayout, tailFormItemLayoutCompany } from '../../constant';
import { EditOutlined } from '@ant-design/icons';
import UploadImage from '@/components/UploadImage';
import { postPayAllInPayBindCompanyAccount, postPayAllInPayBindPhone, postPayAllInPayIdCardCollect, postPayAllInPaySendVerificationCode, postPayAllInPaySetCompanyInfo, postPayAllInPaySignContract } from '@/services/PayV2Api';
import { getPayAllInPayGetBankList, postPayAllInPayBindCompanyAccount, postPayAllInPayBindPhone, postPayAllInPayIdCardCollect, postPayAllInPaySendVerificationCode, postPayAllInPaySetCompanyInfo, postPayAllInPaySignContract } from '@/services/PayV2Api';
import useCountDown from '@/utils/hooks';
/** 图片key对应的picType值 */
......@@ -35,6 +35,11 @@ const Company: React.FC<{}> = () => {
const [idCardBehindImg, setIdCardBehindImg] = useState<string>()
const [certificateImg, setCertificateImg] = useState<string>()
const [loading, setLoading] = useState<boolean>(false)
const [bankLists, setBankLists] = useState([])
useEffect(() => {
getPayAllInPayGetBankList().then(({data = []}) => setBankLists(data))
}, [])
useEffect(() => {
if(data.step === 3) {
......@@ -79,13 +84,20 @@ const Company: React.FC<{}> = () => {
}
const onFinishCard = (values) => {
setLoading(true)
const pictures = Object.keys(values).map(item => ({
picType: PicType[item],
picture: values[item]
}))
const fns = pictures.map(item => postPayAllInPayIdCardCollect(item))
const fns = pictures.map((item, index) => new Promise(() => {
setTimeout(() => postPayAllInPayIdCardCollect(item), 500 * index)
}))
Promise.all(fns).then(res => {
console.log(res)
}).finally(() => {
setLoading(false)
reloadFormData()
})
}
......@@ -181,7 +193,22 @@ const Company: React.FC<{}> = () => {
},
]}
>
<Input placeholder={intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.1.bank.placeholder' })} />
{/* <Input placeholder={intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.1.bank.placeholder' })} /> */}
<Select
showSearch
optionFilterProp="label"
placeholder={intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.1.bank.placeholder' })}
filterOption={(input, option) =>
option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
filterSort={(optionA, optionB) =>
optionA.value.toLowerCase().localeCompare(optionB.value.toLowerCase())
}
>
{
bankLists.map(item => <Option key={item.id} value={item.name}>{item.name}</Option>)
}
</Select>
</Form.Item>
</Col>
</Row>
......
import React, { useContext, useState } from 'react'
import { Button, Col, Form, Input, message, Row, Select } from 'antd'
import MellowCard from '@/components/MellowCard';
import { BIND_PHONE, EDetailContext, fetchTelCode, formItemLayout, prefixSelector, prefixSelectorEle, tailFormItemLayout } from '../../constant';
import { BIND_PHONE, EDetailContext, formItemLayout, prefixSelectorEle, tailFormItemLayout } from '../../constant';
import useCountDown from '@/utils/hooks';
import { PATTERN_MAPS } from '@/constants/regExp';
import { postPayAllInPayBindPhone, postPayAllInPayPersonalCrate, postPayAllInPaySendVerificationCode, postPayAllInPaySetRealName } from '@/services/PayV2Api';
import { postPayAllInPayPersonalCrate, postPayAllInPaySendVerificationCode } from '@/services/PayV2Api';
import { useIntl } from 'umi';
/** 个人 初始认证 */
......@@ -18,28 +18,13 @@ const Personal: React.FC<{}> = () => {
const onFinish = async (values: any) => {
setLoading(true)
// // 绑定手机
// const p1 = await postPayAllInPayBindPhone({phone: values.phone, verificationCode: values.captcha}, {ctlType: 'none'})
// // 实名认证
// const p2 = await postPayAllInPaySetRealName({name: values.name, cardType: values.cardType, cardNo: values.cardNo, phone: values.phone}, {ctlType:'none'})
// 提交
const { code } = await postPayAllInPayPersonalCrate({...values}, { ctlType: "none" })
const { code } = await postPayAllInPayPersonalCrate({...values, verificationCodeType: BIND_PHONE}, { ctlType: "none" })
if(code === 1000) {
reloadFormData()
message.success('操作成功')
message.success(intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.caozuochenggong', defaultMessage: '操作成功' }))
} else {
setLoading(false)
}
// Promise.all([p1, p2, p3]).then(res => {
// if(res.every(item => item['code'] === 1000)) {
// reloadFormData()
// message.success('操作成功')
// } else {
// message.error('接口请求异常')
// }
// setLoading(false)
// })
}
const { text, isActive, start } = useCountDown({
......@@ -142,17 +127,17 @@ const Personal: React.FC<{}> = () => {
<Row gutter={8}>
<Col span={20}>
<Form.Item
name="captcha"
name="verificationCode"
noStyle
rules={[
{
required: true,
message: intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.personal.captcha.message' })
},
{
pattern: /^\d{5}$/,
message: intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.personal.captcha.message' })
}
// {
// pattern: /^\d{5}$/,
// message: intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.personal.captcha.message' })
// }
]}
>
<Input placeholder={intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.personal.captcha.placeholder' })} />
......@@ -166,7 +151,7 @@ const Personal: React.FC<{}> = () => {
<Form.Item {...tailFormItemLayout}>
<Button type="primary" htmlType="submit" loading={loading}>
提交
{intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.tijiao', defaultMessage: '提交' })}
</Button>
</Form.Item>
</Form>
......
import React, { useEffect, useRef, useState } from 'react'
import { Row, Input, Col, Button, Result, message, Modal } from 'antd';
import { useState } from 'react'
import { useIntl } from 'umi'
import { Row, Input, Col, Button, } from 'antd';
import useCountDown from '@/utils/hooks';
import { postPayAllInPaySendVerificationCode } from '@/services/PayV2Api';
import { UNBIND_PHONE } from '../../constant';
/**
* e账户认证 发送短信验证码
......@@ -11,13 +11,14 @@ import { UNBIND_PHONE } from '../../constant';
*/
const PhoneCode = (props) => {
const intl = useIntl()
const { value, form, schema } = props
const [loading, setLoading] = useState(false)
const {text, isActive, start} = useCountDown({
maxTime: 60,
minTime: 0,
initText: '获取验证码',
initText: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.huoquyanzhengma', defaultMessage: '获取验证码' }),
onEnd: () => {
setLoading(false)
},
......
......@@ -8,21 +8,31 @@ import { useCallback, useState, useEffect } from 'react'
*/
export const MEMBER_TYPE_CORPORATE = 1;
/**
* 个人会员
* 企业个人会员
*/
export const MEMBER_TYPE_INDIVIDUAL = 2;
export const MEMBER_TYPE_CORPORATEPERSONAL = 2;
/**
* 渠道会员
*/
export const MEMBER_TYPE_CHANNEL = 3;
/**
* 渠道个人会员
*/
export const MEMBER_TYPE_CHANNELPERSONAL = 4;
export const MEMBER_TYPE = {
[MEMBER_TYPE_CORPORATE]: 'company',
[MEMBER_TYPE_INDIVIDUAL]: 'personal',
[MEMBER_TYPE_CHANNEL]: 'company',
[MEMBER_TYPE_CORPORATEPERSONAL]: 'personal',
[MEMBER_TYPE_CHANNELPERSONAL]: 'personal',
};
export const useEDetail = () => {
const { memberRoleType } = getAuth() || {}
/** 详情数据 null从未认证 undefined接口数据还没加载 */
const { memberType } = getAuth() || {}
/** 详情数据 */
const [formData, setFormData] = useState<PostPayAllInPayGetMemberInfoResponse>(undefined)
/** 企业/个人 */
const [type, setType] = useState<'company'|'personal'>(MEMBER_TYPE[memberRoleType])
const [type, setType] = useState<'company'|'personal'>(MEMBER_TYPE[memberType])
/** 是否需要完善 */
const [perfection, setPerfection] = useState<boolean>(false)
/** 是否完善过 */
......@@ -39,7 +49,8 @@ export const useEDetail = () => {
const reloadFormData = useCallback(async () => {
const { code, data, message: msg } = await postPayAllInPayGetMemberInfo({}, {ctlType: 'none'})
if (code === 1000) {
!data && await postPayAllInPayCreateMember({}, {ctlType: 'none'})
// 企业未设置信息0 或者 个人未提交
((type === "company" && data.step === 0) || (type === "personal" && data.isSubmit === 2)) && await postPayAllInPayCreateMember({}, {ctlType: 'none'})
setFormData(data)
} else {
message.error(msg)
......
......@@ -20,7 +20,7 @@ const EAccountApprove: React.FC<{}> = () => {
backed,
ctl,
data } = formContext
console.log(data, 'data')
const personalLinkList = [
{ title: intl.formatMessage({ id: 'payandSettle.eAccountApprove.personalLinkList.1' }), id: 'personalInfo' },
{ title: intl.formatMessage({ id: 'payandSettle.eAccountApprove.personalLinkList.2' }), id: 'accountInfo' },
......@@ -53,7 +53,7 @@ const EAccountApprove: React.FC<{}> = () => {
<div>
<EDetailContext.Provider value={formContext}>
<EDetailHeader
title="通联账户"
title={intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.tonglianzhanghu', defaultMessage: '通联账户' })}
anchorList={renderAnchorList()}
backLink={backed ? handleBack : false}
/>
......
import { PATTERN_MAPS } from "@/constants/regExp";
import { getIntl } from 'umi'
const intl = getIntl()
export const bindSchema = {
type: 'object',
......@@ -15,7 +18,7 @@ export const bindSchema = {
"x-component": 'mega-layout',
"x-component-props": {
grid: true,
label: '手机号',
label: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.shoujihao', defaultMessage: '手机号' }),
columns: 6,
enableSafeWidth: false,
className: 'noMarbottom',
......@@ -34,7 +37,7 @@ export const bindSchema = {
"x-rules": [
{
required: true,
message: '请选择区号'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingxuanzequhao', defaultMessage: '请选择区号' })
}
]
},
......@@ -46,15 +49,15 @@ export const bindSchema = {
"x-rules": [
{
pattern: PATTERN_MAPS.phone,
message: '请输入正确的手机号'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshuruzhengque', defaultMessage: '请输入正确的手机号' })
},
{
required: true,
message: '请输入手机号'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshurushouji', defaultMessage: '请输入手机号' })
}
],
"x-component-props": {
placeholder: '输入你的手机号码',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.shurunideshou', defaultMessage: '输入你的手机号码' }),
style: { width: '100%' }
}
}
......@@ -66,7 +69,7 @@ export const bindSchema = {
"x-rules": [
{
required: true,
message: '请填写验证码'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingtianxieyanzheng', defaultMessage: '请填写验证码' })
},
// {
// pattern: /^\d{6}$/,
......@@ -76,7 +79,7 @@ export const bindSchema = {
"x-component-props": {
btnSize: 'middle',
inputSize: 'middle',
placeholder: '请输入短信验证码',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshuruduanxin', defaultMessage: '请输入短信验证码' }),
type: null
}
},
......@@ -116,15 +119,15 @@ export const unbindSchema = {
"x-rules": [
{
pattern: PATTERN_MAPS.phone,
message: '请输入正确的手机号'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshuruzhengque', defaultMessage: '请输入正确的手机号' })
},
{
required: true,
message: '请输入手机号'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshurushouji', defaultMessage: '请输入手机号' })
}
],
"x-component-props": {
placeholder: '输入你的手机号码',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.shurunideshou', defaultMessage: '输入你的手机号码' }),
style: { width: '100%' }
}
}
......@@ -136,7 +139,7 @@ export const unbindSchema = {
"x-rules": [
{
required: true,
message: '请填写验证码'
message: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingtianxieyanzheng', defaultMessage: '请填写验证码' })
},
// {
// pattern: /^\d{6}$/,
......@@ -146,7 +149,7 @@ export const unbindSchema = {
"x-component-props": {
btnSize: 'middle',
inputSize: 'middle',
placeholder: '请输入短信验证码',
placeholder: intl.formatMessage({ id: 'payandSettle.capitalAccounts.eAccount.qingshuruduanxin', defaultMessage: '请输入短信验证码' }),
type: null
}
},
......
......@@ -79,7 +79,7 @@ const basicInfo: ISchema = {
type: 'string',
required: true,
enum: Object.values(PURCHASE_TYPE).map((item, index) => ({ label: item, value: ++index })),
title: '{{help(`"采购类型", "有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购"`)}}',
title: `{{help('${getIntl().formatMessage({ id: 'schma.purchase.purchaseType.help', defaultMessage: '采购类型' })}', '${getIntl().formatMessage({ id: 'schma.purchase.purchaseType.help.text', defaultMessage: "有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购" })}')}}`,
"x-component-props": {
placeholder: intl.formatMessage({ id: 'schma.purchase.purchaseType' }),
}
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getIntl } from 'umi';
const intl = getIntl();
export const tableListSchema: ISchema = {
type: 'object',
......
......@@ -36,7 +36,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
const { data, payList, currentPayInfoId } = useContext(OrderDetailContext)
const [visible, setVisible] = useState(false)
const [checked, setChecked] = useState<any>({})
const [current, setCurrent] = useState(0) // 0选择方式 1线下支付方式 2授信支付 3余额支付 4微信支付 5货到付款 6支付宝 100账期 101月结 1000清除
const [current, setCurrent] = useState(0) // 0选择方式 1线下支付方式 2授信支付 3余额支付 4微信支付 5货到付款 6支付宝 9账期 8月结 99通联 1000清除
const [payStep, setPayStep] = useState(0) // 支付模态框的步骤 0选方式 1下一步的具体操作 2输入支付密码
const mobilePayFlag = useRef(0) // 用于判断移动支付类型 4微信6支付宝
const [qrLoading, setQrLoading] = useState(false)
......@@ -208,20 +208,25 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
setPayStep(1)
setQrLoading(true)
handleSubmitPay()
} else if(checked.id === 100) {
console.log(intl.formatMessage({id: 'transaction_components.xuanzeliaozhangqijiesuanmo'}))
} else if(checked.id === 9) {
console.log('选择了账期结算模式')
mobilePayFlag.current = 0
setCurrent(100)
setCurrent(9)
setPayStep(1)
} else if(checked.id === 101) {
console.log(intl.formatMessage({id: 'transaction_components.xuanzeleyuejiejiesuanmo'}))
} else if(checked.id === 8) {
console.log('选择了月结结算模式')
mobilePayFlag.current = 0
setCurrent(101)
setCurrent(8)
setPayStep(1)
} else if(checked.id === 11 || checked.id === 12 || checked.id === 13 || checked.id === 14) {
console.log('选择了通联模式')
mobilePayFlag.current = 0
setCurrent(99)
setPayStep(1)
}
else {
message.error(intl.formatMessage({id: 'transaction_components.zanzhizhichixianxiazhifu'}))
}
// else {
// message.error('暂只支持线下支付、授信额度支付、余额支付、货到付款、微信、支付宝、账期月结支付方式')
// }
} else {
message.error(intl.formatMessage({id: 'transaction_components.qingxianxuanzezhifufangshi'}))
}
......@@ -260,13 +265,17 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
} else if(current === 5) {
// 开始提交货到付款数据
handleSubmitPay()
} else if(current === 100) {
} else if(current === 9) {
// 开始提交账期结算数据
// @todo 与后端联调传参
handleSubmitPay()
} else if(current === 101) {
} else if(current === 8) {
// 开始提交月结结算数据
// @todo 与后端联调传参
handleSubmitPay()
} else if(current === 4 || current === 6) {
// 微信 支付宝 提示扫码支付
return message.info('请扫码完成支付')
} else if(current === 99) {
// 提交通联支付
handleSubmitPay()
}
......@@ -484,7 +493,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.bencixuzhifuyuan'})}
</span>
<span className={cx(style.amount, style.amount2)}>
{/* {data?.payments?.filter(item => item.paymentId === Number(currentPayInfoId))[0]?.payAmount?.toFixed(2)} */}
{Number(paymentAmount).toFixed(2)}
</span>
</p>
......@@ -508,7 +516,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.bencixuzhifuyuan'})}
</span>
<span className={cx(style.amount, style.amount2)}>
{/* {data?.payments?.filter(item => item.paymentId === Number(currentPayInfoId))[0]?.payAmount?.toFixed(2)} */}
{Number(paymentAmount).toFixed(2)}
</span>
</p>
......@@ -532,7 +539,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.zhifujineyuan'})}
</span>
<span className={cx(style.amount, style.amount2)}>
{/* {data?.payments?.filter(item => item.paymentId === Number(currentPayInfoId))[0]?.payAmount?.toFixed(2)} */}
{Number(paymentAmount).toFixed(2)}
</span>
</p>
......@@ -604,7 +610,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
{/* 账期结算 */}
{
current === 100 &&
current === 9 &&
<div>
<p style={{fontWeight: "bold"}}>{intl.formatMessage({id: 'transaction_components.zhangqizhifuqueren'})}</p>
<p>
......@@ -620,7 +626,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.zhifuqudao'})}
</span>
<span className={style.amount}>
{/* {transformPayList['5'][0]['label']} */}
{checked?.channel}
</span>
</p>
<p>
......@@ -628,7 +634,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.zhifujineyuan'})}
</span>
<span className={cx(style.amount, style.amount2)}>
{/* {data?.payments?.filter(item => item.paymentId === Number(currentPayInfoId))[0]?.payAmount?.toFixed(2)} */}
{Number(paymentAmount).toFixed(2)}
</span>
</p>
......@@ -636,7 +641,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
{/* 月结结算 */}
{
current === 101 &&
current === 8 &&
<div>
<p style={{fontWeight: "bold"}}>{intl.formatMessage({id: 'transaction_components.yuejiezhifuqueren'})}</p>
<p>
......@@ -652,7 +657,38 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.zhifuqudao'})}
</span>
<span className={style.amount}>
{/* {transformPayList['6'][0]['label']} */}
{checked?.channel}
</span>
</p>
<p>
<span className={style.title}>
支付金额(元):
</span>
<span className={cx(style.amount, style.amount2)}>
{Number(paymentAmount).toFixed(2)}
</span>
</p>
</div>
}
{/* 通联 */}
{
current === 99 &&
<div>
<p style={{fontWeight: "bold"}}>通联支付确认</p>
<p>
<span className={style.title}>
支付方式:
</span>
<span className={style.amount}>
通联支付
</span>
</p>
<p>
<span className={style.title}>
支付渠道:
</span>
<span className={style.amount}>
{checked?.channel}
</span>
</p>
<p>
......@@ -660,7 +696,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
{intl.formatMessage({id: 'transaction_components.zhifujineyuan'})}
</span>
<span className={cx(style.amount, style.amount2)}>
{/* {data?.payments?.filter(item => item.paymentId === Number(currentPayInfoId))[0]?.payAmount?.toFixed(2)} */}
{Number(paymentAmount).toFixed(2)}
</span>
</p>
......
......@@ -50,7 +50,7 @@ export const baseOrderListColumns: any = () => {
fixed: 'left',
},
{
title: intl.formatMessage({ id: 'purchaseOrder.dingdanzhaiyao', defaultMessage: '订单摘要' }),
title: intl.formatMessage({ id: 'purchaseOrder.dingdandigest', defaultMessage: '订单摘要' }),
align: 'center',
dataIndex: 'digest',
key: 'digest',
......
......@@ -116,7 +116,12 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
payForm.setFieldsValue({'payChart': `${window.location.origin}/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/detail?id=${currentPayRef.current.orderId}`})
} else if(payModel === "app") {
// 生成二维码
QRCode.toDataURL(JSON.stringify({path: 'MycommodityDetails', orderId: currentPayRef.current.orderId})).then((url:any) => {
QRCode.toDataURL(JSON.stringify({
path: 'MycommodityDetails',
orderId: currentPayRef.current.orderId,
buyerMemberId: currentPayRef.current.buyerMemberId,
buyerRoleId: currentPayRef.current.buyerRoleId
})).then((url:any) => {
setQrCode(url)
}).catch((err:any) => {
console.error(err)
......@@ -193,9 +198,6 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
// 转单调接口逻辑
const handelTransformOrder = async (defaultRoleId, orderId?) => {
if(!serversRoles.length) {
return message.error(intl.formatMessage({ id: 'saleOrder.dangqiandengluhui', defaultMessage: '当前登录会员,无服务消费者角色,无法进行转单' }))
}
orderIds.current = selectRef.current.length ? selectRef.current : (orderId ? [orderId] : []);
if(orderId) {
const { code, data } = await postOrderVendorTransferPreview({
......@@ -228,12 +230,18 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
// 单个转单 传入默认第一个角色
const onlyTransform = (orderId) => {
if(!serversRoles.length) {
return message.error(intl.formatMessage({ id: 'saleOrder.dangqiandengluhui', defaultMessage: '当前登录会员,无服务消费者角色,无法进行转单' }))
}
handelTransformOrder(serversRoles[0]['memberRoleId'], orderId)
transformActions.setFieldValue('orderId', orderId)
}
// 批量转
const batchTransform = () => {
if(!serversRoles.length) {
return message.error(intl.formatMessage({ id: 'saleOrder.dangqiandengluhui', defaultMessage: '当前登录会员,无服务消费者角色,无法进行转单' }))
}
handelTransformOrder(serversRoles[0]['memberRoleId'])
transformActions.setFieldValue('orderId', null)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment