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

修改商品询价和询价报价页面的bug,修改物流能力页面的BUG,新增商品询价页面的路由

parent 85cc0300
......@@ -40,6 +40,13 @@ export default [
name: 'addInquiryOrder',
component: '@/pages/transaction/inquiryQuote/addInquiryOrder'
},
// 报价
{
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote',
name: 'quote',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/quote'
},
// 新建报价单
{
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add',
......@@ -52,7 +59,7 @@ export default [
path: '/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/edit',
name: 'edit',
hideInMenu: true,
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/add'
component: '@/pages/transaction/inquiryQuote/addInquiryOrder/edit'
},
// 新建报价单详情
{
......
......@@ -190,6 +190,7 @@ export default {
'menu.tranactionAbility.inquiryQuote.quoteOrder': '报价单查询',
'menu.tranactionAbility.inquiryQuote.quoteOrderDetails': '报价单查询详情',
'menu.tranactionAbility.inquiryQuote.addInquiryOrder': '待新增报价单',
'menu.tranactionAbility.inquiryQuote.quote': '报价',
'menu.tranactionAbility.inquiryQuote.add': '新建报价单',
'menu.tranactionAbility.inquiryQuote.edit': '编辑报价单',
'menu.tranactionAbility.inquiryQuote.details': '新建报价单',
......
......@@ -205,7 +205,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
required
title="模板名称"
name="name"
maxLength={30}
maxLength={15}
x-component="Input"
x-component-props={{
placeholder: '请输入模板名称'
......
......@@ -30,11 +30,15 @@ const AddQuotes: React.FC<parmas> = (props) => {
if (res.code === 1000) {
setgoodsList(res.data.inquiryListProductRequests);
setEditData(res.data)
setmember({
name: res.data.memberName,
memberId: res.data.memberId
})
}
})
}
useEffect(() => {
if (id && type === 2) {
if (id) {
handleGetDetails();
setCount('3');
}
......
......@@ -131,11 +131,11 @@ const BasicInfo: React.FC<queryProps> = (props) => {
useEffect(() => {
if(Object.keys(editData).length > 0) {
console.log(12131)
basicform.setFieldsValue({
details: editData.details,
memberId: 14
})
setmemberName(editData.memberName)
setmemberId(editData.memberId)
}
}, [editData])
......
......@@ -201,13 +201,13 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
})
}
// 选择会员弹框结束
useEffect(() => {
console.log(member)
// 重选会员清掉已选择的商品
setgoodsList([]);
memberRowCtl.setSelectRow(goodsList)
memberRowCtl.setSelectedRowKeys(goodsList.map(v => v.productId))
if (member.memberId !== editData.memberId) {
setgoodsList([]);
memberRowCtl.setSelectRow(goodsList)
memberRowCtl.setSelectedRowKeys(goodsList.map(v => v.productId))
}
}, [member])
// 添加商品
const addGoods = () => {
......@@ -234,7 +234,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
if (Object.keys(editData).length > 0) {
setgoodsList(editData.inquiryListProductRequests);
}
}, [])
}, [editData])
useEffect(() => {
if (visibleChannelMember) {
......
......@@ -57,6 +57,9 @@ const TradingConditions: React.FC<queryProps> = (props) => {
PublicApi.getLogisticsSelectListReceiverAddress().then(res => {
setAddress(res.data)
})
}, [])
useEffect(() => {
// 编辑时回显的数据
if(Object.keys(editData).length > 0) {
TradingConditionsForm.setFieldsValue({
......@@ -71,7 +74,8 @@ const TradingConditions: React.FC<queryProps> = (props) => {
fullAddressId: editData.fullAddressId,
})
}
}, [])
}, [editData])
const addressOnChange = (value:any, option:any) => {
getAddress(option)
}
......
......@@ -7,6 +7,7 @@ import { StopOutlined, CheckSquareOutlined, LinkOutlined } from '@ant-design/ico
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import AuditModal from '../components/auditModel';
import moment from 'moment';
import { PublicApi } from '@/services/api';
const { TabPane } = Tabs;
......@@ -160,6 +161,9 @@ const Details: React.FC<parmas> = (props) => {
})
})
}, [])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
// 外部流转记录&内部流转记录
const flowRecord = {
external: [{
......@@ -183,6 +187,7 @@ const Details: React.FC<parmas> = (props) => {
title: '操作时间',
key: 'operationTime',
dataIndex: 'operationTime',
render: (text: any, record: any) => format(text)
}, {
title: '审核意见',
key: 'auditOpinion',
......@@ -217,6 +222,7 @@ const Details: React.FC<parmas> = (props) => {
title: '操作时间',
key: 'operationTime',
dataIndex: 'operationTime',
render: (text: any, record: any) => format(text)
}, {
title: '审核意见',
key: 'auditOpinion',
......@@ -258,7 +264,7 @@ const Details: React.FC<parmas> = (props) => {
const externalTextState = (text) => {
let name = ''
console.log(data)
data.externalRequisitionFormStateResponses.forEach(element => {
data.externalInquiryListStateResponses.forEach(element => {
if (element.state === text) {
name = element.operationalProcess
}
......@@ -273,7 +279,7 @@ const Details: React.FC<parmas> = (props) => {
*/
const interiorTextState = (text) => {
let name = ''
data.interiorRequisitionFormStateResponses.forEach(element => {
data.interiorInquiryListLogResponses.forEach(element => {
if (element.state === text) {
name = element.operationalProcess
}
......@@ -329,7 +335,7 @@ const Details: React.FC<parmas> = (props) => {
inquiryQuoteOuterState(item.value) :
item.name === 'interiorState' ?
quoteOrderInternalState(item.value) :
item.value}
item.name === 'voucherTime' ? format(item.value) : item.value}
</div>
</div>
))}
......
......@@ -64,16 +64,19 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '交付日期',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
render: (text: any, record: any) => format(text)
},
{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
render: (text: any, record: any) => format(text)
},
{
title: '询价时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
render: (text: any, record: any) => format(text)
},
{
title: '外部状态',
......
......@@ -13,11 +13,15 @@ import { filterInternalState, filterExternalState } from './../../common/statusL
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../common/tableStatusList';
import EyePreview from '@/components/EyePreview';
import { timeRange } from '@/utils/index';
import moment from 'moment'
import { PublicApi } from '@/services/api';
const formActions = createFormActions();
const EnquiryOrder: React.FC<{}> = (props) => {
const ref = useRef<any>({});
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const columns: ColumnType<any>[] = [{
title: '询价单号',
key: 'inquiryListNo',
......@@ -36,14 +40,17 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '交付日期',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
render: (text: any, record: any) => format(text)
}, {
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
render: (text: any, record: any) => format(text)
}, {
title: '单据时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
render: (text: any, record: any) => format(text)
}, {
title: '外部状态',
key: 'externalState',
......@@ -63,29 +70,11 @@ const EnquiryOrder: React.FC<{}> = (props) => {
quoteOrderInternalState(text)
}];
//交易能力 询价报价 询价单查询
// const data = {
// totalCount: 1,
// data: [{
// id: 91,
// inquiryListNo: 'SD2015PPLJ',
// details: '阿珍爱上阿强',
// memberName: 'wutiaoren',
// memberId: 5,
// deliveryTime: '2020-10-14 15:37:00',
// quotationAsTime: '2020-10-13 15:37:00',
// voucherTime: '2020-10-13 15:37:00',
// externalState: 1,
// interiorState: 2
// }]
// }
const fetchData = (params?: any) => {
return new Promise((resolve, reject) => {
PublicApi.getOrderProductInquiryList({...params}).then(res => {
PublicApi.getOrderInquiryAddList({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 1000)
})
}
// 搜索
......
......@@ -46,16 +46,19 @@ const PendingSubmit: React.FC<{}> = () => {
title: '交付日期',
key: 'deliveryTime',
dataIndex: 'deliveryTime',
render: (text: any, record: any) => format(text)
},
{
title: '报价截止时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
render: (text: any, record: any) => format(text)
},
{
title: '询价时间',
key: 'voucherTime',
dataIndex: 'voucherTime',
render: (text: any, record: any) => format(text)
},
{
title: '外部状态',
......
......@@ -32,7 +32,7 @@ export const commonEnquieryOfferSchema: ISchema = {
},
"x-component-props":{
placeholder:'价单搜索'
placeholder:'价单搜索'
}
}
}
......
......@@ -32,7 +32,7 @@ export const pendingReviewSchema: ISchema = {
},
"x-component-props":{
placeholder:'价单搜索'
placeholder:'价单搜索'
}
}
}
......
import React, { useState, useRef, useEffect } from 'react';
import { history } from 'umi';
import { Button, Card, Tabs, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import BasicInfo from './components/basicInfo'; // 基本信息
import EnquiryGoods from './components/enquiryGoods'; // 询价商品
import TradingConditions from './components/tradingConditions'; // 交易条件
import Attached from './components/attached'; // 附件
import FlowRecord from './components/flowRecord'; // 流转记录
import { PublicApi } from '@/services/api'
const { TabPane } = Tabs;
const AddQuotes: React.FC<{}> = () => {
import React from 'react';
import AddQuoteForm from './addForm';
import {history} from 'umi';
const AddQuote: React.FC<{}> = () => {
const { id } = history.location.query;
const [count, setCount] = useState<string>('1')
const [inquiryNo, setInquiryLNo] = useState<any>({}); //存放用户信息
const [goodsList, setgoodsList] = useState([]); //存放商品
const [enclosureUrls, setenclosureUrls] = useState<any>([]);
const basicInfoRef = useRef<any>({});
const tradingConditionsRef = useRef<any>({});
const [editData, setEditData] = useState<any>({});
useEffect(() => {
if (id) {
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setEditData(res.data)
}
})
}
}, [])
/************* 页面的一些操作start *************/
const onSumbit = async (params: any) => {
const basicInfo = await basicInfoRef.current.validateFields();
if (count === '3') {
const tradingConditions = await tradingConditionsRef.current.validateFields();
const basicInfoData = basicInfo.data;
const tradingConditionsData = tradingConditions.data;
if (basicInfo.state && tradingConditions.state) {
const parmas = {
inquiryListProductRequests: goodsList, // 商品列表 ,InquiryListProductRequest
...basicInfoData,
...tradingConditionsData,
enclosureUrls,
inquiryListNo: inquiryNo.orderNo,
inquiryListId: inquiryNo.orderId
}
if (id) {
parmas.id = editData.id;
await PublicApi.postOrderProductQuotationUpdate(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
} else {
await PublicApi.postOrderProductQuotationAdd(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
}
} else {
message.error('有必填字段没选择,请检查!');
}
}else {
message.error('有必填字段没选择,请检查!');
}
}
// 获取到会员信息
const getMemberList = (list: any) => {
setInquiryLNo(list);
}
// 获取添加的商品列表
const getGoodsList = (list: any) => {
setgoodsList(list)
}
/************* 页面的一些操作end *************/
const handleClick = (key: string) => {
if (key === '3') {
setCount(key)
}
}
// 附件回调
const handleGetEnclosureUrls = (data: any) => {
setenclosureUrls(data)
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
}
>
<Card>
<Tabs onTabClick={handleClick}>
<TabPane tab="基本信息" key="1">
<BasicInfo
currentRef={basicInfoRef}
getMemberList={getMemberList}
editData={editData}
/>
</TabPane>
<TabPane tab="商品报价" key="2">
<EnquiryGoods
inquiryNo={inquiryNo}
getGoodsList={getGoodsList}
editData={editData}
/>
</TabPane>
<TabPane tab="其他说明" key="3">
<TradingConditions
currentRef={tradingConditionsRef}
editData={editData}
/>
</TabPane>
<TabPane tab="附件" key="4">
<Attached
editData={editData}
handleGetEnclosureUrls={handleGetEnclosureUrls}
/>
</TabPane>
<TabPane tab="流转记录" key="5">
<FlowRecord
editData={editData}
/>
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
return(
<AddQuoteForm
type={1}
/>
)
}
export default AddQuotes
\ No newline at end of file
export default AddQuote;
\ No newline at end of file
import React, { useState, useRef, useEffect } from 'react';
import { history } from 'umi';
import { Button, Card, Tabs, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import BasicInfo from './components/basicInfo'; // 基本信息
import EnquiryGoods from './components/enquiryGoods'; // 询价商品
import TradingConditions from './components/tradingConditions'; // 交易条件
import Attached from './components/attached'; // 附件
import FlowRecord from './components/flowRecord'; // 流转记录
import { PublicApi } from '@/services/api'
const { TabPane } = Tabs;
export interface parmas {
id?: any,
type?: any
}
const AddQuotes: React.FC<parmas> = (props) => {
const { id, type } = props;
const [count, setCount] = useState<string>('1')
const [inquiryNo, setInquiryLNo] = useState<any>({}); //存放用户信息
const [goodsList, setgoodsList] = useState([]); //存放商品
const [enclosureUrls, setenclosureUrls] = useState<any>([]);
const basicInfoRef = useRef<any>({});
const tradingConditionsRef = useRef<any>({});
const [editData, setEditData] = useState<any>({});
useEffect(() => {
if (id && type === 2) {
PublicApi.getOrderProductQuotationDetails({ id }).then(res => {
if (res.code === 1000) {
setEditData(res.data);
setInquiryLNo({
orderNo: res.data.inquiryListNo,
orderId: res.data.id
})
setenclosureUrls(res.data.enclosureUrls)
}
})
} else if( id && type === 3) {
// 报价
PublicApi.getOrderProductInquiryDetails({ id }).then(res => {
if (res.code === 1000) {
setEditData(res.data);
setInquiryLNo({
orderNo: res.data.inquiryListNo,
orderId: res.data.id
})
setenclosureUrls(res.data.enclosureUrls)
}
})
}
}, [])
/************* 页面的一些操作start *************/
const onSumbit = async (params: any) => {
const basicInfo = await basicInfoRef.current.validateFields();
if (count === '3') {
const tradingConditions = await tradingConditionsRef.current.validateFields();
const basicInfoData = basicInfo.data;
const tradingConditionsData = tradingConditions.data;
if (basicInfo.state && tradingConditions.state) {
const parmas = {
inquiryListProductRequests: goodsList, // 商品列表 ,InquiryListProductRequest
...basicInfoData,
...tradingConditionsData,
enclosureUrls,
inquiryListNo: inquiryNo.orderNo,
inquiryListId: inquiryNo.orderId
}
if (id && type === 2) {
parmas.id = editData.id;
await PublicApi.postOrderProductQuotationUpdate(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
} else {
await PublicApi.postOrderProductQuotationAdd(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
}
} else {
message.error('有必填字段没选择,请检查!');
}
}else {
message.error('有必填字段没选择,请检查!');
}
}
// 获取到会员信息
const getMemberList = (list: any) => {
setInquiryLNo(list);
}
// 获取添加的商品列表
const getGoodsList = (list: any) => {
setgoodsList(list)
}
/************* 页面的一些操作end *************/
const handleClick = (key: string) => {
if (key === '3') {
setCount(key)
}
}
// 附件回调
const handleGetEnclosureUrls = (data: any) => {
setenclosureUrls(data)
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
}
>
<Card>
<Tabs onTabClick={handleClick}>
<TabPane tab="基本信息" key="1" forceRender>
<BasicInfo
currentRef={basicInfoRef}
getMemberList={getMemberList}
editData={editData}
/>
</TabPane>
<TabPane tab="商品报价" key="2" forceRender>
<EnquiryGoods
inquiryNo={inquiryNo}
getGoodsList={getGoodsList}
editData={editData}
type={type}
/>
</TabPane>
<TabPane tab="其他说明" key="3" forceRender>
<TradingConditions
currentRef={tradingConditionsRef}
editData={editData}
/>
</TabPane>
<TabPane tab="附件" key="4" forceRender>
<Attached
editData={editData}
handleGetEnclosureUrls={handleGetEnclosureUrls}
/>
</TabPane>
<TabPane tab="流转记录" key="5" forceRender>
<FlowRecord
editData={editData}
/>
</TabPane>
</Tabs>
</Card>
</PageHeaderWrapper>
)
}
export default AddQuotes
\ No newline at end of file
......@@ -6,8 +6,8 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { ISchema } from '@formily/antd';
import ModalTable from '@/components/ModalTable'
import { PublicApi } from '@/services/api'
import StatusColors from '@/pages/transaction/components/StatusColors'
import { quoteOrderInternalState } from '../../../common/tableStatusList';
import moment from 'moment';
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../../common/tableStatusList';
const layout: any = {
colon: false,
......@@ -25,13 +25,13 @@ interface queryProps {
const BasicInfo: React.FC<queryProps> = (props) => {
const [basicform] = Form.useForm();
const { getMemberList, currentRef, editData } = props;
console.log(editData, 10086)
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [inquiryNo, setinquiryNo] = useState<any>({});
const [inquiryRowSelection, inquiryRowCtl] = useRowSelectionTable({ customKey: 'orderId', type: 'radio' });
const handleOkAddMember = () => {
setVisibleChannelMember(false)
console.log(inquiryRowCtl.selectRow[0])
setinquiryNo(inquiryRowCtl.selectRow[0]);
getMemberList(inquiryRowCtl.selectRow[0]); // 回传给父级
}
......@@ -73,24 +73,11 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
}
// 模拟数据
// const data = {
// totalCount: 1,
// data: [{
// orderId: 6,
// orderNo: 'SZ1008',
// details: '可可西',
// memberName: '超级会员',
// documentTime: '2020-10-20 11:22:00',
// }]
// }
const fetchMemberList = async (params) => {
return new Promise((resolve, reject) => {
PublicApi.postOrderCorrespondingInquiryNumber({...params}).then(res => {
resolve(res.data)
})
// setTimeout(() => {
// resolve(data)
// }, 500)
});
}
// 选择会员弹框结束
......@@ -109,7 +96,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
state: true,
data: {
details: values.details,
memberName: values.memberName,
inquiryListNo: values.inquiryListNo,
}
})
}).catch(errorInfo => {
......@@ -136,9 +123,17 @@ const BasicInfo: React.FC<queryProps> = (props) => {
basicform.setFieldsValue({
details: editData.details
})
setinquiryNo({
orderId: editData.id,
orderNo: editData.inquiryListNo
});
}
}, [editData])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
/************* 页面的一些操作end *************/
return (
<>
......@@ -155,22 +150,22 @@ const BasicInfo: React.FC<queryProps> = (props) => {
{Object.keys(inquiryNo).length > 0 && <Button type='link'>查看询价单详情</Button>}
</Form.Item>
<Form.Item label='报价单号' name='quotationNo'>
<span>{Object.keys(editData).length > 0 ? editData.inquiryListNo : '-'}</span>
<span>{Object.keys(editData).length > 0 ? editData.quotationNo : '-'}</span>
</Form.Item>
<Form.Item label='询价会员' name='memberName'>
<span>{Object.keys(editData).length > 0 ? editData.voucherTime : '-'}</span>
<span>{Object.keys(editData).length > 0 ? editData.memberName : '-'}</span>
</Form.Item>
<Form.Item label='报价截止时间' name='quotationAsTime'>
<span>{Object.keys(editData).length > 0 ? editData.inquiryListNo : '-'}</span>
<span>{Object.keys(editData).length > 0 ? format(editData.quotationAsTime): '-'}</span>
</Form.Item>
<Form.Item label='单据时间' name='voucherTime'>
<span>{Object.keys(editData).length > 0 ? editData.voucherTime : '-'}</span>
<span>{Object.keys(editData).length > 0 ? format(editData.deliveryTime) : '-'}</span>
</Form.Item>
<Form.Item label='外部状态' name='externalState'>
<span>{Object.keys(editData).length > 0 ? <StatusColors status={editData.inquiryListNo} type='out' /> : '-'}</span>
<span>{Object.keys(editData).length > 0 ? inquiryQuoteOuterState(editData.externalState) : '-'}</span>
</Form.Item>
<Form.Item label='内部状态' name='interiorState'>
<span>{Object.keys(editData).length > 0 ? quoteOrderInternalState(editData.inquiryListNo) : '-'}</span>
<span>{Object.keys(editData).length > 0 ? quoteOrderInternalState(editData.interiorState) : '-'}</span>
</Form.Item>
</Form>
{/* 选择会员弹框 */}
......
......@@ -7,31 +7,22 @@ import { PublicApi } from '@/services/api';
interface queryProps {
inquiryNo?: any,
getGoodsList: Function,
editData: any
editData: any,
type?: any
}
const EnquiryGoods: React.FC<queryProps> = (props) => {
const { inquiryNo, getGoodsList, editData,} = props
const { inquiryNo, getGoodsList, editData, type } = props
// 会员添加弹窗控制
const [goodsList, setgoodsList] = useState([{
productId: 1,
productName: '进口头层黄牛皮荔枝纹/红色/XXL',
inquiryListNo: 'sx1002x',
brand: 'PELLE',
nuit: '个',
purchaseQuantity: 100,
money: 200,
pric: 100
}]);
const [goodsList, setgoodsList] = useState([]);
/**输入框输入 */
const inputOnchange = (id, e) => {
const {value} = e.target
const { value } = e.target
goodsList.forEach(v => {
if(v.productId === id) {
v.purchaseQuantity = value
if (v.productId === id) {
v.money = value
}
})
getGoodsList(goodsList) // 返回给父级
......@@ -63,7 +54,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
title: '金额',
dataIndex: 'money',
render: (text: any, record: any) => (
<Form.Item name={record.productId} noStyle initialValue={record.purchaseQuantity}>
<Form.Item name={record.productId} noStyle initialValue={record.money}>
<Input
addonBefore="¥"
onBlur={(e) => inputOnchange(record.productId, e)}
......@@ -75,20 +66,20 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}]
useEffect(() => {
if(Object.keys(inquiryNo).length > 0 && inquiryNo.orderId) {
PublicApi.getOrderProductInquiryDetails({id: inquiryNo.orderId}).then(res => {
if(res.code === 1000) {
if (Object.keys(inquiryNo).length > 0 && inquiryNo.orderId) {
console.log(123)
PublicApi.getOrderProductInquiryDetails({ id: inquiryNo.orderId }).then(res => {
if (res.code === 1000) {
getGoodsList(res.data.inquiryListProductRequests)
setgoodsList(res.data.inquiryListProductRequests)
}
})
}
// 询价单重选,清空数据
setgoodsList([])
}, [inquiryNo])
// 编辑时回显的数据
useEffect(() => {
if(Object.keys(editData).length > 0) {
if (Object.keys(editData).length > 0) {
setgoodsList(editData.inquiryListProductRequests);
}
}, [])
......
......@@ -49,9 +49,12 @@ const TradingConditions: React.FC<queryProps> = (props) => {
currentRef.current = userAction;
}
}
}, [])
useEffect(() => {
// 编辑时回显的数据
if(Object.keys(editData).length > 0) {
console.log(editData, 10086)
TradingConditionsForm.setFieldsValue({
paymentType: editData.paymentType,
taxes: editData.taxes,
......@@ -62,7 +65,8 @@ const TradingConditions: React.FC<queryProps> = (props) => {
minimumOrder: editData.minimumOrder
})
}
}, [])
}, [editData])
return (
<Form
{...layout}
......
import React from 'react';
import AddQuoteForm from './addForm';
import {history} from 'umi';
const EditQuote: React.FC<{}> = () => {
const { id } = history.location.query;
return(
<AddQuoteForm
id={id}
type={2}
/>
)
}
export default EditQuote;
\ No newline at end of file
import React from 'react';
import AddQuoteForm from './addForm';
import {history} from 'umi';
const Quote: React.FC<{}> = () => {
const { id } = history.location.query;
return(
<AddQuoteForm
id={id}
type={3}
/>
)
}
export default Quote;
\ No newline at end of file
......@@ -57,7 +57,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add?id=${record.id}`}>报价</Link></Button>
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/quote?id=${record.id}`}>报价</Link></Button>
}];
//交易能力 询价报价 询价单查询
// const data = {
......
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