Commit 0eb055f0 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

询价报价

parent edd89a9a
......@@ -64,7 +64,7 @@ const PendingReviewOne: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
......
......@@ -64,7 +64,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { Card, Button, Row, Col, message } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -97,22 +97,22 @@ const PendingSubmit: React.FC<{}> = () => {
</Row>
/**列表数据 */
const data = {
totalCount: 2,
data: [{
id: 1,
quotationNo: 'BPTY12',
inquiryListNo: 'SZX125KJS',
details: '模拟的数据',
memberName: '冰红茶',
memberId: 10,
deliveryTime: '2020-10-13 13:59:00',
quotationAsTime: '2020-10-13 23:59:00',
voucherTime: '2020-10-13 13:59:00',
externalState: 1,
interiorState: 1
}]
}
// const data = {
// totalCount: 2,
// data: [{
// id: 1,
// quotationNo: 'BPTY12',
// inquiryListNo: 'SZX125KJS',
// details: '模拟的数据',
// memberName: '冰红茶',
// memberId: 10,
// deliveryTime: '2020-10-13 13:59:00',
// quotationAsTime: '2020-10-13 23:59:00',
// voucherTime: '2020-10-13 13:59:00',
// externalState: 1,
// interiorState: 1
// }]
// }
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
......@@ -137,9 +137,14 @@ const PendingSubmit: React.FC<{}> = () => {
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(selectRow.length > 0) {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的审核报价单!')
}
}
const handleModalOK = () => {
setvisible(false)
......
......@@ -155,9 +155,13 @@ const AddInquiryOrder: React.FC<{}> = () => {
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtAll({ ids: ids }).then(res => {
ref.current.reload()
})
if (selectRow.length > 0) {
PublicApi.postOrderProductQuotationtAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的审核报价单!')
}
}
//批量删除
const handleBatchDelete = () => {
......@@ -221,7 +225,7 @@ const AddInquiryOrder: React.FC<{}> = () => {
</Card>
<AuditModal
id={id}
type={1}
type={4}
dialogVisible={visible}
onCancel={() => setvisible(false)}
onOK={handleModalOK}
......
......@@ -11,7 +11,7 @@ const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks;
export interface Params {
id: number | string;
type: number | string; //1.询价报价-待新增提交审核,2.询价报价-待审核报价单(一级),3.询价报价-待审核报价单(二级)
type: number | string; //1.待提交报价单,2.询价报价-待审核报价单(一级),3.询价报价-待审核报价单(二级),4.询价报价-待新增提交审核
dialogVisible: boolean;
onCancel: Function;
onOK?: Function;
......@@ -37,21 +37,28 @@ const AuditModal: React.FC<Params> = (props) => {
switch (props.type) {
case 1:
PublicApi.postOrderProductQuotationtToSubmit(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 2:
PublicApi.postOrderProductQuotationtAuditSubmit(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 3:
PublicApi.postOrderProductQuotationtAuditSubmitTwo(value).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
props.onOK()
}
})
break;
case 4:
PublicApi.postOrderProductQuotationtSubmit(value).then(res => {
if (res.code === 1000) {
props.onOK()
}
})
......
import React, { useRef, useEffect } from 'react';
import {Link} from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button } from 'antd';
import { StandardTable } from 'god';
......@@ -56,7 +57,7 @@ const EnquiryOrder: React.FC<{}> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button type='link'>报价</Button>
render: (text: any, record: any) => <Button type='link'><Link to={`/memberCenter/tranactionAbility/inquiryQuote/addInquiryOrder/add?id=${record.id}`}>报价</Link></Button>
}];
//交易能力 询价报价 询价单查询
// const data = {
......
......@@ -64,7 +64,7 @@ const PendingReviewOne: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
const column: ColumnType<any>[] = [{
......
......@@ -64,7 +64,7 @@ const PendingReviewTwo: React.FC<{}> = () => {
})
})
} else {
message.error('请选择要操作的价单!')
message.error('请选择要操作的价单!')
}
}
const column: ColumnType<any>[] = [{
......
import React, { useRef, useState, useEffect } from 'react';
import { Card, Button, Row, Col } from 'antd';
import { Card, Button, Row, Col, message } from 'antd';
import { history, Link } from 'umi'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { StandardTable } from 'god';
......@@ -136,9 +136,14 @@ const PendingSubmit: React.FC<{}> = () => {
}
/**批量审核 */
const handleSubmitAll = (ids: number[]) => {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
if(selectRow.length > 0) {
PublicApi.postOrderProductQuotationtToSubmitAll({ ids: ids }).then(res => {
ref.current.reload()
})
} else {
message.error('请选择要操作的报价单!')
}
}
const handleModalOK = () => {
......
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