Commit 604159d4 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修复从采购询价BUG

parent 4755f710
@import "../../member/components/index.less"; // @import "../../member/components/index.less";
.count{ .count{
font-size: 24px; font-size: 24px;
color: #303133; color: #303133;
......
...@@ -43,10 +43,12 @@ export interface IProps { ...@@ -43,10 +43,12 @@ export interface IProps {
preview?: boolean, preview?: boolean,
/** 是否编辑 */ /** 是否编辑 */
isEdit?: boolean, isEdit?: boolean,
/** path哪里进来的 */
isPath?: string
} }
const ContrastLyout1: React.FC<IProps> = (props: any) => { const ContrastLyout1: React.FC<IProps> = (props: any) => {
const { query: { id, turn }, redux, preview, isEdit } = props; const { query: { id, turn }, redux, preview, isEdit, isPath } = props;
const context = useContext(Context); const context = useContext(Context);
const [count, setCount] = useState<any>([]); const [count, setCount] = useState<any>([]);
const [soure, setSoure] = useState<any>({}); const [soure, setSoure] = useState<any>({});
...@@ -78,7 +80,6 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -78,7 +80,6 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
const handleFlag = (flag: boolean) => { const handleFlag = (flag: boolean) => {
setLoading(flag); setLoading(flag);
setDisabled(flag);
} }
/** 格式化数据 */ /** 格式化数据 */
...@@ -137,11 +138,17 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => { ...@@ -137,11 +138,17 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
/** 点击比价 */ /** 点击比价 */
const offContrastPrice = async (num: string, key: number, i: number) => { const offContrastPrice = async (num: string, key: number, i: number) => {
if (key === PRICECONTRAST_TYPE.UNENCRYPTED) { if (key === PRICECONTRAST_TYPE.UNENCRYPTED) {
if (isPath === "toComparePrices" && preview && i === 0) {
return
}
handleFlag(true) handleFlag(true)
const params = { const params = {
id, id,
turn: num, turn: num,
} }
if (i === 0) {
setDisabled(true)
}
await PublicApi.getPurchaseConfirmQuotedPriceRightOffContrastPrice({ ...params }, { ctrlType: 'none' }).then((res: any) => { await PublicApi.getPurchaseConfirmQuotedPriceRightOffContrastPrice({ ...params }, { ctrlType: 'none' }).then((res: any) => {
if (res.code === 1000) { if (res.code === 1000) {
const { data } = res; const { data } = res;
......
...@@ -122,6 +122,7 @@ const BidModal: React.FC<IProps> = (props: any) => { ...@@ -122,6 +122,7 @@ const BidModal: React.FC<IProps> = (props: any) => {
} }
for (let i = 0; i < dataSource.length; i++) { for (let i = 0; i < dataSource.length; i++) {
const count = sumBy(dataSource[i].company, 'awardTaxProbability'); const count = sumBy(dataSource[i].company, 'awardTaxProbability');
console.log(count, dataSource[i])
if (count > 100 || count < 100) { if (count > 100 || count < 100) {
message.warning(`${dataSource[i].number}授标百分比分配不准确,请核对!`); message.warning(`${dataSource[i].number}授标百分比分配不准确,请核对!`);
return return
......
...@@ -176,7 +176,7 @@ const ContrastPrice = () => { ...@@ -176,7 +176,7 @@ const ContrastPrice = () => {
if (link !== 'preview' && path === 'confirmResults') { if (link !== 'preview' && path === 'confirmResults') {
setBid({ setBid({
id, id,
awardResults: ` ${dataSource.memberName}${dataSource.details}》评标工作已经结束,中标人已经确定。现将中标结果公布如下:\n中标供应商: ${companyJoinUs.join(',')}\n中标理由:价格最低。`, awardResults: ` ${dataSource.createMemberName}${dataSource.details}》评标工作已经结束,中标人已经确定。现将中标结果公布如下:\n中标供应商: ${companyJoinUs.join(',')}\n中标理由:价格最低。`,
content: `贵公司参与了我公司《${dataSource.details}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。`, content: `贵公司参与了我公司《${dataSource.details}》竞标。在我公司综合各投标单位的基本情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。`,
}) })
} }
...@@ -203,7 +203,7 @@ const ContrastPrice = () => { ...@@ -203,7 +203,7 @@ const ContrastPrice = () => {
<ProgressLayout /> <ProgressLayout />
<BasicLayout effect={basicEffect} /> <BasicLayout effect={basicEffect} />
<ConditionLayout effect={conditionEffect} /> <ConditionLayout effect={conditionEffect} />
<ContrastLyout isEdit={link === 'edit' && true} preview={(link !== 'contrast' && link !== 'edit' ) ? true : false} query={{ id, turn }} redux={handleContrastLyoutData} /> <ContrastLyout isPath={path} isEdit={link === 'edit' && true} preview={(link !== 'contrast' && link !== 'edit' ) ? true : false} query={{ id, turn }} redux={handleContrastLyoutData} />
<RecordLyout /> <RecordLyout />
</Fragment> </Fragment>
} }
......
...@@ -204,6 +204,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => { ...@@ -204,6 +204,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
/** 确定关联商品 */ /** 确定关联商品 */
const handleConfirm = (params: any) => { const handleConfirm = (params: any) => {
console.log(params, 98)
const productAttributeJson = params.product.name.split('/').filter((_item, index) => index !== 0).join('/'); const productAttributeJson = params.product.name.split('/').filter((_item, index) => index !== 0).join('/');
const param = { ...data }; const param = { ...data };
const query = [...param[idx]]; const query = [...param[idx]];
...@@ -304,6 +305,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => { ...@@ -304,6 +305,7 @@ const OfferInfo: React.FC<IProps> = (props: any) => {
goodsId: item.goodsId, goodsId: item.goodsId,
productBrand: item.productBrand, productBrand: item.productBrand,
productAttributeJson: item.productAttributeJson, productAttributeJson: item.productAttributeJson,
enclosureUrls: item.enclosureUrls
}) })
}) })
resolve({ resolve({
......
...@@ -128,12 +128,13 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => { ...@@ -128,12 +128,13 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
} }
useEffect(() => { useEffect(() => {
console.log(record)
if (preview && Object.keys(record).length > 0) { if (preview && Object.keys(record).length > 0) {
console.log(record, "测试")
setProduct({ setProduct({
id: record.productId,
name: record.productName, name: record.productName,
brandName: record.productBrand, brandName: record.productBrand,
customerCategoryName: record.customerCategoryName customerCategoryName: record.customerCategoryName,
}) })
GetCommodityAttribute(record.productId); GetCommodityAttribute(record.productId);
} }
...@@ -142,7 +143,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => { ...@@ -142,7 +143,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
useEffect(() => { useEffect(() => {
if (rel && Object.keys(record).length > 0) { if (rel && Object.keys(record).length > 0) {
setProduct({ setProduct({
productId: record.productId, id: record.productId,
name: record.productName, name: record.productName,
brandName: record.productBrand, brandName: record.productBrand,
customerCategoryName: record.customerCategoryName customerCategoryName: record.customerCategoryName
......
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