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
9ce79b83
Commit
9ce79b83
authored
Aug 29, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'需求发布列表和保存校验等前期处理'
parent
c548386d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
255 additions
and
24 deletions
+255
-24
productModal.tsx
...ges/transaction/enquirySubmit/components/productModal.tsx
+234
-0
productModal.tsx
src/pages/transaction/enquirySubmit/schema/productModal.tsx
+0
-0
detail.tsx
src/pages/transaction/enquirySubmit/toSubmit/detail.tsx
+0
-0
detailFormColumnType.ts
...ransaction/enquirySubmit/toSubmit/detailFormColumnType.ts
+21
-24
No files found.
src/pages/transaction/enquirySubmit/components/productModal.tsx
0 → 100644
View file @
9ce79b83
/*
* @Author: LeeJiancong
* @Date: 2020-08-28 10:07:45
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-29 10:16:45
*/
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Radio
,
Tabs
,
Input
,
Select
,
Checkbox
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
const
{
TabPane
}
=
Tabs
const
{
Option
}
=
Select
const
{
TextArea
}
=
Input
export
interface
Params
{
sourceData
:
Array
<
any
>
[],
id
?:
any
,
mode
:
number
,
type
?:
number
|
string
,
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
initialValues
?:
any
;
dontReceive
?:
boolean
;
//默认展示
}
const
layout
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
20
}
}
/**
* @description: 保存 提交表单
* @param {type}
* @return {type}
*/
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
console
.
log
(
'数据'
,
props
.
sourceData
)
const
[
form
]
=
Form
.
useForm
()
const
[
placeOfOriginList
,
setplaceOfOriginList
]
=
useState
([])
//产地
const
handleCancel
=
()
=>
{
}
const
handletOk
=
()
=>
{
form
.
validateFields
().
then
(
v
=>
{
console
.
log
(
'表单'
,
v
)
props
.
onOK
(
v
)
})
// if(props.type){
// value.type = props.type
// }
// console.log('列表',value)
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
onChange
=
(
value
,
attrItem
)
=>
{
}
const
renderTabPanchildren
=
(
item
:
any
)
=>
{
console
.
log
(
'子项'
,
item
)
return
(
<>
{
item
.
attributeList
.
map
((
attrItem
:
any
)
=>
{
return
(
<>
{
attrItem
.
type
===
1
&&
<
Form
.
Item
name=
{
attrItem
.
name
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
<
Select
placeholder=
"请选择"
allowClear
onChange=
{
(
v
)
=>
onChange
(
v
,
attrItem
)
}
>
{
attrItem
.
attributeValueList
&&
attrItem
.
attributeValueList
.
map
((
item
:
any
)
=>
(
<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
value
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
}
{
attrItem
.
type
===
2
&&
<
Form
.
Item
label=
{
attrItem
.
name
}
name=
{
attrItem
.
id
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
{
/* <Checkbox.Group onChange={(v)=>onChange(v, attrItem)}>
{
attrItem.customerAttributeValueList.length && attrItem.customerAttributeValueList.map((item: any, index: string) => (
<Checkbox key={item.id} value={item.id}>{item.value}</Checkbox>
))
}
</Checkbox.Group> */
}
</
Form
.
Item
>
}
{
attrItem
.
type
===
3
&&
<
Form
.
Item
name=
{
attrItem
.
id
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
&&
[{
required
:
true
,
message
:
'此项为必填项'
}]
}
>
{
/* <TextArea onChange={(v)=>onChange(v, attrItem)} maxLength={100} placeholder="最多输入100个字符" rows={4} /> */
}
</
Form
.
Item
>
}
</>
)
})
}
</>
)
}
return
(
<>
<
Modal
title=
{
props
.
mode
===
0
?
'新增商品'
:
'查看商品'
}
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
handletOk
()
}
onCancel=
{
()
=>
props
.
onCancel
()
}
destroyOnClose
afterClose=
{
()
=>
{
}
}
okText=
{
`确定`
}
cancelText=
'取消'
>
<
Form
{
...
layout
}
colon=
{
false
}
labelAlign=
"left"
form=
{
form
}
autoComplete=
"off"
>
<
Tabs
defaultActiveKey=
'tab1'
tabPosition=
"left"
>
<
Tabs
.
TabPane
tab=
'基本信息'
key=
"tab-1"
>
<
Form
.
Item
label=
'规格型号'
name=
'model'
required
>
<
Input
placeholder=
''
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'商品品牌'
name=
'brand'
required
>
<
Input
placeholder=
''
/>
</
Form
.
Item
>
</
Tabs
.
TabPane
>
{
/**
* @description: 动态循环
* @param {type}
* @return {type}
*/
}
{
props
.
sourceData
.
length
>
0
&&
props
.
sourceData
.
map
((
attributeItem
:
any
)
=>
<>
<
TabPane
tab=
{
attributeItem
.
name
}
key=
{
attributeItem
.
id
}
>
{
renderTabPanchildren
(
attributeItem
)
}
</
TabPane
>
</>
)
}
<
Tabs
.
TabPane
tab=
'采购数量'
key=
"tab-7"
>
<
Form
.
Item
label=
'单位'
name=
'purchaseNuit'
required
>
<
Input
placeholder=
''
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'采购数量'
name=
'purchaseQuantity'
required
>
<
Input
placeholder=
''
/>
</
Form
.
Item
>
</
Tabs
.
TabPane
>
</
Tabs
>
</
Form
>
</
Modal
>
</>
)
}
comfirmDialog
.
defaultProps
=
{
dontReceive
:
true
,
type
:
1
//1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
}
export
default
comfirmDialog
\ No newline at end of file
src/pages/transaction/enquirySubmit/schema/productModal.tsx
0 → 100644
View file @
9ce79b83
src/pages/transaction/enquirySubmit/toSubmit/detail.tsx
View file @
9ce79b83
This diff is collapsed.
Click to expand it.
src/pages/transaction/enquirySubmit/toSubmit/detailFormColumnType.ts
View file @
9ce79b83
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-27 16:27:53
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-2
7 16:34:59
* @LastEditTime: 2020-08-2
9 14:29:40
*/
*/
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
ColumnType
}
from
'antd/lib/table/interface'
export
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
export
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
...
@@ -69,52 +69,49 @@ export const equiryColumns: ColumnType<any>[] = [
...
@@ -69,52 +69,49 @@ export const equiryColumns: ColumnType<any>[] = [
export
const
dockingList
:
ColumnType
<
any
>
[]
=
[
export
const
dockingList
:
ColumnType
<
any
>
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'
memberI
d'
,
dataIndex
:
'
i
d'
,
align
:
'center'
,
align
:
'center'
,
key
:
'
memberI
d'
,
key
:
'
i
d'
,
},
},
{
{
title
:
'
公司
名称'
,
title
:
'
会员
名称'
,
dataIndex
:
'
n
ame'
,
dataIndex
:
'
memberN
ame'
,
key
:
'
n
ame'
,
key
:
'
memberN
ame'
,
align
:
'left'
align
:
'left'
},
},
{
{
title
:
'公司地址'
,
title
:
'会员类型'
,
dataIndex
:
'roleName'
,
dataIndex
:
'memberTypeName'
,
key
:
'roleName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'成立日期'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
align
:
'center'
},
},
{
{
title
:
'
公司规模
'
,
title
:
'
会员角色
'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
align
:
'center'
},
},
{
{
title
:
'
诚信度
'
,
title
:
'
会员等级
'
,
dataIndex
:
'
roleName
'
,
dataIndex
:
'
levelTag
'
,
key
:
'
roleName
'
,
key
:
'
levelTag
'
,
align
:
'center'
align
:
'center'
},
},
{
{
title
:
'是否归属会员'
,
title
:
'是否归属会员'
,
dataIndex
:
'roleName'
,
dataIndex
:
'membershipOrNot'
,
key
:
'roleName'
,
key
:
'membershipOrNot'
,
align
:
'center'
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'
levelTag
'
,
dataIndex
:
'
state
'
,
key
:
'
levelTag
'
,
key
:
'
state
'
,
align
:
'center'
align
:
'center'
},
},
{
{
...
...
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