Commit 7db42675 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(): 修改采购询价BUG

parent ca0419ba
import React, { useEffect, useState } from 'react';
import React, { useCallback, useEffect, useState } from 'react';
import {
Form,
Input,
......@@ -47,20 +47,23 @@ const BasicInfo: React.FC<IProps> = (props: any) => {
} = props;
const [telCode, setTelCode] = useState<any>([])
const handleGetTelCode = useCallback(async () => {
await PublicApi.getManageCountryAreaGetTelCode().then(res => {
if (res.code === 1000) {
setTelCode(res.data)
}
});
}, [])
useEffect(() => {
if (fetchdata) {
handleGetTelCode();
form.setFieldsValue({
quotedDetails: fetchdata.quotedDetails,
contacts: fetchdata.contacts,
telPrefix: fetchdata.telPrefix,
telPrefix: fetchdata.telPrefix ? fetchdata.telPrefix : '86',
tel: fetchdata.tel,
})
PublicApi.getManageCountryAreaGetTelCode().then(res => {
if (res.code === 1000) {
setTelCode(res.data)
}
});
}
}, [fetchdata])
......
......@@ -58,7 +58,7 @@ const Inquiry = () => {
dataIndex: 'operate',
render: (text: any, record: any) =>
<Button
disabled={!!record.isQuotedPrice}
// disabled={!!record.isQuotedPrice}
onClick={() => history.push(`/memberCenter/procurementAbility/offter/quote?id=${record.id}&number=${record.purchaseInquiryNo}`)}
type='link'
>
......
......@@ -123,6 +123,7 @@ const AddForm = () => {
cityCode: '',
city: ''
}];
basicInfo.createMemberName = params.createMemberName;
basicInfo.memberName = params.memberName;
basicInfo.purchaseInquiryNo = params.purchaseInquiryNo;
basicInfo.createTime = params.createTime;
......
......@@ -342,7 +342,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
label='会员名称'
name='memberName'
>
<Text strong>{(fetchdata && fetchdata.memberName) && fetchdata.memberName}</Text>
<Text strong>{(fetchdata && fetchdata.createMemberName) && fetchdata.createMemberName}</Text>
</Form.Item>
<Form.Item
label='单据时间'
......
......@@ -134,6 +134,7 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
/** 取消提交 */
const handleClose = () => {
form.resetFields();
setFiles([])
onClose()
}
......@@ -169,6 +170,7 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
useEffect(() => {
form.resetFields();
setFiles([])
searchCategoryTree(null);
if (!isEmpty(edit)) {
console.log(edit)
......@@ -435,7 +437,7 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
{v.name}
</Typography.Link>
</div>
{!preview && <div className={style.upload_right}>
{!preview && <div className={style.upload_right} onClick={() => removeFiles(index)}>
<DeleteOutlined />
</div>}
</div>
......
......@@ -72,7 +72,7 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
<Drawer
visible={visible}
onClose={onclose}
title='选择货品'
title='选择会员'
width={900}
footer={
<div
......
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