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
3984429a
Commit
3984429a
authored
Aug 25, 2022
by
wzy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jinfa-0518' of…
Merge branch 'jinfa-0518' of
ssh://gitlab.shushangyun.com:8122/project/jinfa-platform
into jinfa-0518
parents
fae9e262
688020bd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
33 deletions
+72
-33
addMaterialModal.tsx
...ges/commodity/material/materialQuery/addMaterialModal.tsx
+72
-33
sourceList.tsx
src/pages/commodity/material/materialQuery/sourceList.tsx
+0
-0
No files found.
src/pages/commodity/material/materialQuery/addMaterialModal.tsx
View file @
3984429a
...
@@ -14,53 +14,80 @@ interface Props {
...
@@ -14,53 +14,80 @@ interface Props {
handleOnOk
?:
()
=>
void
,
handleOnOk
?:
()
=>
void
,
checkedValue
?:
any
checkedValue
?:
any
}
}
export
default
(
(
props
:
Props
)
=>
{
export
default
(
props
:
Props
)
=>
{
const
{
visible
=
false
,
setVisible
,
handleOnOk
,
checkedValue
=
[]
}
=
props
const
{
visible
=
false
,
setVisible
,
handleOnOk
,
checkedValue
=
[]
,
rowSelection
}
=
props
const
intl
=
getIntl
()
;
const
intl
=
getIntl
()
const
handleFetchData
=
async
(
params
)
=>
{
const
handleFetchData
=
async
(
params
)
=>
{
const
{
data
=
{}
}
=
await
getProductGoodsGetSubGoodsList
(
params
);
const
{
data
,
code
}
=
await
getProductGoodsGetSubGoodsList
(
params
)
return
data
if
(
code
===
1000
)
{
let
list
=
[]
if
(
data
?.
data
?.
length
>
0
)
{
list
=
data
.
data
.
map
((
item
)
=>
({
name
:
item
?.
userName
,
goodsNo
:
item
?.
code
,
memberId
:
item
?.
memberId
,
roleId
:
item
?.
memberRoleId
,
userName
:
item
?.
contactMemberName
,
phone
:
item
?.
contactMemberPhone
,
manufacturer
:
item
?.
materialsManufacturer
,
origin
:
item
?.
materialsOrigin
,
departure
:
item
?.
materialsDeparture
,
deliveryCycle
:
item
?.
materialsDeliverPeriod
,
deliveryMethod
:
item
?.
materialsDeliveryMethod
,
materialId
:
item
?.
id
,
id
:
item
?.
id
,
uniqueId
:
item
?.
id
,
materialName
:
item
?.
name
,
type
:
item
?.
type
,
category
:
item
?.
customerCategory
?.
category
?.
name
,
brand
:
item
?.
brand
?.
name
,
unitName
:
item
?.
unitName
,
}))
}
return
{
data
:
list
,
totalCount
:
data
?.
totalCount
||
0
}
}
}
}
const
columns
=
[
const
columns
=
[
{
{
title
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
}),
title
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
}),
dataIndex
:
'
userName'
dataIndex
:
'
name'
,
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
}),
title
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
}),
dataIndex
:
'
name'
dataIndex
:
'
materialName'
,
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
}),
title
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
}),
dataIndex
:
'type'
dataIndex
:
'type'
,
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'material.category'
,
defaultMessage
:
'品类'
}),
title
:
intl
.
formatMessage
({
id
:
'material.category'
,
defaultMessage
:
'品类'
}),
dataIndex
:
'category'
,
dataIndex
:
'category'
,
render
:
(
text
,
record
)
=>
(
record
?.
customerCategory
?.
category
?.
name
)
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'material.brand'
,
defaultMessage
:
'品牌'
}),
title
:
intl
.
formatMessage
({
id
:
'material.brand'
,
defaultMessage
:
'品牌'
}),
dataIndex
:
'brand'
,
dataIndex
:
'brand'
,
render
:
(
text
,
record
)
=>
(
record
.
brand
?.
name
)
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'material.unit'
,
defaultMessage
:
'单位'
}),
title
:
intl
.
formatMessage
({
id
:
'material.unit'
,
defaultMessage
:
'单位'
}),
dataIndex
:
'unitName'
dataIndex
:
'unitName'
,
}
}
,
]
;
]
const
suppilerSchema
:
ISchema
=
{
const
suppilerSchema
:
ISchema
=
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{
layout
:
{
layout
:
{
type
:
'object'
,
type
:
'object'
,
"x-component"
:
'mega-layout'
,
'x-component'
:
'mega-layout'
,
properties
:
{
properties
:
{
userName
:
{
userName
:
{
type
:
'string'
,
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'material.supplier.name'
,
defaultMessage
:
'供应商名称'
,
}),
align
:
'flex-left'
,
align
:
'flex-left'
,
},
},
},
},
...
@@ -69,7 +96,7 @@ export default ((props: Props) => {
...
@@ -69,7 +96,7 @@ export default ((props: Props) => {
'x-component'
:
'flex-layout'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
rowStyle
:
{
rowStyle
:
{
justifyContent
:
"flex-start"
,
justifyContent
:
'flex-start'
,
},
},
colStyle
:
{
colStyle
:
{
marginRight
:
20
,
marginRight
:
20
,
...
@@ -79,7 +106,10 @@ export default ((props: Props) => {
...
@@ -79,7 +106,10 @@ export default ((props: Props) => {
name
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'material.name'
,
defaultMessage
:
'物料名称'
,
}),
allowClear
:
true
,
allowClear
:
true
,
},
},
},
},
...
@@ -87,7 +117,10 @@ export default ((props: Props) => {
...
@@ -87,7 +117,10 @@ export default ((props: Props) => {
type
:
'string'
,
type
:
'string'
,
'x-component'
:
'Cascader'
,
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'material.category'
,
defaultMessage
:
'品类'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'material.category'
,
defaultMessage
:
'品类'
,
}),
allowClear
:
true
,
allowClear
:
true
,
style
:
{
width
:
'150px'
},
style
:
{
width
:
'150px'
},
showSearch
:
true
,
showSearch
:
true
,
...
@@ -107,9 +140,12 @@ export default ((props: Props) => {
...
@@ -107,9 +140,12 @@ export default ((props: Props) => {
type
:
{
type
:
{
type
:
'string'
,
type
:
'string'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
}),
placeholder
:
intl
.
formatMessage
({
id
:
'material.type'
,
defaultMessage
:
'规格型号'
,
}),
allowClear
:
true
,
allowClear
:
true
,
}
}
,
},
},
submit
:
{
submit
:
{
'x-component'
:
'Submit'
,
'x-component'
:
'Submit'
,
...
@@ -117,7 +153,10 @@ export default ((props: Props) => {
...
@@ -117,7 +153,10 @@ export default ((props: Props) => {
span
:
1
,
span
:
1
,
},
},
'x-component-props'
:
{
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'balance.accountsReceivable.invoice.schema.submit'
}),
children
:
intl
.
formatMessage
({
id
:
'balance.accountsReceivable.invoice.schema.submit'
,
}),
},
},
},
},
},
},
},
...
@@ -125,28 +164,28 @@ export default ((props: Props) => {
...
@@ -125,28 +164,28 @@ export default ((props: Props) => {
},
},
},
},
}
}
};
return
(
return
(
<
TableModal
<
TableModal
modalType=
'Drawer'
rowSelection=
{
rowSelection
}
modalType=
"Drawer"
visible=
{
visible
}
visible=
{
visible
}
onClose=
{
()
=>
setVisible
(
false
)
}
onClose=
{
()
=>
setVisible
(
false
)
}
title=
{
intl
.
formatMessage
({
id
:
'material.add.supplier.material'
,
defaultMessage
:
'添加供应商物料'
})
}
title=
{
intl
.
formatMessage
({
id
:
'material.add.supplier.material'
,
defaultMessage
:
'添加供应商物料'
,
})
}
columns=
{
columns
}
columns=
{
columns
}
schema=
{
suppilerSchema
}
schema=
{
suppilerSchema
}
onOk=
{
handleOnOk
}
onOk=
{
handleOnOk
}
fetchData=
{
handleFetchData
}
fetchData=
{
handleFetchData
}
tableProps=
{
{
tableProps=
{
{
rowKey
:
'materialId'
}
}
rowKey
:
'id'
,
}
}
components=
{
{
Cascader
}
}
components=
{
{
Cascader
}
}
effects=
{
(
$
,
actions
)
=>
{
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'userName'
,
FORM_FILTER_PATH
)
;
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'userName'
,
FORM_FILTER_PATH
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
'name'
,
'id'
])
}
}
}
}
mode=
{
"radio"
}
mode=
{
'checkbox'
}
value=
{
checkedValue
}
/>
/>
)
)
})
}
\ No newline at end of file
\ No newline at end of file
src/pages/commodity/material/materialQuery/sourceList.tsx
View file @
3984429a
This diff is collapsed.
Click to expand it.
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