|
|
@@ -10,7 +10,7 @@ import { useModal } from '@/components/Modal'
|
|
|
import { useDispatch } from 'umi'
|
|
|
import AddRecord from '@/pages/Customer/Client/components/ClientDetail/AddRecord'
|
|
|
|
|
|
-const CompanyTabList = ({ initData, customerId, client, software }) => {
|
|
|
+const CompanyTabList = ({ initData, customerId, client, software, customer }) => {
|
|
|
const dispatch = useDispatch()
|
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const { TabPane } = Tabs
|
|
|
@@ -108,7 +108,6 @@ const CompanyTabList = ({ initData, customerId, client, software }) => {
|
|
|
type: 'refresh/commitAction',
|
|
|
payload: 'company'
|
|
|
})
|
|
|
- // await initData()
|
|
|
}
|
|
|
|
|
|
const handleAddClient = async values => {
|
|
|
@@ -157,7 +156,17 @@ const CompanyTabList = ({ initData, customerId, client, software }) => {
|
|
|
</Tabs>
|
|
|
</div>
|
|
|
<div className="sheet-btns pl-15px pt-15px">
|
|
|
- <AddContact onConfirm={handleAddClient} buttonProps={{ size: 'small', ghost: 'true' }} />
|
|
|
+ <AddContact
|
|
|
+ onConfirm={handleAddClient}
|
|
|
+ buttonProps={{ size: 'small', ghost: 'true' }}
|
|
|
+ defaultValues={{
|
|
|
+ districtIds: customer.districtIds,
|
|
|
+ stay: customer.stay,
|
|
|
+ ride: customer.ride,
|
|
|
+ address: customer.address,
|
|
|
+ landmarks: customer.landmarks
|
|
|
+ }}
|
|
|
+ />
|
|
|
<AddRecord onConfirm={handleAddCustomerService} />
|
|
|
</div>
|
|
|
</div>
|