Commit 08b88e6f authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

询价单详情接口接入

parent 3c712445
......@@ -37,15 +37,16 @@ export const interiorStateTwo = (text:any) => {
* @return {type} 内
*/
export const enquirySearchInteriorState = (text:any) => {
export const enquirySearchInteriorState = (text:any) => {
//内部状态:1.新增需求单 2.审核通过 3.审核通过 4.待提交需求单 5.审核通过 6.审核不通过 7.取消报价单
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="新增需求单" />:
text === 2 ? component = <Badge color="#FFC400" text="审核需求单一级" />:
text === 3 ? component = <Badge color="#FFC400" text="审核需求单二级" />:
text === 2 ? component = <Badge color="#FFC400" text="审核通过" />:
text === 3 ? component = <Badge color="#FFC400" text="审核通过" />:
text === 4 ? component = <Badge status='processing' text="待提交需求单" />:
text === 5 ? component = <Badge status='success' text="完成" />:
text === 5 ? component = <Badge status='success' text="审核通过" />:
text === 6 ? component = <Badge status='error' text="审核不通过" />:
component = <Badge status="default" text="取消需求单" />
component = <Badge status="default" text="取消报价单" />
return component;
}
/**
......@@ -65,14 +66,15 @@ export const enquirySearchexternalState = (text:any) => {
return component;
}
export const enquirySearchexternalState2 = (text:any) => {
export const enquirySearchexternalState2 = (text:any) => {
//外部状态:1.待提交需求单 2.待审核需求单 3.待提交报价单 4.待确认报价单 5.接受报价 6.不接受报价 7.取消报价单
let component: ReactNode = null;
text === 1 ? component = <span style={statuStyle.default}>待提交需求单</span>:
text === 2 ? component = <span style={statuStyle.warn}>提交报价</span>:
text === 3 ? component = <span style={statuStyle.confirm}>提交报价单</span>:
text === 4 ? component = <span style={statuStyle.confirm}>确认报价单</span>:
text === 5 ? component = <span style={statuStyle.success}>完成</span>:
text === 6 ? component = <span style={statuStyle.Error}>审核不通过</span>:
text === 2 ? component = <span style={statuStyle.warn}>待审核需求</span>:
text === 3 ? component = <span style={statuStyle.confirm}>提交报价单</span>:
text === 4 ? component = <span style={statuStyle.confirm}>确认报价单</span>:
text === 5 ? component = <span style={statuStyle.success}>接受报价</span>:
text === 6 ? component = <span style={statuStyle.Error}>不接受报价</span>:
component = <span style={statuStyle.default}>取消报价单</span>
return component;
}
......
......@@ -31,7 +31,7 @@ export const enquierySchema: ISchema = {
},
"x-component-props":{
placeholder:'搜索'
placeholder:'需求单号'
}
}
}
......@@ -64,11 +64,17 @@ export const enquierySchema: ISchema = {
placeholder:'需求摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'需求会员'
}
},
category:{
type:'string',
'x-component': 'CustomInputSearch',
'x-component-props': {
placeholder: '商品品类',
placeholder: '品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
......@@ -83,13 +89,12 @@ export const enquierySchema: ISchema = {
// },
// enum:[]
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
"[startVoucherTime,endVoucherTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间',
}
},
}
},
......@@ -247,7 +252,7 @@ export const enquierySearchSchema: ISchema = {
},
"x-component-props":{
placeholder:'搜索',
placeholder:'需求单号',
align: 'flex-left',
}
}
......@@ -276,38 +281,73 @@ export const enquierySearchSchema: ISchema = {
inline: true
},
properties:{
details:{
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
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: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
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: []
}
// "x-component-props":{
// placeholder:'请选择品类'
// },
// enum:[]
},
"[startVoucherTime,endVoucherTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '单据时间',
}
},
externalState:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
placeholder:'外部状态'
},
enum: TimeList
enum: [
{label: '待提交需求单', value: 1},
{label: '待审核需求单', value: 2},
{label: '待提交报价单', value: 3},
{label: '待确认报价单', value: 4},
{label: '接受报价', value: 5},
{label: '不接受报价', value: 6},
{label: '取消报价单', value: 7},
]
},
interiorState:{
type:'string',
"x-component-props":{
placeholder:'外部状态'
},
enum: [
{label: '新增需求单', value: 1},
{label: '审核通过', value: 2},
{label: '审核通过', value: 3},
{label: '待提交需求单', value: 4},
{label: '审核通过', value: 5},
{label: '审核不通过', value: 6},
{label: '取消报价单', value: 7},
]
},
}
},
......@@ -526,5 +566,3 @@ export const enquieryOfferSearchSchema: ISchema = {
}
}
}
import React, { useState, useEffect, useRef } from 'react';
import React, { useState, useEffect, ReactNode } from 'react';
import style from './index.less'
import { history } from 'umi';
import { Button, Card, Tabs, Steps, Table } from 'antd';
import { Card, Tabs, Steps, Table, Tag } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle';
import { StandardTable } from 'god';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import EyePreview from '@/components/EyePreview';
import { PublicApi } from '@/services/api';
......@@ -14,19 +11,8 @@ import { PublicApi } from '@/services/api';
const { TabPane } = Tabs;
const { Step } = Steps;
export interface parmas {
page_type?: any,
id?: any,
view?: any
}
const Details: React.FC<parmas> = (props) => {
const [visible, setvisible] = useState(false)
const ref = useRef<any>({});
//page_type: 1.待确认报价单,2.待审核报价单1级,3.待审核报价单2级,4.报价单查询,5.待提交审核报价单
//view: 1.询价单号,2.报价单号
const { id, page_type } = props;
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
const Details: React.FC<{}> = (props) => {
const { id } = history.location.query;
// 拿到pathname,通过判断来显示询价单号或报价单号
const { pathname } = history.location;
const type = pathname.split('/')[pathname.split('/').length - 2];
......@@ -99,24 +85,24 @@ const Details: React.FC<parmas> = (props) => {
render: (text: any, record: any) => <EyePreview>{text}</EyePreview>
}, {
title: '品类',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
key: 'category',
dataIndex: 'category',
}, {
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}, {
title: '单位',
key: 'nuit',
dataIndex: 'nuit',
key: 'unit',
dataIndex: 'unit',
}, {
title: '采购数量',
key: 'purchaseQuantity',
dataIndex: 'purchaseQuantity',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
}, {
title: '报价单价',
key: 'pric',
dataIndex: 'pric',
key: 'price',
dataIndex: 'price',
}, {
title: '金额',
key: 'money',
......@@ -230,6 +216,16 @@ const Details: React.FC<parmas> = (props) => {
})
}, [])
const ExternalState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Tag color="default">提交询价单</Tag>:
text === 2 ? component = <Tag color="processing">提交报价单</Tag>:
text === 3 ? component = <Tag color="warning">确认报价单</Tag>:
text === 4 ? component = <Tag color="success">报价通过</Tag>:
component = <Tag color="error">报价不通过</Tag>
return component;
}
return (
<PageHeaderWrapper
className={style.header}
......@@ -239,7 +235,7 @@ const Details: React.FC<parmas> = (props) => {
<div className={style['headerTop']}>
<div className={style['headerTop-prefix']}></div>
<div className={style['headerTop-name']}>
报价单号 : 100000000
询价单号 : {data.inquiryListNo}
</div>
<div className={style[`levelIcon${'1'}`]}></div>
</div>
......@@ -248,16 +244,21 @@ const Details: React.FC<parmas> = (props) => {
content={
< div className={style['headerMain']} >
<div className={style['headerMain-left']}>
{
Number(page_type) !== 4 &&
<div className={style['headerMain-left-option']}>
<div>询价单号:</div>
<div><a>123132132132</a> </div>
</div>
}
<div className={style['headerMain-left-option']}>
<div>询价会员:</div>
<div><a>123132132132</a> </div>
<div><a>{data.inquiryListMemberName}</a> </div>
</div>
<div className={style['headerMain-left-option']}>
<div>询价摘要</div>
<div>{data.details}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>单据时间</div>
<div>{data.voucherTime}</div>
</div>
<div className={style['headerMain-left-option']}>
<div>外部状态</div>
<div>{ExternalState(data.externalState)}</div>
</div>
</div>
</div >
......@@ -286,7 +287,7 @@ const Details: React.FC<parmas> = (props) => {
<Table columns={inquiryGoods} pagination={false} rowKey='id' dataSource={data.inquiryListProductRequests} />
</Card>
<Card className={style.item_wrap}>
<div className={style.mainCol_title}>{infoTem[(Number(page_type) === 1 || Number(page_type) === 5) ? 'freight' : 'base'].title}</div>
<div className={style.mainCol_title}>{infoTem['base'].title}</div>
<div className={style['mainCol-rows']}>
<div className={style['mainCol-rows-cols']}>
{infoTem['base'].leftElem.map(
......
......@@ -197,7 +197,7 @@ const PaySetting: React.FC<{}> = () => {
}).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.push('/home')
history.push(`/ruleSettingManager/paySetting`)
}, 1500)
}
})
......
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