Commit ebab57b7 authored by 前端-许冠华's avatar 前端-许冠华

Merge branch 'v2-220418-fixPurchaseBid' into 'v2-220418'

fix: 补全采购竞价相关的国际化 See merge request linkseeks-design/pro-platform!294
parents 05b72197 7b7a469e
......@@ -448,6 +448,7 @@ export default {
'detail.purchase.message91': 'Next round of quotation deadline',
'detail.purchase.message92': 'Please enter the decryption key',
'detail.purchase.message93': 'Please enter material group',
'detail.purchase.message94': 'Please enter the award comments',
'detail.purchase.placeholder': 'Select start date',
......@@ -1019,6 +1020,15 @@ export default {
'purchase.yaoqingzhaobiao': 'Invite bidding',
'purchase.xuanzeyudangqianhuiyuanxia': 'Only send the bidding items to the suppliers you designate, and the suppliers who have received your bidding items can bid to you, and ask your suppliers to apply for your membership first',
'purchase.zaixianpingbiaodafen': 'Online bid evaluation and scoring',
'table.purchase.tab.notice' : 'Bid winning publicity',
'table.purchase.tab.notice.send' : 'Send bid winning announcement',
'table.purchase.tab.notice.placeholder' : 'Please enter the bid winning publicity',
'table.purchase.tab.prizeNotice' : 'Notification of award',
'table.purchase.tab.prizeNotice.send' : 'Send notification of award',
'table.purchase.tab.prizeNotice.placeholder' : 'Please enter the notification of award',
'table.purchase.tab.thank' : 'Thank you letter',
'table.purchase.tab.thank.send' : 'Send a thank you note',
'table.purchase.tab.thank.placeholder' : 'Please enter a thank you note',
'constants.purchase.type1': 'There is a fixed purchase amount',
'constants.purchase.type2': 'No fixed purchase amount',
......@@ -1033,4 +1043,7 @@ export default {
'constants.purchase.expert.type2': 'Technical expert',
'constants.purchase.expert.type3': 'Invited expert',
'constants.purchase.expert.type4': 'Other specialists',
'modal.purchase.awardResults' : 'The bidding for {createMemberName} 《{details}》 has been completed and the winning bidder has been determined. The bid winning results are announced as follows: the bid winning supplier: {memberName} (total bid winning amount (tax included): $ {sumAwardPrice}). Reason for winning the bid: {signUpIdea}',
'modal.purchase.thankLetter' : 'Your company participated in the bidding of 《{details}》 of our company. After our company synthesized the quotation of each bidding unit and conducted sufficient technical exchange, your company failed to win the bid after comprehensive evaluation by the bid evaluation committee. Our company deeply appreciates your active participation and support! I hope the cooperation will be successful next time.',
}
......@@ -445,6 +445,8 @@ export default {
'detail.purchase.message91': '다음 오퍼 마감 시간',
'detail.purchase.message92': '암호 해독 키를 입력하십시오.',
'detail.purchase.message93': '재료 그룹을 입력하세요.',
'detail.purchase.message94': '입찰 의견을 입력하세요.',
'detail.purchase.placeholder': '시작 날짜 선택',
......@@ -1016,6 +1018,15 @@ export default {
'purchase.yaoqingzhaobiao': '입찰 초대',
'purchase.xuanzeyudangqianhuiyuanxia': '귀하가 지정한 공급업체에게만 입찰 항목을 보내고 귀하의 입찰 항목을 받은 공급업체가 귀하에게 입찰할 수 있으며 귀하의 공급업체에 먼저 회원 가입을 신청하도록 요청할 수 있습니다.',
'purchase.zaixianpingbiaodafen': '온라인 입찰 평가 및 채점',
'table.purchase.tab.notice' : '낙찰 공시',
'table.purchase.tab.notice.send' : '낙찰 공시를 발송하다.',
'table.purchase.tab.notice.placeholder' : '낙찰 공시를 입력하세요',
'table.purchase.tab.prizeNotice' : '낙찰 통지',
'table.purchase.tab.prizeNotice.send' : '낙찰 알림 보내기',
'table.purchase.tab.prizeNotice.placeholder' : '낙찰 알림을 입력하십시오',
'table.purchase.tab.thank' : '감사 편지',
'table.purchase.tab.thank.send' : '감사의 편지를 보내다',
'table.purchase.tab.thank.placeholder' : '감사의 편지를 입력하세요',
'constants.purchase.type1': '고정 구매 금액이 있다',
'constants.purchase.type2': '고정 구매 금액 없음',
......@@ -1030,4 +1041,7 @@ export default {
'constants.purchase.expert.type2': '기술 분야의 전문가',
'constants.purchase.expert.type3': '특별히 초청된 전문가',
'constants.purchase.expert.type4': '기타 분야의 전문가',
'modal.purchase.awardResults' : '{createMemberName} 《{details}》 경매 작업이 끝났고 낙찰자가 확정되었습니다.현재 낙찰 결과는 다음과 같습니다: 낙찰 공급업체: {memberName} (낙찰 총 금액 (세금 포함): ₩ {sumAwardPrice}).낙찰된 이유: {signUpIdea}',
'modal.purchase.thankLetter' : '귀사가 우리 회사의 《{details}》 가격 경쟁에 참여하였습니다.당사는 각 경매단위의 견적 상황을 종합하고 충분한 기술 교류를 진행한 후 낙찰위원회의 종합 평가를 거쳐 귀사는 낙찰되지 못했습니다.우리 회사는 귀사의 적극적인 참여와 지지에 대해 깊은 감사를 표합니다!다음에 합작이 성공하기를 바랍니다.',
}
......@@ -446,6 +446,7 @@ export default {
'detail.purchase.message91': '下轮报价截止时间',
'detail.purchase.message92': '请输入解密密钥',
'detail.purchase.message93': '请输入物料组',
'detail.purchase.message94': '请输入授标意见',
'detail.purchase.placeholder': '选择开始日期',
'detail.purchase.placeholder1': '确定要执行这个操作?',
......@@ -1017,6 +1018,15 @@ export default {
'purchase.yaoqingzhaobiao': '邀请招标',
'purchase.xuanzeyudangqianhuiyuanxia': '只将招标项目发送给您指定的供应商,收到您的招标项目的供应商才能向您投标,要求您的供应商先申请成为您的会员',
'purchase.zaixianpingbiaodafen': '在线进行评标打分',
'table.purchase.tab.notice' : '中标公示',
'table.purchase.tab.notice.send' : '发送中标公示',
'table.purchase.tab.notice.placeholder' : '请输入中标公示',
'table.purchase.tab.prizeNotice' : '中标通知',
'table.purchase.tab.prizeNotice.send' : '发送中标通知',
'table.purchase.tab.prizeNotice.placeholder' : '请输入中标通知',
'table.purchase.tab.thank' : '感谢函',
'table.purchase.tab.thank.send' : '发送感谢函',
'table.purchase.tab.thank.placeholder' : '请输入感谢函',
'constants.purchase.type1': '有固定采购金额',
'constants.purchase.type2': '无固定采购金额',
......@@ -1031,4 +1041,7 @@ export default {
'constants.purchase.expert.type2': '技术类专家',
'constants.purchase.expert.type3': '特邀类专家',
'constants.purchase.expert.type4': '其他类专家',
'modal.purchase.awardResults' : '{createMemberName}《{details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:中标供应商:{memberName}(中标总金额(含税):¥{sumAwardPrice})。中标理由:{signUpIdea}',
'modal.purchase.thankLetter' : '贵公司参与了我公司《{details}》竞价。在我公司综合各竞价单位的报价情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。',
}
......@@ -53,7 +53,7 @@ const HistoryItem: React.FC<HistoryItemProps> = (props: any) => {
<p>{intl.formatMessage({ id: 'detail.purchase.label12' })}</p>
<p className={styles.currentPrice}><span>{intl.formatMessage({id: 'common.money'})}</span>{firstData?.offerPrice ? priceFormat(firstData?.offerPrice) : '-'}</p>
<div className={styles.row}>
<div className={styles.col} style={{ borderRight: '1px solid #EBECF0' }}>{intl.formatMessage({ id: 'detail.purchase.nowMinPrice1' })}<span>{detail.isOpenPurchase ? (detail?.minLowPrice ? `${intl.formatMessage({id: 'common.money'})}${priceFormat(detail?.minLowPrice)}` : '-') : '不公开'}</span></div>
<div className={styles.col} style={{ borderRight: '1px solid #EBECF0' }}>{intl.formatMessage({ id: 'detail.purchase.nowMinPrice1' })}<span>{detail.isOpenPurchase ? (detail?.minLowPrice ? `${intl.formatMessage({id: 'common.money'})}${priceFormat(detail?.minLowPrice)}` : '-') : intl.formatMessage({ id: 'detail.purchase.label7' })}</span></div>
<div className={styles.col}>{intl.formatMessage({ id: 'detail.purchase.allowPurchaseCount1' })}<span>{firstData?.offerCount ? firstData?.offerCount : '-'}</span></div>
</div>
</div>
......
......@@ -22,7 +22,7 @@ const OfferItem: React.FC<OfferItemProps> = (props: any) => {
<div className={styles.row}>
<div className={styles.rowPrice}>
<span>{intl.formatMessage({id: 'common.money'})} {priceFormat(detail.offerPrice)}</span>
{intl.formatMessage({ id: 'detail.purchase.nowMinPrice1' })}{detail.isOpenPurchase ? `${intl.formatMessage({id: 'common.money'})}${priceFormat(detail.minPrice)}` : '不公开'}
{intl.formatMessage({ id: 'detail.purchase.nowMinPrice1' })}{detail.isOpenPurchase ? `${intl.formatMessage({id: 'common.money'})}${priceFormat(detail.minPrice)}` : intl.formatMessage({ id: 'detail.purchase.label7' })}
</div>
{intl.formatMessage({ id: 'detail.purchase.label4' })}{detail.offerCount}{intl.formatMessage({ id: 'detail.purchase.label6' })}
</div>
......
import React, { useState, useEffect, useMemo } from 'react';
import { getIntl } from 'umi';
import { Modal, Tabs, Form, Checkbox, Input } from 'antd';
const { TabPane } = Tabs;
......@@ -6,6 +7,8 @@ const { TextArea } = Input;
import { priceFormat } from '@/utils/numberFomat';
const intl = getIntl();
import styles from './index.less';
......@@ -63,13 +66,11 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
}
const _returnDefaultAwardResults = useMemo(() => {
return record ? `${record?.purchaseMemberName ?? record?.createMemberName}${record.details}》竞价工作已经结束,中标人已经确定。现将中标结果公布如下:
中标供应商:${record.memberName}(中标总金额(含税):¥${priceFormat(record.sumAwardPrice)})。
中标理由:${record.signUpIdea}` : '';
return record ? intl.formatMessage({ id: 'modal.purchase.awardResults' },{createMemberName : record?.purchaseMemberName ?? record?.createMemberName,details:record.details,memberName: record.memberName,sumAwardPrice:priceFormat(record.sumAwardPrice),signUpIdea: record.signUpIdea}) : '';
}, [record])
const _returnDefaultContent = useMemo(() => {
return record ? `贵公司参与了我公司《${record.details}》竞价。在我公司综合各竞价单位的报价情况,并进行充分技术交流后,经评标委员会综合评定,贵公司未能中标。我公司对贵公司的积极参与和支持深表感谢!希望下次合作成功。` : '';
return record ? intl.formatMessage({ id: 'modal.purchase.thankLetter' },{details: record.details}) : '';
}, [record])
const onCheckboxChange = (e: { target: { checked: boolean } }, func: Function, name: string) => {
......@@ -108,36 +109,36 @@ const ConfirmBidResultModal: React.FC<ConfirmBidResultModalProps> = (props: any)
<Tabs tabPosition='left' activeKey={activeKey} onChange={(key) => {
setActiveKey(key)
}}>
<TabPane tab="中标公示" key="1" forceRender={true}>
<TabPane tab={intl.formatMessage({ id: 'table.purchase.tab.notice' })} key="1" forceRender={true}>
<Form.Item name="notice">
<Checkbox checked={notice} onChange={(e) => { onCheckboxChange(e, setNotice, 'notice') }}>发送中标公示</Checkbox>
<Checkbox checked={notice} onChange={(e) => { onCheckboxChange(e, setNotice, 'notice') }}>{intl.formatMessage({ id: 'table.purchase.tab.notice.send' })}</Checkbox>
</Form.Item>
<Form.Item name="awardResults">
<TextArea
rows={6}
placeholder="请输入中标公示"
placeholder={intl.formatMessage({ id: 'table.purchase.tab.notice.placeholder' })}
/>
</Form.Item>
</TabPane>
<TabPane tab="中标通知" key="2" forceRender={true}>
<TabPane tab={intl.formatMessage({ id: 'table.purchase.tab.prizeNotice' })} key="2" forceRender={true}>
<Form.Item name="prizeNotice">
<Checkbox checked={prizeNotice} onChange={(e) => { onCheckboxChange(e, setPrizeNotice, 'prizeNotice') }}>发送中标通知</Checkbox>
<Checkbox checked={prizeNotice} onChange={(e) => { onCheckboxChange(e, setPrizeNotice, 'prizeNotice') }}>{intl.formatMessage({ id: 'table.purchase.tab.prizeNotice.send' })}</Checkbox>
</Form.Item>
<Form.Item name="awardResults">
<TextArea
rows={6}
placeholder="请输入中标通知"
placeholder={intl.formatMessage({ id: 'table.purchase.tab.prizeNotice.placeholder' })}
/>
</Form.Item>
</TabPane>
<TabPane tab="感谢函" key="3" forceRender={true}>
<TabPane tab={intl.formatMessage({ id: 'table.purchase.tab.thank' })} key="3" forceRender={true}>
<Form.Item name="thank">
<Checkbox checked={thank} onChange={(e) => { onCheckboxChange(e, setThank, 'thank') }}>发送感谢函</Checkbox>
<Checkbox checked={thank} onChange={(e) => { onCheckboxChange(e, setThank, 'thank') }}>{intl.formatMessage({ id: 'table.purchase.tab.thank.send' })}</Checkbox>
</Form.Item>
<Form.Item name="content">
<TextArea
rows={6}
placeholder="请输入感谢函"
placeholder={intl.formatMessage({ id: 'table.purchase.tab.thank.placeholder' })}
/>
</Form.Item>
</TabPane>
......
import React, { useState } from 'react';
import { getIntl } from 'umi';
import { Modal, Form, Input, Upload, Button, message } from 'antd';
import { UPLOAD_TYPE } from '@/constants'
import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons';
......@@ -10,6 +11,7 @@ import { validatorByte } from '../../validator';
import styles from './index.less';
const intl = getIntl();
interface SubmitResultModalProps {
title: string,
......@@ -30,7 +32,7 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => {
const beforeDocUpload = (file: any) => {
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) {
message.error('上传文件大小不超过 20M!');
message.error(intl.formatMessage({ id: 'detail.purchase.message21' }));
}
return isLt20M;
}
......@@ -83,21 +85,21 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => {
className={styles.revise_style}
>
<Form.Item
label='授标意见'
label={intl.formatMessage({ id: 'detail.purchase.signUpIdea' })}
name='opinion'
rules={[
{ required: true, message: '请输入授标意见' },
{ required: true, message: intl.formatMessage({ id: 'detail.purchase.message94'}) },
{
validator: (r, v) => validatorByte(v, 200)
}
]}
>
<Input.TextArea rows={3} maxLength={200} placeholder="最长200个字符,100个汉字" />
<Input.TextArea rows={3} maxLength={200} placeholder={intl.formatMessage({id:'detail.purchase.placeholder8'})} />
</Form.Item>
<Form.Item
label='附件'
label={intl.formatMessage({ id: 'detail.purchase.file'})}
name='upload'
rules={[{ required: true, message: '请上传附件' }]}>
rules={[{ required: true, message: intl.formatMessage({ id: 'detail.purchase.message57'}) }]}>
<div className={styles.upload_data}>
{files.length > 0 && files.map((v, index) => (
<div key={index} className={styles.upload_item}>
......@@ -120,8 +122,8 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => {
onChange={handleChange}
headers={{ token }}
>
<Button loading={loading} icon={<UploadOutlined />}>上传文件</Button>
<div style={{ marginTop: '8px' }}>一次上传一个文件,每个附件大小不能超过 20M</div>
<Button loading={loading} icon={<UploadOutlined />}>{intl.formatMessage({ id: 'detail.purchase.uploadFile'})}</Button>
<div style={{ marginTop: '8px' }}>{intl.formatMessage({ id: 'detail.purchase.placeholder2'})}</div>
</Upload>
</Form.Item>
</Form>
......
......@@ -69,7 +69,7 @@ const StatuBox: React.FC<StatuBoxProps> = (props: any) => {
<Button disabled={!stillRun} type="primary" icon={<PlusOutlined />} block onClick={_handleBid} size={'large'} style={{ margin: '15px 0' }}>{intl.formatMessage({ id: 'detail.purchase.offerRule3' })}</Button>
) : (
<>
<div className={styles.statusBoxText}><div>公开最低报价</div>{transforType[detail?.isOpenPurchase]}</div>
<div className={styles.statusBoxText}><div>{intl.formatMessage({ id: 'detail.purchase.offerRule2' })}</div>{transforType[detail?.isOpenPurchase]}</div>
<div className={styles.statusBoxText}><div>{intl.formatMessage({ id: 'detail.purchase.isOpenRanking' })}</div>{transforType[detail?.isOpenRanking]}</div>
</>
)}
......
import { getIntl } from 'umi';
const intl = getIntl();
export const validatorByte = (value: any, limitNumber: number) => {
let _str = value;
_str = _str ? _str.replace(/[\u4E00-\u9FA5]/g, "AA") : '';
if (_str.length > limitNumber) {
return Promise.reject(new Error(`最长${limitNumber}个字符,${limitNumber/2}个汉字`));
return Promise.reject(new Error(intl.formatMessage({ id: 'balance.businessReconciliationCollaboration.components.modalOperate.validator' }, { maxnumber2: limitNumber, maxnumber: limitNumber/2 })));
} else {
return Promise.resolve();
}
......
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