Commit 25226f9f authored by Bill's avatar Bill
parents 8b72e510 994c737a
/** 1.WEB 2.H5 3.小程序 4.APP */
import { getIntl } from "umi";
/** 1.WEB 2.H5 3.小程序 4.APP */
const intl = getIntl();
/** WEB */
export const WEB = 1;
......@@ -15,7 +17,7 @@ export const APP = 4;
export const enumName = {
[WEB]: 'WEB',
[H5]: 'H5',
[APPLETS]: '小程序',
[APPLETS]: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
[APP]: 'APP'
};
......@@ -29,7 +31,7 @@ export const environmentList = [
value: H5,
},
{
label: '小程序',
label: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
value: APPLETS,
},
{
......
......@@ -1249,7 +1249,10 @@ export const repositOutSchema: ISchema = padRequiredMessage({
"foldInventory": {
type: 'number',
"x-component": "CustomSlider",
'x-rules': [{
required: true,
message: getIntl().formatMessage({ id: 'common.form.input.placeholder' }),
}],
"x-component-props": {
width: '80%',
isNumber: true,
......
......@@ -5,7 +5,7 @@ import cx from 'classnames'
import { message } from 'antd'
import DetailPage from '@/components/DetailPage'
import UseModal from '../components/useModal'
import { Environment_Status } from '@/constants'
// import { Environment_Status } from '@/constants'
import styles from './index.less'
import { getTemplateWebPageTemplateWebFindShopTemplateDetails, postTemplateWebPageTemplateWebUseShopTemplate } from '@/services/TemplateV2Api'
......@@ -24,7 +24,13 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const [useModalVisible, setUseModalVisible] = useState<boolean>(false)
const [confirmLoading, setConfirmLoading] = useState(false)
const intl = useIntl()
const Environment_Status = {
0: intl.formatMessage({ id: 'shop.template.environment.status_0' }),
1: "web",
2: "H5",
3: intl.formatMessage({ id: 'shop.template.environment.status_3' }),
4: "APP"
}
useEffect(() => {
fetchDetail()
}, [])
......@@ -58,10 +64,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const handleLinkEdit = () => {
if(detailInfo?.environment === 1) {
if (detailInfo?.environment === 1) {
// web店铺装修
window.location.href = `/memberCenter/shopAbility/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3) {
} else if (detailInfo?.environment === 4 || detailInfo?.environment === 3) {
// app店铺装修
window.location.href = `/memberCenter/shopAbility/template/mobile/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}&environment=${detailInfo?.environment}`
} else {
......@@ -70,9 +76,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const handleLinkPreview = () => {
if(detailInfo?.environment === 1) {
if (detailInfo?.environment === 1) {
window.location.href = `/memberCenter/shopAbility/template/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3) {
} else if (detailInfo?.environment === 4 || detailInfo?.environment === 3) {
window.location.href = `/memberCenter/shopAbility/template/mobile/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}`
} else {
message.info(intl.formatMessage({ id: 'shop.template.preview.tip' }))
......
......@@ -60,7 +60,10 @@ const basicInfo: ISchema = {
type: 'number',
enum: [],
title: getIntl().formatMessage({id: 'purchaseOrder.orderCollect.schema.shopId'}),
'x-rules': [{
required: true,
message: getIntl().formatMessage({id: 'common.bitian'}),
}],
},
digest: {
type: 'string',
......
......@@ -9,7 +9,7 @@ import {
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history, Prompt } from 'umi';
import { getIntl, history, Prompt } from 'umi';
import moment from 'moment';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { usePageStatus } from '@/hooks/usePageStatus';
......@@ -20,7 +20,7 @@ import { normalizeUnevaluatedList } from '../../utils';
import { evaluateSchema } from '../../common/schemas/evaluateSchema';
import { createEffects } from '../../common/effects';
import EvaluationList from '../../components/EvaluationList';
const intl = getIntl();
const formActions = createFormActions();
const {
onFormInputChange$,
......@@ -120,7 +120,7 @@ const EvaluateOrder: React.FC = () => {
const beforeUpload = file => {
if (file.size / 1024 / 1024 > 10) {
message.warning('图片大小超过10M');
message.warning(intl.formatMessage({ id: 'purchaserEvaluation.tupiandaxiaochaoguo10M' }));
return Upload.LIST_IGNORE;
}
return Promise.resolve();
......@@ -136,7 +136,7 @@ const EvaluateOrder: React.FC = () => {
position: 'relative',
}}
>
支持JPG/PNG/JPEG <br />每张最大不超过 10M,尺寸不限 <br />最大数量限制 4张
{intl.formatMessage({ id: 'purchaserEvaluation.tupiandaxiaochaoguo10M' })} <br />{intl.formatMessage({ id: 'purchaserEvaluation.meizhangzuidabuchaoguo' })} <br />{intl.formatMessage({ id: 'purchaserEvaluation.zuidashuliangxianzhi4' })}
</div>
);
......@@ -154,7 +154,7 @@ const EvaluateOrder: React.FC = () => {
title={
<AvatarWrap
info={{
aloneTxt: '单',
aloneTxt: intl.formatMessage({ id: 'purchaserEvaluation.dan' }),
name: orderInfo?.orderNo,
}}
/>
......@@ -168,7 +168,7 @@ const EvaluateOrder: React.FC = () => {
loading={submitLoading}
onClick={() => formActions.submit()}
>
发布
{intl.formatMessage({ id: 'member.memberEvaluate.createEvaluate.index.release' })}
</Button>
</>
)}
......@@ -180,8 +180,8 @@ const EvaluateOrder: React.FC = () => {
padding: '0 32px',
}}
>
<Descriptions.Item label="供应会员">{orderInfo?.memberName}</Descriptions.Item>
<Descriptions.Item label="下单时间" span={2}>
<Descriptions.Item label={intl.formatMessage({ id: 'purchaserEvaluation.gongyinghuiyuan' })}>{orderInfo?.memberName}</Descriptions.Item>
<Descriptions.Item label={intl.formatMessage({ id: 'purchaserEvaluation.xiadanshijian' })}span={2}>
{orderInfo?.createTime}
</Descriptions.Item>
</Descriptions>
......
......@@ -157,7 +157,12 @@ export const registerStep1Schema: ISchema = {
properties: {
typeId: {
type: 'string',
"x-rules": [
{
required: true,
message: intl.formatMessage({id: 'common.text.pleaseSelect'})
}
],
"x-component": 'CustomRadio',
"x-component-props": {
layout: 'column'
......
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