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
linweijiong
jinfa-platform
Commits
a4d437d7
Commit
a4d437d7
authored
Jun 28, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 重构新建加工
parent
b49d4938
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
435 additions
and
39 deletions
+435
-39
enterprisesColumn.tsx
...ndling/assign/create/common/columns/enterprisesColumn.tsx
+24
-0
enterprisesSchema.tsx
...ndling/assign/create/common/schemas/enterprisesSchema.tsx
+55
-0
productSchema.tsx
...s/handling/assign/create/common/schemas/productSchema.tsx
+71
-0
index.tsx
...handling/assign/create/components/ReadOnlyInput/index.tsx
+4
-2
index.tsx
src/pages/handling/assign/create/index.tsx
+262
-29
schema.tsx
src/pages/handling/assign/create/schema.tsx
+0
-0
index.tsx
src/pages/member/components/TableModal/index.tsx
+15
-7
add.tsx
src/pages/member/memberInspection/common/schema/add.tsx
+4
-1
No files found.
src/pages/handling/assign/create/common/columns/enterprisesColumn.tsx
0 → 100644
View file @
a4d437d7
import
{
ColumnsType
}
from
'antd/es/table'
;
export
const
enterprisesColumn
:
ColumnsType
<
any
>
=
[
{
title
:
'会员ID'
,
dataIndex
:
'memberId'
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
},
{
title
:
'会员类型'
,
dataIndex
:
"memberTypeName"
},
{
title
:
'会员角色'
,
dataIndex
:
"roleName"
},
{
title
:
'会员等级'
,
dataIndex
:
"levelTag"
}
]
src/pages/handling/assign/create/common/schemas/enterprisesSchema.tsx
0 → 100644
View file @
a4d437d7
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ISchema
}
from
'@formily/antd'
;
export
const
enterprisesSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索会员名称'
,
align
:
'flex-left'
,
tip
:
'输入会员名称进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
columns
:
1
,
},
properties
:
{
roleId
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'会员角色'
,
allowClear
:
true
,
style
:
{
width
:
160
,
},
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
src/pages/handling/assign/create/common/schemas/productSchema.tsx
0 → 100644
View file @
a4d437d7
/**
* 加工商品schema
*/
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ISchema
}
from
'@formily/antd'
;
export
const
productSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索商品名称'
,
align
:
'flex-left'
,
tip
:
'输入商品名称进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
columns
:
3
,
},
properties
:
{
customerCategoryId
:
{
type
:
'string'
,
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
placeholder
:
'请选择商品品类'
,
allowClear
:
true
,
style
:
{
width
:
'160px'
,
// margin: '0 20px 0 0'
},
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
}
}
},
brandId
:
{
type
:
'string'
,
// 'x-component': 'Select',
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择商品品牌'
,
allowClear
:
true
,
showSearch
:
true
,
optionFilterProp
:
"children"
,
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
src/pages/handling/assign/create/components/ReadOnlyInput/index.tsx
View file @
a4d437d7
...
...
@@ -15,7 +15,6 @@ export const mapTextComponent = (
):
React
.
JSXElementConstructor
<
any
>
=>
{
const
{
editable
}
=
fieldProps
// console.log("props", props, "fieldProps", fieldProps);
console
.
log
(
fieldProps
.
form
.
getFieldValue
(
"detail.layout1.productList.0"
))
if
(
editable
!==
undefined
)
{
if
(
editable
===
false
)
{
return
PreviewText
...
...
@@ -40,4 +39,7 @@ export const mapStyledProps = (
export
default
connect
({
// getProps: mapStyledProps, //处理状态映射
getComponent
:
mapTextComponent
//处理详情态
})((
Input
))
})((
props
)
=>
{
const
{
dataSource
,
value
,
onChange
}
=
props
;
return
<
Input
value=
{
value
}
onChange=
{
onChange
}
/>
})
src/pages/handling/assign/create/index.tsx
View file @
a4d437d7
This diff is collapsed.
Click to expand it.
src/pages/handling/assign/create/schema.tsx
View file @
a4d437d7
This diff is collapsed.
Click to expand it.
src/pages/member/components/TableModal/index.tsx
View file @
a4d437d7
...
...
@@ -29,8 +29,8 @@ interface Iprops {
footer
?:
React
.
ReactNode
,
tableProps
?:
{
rowKey
:
string
|
((
record
)
=>
any
)
},
width
?:
number
,
mode
:
'checkbox'
|
'radio'
,
customizeRadio
?:
boolean
,
/**
...
...
@@ -45,6 +45,7 @@ interface Iprops {
* format话参数
*/
format
?:
((
value
)
=>
any
)
|
null
,
components
?:
{
[
key
:
string
]:
any
},
effects
?:
(
$
,
actions
)
=>
void
,
fetchData
:
(
params
:
any
)
=>
any
,
onClose
:
()
=>
void
,
...
...
@@ -53,7 +54,7 @@ interface Iprops {
}
const
TableModal
:
React
.
FC
<
Iprops
>
=
(
props
:
Iprops
)
=>
{
const
{
title
,
visible
,
schema
,
columns
,
effects
,
tableProps
,
mode
,
expressionScope
,
fetchData
,
onClose
,
onOk
,
value
,
format
,
customizeRadio
,
modalType
,
footer
}
=
props
;
const
{
title
,
visible
,
schema
,
columns
,
effects
,
tableProps
,
mode
,
expressionScope
,
fetchData
,
onClose
,
onOk
,
value
,
format
,
customizeRadio
,
modalType
,
footer
,
width
,
components
}
=
props
;
const
ref
=
useRef
<
any
>
({});
const
isFirstLoad
=
useRef
<
boolean
>
(
true
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
number
[]
|
string
[]
>
(()
=>
{
...
...
@@ -132,7 +133,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
visible=
{
visible
}
onCancel=
{
handleOnClose
}
// onOk={handleOk}
width=
{
840
}
width=
{
width
}
{
...
otherProps
}
>
<
StandardTable
...
...
@@ -150,14 +151,19 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
hideSelectAll
:
customizeRadio
,
}
}
formRender=
{
(
child
,
ps
)
=>
(
<
div
style=
{
{
display
:
"flex"
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}
}
>
<
div
>
{
child
}
</
div
>
<
div
>
{
ps
}
</
div
>
// <div style=
{{
display
:
"flex"
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
// <div>
{
child
}<
/
div
>
//
<
div
>
{
ps
}
</
div
>
//
</
div
>
<
div
style=
{
{
position
:
"relative"
,
}
}
>
<
div
>
{
child
}
</
div
>
<
div
style=
{
{
position
:
'absolute'
,
right
:
0
,
top
:
0
}
}
>
{
ps
}
</
div
>
</
div
>
)
}
controlRender=
{
<
NiceForm
schema=
{
schema
}
components=
{
components
}
actions=
{
formActions
}
onSubmit=
{
handleSearch
}
expressionScope=
{
expressionScope
}
...
...
@@ -182,7 +188,9 @@ TableModal.defaultProps = {
format
:
null
,
customizeRadio
:
false
,
modalType
:
"Modal"
,
footer
:
null
footer
:
null
,
width
:
840
,
components
:
{}
}
export
default
TableModal
;
src/pages/member/memberInspection/common/schema/add.tsx
View file @
a4d437d7
...
...
@@ -189,12 +189,15 @@ export const memberSchema: ISchema = {
layout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
inline
:
true
},
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索会员名称'
,
placeholder
:
'搜索会员名称
1
'
,
tip
:
'输入 会员名称 进行搜索'
,
advanced
:
false
,
},
...
...
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