Commit 09b81335 authored by 卢均锐's avatar 卢均锐
parents ad2e7c7a 74718d2c
......@@ -11,6 +11,10 @@
/**————招投标————*/
import { getIntl, getLocale } from 'umi';
const intl = getIntl(getLocale());
/** 采购类型 */
export const PURCHASE_TYPE = {
1: '有固定采购金额',
......@@ -328,31 +332,30 @@ export enum DOORTYPE {
/** 年加工额 */
export const yearProcessAmount = [
{ label: '50万以下', value: 1 },
{ label: '50万-100万', value: 2 },
{ label: '101万-500万', value: 3 },
{ label: '501万-1000万', value: 4 },
{ label: '1001万-2000万', value: 5 },
{ label: '2000万以上', value: 6 },
{ label: intl.formatMessage({ id: 'common.wanyixia', defaultMessage: '{data}万以下' }, { data: 50 }), value: 1 },
{ label: `${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 50 })}-${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 100 })}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 101 })}-${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 500 })}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 501 })}-${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 1000 })}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 1001 })}-${intl.formatMessage({ id: 'common.wan', defaultMessage: '{data}万' }, { data: 2000 })}`, value: 5 },
{ label: intl.formatMessage({ id: 'common.wanyishang', defaultMessage: '{data}万以上' }, { data: 2000 }), value: 6 },
]
/** 厂房面积 */
export const plantArea = [
{ label: '100平以下', value: 1 },
{ label: '100平-200平', value: 2 },
{ label: '201平-500平', value: 3 },
{ label: '501平-1000平', value: 4 },
{ label: '1001平-5000平', value: 5 },
{ label: '5000平以上', value: 6 },
{ label: intl.formatMessage({ id: 'common.pingyixia', defaultMessage: '{data}平以下' }, { data: 100 }), value: 1 },
{ label: `${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 100 })}-${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 200 })}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 201 })}-${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 500 })}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 501 })}-${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 1000 })}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 1001 })}-${intl.formatMessage({ id: 'common.ping', defaultMessage: '{data}平' }, { data: 5000 })}`, value: 5 },
{ label: intl.formatMessage({ id: 'common.pingyishang', defaultMessage: '{data}平以上' }, { data: 5000 }), value: 6 },
]
/** 员工人数 */
export const staffNum = [
{ label: '10人以下', value: 1 },
{ label: '10-50人', value: 2 },
{ label: '51-100人', value: 3 },
{ label: '101-500人', value: 4 },
{ label: '501-1000人', value: 5 },
{ label: '1000人以上', value: 6 },
export const staffNum = [{ label: intl.formatMessage({ id: 'common.renyixia', defaultMessage: '{data}人以下' }, { data: 10 }), value: 1 },
{ label: `${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 10 })}-${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 50 })}`, value: 2 },
{ label: `${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 51 })}-${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 100 })}`, value: 3 },
{ label: `${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 101 })}-${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 500 })}`, value: 4 },
{ label: `${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 501 })}-${intl.formatMessage({ id: 'common.ren', defaultMessage: '{data}人' }, { data: 1000 })}`, value: 5 },
{ label: intl.formatMessage({ id: 'common.renyishang', defaultMessage: '{data}人以上' }, { data: 1000 }), value: 6 },
]
......@@ -124,4 +124,14 @@
'common.huanhuofahuodan': 'Exchange Invoice',
'common.huanhuorukudan': 'Exchange warehousing list',
'common.fiebiao': 'waste tenders',
'common.wanyixia': '{data}The following Ten thousand',
'common.wan': '{data}Ten thousand',
'common.wanyishang': '{data}Above Ten thousand',
'common.pingyixia': '{data}The following Flat',
'common.ping': '{data}Flat',
'common.pingyishang': '{data}Above Flat',
'common.renyixia': '{data}The following Human',
'common.ren': '{data}Human',
'common.renyishang': '{data}above Human',
}
......@@ -441,8 +441,8 @@ export default {
'saleOrder.dingdanzhaiyao': 'Order summary',
'saleOrder.caigouhuiyuan': 'purchasing member',
'saleOrder.zongjine/yi': 'Total amount/paid (yuan)',
'saleOrder.zongjine:': 'Total amount:',
'saleOrder.yizhifu:': 'paid:',
'saleOrder.zongjine': 'Total amount:',
'saleOrder.yizhifu': 'paid:',
'saleOrder.dangqianzhifu': 'Current payment',
'saleOrder.dingdanleixing': 'Order Type',
'saleOrder.waibuzhuangtai': 'External state',
......
......@@ -54,5 +54,15 @@ export default {
"systemSetting.priceLineCommodity": "Enable the display of commodity price curves. When the mouse is moved to the price column, the historical price changes of commodities of the current specification will be displayed.",
"systemSetting.autoReceiveOrder": "Enable automatic confirmation of receipt. When the receipt is not confirmed after the delivery exceeds the number of days after receipt, the system defaults to receipt.",
"systemSetting.forcastTimeOrder": "Enable delivery appointment time. You can make an appointment to place an order and deliver goods within the appointment time (days).",
"systemSetting.expressTimeOrder": "Enable delivery time period. You can choose the time within the delivery time period."
}
\ No newline at end of file
"systemSetting.expressTimeOrder": "Enable delivery time period. You can choose the time within the delivery time period.",
// 优惠券
'coupon.weishiyong': 'Unused',
'coupon.yishiyong': 'Used',
'coupon.yiguoqi': 'expired',
'coupon.meiyongshiyongshangchengxinxi': 'No applicable mall information, unable to jump',
'coupon.qushiyong': 'to use',
'coupon.quanma': 'coupon code',
'coupon.shiyongshangcheng': 'Applicable mall',
'coupon.mandatayuankeyong': 'Full{data}meta available',
}
......@@ -124,4 +124,14 @@ export default {
'common.huanhuofahuodan': '교환 인보이스',
'common.huanhuorukudan': '교환 창고 목록',
'common.fiebiao': '무효 선언',
'common.wanyixia': '{data}만 이하',
'common.wan': '{data}만',
'common.wanyishang': '{data}만 이상',
'common.pingyixia': '{data}평평한 이하',
'common.ping': '{data}평평한',
'common.pingyishang': '{data}평평한 이상',
'common.renyixia': '{data}사람 이하',
'common.ren': '{data}사람',
'common.renyishang': '{data}사람 이상',
}
......@@ -663,7 +663,7 @@ export default {
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.1.step.4': '완성',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2': '계좌 인출',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1': '현금 인출 금액(원):',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1.button': '전부 현금으로 인출하다.',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1.button': '모두 철회',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1.accountBalance': '최대 현금 인출 가능:',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1.currency': '₩',
'payandSettle.capitalAccounts.accountLists.applyWithdraw.card.2.col.1.submit': '커밋',
......
......@@ -54,5 +54,15 @@ export default {
"systemSetting.priceLineCommodity": '상품의 가격 곡선을 표시할 수 있습니다.마우스를 가격 표시줄로 이동할 때 현재 규격 상품의 역사적 가격 변화를 표시합니다.',
"systemSetting.autoReceiveOrder": '자동 수령 확인을 활성화합니다.배송 후 수령 일수를 초과한 후 수령을 확인하지 않으면 시스템은 기본적으로 수령합니다.',
"systemSetting.forcastTimeOrder": '배송 예약 기간이 활성화됩니다.주문 가능 시간 후 예약 시간(일수) 내 배송.',
"systemSetting.expressTimeOrder": '배송 기간을 활성화합니다.배송 기간을 선택할 수 있습니다.'
}
\ No newline at end of file
"systemSetting.expressTimeOrder": '배송 기간을 활성화합니다.배송 기간을 선택할 수 있습니다.',
// 优惠券
'coupon.weishiyong': '미사용',
'coupon.yishiyong': '사용 된',
'coupon.yiguoqi': '만료',
'coupon.meiyongshiyongshangchengxinxi': '해당 쇼핑몰 정보 없음, 점프 불가',
'coupon.qushiyong': '사용',
'coupon.quanma': '쿠폰 코드',
'coupon.shiyongshangcheng': '해당 쇼핑몰',
'coupon.mandatayuankeyong': '가득한{data}메타 사용 가능',
}
......@@ -125,4 +125,13 @@ export default {
'common.huanhuorukudan': '换货入库单',
'common.fiebiao': '废标',
'common.wanyixia': '{data}万以下',
'common.wan': '{data}万',
'common.wanyishang': '{data}万以上',
'common.pingyixia': '{data}平以下',
'common.ping': '{data}平',
'common.pingyishang': '{data}平以上',
'common.renyixia': '{data}人以下',
'common.ren': '{data}人',
'common.renyishang': '{data}人以上',
}
......@@ -54,5 +54,15 @@ export default {
"systemSetting.priceLineCommodity": "启用显示商品价格曲线。鼠标移到价格一栏时,显示当前规格商品的历史价格变化。",
"systemSetting.autoReceiveOrder": "启用自动确认收货。当发货后超过收货天数后未确认收货,系统默认收货。",
"systemSetting.forcastTimeOrder": "启用送货预约时长。可预约下单时间后可预约时长(天数)内送货。",
"systemSetting.expressTimeOrder": "启用配送时间段。可选择配送时间段内的时间。"
}
\ No newline at end of file
"systemSetting.expressTimeOrder": "启用配送时间段。可选择配送时间段内的时间。",
// 优惠券
'coupon.weishiyong': '未使用',
'coupon.yishiyong': '已使用',
'coupon.yiguoqi': '已过期',
'coupon.meiyongshiyongshangchengxinxi': '没有适用商城信息,无法进行跳转',
'coupon.qushiyong': '去使用',
'coupon.quanma': '券码',
'coupon.shiyongshangcheng': '适用商城',
'coupon.mandatayuankeyong': '满{data}元可用'
}
......@@ -8,6 +8,9 @@ import { random } from 'lodash';
import { REQUEST_HEADER, TOP_DOMAIN } from '@/constants';
import { COUPON_STATE_UNUSED, COUPON_STATE_USED, COUPON_STATE_EXPIRED } from '../../utils';
import styles from './index.less';
import { getIntl } from 'umi';
const intl = getIntl();
type CouponCardDate = {
/**
......@@ -106,12 +109,12 @@ const CouponCard: React.FC<CouponCardProps> = (props: CouponCardProps) => {
const handleGoUse = () => {
if (!data.shopList && !data.shopList.length) {
message.warning('没有适用商城信息,无法进行跳转')
message.warning(intl.formatMessage({ id: 'coupon.meiyongshiyongshangchengxinxi', defaultMessage: '没有适用商城信息,无法进行跳转' }))
return;
}
const shop = data.shopList[random(0, data.shopList.length)];
if (!shop.url) {
message.warning('没有商城地址信息,无法进行跳转')
message.warning(intl.formatMessage({ id: 'coupon.meiyongshiyongshangchengxinxi', defaultMessage: '没有适用商城信息,无法进行跳转' }))
return;
}
let url = `${REQUEST_HEADER}${shop.url}.${TOP_DOMAIN}/makeUpList/${data.couponId}?belongType=${data.belongType}`;
......@@ -124,9 +127,9 @@ const CouponCard: React.FC<CouponCardProps> = (props: CouponCardProps) => {
};
const ACTIONS_MAP = {
[COUPON_STATE_UNUSED]: (<Button type="primary" size="small" onClick={handleGoUse}>去使用</Button>),
[COUPON_STATE_USED]: (<Button type="primary" size="small" disabled>已使用</Button>),
[COUPON_STATE_EXPIRED]: (<Button type="primary" size="small" disabled>已过期</Button>),
[COUPON_STATE_UNUSED]: (<Button type="primary" size="small" onClick={handleGoUse}>{intl.formatMessage({ id: 'coupon.qushiyong', defaultMessage: '去使用' })}</Button>),
[COUPON_STATE_USED]: (<Button type="primary" size="small" disabled>{intl.formatMessage({ id: 'coupon.yishiyong', defaultMessage: '已使用' })}</Button>),
[COUPON_STATE_EXPIRED]: (<Button type="primary" size="small" disabled>{intl.formatMessage({ id: 'coupon.yiguoqi', defaultMessage: '已过期' })}</Button>),
};
return (
......@@ -142,25 +145,26 @@ const CouponCard: React.FC<CouponCardProps> = (props: CouponCardProps) => {
{`${data.validTimeStart ? moment(data.validTimeStart).format('YYYY-MM-DD') : ''}-${data.validTimeEnd ? moment(data.validTimeEnd).format('YYYY-MM-DD') : ''}`}
</div>
<div className={styles['coupon-card-code']}>
券码
{intl.formatMessage({ id: 'coupon.quanma', defaultMessage: '券码' })}
{data.code}
</div>
<Tooltip title={data.shopList.map((item) => item.shopName).join('、')}>
<div className={styles['coupon-card-webs']}>
适用商城
{intl.formatMessage({ id: 'coupon.shiyongshangcheng', defaultMessage: '适用商城' })}
{data.shopList.map((item) => item.shopName).join('、')}
</div>
</Tooltip>
</div>
<div className={styles['coupon-card-right']}>
<div className={styles['coupon-card-yuanWrap']}>
<span className={styles['coupon-card-yuan']}>¥</span>
<span className={styles['coupon-card-yuan']}>{intl.formatMessage({id: 'common.money', defaultMessage: '¥'})}</span>
<span className={styles['coupon-card-denomination']}>{data.denomination}</span>
</div>
<div className={styles['coupon-card-description']}>
{/*
{data.useConditionMoney}
元可用
元可用 */}
{intl.formatMessage({ id: 'coupon.mandatayuankeyong', defaultMessage: '满{data}元可用' }, { data: data.useConditionMoney })}
</div>
<div className={styles['coupon-card-actions']}>
{ACTIONS_MAP[status]}
......
......@@ -16,9 +16,10 @@ import { COUPON_STATE_UNUSED, COUPON_STATE_USED, COUPON_STATE_EXPIRED } from './
import MellowCard from '@/components/MellowCard';
import CouponCard from './components/CouponCard';
import styles from './index.less';
import { getIntl } from 'umi';
const { TabPane } = Tabs;
const intl = getIntl();
const MyCoupon: React.FC = () => {
const [activeKey, setActiveKey] = useState(`${COUPON_STATE_UNUSED}`);
......@@ -72,9 +73,9 @@ const MyCoupon: React.FC = () => {
>
<div className={styles.myCoupon}>
<Tabs activeKey={activeKey} onChange={handleTabsChange}>
<TabPane tab={`未使用 (${analysis?.receiveCount || 0})`} key={`${COUPON_STATE_UNUSED}`} />
<TabPane tab={`已使用 (${analysis?.userCount || 0})`} key={`${COUPON_STATE_USED}`} />
<TabPane tab={`已过期 (${analysis?.expireCount || 0})`} key={`${COUPON_STATE_EXPIRED}`} />
<TabPane tab={`${intl.formatMessage({id: 'coupon.weishiyong', defaultMessage: '未使用'})} (${analysis?.receiveCount || 0})`} key={`${COUPON_STATE_UNUSED}`} />
<TabPane tab={`${intl.formatMessage({id: 'coupon.yishiyong', defaultMessage: '已使用'})} (${analysis?.userCount || 0})`} key={`${COUPON_STATE_USED}`} />
<TabPane tab={`${intl.formatMessage({id: 'coupon.yiguoqi', defaultMessage: '已过期'})} (${analysis?.expireCount || 0})`} key={`${COUPON_STATE_EXPIRED}`} />
</Tabs>
</div>
</MellowCard>
......
......@@ -57,7 +57,7 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
}, [fetchdata])
const handleSummary = () => {
form.setFieldsValue({ 'summary': `${form.getFieldValue('startTime').format('YYYY-MM-DD')}-${form.getFieldValue('endTime').format('YYYY-MM-DD')}需求计划` })
form.setFieldsValue({ 'summary': `${form.getFieldValue('startTime').format('YYYY-MM-DD')}-${form.getFieldValue('endTime').format('YYYY-MM-DD')}${intl.formatMessage({id: 'home.purchaseCenter.needPlanList'})}` })
}
return (
......
......@@ -6,9 +6,10 @@ import MaterialTableCell, { MaterialEditableRow } from '../components/materialTa
import { useModalTable } from './useModalTable';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { OrderModalType } from '@/constants/order';
import { getIntl } from 'umi'
const { pageStatus } = usePageStatus()
const intl = getIntl()
let orderModel = null;
// 对象按key排序(运用于商城传过来的阶梯价格排序)
......@@ -63,7 +64,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
const { pageStatus } = usePageStatus()
if (pageStatus === PageStatus.ADD) {
// 渲染操作
materialInfoColumns[materialInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>删除</Button>
materialInfoColumns[materialInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>{intl.formatMessage({id: 'common.button.delete'})}</Button>
// 渲染单价
materialInfoColumns[8].render = (t, r) => {
if(orderModel === OrderModalType["HAND_ORDER"]) {
......@@ -162,3 +163,4 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
rowSelectionCtl
}
}
......@@ -6,10 +6,10 @@ import ProductTableCell, { ProductEditableRow } from '../components/productTable
import { useModalTable } from './useModalTable';
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus';
import { OrderModalType } from '@/constants/order';
import { history } from "umi";
import { getIntl, history } from "umi";
const { pageStatus } = usePageStatus()
const intl = getIntl()
let orderModel = null;
// 对象按key排序(运用于商城传过来的阶梯价格排序)
......@@ -115,7 +115,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
{
orderModel === OrderModalType["CONSOLIDATED_ORDER"] && <Button type='link' className="selectMerge" onClick={() => clickMergeButton(record)}>选择合并订单</Button>
}
<Button type='link' onClick={() => handleDelete(record)}>删除</Button>
<Button type='link' onClick={() => handleDelete(record)}>{intl.formatMessage({id: 'common.button.delete'})}</Button>
</>
}
......
......@@ -57,7 +57,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const [productColumns, setProductColumns] = useState(() => {
if (pageStatus === PageStatus.ADD) {
// 渲染操作
productInfoColumns[productInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>删除</Button>
productInfoColumns[productInfoColumns.length - 1].render = (text, record) => <Button type='link' onClick={() => handleDelete(record)}>{intl.formatMessage({id: 'common.button.delete'})}</Button>
// 渲染单价
productInfoColumns[5].render = (t, r) => {
......
......@@ -2,7 +2,9 @@
* @Description 评价商品信息
*/
import React from 'react';
import { getIntl } from 'umi';
import styles from './index.less';
const intl = getIntl();
export type EtProductInfoType = {
/**
......@@ -18,7 +20,7 @@ export type EtProductInfoType = {
*/
price: number,
/**
* 商品id
* 商品id
*/
productId?: number,
/**
......@@ -57,10 +59,10 @@ const EtProductInfo = (props: EtProductInfoProps) => {
<div className={styles['et-product-right']}>
<div className={styles['et-product-title']}>{value.productName}</div>
<div className={styles['et-product-price']}>
{`¥ ${value.totalPrice}`}
{`${intl.formatMessage({id: 'common.money'})} ${value.totalPrice}`}
<span className={styles['et-product-desc']}>
{`¥ ${value.price}/${value.unit || ''},`}
{value.purchaseCount || ''}
{`${intl.formatMessage({id: 'common.money'})} ${value.price}/${value.unit || ''},`}
{intl.formatMessage({id: 'common.text.common'})} {value.purchaseCount || ''}
{value.unit || ''}
</span>
</div>
......@@ -71,4 +73,4 @@ const EtProductInfo = (props: EtProductInfoProps) => {
EtProductInfo.isFieldComponent = true;
export default EtProductInfo;
\ No newline at end of file
export default EtProductInfo;
......@@ -55,7 +55,7 @@ const Unevaluated: React.FC = () => {
title: intl.formatMessage({id: 'supplierEvaluation.dingdanzonge'}),
dataIndex: 'totalAmount',
align: 'center',
render: (text) => `¥${text}`,
render: (text) => `${intl.formatMessage({id: 'common.money'})}${text}`,
},
{
title: intl.formatMessage({id: 'supplierEvaluation.dingdanleixing'}),
......
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