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
5c9bc933
Commit
5c9bc933
authored
Sep 04, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'对接需求单详情和新增需求单会员是switch的才提交'
parent
c187bc95
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
268 additions
and
79 deletions
+268
-79
menu.ts
src/locales/zh-CN/menu.ts
+2
-1
detailFormColumnType.ts
src/pages/transaction/common/detailFormColumnType.ts
+177
-69
detail.tsx
src/pages/transaction/enquirySubmit/components/detail.tsx
+0
-0
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+89
-9
No files found.
src/locales/zh-CN/menu.ts
View file @
5c9bc933
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-0
2 15:11:21
* @LastEditTime: 2020-09-0
4 11:24:54
*/
export
default
{
...
...
@@ -106,6 +106,7 @@ export default {
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
'menu.tranactionAbility.enquirySubmit.toAddSubmitList'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail'
:
'需求单详情'
,
'menu.tranactionAbility.enquirySubmit.enquiryOne'
:
'待审核报价单(一级)'
,
'menu.tranactionAbility.enquirySubmit.enquiryTwo'
:
'待审核报价单(二级)'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
...
...
src/pages/transaction/
enquirySubmit/toAddSubmit
/detailFormColumnType.ts
→
src/pages/transaction/
common
/detailFormColumnType.ts
View file @
5c9bc933
...
...
@@ -3,69 +3,10 @@
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-0
1 10:08:44
* @LastEditTime: 2020-09-0
4 17:01:46
*/
import
{
ColumnType
}
from
'antd/lib/table/interface'
export
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'商品规格型号'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'left'
},
{
title
:
'品牌'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'颜色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'尺码'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'面料'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'产地'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'单位'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'采购数量'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
}
]
import
moment
from
'moment'
export
const
dockingColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
...
...
@@ -109,21 +50,188 @@ export const dockingColumn: ColumnType<any>[] = [
},
{
title
:
'状态'
,
title
:
'
需求发送
状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
},
{
title
:
'操作'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'未发生需求'
:
'已发送需求'
)
}
]
export
const
memberColumn
=
(
children
?)
=>
{
let
columns
:
ColumnType
<
any
>
[]
=
[]
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
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
)
=>
children
?
children
(
text
,
records
,
index
)
:
''
}
]
return
columns
}
/**
* @description: 内部流转interiorRequisitionForms
* 外部流转 externalRequisitionForms
* @param {type}
* @return {type}
*/
export
const
externalColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
export
const
interiorColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作人'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'部门'
,
dataIndex
:
'department'
,
align
:
'center'
,
key
:
'department'
,
},
{
title
:
'职位'
,
dataIndex
:
'position'
,
align
:
'center'
,
key
:
'position'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
...
...
src/pages/transaction/enquirySubmit/components/detail.tsx
View file @
5c9bc933
This diff is collapsed.
Click to expand it.
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
View file @
5c9bc933
...
...
@@ -19,11 +19,11 @@ import {
import
{
history
}
from
'umi'
import
{
LinkOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
MinusOutlined
,
MinusCircleOutlined
}
from
'@ant-design/icons'
import
{
Row
,
Col
,
Card
,
Button
,
Table
,
Popconfirm
,
Radio
,
DatePicker
,
Form
,
Spin
,
Select
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
}
from
'antd'
;
Form
,
Spin
,
Select
,
Switch
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
dockingColumn
}
from
'.
/detailFormColumnType'
import
{
memberColumn
}
from
'../../common
/detailFormColumnType'
import
{
getAuth
}
from
'@/utils/auth'
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./templateForm.less'
;
...
...
@@ -41,6 +41,7 @@ import {
import
{
store
}
from
'@/store'
import
colorTag
from
'@/pages/logistics/colorTag'
import
{
Effects
}
from
'bizcharts'
import
{
check
}
from
'prettier'
const
{
TabPane
}
=
Tabs
const
{
TextArea
}
=
Input
...
...
@@ -112,6 +113,7 @@ const Detail: React.FC<{}> = () => {
const
[
categoryId
,
setcategoryId
]
=
useState
(
null
)
//选择的分类id
const
[
otherList
,
setotherList
]
=
useState
([])
//动态tab循环
const
[
dockingList
,
setdockingList
]
=
useState
([])
//需求列表
const
[
memberList
,
setmemberList
]
=
useState
([])
const
[
productSource
,
setproductSource
]
=
useState
([])
//商品列表 新增
const
[
shipperAddressList
,
setshipperAddressList
]
=
useState
([])
const
[
CategoryTreeOne
,
setCategoryTreeOne
]
=
useState
([])
...
...
@@ -280,6 +282,61 @@ const Detail: React.FC<{}> = () => {
// setShowCategory(null)
}
/**
* @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'
}
]
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -328,8 +385,10 @@ const Detail: React.FC<{}> = () => {
// 会员添加弹窗控制
const
handleOkAddMember
=
()
=>
{
setVisibleChannelMember
(
false
)
setproductSource
(
memberRowCtl
.
selectRow
)
console
.
log
(
'memberRowCtl.selectRow'
,
memberRowCtl
.
selectRow
)
memberRowCtl
.
selectRow
.
forEach
((
v
)
=>
{
v
[
'state'
]
=
true
})
setmemberList
(
memberRowCtl
.
selectRow
)
}
const
[
pagination
,
setPagination
]
=
useState
({
...
...
@@ -560,7 +619,17 @@ const Detail: React.FC<{}> = () => {
console
.
log
(
'item'
,
item
)
})
values
[
'voucherTime'
]
=
null
values
[
'memberIds'
]
=
[]
values
[
'memberIds'
]
=
[]
// memberRowCtl.selectedRowKeys
if
(
platType
==
3
){
values
[
'memberIds'
]
=
memberList
.
filter
((
v
)
=>
v
.
state
).
map
(
v
=>
{
return
v
.
memberId
})
}
else
if
(
platType
==
2
){
values
[
'memberIds'
]
=
dockingList
.
filter
((
v
)
=>
v
.
state
).
map
(
v
=>
{
return
v
.
memberId
})
}
values
[
'demandDockings'
]
=
[]
values
[
'requisitionFormProducts'
]
=
[...
productList
]
console
.
log
(
'productList'
,
productList
)
...
...
@@ -620,6 +689,15 @@ const Detail: React.FC<{}> = () => {
};
console
.
log
(
'Received values of form: '
,
values
);
}
const
switchState
=
(
text
,
record
,
index
)
=>
{
console
.
log
(
66
,
text
,
record
,
index
)
return
<
Switch
defaultChecked=
{
text
?
true
:
false
}
size=
"small"
onChange=
{
(
checked
)
=>
{
console
.
log
(
checked
);
memberList
[
index
].
state
=
checked
setmemberList
([...
memberList
])
}
}
/>
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -1027,12 +1105,14 @@ const Detail: React.FC<{}> = () => {
</
Space
>
{
platType
==
3
&&
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
handleOptionBtn
(
2
)
}
type=
'dashed'
>
选择会员
</
Button
>
<>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
handleOptionBtn
(
2
)
}
type=
'dashed'
>
选择会员
</
Button
>
<
Table
rowKey=
{
"id"
}
dataSource=
{
memberList
}
columns=
{
memberColumn
(
switchState
)
}
pagination=
{
pagination
}
/>
</>
}
{
platType
!=
1
&&
<
Table
dataSource=
{
dockingList
}
rowSelection=
{
rowSelection
}
columns=
{
dockingColumn
}
pagination=
{
pagination
}
/>
(
platType
!=
1
&&
platType
!=
3
)
&&
<
Table
rowKey=
{
"id"
}
dataSource=
{
dockingList
}
columns=
{
dockingColumn
}
pagination=
{
pagination
}
/>
}
...
...
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