Commit 1a9671cf authored by Bill's avatar Bill
parents 870ac769 22d27c2a
......@@ -270,4 +270,5 @@ export default {
'selfManagement.qingshuruId':'Please enter id',
"selfManagement.bixudayu0zuiduobaoliu3wei": "Keep a maximum of 3 decimal places, which is greater than 0 and cannot be empty",
"selfManagement.rejectmin1":"Keep a maximum of 1 decimal place, greater than 0 and less than 100, and cannot be empty",
"selfManagement.di": 'The First',
}
......@@ -270,4 +270,5 @@ export default {
'selfManagement.qingshuruId': 'id를 입력하십시오.',
"selfManagement.bixudayu0zuiduobaoliu3wei": "최대 3자리의 소수를 0보다 크게 유지하며 비워둘 수 없습니다.",
"selfManagement.rejectmin1": "0보다 크고 100보다 작은 소수 자릿수를 최대 1자리까지 유지하며 null이 될 수 없습니다.",
"selfManagement.di": '제',
}
......@@ -270,4 +270,5 @@ export default {
'selfManagement.qingshuruId': '请输入id',
"selfManagement.bixudayu0zuiduobaoliu3wei": "最多保留3位小数,大于0,不可为空",
"selfManagement.rejectmin1":"最多保留1位小数,大于0且小于100,不可为空",
"selfManagement.di": '第',
}
......@@ -470,6 +470,7 @@ const Products: React.FC<{}> = () => {
const params = {
shopIds: shops.map(item => item.shopId),
products,
shopType: shops.map(item => item.type)[0]
}
const { data, code } = await postOrderCommonProductProcessFind(params, {ctlType: 'none'})
if(code === 1000 && data.length > 0) {
......@@ -485,6 +486,7 @@ const Products: React.FC<{}> = () => {
const executePutaway = (params) => {
const fn = isBatch ? postProductCommodityPublishCommodityBatch : postProductCommodityPublishCommodity
const shopId = shopIdRef.current
console.log(shopId, 'shopId')
// @ts-ignore
fn(isBatch ? { storeId: shopId['id'], storeName: shopId['name'], storeLogo: shopId['logo'], shopList: checkedValues, idList: RowCtl.selectedRowKeys } : { storeId: shopId?.id || null, storeName: shopId?.name || null, storeLogo: shopId?.logo || null, ...params }).then((res) => {
if(res.code === 1000) {
......
......@@ -46,14 +46,12 @@ const ProductModal: React.FC<ProductModalProps> = (props) => {
// 指定商品
const fetchProductList = async (params) => {
const shopId = schemaAction.getFieldValue('shopId')
let shopInfo: any = GlobalConfig.web.shopInfo.filter(item => item.id === shopId)
const values = schemaAction.getFieldState('shopId')['values']
const res = await getProductCommodityGetStrategyCommodityList({
...params,
type: shopInfo[0]["type"],
environment: shopInfo[0].environment,
shopId,
type: values[1]["type"],
environment: values[1]['environment'],
shopId: values[0],
// priceTypeList: [1, 2],
})
return res.data
......
import React from 'react'
import React, { useState } from 'react'
import { history, useIntl } from 'umi'
import { Button, Card, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
......@@ -21,10 +21,12 @@ const BatchAddRepository: React.FC<{}> = (props) => {
pageStatus
} = usePageStatus()
const [loading, setLoading] = useState<boolean>(false)
// 整体表单提交
const formSubmit = async (values) => {
setLoading(true)
const params = { ...values }
console.log(params, 'params')
if (params['applyMember']) {
params['applyMember'] = params['applyMember']
}
......@@ -41,7 +43,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
}))
}
if (!params['isAllMemberShare'] && !params['applyMember']?.length) {
message.error(intl.formatMessage({ id: 'repositories.batchAddRepository.error' }))
setLoading(false)
return message.error(intl.formatMessage({ id: 'repositories.batchAddRepository.error' }))
} else {
addSchemaAction.getFieldState('warehouseId', prevState => {
if (prevState.value) {
......@@ -56,6 +59,8 @@ const BatchAddRepository: React.FC<{}> = (props) => {
setTimeout(() => {
history.goBack()
}, 1000)
} else {
setLoading(true)
}
}
}
......@@ -69,7 +74,7 @@ const BatchAddRepository: React.FC<{}> = (props) => {
extra={(
pageStatus !== PageStatus.PREVIEW
? (
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />} loading={loading}>
{intl.formatMessage({ id: 'repositories.batchAddRepository.extra' })}
</Button>
)
......
......@@ -119,13 +119,13 @@ export const GeneralEffect = (int, data) => {
{(int === 5 && data.type === 2) && `${intl.formatMessage({ id: 'marketingAbility.fullFold'})}`}
</>, extra: <>
{(int === 4 && data.type === 1) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${item.key} ${intl.formatMessage({ id: 'marketingAbility.ge' })}, ${intl.formatMessage({ id: 'marketingAbility.jian' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}`}</div>))}
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${item.key} ${intl.formatMessage({ id: 'marketingAbility.ge' })}, ${intl.formatMessage({ id: 'marketingAbility.jiandelete' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}`}</div>))}
</Space>}
{(int === 4 && data.type === 2) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${item.key} ${intl.formatMessage({ id: 'marketingAbility.ge' })}, ${intl.formatMessage({ id: 'marketingAbility.da' })} ${item.value / 10} ${intl.formatMessage({ id: 'marketingAbility.zhe' })}`}</div>))}
</Space>}
{(int === 5 && data.type === 1) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${Number(item.key).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}, ${intl.formatMessage({ id: 'marketingAbility.jian' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}`}</div>))}
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${Number(item.key).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}, ${intl.formatMessage({ id: 'marketingAbility.jiandelete' })} ${Number(item.value).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}`}</div>))}
</Space>}
{(int === 5 && data.type === 2) && <Space direction='vertical'>
{data.ladderList.map(item => (<div>{`${intl.formatMessage({ id: 'marketingAbility.man' })} ${Number(item.key).toFixed(2)} ${intl.formatMessage({ id: 'marketingAbility.yuan' })}, ${intl.formatMessage({ id: 'marketingAbility.da' })} ${item.value / 10} ${intl.formatMessage({ id: 'marketingAbility.zhe' })}`}</div>))}
......
......@@ -344,7 +344,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
required
>
{fields.map(({ key, name, fieldKey, ...restField }) => (
<Space key={key} style={{ display: 'flex', marginBottom: 8 }} align="center">{intl.formatMessage({ id: 'selfManagement.full' })}<Form.Item
<Space key={key} style={{ display: 'flex', marginBottom: 8 }} align="center">{intl.formatMessage({ id: 'selfManagement.di' })}<Form.Item
{...restField}
style={{ margin: 0 }}
name={[name, `${int === ACTIVITY_TYPE_7 ? 'num' : 'key'}`]}
......
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