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
linweijiong
jinfa-platform
Commits
13f89887
Commit
13f89887
authored
Sep 16, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'详细重构'
parent
2de222d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
165 deletions
+5
-165
detail.tsx
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
+5
-165
No files found.
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
View file @
13f89887
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:39:29
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-16 1
7:36:39
* @LastEditTime: 2020-09-16 1
8:15:58
*/
import
React
,
{
Component
,
useState
,
useEffect
,
useRef
}
from
'react'
import
ReactDOM
from
'react-dom'
...
...
@@ -355,60 +355,6 @@ const Detail: React.FC<{}> = () => {
}
/**
* @description: 初始化需求对接表格 需求单
* @param {type}
* @return {type}
*/
const
InitMemberList
=
()
=>
{
let
params
:
any
=
{}
params
.
categoryId
=
categoryId
let
codeList
=
tabForm
.
getFieldValue
(
'requisitionFormAddress'
)
||
[]
if
(
categoryId
&&
otherList
.
length
!=
0
)
{
console
.
log
(
'codeList'
,
codeList
)
params
.
areaRequestList
=
codeList
.
map
((
v
:
any
)
=>
{
if
(
Array
.
isArray
(
v
))
{
return
({
provinceCode
:
v
[
0
],
cityCode
:
v
&&
v
.
length
>
1
?
v
[
1
]
:
null
})
}
})
let
productList
=
[]
productSource
.
forEach
((
v
)
=>
{
// console.log('v',v)
let
item
:
any
=
{}
Object
.
keys
(
v
).
forEach
(
child
=>
{
otherList
.
forEach
((
j
:
any
)
=>
{
let
otherItem
:
any
=
{}
if
(
child
===
j
.
title
)
{
otherItem
[
'attributeId'
]
=
j
.
key
otherItem
[
'attributeValue'
]
=
v
[
child
]
productList
.
push
(
otherItem
)
}
})
})
})
params
.
attributeList
=
[...
productList
]
params
.
current
=
1
params
.
pageSize
=
20
console
.
log
(
'params'
,
JSON
.
stringify
(
params
))
PublicApi
.
postOrderSystemMatchingMemberInitializeList
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
.
data
||
{}
setdockingList
(
data
)
}
})
}
}
/**
* @description: 生产商品动态弹窗
* @param {type} seletCategoryId品类id needotherCoumns 需要展示动态列
* @return {type}
...
...
@@ -447,87 +393,6 @@ const Detail: React.FC<{}> = () => {
}
/**
* @description: 选择品类
* @param {type}
* @return {type}
*/
const
onCustomerCategoryChange
=
(
value
:
any
,
options
:
any
)
=>
{
console
.
log
(
3112
,
value
,
options
)
let
seletCategoryId
=
value
[
value
.
length
-
1
]
setcategoryId
(
seletCategoryId
)
setseletCategoryNameList
(
options
)
if
(
id
){
sethaschangeCategory
(
true
)
}
else
{
sethaschangeCategory
(
false
)
}
console
.
log
(
seletCategoryId
,
'seleellele'
)
initCreatePro
(
seletCategoryId
)
}
/**
* @description: 需求格式
* @param {type}
* @return {type}
*/
const
dockingColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
align
:
'left'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'是否归属会员'
,
dataIndex
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
align
:
'center'
,
render
:
(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
{
title
:
'需求发送状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
<
Switch
defaultChecked=
{
text
?
true
:
false
}
size=
"small"
onChange=
{
(
checked
)
=>
{
console
.
log
(
checked
);
dockingList
[
index
].
state
=
checked
?
1
:
0
setdockingList
([...
dockingList
])
}
}
/>
}
]
/**
* @description: 删除明细
* @param {type}
* @return {type}
...
...
@@ -686,8 +551,6 @@ const Detail: React.FC<{}> = () => {
case
2
:
setVisibleChannelMember
(
true
)
break
;
case
3
:
break
;
}
}
...
...
@@ -721,7 +584,7 @@ const Detail: React.FC<{}> = () => {
setproductSource
([...
data
])
}
})
//商品列表
//商品列表
为动态列渲染做
// PublicApi.getOrderRequisitionFormProductAll({ id: id }).then(res => {
// if (res.code === 1000) {
// let { data } = res
...
...
@@ -811,14 +674,7 @@ const Detail: React.FC<{}> = () => {
}
const
changePlatform
=
(
e
:
any
)
=>
{
console
.
log
(
'e'
,
e
.
target
.
value
)
setplatType
(
e
.
target
.
value
)
if
(
e
.
target
.
value
==
2
)
{
//调用需求单
InitMemberList
()
}
}
const
handleMemberTypeChange
=
(
e
:
any
)
=>
{
setmemberType
(
e
.
target
.
value
)
...
...
@@ -1110,7 +966,7 @@ const Detail: React.FC<{}> = () => {
colon=
{
false
}
labelAlign=
"left"
autoComplete=
"off"
onFinish=
{
onFinish
}
//
onFinish={onFinish}
initialValues=
{
{
customerCategoryId
:
customerCategoryId
,
requisitionFormAddress
:
requisitionFormAddress
...
...
@@ -1305,24 +1161,8 @@ const Detail: React.FC<{}> = () => {
>
</
RroductModal
>
{
/* 选择需求单 */
}
<
InquiryModalTable
confirmModal=
{
(
val
)
=>
confirmModal
(
val
)
}
currentRef=
{
inquiryRef
}
schemaAction=
{
addSchemaAction
}
/>
{
/* <ModalTable
modalTitle='选择需求单'
confirm={handleOkAddEq}
cancel={() => setdialogEqvisble(false)}
visible={dialogEqvisble}
columns={dialogEqcolumns}
rowSelection={eqRowSelection}
fetchTableData={params => fetchEqData(params)}
formilyProps={
{
ctx: { schema: dialogEqformSearch }
}
}
tableProps={{
rowKey: 'id'
/> */
}
<
ModalTable
modalTitle=
'选择会员'
confirm=
{
handleOkAddMember
}
...
...
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