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
9079fcbd
Commit
9079fcbd
authored
Dec 23, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev
parents
a18d32d0
1344f209
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
64 deletions
+70
-64
index.ts
src/components/ModalTable/schema/index.ts
+2
-2
index.tsx
src/pages/payandSettle/paySetting/index.tsx
+68
-62
basicInfo.tsx
...ction/goodsOffer/addEnquiryOrder/components/basicInfo.tsx
+0
-0
No files found.
src/components/ModalTable/schema/index.ts
View file @
9079fcbd
...
...
@@ -34,7 +34,7 @@ export const productModalByMemberSchema: ISchema = {
"x-component-props"
:
{
placeholder
:
'请选择品类'
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
PublicApi
.
getProductSelectGet
SelectCustom
erCategory
,
fetchSearch
:
PublicApi
.
getProductSelectGet
Memb
erCategory
,
style
:
{
width
:
160
}
...
...
@@ -45,7 +45,7 @@ export const productModalByMemberSchema: ISchema = {
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGet
Select
Brand
,
fetchSearch
:
PublicApi
.
getProductSelectGet
Member
Brand
,
style
:
{
width
:
160
}
...
...
src/pages/payandSettle/paySetting/index.tsx
View file @
9079fcbd
...
...
@@ -16,7 +16,7 @@ const { TabPane } = Tabs
const
PayWaySetTemplate
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
config
,
setconfig
]
=
useState
<
any
>
([]);
const
[
payItem
,
setPayItem
]
=
useState
<
any
>
([]);
const
[
step
,
setStep
]
=
useState
<
Array
<
number
>>
([]);
//
const [step, setStep] = useState<Array<number>>([]);
const
[
obj
,
setObj
]
=
useState
<
any
>
({});
const
payWayConfigInfo
=
()
=>
{
// 支付配置信息
...
...
@@ -29,76 +29,76 @@ const PayWaySetTemplate: React.FC<{}> = () => {
})
}
const
initPayWayStart
=
(
id
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getPayMemberQueryPlatformIsStart
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
data
)
{
resolve
(
res
)
}
}
})
}).
then
((
res
:
any
)
=>
{
const
data
=
[...
payItem
];
if
(
data
.
length
>
0
)
{
data
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
id
===
res
.
data
.
id
)
{
item
.
id
=
res
.
data
.
id
;
item
.
isPitchOn
=
res
.
data
.
isPitchOn
;
item
.
payParametersList
=
res
.
data
.
payParametersList
;
item
.
payParametersAddListRequests
=
res
.
data
.
payParametersListResponses
;
item
.
payType
=
res
.
data
.
payType
;
item
.
way
=
res
.
data
.
way
;
}
})
setPayItem
([...
data
])
}
})
}
//
const initPayWayStart = (id: any) => {
//
return new Promise(resolve => {
//
PublicApi.getPayMemberQueryPlatformIsStart({ id }).then(res => {
//
if (res.code === 1000) {
//
if (res.data) {
//
resolve(res)
//
}
//
}
//
})
//
}).then((res: any) => {
//
const data = [...payItem];
//
if (data.length > 0) {
//
data.forEach((item: any) => {
//
if (item.id === res.data.id) {
//
item.id = res.data.id;
//
item.isPitchOn = res.data.isPitchOn;
//
item.payParametersList = res.data.payParametersList;
//
item.payParametersAddListRequests = res.data.payParametersListResponses;
//
item.payType = res.data.payType;
//
item.way = res.data.way;
//
}
//
})
//
setPayItem([...data])
//
}
//
})
//
}
const
handleTabClick
=
(
key
:
any
)
=>
{
if
(
!
step
.
includes
(
Number
(
key
)))
{
initPayWayStart
(
key
);
}
const
data
=
[...
step
,
Number
(
key
)];
let
arr
=
[...
new
Set
(
data
)]
setStep
(
arr
);
}
//
const handleTabClick = (key: any) => {
//
if (!step.includes(Number(key))) {
//
initPayWayStart(key);
//
}
//
const data = [...step, Number(key)];
//
let arr = [...new Set(data)]
//
setStep(arr);
//
}
useEffect
(()
=>
{
// 支付配置信息
payWayConfigInfo
().
then
((
res
:
any
)
=>
{
const
id
=
res
[
0
].
id
;
const
arr
:
any
[]
=
[];
console
.
log
(
res
)
res
.
forEach
((
item
:
any
)
=>
{
arr
.
push
({
id
:
item
.
id
,
way
:
item
.
way
,
isPitchOn
:
item
.
isPitchOn
?
item
.
isPitchOn
:
0
,
payType
:
item
.
payType
,
payParametersList
:
[],
payParametersAddListRequests
:
[]
payParametersList
:
item
.
payParametersList
?
item
.
payParametersList
:
[],
payParametersAddListRequests
:
item
.
payParametersListResponses
?
item
.
payParametersListResponses
:
[]
})
})
setStep
([...
step
,
id
])
setconfig
(
res
);
/**第一次运行 */
PublicApi
.
getPayMemberQueryPlatformIsStart
({
id
}).
then
(
res
=>
{
arr
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
if
(
res
.
data
)
{
if
(
item
.
id
===
id
)
{
item
.
id
=
res
.
data
.
id
;
item
.
isPitchOn
=
res
.
data
.
isPitchOn
;
item
.
payParametersList
=
res
.
data
.
payParametersList
;
item
.
payParametersAddListRequests
=
res
.
data
.
payParametersListResponses
;
item
.
payType
=
res
.
data
.
payType
;
item
.
way
=
res
.
data
.
way
;
}
}
})
console
.
log
(
arr
)
//
setStep([...step, id])
setconfig
(
[...
res
]
);
/
/ /
**第一次运行 */
//
PublicApi.getPayMemberQueryPlatformIsStart({ id }).then(res => {
//
arr.forEach((item: any, index: number) => {
//
if (res.data) {
//
if (item.id === id) {
//
item.id = res.data.id;
//
item.isPitchOn = res.data.isPitchOn;
//
item.payParametersList = res.data.payParametersList;
//
item.payParametersAddListRequests = res.data.payParametersListResponses;
//
item.payType = res.data.payType;
//
item.way = res.data.way;
//
}
//
}
//
})
//
console.log(arr)
setPayItem
([...
arr
]);
})
//
})
})
},
[])
...
...
@@ -161,18 +161,24 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/** */
const
handleBlur
=
(
e
,
name
,
idx
)
=>
{
const
data
=
[...
payItem
];
const
assginObj
=
{...
obj
,
...{[
name
]:
e
.
target
.
value
}}
setObj
(
assginObj
)
const
arr
:
any
[]
=
[]
arr
.
push
(
assginObj
)
data
[
idx
].
payParametersAddListRequests
=
[...
arr
]
const
payParametersAddListRequests
=
data
[
idx
].
payParametersAddListRequests
;
payParametersAddListRequests
.
map
(
item
=>
{
for
(
let
key
in
item
)
{
if
(
key
===
name
)
{
item
[
key
]
=
e
.
target
.
value
}
}
item
.
type
=
6
;
})
data
[
idx
].
payParametersAddListRequests
=
[...
payParametersAddListRequests
]
setPayItem
(
data
)
}
return
(
<
PageHeaderWrapper
extra=
{
<
Button
type=
'primary'
onClick=
{
onHnadleSubmit
}
>
保存
</
Button
>
}
>
<
Card
>
<
Tabs
type=
"card"
onTabClick=
{
handleTabClick
}
>
<
Tabs
type=
"card"
>
{
config
.
map
((
item
:
any
,
idx
:
number
)
=>
<
TabPane
tab=
{
item
.
way
}
key=
{
item
.
id
}
forceRender
>
<>
...
...
src/pages/transaction/goodsOffer/addEnquiryOrder/components/basicInfo.tsx
View file @
9079fcbd
This diff is collapsed.
Click to expand it.
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