Commit 5c0beb7c authored by GuanHua's avatar GuanHua

feat:操作进货单后返回页面数据显示问题

parent d92fdfad
......@@ -15,5 +15,18 @@
margin-left: 2px;
}
}
&_value {
:global {
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item-explain {
position: absolute;
top: 32px;
}
}
}
}
}
\ No newline at end of file
import React from 'react'
import { Form } from 'antd'
import { FormInstance } from 'antd/lib/form'
import cx from 'classnames'
import styles from './index.less'
......@@ -10,11 +12,12 @@ interface dataListType {
}
interface InfoListProps {
options: dataListType[]
options: dataListType[],
form?: FormInstance,
}
const InfoList: React.FC<InfoListProps> = (props) => {
const { options = [] } = props
const { options = [], form } = props
return (
<div className={styles.info_list}>
......
import React from 'react'
import { Input } from 'antd'
import { Input, Form } from 'antd'
import { FormInstance } from 'antd/lib/form'
import InfoList from '../../../../components/InfoList'
interface BasicInfoProps {
form: FormInstance
}
const BasicInfo: React.FC<BasicInfoProps> = (props) => {
const { form } = props
let detailList = [
{
label: '申请单摘要',
value: <Input style={{ width: 572 }} placeholder="请输入申请单摘要" />,
value: <Form.Item
name="applyAbstract"
rules={[{ required: true, message: '请输入申请单摘要' },]}
>
<Input style={{ width: 572 }} placeholder="请输入申请单摘要" />
</Form.Item>,
required: true,
},
{
......@@ -39,7 +42,7 @@ const BasicInfo: React.FC<BasicInfoProps> = (props) => {
return (
<div>
<InfoList options={detailList} />
<InfoList options={detailList} {...props} />
</div>
)
}
......
......@@ -51,7 +51,11 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
const handleSave = () => {
form.validateFields().then(values => {
console.log(values, "values")
}).catch(errors => {
console.log(errors, "errors")
})
}
return (
......@@ -70,27 +74,28 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
] : []}
>
<div className={styles.detail_wrap}>
<Tabs type="card" activeKey={tabActiveKey} onChange={(key) => setTabActiveKey(key)} className={styles.detail_tabs}>
<TabPane tab="基本信息" key="basicInfo">
<BasicInfo form={form} />
</TabPane>
<TabPane tab="换货商品" key="exchangeGoods">
<ExchangeGoods />
</TabPane>
<TabPane tab="举证附件" key="proofFile">
<ProofFile />
</TabPane>
<TabPane tab="退货收货地址" key="returnAddress">
<ReturnAddress />
</TabPane>
<TabPane tab="换货收货地址" key="replaceAddress">
<ReplaceAddress />
</TabPane>
<TabPane tab="流转记录" key="log">
<Log />
</TabPane>
</Tabs>
<Form form={form}>
<Tabs type="card" activeKey={tabActiveKey} onChange={(key) => setTabActiveKey(key)} className={styles.detail_tabs}>
<TabPane tab="基本信息" key="basicInfo">
<BasicInfo />
</TabPane>
<TabPane tab="换货商品" key="exchangeGoods">
<ExchangeGoods />
</TabPane>
<TabPane tab="举证附件" key="proofFile">
<ProofFile />
</TabPane>
<TabPane tab="退货收货地址" key="returnAddress">
<ReturnAddress />
</TabPane>
<TabPane tab="换货收货地址" key="replaceAddress">
<ReplaceAddress />
</TabPane>
<TabPane tab="流转记录" key="log">
<Log />
</TabPane>
</Tabs>
</Form>
</div>
</PageHeaderWrapper>
</>
......
......@@ -5,6 +5,7 @@ import Recommand from '../components/Recommand'
import cx from 'classnames'
import { Checkbox, Affix, message, Modal, Button } from 'antd'
import styles from './index.less'
import { history } from 'umi'
import { PublicApi } from '@/services/api'
import { priceFormat, numFormat } from "@/utils/numberFomat"
import { useLocalStore, observer } from 'mobx-react'
......@@ -19,7 +20,8 @@ interface PurchaseOrderPropsType {
layoutType: LAYOUT_TYPE,
shopInfo: GetTemplateChannelFindChannelResponse,
shopUrlParam: string,
mallInfo: any
mallInfo: any,
location: any
}
const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
......@@ -543,9 +545,9 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
updateOrderInfo(buyOrderInfo, sessionKey).then(() => {
if (res.data) {
window.location.href = `/order?spam_id=${sessionKey}&scence=purchase`
history.push(`/order?spam_id=${sessionKey}&scence=purchase`)
} else {
window.location.href = `/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${sessionKey}`
history.push(`/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${sessionKey}`)
}
})
}
......
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