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

fix:商品、货品、品类问题

parent 97dd7ab1
......@@ -294,7 +294,7 @@ const CategoryAttributes: React.FC<{}> = () => {
name: {
type: 'string',
'x-component-props': {
placeHolder: '属性名称'
placeholder: '属性名称'
},
'x-component': 'Search'
}
......@@ -324,6 +324,7 @@ const CategoryAttributes: React.FC<{}> = () => {
onCancel={handleSelectCancel}
okText="确认"
cancelText="取消"
destroyOnClose={true}
>
<StandardTable
columns={columnsLink}
......
......@@ -61,50 +61,32 @@ const AddGoods = () => {
}
}, [])
const handleBrandSearch = (value:any) => { // end value
if (value) {
PublicApi.getProductSelectGetSelectBrand({name: value}).then(res=>{
if(res.code === 1000)
setBrandData(res.data)
})
} else {
setBrandData([])
}
const handleBrandSearch = (value?:any) => { // end value
PublicApi.getProductSelectGetSelectBrand({name: value}).then(res=>{
if(res.code === 1000)
setBrandData(res.data)
})
}
const handleBrandChange = (value:any) => {
setBrandValue(value)
// let obj = {...filterParams, brandId: value}
// setFilterParams(obj)
}
const handleClassSearch = (value:any) => {
if (value) {
PublicApi.getProductSelectGetSelectCustomerCategory({name: value}).then(res=>{
if(res.code === 1000)
setClassData(res.data)
})
} else {
setClassData([])
}
const handleClassSearch = (value?:any) => {
PublicApi.getProductSelectGetSelectCustomerCategory({name: value}).then(res=>{
if(res.code === 1000)
setClassData(res.data)
})
}
const handleClassChange = (value:any) => {
setClassValue(value)
// let obj = {...filterParams, customerCategoryId: value}
// setFilterParams(obj)
}
const handleUnitSearch = (value:any) => {
if (value) {
PublicApi.getProductSelectGetSelectCnUnit({name: value}).then(res=>{
if(res.code === 1000)
setUnitData(res.data)
})
} else {
setUnitData([])
}
const handleUnitSearch = (value?:any) => {
PublicApi.getProductSelectGetSelectCnUnit({name: value}).then(res=>{
if(res.code === 1000)
setUnitData(res.data)
})
}
const handleUnitChange = (value:any) => {
setUnitValue(value)
// let obj = {...filterParams, customerCategoryId: value}
// setFilterParams(obj)
}
const onFinish = (values:any) => {
......@@ -188,6 +170,7 @@ const AddGoods = () => {
filterOption={false}
onSearch={handleClassSearch}
onChange={handleClassChange}
onFocus={()=>handleClassSearch(null)}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
......@@ -215,6 +198,7 @@ const AddGoods = () => {
filterOption={false}
onSearch={handleBrandSearch}
onChange={handleBrandChange}
onFocus={()=>handleBrandSearch(null)}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
......@@ -241,6 +225,7 @@ const AddGoods = () => {
filterOption={false}
onSearch={handleUnitSearch}
onChange={handleUnitChange}
onFocus={()=>handleUnitSearch(null)}
notFoundContent={null}
style={{width:'100%'}}
disabled={isSee}
......
......@@ -105,13 +105,13 @@ const viewProducts: React.FC<{}> = () => {
key: 'status',
render: (text:any, record:any) => {
let component: ReactNode = null
if(record.status === 1)
component = (<><span className="commonStatusValid"></span>通过</>)
if(record.status === 4)
component = (<><span className="commonStatusValid"></span>审核通过</>)
else if(record.status === 1)
component = (<><span className="commonStatusInvalid"></span>待提交审核</>)
else if(record.status === 2)
component = (<><span className="commonStatusInvalid"></span>待提交</>)
else if(record.status === 3)
component = (<><span className="commonStatusModify"></span>待审核</>)
else if(record.status === 4)
else if(record.status === 3)
component = (<><span className="commonStatusStop"></span>审核不通过</>)
return component
}
......
......@@ -168,6 +168,11 @@ const Trademark: React.FC<{}> = () => {
},
ctx: {
inline: false,
effects: ($, action) => {
$('onFieldValueChange', 'status').subscribe(state => {
ref.current.reload({current:1, pageSize: 10, status: state.value})
})
},
schema: {
type: 'object',
properties: {
......
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