Commit 2832c0cb authored by Bill's avatar Bill

Merge branch 'dev-srm' of 10.0.0.22:lingxi/lingxi-business-paltform into dev-srm

parents 90a20fef c17dfd35
......@@ -39,7 +39,7 @@ const BasicInfo: React.FC<IBasicInfo> = ({ title }) => {
span: 8,
fieldList: [
{ title: '招标项目:', name: 'projectName' },
{ title: '项目预算:', name: 'budget' },
{ title: '项目预算:', name: 'budget', render: (t) => `¥${t}` },
{ title: '采购类型:', name: 'purchaseType', render: (text) => PURCHASE_TYPE[text] },
{ title: '招标会员:', name: 'memberName' },
]
......
......@@ -39,7 +39,7 @@ const BasicInfo: React.FC<IBasicInfo> = ({ title }) => {
span: 8,
fieldList: [
{ title: '招标项目:', name: 'projectName' },
{ title: '项目预算:', name: 'budget' },
{ title: '项目预算:', name: 'budget', render: (t) => `¥${t}` },
{ title: '采购类型:', name: 'purchaseType', render: (text) => PURCHASE_TYPE[text] },
{ title: '招标会员:', name: 'memberName' },
]
......
......@@ -39,7 +39,7 @@ const BasicInfo: React.FC<IBasicInfo> = ({ title }) => {
span: 8,
fieldList: [
{ title: '招标项目:', name: 'projectName' },
{ title: '项目预算:', name: 'budget' },
{ title: '项目预算:', name: 'budget', render: (t) => `¥${t}` },
{ title: '采购类型:', name: 'purchaseType', render: (text) => PURCHASE_TYPE[text] },
{ title: '招标会员:', name: 'memberName' },
]
......
......@@ -39,7 +39,7 @@ const BasicInfo: React.FC<IBasicInfo> = ({ title }) => {
span: 8,
fieldList: [
{ title: '招标项目:', name: 'projectName' },
{ title: '项目预算:', name: 'budget' },
{ title: '项目预算:', name: 'budget', render: (t) => `¥${t}` },
{ title: '采购类型:', name: 'purchaseType', render: (text) => PURCHASE_TYPE[text] },
{ title: '招标会员:', name: 'memberName' },
]
......
......@@ -57,7 +57,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
span: 8,
fieldList: [
{ title: '招标项目:', name: 'projectName' },
{ title: '项目预算:', name: 'budget' },
{ title: '项目预算:', name: 'budget', render: (t) => `¥${t}` },
{ title: '采购类型:', name: 'purchaseType', render: (text) => PURCHASE_TYPE[text] },
{ title: '招标会员:', name: 'memberName' },
{ title: '招标摘要:', name: 'remark' },
......@@ -157,7 +157,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
span: 8,
fieldList: [
{ title: '期望交付日期:', name: 'hopeDate', render: (text) => formatTimeString(text) },
{ title: '目标价:', name: 'targetPrice' },
{ title: '目标价:', name: 'targetPrice', render: (t) => `¥${t}` },
]
},
{
......@@ -440,8 +440,8 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
/** 类型数据映射 */
const Type_Data_Map = {
// 当详情模式为投标详情并且投标外部状态投完标才有对应的投标基本信息显示
'basicInfo': apiType[apiType.length-1] === 'r' ? basicTenderColumnList : basicColumnList,
// 招标大类显示招标信息 投标大类显示投标信息
'basicInfo': apiType[0] === 'c' ? basicColumnList : basicTenderColumnList,
'bidNeed': callForNeedList,
'registerNeed': registerNeedList,
'checkNeed': checkNeedList,
......
......@@ -115,6 +115,9 @@ export const formSchema: ISchema = {
type: 'string',
title: '目标价',
readOnly: true,
'x-component-props': {
addonBefore: "¥",
},
},
inviteTenderRequirement: {
type: 'string',
......
......@@ -23,7 +23,7 @@ const BasicLayout: React.FC<BasicInfoProps> = (props: any) => {
<Col key={`effect_${index + 1}`} span={8}>
{ item.col.map((it, idx) => (
<div className={style.cell} key={`effect_col_${idx + 1}`}>
<h5 className={style.label}>{it.label}: </h5>
<h5 className={style.label}>{it.label}{!it.colon && ':'}</h5>
<h5 className={style.content}>{it.extra}</h5>
</div>
))}
......
......@@ -15,6 +15,8 @@ export type effectType = {
export interface BidInfoProps {
fetch?: () => Promise<unknown>,
effect?: effectType,
/** 获取报价轮次 */
getKey?: (e) => void,
}
const chNum: { [key: number]: string } = {
......@@ -30,7 +32,7 @@ const chNum: { [key: number]: string } = {
}
const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
const { effect, fetch } = props
const { effect, fetch, getKey } = props
const context = useContext(Context);
const [dataSource, setDataSource] = useState<any>([]);
const [turn, setTurn] = useState<Array<number>>([]);
......@@ -138,6 +140,8 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
current: '1',
pageSize: '10',
})
/** 返回给兄弟 */
getKey(key)
}
const splitProductAttributeJson = (name: string,num: number) => {
......@@ -153,6 +157,8 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
})
}
console.log(turn, 123)
return (
<Card
id='bidInfoLayout'
......@@ -202,6 +208,7 @@ const BidInfoLayout: React.FC<BidInfoProps> = (props: any) => {
</Row>
</div>
),
rowExpandable: record => !!record.productId,
expandIcon: ({ expanded, onExpand, record }) =>
expanded ? (
<CaretDownOutlined onClick={e => onExpand(record, e)} />
......
......@@ -6,7 +6,6 @@ import { ExclamationCircleFilled } from '@ant-design/icons';
const BidLayout = () => {
const context = useContext(Context);
console.log(context.awardResults)
const title = context.isPrize === 1 ? '中标通知' : '授标结果'
return (
<Card
......
......@@ -148,7 +148,8 @@ const BidResultLayout: React.FC<BidResultProps> = (props: any) => {
<CaretDownOutlined onClick={e => onExpand(record, e)} />
) : (
<CaretRightOutlined onClick={e => onExpand(record, e)} />
)
),
rowExpandable: (record) => record.productId
}}
dataSource={dataSource}
pagination={{ size: "small" }}
......
......@@ -12,7 +12,6 @@ const count = 0;
const OtherLayout: React.FC<OtherInfoProps> = (props: any) => {
const { effect } = props;
return (
<Card
id='otherLayout'
......
......@@ -88,7 +88,7 @@ const ContrastPrice = () => {
{
label: '适用地市', extra: (
<div>
{data.areas.map((it: any, idx: number) => (
{data.areas && data.areas.map((it: any, idx: number) => (
<p key={`areas${idx + 1}`}>{`${it.province}/${it.city}`}</p>
))}
</div>
......
......@@ -65,20 +65,22 @@ const DemandDetailed = () => {
col: [
{ label: '需求摘要', extra: data.details },
{
label: '采购类型', extra: (
label: (
<Tooltip placement="top" title='有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购'>
{data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额'}<QuestionCircleOutlined style={ICON_STYLE} />
采购类型:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额',
colon: true
},
{
label: '比价方式', extra: (
label: (
<Tooltip placement="top" title='密封比价:只能看到供应商是否有报价,不能看到供应商的报价明细,只能解封后才能看到报价明细,非密封比价:可以在供应商报完价后立即看到报价明细,无须解封'>
{data.priceContrast === 1 ? '密封比价' : '非密封比价'}<QuestionCircleOutlined style={ICON_STYLE} />
比价方式:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.priceContrast === 1 ? '密封比价' : '非密封比价',
colon: true
},
{ label: '会员名称', extra: data.memberName },
{ label: '会员名称', extra: data.createMemberName },
]
},
{
......@@ -107,7 +109,7 @@ const DemandDetailed = () => {
{
label: '附件',
extra: <>
{data.transactionUurls.map((item: any, index: number) => (
{data.transactionUurls && data.transactionUurls.map((item: any, index: number) => (
<Typography.Link
style={{ display: 'block', paddingBottom: '8px' }}
key={`link_${index + 1}`}
......
......@@ -75,7 +75,15 @@ const ContrastPreview = () => {
{
col: [
{ label: '单据时间', extra: format(data.createTime) },
{ label: '适用地市', extra: '-' },
{
label: '适用地市', extra: (
<div>
{data.areas && data.areas.map((it: any, idx: number) => (
<p key={`areas${idx + 1}`}>{`${it.province}/${it.city}`}</p>
))}
</div>
)
},
]
},
])
......
......@@ -30,6 +30,16 @@ const QuoteDetails = () => {
const [basicEffect, setBasicEffect] = useState<any>([]);
const [otherEffect, setOtherEffect] = useState<any>([]);
const forEachQuotedPriceTurnList = (data: any, key: number) => {
let params: any = {}
data.forEach(item => {
if (Number(item.turn) === Number(key)) {
params = {...item}
}
})
return params
}
const handleBasicEffect = (data: any) => {
setBasicEffect([
{
......@@ -95,6 +105,10 @@ const QuoteDetails = () => {
])
}
const handleOtherCallBack = useCallback((data:any, key: number) => {
handleOtherEffect(forEachQuotedPriceTurnList(data, key))
}, [])
const fetchDataSource = useCallback(async() => {
await PublicApi.getPurchaseConfirmQuotedPriceOrderDetails({id, number, current: '1', pageSize: '1' }).then(res => {
if (res.code !== 1000) {
......@@ -103,7 +117,7 @@ const QuoteDetails = () => {
const { data } = res;
setDataSource(data);
handleBasicEffect(data);
handleOtherEffect(data)
handleOtherCallBack(data.quotedPriceTurnList, turn);
})
}, [])
......@@ -111,6 +125,11 @@ const QuoteDetails = () => {
fetchDataSource()
}, [])
/** 获取报价信息当前点击的轮次 */
const handleGetKey = (count: number) => {
handleOtherCallBack(dataSource.quotedPriceTurnList, count)
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -121,6 +140,7 @@ const QuoteDetails = () => {
<Fragment>
<BasicLayout effect={basicEffect} />
<BidInfoLayout
getKey={handleGetKey}
fetch={PublicApi.getPurchaseConfirmQuotedPriceMaterielDetailed}
effect={{turn, id }}
/>
......
......@@ -72,8 +72,10 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
/**选择报价商品回调 */
const handleSelectPrduct = (params: any) => {
setProduct(params);
GetCommodityAttribute(params.id);
if (params) {
setProduct(params);
GetCommodityAttribute(params.id);
}
setFlag(false);
}
......
......@@ -59,20 +59,22 @@ const DemandDetailed = () => {
col: [
{ label: '需求摘要', extra: data.details },
{
label: '采购类型', extra: (
label: (
<Tooltip placement="top" title='有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购'>
{data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额'}<QuestionCircleOutlined style={ICON_STYLE} />
采购类型:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额',
colon: true
},
{
label: '比价方式', extra: (
label: (
<Tooltip placement="top" title='密封比价:只能看到供应商是否有报价,不能看到供应商的报价明细,只能解封后才能看到报价明细,非密封比价:可以在供应商报完价后立即看到报价明细,无须解封'>
{data.priceContrast === 1 ? '密封比价' : '非密封比价'}<QuestionCircleOutlined style={ICON_STYLE} />
比价方式:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.priceContrast === 1 ? '密封比价' : '非密封比价',
colon: true
},
{ label: '会员名称', extra: data.memberName },
{ label: '会员名称', extra: data.createMemberName },
]
},
{
......@@ -80,7 +82,7 @@ const DemandDetailed = () => {
{
label: '适用地市', extra: (
<div>
{data.areas.map((it: any, idx: number) => (
{data.areas && data.areas.map((it: any, idx: number) => (
<p key={`areas${idx + 1}`}>{`${it.province}/${it.city}`}</p>
))}
</div>
......
......@@ -21,6 +21,7 @@ import {
import { CheckCircleOutlined, LinkOutlined } from '@ant-design/icons';
import BidLayout from '../../components/detail/components/bidLayout';
import BidResultLayout from '../../components/detail/components/bidResultLayout';
import { isEmpty } from 'lodash';
const TABLINK1 = [
{ id: 'progressLayout', title: '流转进度' },
......@@ -60,7 +61,17 @@ const QuoteDetails = () => {
const [dataSource, setDataSource] = useState<any>({});
const [basicEffect, setBasicEffect] = useState<any>([]);
const [otherEffect, setOtherEffect] = useState<any>([]);
const [visible, setVisible] = useState<boolean>(false)
const [visible, setVisible] = useState<boolean>(false);
const forEachQuotedPriceTurnList = (data: any, key: number) => {
let params: any = {}
data.forEach(item => {
if (Number(item.turn) === Number(key)) {
params = {...item}
}
})
return params
}
const handleBasicEffect = (data: any) => {
setBasicEffect([
......@@ -90,6 +101,7 @@ const QuoteDetails = () => {
}
const handleOtherEffect = (data: any) => {
console.log(data)
setOtherEffect([
{
col: [
......@@ -110,7 +122,7 @@ const QuoteDetails = () => {
{
label: '附件',
extra: <>
{data.enclosureUrls.map((item: any, index: number) => (
{data.enclosureUrls && data.enclosureUrls.map((item: any, index: number) => (
<Typography.Link
target="_blank"
key={`link_${index + 1}`}
......@@ -127,6 +139,10 @@ const QuoteDetails = () => {
])
}
const handleOtherCallBack = useCallback((data:any, key: number) => {
handleOtherEffect(forEachQuotedPriceTurnList(data, key))
}, [])
const fetchDataSource = useCallback(async () => {
await PublicApi.getPurchaseQuotedPriceDetails({ id, number, current: '1', pageSize: '1' }).then(res => {
if (res.code !== 1000) {
......@@ -135,7 +151,7 @@ const QuoteDetails = () => {
const { data } = res;
setDataSource(data);
handleBasicEffect(data);
handleOtherEffect(data)
handleOtherCallBack(data.quotedPriceTurnList, turn)
})
}, [])
......@@ -156,6 +172,11 @@ const QuoteDetails = () => {
return fetchSoure
}
/** 获取报价信息当前点击的轮次 */
const handleGetKey = (count: number) => {
handleOtherCallBack(dataSource.quotedPriceTurnList, count)
}
return (
<Context.Provider value={dataSource}>
<PeripheralLayout
......@@ -191,6 +212,7 @@ const QuoteDetails = () => {
</>
)}
<BidInfoLayout
getKey={handleGetKey}
fetch={PublicApi.getPurchaseQuotedPriceMaterielDetailed}
effect={{ turn, id }}
/>
......
......@@ -41,7 +41,7 @@ const Store: React.FC<IProps> = (props: any) => {
>
<Row gutter={[8, 24]}>
<Col span={24}>
<Tooltip placement="topRight" title={<>已发布的商城为已勾选的商城,不可选择,只可以选择未勾选的商城。</>}>请选择需要上架的商城<QuestionCircleOutlined style={{ marginLeft: '5px' }} /></Tooltip>
<Tooltip placement="topRight" title={<>已发布的采购门户为已勾选的采购门户,不可选择,只可以选择未勾选的采购门户。</>}>请选择需要发布的采购门户<QuestionCircleOutlined style={{ marginLeft: '5px' }} /></Tooltip>
</Col>
{storeList.map((item: any) => (
<Col span={8} key={item.id}>
......
......@@ -68,20 +68,22 @@ const DemandDetailed = () => {
col: [
{ label: '需求摘要', extra: data.details },
{
label: '采购类型', extra: (
label: (
<Tooltip placement="top" title='有固定采购金额:采购金额固定,合同期内不可超过采购金额,无固定采购金额:采购金额不固定,可在合同期内按需采购'>
{data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额'}<QuestionCircleOutlined style={ICON_STYLE} />
采购类型:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.purchaseType === 1 ? '有固定采购金额' : '无固定采购金额',
colon: true
},
{
label: '比价方式', extra: (
label: (
<Tooltip placement="top" title='密封比价:只能看到供应商是否有报价,不能看到供应商的报价明细,只能解封后才能看到报价明细,非密封比价:可以在供应商报完价后立即看到报价明细,无须解封'>
{data.priceContrast === 1 ? '密封比价' : '非密封比价'}<QuestionCircleOutlined style={ICON_STYLE} />
比价方式:<QuestionCircleOutlined style={ICON_STYLE} />
</Tooltip>
)
), extra: data.priceContrast === 1 ? '密封比价' : '非密封比价',
colon: true
},
{ label: '会员名称', extra: data.memberName },
{ label: '会员名称', extra: data.createMemberName },
]
},
{
......@@ -89,7 +91,7 @@ const DemandDetailed = () => {
{
label: '适用地市', extra: (
<div>
{data.areas.map((it: any, idx: number) => (
{data.areas && data.areas.map((it: any, idx: number) => (
<p key={`areas${idx + 1}`}>{`${it.province}/${it.city}`}</p>
))}
</div>
......
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