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
b57c505e
Commit
b57c505e
authored
Oct 20, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:加入进货单添加交易流程判断接口的调用
parent
b2869910
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
11 deletions
+115
-11
index.less
src/pages/afterService/components/SelectAddress/index.less
+0
-0
index.tsx
src/pages/afterService/components/SelectAddress/index.tsx
+86
-0
index.tsx
...s/waitSubmitOrderList/components/replaceAddress/index.tsx
+5
-4
detail.tsx
...afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
+13
-0
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+11
-7
No files found.
src/pages/afterService/components/SelectAddress/index.less
0 → 100644
View file @
b57c505e
src/pages/afterService/components/SelectAddress/index.tsx
0 → 100644
View file @
b57c505e
import
React
,
{
useState
}
from
'react'
import
{
EyeOutlined
,
CaretDownOutlined
,
CaretUpOutlined
}
from
'@ant-design/icons'
import
{
Row
,
Col
,
Space
}
from
'antd'
import
styled
from
'styled-components'
import
cx
from
'classnames'
interface
SelectAddressPropsType
{
value
:
any
,
dataSource
:
any
}
const
SelectStyles
=
styled
((
props
)
=>
<
div
className=
'select-list'
{
...
props
}
></
div
>)
`
.select_style_border {
border: 1px solid #EEF0F3;
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 14px;
cursor: pointer;
line-height: 28px;
position:relative;
}
.select_style_border.active {
border: 1px solid #00B382;
}
.select_style_border.active::after {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: 12px solid #00B37A;
border-left: 12px solid transparent;
bottom: 0;
right: 0;
z-index: 5;
}
`
const
SelectAddress
:
React
.
FC
<
SelectAddressPropsType
>
=
(
props
)
=>
{
const
[
showMore
,
setShowMore
]
=
useState
<
boolean
>
(
false
)
let
{
value
=
{},
dataSource
=
[]
}
=
props
if
(
typeof
value
===
'number'
)
{
value
=
dataSource
.
find
(
v
=>
v
.
id
===
value
)
||
{}
}
// 当前选中的id
const
checkedId
=
value
.
id
||
dataSource
[
0
]?.
id
const
transformData
=
dataSource
const
showDataSource
=
showMore
?
[...
transformData
].
splice
(
0
,
3
)
:
transformData
const
handleCheck
=
(
id
)
=>
{
}
const
toogleMore
=
()
=>
{
}
return
(
<
div
style=
{
{
width
:
'100%'
}
}
>
<
SelectStyles
>
{
showDataSource
.
map
(
v
=>
<
div
key=
{
v
.
id
}
onClick=
{
()
=>
handleCheck
(
v
)
}
className=
{
cx
(
'select_style_border'
,
checkedId
===
v
.
id
?
'active'
:
''
)
}
>
<
div
>
<
Row
style=
{
{
color
:
'#303133'
}
}
>
<
Col
>
{
v
.
receiverName
}
</
Col
>
<
Col
>
/
</
Col
>
<
Col
>
{
v
.
phone
}
</
Col
>
</
Row
>
<
div
style=
{
{
color
:
'#909399'
}
}
>
{
v
.
fullAddress
}
</
div
>
</
div
>
</
div
>)
}
</
SelectStyles
>
{
transformData
.
length
>
3
&&
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
}
}
>
显示更多
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
div
>
}
</
div
>
)
}
export
default
SelectAddress
src/pages/afterService/exchangeGoods/waitSubmitOrderList/components/replaceAddress/index.tsx
View file @
b57c505e
import
React
from
'react'
import
React
,
{
useState
}
from
'react'
import
InfoList
from
'../../../../components/InfoList'
import
SelectAddress
from
'../../../../components/SelectAddress'
import
styles
from
'./index.less'
interface
ReplaceAddressPropsType
{
...
...
@@ -8,13 +9,13 @@ interface ReplaceAddressPropsType {
const
ReplaceAddress
:
React
.
FC
<
ReplaceAddressPropsType
>
=
(
props
)
=>
{
const
[
addressId
,
setAddressId
]
=
useState
<
number
>
()
let
detailList
=
[
{
label
:
'换货收货地址'
,
labelClassName
:
styles
.
flexStart
,
value
:
<>
133
</>,
value
:
<
SelectAddress
value=
{
addressId
}
dataSource=
{
[]
}
/>,
},
]
...
...
src/pages/afterService/exchangeGoods/waitSubmitOrderList/detail.tsx
View file @
b57c505e
...
...
@@ -53,11 +53,24 @@ const OrderDetail: React.FC<OrderDetailProps> = (props) => {
form
.
validateFields
().
then
(
values
=>
{
console
.
log
(
values
,
"values"
)
if
(
!
values
.
applyAbstract
)
{
setTabActiveKey
(
'basicInfo'
)
return
}
}).
catch
(
errors
=>
{
console
.
log
(
errors
,
"errors"
)
})
}
/**
* 校验必填项
*/
const
checkRequiredItem
=
()
=>
{
}
return
(
<>
<
Helmet
>
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
b57c505e
...
...
@@ -345,16 +345,20 @@ const CommodityDetail = (props) => {
postFn
=
PublicApi
.
postSearchShopPurchaseSaveOrUpdatePurchase
break
;
}
postFn
&&
postFn
(
param
).
then
(
res
=>
{
clickFlag
=
true
PublicApi
.
postOrderDirectPayment
({
productId
:
selectCommodityId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
setPurchaseCount
(
res
.
data
)
setAddSuccessVisible
(
true
)
postFn
&&
postFn
(
param
).
then
(
res
=>
{
clickFlag
=
true
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
setPurchaseCount
(
res
.
data
)
setAddSuccessVisible
(
true
)
}
}).
catch
(()
=>
{
clickFlag
=
true
})
}
}).
catch
(()
=>
{
clickFlag
=
true
})
}
}
...
...
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