Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
f94d3062
Commit
f94d3062
authored
Dec 27, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改库存格式化问题
parent
8f5d7a8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
18 deletions
+29
-18
CommonTemplate.jsx
src/pages/ServiceGoods/components/CommonTemplate.jsx
+7
-17
config.js
src/pages/ServiceGoods/config.js
+22
-1
No files found.
src/pages/ServiceGoods/components/CommonTemplate.jsx
View file @
f94d3062
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Select
,
Form
,
InputNumber
,
Input
,
Button
,
Popover
}
from
'
antd
'
;
import
{
Select
,
Form
,
InputNumber
,
Input
,
Button
,
Popover
}
from
'
antd
'
;
import
commonStyle
from
'
../common.less
'
;
import
commonStyle
from
'
../common.less
'
;
import
{
debounce
}
from
'
@/utils/utils
'
;
export
const
WrapperContainer
=
props
=>
(
export
const
WrapperContainer
=
props
=>
(
<
div
className=
{
commonStyle
.
container
}
>
{
props
.
children
}
</
div
>
<
div
className=
{
commonStyle
.
container
}
>
{
props
.
children
}
</
div
>
...
@@ -78,7 +77,6 @@ export const CreateFormInput = props => {
...
@@ -78,7 +77,6 @@ export const CreateFormInput = props => {
type
,
type
,
batchProps
,
batchProps
,
disabeldRender
,
disabeldRender
,
onChange
,
...
options
...
options
}
=
props
;
}
=
props
;
...
@@ -89,11 +87,7 @@ export const CreateFormInput = props => {
...
@@ -89,11 +87,7 @@ export const CreateFormInput = props => {
{
...
options
}
{
...
options
}
style=
{
{
width
:
'
100%
'
}
}
style=
{
{
width
:
'
100%
'
}
}
placeholder=
{
`请输入${title}`
}
placeholder=
{
`请输入${title}`
}
// onBlur={e => onBlurEvent(e.target.value, dataIndex, rowIndex)}
onBlur=
{
e
=>
onBlurEvent
(
e
.
target
.
value
,
dataIndex
,
rowIndex
)
}
onChange=
{
e
=>
{
onChange
(
e
);
onBlurEvent
(
e
.
target
.
value
,
dataIndex
,
rowIndex
);
}
}
/>
/>
);
);
}
}
...
@@ -136,22 +130,18 @@ export const CreateFormInput = props => {
...
@@ -136,22 +130,18 @@ export const CreateFormInput = props => {
</>
</>
);
);
}
}
// console.log('options :>> ', options);
return
(
return
(
<
InputNumber
<
InputNumber
{
...
roleProps
}
{
...
roleProps
}
{
...
options
}
{
...
options
}
style=
{
{
width
:
'
100%
'
}
}
style=
{
{
width
:
'
100%
'
}
}
placeholder=
{
`请输入${title}`
}
placeholder=
{
`请输入${title}`
}
// onBlur={e => {
onBlur=
{
e
=>
{
// const v = e.target.value;
const
inputTarget
=
e
.
target
;
// console.log('v :>> ', v);
setTimeout
(()
=>
{
// onBlurEvent(+e.target.value || 0, dataIndex, rowIndex);
onBlurEvent
(
inputTarget
.
value
,
dataIndex
,
rowIndex
);
// }}
},
10
);
onChange=
{
debounce
(
e
=>
{
}
}
onChange
(
e
);
onBlurEvent
(
e
,
dataIndex
,
rowIndex
);
},
300
)
}
/>
/>
);
);
};
};
src/pages/ServiceGoods/config.js
View file @
f94d3062
...
@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
...
@@ -137,6 +137,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
...
@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
...
@@ -148,8 +152,10 @@ export const StaticColumns = customer => [
roleRules
:
{
required
:
false
},
roleRules
:
{
required
:
false
},
roleProps
:
{
roleProps
:
{
min
:
0
,
min
:
0
,
// max: 100,
},
},
// batchProps: {
// min: 0,
// },
},
},
{
{
title
:
'
市场价
'
,
title
:
'
市场价
'
,
...
@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
...
@@ -160,6 +166,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
...
@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
...
@@ -174,6 +184,10 @@ export const StaticColumns = customer => [
precision
:
2
,
precision
:
2
,
min
:
0
,
min
:
0
,
},
},
batchProps
:
{
precision
:
2
,
min
:
0
,
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
{
{
...
@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
...
@@ -208,6 +222,8 @@ export const StaticColumns = customer => [
},
},
roleProps
:
{
roleProps
:
{
min
:
0
,
min
:
0
,
step
:
1
,
precision
:
0
,
},
},
roleRules
:
{
required
:
true
},
roleRules
:
{
required
:
true
},
disabeldRender
:
record
=>
{
disabeldRender
:
record
=>
{
...
@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
...
@@ -226,6 +242,11 @@ export const StaticColumns = customer => [
precision
:
0
,
precision
:
0
,
maxLength
:
5
,
maxLength
:
5
,
},
},
batchProps
:
{
min
:
0
,
precision
:
0
,
maxLength
:
5
,
},
disabeldRender
:
()
=>
customer
.
isDisabled
,
disabeldRender
:
()
=>
customer
.
isDisabled
,
},
},
{
{
...
...
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