绑定手机号
This commit is contained in:
parent
95e4ad9c4c
commit
1ae1f7b1f6
@ -75,6 +75,13 @@ export default function AiShopDetail(props: any) {
|
|||||||
reloadUser(messageApi, globalDispatchContext).then(() => {
|
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||||
messageApi.success('扣款成功');
|
messageApi.success('扣款成功');
|
||||||
});
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
setBuyTipsModal(false)
|
||||||
|
props.closeModal()
|
||||||
|
props.upData()
|
||||||
|
}, 1000)
|
||||||
|
// props.closeModal()
|
||||||
|
// props.upData()
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
@ -329,7 +336,7 @@ export default function AiShopDetail(props: any) {
|
|||||||
// alert(props.orderId)
|
// alert(props.orderId)
|
||||||
if (props.orderId) {
|
if (props.orderId) {
|
||||||
confirmPaymentFun(props.orderId)
|
confirmPaymentFun(props.orderId)
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
createOrderFun(goodsId)
|
createOrderFun(goodsId)
|
||||||
|
@ -70,6 +70,7 @@ export default function OrderDetailModal(props: any) {
|
|||||||
idcardType: '',//证件类型
|
idcardType: '',//证件类型
|
||||||
idcard: '',//证件号码
|
idcard: '',//证件号码
|
||||||
})
|
})
|
||||||
|
// const [waitCorrectionCount, setWaitCorrectionCount] = useState(0) //待补充资料
|
||||||
// tab栏 标题数组
|
// tab栏 标题数组
|
||||||
const tapTitleArray = [
|
const tapTitleArray = [
|
||||||
{
|
{
|
||||||
@ -98,7 +99,13 @@ export default function OrderDetailModal(props: any) {
|
|||||||
}
|
}
|
||||||
: {}
|
: {}
|
||||||
),
|
),
|
||||||
|
// (waitCorrectionCount > 0?
|
||||||
|
// {
|
||||||
|
// key: 'file',
|
||||||
|
// title: '资料补充',
|
||||||
|
// className: activeKey == 'file'? 'orderDetailTop-title tapActive borderRight' : 'orderDetailTop-title borderRight'
|
||||||
|
// }:{}
|
||||||
|
// )
|
||||||
{
|
{
|
||||||
key: 'file',
|
key: 'file',
|
||||||
title: '资料补充',
|
title: '资料补充',
|
||||||
@ -110,6 +117,7 @@ export default function OrderDetailModal(props: any) {
|
|||||||
// className: activeKey == 'result' ? 'orderDetailTop-title tapActive borderRight' : 'orderDetailTop-title borderRight'
|
// className: activeKey == 'result' ? 'orderDetailTop-title tapActive borderRight' : 'orderDetailTop-title borderRight'
|
||||||
// },
|
// },
|
||||||
]
|
]
|
||||||
|
|
||||||
const getOrderDetail = async () => {
|
const getOrderDetail = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
@ -128,7 +136,7 @@ export default function OrderDetailModal(props: any) {
|
|||||||
setAuthorizeInfo({
|
setAuthorizeInfo({
|
||||||
...res.buyUserDTO
|
...res.buyUserDTO
|
||||||
})
|
})
|
||||||
|
// setWaitCorrectionCount(res.waitCorrectionCount)
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|
||||||
@ -151,8 +159,10 @@ export default function OrderDetailModal(props: any) {
|
|||||||
<Spin tip="正在加载..." size="small" spinning={loading}>
|
<Spin tip="正在加载..." size="small" spinning={loading}>
|
||||||
<div style={{ width: 1200, maxHeight: `${height}px`, minHeight: "680px" }}>
|
<div style={{ width: 1200, maxHeight: `${height}px`, minHeight: "680px" }}>
|
||||||
{messageContext}
|
{messageContext}
|
||||||
<div className='orderDetailTop'>
|
<div className='orderDetailTop'
|
||||||
{tapTitleArray.map((item:any,index) => {
|
|
||||||
|
>
|
||||||
|
{tapTitleArray.map((item: any, index) => {
|
||||||
return (
|
return (
|
||||||
<div key={index} className={item.className} onClick={() => {
|
<div key={index} className={item.className} onClick={() => {
|
||||||
setActiveKey(item.key)
|
setActiveKey(item.key)
|
||||||
|
@ -32,6 +32,7 @@ export default function File(props: any) {
|
|||||||
} else if (props.user == 'buy') {
|
} else if (props.user == 'buy') {
|
||||||
getBuySupplementList()
|
getBuySupplementList()
|
||||||
}
|
}
|
||||||
|
props.upData()
|
||||||
messageApi.open({
|
messageApi.open({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
content: '已提交',
|
content: '已提交',
|
||||||
@ -252,6 +253,8 @@ export default function File(props: any) {
|
|||||||
setCorrectionId(record.correctionId)
|
setCorrectionId(record.correctionId)
|
||||||
getSupplementDetail(record.correctionId)
|
getSupplementDetail(record.correctionId)
|
||||||
setIsModalVisible(true)
|
setIsModalVisible(true)
|
||||||
|
// 清空表单
|
||||||
|
form.resetFields();
|
||||||
// setCorrectionType(record.correctionType)
|
// setCorrectionType(record.correctionType)
|
||||||
}}>查看内容</span>
|
}}>查看内容</span>
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
.orderDetailTop {
|
.orderDetailTop {
|
||||||
margin-top: 21px;
|
margin-top: 21px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
/* width: 100%; */
|
||||||
/* background-color: red; */
|
/* background-color: red; */
|
||||||
height: 45px;
|
height: 45px;
|
||||||
border-bottom: 1px solid #EFE8E2;
|
border-bottom: 1px solid #EFE8E2;
|
||||||
@ -14,6 +15,7 @@
|
|||||||
color: #888888;
|
color: #888888;
|
||||||
border-left: 1px solid #EFE8E2;
|
border-left: 1px solid #EFE8E2;
|
||||||
border-top: 1px solid #EFE8E2;
|
border-top: 1px solid #EFE8E2;
|
||||||
|
/* border-right: 1px solid #EFE8E2; */
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,6 +288,8 @@ export default function InvoiceList() {
|
|||||||
} else {
|
} else {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
}finally {
|
||||||
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ export default function Head() {
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
setPhoneLoading(false)
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
const data = error.response.data;
|
const data = error.response.data;
|
||||||
messageApi.open({
|
messageApi.open({
|
||||||
@ -165,16 +165,17 @@ export default function Head() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const [phoneloading, setPhoneLoading] = useState(false)
|
||||||
const onFinish = async (values: any) => {
|
const onFinish = async (values: any) => {
|
||||||
console.log('Success:', values);
|
// console.log('Success:', values);
|
||||||
try {
|
try {
|
||||||
const res = await checkPhone(values.phone)
|
const res = await checkPhone(values.phone)
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
if (res.data == 'SUCCESS') {
|
if (res.data == 'SUCCESS') {
|
||||||
|
setPhoneLoading(true)
|
||||||
submit(values.phone, values.smsCode)
|
submit(values.phone, values.smsCode)
|
||||||
|
setPhoneLoading(false)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
messageApi.open({
|
messageApi.open({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
content: '手机号已被绑定,请更换手机号',
|
content: '手机号已被绑定,请更换手机号',
|
||||||
@ -922,7 +923,7 @@ export default function Head() {
|
|||||||
// console.log('嘎嘎嘎哈哈', data);
|
// console.log('嘎嘎嘎哈哈', data);
|
||||||
setUserId(data.userId)
|
setUserId(data.userId)
|
||||||
if (data.isUpdateWxUsernamePhone == 1) {
|
if (data.isUpdateWxUsernamePhone == 1) {
|
||||||
// if (data.isUpdateWxUsernamePhone != 1) {
|
// if (data.isUpdateWxUsernamePhone != 1) {
|
||||||
setIsUpdateWxUsernamePhone(true);
|
setIsUpdateWxUsernamePhone(true);
|
||||||
dispath({
|
dispath({
|
||||||
type: 'changePhoneModal',
|
type: 'changePhoneModal',
|
||||||
@ -1854,6 +1855,7 @@ export default function Head() {
|
|||||||
</div>
|
</div>
|
||||||
</Modal> */}
|
</Modal> */}
|
||||||
{/* 绑定手机号 */}
|
{/* 绑定手机号 */}
|
||||||
|
|
||||||
<div style={{
|
<div style={{
|
||||||
display: isUpdateWxUsernamePhone ? 'block' : 'none',
|
display: isUpdateWxUsernamePhone ? 'block' : 'none',
|
||||||
position: 'fixed', // 固定定位
|
position: 'fixed', // 固定定位
|
||||||
@ -1865,6 +1867,7 @@ export default function Head() {
|
|||||||
zIndex: 100, // 确保在其他元素之上
|
zIndex: 100, // 确保在其他元素之上
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
|
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
@ -1873,163 +1876,166 @@ export default function Head() {
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<div className='phoneMaskBox'>
|
<Spin tip="正在绑定..." spinning={phoneloading} >
|
||||||
<div className='phoneBoxLeft'>
|
<div className='phoneMaskBox'>
|
||||||
<div
|
<div className='phoneBoxLeft'>
|
||||||
style={{
|
<div
|
||||||
marginTop: 79,
|
style={{
|
||||||
marginLeft: 43
|
marginTop: 79,
|
||||||
}}
|
marginLeft: 43
|
||||||
>
|
}}
|
||||||
<img src={title} alt="" width={79} height={27} />
|
>
|
||||||
</div>
|
<img src={title} alt="" width={79} height={27} />
|
||||||
<div
|
</div>
|
||||||
style={{
|
<div
|
||||||
marginTop: 16,
|
style={{
|
||||||
marginLeft: 43
|
marginTop: 16,
|
||||||
}}
|
marginLeft: 43
|
||||||
>
|
}}
|
||||||
<img src={titleB} alt="" width={109} height={17} />
|
>
|
||||||
</div>
|
<img src={titleB} alt="" width={109} height={17} />
|
||||||
<div
|
</div>
|
||||||
style={{
|
<div
|
||||||
marginTop: 10,
|
style={{
|
||||||
marginLeft: 38,
|
marginTop: 10,
|
||||||
}}
|
marginLeft: 38,
|
||||||
>
|
}}
|
||||||
<img src={line} alt="" width={180} height={19} />
|
>
|
||||||
</div>
|
<img src={line} alt="" width={180} height={19} />
|
||||||
</div>
|
|
||||||
<div className='phoneBoxRight'>
|
|
||||||
<div style={{
|
|
||||||
width: '100%',
|
|
||||||
fontSize: 20,
|
|
||||||
display: 'flex',
|
|
||||||
justifyContent: 'flex-end',
|
|
||||||
// height: 21,
|
|
||||||
// background: 'pink'
|
|
||||||
|
|
||||||
}}>
|
|
||||||
<div style={{ cursor: 'pointer' }} onClick={() => {
|
|
||||||
setIsUpdateWxUsernamePhone(false);
|
|
||||||
dispath({
|
|
||||||
type: 'changePhoneModal',
|
|
||||||
val: false
|
|
||||||
})
|
|
||||||
getUserData()
|
|
||||||
}}>
|
|
||||||
<CloseOutlined />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div className='phoneBoxRight'>
|
||||||
// background:'pink',
|
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center'
|
|
||||||
}}>
|
|
||||||
<div className='phoneTitle'>您正在绑定手机号</div>
|
|
||||||
<div className='phoneTitleB'>绑定手机号后,您可以通过手机号码登录平台</div>
|
|
||||||
<div style={{
|
<div style={{
|
||||||
marginTop: 30
|
width: '100%',
|
||||||
|
fontSize: 20,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
// height: 21,
|
||||||
|
// background: 'pink'
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<Form name="Form"
|
<div style={{ cursor: 'pointer' }} onClick={() => {
|
||||||
form={form}
|
setIsUpdateWxUsernamePhone(false);
|
||||||
onFinish={onFinish}
|
dispath({
|
||||||
initialValues={{ softWare: '' }}
|
type: 'changePhoneModal',
|
||||||
// style={{ maxWidth: 600 }}
|
val: false
|
||||||
>
|
})
|
||||||
<div className='phoneBoxInput'>
|
getUserData()
|
||||||
|
}}>
|
||||||
|
<CloseOutlined />
|
||||||
|
</div>
|
||||||
|
|
||||||
<Form.Item name="phone" label="" rules={[{ required: true, message: '请输入手机号' },
|
|
||||||
{
|
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
|
||||||
message: '请输入有效的手机号'
|
|
||||||
}
|
|
||||||
]}>
|
|
||||||
<Input style={{
|
|
||||||
width: '300px',
|
|
||||||
height: '42px',
|
|
||||||
fontSize: 16,
|
|
||||||
background: '#F7F7F7',
|
|
||||||
}} placeholder="请输入手机号" />
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
<div className='phoneBoxInput' style={{
|
|
||||||
}}>
|
|
||||||
|
|
||||||
<Form.Item name="smsCode" label="" rules={[{ required: true, message: '请输入验证码' }]}>
|
|
||||||
<Input style={{
|
|
||||||
width: '200px',
|
|
||||||
height: '42px',
|
|
||||||
fontSize: 16,
|
|
||||||
background: '#F7F7F7',
|
|
||||||
}} placeholder="请输入验证码" />
|
|
||||||
</Form.Item>
|
|
||||||
{countdown === 0 ? (
|
|
||||||
<div
|
|
||||||
className='sendCode'
|
|
||||||
// style={{
|
|
||||||
|
|
||||||
// width: '90px',
|
|
||||||
// height: '42px',
|
|
||||||
// justifyContent: 'center',
|
|
||||||
// alignItems: 'center',
|
|
||||||
// display: 'flex',
|
|
||||||
// cursor: 'pointer',
|
|
||||||
// color: '#929292',
|
|
||||||
// paddingRight: 10,
|
|
||||||
// }}
|
|
||||||
onClick={sendCode}
|
|
||||||
>
|
|
||||||
发送验证码
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div
|
|
||||||
className='sendCode'
|
|
||||||
style={{
|
|
||||||
cursor: 'unset',
|
|
||||||
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
倒计时 {countdown} 秒
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Form.Item>
|
|
||||||
<Button style={{
|
|
||||||
width: 300,
|
|
||||||
height: 42,
|
|
||||||
background: '#3B2C0D',
|
|
||||||
color: '#fff',
|
|
||||||
fontSize: 16,
|
|
||||||
borderRadius: 10,
|
|
||||||
marginTop: 20,
|
|
||||||
}}
|
|
||||||
type="primary" htmlType="submit"
|
|
||||||
>
|
|
||||||
绑定
|
|
||||||
</Button>
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</Form>
|
|
||||||
</div>
|
</div>
|
||||||
<div className='closeTitle' onClick={() => {
|
<div style={{
|
||||||
setIsUpdateWxUsernamePhone(false);
|
// background:'pink',
|
||||||
dispath({
|
width: '100%',
|
||||||
type: 'changePhoneModal',
|
height: '100%',
|
||||||
val: false
|
display: 'flex',
|
||||||
})
|
flexDirection: 'column',
|
||||||
getUserData()
|
justifyContent: 'center',
|
||||||
}}>跳过,下次再说</div>
|
alignItems: 'center'
|
||||||
|
}}>
|
||||||
|
<div className='phoneTitle'>您正在绑定手机号</div>
|
||||||
|
<div className='phoneTitleB'>绑定手机号后,您可以通过手机号码登录平台</div>
|
||||||
|
<div style={{
|
||||||
|
marginTop: 30
|
||||||
|
}}>
|
||||||
|
<Form name="Form"
|
||||||
|
form={form}
|
||||||
|
onFinish={onFinish}
|
||||||
|
initialValues={{ softWare: '' }}
|
||||||
|
// style={{ maxWidth: 600 }}
|
||||||
|
>
|
||||||
|
<div className='phoneBoxInput'>
|
||||||
|
|
||||||
|
<Form.Item name="phone" label="" rules={[{ required: true, message: '请输入手机号' },
|
||||||
|
{
|
||||||
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
|
message: '请输入有效的手机号'
|
||||||
|
}
|
||||||
|
]}>
|
||||||
|
<Input style={{
|
||||||
|
width: '300px',
|
||||||
|
height: '42px',
|
||||||
|
fontSize: 16,
|
||||||
|
background: '#F7F7F7',
|
||||||
|
}} placeholder="请输入手机号" />
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
<div className='phoneBoxInput' style={{
|
||||||
|
}}>
|
||||||
|
|
||||||
|
<Form.Item name="smsCode" label="" rules={[{ required: true, message: '请输入验证码' }]}>
|
||||||
|
<Input style={{
|
||||||
|
width: '200px',
|
||||||
|
height: '42px',
|
||||||
|
fontSize: 16,
|
||||||
|
background: '#F7F7F7',
|
||||||
|
}} placeholder="请输入验证码" />
|
||||||
|
</Form.Item>
|
||||||
|
{countdown === 0 ? (
|
||||||
|
<div
|
||||||
|
className='sendCode'
|
||||||
|
// style={{
|
||||||
|
|
||||||
|
// width: '90px',
|
||||||
|
// height: '42px',
|
||||||
|
// justifyContent: 'center',
|
||||||
|
// alignItems: 'center',
|
||||||
|
// display: 'flex',
|
||||||
|
// cursor: 'pointer',
|
||||||
|
// color: '#929292',
|
||||||
|
// paddingRight: 10,
|
||||||
|
// }}
|
||||||
|
onClick={sendCode}
|
||||||
|
>
|
||||||
|
发送验证码
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
className='sendCode'
|
||||||
|
style={{
|
||||||
|
cursor: 'unset',
|
||||||
|
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
倒计时 {countdown} 秒
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Form.Item>
|
||||||
|
<Button style={{
|
||||||
|
width: 300,
|
||||||
|
height: 42,
|
||||||
|
background: '#3B2C0D',
|
||||||
|
color: '#fff',
|
||||||
|
fontSize: 16,
|
||||||
|
borderRadius: 10,
|
||||||
|
marginTop: 20,
|
||||||
|
}}
|
||||||
|
type="primary" htmlType="submit"
|
||||||
|
disabled={phoneloading}
|
||||||
|
>
|
||||||
|
{phoneloading? '正在绑定...' : '绑定'}
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
<div className='closeTitle' onClick={() => {
|
||||||
|
setIsUpdateWxUsernamePhone(false);
|
||||||
|
dispath({
|
||||||
|
type: 'changePhoneModal',
|
||||||
|
val: false
|
||||||
|
})
|
||||||
|
getUserData()
|
||||||
|
}}>跳过,下次再说</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ export const cancelInvoice = (invoiceRechargeId: string) => request.put(`/operat
|
|||||||
export const getInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string) => request.get(`/operator-plugin/api/invoicerecharge/get/${invoiceRechargeId}`)
|
export const getInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string) => request.get(`/operator-plugin/api/invoicerecharge/get/${invoiceRechargeId}`)
|
||||||
// 修改开票信息
|
// 修改开票信息
|
||||||
export const updateInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string, params: any) => request.put(`/operator-plugin/api/invoicerecharge/update/${invoiceRechargeId}`, params)
|
export const updateInvoiceInfoByinvoiceRechargeId = (invoiceRechargeId: string, params: any) => request.put(`/operator-plugin/api/invoicerecharge/update/${invoiceRechargeId}`, params)
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +93,10 @@ export const confirmPayment = (orderId: string) => aiShopRequest.put(`/aishop/ap
|
|||||||
export const getFileTypeByIds = (params:any) => aiShopRequest.get(`/aishop/api/file/list`, { params })
|
export const getFileTypeByIds = (params:any) => aiShopRequest.get(`/aishop/api/file/list`, { params })
|
||||||
// 补充资料
|
// 补充资料
|
||||||
export const supplementData = (params:any) => aiShopRequest.post(`/aishop/api/correction/save`, params)
|
export const supplementData = (params:any) => aiShopRequest.post(`/aishop/api/correction/save`, params)
|
||||||
|
// 取消订单
|
||||||
|
export const cancelOrder = (orderId: string) => aiShopRequest.put(`/aishop/api/order/save-cancel/${orderId}`)
|
||||||
|
// 填写过户人信息
|
||||||
|
export const fillInputInfo = (orderId: string, params:any) => aiShopRequest.post(`/aishop/api/order/save-input/${orderId}`, params)
|
||||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,8 +26,9 @@ request.interceptors.request.use(
|
|||||||
const token = sessionStorage.getItem('token')
|
const token = sessionStorage.getItem('token')
|
||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
// config.headers['Content-Type'] = 'application/json';
|
||||||
// config.data = { unused: 0 }
|
// config.data = { unused: 0 }
|
||||||
|
|
||||||
if (config.method === 'get' ) {
|
if (config.method === 'get' ) {
|
||||||
if (!config.data) {
|
if (!config.data) {
|
||||||
config.data = { unused: 0 }
|
config.data = { unused: 0 }
|
||||||
@ -75,7 +76,7 @@ aiShopRequest.interceptors.request.use(
|
|||||||
|
|
||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
// config.headers['Content-Type'] = 'application/json';
|
||||||
// config.data = { unused: 0 }
|
// config.data = { unused: 0 }
|
||||||
if (config.method === 'get' ) {
|
if (config.method === 'get' ) {
|
||||||
if (!config.data) {
|
if (!config.data) {
|
||||||
@ -122,7 +123,7 @@ phoneRequest.interceptors.request.use(
|
|||||||
const token = sessionStorage.getItem('token')
|
const token = sessionStorage.getItem('token')
|
||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
// config.headers['Content-Type'] = 'application/json';
|
||||||
// config.data = { unused: 0 }
|
// config.data = { unused: 0 }
|
||||||
if (config.method === 'get' ) {
|
if (config.method === 'get' ) {
|
||||||
if (!config.data) {
|
if (!config.data) {
|
||||||
|
@ -16,9 +16,11 @@ import {
|
|||||||
import AiShopDetail from '../../components/AiShopDetail/AiShopDetail'
|
import AiShopDetail from '../../components/AiShopDetail/AiShopDetail'
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import dayjs, { } from 'dayjs';
|
import dayjs, { } from 'dayjs';
|
||||||
import { buyGoodsList,
|
import {
|
||||||
|
buyGoodsList,
|
||||||
// goodsDetail,
|
// goodsDetail,
|
||||||
createOrder, confirmPayment } from '../../request/api'
|
// createOrder, confirmPayment
|
||||||
|
} from '../../request/api'
|
||||||
// import type { InputNumberProps } from 'antd';
|
// import type { InputNumberProps } from 'antd';
|
||||||
// import type { TableColumnsType } from 'antd';
|
// import type { TableColumnsType } from 'antd';
|
||||||
// import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
// import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
||||||
@ -33,7 +35,7 @@ export default function CopyrightGgoods() {
|
|||||||
const height = window.innerHeight - 180;
|
const height = window.innerHeight - 180;
|
||||||
const [goodsId, setGoodsId] = useState<any>() //商品ID
|
const [goodsId, setGoodsId] = useState<any>() //商品ID
|
||||||
const [goodsDetailModal, setGoodsDetailModal] = useState(false) //订单详情
|
const [goodsDetailModal, setGoodsDetailModal] = useState(false) //订单详情
|
||||||
const [buyTipsModal, setBuyTipsModal] = useState(false) //卖提示框
|
// const [buyTipsModal, setBuyTipsModal] = useState(false) //卖提示框
|
||||||
|
|
||||||
// const [messageApi, contextHolder] = message.useMessage();
|
// const [messageApi, contextHolder] = message.useMessage();
|
||||||
// const dateFormat = 'YYYY-MM-DD';
|
// const dateFormat = 'YYYY-MM-DD';
|
||||||
@ -59,46 +61,46 @@ export default function CopyrightGgoods() {
|
|||||||
|
|
||||||
const [data, setData] = useState([]); // 表格数据
|
const [data, setData] = useState([]); // 表格数据
|
||||||
// 确认支付
|
// 确认支付
|
||||||
const confirmPaymentFun = async (orderId: string) => {
|
// const confirmPaymentFun = async (orderId: string) => {
|
||||||
try {
|
// try {
|
||||||
// setLoading(true)
|
// // setLoading(true)
|
||||||
const res: any = await confirmPayment(orderId)
|
// const res: any = await confirmPayment(orderId)
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
// setLoading(false)
|
// // setLoading(false)
|
||||||
} catch (error: any) {
|
// } catch (error: any) {
|
||||||
|
|
||||||
if (error.response) {
|
// if (error.response) {
|
||||||
const data = error.response.data;
|
// const data = error.response.data;
|
||||||
messageApi.open({
|
// messageApi.open({
|
||||||
type: 'error',
|
// type: 'error',
|
||||||
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
// content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
console.error(error)
|
// console.error(error)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// 创建订单
|
// 创建订单
|
||||||
const createOrderFun = async (goodsId: string) => {
|
// const createOrderFun = async (goodsId: string) => {
|
||||||
try {
|
// try {
|
||||||
// setPayLoading(true)
|
// // setPayLoading(true)
|
||||||
const res: any = await createOrder(goodsId)
|
// const res: any = await createOrder(goodsId)
|
||||||
// console.log(res);
|
// // console.log(res);
|
||||||
confirmPaymentFun(res.data)
|
// confirmPaymentFun(res.data)
|
||||||
|
|
||||||
} catch (error: any) {
|
// } catch (error: any) {
|
||||||
|
|
||||||
if (error.response) {
|
// if (error.response) {
|
||||||
const data = error.response.data;
|
// const data = error.response.data;
|
||||||
messageApi.open({
|
// messageApi.open({
|
||||||
type: 'error',
|
// type: 'error',
|
||||||
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
// content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
console.error(error)
|
// console.error(error)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
const getBuyGoodsList = async (page: number) => {
|
const getBuyGoodsList = async (page: number) => {
|
||||||
try {
|
try {
|
||||||
@ -176,7 +178,7 @@ export default function CopyrightGgoods() {
|
|||||||
}, [state])
|
}, [state])
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getBuyGoodsList(page)
|
getBuyGoodsList(page)
|
||||||
},[page])
|
}, [page])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
@ -207,7 +209,7 @@ export default function CopyrightGgoods() {
|
|||||||
<Column
|
<Column
|
||||||
width={70}
|
width={70}
|
||||||
title="序号" render={(_text, _record, index: number) => (
|
title="序号" render={(_text, _record, index: number) => (
|
||||||
index + 1
|
(page - 1) * 10 + index + 1
|
||||||
)} align="center" />
|
)} align="center" />
|
||||||
<Column
|
<Column
|
||||||
title="软著名称"
|
title="软著名称"
|
||||||
@ -456,11 +458,15 @@ export default function CopyrightGgoods() {
|
|||||||
</Spin> */}
|
</Spin> */}
|
||||||
<AiShopDetail goodsId={goodsId} closeModal={() => {
|
<AiShopDetail goodsId={goodsId} closeModal={() => {
|
||||||
setGoodsDetailModal(false)
|
setGoodsDetailModal(false)
|
||||||
}}></AiShopDetail>
|
}}
|
||||||
|
upData={() => {
|
||||||
|
getBuyGoodsList(page)
|
||||||
|
}}
|
||||||
|
></AiShopDetail>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
||||||
<Modal
|
{/* <Modal
|
||||||
title="提示"
|
title="提示"
|
||||||
okText="确认"
|
okText="确认"
|
||||||
cancelText="取消"
|
cancelText="取消"
|
||||||
@ -477,7 +483,7 @@ export default function CopyrightGgoods() {
|
|||||||
centered
|
centered
|
||||||
>
|
>
|
||||||
确定购买该商品吗?
|
确定购买该商品吗?
|
||||||
</Modal>
|
</Modal> */}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,6 +24,8 @@ import { useLocation } from 'react-router-dom';
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import dayjs, { } from 'dayjs';
|
import dayjs, { } from 'dayjs';
|
||||||
export default function ProductRelease() {
|
export default function ProductRelease() {
|
||||||
|
const [reasonModalOpen, setReasonModalOpen] = useState(false) // 未通过原因弹窗
|
||||||
|
const [goodsCheckRemark, setGoodsCheckRemark] = useState('') // 未通过原因
|
||||||
const [messageApi, messageContext] = useMessage();
|
const [messageApi, messageContext] = useMessage();
|
||||||
const { state } = useLocation()
|
const { state } = useLocation()
|
||||||
// const dateFormat = 'YYYY年MM月DD日';
|
// const dateFormat = 'YYYY年MM月DD日';
|
||||||
@ -42,7 +44,7 @@ export default function ProductRelease() {
|
|||||||
// if (sellDate) {
|
// if (sellDate) {
|
||||||
// console.log('sellDate', dayjs(sellDate).year());
|
// console.log('sellDate', dayjs(sellDate).year());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
setPage(1)
|
setPage(1)
|
||||||
getGoodsDate(1)
|
getGoodsDate(1)
|
||||||
}, [state])
|
}, [state])
|
||||||
@ -61,7 +63,7 @@ export default function ProductRelease() {
|
|||||||
const [offModalOpen, setOffModalOpen] = useState(false) // 控制下架弹窗
|
const [offModalOpen, setOffModalOpen] = useState(false) // 控制下架弹窗
|
||||||
const [id, setId] = useState<any>('') // 编辑id
|
const [id, setId] = useState<any>('') // 编辑id
|
||||||
const [loading, setLoading] = useState(false) // 加载
|
const [loading, setLoading] = useState(false) // 加载
|
||||||
|
|
||||||
|
|
||||||
const [data, setData] = useState<any>([])
|
const [data, setData] = useState<any>([])
|
||||||
// 点击编辑
|
// 点击编辑
|
||||||
@ -73,12 +75,12 @@ export default function ProductRelease() {
|
|||||||
// 删除id
|
// 删除id
|
||||||
const [delId, setDelId] = useState('')
|
const [delId, setDelId] = useState('')
|
||||||
// 删除商品名字
|
// 删除商品名字
|
||||||
const [delName, setDelName] = useState('')
|
// const [delName, setDelName] = useState('')
|
||||||
// 点击删除
|
// 点击删除
|
||||||
const del = (item: any) => {
|
const del = (item: any) => {
|
||||||
// console.log(item.order);
|
// console.log(item.order);
|
||||||
setDelId(item.goodsId)
|
setDelId(item.goodsId)
|
||||||
setDelName(item.goodsName)
|
// setDelName(item.goodsName)
|
||||||
setDelModalOpen(true)
|
setDelModalOpen(true)
|
||||||
};
|
};
|
||||||
// 点击确定删除
|
// 点击确定删除
|
||||||
@ -243,7 +245,7 @@ export default function ProductRelease() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const getGoodsDate = async (page: number) => {
|
const getGoodsDate = async (page: number) => {
|
||||||
try {
|
try {
|
||||||
@ -399,14 +401,14 @@ export default function ProductRelease() {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style={{ textAlign: 'center', height: 110, maxWidth: 110 }}>
|
<tr style={{ textAlign: 'center', height: 110, maxWidth: 110 }}>
|
||||||
<td>{index + 1}</td>
|
<td>{(page - 1) * 10 + index + 1}</td>
|
||||||
<td className='product-release-table-img-td'>
|
<td className='product-release-table-img-td'>
|
||||||
<div className='product-release-table-img'>
|
<div className='product-release-table-img'>
|
||||||
<Image src={showImage(item.goodsPhoto, false)} height={90} preview={{
|
<Image src={showImage(item.goodsPhoto, false)} height={90} preview={{
|
||||||
mask: '查看', // 设置点击放大时显示的文字
|
mask: '查看', // 设置点击放大时显示的文字
|
||||||
|
|
||||||
}}
|
}}
|
||||||
style={{ maxWidth: '100%' }}
|
style={{ maxWidth: '100%' }}
|
||||||
></Image>
|
></Image>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -434,7 +436,22 @@ export default function ProductRelease() {
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
}}>
|
}}>
|
||||||
{item.goodsCheckStatus == '0' ?
|
{item.goodsCheckStatus == '0' ?
|
||||||
<span style={{ color: 'red' }}> 未通过 </span>
|
<div>
|
||||||
|
<div style={{
|
||||||
|
color: 'red',
|
||||||
|
cursor: 'pointer',
|
||||||
|
}}
|
||||||
|
title='点击查看未通过原因'
|
||||||
|
onClick={() => {
|
||||||
|
setGoodsCheckRemark(item.goodsCheckRemark)
|
||||||
|
setReasonModalOpen(true)
|
||||||
|
|
||||||
|
}}
|
||||||
|
> 未通过 </div>
|
||||||
|
<div style={{
|
||||||
|
fontSize: 12
|
||||||
|
}}>(点击查看原因)</div>
|
||||||
|
</div>
|
||||||
: item.goodsCheckStatus == '1' ?
|
: item.goodsCheckStatus == '1' ?
|
||||||
<span style={{ color: 'skyBlue' }}> 审核中 </span>
|
<span style={{ color: 'skyBlue' }}> 审核中 </span>
|
||||||
: item.goodsCheckStatus == '2' ?
|
: item.goodsCheckStatus == '2' ?
|
||||||
@ -444,9 +461,13 @@ export default function ProductRelease() {
|
|||||||
width: 250,
|
width: 250,
|
||||||
}}>
|
}}>
|
||||||
<div>
|
<div>
|
||||||
<span className='product-release-table-btn' onClick={() => {
|
<span className='product-release-table-btn'
|
||||||
edit(item)
|
style={{
|
||||||
}}>编辑</span>
|
display: item.goodsStatus == '1' ? 'none' : 'unset'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
edit(item)
|
||||||
|
}}>编辑</span>
|
||||||
<span className='product-release-table-btn product-btn' style={{
|
<span className='product-release-table-btn product-btn' style={{
|
||||||
display: item.goodsCheckStatus == '1' || item.goodsCheckStatus == '2' ? 'none' : 'unset'
|
display: item.goodsCheckStatus == '1' || item.goodsCheckStatus == '2' ? 'none' : 'unset'
|
||||||
}} onClick={() => submit(item)}>提交审核</span>
|
}} onClick={() => submit(item)}>提交审核</span>
|
||||||
@ -460,9 +481,14 @@ export default function ProductRelease() {
|
|||||||
}} onClick={() => sell(item)}>上架</span>
|
}} onClick={() => sell(item)}>上架</span>
|
||||||
<span className='product-release-table-btn product-btn '
|
<span className='product-release-table-btn product-btn '
|
||||||
style={{
|
style={{
|
||||||
display: item.goodsStatus == '0' ? 'none' : 'unset'
|
display: item.goodsStatus == '0' || item.goodsOrderStatus == '1' ? 'none' : 'unset'
|
||||||
}}
|
}}
|
||||||
onClick={() => off(item)}>下架</span>
|
onClick={() => off(item)}>下架</span>
|
||||||
|
<span style={{
|
||||||
|
display: item.goodsOrderStatus == '1'? 'unset' : 'none',
|
||||||
|
}}>
|
||||||
|
正在交易中...
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -539,7 +565,9 @@ export default function ProductRelease() {
|
|||||||
width: 700,
|
width: 700,
|
||||||
marginTop: 20
|
marginTop: 20
|
||||||
}}>
|
}}>
|
||||||
删除后这条信息将不被保存,确定删除{delName}吗?
|
删除后这条信息将不被保存,确定删除
|
||||||
|
{/* {delName} */}
|
||||||
|
吗?
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
{/* 出售弹窗 */}
|
{/* 出售弹窗 */}
|
||||||
@ -622,6 +650,35 @@ export default function ProductRelease() {
|
|||||||
确定将{submitName}提交审核吗?
|
确定将{submitName}提交审核吗?
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<Modal title="未通过原因"
|
||||||
|
okText="确认"
|
||||||
|
cancelText="取消"
|
||||||
|
destroyOnClose={true}
|
||||||
|
open={reasonModalOpen}
|
||||||
|
onOk={() => {
|
||||||
|
// submitAuditOk()
|
||||||
|
|
||||||
|
}}
|
||||||
|
footer={null}
|
||||||
|
onCancel={() => {
|
||||||
|
setReasonModalOpen(false)
|
||||||
|
}}
|
||||||
|
// okButtonProps={{ style: { background: 'red', color: 'white' } }}
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
height: `${height}px`,
|
||||||
|
}}>
|
||||||
|
<div style={{
|
||||||
|
width: 700,
|
||||||
|
// marginTop: 20
|
||||||
|
padding: '20px 0px',
|
||||||
|
}}>
|
||||||
|
{goodsCheckRemark}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -871,6 +871,8 @@ export default function EditModal(props: any) {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
logoImgArray.splice(0);
|
logoImgArray.splice(0);
|
||||||
setLogoImgArray([...logoImgArray]);
|
setLogoImgArray([...logoImgArray]);
|
||||||
|
// 将表单imageUrl值清空
|
||||||
|
form.setFieldsValue({ imageUrl: '' });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@ -1339,11 +1341,11 @@ export default function EditModal(props: any) {
|
|||||||
htmlType="submit"
|
htmlType="submit"
|
||||||
// style={{ width: '262px', height: '58px', fontSize: '16px', color: '#FDFDF2', backgroundColor: 'var(--color-primary)' }}
|
// style={{ width: '262px', height: '58px', fontSize: '16px', color: '#FDFDF2', backgroundColor: 'var(--color-primary)' }}
|
||||||
size='large'
|
size='large'
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
console.log(form.getFieldValue('imageUrl'));
|
// console.log(form.getFieldValue('imageUrl'));
|
||||||
console.log(logoImgArray);
|
// console.log(logoImgArray);
|
||||||
|
|
||||||
}}
|
// }}
|
||||||
>
|
>
|
||||||
{/* {props.id?'保存':'提交'} */}
|
{/* {props.id?'保存':'提交'} */}
|
||||||
保存
|
保存
|
||||||
|
@ -5,22 +5,121 @@ import {
|
|||||||
// message,
|
// message,
|
||||||
Pagination,
|
Pagination,
|
||||||
Modal,
|
Modal,
|
||||||
Spin
|
Spin,
|
||||||
|
Form,
|
||||||
|
Col, Row,
|
||||||
|
Select,
|
||||||
|
Input,
|
||||||
|
Cascader,
|
||||||
|
// Flex,
|
||||||
|
Button
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import AiShopDetail from '../../components/AiShopDetail/AiShopDetail'
|
import AiShopDetail from '../../components/AiShopDetail/AiShopDetail'
|
||||||
|
import { GlobalDispatchContext, reloadUser } from "../../context/GlobalContext.ts";
|
||||||
// import type { TableColumnsType } from 'antd';
|
// import type { TableColumnsType } from 'antd';
|
||||||
// import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
// import { SearchOutlined, ClearOutlined } from '@ant-design/icons';
|
||||||
// import type { DatePickerProps } from 'antd';
|
// import type { DatePickerProps } from 'antd';
|
||||||
// import locale from 'antd/es/date-picker/locale/zh_CN';
|
// import locale from 'antd/es/date-picker/locale/zh_CN';
|
||||||
import { getBuyOrderList } from '../../request/api'
|
import { getBuyOrderList, getProvinceList, getCityList, getCertificateTypeList, cancelOrder, fillInputInfo } from '../../request/api'
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect, useContext } from 'react';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import File from '../../components/OrderDetailModal/components/File/File'
|
import File from '../../components/OrderDetailModal/components/File/File'
|
||||||
const { Column } = Table;
|
const { Column } = Table;
|
||||||
import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal'
|
import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal'
|
||||||
import useMessage from "antd/es/message/useMessage";
|
import useMessage from "antd/es/message/useMessage";
|
||||||
import dayjs, { } from 'dayjs';
|
import dayjs, { } from 'dayjs';
|
||||||
|
interface Option {
|
||||||
|
value?: string | number | null;
|
||||||
|
label: React.ReactNode;
|
||||||
|
children?: Option[];
|
||||||
|
isLeaf?: boolean;
|
||||||
|
// id: string;
|
||||||
|
// pId: string;
|
||||||
|
}
|
||||||
export default function TradingGoods() {
|
export default function TradingGoods() {
|
||||||
|
const globalDispatchContext = useContext(GlobalDispatchContext);
|
||||||
|
const [areaArray, setAreaArray] = useState<Option[]>([]);
|
||||||
|
const getProvinceListDate = async () => {
|
||||||
|
try {
|
||||||
|
const res: any = await getProvinceList()
|
||||||
|
// console.log('省', res);
|
||||||
|
const provinces = res.map((province: any) => ({
|
||||||
|
value: province.areaId,
|
||||||
|
label: province.areaName,
|
||||||
|
isLeaf: false,
|
||||||
|
// id: province.areaId,
|
||||||
|
children: [], // 初始化 children 属性为空数组
|
||||||
|
}));
|
||||||
|
setAreaArray(provinces);
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
|
||||||
|
|
||||||
|
if (error.response) {
|
||||||
|
const data = error.response.data;
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 加载城市列表
|
||||||
|
const loadCityList = async (selectedOptions: Option[]) => {
|
||||||
|
const targetOption = selectedOptions[selectedOptions.length - 1];
|
||||||
|
// console.log('targetOption', targetOption.children);
|
||||||
|
try {
|
||||||
|
const res: any = await getCityList(targetOption.value as string);
|
||||||
|
// console.log('城市列表', res);
|
||||||
|
|
||||||
|
const cities = res.map((city: any) => ({
|
||||||
|
value: city.areaId,
|
||||||
|
label: city.areaName,
|
||||||
|
|
||||||
|
}));
|
||||||
|
targetOption.children = cities;
|
||||||
|
// 更新 areaArray 状态
|
||||||
|
setAreaArray([...areaArray]);
|
||||||
|
} catch (error: any) {
|
||||||
|
|
||||||
|
|
||||||
|
if (error.response) {
|
||||||
|
const data = error.response.data;
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const [certificateTypeList, setCertificateTypeList] = useState<any>([]) // 证书类型列表
|
||||||
|
const getCertificateTypeListDate = async () => {
|
||||||
|
try {
|
||||||
|
const res: any = await getCertificateTypeList()
|
||||||
|
setCertificateTypeList(res.map((item: any) => {
|
||||||
|
return {
|
||||||
|
value: item.dataId,
|
||||||
|
label: item.dataName,
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
} catch (error: any) {
|
||||||
|
|
||||||
|
if (error.response) {
|
||||||
|
const data = error.response.data;
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const [form] = Form.useForm();
|
||||||
const height = window.innerHeight - 180;
|
const height = window.innerHeight - 180;
|
||||||
const [messageApi, contextHolder] = useMessage();
|
const [messageApi, contextHolder] = useMessage();
|
||||||
const dateFormat = 'YYYY-MM-DD';
|
const dateFormat = 'YYYY-MM-DD';
|
||||||
@ -38,6 +137,7 @@ export default function TradingGoods() {
|
|||||||
const [loading, setLoading] = useState(false) // 加载中
|
const [loading, setLoading] = useState(false) // 加载中
|
||||||
const [fileModal, setFileModal] = useState(false) //补充资料弹窗
|
const [fileModal, setFileModal] = useState(false) //补充资料弹窗
|
||||||
const [data, setData] = useState<any[]>([]); // 表格数据
|
const [data, setData] = useState<any[]>([]); // 表格数据
|
||||||
|
const [buyInfoModal, setBuyInfoModal] = useState(false) // 填写购买人信息弹窗
|
||||||
|
|
||||||
const getDataList = async (page: number) => {
|
const getDataList = async (page: number) => {
|
||||||
try {
|
try {
|
||||||
@ -113,7 +213,10 @@ export default function TradingGoods() {
|
|||||||
// 获取数据
|
// 获取数据
|
||||||
}, [page])
|
}, [page])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getProvinceListDate()
|
||||||
|
getCertificateTypeListDate()
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='trading-goods' style={{ height: `${height}px`, overflow: 'hidden' }}>
|
<div className='trading-goods' style={{ height: `${height}px`, overflow: 'hidden' }}>
|
||||||
@ -140,7 +243,7 @@ export default function TradingGoods() {
|
|||||||
fixed="left"
|
fixed="left"
|
||||||
width={70}
|
width={70}
|
||||||
render={(_text, _record, index: number) => (
|
render={(_text, _record, index: number) => (
|
||||||
index + 1
|
(page - 1) * 10 + index + 1
|
||||||
)} align="center" />
|
)} align="center" />
|
||||||
|
|
||||||
<Column
|
<Column
|
||||||
@ -155,7 +258,7 @@ export default function TradingGoods() {
|
|||||||
/>
|
/>
|
||||||
<Column title="订单价格" dataIndex="payMoney" align="center"
|
<Column title="订单价格" dataIndex="payMoney" align="center"
|
||||||
width={110}
|
width={110}
|
||||||
// fixed="left"
|
// fixed="left"
|
||||||
render={(text) => (
|
render={(text) => (
|
||||||
<span style={{ color: '#FF5D15', fontSize: '24px', fontWeight: '700' }}>{text}</span>
|
<span style={{ color: '#FF5D15', fontSize: '24px', fontWeight: '700' }}>{text}</span>
|
||||||
)} />
|
)} />
|
||||||
@ -175,7 +278,7 @@ export default function TradingGoods() {
|
|||||||
}}>
|
}}>
|
||||||
<span style={{ display: text == '0' ? 'unset' : 'none' }}>订单已取消</span>
|
<span style={{ display: text == '0' ? 'unset' : 'none' }}>订单已取消</span>
|
||||||
<span style={{ display: text == '1' ? 'unset' : 'none' }}>买家待付款</span>
|
<span style={{ display: text == '1' ? 'unset' : 'none' }}>买家待付款</span>
|
||||||
<span style={{ display: text == '2' ? 'unset' : 'none' ,color:'red'}}>待填写资料</span>
|
<span style={{ display: text == '2' ? 'unset' : 'none', color: 'red' }}>待填写资料</span>
|
||||||
<span style={{ display: text == '3' ? 'unset' : 'none' }}>过户进行中</span>
|
<span style={{ display: text == '3' ? 'unset' : 'none' }}>过户进行中</span>
|
||||||
<span style={{ display: text == '4' ? 'unset' : 'none' }}>过户已完成</span>
|
<span style={{ display: text == '4' ? 'unset' : 'none' }}>过户已完成</span>
|
||||||
<span style={{ display: text == '5' ? 'unset' : 'none' }}>买家已评价</span>
|
<span style={{ display: text == '5' ? 'unset' : 'none' }}>买家已评价</span>
|
||||||
@ -183,33 +286,65 @@ export default function TradingGoods() {
|
|||||||
</div>
|
</div>
|
||||||
)} />
|
)} />
|
||||||
<Column title="下单时间" dataIndex="createTime" align="center" width={160} />
|
<Column title="下单时间" dataIndex="createTime" align="center" width={160} />
|
||||||
<Column title="付款时间" dataIndex="payTime" align="center" width={160} />
|
<Column title="付款时间" dataIndex="payTime" align="center" width={160}
|
||||||
|
render={(text) => (
|
||||||
|
<>{text ? text : '未付款'}</>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
<Column
|
<Column
|
||||||
align="center"
|
align="center"
|
||||||
title="操作"
|
title="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
width={400}
|
width={350}
|
||||||
|
// maxWidth={350}
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center'
|
alignItems: 'center',
|
||||||
|
// maxWidth: '400px',
|
||||||
|
// textWrap: 'nowrap',
|
||||||
|
// background:'pink'
|
||||||
}}>
|
}}>
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
<div className='trading-goods-table-btn'
|
||||||
// console.log(record.orderId);
|
style={{
|
||||||
setOrderId(record.orderId)
|
// background: 'pink',
|
||||||
setFileModal(true)
|
display: record.waitCorrectionCount > 0 ? 'unset' : 'none',
|
||||||
}}>补充资料</span>
|
position: 'relative',
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
// color: 'black'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
// console.log(record.orderId);
|
||||||
|
setOrderId(record.orderId)
|
||||||
|
setFileModal(true)
|
||||||
|
}}>补充资料
|
||||||
|
<div style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: '-10px',
|
||||||
|
right: '-10px',
|
||||||
|
// fontSize:'16px',
|
||||||
|
background: 'red',
|
||||||
|
color: '#fff',
|
||||||
|
fontWeight: '700',
|
||||||
|
width: '20px',
|
||||||
|
height: '20px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
{record.waitCorrectionCount}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='trading-goods-table-btn' onClick={() => {
|
||||||
// console.log(record.orderId);
|
// console.log(record.orderId);
|
||||||
setOrderId(record.orderId)
|
setOrderId(record.orderId)
|
||||||
setOrderDetailModal(true)
|
setOrderDetailModal(true)
|
||||||
}}>
|
}}>
|
||||||
订单详情
|
订单详情
|
||||||
</span>
|
</div>
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
<div className='trading-goods-table-btn' onClick={() => {
|
||||||
|
|
||||||
// confirmPaymentFun(record.orderId)
|
// confirmPaymentFun(record.orderId)
|
||||||
// alert(record.goodsId)
|
// alert(record.goodsId)
|
||||||
@ -222,9 +357,10 @@ export default function TradingGoods() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
付款
|
付款
|
||||||
</span>
|
</div>
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
<div className='trading-goods-table-btn' onClick={() => {
|
||||||
|
setBuyInfoModal(true)
|
||||||
|
setOrderId(record.orderId)
|
||||||
|
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
@ -232,17 +368,48 @@ export default function TradingGoods() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
填写受让人信息
|
填写受让人信息
|
||||||
</span>
|
</div>
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
<div className='trading-goods-table-btn' onClick={() => {
|
||||||
|
// 取消订单提示弹窗
|
||||||
|
Modal.confirm({
|
||||||
|
title: '取消订单',
|
||||||
|
content: '是否确认取消订单?',
|
||||||
|
okText: '确定',
|
||||||
|
cancelText: '取消',
|
||||||
|
centered: true,
|
||||||
|
onOk: async () => {
|
||||||
|
try {
|
||||||
|
await cancelOrder(record.orderId)
|
||||||
|
// messageApi.open({
|
||||||
|
// type: 'success',
|
||||||
|
// content: '取消订单成功',
|
||||||
|
// })
|
||||||
|
reloadUser(messageApi, globalDispatchContext).then(() => {
|
||||||
|
messageApi.success('取消订单成功');
|
||||||
|
});
|
||||||
|
getDataList(page)
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
if (error.response) {
|
||||||
|
const data = error.response.data;
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
display: record.orderStatus == '1' || record.orderStatus == '2' ? 'unset' : 'none'
|
display: record.orderStatus == '1' || record.orderStatus == '2' ? 'unset' : 'none'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
取消订单
|
取消订单
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
@ -300,29 +467,269 @@ export default function TradingGoods() {
|
|||||||
width={1150}
|
width={1150}
|
||||||
centered
|
centered
|
||||||
>
|
>
|
||||||
<File user={'buy'} orderId={orderId}></File>
|
<File
|
||||||
|
// closeModal={() => {
|
||||||
|
// setFileModal(false)
|
||||||
|
// }}
|
||||||
|
upData={() => {
|
||||||
|
getDataList(page)
|
||||||
|
}}
|
||||||
|
user={'buy'} orderId={orderId}></File>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal
|
<Modal
|
||||||
title="著作权商品信息"
|
title="著作权商品信息"
|
||||||
okText="确认"
|
okText="确认"
|
||||||
cancelText="取消"
|
cancelText="取消"
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
footer={null}
|
footer={null}
|
||||||
open={aiShopDetailModal}
|
open={aiShopDetailModal}
|
||||||
// onOk={() => {
|
// onOk={() => {
|
||||||
// setOrderDetailModal(false)
|
// setOrderDetailModal(false)
|
||||||
|
// }}
|
||||||
|
onCancel={() => {
|
||||||
|
setAiShopDetailModal(false)
|
||||||
|
}}
|
||||||
|
width={1200}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
|
||||||
|
<AiShopDetail goodsId={goodsId} orderId={orderId} closeModal={() => {
|
||||||
|
setAiShopDetailModal(false)
|
||||||
|
}}
|
||||||
|
upData={() => {
|
||||||
|
getDataList(page)
|
||||||
|
}}
|
||||||
|
></AiShopDetail>
|
||||||
|
</Modal>
|
||||||
|
<Modal
|
||||||
|
title="填写受让人信息"
|
||||||
|
okText="确认"
|
||||||
|
cancelText="取消"
|
||||||
|
destroyOnClose={true}
|
||||||
|
footer={null}
|
||||||
|
open={buyInfoModal}
|
||||||
|
// onOk={() => {
|
||||||
|
// setOrderDetailModal(false)
|
||||||
|
// }}
|
||||||
|
onCancel={() => {
|
||||||
|
setBuyInfoModal(false)
|
||||||
|
}}
|
||||||
|
width={700}
|
||||||
|
centered
|
||||||
|
>
|
||||||
|
<Form
|
||||||
|
name="basic"
|
||||||
|
form={form}
|
||||||
|
layout="vertical"
|
||||||
|
labelCol={{ span: 8 }}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
try {
|
||||||
|
await fillInputInfo(orderId, {
|
||||||
|
buyCity: values.buyCity.join(','),
|
||||||
|
buyIdcard: values.buyIdcard,
|
||||||
|
buyIdcardType: values.buyIdcardType,
|
||||||
|
buyName: values.buyName,
|
||||||
|
buyPhone: values.buyPhone,
|
||||||
|
buyType: values.buyType,
|
||||||
|
})
|
||||||
|
messageApi.open({
|
||||||
|
type: 'success',
|
||||||
|
content: '填写信息成功',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
setBuyInfoModal(false)
|
||||||
|
getDataList(page)
|
||||||
|
}, 500);
|
||||||
|
} catch (error: any) {
|
||||||
|
|
||||||
|
|
||||||
|
if (error.response) {
|
||||||
|
const data = error.response.data;
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: data.msg ? data.msg : `${data.path}(${data.status})`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log('Success:', values);
|
||||||
|
|
||||||
|
}}
|
||||||
|
onFinishFailed={() => {
|
||||||
|
messageApi.open({
|
||||||
|
type: 'error',
|
||||||
|
content: '请完善信息',
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Row gutter={15}>
|
||||||
|
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="类别"
|
||||||
|
name="buyType"
|
||||||
|
rules={[{ required: true, message: '请选择类别' }]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
allowClear
|
||||||
|
// defaultValue="lucy"
|
||||||
|
placeholder='请选择类别'
|
||||||
|
style={{ height: 40 }}
|
||||||
|
options={[
|
||||||
|
{ value: '1', label: '自然人' },
|
||||||
|
{ value: '2', label: '法人' },
|
||||||
|
{ value: '3', label: '非法人组织或其他' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
label="姓名或名称"
|
||||||
|
name="buyName"
|
||||||
|
rules={[{ required: true, message: '请输入姓名或名称' }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
allowClear
|
||||||
|
style={{ height: '40px', }} placeholder="请输入姓名或名称"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={15}>
|
||||||
|
|
||||||
|
<Col span={12}>
|
||||||
|
<div style={{
|
||||||
|
display: 'flex',
|
||||||
|
}}>
|
||||||
|
<Form.Item
|
||||||
|
label="省市"
|
||||||
|
name="buyCity"
|
||||||
|
rules={[{ required: true, message: '请选择省市' }]}
|
||||||
|
>
|
||||||
|
<Cascader options={areaArray}
|
||||||
|
allowClear
|
||||||
|
style={{ height: '40px', width: 318 }}
|
||||||
|
|
||||||
|
// loadData={(selectedOptions: Option[]) => {
|
||||||
|
// const targetOption = selectedOptions[selectedOptions.length - 1];
|
||||||
|
// // console.log('111', targetOption);
|
||||||
|
|
||||||
|
// listArea(targetOption.id).then(data => {
|
||||||
|
// targetOption.children = data.map(item => {
|
||||||
|
// return {
|
||||||
|
// value: item.name,
|
||||||
|
// label: item.name,
|
||||||
|
// isLeaf: true, //二级判断这个 以前不是 以前是 !item.isParent
|
||||||
|
// id: item.id,
|
||||||
|
// pId: item.pId
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// setAreaArray([
|
||||||
|
// ...areaArray
|
||||||
|
// ])
|
||||||
|
// });
|
||||||
|
|
||||||
|
// }}
|
||||||
|
loadData={loadCityList}
|
||||||
|
placeholder="请选择省市"
|
||||||
|
changeOnSelect
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
label="联系电话"
|
||||||
|
name="buyPhone"
|
||||||
|
rules={[{ required: true, message: '请输入联系电话' }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
allowClear
|
||||||
|
style={{ height: '40px', }} placeholder="请输入联系电话"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={15}>
|
||||||
|
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item
|
||||||
|
label="证件类型"
|
||||||
|
name="buyIdcardType"
|
||||||
|
rules={[{ required: true, message: '请选择证件类型' }]}
|
||||||
|
>
|
||||||
|
<Select
|
||||||
|
allowClear
|
||||||
|
// defaultValue="lucy"
|
||||||
|
placeholder='请选择证件类型'
|
||||||
|
style={{ height: 40 }}
|
||||||
|
options={certificateTypeList}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
label="证件号"
|
||||||
|
name="buyIdcard"
|
||||||
|
rules={[{ required: true, message: '请输入证件号' }]}
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
allowClear
|
||||||
|
style={{ height: '40px', }} placeholder="请输入证件号"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<div style={{
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
alignItems: 'center',
|
||||||
|
gap: '10px'
|
||||||
|
}}>
|
||||||
|
<Form.Item wrapperCol={{ span: 24 }}>
|
||||||
|
{/* <Flex align="center" justify="center" gap="large"> */}
|
||||||
|
<Button type="default" htmlType="button"
|
||||||
|
// style={{ width: '262px', height: '58px', fontSize: '16px', color: '#4B4B4B', background: '#EEEEEE' }}
|
||||||
|
// size='large'
|
||||||
|
style={{
|
||||||
|
marginRight: '10px'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
// props.closeModal()
|
||||||
|
}}>
|
||||||
|
关闭
|
||||||
|
</Button>
|
||||||
|
<Button type="primary"
|
||||||
|
htmlType="submit"
|
||||||
|
// style={{ width: '262px', height: '58px', fontSize: '16px', color: '#FDFDF2', backgroundColor: 'var(--color-primary)' }}
|
||||||
|
// size='large'
|
||||||
|
// onClick={() => {
|
||||||
|
// console.log(form.getFieldValue('imageUrl'));
|
||||||
|
// console.log(logoImgArray);
|
||||||
|
|
||||||
// }}
|
// }}
|
||||||
onCancel={() => {
|
>
|
||||||
setAiShopDetailModal(false)
|
{/* {props.id?'保存':'提交'} */}
|
||||||
}}
|
保存
|
||||||
width={1200}
|
</Button>
|
||||||
centered
|
|
||||||
>
|
{/* </Flex> */}
|
||||||
|
</Form.Item>
|
||||||
<AiShopDetail goodsId={goodsId} orderId={orderId} closeModal={() => {
|
</div>
|
||||||
setAiShopDetailModal(false)
|
</Form>
|
||||||
}}></AiShopDetail>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,8 @@ import {
|
|||||||
// Select, DatePicker, Button,
|
// Select, DatePicker, Button,
|
||||||
Table,
|
Table,
|
||||||
// message,
|
// message,
|
||||||
Space, Pagination, Modal,
|
// Space,
|
||||||
|
Pagination, Modal,
|
||||||
Spin
|
Spin
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import dayjs, { } from 'dayjs';
|
import dayjs, { } from 'dayjs';
|
||||||
@ -19,6 +20,7 @@ import { useLocation } from 'react-router-dom';
|
|||||||
const { Column } = Table;
|
const { Column } = Table;
|
||||||
import useMessage from "antd/es/message/useMessage";
|
import useMessage from "antd/es/message/useMessage";
|
||||||
import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal'
|
import OrderDetail from '../../components/OrderDetailModal/OrderDetailModal'
|
||||||
|
// import { styleText } from 'util';
|
||||||
export default function TransactionOrder() {
|
export default function TransactionOrder() {
|
||||||
const [messageApi, messageContext] = useMessage();
|
const [messageApi, messageContext] = useMessage();
|
||||||
const height = window.innerHeight - 180;
|
const height = window.innerHeight - 180;
|
||||||
@ -131,7 +133,7 @@ export default function TransactionOrder() {
|
|||||||
fixed="left"
|
fixed="left"
|
||||||
width={70}
|
width={70}
|
||||||
render={(_text, _record, index: number) => (
|
render={(_text, _record, index: number) => (
|
||||||
index + 1
|
(page - 1) * 10 + index + 1
|
||||||
)} align="center" />
|
)} align="center" />
|
||||||
<Column
|
<Column
|
||||||
title="订单编号"
|
title="订单编号"
|
||||||
@ -171,7 +173,11 @@ export default function TransactionOrder() {
|
|||||||
</div>
|
</div>
|
||||||
)} />
|
)} />
|
||||||
<Column title="下单时间" dataIndex="createTime" align="center" width={160} />
|
<Column title="下单时间" dataIndex="createTime" align="center" width={160} />
|
||||||
<Column title="付款时间" dataIndex="payTime" align="center" width={160} />
|
<Column title="付款时间" dataIndex="payTime" align="center" width={160}
|
||||||
|
render={(text) => (
|
||||||
|
<>{text?text:'未付款'}</>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
{/* <Column title="实名认证状态" dataIndex="address" key="key" /> */}
|
||||||
<Column
|
<Column
|
||||||
align="center"
|
align="center"
|
||||||
@ -180,20 +186,51 @@ export default function TransactionOrder() {
|
|||||||
width={200}
|
width={200}
|
||||||
|
|
||||||
render={(_text, record: any) => (
|
render={(_text, record: any) => (
|
||||||
<Space size="middle">
|
<div style={{
|
||||||
<span className='transaction-order-table-btn' onClick={() => {
|
display: 'flex',
|
||||||
// console.log(record.orderId);
|
justifyContent: 'center',
|
||||||
setOrderId(record.orderId)
|
// alignItems: 'center',
|
||||||
setFileModal(true)
|
// height: '100%',
|
||||||
}}>补充资料</span>
|
}}>
|
||||||
<span className='trading-goods-table-btn' onClick={() => {
|
<div className='transaction-order-table-btn'
|
||||||
|
style={{
|
||||||
|
// background: 'pink',
|
||||||
|
display: record.waitCorrectionCount > 0 ? 'unset' : 'none',
|
||||||
|
position: 'relative',
|
||||||
|
// color: 'black'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
// console.log(record.orderId);
|
||||||
|
setOrderId(record.orderId)
|
||||||
|
setFileModal(true)
|
||||||
|
|
||||||
|
}}>补充资料
|
||||||
|
<div style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: '-10px',
|
||||||
|
right: '-10px',
|
||||||
|
// fontSize:'16px',
|
||||||
|
background: 'red',
|
||||||
|
color: '#fff',
|
||||||
|
fontWeight: '700',
|
||||||
|
width: '20px',
|
||||||
|
height: '20px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
{record.waitCorrectionCount}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className='trading-goods-table-btn' onClick={() => {
|
||||||
// console.log(record.orderId);
|
// console.log(record.orderId);
|
||||||
setOrderId(record.orderId)
|
setOrderId(record.orderId)
|
||||||
setOrderDetailModal(true)
|
setOrderDetailModal(true)
|
||||||
}}>
|
}}>
|
||||||
订单详情
|
订单详情
|
||||||
</span>
|
</div>
|
||||||
</Space>
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Table>
|
</Table>
|
||||||
@ -255,7 +292,14 @@ export default function TransactionOrder() {
|
|||||||
width={1150}
|
width={1150}
|
||||||
centered
|
centered
|
||||||
>
|
>
|
||||||
<File user={'sell'} orderId={orderId}></File>
|
<File user={'sell'}
|
||||||
|
// closeModal={()=>{
|
||||||
|
// setFileModal(false)
|
||||||
|
// }}
|
||||||
|
upData={() => {
|
||||||
|
getDataList(page)
|
||||||
|
}}
|
||||||
|
orderId={orderId}></File>
|
||||||
</Modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -8,8 +8,9 @@ export const baseUrl = `http://${host}`;
|
|||||||
export const copyBaseUrl = `${baseUrl}:7025`;
|
export const copyBaseUrl = `${baseUrl}:7025`;
|
||||||
export const operatorBaseUrl = `${baseUrl}:8091`
|
export const operatorBaseUrl = `${baseUrl}:8091`
|
||||||
export const operatorPluginBaseUrl = `${baseUrl}:8099`;
|
export const operatorPluginBaseUrl = `${baseUrl}:8099`;
|
||||||
export const aiShopBaseUrl = `http://192.168.0.115:8099`;
|
export const aiShopBaseUrl = `http://192.168.0.115:8081`;
|
||||||
export const WebSocketBaseUrl: string = `ws://${host}:7025/copyright`;
|
export const WebSocketBaseUrl: string = `ws://${host}:7025/copyright`;
|
||||||
|
|
||||||
// ---- prod
|
// ---- prod
|
||||||
// export const baseUrl = `https://www.aimzhu.com`;
|
// export const baseUrl = `https://www.aimzhu.com`;
|
||||||
// export const copyBaseUrl = `${baseUrl}`;
|
// export const copyBaseUrl = `${baseUrl}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user