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
shenshaokai
jinfa-platform
Commits
6b885fc5
Commit
6b885fc5
authored
Oct 20, 2020
by
GuanHua
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
b57c505e
64e6d664
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
80 deletions
+101
-80
global.less
src/global/styles/global.less
+5
-0
reset.less
src/global/styles/reset.less
+0
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+9
-9
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+24
-47
index.tsx
...pages/payandSettle/capitalAccounts/accountLists/index.tsx
+35
-18
index.tsx
...ayandSettle/capitalAccounts/accountLists/schema/index.tsx
+28
-5
No files found.
src/global/styles/global.less
View file @
6b885fc5
...
...
@@ -310,3 +310,7 @@ a {
margin-left: auto !important;
margin-right: auto !important;
}
.ant-modal {
width: 704px !important; // 重置模态框高度
}
\ No newline at end of file
src/global/styles/reset.less
View file @
6b885fc5
@import './mixins/layout.less';
#root {
// 去除input type为number时的箭头
.ant-input-number-handler-wrap {
display: none;
...
...
src/pages/commodity/products/addProducts.tsx
View file @
6b885fc5
...
...
@@ -336,40 +336,40 @@ const AddProducts: React.FC<{}> = (props) => {
]
}
>
<
Card
>
<
Tabs
onChange=
{
callback
}
type=
"card"
defaultActiveKey=
"1"
>
<
TabPane
tab=
"基本信息"
key=
"1"
>
<
Tabs
onChange=
{
callback
}
type=
"card"
defaultActiveKey=
"1
0000
"
>
<
TabPane
tab=
"基本信息"
key=
"1
0001
"
>
<
BasicInfoForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
onChangeAttributeList=
{
(
_lists
:
any
)
=>
setAttributeList
(
_lists
)
}
/>
</
TabPane
>
<
TabPane
tab=
"选择货品"
key=
"2"
>
<
TabPane
tab=
"选择货品"
key=
"2
0002
"
>
<
SelectGoodsForm
/>
</
TabPane
>
<
TabPane
tab=
"商品属性"
key=
"3"
>
<
TabPane
tab=
"商品属性"
key=
"3
0003
"
>
<
ProductAttributeForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
attributesData=
{
attributeList
}
/>
</
TabPane
>
<
TabPane
tab=
"价格设置"
key=
"4"
>
<
TabPane
tab=
"价格设置"
key=
"4
0004
"
>
<
PriceAttributeForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
/>
</
TabPane
>
<
TabPane
tab=
"商品图片"
key=
"5"
>
<
TabPane
tab=
"商品图片"
key=
"5
0005
"
>
<
ProductImageForm
/>
</
TabPane
>
<
TabPane
tab=
"商品描述"
key=
"6"
>
<
TabPane
tab=
"商品描述"
key=
"6
0006
"
>
{
renderTemplate
()
}
</
TabPane
>
<
TabPane
tab=
"物流信息"
key=
"7"
>
<
TabPane
tab=
"物流信息"
key=
"7
0007
"
>
<
LogisticsForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
/>
</
TabPane
>
<
TabPane
tab=
"其他"
key=
"8"
>
<
TabPane
tab=
"其他"
key=
"8
0008
"
>
<
OtherForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
/>
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
6b885fc5
import
React
,
{
useState
,
useEffect
,
useRef
,
useMemo
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Form
,
Select
,
Checkbox
,
Tooltip
,
Radio
,
Input
,
Table
,
Modal
,
Row
,
Col
,
InputNumber
}
from
'antd'
import
{
Button
,
Form
,
Select
,
Checkbox
,
Tooltip
,
Radio
,
Input
,
Table
,
Modal
,
Row
,
Col
,
InputNumber
,
Space
}
from
'antd'
import
styles
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
...
@@ -68,6 +68,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
productInfoByEdit
,
getPriceAttributeFormParamsByEdit
,
selectCategoryId
,
productAttributeAndImageParams
,
}
=
ProductStore
_tableDataSource
=
useMemo
(()
=>
tableDataSource
,
[
tableDataSource
])
// 保持最新值
...
...
@@ -486,7 +487,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
tempArr
.
push
({
numberPrice
:
null
,
numberRange
:
{
numberMin
:
minOrder
,
numberMax
:
null
}
})
setPriceForm
.
setFieldsValue
({
ladderPrice
:
true
,
ladderRange
:
tempArr
})
}
}
}
...
...
@@ -511,6 +511,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
// 校验阶梯范围
const
validatorNumberRange
=
(
rule
,
value
,
callback
)
=>
{
console
.
log
(
value
,
'v'
)
try
{
if
(
Array
.
isArray
(
value
)){
let
range
=
value
.
map
(
item
=>
{
...
...
@@ -523,7 +524,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
[]
)
let
result
=
range
.
reduce
((
a
,
b
)
=>
{
if
(
a
<
b
)
return
b
})
// console.log(result, range, 'result')
if
(
!
result
)
throw
new
Error
(
'请正确输入阶梯数量范围'
);
if
(
range
[
0
]
!==
minOrderNumber
)
throw
new
Error
(
'阶段的起始值必须为最小起订数'
);
callback
()
...
...
@@ -702,6 +702,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
name=
"settingPrice"
form=
{
setPriceForm
}
initialValues=
{
{
ladderPrice
:
false
}
}
autoComplete=
"off"
>
{
planPrice
!==
3
&&
...
...
@@ -728,7 +729,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
}
]
}
>
<
Form
.
List
name=
"ladderRange"
key=
{
Math
.
random
()
}
>
<
Form
.
List
name=
"ladderRange"
>
{
(
fields
,
{
add
,
remove
})
=>
{
if
(
!
fields
.
length
)
{
add
()
...
...
@@ -736,35 +737,26 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
return
(
<
div
>
{
fields
.
map
(
field
=>
(
<
Row
key=
{
field
.
key
}
gutter=
{
[
0
,
10
]
}
>
<
Row
key=
{
field
.
key
}
gutter=
{
[
0
,
10
]
}
>
<
Col
span=
{
20
}
style=
{
{
display
:
'flex'
}
}
>
<
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberRange'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
]
}
key=
{
'_'
+
field
.
fieldKey
}
noStyle
>
<
Input
.
Group
compact
>
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberRange'
,
'numberMin'
]
}
noStyle
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
,
'numberMin'
]
}
rules=
{
[
{
required
:
true
,
message
:
'阶梯最小数量为必填项'
},
{
required
:
true
,
message
:
'阶梯最小数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值小数点后仅限三位
'
,
message
:
'阶梯数值仅限三位小数
'
,
}
]
}
>
<
InputNumber
min=
{
0
}
style=
{
{
width
:
100
,
textAlign
:
'center'
}
}
placeholder=
"最小数量"
/>
<
Input
placeholder=
"最小数量"
/>
</
Form
.
Item
>
<
Input
style=
{
{
width
:
30
,
height
:
32
,
borderLeft
:
0
,
borderRight
:
0
,
pointerEvents
:
'none'
,
...
...
@@ -773,50 +765,35 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
disabled
/>
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberRange'
,
'numberMax'
]
}
noStyle
fieldKey=
{
[
field
.
fieldKey
,
'numberRange'
,
'numberMax'
]
}
rules=
{
[
{
required
:
true
,
message
:
'阶梯最大数量为必填项'
},
{
required
:
true
,
message
:
'阶梯最大数量为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,3}
)?
$/
,
message
:
'阶梯数值小数点后仅限三位
'
,
message
:
'阶梯数值仅限三位小数
'
,
}
]
}
>
<
InputNumber
min=
{
0
}
className=
{
styles
.
siteInputRight
}
style=
{
{
width
:
100
,
textAlign
:
'center'
,
}
}
placeholder=
"最大数量"
/>
<
Input
placeholder=
"最大数量"
/>
</
Form
.
Item
>
</
Input
.
Group
>
</
Item
>
<
Item
<
Form
.
Item
{
...
field
}
name=
{
[
field
.
name
,
'numberPrice'
]
}
fieldKey=
{
[
field
.
fieldKey
,
'numberPrice'
]
}
key=
{
'__'
+
field
.
fieldKey
}
noStyle
rules=
{
[
{
required
:
true
,
message
:
'阶梯单价为必填项'
},
{
required
:
true
,
message
:
'阶梯单价为必填项'
},
{
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
message
:
'阶梯单价
小数点后仅限四位
'
,
message
:
'阶梯单价
仅限四位小数
'
,
}
]
}
style=
{
{
marginLeft
:
20
}
}
>
<
Input
Number
min=
{
0
}
style=
{
{
width
:
'50%'
,
marginLeft
:
24
}
}
placeholder=
"请输入单价"
/>
</
Item
>
<
Input
placeholder=
"请输入单价"
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
4
}
>
<
Button
size=
"small"
onClick=
{
()
=>
add
()
}
style=
{
{
marginLeft
:
20
,
marginRight
:
8
}
}
icon=
{
<
PlusOutlined
/>
}
/>
...
...
src/pages/payandSettle/capitalAccounts/accountLists/index.tsx
View file @
6b885fc5
...
...
@@ -17,11 +17,22 @@ const formActions = createFormActions();
const
AccountLists
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// "memberName": "L1LCU",
// "memberTypeName": "hgVH2V",
// "memberRoleName": "7V4vEk",
// "memberLevelName": "DT5Q",
// "accountBalance": 1071807455613740.5,
// "lockBalance": -5417889512914380,
// "usableBalance": -604051859942576.9,
// "memberStatus": 6014545168701916,
// "accountStatus": 6386448687731208,
// "createTime": 5022413924183292
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'账户归属'
,
dataIndex
:
'
n
ame'
,
key
:
'
n
ame'
,
dataIndex
:
'
memberN
ame'
,
key
:
'
memberN
ame'
,
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/payandSettle/capitalAccounts/accountLists/accountDetail?id=${record.id}`
}
...
...
@@ -31,18 +42,18 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员类型'
,
dataIndex
:
'
typ
e'
,
key
:
'
typ
e'
,
dataIndex
:
'
memberTypeNam
e'
,
key
:
'
memberTypeNam
e'
,
},
{
title
:
'会员角色'
,
dataIndex
:
[
'customerCategory'
,
'name'
]
,
key
:
'
customerCategory
'
,
dataIndex
:
'memberRoleName'
,
key
:
'
memberRoleName
'
,
},
{
title
:
'会员等级'
,
dataIndex
:
[
'brand'
,
'name'
]
,
key
:
'
brand
'
,
dataIndex
:
'memberLevelName'
,
key
:
'
memberLevelName
'
,
},
{
title
:
'会员等级类型'
,
...
...
@@ -51,24 +62,30 @@ const AccountLists: React.FC<{}> = () => {
},
{
title
:
'会员状态'
,
dataIndex
:
'
unitName
'
,
key
:
'
unit
'
,
dataIndex
:
'
memberStatus
'
,
key
:
'
memberStatus
'
,
},
{
title
:
'账户状态'
,
dataIndex
:
'unitName'
,
key
:
'unit'
,
dataIndex
:
'accountStatus'
,
key
:
'accountStatus'
,
},
{
title
:
'账户余额'
,
dataIndex
:
'accountStatus'
,
key
:
'accountStatus'
,
render
:
text
=>
`¥
${
text
}
`
},
{
title
:
'锁定余额'
,
dataIndex
:
'
costPri
ce'
,
key
:
'
costPri
ce'
,
dataIndex
:
'
lockBalan
ce'
,
key
:
'
lockBalan
ce'
,
render
:
text
=>
`¥
${
text
}
`
},
{
title
:
'可用余额'
,
dataIndex
:
'
batch
'
,
key
:
'
batch
'
,
dataIndex
:
'
usableBalance
'
,
key
:
'
usableBalance
'
,
render
:
text
=>
`¥
${
text
}
`
},
]
...
...
@@ -77,7 +94,7 @@ const AccountLists: React.FC<{}> = () => {
console
.
log
(
params
)
return
new
Promise
((
resolve
,
reject
)
=>
{
let
obj
=
{
...
params
}
PublicApi
.
getP
roductGoodsGetGoods
List
(
obj
).
then
(
res
=>
{
PublicApi
.
getP
ayAssetAccountGetAssetAccount
List
(
obj
).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
@@ -99,7 +116,7 @@ const AccountLists: React.FC<{}> = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
n
ame'
,
'
parentMemberN
ame'
,
FORM_FILTER_PATH
,
);
}
}
...
...
src/pages/payandSettle/capitalAccounts/accountLists/schema/index.tsx
View file @
6b885fc5
...
...
@@ -15,7 +15,7 @@ export const searchSchema: ISchema = {
grid
:
true
,
},
properties
:
{
n
ame
:
{
parentMemberN
ame
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -38,17 +38,39 @@ export const searchSchema: ISchema = {
},
},
properties
:
{
code
:
{
memberStatus
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'会员状态'
placeholder
:
'会员状态'
,
style
:
{
width
:
'174px'
},
},
enum
:
[
{
label
:
'正常'
,
value
:
1
,
},
batch
:
{
{
label
:
'已冻结'
,
value
:
2
,
}
],
},
accountStatus
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'账户状态'
placeholder
:
'账户状态'
,
style
:
{
width
:
'174px'
},
},
enum
:
[
{
label
:
'正常'
,
value
:
1
,
},
{
label
:
'已冻结'
,
value
:
2
,
}
],
},
applyTime
:
{
type
:
"daterange"
,
...
...
@@ -56,6 +78,7 @@ export const searchSchema: ISchema = {
"[start,end]"
:
{
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
style
:
{
width
:
'174px'
},
},
}
}
...
...
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