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
e308c27c
Commit
e308c27c
authored
Jul 26, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 调整布局
parent
35ac900d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
126 additions
and
25 deletions
+126
-25
CustomRelevance.tsx
src/components/NiceForm/components/CustomRelevance.tsx
+0
-1
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+3
-1
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+89
-23
index.less
...stockSellStorage/bills/components/EllipsisText/index.less
+6
-0
index.tsx
.../stockSellStorage/bills/components/EllipsisText/index.tsx
+28
-0
No files found.
src/components/NiceForm/components/CustomRelevance.tsx
View file @
e308c27c
...
...
@@ -12,7 +12,6 @@ const RowStyleLayout = styled(props => <div {...props} />)`
height: 100%;
background: #909399;
border-radius: 0;
border: none;
&[disabled] {
background: #F4F5F7;
}
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
e308c27c
...
...
@@ -39,6 +39,7 @@ import {
}
from
'@/constants/commodity'
;
import
{
addBillSchema
,
goodsSearchSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
EllipsisText
from
'../EllipsisText'
;
const
addSchemaAction
=
createFormActions
();
const
{
...
...
@@ -1856,7 +1857,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
}
components=
{
{
RadioGroup
:
Radio
.
Group
,
ArrayTable
,
ArrayTable
,
Text
:
EllipsisText
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
e308c27c
...
...
@@ -426,6 +426,9 @@ export const addBillSchema: ISchema = {
'x-component-props'
:
{
renderAddition
:
()
=>
null
,
renderRemove
:
'{{renderListTableRemove}}'
,
scroll
:
{
x
:
'900px'
,
},
},
'x-rules'
:
[
{
...
...
@@ -438,47 +441,89 @@ export const addBillSchema: ISchema = {
properties
:
{
itemNo
:
{
type
:
'string'
,
title
:
'货号'
,
'x-component'
:
'Text'
,
title
:
'货号'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
itemName
:
{
type
:
'string'
,
title
:
'货品名称'
,
'x-component'
:
'Text'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
specifications
:
{
type
:
'string'
,
title
:
'规格型号'
,
'x-component'
:
'Text'
,
title
:
'规格型号'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
category
:
{
type
:
'string'
,
title
:
'品类'
,
'x-component'
:
'Text'
,
title
:
'品类'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
brand
:
{
type
:
'string'
,
title
:
'品牌'
,
'x-component'
:
'Text'
,
title
:
'品牌'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
unit
:
{
type
:
'string'
,
title
:
'单位'
,
'x-component'
:
'Text'
,
title
:
'单位'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
costPrice
:
{
type
:
'string'
,
title
:
'成本价'
,
'x-component'
:
'Text'
,
title
:
'成本价'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
product
:
{
type
:
'string'
,
title
:
'商品名称'
,
enum
:
[],
'x-component-props'
:
{
allowClear
:
true
,
allowClear
:
true
,
style
:
{
width
:
1
8
0
,
width
:
1
5
0
,
},
},
'x-rules'
:
[
...
...
@@ -491,21 +536,36 @@ export const addBillSchema: ISchema = {
},
productId
:
{
type
:
'string'
,
title
:
'商品ID'
,
'x-component'
:
'Text'
,
title
:
'商品ID'
,
'x-props'
:
{
width
:
80
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
display
:
true
,
},
price
:
{
type
:
'string'
,
title
:
'单价'
,
'x-component'
:
'Text'
,
title
:
'单价'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
display
:
true
,
},
productCount
:
{
type
:
'string'
,
title
:
'单据数量'
,
title
:
'单据数量'
,
'x-component-props'
:
{
allowClear
:
true
,
allowClear
:
true
,
style
:
{
width
:
80
,
},
},
'x-rules'
:
[
{
...
...
@@ -520,8 +580,14 @@ export const addBillSchema: ISchema = {
},
amount
:
{
type
:
'string'
,
title
:
'金额'
,
'x-component'
:
'Text'
,
title
:
'金额'
,
'x-props'
:
{
width
:
100
,
},
'x-component'
:
'Text'
,
'x-component-props'
:
{
ellipsis
:
true
,
},
},
// 额外的数据,用于收集不需要展示的数据
extraData
:
{
...
...
src/pages/transaction/stockSellStorage/bills/components/EllipsisText/index.less
0 → 100644
View file @
e308c27c
@import '../../../../../../global/styles/utils.less';
.ellipsis {
.textOverflow();
}
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/EllipsisText/index.tsx
0 → 100644
View file @
e308c27c
/*
* @Author: XieZhiXiong
* @Date: 2021-07-26 10:25:56
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-26 10:47:05
* @Description: 待省略的文本展示组件
*/
import
React
from
'react'
;
import
{
Tooltip
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
styles
from
'./index.less'
;
const
EllipsisText
=
(
props
)
=>
{
const
{
value
}
=
props
;
const
{
ellipsis
}
=
(
props
.
props
[
'x-component-props'
]
||
{});
return
(
<
Tooltip
title=
{
ellipsis
?
value
:
null
}
>
<
div
className=
{
classNames
({
[
styles
.
ellipsis
]:
ellipsis
})
}
>
{
value
}
</
div
>
</
Tooltip
>
)
}
EllipsisText
.
defaultProps
=
{};
EllipsisText
.
isFieldComponent
=
true
;
export
default
EllipsisText
;
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