Commit cab85d11 authored by Lfy-12's avatar Lfy-12

Merge branch 'v2-220318' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2-220318

parents a069d380 1bf97b5f
...@@ -695,6 +695,7 @@ export default { ...@@ -695,6 +695,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option':'Operation', 'commodity.products.addProductsItem.priceAttributeForm.option':'Operation',
'commodity.products.addProductsItem.priceAttributeForm.button.1':'Set points', 'commodity.products.addProductsItem.priceAttributeForm.button.1':'Set points',
'commodity.products.addProductsItem.priceAttributeForm.button.2':'Set price', 'commodity.products.addProductsItem.priceAttributeForm.button.2':'Set price',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : 'Delete',
'commodity.products.addProductsItem.priceAttributeForm.id':'Specification ID', 'commodity.products.addProductsItem.priceAttributeForm.id':'Specification ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate':'Sub-unit price rate', 'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate':'Sub-unit price rate',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId':'Unit', 'commodity.products.addProductsItem.priceAttributeForm.form.unitId':'Unit',
......
...@@ -697,6 +697,7 @@ export default { ...@@ -697,6 +697,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option' : '조작하다', 'commodity.products.addProductsItem.priceAttributeForm.option' : '조작하다',
'commodity.products.addProductsItem.priceAttributeForm.button.1' : '포인트 설정', 'commodity.products.addProductsItem.priceAttributeForm.button.1' : '포인트 설정',
'commodity.products.addProductsItem.priceAttributeForm.button.2' : '설정 가격', 'commodity.products.addProductsItem.priceAttributeForm.button.2' : '설정 가격',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : '지우다',
'commodity.products.addProductsItem.priceAttributeForm.id' : '사양 ID', 'commodity.products.addProductsItem.priceAttributeForm.id' : '사양 ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '부단가율', 'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '부단가율',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '유닛', 'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '유닛',
......
...@@ -694,6 +694,7 @@ export default { ...@@ -694,6 +694,7 @@ export default {
'commodity.products.addProductsItem.priceAttributeForm.option' : '操作', 'commodity.products.addProductsItem.priceAttributeForm.option' : '操作',
'commodity.products.addProductsItem.priceAttributeForm.button.1' : '设置积分', 'commodity.products.addProductsItem.priceAttributeForm.button.1' : '设置积分',
'commodity.products.addProductsItem.priceAttributeForm.button.2' : '设置价格', 'commodity.products.addProductsItem.priceAttributeForm.button.2' : '设置价格',
'commodity.products.addProductsItem.priceAttributeForm.button.3' : '删除',
'commodity.products.addProductsItem.priceAttributeForm.id' : '规格ID', 'commodity.products.addProductsItem.priceAttributeForm.id' : '规格ID',
'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '副单价率', 'commodity.products.addProductsItem.priceAttributeForm.assistantUniquePriceRate' : '副单价率',
'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '单位', 'commodity.products.addProductsItem.priceAttributeForm.form.unitId' : '单位',
......
...@@ -11,13 +11,20 @@ type OptionsType = { ...@@ -11,13 +11,20 @@ type OptionsType = {
type ValueType = Omit< type ValueType = Omit<
GetSettleAccountsPlatformConfigGetMemberSettlementStrategyDetailResponse, GetSettleAccountsPlatformConfigGetMemberSettlementStrategyDetailResponse,
"settlementOrderType" | "settlementWay" | "status" | "id" | "settlementPaymentTypeName" | "settlementDays" | "settlementDate" "settlementOrderType" |
"settlementWay" |
"status" |
"id" |
"settlementPaymentTypeName" |
"settlementDays" |
"settlementDate" |
"estimatedPaymentDate"
> & { > & {
settlementOrderType: string, settlementOrderType: string,
settlementWay: { settlementWay: {
active: number, active: number,
otherValues: [number, number], otherValues: [number, number],
payDay: number payDay: number | null,
} }
} }
...@@ -42,7 +49,7 @@ const useGetInfo = (options: OptionsType) => { ...@@ -42,7 +49,7 @@ const useGetInfo = (options: OptionsType) => {
settlementWay: { settlementWay: {
active: res.data.settlementWay, active: res.data.settlementWay,
otherValues: [res.data.settlementDays, res.data.settlementDate], otherValues: [res.data.settlementDays, res.data.settlementDate],
payDay: res.data.estimatedPaymentDate || 1 payDay: res.data.estimatedPaymentDate || null
}, },
settlementPaymentType: res.data.settlementPaymentType, settlementPaymentType: res.data.settlementPaymentType,
}) })
......
...@@ -86,7 +86,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -86,7 +86,7 @@ const Attribute: React.FC<{}> = () => {
const [syncLoading, setSyncLoading] = useState<boolean>(false) const [syncLoading, setSyncLoading] = useState<boolean>(false)
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' }) const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' })
const [isMultiple, setIsMultiple]= useState<boolean>(false) // saas多租户 const [isMultiple, setIsMultiple]= useState<boolean>(true) // saas多租户
useEffect(() => { useEffect(() => {
getMultiple() getMultiple()
...@@ -127,7 +127,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -127,7 +127,7 @@ const Attribute: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.name' }), title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.name' }),
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
render: (text: any, record: any) => <span className="commonPickColor" onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></span> render: (text, record) => <span className="commonPickColor" onClick={() => handleSee(record)}>{text}&nbsp;<EyeOutlined /></span>
}, },
{ {
title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.groupName' }), title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.groupName' }),
...@@ -147,13 +147,13 @@ const Attribute: React.FC<{}> = () => { ...@@ -147,13 +147,13 @@ const Attribute: React.FC<{}> = () => {
title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty' }), title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty' }),
dataIndex: 'isEmpty', dataIndex: 'isEmpty',
key: 'isEmpty', key: 'isEmpty',
render: (text: any) => text ? intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty.1' }) : intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty.2' }) render: (text) => text ? intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty.1' }) : intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEmpty.2' })
}, },
{ {
title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEnable' }), title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEnable' }),
dataIndex: 'isEnable', dataIndex: 'isEnable',
key: 'isEnable', key: 'isEnable',
render: (text: any, record: any) => ( render: (text, record) => (
<Popconfirm <Popconfirm
title={intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEnable.title' })} title={intl.formatMessage({ id: 'classAndProperty.attribute.columns.isEnable.title' })}
onConfirm={() => confirm(record)} onConfirm={() => confirm(record)}
...@@ -172,7 +172,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -172,7 +172,7 @@ const Attribute: React.FC<{}> = () => {
{ {
title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.option' }), title: intl.formatMessage({ id: 'classAndProperty.attribute.columns.option' }),
dataIndex: 'option', dataIndex: 'option',
render: (text: any, record: any) => record.isEnable ? '' : <> render: (text, record) => record.isEnable ? '' : <>
<Button type='link' onClick={() => handleEdit(record)}>{intl.formatMessage({ id: 'classAndProperty.attribute.columns.option.linke.1' })}</Button> <Button type='link' onClick={() => handleEdit(record)}>{intl.formatMessage({ id: 'classAndProperty.attribute.columns.option.linke.1' })}</Button>
...@@ -192,23 +192,23 @@ const Attribute: React.FC<{}> = () => { ...@@ -192,23 +192,23 @@ const Attribute: React.FC<{}> = () => {
} }
]; ];
const handleSee = (record: any) => { const handleSee = (record) => {
history.push(`/memberCenter/commodityAbility/classAndProperty/attribute/detail?id=${record.id}&isSee=true`) history.push(`/memberCenter/commodityAbility/classAndProperty/attribute/detail?id=${record.id}&isSee=true`)
} }
const confirm = (record: any) => { const confirm = (record) => {
postProductCustomerUpdateCustomerAttributeStatus({ id: record.id, isEnable: !record.isEnable }).then(res => { postProductCustomerUpdateCustomerAttributeStatus({ id: record.id, isEnable: !record.isEnable }).then(res => {
ref.current.reload() ref.current.reload()
}) })
} }
const clickDelete = (record: any) => { const clickDelete = (record) => {
postProductCustomerDeleteCustomerAttribute({ id: record.id }).then(res => { postProductCustomerDeleteCustomerAttribute({ id: record.id }).then(res => {
ref.current.reload() ref.current.reload()
}) })
} }
const handleEdit = (record: any) => { const handleEdit = (record) => {
history.push(`/memberCenter/commodityAbility/classAndProperty/attribute/edit?id=${record.id}`) history.push(`/memberCenter/commodityAbility/classAndProperty/attribute/edit?id=${record.id}`)
} }
...@@ -264,7 +264,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -264,7 +264,7 @@ const Attribute: React.FC<{}> = () => {
<StandardTable <StandardTable
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params) => fetchData(params)}
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
...@@ -316,7 +316,7 @@ const Attribute: React.FC<{}> = () => { ...@@ -316,7 +316,7 @@ const Attribute: React.FC<{}> = () => {
visible={syncVisible} visible={syncVisible}
columns={columns} columns={columns}
rowSelection={rowSelection} rowSelection={rowSelection}
fetchTableData={(params: any) => fetchPlatformData(params)} fetchTableData={(params) => fetchPlatformData(params)}
formilyProps={ formilyProps={
{ {
ctx: { ctx: {
......
...@@ -54,7 +54,7 @@ const ClassProperty: React.FC<{}> = () => { ...@@ -54,7 +54,7 @@ const ClassProperty: React.FC<{}> = () => {
const [finshLoading, setFinshLoading] = useState<boolean>(false) const [finshLoading, setFinshLoading] = useState<boolean>(false)
const [deleteLoading, setDeleteLoading] = useState<boolean>(false) const [deleteLoading, setDeleteLoading] = useState<boolean>(false)
const [resetSearch, setResetSearch] = useState(false) const [resetSearch, setResetSearch] = useState(false)
const [isMultiple, setIsMultiple] = useState<boolean>(false) // saas多租户 const [isMultiple, setIsMultiple] = useState<boolean>(true) // saas多租户
/* 选择品类树 */ /* 选择品类树 */
const { const {
...@@ -248,12 +248,16 @@ const ClassProperty: React.FC<{}> = () => { ...@@ -248,12 +248,16 @@ const ClassProperty: React.FC<{}> = () => {
actions={formActions} actions={formActions}
effects={($, action) => { effects={($, action) => {
$('onFormMount').subscribe(() => { $('onFormMount').subscribe(() => {
console.log(isMultiple, 'isMultiple')
if(isMultiple) { if(isMultiple) {
action.setFieldState('category', state => { action.setFieldState('category', state => {
state.display = false state.display = false
state.visible = false state.visible = false
}) })
} else {
action.setFieldState('category', state => {
state.display = true
state.visible = true
})
} }
}) })
flag = false flag = false
......
...@@ -65,6 +65,7 @@ export const classSchema: ISchema = { ...@@ -65,6 +65,7 @@ export const classSchema: ISchema = {
}, },
category: { category: {
type: 'object', type: 'object',
visible: false,
properties: { properties: {
id: { id: {
type: 'number', type: 'number',
......
...@@ -95,7 +95,7 @@ const PropertyValue: React.FC<{}> = () => { ...@@ -95,7 +95,7 @@ const PropertyValue: React.FC<{}> = () => {
const [syncLoading, setSyncLoading] = useState<boolean>(false) const [syncLoading, setSyncLoading] = useState<boolean>(false)
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' }) const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' })
const flag = useRef<boolean>(false) // 标识 初始点击品类不执行effect的重载表格 const flag = useRef<boolean>(false) // 标识 初始点击品类不执行effect的重载表格
const [isMultiple, setIsMultiple] = useState<boolean>(false) // saas多租户 const [isMultiple, setIsMultiple] = useState<boolean>(true) // saas多租户
const { const {
treeData, treeData,
......
...@@ -181,7 +181,7 @@ const AddProducts: React.FC<{}> = (props) => { ...@@ -181,7 +181,7 @@ const AddProducts: React.FC<{}> = (props) => {
} }
} }
if (productInfoByEdit?.type === CommodityType.UPPER_SUPPORTER_COMMODITY) { if (productInfoByEdit?.type === CommodityType.UPPER_SUPPORTER_COMMODITY) {
// @ 上游商品 直接取原信息中的品类品牌id // 上游商品 直接取原信息中的品类品牌id
_bacsicForm.customerCategoryId = productInfoByEdit?.customerCategory.fullId.split('.').map(item => Number(item) + '') _bacsicForm.customerCategoryId = productInfoByEdit?.customerCategory.fullId.split('.').map(item => Number(item) + '')
_bacsicForm.brandId = productInfoByEdit?.brand?.id || null _bacsicForm.brandId = productInfoByEdit?.brand?.id || null
} }
......
...@@ -299,11 +299,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -299,11 +299,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
_col.push({ _col.push({
title: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.option' }), title: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.option' }),
dataIndex: 'option', dataIndex: 'option',
width: 100, width: 200,
render: (text, record) => { render: (text, record) => {
return ( return (
<> <>
<Button type='link' onClick={() => clickSetPrice(record)}>{planPrice === 3 ? intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.1' }) : intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.2' })}</Button> <Button type='link' onClick={() => clickSetPrice(record)}>{planPrice === 3 ? intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.1' }) : intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.2' })}</Button>
{/* @todo 删除一行 */}
{/* <Button type='link' onClick={() => deleteSetPrice(record)}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.button.3' })}</Button> */}
</> </>
) )
} }
...@@ -548,6 +550,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => { ...@@ -548,6 +550,13 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
priceForm.setFieldsValue({ isMemberPrice: false }) priceForm.setFieldsValue({ isMemberPrice: false })
} }
const deleteSetPrice = (record) => {
let newTabeData = [..._tableDataSource]
newTabeData.splice(record['索引'], 1)
_tableDataSource = newTabeData
setTableDataSource(_tableDataSource)
}
const confirmPrice = () => { const confirmPrice = () => {
setPriceForm.validateFields().then(v => { setPriceForm.validateFields().then(v => {
setPriceModalVisible(false) setPriceModalVisible(false)
......
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