Commit 65f5a820 authored by GuanHua's avatar GuanHua
parents 439f1e6c f27d1bee
......@@ -92,6 +92,7 @@ const AddProducts: React.FC<{}> = (props) => {
keywords: data.keywords,
description: data.description,
type: data.type,
createTime: data.createTime,
})
setProductName(data?.name)
setProductPriceType(data?.priceType)
......
import React, { useState, useEffect, useRef, useMemo } from 'react'
import { history } from 'umi'
import { Button, Form, Select, Checkbox, Tooltip, Radio, Input, Table, Modal, Row, Col, InputNumber, Space } from 'antd'
import styles from './index.less'
// import styles from './index.less'
import { PublicApi } from '@/services/api'
import { ColumnType } from 'antd/lib/table/interface'
import { QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, } from '@ant-design/icons'
import { inject, observer } from 'mobx-react'
import { observer } from 'mobx-react'
import { store } from '@/store'
import { IProductSelectAttribute } from '@/module/productModule'
import { orderlyLadderPrice, validatorNumberRange } from '../constant'
const _ = require("lodash");
const layout = {
labelCol: {
span: 2,
......
......@@ -152,6 +152,11 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
_isPrice = attrItem.isPrice
_isUpdateAttribute = productInfoByEdit.isUpdateAttribute
_isDisabled = _isPrice && !_isUpdateAttribute
// 编辑中 过滤后续添加的属性
if(!_isUpdateAttribute && (attrItem.createTime > productInfoByEdit.createTime)) {
return null
}
console.log(attrItem, attributesData, productInfoByEdit, 'data')
}
return (
......@@ -262,7 +267,7 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
<Tabs defaultActiveKey="1" tabPosition="left">
{
attributesData?.length > 0 && attributesData.map(attributeItem =>
<TabPane tab={attributeItem.name} key={attributeItem.id}>
!productInfoByEdit.isUpdateAttribute && (attributeItem.createTime > productInfoByEdit.createTime) ? null : <TabPane tab={attributeItem.name} key={attributeItem.id}>
{
renderTabPanchildren(attributeItem)
}
......
......@@ -387,14 +387,14 @@ const viewProducts: React.FC<{}> = () => {
</Col>
<Col span={8}>
<Card headStyle={{borderBottom:'none'}} title="其他信息" style={{height:'100%'}}>
<Row>
{/* <Row>
<Col span={4}>
<p>提供发票:</p>
</Col>
<Col span={20}>
<p>{productDetail?.isInvoice?'是':'否'}</p>
</Col>
</Row>
</Row> */}
<Row>
<Col span={4}>
<p>税率:</p>
......
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