Commit 91aeb51e authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

修改商品询价, 确认询价报价,支付配置需求单审核等细节问题

parent 26c150fa
......@@ -28,7 +28,7 @@ export const productModalByMemberSchema: ISchema = {
},
},
properties: {
categoryId: {
customerCategoryId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
......
......@@ -21,7 +21,7 @@ import {
FormEffectHooks,
useFormEffects
} from '@formily/antd'
import { history } from 'umi'
import { history, Prompt } from 'umi'
import { Row, Col, Card, Button, Popconfirm, Select as ISelect } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
......@@ -443,6 +443,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
</Col>
</Row>
</Card>
<Prompt message="您还有未保存的内容,是否确定要离开" />
</PageHeaderWrapper>
)
}
......
......@@ -252,7 +252,7 @@ const PaySetting: React.FC<{}> = () => {
}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.push('/memberCenter/home')
history.push('/memberCenter/payandSettle/paySetting/payParamsSetting')
}, 1500)
}
})
......
import React, { Component,ReactNode } from 'react';
import {Badge, Tag} from 'antd'
import statuStyle from './colorTag'
import { PublicApi } from '@/services/api';
/****** *********************** 需求单 ************************** */
/**
* @description: 需求提交一级
......@@ -259,3 +261,24 @@ export const demandQuoteInteriorState = (text:any) => {
}
/********************************需求发布******************************* */
// 询价查询, 询价报价, 确认询价报价单 通用外部状态
// export const generalExternalState = (status:any) => {
// let component: ReactNode = null;
// PublicApi.getOrderQuotationExternalStateEnum().then(res => {
// if(res.code === 1000) {
// }
// })
// }
// 询价查询, 询价报价, 确认询价报价单 通用内部状态
// export const generalInteriorState = (status:any) => {
// let component: ReactNode = null;
// PublicApi.getOrderProductInquiryInteriorStateEnum().then(res => {
// if(res.code === 1000) {
// }
// })
// }
......@@ -121,7 +121,7 @@ const PendingSubmit: React.FC<{}> = () => {
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
if(selectRow.length > 0) {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
PublicApi.postOrderNotarizeEnquiryQuotedPriceAffirmAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
......
......@@ -981,7 +981,7 @@ const Detail: React.FC<{}> = () => {
backIcon={<ReutrnEle description="返回" />}
// title={headerTitle}
extra={
<Button type="primary" onClick={handleSubmitTabForm}> 保存</Button>
<Button type="primary" onClick={handleSubmitTabForm} > 保存</Button>
}
>
<Card>
......
......@@ -15,7 +15,8 @@ import {
Col,
Dropdown,
Menu,
Popconfirm
Popconfirm,
message
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
......@@ -163,16 +164,25 @@ const List:React.FC<{}> = () => {
* @return {type}
*/
const handleDelete = (arr:number[]| string[]) => {
PublicApi.postOrderQuotationDelete({ ids: arr }).then(res => {
ref.current.reload()
})
if(arr.length > 0) {
PublicApi.postOrderQuotationDelete({ ids: arr }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的需求报价单!')
}
}
//批量提交
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderQuotationSubmitAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(ids.length > 0) {
PublicApi.postOrderQuotationSubmitAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的需求报价单!')
}
}
//提交审核
......
......@@ -483,7 +483,7 @@ const detailInfo: React.FC<parmas> = (props) => {
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
需求单号:{dataInfo.logisticsOrderNo}
需求单号:{dataInfo.requisitionFormNo}
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
......
import { ISchema} from '@formily/antd'
import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList'
import { TimeList } from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
import { PublicApi } from '@/services/api'
/**
* @description: 公用
......@@ -9,98 +10,91 @@ import TranactionRoute from 'config/routes/tranactionRoute'
* @return {type}
*/
export const enquierySchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
"x-component-props":{
grid:true
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
grid: true
},
properties:{
ctl:{
type:'object',
"x-component":"Children",
"x-component-props":{
children:"{{controllerBtns}}"
properties: {
ctl: {
type: 'object',
"x-component": "Children",
"x-component-props": {
children: "{{controllerBtns}}"
}
},
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
requisitionFormNo: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props":{
placeholder:'搜索'
"x-component-props": {
placeholder: '搜索'
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
flexWrap:'nowrap'
[FORM_FILTER_PATH]: {
type: 'object',
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
flexWrap: 'nowrap'
},
colStyle:{
colStyle: {
marginLeft: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
properties: {
PRO_LAYOUT: {
type: 'object',
"x-component": 'mega-layout',
"x-mega-props": {
span: 5
},
"x-component-props":{
"x-component-props": {
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'需求摘要'
properties: {
details: {
type: 'string',
"x-component-props": {
placeholder: '需求摘要'
}
},
category:{
type:'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px', lineHeight: '32px' },
searchValue: null,
dataoption: []
category: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch: PublicApi.getProductSelectGetSelectCustomerCategory,
style: {
width: 160
}
}
// "x-component-props":{
// placeholder:'请选择品类'
// },
// enum:[]
},
voucherTime:{
type:'string',
voucherTime: {
type: 'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
"x-component-props": {
placeholder: '请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
span:1
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props":{
children:'查询'
"x-component-props": {
children: '查询'
}
}
}
......@@ -114,50 +108,50 @@ export const enquierySchema: ISchema = {
* @return {type}
*/
export const enquierySearchSchema: ISchema = {
type:'object',
properties:{
megalayout:{
type:'object',
"x-component":'mega-layout',
properties:{
requisitionFormNo:{
type:'string',
"x-component":"Search",
"x-mega-props":{
type: 'object',
properties: {
megalayout: {
type: 'object',
"x-component": 'mega-layout',
properties: {
requisitionFormNo: {
type: 'string',
"x-component": "Search",
"x-mega-props": {
},
"x-component-props":{
placeholder:'搜索',
"x-component-props": {
placeholder: '搜索',
align: 'flex-left',
}
}
}
},
[FORM_FILTER_PATH]:{
type:'object',
"x-component":"flex-layout",
"x-component-props":{
rowStyle:{
[FORM_FILTER_PATH]: {
type: 'object',
"x-component": "flex-layout",
"x-component-props": {
rowStyle: {
justifyContent: 'flex-start',
flexWrap:'nowrap'
flexWrap: 'nowrap'
},
colStyle:{//改变间隔
colStyle: {//改变间隔
marginRight: 20
}
},
properties:{
PRO_LAYOUT:{
type:'object',
"x-component":'mega-layout',
"x-mega-props":{
properties: {
PRO_LAYOUT: {
type: 'object',
"x-component": 'mega-layout',
"x-mega-props": {
span: 5
},
"x-component-props":{
"x-component-props": {
inline: true
},
properties:{
category:{
type:'string',
properties: {
category: {
type: 'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品类',
......@@ -175,23 +169,23 @@ export const enquierySearchSchema: ISchema = {
// },
// enum:[]
},
voucherTime:{
type:'string',
voucherTime: {
type: 'string',
// default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
"x-component-props": {
placeholder: '请选择单据时间'
},
enum: TimeList
},
}
},
sumbit:{
"x-component":'Submit',
"x-mega-props":{
sumbit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props":{
children:'查询'
"x-component-props": {
children: '查询'
}
}
}
......
......@@ -15,7 +15,8 @@ import {
Col,
Dropdown,
Menu,
Popconfirm
Popconfirm,
message
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
......@@ -167,16 +168,25 @@ const List:React.FC<{}> = () => {
* @return {type}
*/
const handleDelete = (arr:number[]) => {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
if(arr.length > 0) {
PublicApi.postOrderRequisitionFormDeleteAll({ ids: arr }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的需求单');
}
}
//批量提交
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderNewRequisitionFormAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(ids.length > 0) {
PublicApi.postOrderNewRequisitionFormAuditAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的需求单');
}
}
//提交审核
......
......@@ -17,7 +17,7 @@ export interface parmas {
spam_id?: any
}
const AddQuotes: React.FC<parmas> = (props) => {
const {id, type, spam_id} = props
const { id, type, spam_id } = props
const [count, setCount] = useState<string>('1');
const [member, setmember] = useState<any>({}); //存放用户信息
const [goodsList, setgoodsList] = useState([]); //存放商品
......@@ -26,6 +26,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
const [editData, setEditData] = useState<any>({});
const [address, setaddress] = useState<any>({});
const [enclosureUrls, setenclosureUrls] = useState<any>([]);
const [loading, setloading] = useState<boolean>(false);
const handleGetDetails = async () => {
await PublicApi.getOrderInquiryListDetails({ id }).then(res => {
if (res.code === 1000) {
......@@ -42,7 +43,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
if (id && type === 2) {
handleGetDetails();
setCount('3');
} else if(id && type === 3) {
} else if (id && type === 3) {
const data = JSON.parse(sessionStorage.getItem(spam_id));
const inquiryGoods: any[] = [];
inquiryGoods.push({
......@@ -72,42 +73,41 @@ const AddQuotes: React.FC<parmas> = (props) => {
}, [])
//提交
const onSumbit = async (params: any) => {
setloading(true);
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,
...address,
enclosureUrls,
memberName: member.name,
memberId: member.memberId
}
if (id && type === 2) {
parmas.id = editData.id;
parmas.interiorInquiryListLogResponses = editData.interiorInquiryListLogResponses;
parmas.externalInquiryListLogResponses = editData.externalInquiryListLogResponses;
await PublicApi.postOrderInquiryListUpdate(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
} else {
await PublicApi.postOrderInquiryListAdd(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
})
}
const tradingConditions = await tradingConditionsRef.current.validateFields();
const basicInfoData = basicInfo.data;
const tradingConditionsData = tradingConditions.data;
console.log(basicInfo,tradingConditions, 100086)
if (basicInfo.state && tradingConditions.state) {
const parmas = {
inquiryListProductRequests: goodsList, // 商品列表 ,InquiryListProductRequest
...basicInfoData,
...tradingConditionsData,
...address,
enclosureUrls,
memberName: member.name,
memberId: member.memberId
}
if (id && type === 2) {
parmas.id = editData.id;
parmas.interiorInquiryListLogResponses = editData.interiorInquiryListLogResponses;
parmas.externalInquiryListLogResponses = editData.externalInquiryListLogResponses;
await PublicApi.postOrderInquiryListUpdate(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
} else { setloading(false); }
})
} else {
message.error('有必填字段没选择,请检查!');
await PublicApi.postOrderInquiryListAdd(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
} else { setloading(false); }
})
}
}else {
} else {
message.error('有必填字段没选择,请检查!');
setloading(false);
}
}
// 获取到会员信息
......@@ -127,12 +127,12 @@ const AddQuotes: React.FC<parmas> = (props) => {
const handleGetAddress = (value: any) => {
setaddress({
fullAddress: value.children,
fullAddressId: value.value
fullAddressId: value.value
})
}
// 附件回调
const handleGetEnclosureUrls = (data: any) => {
setenclosureUrls([...enclosureUrls,...data]);
setenclosureUrls([...enclosureUrls, ...data]);
}
return (
......@@ -140,7 +140,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
<Button type="primary" onClick={onSumbit} loading={loading}> 保存</Button>
}
>
<Card>
......@@ -175,7 +175,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
/>
</TabPane>
<TabPane tab="流转记录" key="5" forceRender>
<FlowRecord
<FlowRecord
editData={editData}
/>
</TabPane>
......
......@@ -8,6 +8,7 @@ import ModalTable from '@/components/ModalTable'
import { PublicApi } from '@/services/api'
import { history } from 'umi'
import { quoteOrderInternalState, inquiryQuoteOuterState } from '../../../common/tableStatusList';
import moment from 'moment';
const layout: any = {
colon: false,
......@@ -24,6 +25,9 @@ interface queryProps {
}
const BasicInfo: React.FC<queryProps> = (props) => {
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const [basicform] = Form.useForm();
const { getMemberList, currentRef, editData, type } = props;
// 会员添加弹窗控制
......@@ -112,7 +116,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
})
}).catch(errorInfo => {
console.log(errorInfo)
resolve({state: false})
})
})
}
......@@ -159,7 +163,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
<span>{(Object.keys(editData).length > 0 && editData.inquiryListNo) ? editData.inquiryListNo : '-'}</span>
</Form.Item>
<Form.Item label='单据时间' name='time'>
<span>{(Object.keys(editData).length > 0 && editData.voucherTime) ? editData.voucherTime : '-'}</span>
<span>{(Object.keys(editData).length > 0 && editData.voucherTime) ? format(editData.voucherTime) : '-'}</span>
</Form.Item>
<Form.Item label='外部状态' name='external'>
<span>{(Object.keys(editData).length > 0 && editData.externalState) ? inquiryQuoteOuterState(editData.externalState) : '-'}</span>
......@@ -174,6 +178,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visibleChannelMember}
forceRender={visibleChannelMember}
resetModal={{destroyOnClose: true, forceRender: true}}
columns={columnsSetMember}
rowSelection={memberRowSelection}
......
......@@ -35,7 +35,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' });
const [customerCategory, setcustomerCategory] = useState<any>([]);
const [brand, setbrand] = useState<any>([]);
const [form] = Form.useForm()
const handleOkAddMember = () => {
setVisibleChannelMember(false);
const arr: any[] = [];
......@@ -84,77 +84,6 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
key: 'brandName',
}
]
const formSearch: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '商品名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
customerCategoryId: {
type: 'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '请选择品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px', lineHeight: '32px' },
searchValue: null,
dataoption: []
},
enum: customerCategory
},
brandId: {
type: 'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '请选择品牌',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px', lineHeight: '32px' },
searchValue: null,
dataoption: []
},
enum: brand
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
/**输入框输入 */
const inputOnchange = (id, e) => {
const { value } = e.target
......@@ -186,7 +115,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
title: '采购数量',
dataIndex: 'purchaseCount',
render: (text: any, record: any) => (
<Form.Item name={record.productId} noStyle initialValue={record.purchaseQuantity}>
<Form.Item name={record.productId} noStyle initialValue={record.purchaseCount}>
<InputNumber
onBlur={(e) => inputOnchange(record.productId, e)}
min={1}
......@@ -226,6 +155,11 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
message.error('请选择被询价会员')
}
}
useEffect(() => {
form.resetFields();
}, [])
// 删除
const handleDelete = (record) => {
const newData = [...goodsList];
......@@ -268,7 +202,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
return (
<div className={styles.revise_style}>
<Button disabled={type === 3} block type='dashed' onClick={addGoods}><PlusOutlined />添加商品</Button>
<Form>
<Form form={form}>
<Table rowKey={'productId'} style={{ marginTop: '16px' }} columns={columns} dataSource={goodsList} pagination={false} />
</Form>
{/* 选择商品弹框 */}
......@@ -279,27 +213,11 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
cancel={handleCancelAddMember}
visible={visibleChannelMember}
forceRender={visibleChannelMember}
resetModal={{ destroyOnClose: true}}
resetModal={{destroyOnClose: true, forceRender: true}}
columns={columnsSetMember}
rowSelection={memberRowSelection}
fetchTableData={params => fetchGoodsList(params)}
formilyProps={
{
ctx: {
schema: formSearch,
actions: productFormActions,
components: { ModalSearch: Search, SearchSelect, Submit },
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
modalType='productByMember'
tableProps={{
rowKey: 'id'
}}
......
......@@ -60,7 +60,7 @@ const FlowRecord: React.FC<parmas> = (props) => {
}, {
title: '操作时间',
dataIndex: 'operationTime',
render: (text: any, record: any) => interiorTextState(text)
render: (text: any, record: any) => format(text)
}, {
title: '审核意见',
dataIndex: 'auditOpinion',
......@@ -80,7 +80,7 @@ const FlowRecord: React.FC<parmas> = (props) => {
}, {
title: '状态',
dataIndex: 'state',
render: (text: any, record: any) => format(text)
render: (text: any, record: any) => interiorTextState(text)
}, {
title: '操作',
dataIndex: 'operation',
......@@ -103,14 +103,14 @@ const FlowRecord: React.FC<parmas> = (props) => {
</Radio.Group>
{radio === 'outer' ?
<PolymericTable
dataSource={editData.interiorInquiryListLogResponses}
dataSource={editData.externalInquiryListLogResponses}
columns={outerColumns}
loading={false}
pagination={null}
/>
:
<PolymericTable
dataSource={editData.externalInquiryListLogResponses}
dataSource={editData.interiorInquiryListLogResponses}
columns={insideColumns}
loading={false}
pagination={null}
......
......@@ -37,7 +37,7 @@ const TradingConditions: React.FC<queryProps> = (props) => {
}
})
}).catch(errorInfo => {
message.error('有必填字段没选择,请检查!');
resolve({state: false})
})
})
}
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col, Popconfirm } from 'antd';
import { Card, Button, Row, Col, Popconfirm , message} from 'antd';
import { history } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -139,9 +139,14 @@ const PendingSubmit: React.FC<{}> = () => {
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderInquirySubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(ids.length > 0) {
PublicApi.postOrderInquirySubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的询价单!')
}
}
const handleModalOK = () => {
setvisible(false)
......
......@@ -24,6 +24,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
const basicInfoRef = useRef<any>({});
const tradingConditionsRef = useRef<any>({});
const [editData, setEditData] = useState<any>({});
const [loading, setloading] = useState<boolean>(false);
useEffect(() => {
if (id && type === 2) {
......@@ -54,6 +55,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
/************* 页面的一些操作start *************/
const onSumbit = async (params: any) => {
setloading(true);
const basicInfo = await basicInfoRef.current.validateFields();
if (count === '3') {
const tradingConditions = await tradingConditionsRef.current.validateFields();
......@@ -73,20 +75,22 @@ const AddQuotes: React.FC<parmas> = (props) => {
await PublicApi.postOrderProductQuotationUpdate(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
} else {setloading(false);}
})
} else {
await PublicApi.postOrderProductQuotationAdd(parmas).then(res => {
if (res.code === 1000) {
history.goBack();
}
} else {setloading(false);}
})
}
} else {
message.error('有必填字段没选择,请检查!');
setloading(false);
}
}else {
message.error('有必填字段没选择,请检查!');
setloading(false);
}
}
// 获取到会员信息
......@@ -113,7 +117,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
<Button type="primary" onClick={onSumbit} loading={loading}> 保存</Button>
}
>
<Card>
......
......@@ -38,7 +38,7 @@ const AddInquiryOrder: React.FC<{}> = () => {
render: (text: any, record: any) => <EyePreview
url={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/rfq/preview?id=${record.inquiryListId}`}>{text}</EyePreview>
}, {
title: '报价单摘要',
title: '报价单摘要',
key: 'details',
dataIndex: 'details',
}, {
......
......@@ -67,7 +67,7 @@ const ReviewList: React.FC<parmas> = (props) => {
render: (text: any, record: any) => format(text)
},
{
title: '询价时间',
title: '单据时间',
key: 'createTime',
dataIndex: 'createTime',
render: (text: any, record: any) => format(text)
......@@ -94,7 +94,7 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link' disabled={record.interiorState === 1} onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
render: (text: any, record: any) => <Button type='link' disabled={record.interiorState === 1} onClick={() => { setId(record.id); setvisible(true); }}>审核</Button>
},
]
const format = (text) => {
......@@ -160,12 +160,12 @@ const ReviewList: React.FC<parmas> = (props) => {
</StandardTable>
</Card>
<AuditModal
<AuditModal
id={id}
type={type}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={ handleModalOK}
onOK={handleModalOK}
/>
</PageHeaderWrapper>
)
......
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