Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
6255d67c
Commit
6255d67c
authored
Aug 19, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
4f36f26e
bcd90b9f
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
304 additions
and
170 deletions
+304
-170
base.config.json~9fd9e0c42f4f7acd87288c2a6cbbf656aae80311
...base.config.json~9fd9e0c42f4f7acd87288c2a6cbbf656aae80311
+1
-1
CustomInputSearch.tsx
src/components/NiceForm/components/CustomInputSearch.tsx
+3
-35
index.ts
src/constants/index.ts
+3
-0
global.d.ts
src/global/config/global.d.ts
+53
-0
index.tsx
src/pages/classAndProperty/categoryAttributes/index.tsx
+1
-1
productDescFormOne.tsx
...commodity/products/addProductsItem/productDescFormOne.tsx
+3
-2
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+3
-2
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+128
-125
channelSchema.tsx
src/pages/commodity/products/schema/channelSchema.tsx
+102
-0
index.tsx
src/pages/member/memberImport/schema/index.tsx
+2
-1
index.tsx
src/pages/member/memberMaintain/schema/index.tsx
+2
-1
addBrand.tsx
src/pages/trademark/addBrand.tsx
+3
-2
No files found.
config/base.config.json~9fd9e0c42f4f7acd87288c2a6cbbf656aae80311
View file @
6255d67c
{"userRegister":{"useType":{"memberType":[{"id":1,"typeName":"企业会员"},{"id":3,"typeName":"渠道企业会员"},{"id":4,"typeName":"渠道个人会员"},{"id":2,"typeName":"个人会员"}],"businessType":[{"id":1,"typeName":"采购"},{"id":39,"typeName":"供货"},{"id":40,"typeName":"供货商消费者"},{"id":41,"typeName":"供货商消费者渠道会员"}]}},"web":{"shopInfo":[]},"global":{"siteId":
5
02,"siteUrl":"http://localhost:4396","logo":"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/4db4e7c5424c471c968ab540bce027f31597319423082.png","countryList":[{"name":"简体中文-ZH","key":"zh-CN","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"},{"name":"English-EN","key":"en-US","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"},{"name":"日本語-JP","key":"jp","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"},{"name":"한국어-KO","key":"ko","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"}]}}
{"userRegister":{"useType":{"memberType":[{"id":1,"typeName":"企业会员"},{"id":3,"typeName":"渠道企业会员"},{"id":4,"typeName":"渠道个人会员"},{"id":2,"typeName":"个人会员"}],"businessType":[{"id":1,"typeName":"采购"},{"id":39,"typeName":"供货"},{"id":40,"typeName":"供货商消费者"},{"id":41,"typeName":"供货商消费者渠道会员"}]}},"web":{"shopInfo":[]},"global":{"siteId":
6
02,"siteUrl":"http://localhost:4396","logo":"https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/4db4e7c5424c471c968ab540bce027f31597319423082.png","countryList":[{"name":"简体中文-ZH","key":"zh-CN","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"},{"name":"English-EN","key":"en-US","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"},{"name":"日本語-JP","key":"jp","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"},{"name":"한국어-KO","key":"ko","icon":"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"}]}}
src/components/NiceForm/components/CustomInputSearch.tsx
View file @
6255d67c
...
...
@@ -15,30 +15,13 @@ const { Option } = Select
const
CustomInputSearch
=
props
=>
{
console
.
log
(
props
);
// const [state, setState] = useFieldState({
// filterSearch: false,
// });
const
justifyAlign
=
props
.
props
[
'x-component-props'
].
align
||
'flex-end'
;
// const changeFilterVisible = () => {
// if (state.filterSearch) {
// props.form.reset({
// // 清除FILTER_PARAMS下所有字段
// selector: `*.${FORM_FILTER_PATH}.*`,
// });
// }
// setState({
// filterSearch: !state.filterSearch,
// });
// };
const
[
brandData
,
setBrandData
]
=
useState
<
any
>
([])
const
[
brandValue
,
setBrandValue
]
=
useState
(
undefined
)
const
handleBrandSearch
=
(
value
:
any
)
=>
{
// end value
console
.
log
(
value
,
'
handleBrandSearch
'
)
console
.
log
(
value
,
'
搜索值
'
)
if
(
value
)
{
PublicApi
.
getProductSelectGetSelectBrand
({
name
:
value
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
...
...
@@ -49,33 +32,18 @@ const CustomInputSearch = props => {
}
}
// 只能在组件中获取对应的值
return
(
<
Space
size=
{
20
}
style=
{
{
justifyContent
:
justifyAlign
,
width
:
'100%'
}
}
>
<
Select
showSearch=
{
true
}
showArrow=
{
true
}
placeholder=
"品牌"
value=
{
brandValue
}
defaultActiveFirstOption=
{
false
}
filterOption=
{
false
}
// value={brandValue}
onSearch=
{
value
=>
handleBrandSearch
(
value
)
}
onChange=
{
v
=>
props
.
mutators
.
change
(
v
)
}
notFoundContent=
{
null
}
style=
{
{
width
:
'174px'
,
lineHeight
:
'32px'
}
}
{
...
props
.
props
['
x
-
component
-
props
']}
>
{
brandData
.
map
(
d
=>
<
Option
value=
{
d
.
id
}
key=
{
d
.
id
}
>
{
d
.
name
}
</
Option
>)
}
</
Select
>
{
/* <Input.Search
value={props.value || ''}
onChange={e => props.mutators.change(e.target.value)}
onSearch={(_, e) => {
e.preventDefault();
props.form.submit();
}}
{...props.props['x-component-props']}
/> */
}
</
Space
>
);
};
...
...
src/constants/index.ts
View file @
6255d67c
...
...
@@ -18,3 +18,5 @@ export const Environment_Status = {
3
:
"APP"
}
// 1是阿里云oss服务器, 2是本地文件服务器
export
const
UPLOAD_TYPE
=
isDev
?
2
:
1
\ No newline at end of file
src/global/config/global.d.ts
0 → 100644
View file @
6255d67c
export
interface
MemberType
{
id
:
number
;
typeName
:
string
;
}
export
interface
BusinessType
{
id
:
number
;
typeName
:
string
;
}
export
interface
UseType
{
memberType
:
MemberType
[];
businessType
:
BusinessType
[];
}
export
interface
UserRegister
{
useType
:
UseType
;
}
export
interface
ShopInfo
{
id
:
number
;
name
:
string
;
type
:
number
;
environment
:
number
;
logoUrl
:
string
;
describe
:
string
;
state
:
number
;
url
:
string
;
}
export
interface
Web
{
shopInfo
:
ShopInfo
[];
}
export
interface
CountryList
{
name
:
string
;
key
:
string
;
icon
:
string
;
}
export
interface
Global
{
siteId
:
number
;
siteUrl
:
string
;
logo
:
string
;
countryList
:
CountryList
[];
}
export
interface
RootObject
{
userRegister
:
UserRegister
;
web
:
Web
;
global
:
Global
;
}
\ No newline at end of file
src/pages/classAndProperty/categoryAttributes/index.tsx
View file @
6255d67c
...
...
@@ -211,7 +211,7 @@ const CategoryAttributes: React.FC<{}> = () => {
let
_txt
:
string
=
''
if
(
text
===
2
)
{
_txt
=
'多选'
}
else
if
(
text
===
2
)
{
}
else
if
(
text
===
1
)
{
_txt
=
'单选'
}
else
if
(
text
===
3
)
{
_txt
=
'输入'
...
...
src/pages/commodity/products/addProductsItem/productDescFormOne.tsx
View file @
6255d67c
...
...
@@ -6,6 +6,7 @@ import { Player } from 'video-react';
import
styles
from
'../index.less'
import
{
PlusOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
// import { PublicApi } from '@/services/api'
import
{
UPLOAD_TYPE
}
from
'@/constants'
export
interface
Iprops
{
...
...
@@ -37,7 +38,7 @@ const ProductDescFormOne: React.FC<Iprops> = (props) => {
name
:
'file'
,
action
:
'/api/file/file/upload'
,
showUploadList
:
false
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
onChange
(
info
)
{
if
(
info
.
file
.
status
!==
'uploading'
)
{
console
.
log
(
info
.
file
,
info
.
fileList
,
'image files'
);
...
...
@@ -72,7 +73,7 @@ const ProductDescFormOne: React.FC<Iprops> = (props) => {
name
:
'file'
,
action
:
'/api/file/file/upload'
,
showUploadList
:
false
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
onChange
(
info
)
{
if
(
info
.
file
.
status
!==
'uploading'
)
{
console
.
log
(
info
.
file
,
info
.
fileList
,
'video files'
);
...
...
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
6255d67c
...
...
@@ -5,6 +5,7 @@ import { PlusOutlined } from '@ant-design/icons'
import
CustomTabs
,
{
ItemPane
}
from
'@/components/CustomTabs'
import
styles
from
'./index.less'
import
{
UploadFile
,
UploadChangeParam
}
from
'antd/lib/upload/interface'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
inject
,
observer
}
from
'mobx-react'
// import { IProductModule } from '@/module/productModule'
...
...
@@ -206,7 +207,7 @@ const ProductImageForm: React.FC<Iprops> = (props) => {
beforeUpload=
{
beforeUpload
}
onPreview=
{
handlePreview
}
onChange=
{
(
files
)
=>
handleChange
(
files
,
index
)
}
data=
{
{
fileType
:
2
}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
>
{
item
.
commodityPic
.
length
>=
6
?
null
:
uploadButton
}
</
Upload
>
...
...
@@ -234,7 +235,7 @@ const ProductImageForm: React.FC<Iprops> = (props) => {
beforeUpload=
{
beforeUpload
}
onPreview=
{
handlePreview
}
onChange=
{
(
files
)
=>
handleChange
(
files
,
-
1
)
}
data=
{
{
fileType
:
2
}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
>
{
commonImageList
.
length
>=
6
?
null
:
uploadButton
}
</
Upload
>
...
...
src/pages/commodity/products/directChannel.tsx
View file @
6255d67c
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Form
,
Card
,
Modal
,
Select
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Modal
,
Select
,
Row
,
Col
,
Dropdown
,
Input
,
Menu
,
Space
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
EyeOutlined
,
DownOutlined
,
CaretUpOutlined
,
CaretDownOutlined
,
DeleteOutlined
,
VerticalAlignTopOutlined
,
VerticalAlignBottomOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
IFormFilter
,
IButtonFilter
}
from
'god/dist/src/standard-table/TableController'
;
import
NiceForm
from
'@/components/NiceForm'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
channelSchema
}
from
'./schema/channelSchema'
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
// 定义选择的行数据的类型
interface
Item
{
key
:
string
;
id
:
string
;
role
:
string
;
specification
:
string
;
type
:
string
;
...
...
@@ -25,7 +37,7 @@ interface Item {
const
data
=
[
{
key
:
'1'
,
id
:
'1'
,
role
:
'百达翡丽'
,
type
:
'小羊皮'
,
brand
:
'YSL'
,
...
...
@@ -37,7 +49,7 @@ const data = [
status
:
'0'
},
{
key
:
'2'
,
id
:
'2'
,
role
:
'万宝卡'
,
type
:
'小瓜皮'
,
brand
:
'MAC'
,
...
...
@@ -49,7 +61,7 @@ const data = [
status
:
'1'
},
{
key
:
'3'
,
id
:
'3'
,
role
:
'小宝SOD蜜'
,
type
:
'洗护一体'
,
brand
:
'AOC'
,
...
...
@@ -65,7 +77,7 @@ const data = [
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
)
const
queryResult
=
data
.
find
(
v
=>
v
.
id
===
params
.
keywords
)
setTimeout
(()
=>
{
resolve
({
code
:
200
,
...
...
@@ -76,8 +88,10 @@ const fetchData = (params:any) => {
})
}
const
formActions
=
createFormActions
();
const
DirectChannel
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
({})
const
ref
=
useRef
<
any
>
({})
const
[
selectRow
,
setSelectRow
]
=
useState
<
Item
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
deleteBatchModal
,
setDeleteBatchModal
]
=
useState
(
false
)
...
...
@@ -87,9 +101,9 @@ const DirectChannel: React.FC<{}> = () => {
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'
key
'
,
dataIndex
:
'
id
'
,
align
:
'center'
,
key
:
'
key
'
,
key
:
'
id
'
,
},
{
title
:
'商品名称'
,
...
...
@@ -174,103 +188,26 @@ const DirectChannel: React.FC<{}> = () => {
}
];
const
search
:
IFormFilter
[]
=
[
{
type
:
'Input'
,
value
:
'keywords'
,
col
:
4
,
placeHolder
:
'商品ID'
},
{
type
:
'Input'
,
value
:
'name'
,
col
:
4
,
placeHolder
:
'商品名称'
},
{
type
:
'Input'
,
value
:
'brand'
,
col
:
4
,
placeHolder
:
'商品品牌'
},
{
type
:
'Input'
,
value
:
'type'
,
col
:
4
,
placeHolder
:
'商品品类'
},
{
type
:
'RangePicker'
,
// ... 此处应为数值型范围输入控件
value
:
'price'
,
col
:
4
,
placeHolder
:
'商品价格'
},
{
type
:
'Select'
,
value
:
'status'
,
col
:
4
,
placeHolder
:
'商品状态'
,
statusList
:
[{
type
:
'Select'
,
label
:
'还不错'
,
value
:
'1'
},{
type
:
'Select'
,
label
:
'还可以'
,
value
:
'2'
}]
},
]
const
handleBatchUp
=
()
=>
{
console
.
log
(
'批量上架'
)
setUpDownModal
(
true
)
setIsUp
(
1
)
}
const
searchBarActions
:
IButtonFilter
[]
=
[
{
text
:
'查询'
,
handler
:
()
=>
{
console
.
log
(
'查询'
)
}
},
{
text
:
'重置'
,
handler
:
()
=>
{
console
.
log
(
'重置'
)
}
},
{
type
:
'primary'
,
text
:
'新建'
,
icon
:
<
PlusOutlined
/>,
handler
:
()
=>
{
history
.
push
(
'/commodity/products/addDirectChannel'
)
}
},
{
text
:
'批量删除'
,
handler
:
()
=>
{
setDeleteBatchModal
(
true
)
console
.
log
(
'删除'
)
}
},
{
text
:
'批量上架'
,
handler
:
()
=>
{
console
.
log
(
'批量上架'
)
setUpDownModal
(
true
)
setIsUp
(
1
)
}
},
{
text
:
'批量下架'
,
handler
:
()
=>
{
console
.
log
(
'批量下架'
)
setUpDownModal
(
true
)
setIsUp
(
0
)
}
},
]
const
handleBatchDown
=
()
=>
{
console
.
log
(
'批量下架'
)
setUpDownModal
(
true
)
setIsUp
(
0
)
}
const
handleBatchDelete
=
()
=>
{
setDeleteBatchModal
(
true
)
console
.
log
(
'删除'
)
}
const
handleSee
=
(
record
:
any
)
=>
{
console
.
log
(
'see'
)
history
.
push
(
`/commodity/products/viewDirectChannel?id=
${
record
.
key
}
`
)
history
.
push
(
`/
memberCenter/commodityAbility/
commodity/products/viewDirectChannel?id=
${
record
.
key
}
`
)
}
const
confirm
=
()
=>
{
...
...
@@ -310,14 +247,56 @@ const DirectChannel: React.FC<{}> = () => {
setUpDownModal
(
true
)
}
const
handleUp
=
()
=>
{
const
handleUp
Down
=
()
=>
{
console
.
log
(
'ok上下架'
)
}
const
handleCancelUp
=
()
=>
{
const
handleCancelUpDown
=
()
=>
{
console
.
log
(
'不ok上下架'
)
setUpDownModal
(
false
)
}
const
handleMenuClick
=
(
param
)
=>
{
// param: 1.批量删除 2.批量上架 3.批量下架
console
.
log
(
param
,
'Click Menu'
)
if
(
param
.
key
===
'1'
){
handleBatchDelete
()
}
else
if
(
param
.
key
===
'2'
){
handleBatchUp
()
}
else
if
(
param
.
key
===
'3'
){
handleBatchDown
()
}
}
const
menuMore
=
(
<
Menu
onClick=
{
(
param
)
=>
handleMenuClick
(
param
)
}
>
<
Menu
.
Item
key=
"2"
icon=
{
<
VerticalAlignTopOutlined
/>
}
>
批量上架
</
Menu
.
Item
>
<
Menu
.
Item
key=
"3"
icon=
{
<
VerticalAlignBottomOutlined
/>
}
>
批量下架
</
Menu
.
Item
>
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
</
Menu
>
)
const
controllerBtns
=
(
<
Space
>
<
Button
type=
'primary'
onClick=
{
()
=>
history
.
push
(
'/memberCenter/commodityAbility/commodity/products/addDirectChannel'
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
<
Dropdown
overlay=
{
menuMore
}
trigger=
{
[
'click'
]
}
>
<
Button
>
更多
<
DownOutlined
/>
</
Button
>
</
Dropdown
>
</
Space
>
);
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -326,34 +305,58 @@ const DirectChannel: React.FC<{}> = () => {
currentRef=
{
ref
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formFilters=
{
search
}
buttonFilters=
{
searchBarActions
}
tableProps=
{
{
rowKey
:
"id"
}
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
)
FormEffectHooks
.
onFieldInputChange$
(
'brandId'
).
subscribe
(
state
=>
{
console
.
log
(
state
,
'state'
)
})
// useAsyncInitSelect(
// ['memberType', 'roleId', 'level', 'source'],
// fetchSearchItems,
// );
}
}
schema=
{
channelSchema
}
/>
}
/>
</
Card
>
<
Modal
title=
"批量删除"
visible=
{
deleteBatchModal
}
onOk=
{
handleOkDeleteBatch
}
onCancel=
{
handleCancelDelete
}
okButtonProps=
{
{
danger
:
true
}
}
>
<
Form
layout=
"vertical"
>
<
Form
.
Item
label=
"选择要删除的批次"
>
<
Select
placeholder=
"请选择批次号"
>
<
Select
.
Option
value=
"542424"
>
4245242452
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
>
title=
"批量删除"
visible=
{
deleteBatchModal
}
onOk=
{
handleOkDeleteBatch
}
onCancel=
{
handleCancelDelete
}
okButtonProps=
{
{
danger
:
true
}
}
>
<
Form
layout=
"vertical"
>
<
Form
.
Item
label=
"选择要删除的批次"
>
<
Select
placeholder=
"请选择批次号"
>
<
Select
.
Option
value=
"542424"
>
4245242452
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
<
Modal
title=
{
isUp
?
'批量上架'
:
'批量下架'
}
visible=
{
upDownModal
}
onOk=
{
handleUp
}
onCancel=
{
handleCancelUp
}
onOk=
{
handleUp
Down
}
onCancel=
{
handleCancelUp
Down
}
>
<
h1
>
批量上下架
</
h1
>
<
h1
>
批量上下架
</
h1
>
</
Modal
>
</
PageHeaderWrapper
>
)
...
...
src/pages/commodity/products/schema/channelSchema.tsx
0 → 100644
View file @
6255d67c
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
export
const
channelSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'商品名称'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
id
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'商品ID'
},
},
brandId
:
{
type
:
'string'
,
'x-component'
:
'CustomInputSearch'
,
'x-component-props'
:
{
placeholder
:
'商品品牌'
,
showSearch
:
true
,
showArrow
:
true
,
defaultActiveFirstOption
:
false
,
filterOption
:
false
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
,
lineHeight
:
'32px'
},
value
:
null
,
},
},
customerCategoryId
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'商品品类'
,
},
},
status
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'商品状态'
},
},
price
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'商品价格'
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/member/memberImport/schema/index.tsx
View file @
6255d67c
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
export
const
importSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -137,7 +138,7 @@ const getCompnentValue = (elements: any) => {
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
fileList
:
[],
onChange
:
file
=>
console
.
log
(
file
),
};
...
...
src/pages/member/memberMaintain/schema/index.tsx
View file @
6255d67c
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
export
const
maintianSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -130,7 +131,7 @@ const getCompnentValue = (elements: any) => {
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
data
:
{
fileType
:
UPLOAD_TYPE
},
fileList
:
[],
onChange
:
file
=>
console
.
log
(
file
),
};
...
...
src/pages/trademark/addBrand.tsx
View file @
6255d67c
...
...
@@ -14,6 +14,7 @@ import {
import
{
UploadFile
,
UploadChangeParam
}
from
'antd/lib/upload/interface'
;
import
ReutrnEle
from
'@/components/ReturnEle'
import
{
PublicApi
}
from
'@/services/api'
import
{
UPLOAD_TYPE
}
from
'@/constants'
const
{
Step
}
=
Steps
;
...
...
@@ -248,7 +249,7 @@ const AddBrand: React.FC<{}> = () => {
action=
"/api/file/file/upload"
beforeUpload=
{
beforeLogoUpload
}
onChange=
{
handleUploadLogoChange
}
data=
{
{
fileType
:
2
}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
>
{
logoUrl
?
<
img
src=
{
logoUrl
}
alt=
"avatar"
style=
{
{
width
:
'100%'
}
}
/>
:
uploadLogoButton
}
</
Upload
>
...
...
@@ -274,7 +275,7 @@ const AddBrand: React.FC<{}> = () => {
fileList=
{
fileList
}
beforeUpload=
{
beforeUpload
}
onChange=
{
handleChange
}
data=
{
{
fileType
:
2
}
}
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
showUploadList=
{
{
showPreviewIcon
:
false
}
}
>
{
fileList
.
length
>=
20
?
null
:
uploadButton
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment