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
324e9f02
Commit
324e9f02
authored
Sep 23, 2020
by
XieZhiXiong
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
d1e33fd3
c39b0484
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
24 deletions
+42
-24
addAttribute.tsx
src/pages/classAndProperty/attribute/addAttribute.tsx
+2
-2
index.ts
src/pages/classAndProperty/class/schema/index.ts
+7
-1
addPropertyValue.tsx
...pages/classAndProperty/propertyValue/addPropertyValue.tsx
+1
-1
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+3
-3
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+17
-6
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+12
-11
No files found.
src/pages/classAndProperty/attribute/addAttribute.tsx
View file @
324e9f02
...
...
@@ -182,7 +182,7 @@ const AddAtttribute: React.FC<{}> = () => {
},
]
}
>
<
Input
placeholder=
"输入属性组名"
disabled=
{
isSee
}
/>
<
Input
maxLength=
{
10
}
placeholder=
"输入属性组名"
disabled=
{
isSee
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
18
}
>
...
...
@@ -204,7 +204,7 @@ const AddAtttribute: React.FC<{}> = () => {
},
]
}
>
<
Input
placeholder=
"输入属性名称"
disabled=
{
isSee
}
/>
<
Input
maxLength=
{
10
}
placeholder=
"输入属性名称"
disabled=
{
isSee
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
18
}
>
...
...
src/pages/classAndProperty/class/schema/index.ts
View file @
324e9f02
...
...
@@ -28,7 +28,13 @@ export const classSchema: ISchema = {
required
:
true
,
"x-component-props"
:
{
placeholder
:
'请输入品类名称'
}
},
"x-rules"
:
[
{
limitByte
:
true
,
maxByte
:
16
}
]
},
type
:
{
type
:
'number'
,
...
...
src/pages/classAndProperty/propertyValue/addPropertyValue.tsx
View file @
324e9f02
...
...
@@ -204,7 +204,7 @@ const AddPropertyValue: React.FC<{}> = () => {
},
]
}
>
<
Input
placeholder=
"输入属性值名称"
disabled=
{
isSee
}
/>
<
Input
maxLength=
{
12
}
placeholder=
"输入属性值名称"
disabled=
{
isSee
}
/>
</
Form
.
Item
>
}
{
...
...
src/pages/commodity/products/directChannel.tsx
View file @
324e9f02
...
...
@@ -242,7 +242,7 @@ const DirectChannel: React.FC<{}> = () => {
}
}
// 判断所选商品 priceType, source, status一致
// 判断所选商品 priceType,
?
source, status一致
const
judgeType
=
()
=>
{
// let sourceArr = Array.from(new Set(selectRow.map((item:any) => item.channelCommodity.source)))
let
priceTypeArr
=
Array
.
from
(
new
Set
(
selectRow
.
map
((
item
:
any
)
=>
item
.
channelCommodity
.
commodity
.
priceType
)))
...
...
@@ -341,7 +341,7 @@ const DirectChannel: React.FC<{}> = () => {
}
else
{
if
(
isUp
){
if
(
checkedValues
.
length
>
0
){
PublicApi
.
postProductChannelCommodityPublishCommodity
(
params
).
then
(
res
=>
{
PublicApi
.
postProductChannelCommodityPublishCommodity
(
{...
params
,
isPublish
:
isUp
}
).
then
(
res
=>
{
setUpDownModal
(
false
)
ref
.
current
.
reload
()
setIsDisabledOKbtn
(
false
)
...
...
@@ -351,7 +351,7 @@ const DirectChannel: React.FC<{}> = () => {
message
.
error
(
'请选择需要上架的渠道商城'
)
}
}
else
{
PublicApi
.
postProductChannelCommodityPublishCommodity
(
params
).
then
(
res
=>
{
PublicApi
.
postProductChannelCommodityPublishCommodity
(
{...
params
,
isPublish
:
isUp
}
).
then
(
res
=>
{
setUpDownModal
(
false
)
ref
.
current
.
reload
()
setIsDisabledOKbtn
(
false
)
...
...
src/pages/transaction/transactionRules/addRule.tsx
View file @
324e9f02
...
...
@@ -25,14 +25,25 @@ const AddRule:React.FC<{}> = (props) => {
// 整体表单提交
const
formSubmit
=
async
(
values
)
=>
{
values
.
products
=
values
.
products
.
map
(
item
=>
({
productId
:
item
.
id
,
productName
:
item
.
name
,
category
:
item
.
customerCategoryName
,
productPrice
:
item
.
priceType
,
brand
:
item
.
brandName
}))
console
.
log
(
values
)
values
.
products
=
values
.
products
.
map
(
item
=>
({
productId
:
item
.
id
,
commodityId
:
item
.
commodityId
,
name
:
item
.
name
,
customerCategoryName
:
item
.
customerCategoryName
,
priceType
:
item
.
priceType
,
brandName
:
item
.
brandName
}))
values
.
isElectronicContract
=
values
.
isElectronicContract
?
1
:
0
const
params
=
omit
(
values
,
[
'state'
])
// 移除不需要的字段
console
.
log
(
params
,
'params'
)
// await PublicApi.postOrderTradingRulesAdd(params)
// setTimeout(() => {
// history.goBack(-1)
// }, 1000)
if
(
pageStatus
===
PageStatus
.
EDIT
){
await
PublicApi
.
postOrderTradingRulesUpdata
(
params
)
}
else
if
(
pageStatus
===
PageStatus
.
ADD
){
await
PublicApi
.
postOrderTradingRulesAdd
(
params
)
}
setTimeout
(()
=>
{
history
.
goBack
(
-
1
)
},
1000
)
}
return
(
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
324e9f02
...
...
@@ -34,7 +34,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
const
[
visibleChannelRroduct
,
setVisibleChannelRroduct
]
=
useState
(
false
)
const
[
productRowSelection
,
productRowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
[
productsLength
,
setProductsLength
]
=
useState
(
0
)
const
[
initValue
,
setInitialValue
]
=
useState
({})
;
const
[
initValue
,
setInitialValue
]
=
useState
({})
const
{
id
,
...
...
@@ -47,7 +47,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
if
(
shopIds
.
length
){
let
shopInfo
:
any
=
GlobalConfig
.
web
.
shopInfo
.
filter
(
item
=>
item
.
id
===
shopIds
[
0
])
const
res
=
await
PublicApi
.
getProductCommodityCommonGetCommodity
DetailList
({
const
res
=
await
PublicApi
.
getProductCommodityCommonGetCommodity
ListBySeller
({
...
params
,
shopType
:
shopInfo
[
0
].
type
,
environment
:
shopInfo
[
0
].
environment
,
...
...
@@ -66,11 +66,6 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
const
handleAddProductBtn
=
()
=>
{
// const transactionProcesss = addSchemaAction.getFieldValue('transactionProcesssId')
// if (!transactionProcesss) {
// message.error('请先选择交易流程')
// return false
// }
const
checkBoxs
=
addSchemaAction
.
getFieldValue
(
'products'
)
productRowCtl
.
setSelectedRowKeys
(
checkBoxs
.
map
(
v
=>
v
.
id
))
productRowCtl
.
setSelectRow
(
checkBoxs
)
...
...
@@ -78,7 +73,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
}
// 新增商品
const
tableAddButton
=
<
Button
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAddProductBtn
}
type=
'dashed'
>
选择指定商品
</
Button
>
const
tableAddButton
=
<
Button
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
onClick=
{
handleAddProductBtn
}
type=
'dashed'
>
选择指定商品
</
Button
>
const
tableColumns
=
[
{
...
...
@@ -90,7 +85,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
dataIndex
:
'name'
,
title
:
'商品名称'
,
key
:
'name'
,
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.
i
d}`
}
>
{
_
}
</
EyePreview
>
render
:
(
_
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/commodity/products/viewProducts?id=${record.
commodityI
d}`
}
>
{
_
}
</
EyePreview
>
},
{
dataIndex
:
'customerCategoryName'
,
...
...
@@ -118,7 +113,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
{
dataIndex
:
'ctl'
,
title
:
'操作'
,
render
:
(
_
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handleDeleteTable
(
record
.
id
)
}
>
删除
</
Button
>
render
:
(
_
,
record
)
=>
<
Button
type=
'link'
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
onClick=
{
()
=>
handleDeleteTable
(
record
.
id
)
}
>
删除
</
Button
>
}
]
...
...
@@ -249,6 +244,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
setProductsLength
(
res
.
totalCount
);
}
addSchemaAction
.
setFieldValue
(
'isElectronicContract'
,
data
?.
isElectronicContract
?
true
:
false
)
addSchemaAction
.
setFieldValue
(
'transactionProcesssId'
,
data
?.
transactionProcesssId
)
addSchemaAction
.
setFieldValue
(
'isTacitlyApprove'
,
data
?.
isTacitlyApprove
)
setInitialValue
(
data
)
}
...
...
@@ -259,7 +255,7 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
// 拿到绑定的商品
const
getBindingProducts
=
async
({
id
=
'1'
,
current
=
'1'
,
pageSize
=
'10'
})
=>
{
const
res
=
await
PublicApi
.
getOrderTradingRulesProductList
({
tradingRulesId
:
id
,
current
,
pageSize
});
const
res
=
await
PublicApi
.
getOrderTradingRulesProductList
({
tradingRulesId
:
id
,
current
,
pageSize
,
name
:
null
});
return
res
.
data
}
...
...
@@ -295,6 +291,11 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
state
.
visible
=
parentState
.
value
})
})
$
(
'onFieldValueChange'
,
'shopIds'
).
subscribe
(
parentState
=>
{
setFieldState
(
'isTacitlyApprove'
,
state
=>
{
state
.
value
=
1
})
})
}
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
...
...
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