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

询价报价

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