Commit 4918f3cd authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:品类属性一些问题

parent 39ed5de9
......@@ -127,6 +127,14 @@ const AddAtttribute: React.FC<{}> = () => {
}
};
// 特殊属性切换
const onChangeSpecial = (e, type) => {
if(type === 'isDate')
menuForm.setFieldsValue({isArea: false})
if(type === 'isArea')
menuForm.setFieldsValue({isDate: false})
}
return <PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回"/>}
......@@ -224,7 +232,8 @@ const AddAtttribute: React.FC<{}> = () => {
</Tooltip>
</Col> */}
<Col span={24}>
<Form.Item name="isPrice" valuePropName="checked" initialValue={false} noStyle><Checkbox disabled={pageStatus === 2}>价格属性</Checkbox></Form.Item>
{/* 规格属性 -> 原价格属性 */}
<Form.Item name="isPrice" valuePropName="checked" initialValue={false} noStyle><Checkbox disabled={pageStatus === 2}>规格属性</Checkbox></Form.Item>
<Tooltip title="勾选后对于此属性的每个属性值会在商品发布时按属性设置不同的价格!">
<InfoCircleOutlined />
</Tooltip>
......@@ -235,6 +244,23 @@ const AddAtttribute: React.FC<{}> = () => {
<InfoCircleOutlined />
</Tooltip>
</Col>
{/* 日期 地区属性 */}
<Col span={24}>
<Form.Item name="isDate" valuePropName="checked" initialValue={false} noStyle>
<Checkbox onChange={(e) => onChangeSpecial(e, 'isDate')}>日期属性</Checkbox>
</Form.Item>
<Tooltip title="勾选后此属性作为日期属性,日期属性的属性值无需在属性值管理中设置,系统自动取自然日作为属性值">
<InfoCircleOutlined />
</Tooltip>
</Col>
<Col span={24}>
<Form.Item name="isArea" valuePropName="checked" initialValue={false} noStyle>
<Checkbox onChange={(e) => onChangeSpecial(e, 'isArea')}>地区属性</Checkbox>
</Form.Item>
<Tooltip title="勾选后此属性作为地区属性,地区属性的属性值无需手工在属性值管理中设置,系统自动取地区数据作为属性值">
<InfoCircleOutlined />
</Tooltip>
</Col>
</Row>
</Form.Item>
</Col>
......
......@@ -312,6 +312,7 @@ const CategoryAttributes: React.FC<{}> = () => {
okText="确认"
cancelText="取消"
width={704}
destroyOnClose={true}
>
<StandardTable
columns={columnsLink}
......
......@@ -13,7 +13,6 @@ import { classSchema } from './schema'
import { PublicApi } from '@/services/api';
import { useTreeTabs } from '@/hooks/useTreeTabs';
import NiceForm from '@/components/NiceForm';
import { isObject } from '@antv/util';
const { ON_FORM_INPUT_CHANGE } = LifeCycleTypes
......@@ -57,9 +56,6 @@ const ClassProperty: React.FC<{}> = () => {
})
const formInitValue = (nodeRecord && treeStatus === FormState.EDIT) ? getTreeMaps(nodeRecord.key) : {}
useEffect(() => {
console.log(nodeRecord, 'getTreeMaps')
}, [getTreeMaps])
const onFinish = (values) => {
const editOrAdd = nodeRecord && treeStatus === FormState.EDIT
......@@ -96,6 +92,7 @@ const ClassProperty: React.FC<{}> = () => {
fetchData = {params => fetchClassTreeData(params)}
treeData={treeData}
toolsRender={toolsRender}
actions={treeActions}
handleSelect={(key, node) => clickSelect(key, node)}
customKey="id"
/>
......
......@@ -393,7 +393,7 @@ const viewProducts: React.FC<{}> = () => {
<p>商品卖点:</p>
</Col>
<Col span={20}>
<p>{productDetail?.sellingPoint.map(_item => <Tag key={_item}>{_item}</Tag>)}</p>
<p>{productDetail?.sellingPoint && productDetail.sellingPoint.map(_item => <Tag key={_item}>{_item}</Tag>)}</p>
</Col>
</Row>
<Row>
......
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