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

🐞 fix: 修复从采购询价BUG

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