Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
c9aa16b7
Commit
c9aa16b7
authored
Sep 25, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'新增需求单查询页面-新增需求单详情-新增需求单审核列表-新增需求单详情和对接功能'
parent
23394486
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1944 additions
and
3 deletions
+1944
-3
index.ts
config/routes/index.ts
+3
-1
requisitionRoute.ts
config/routes/requisitionRoute.ts
+45
-0
menu.ts
src/locales/zh-CN/menu.ts
+10
-2
index.tsx
src/pages/requisition/aduit/aduitList/index.tsx
+9
-0
detail.tsx
src/pages/requisition/aduit/components/detail.tsx
+0
-0
index.tsx
src/pages/requisition/aduit/components/index.tsx
+340
-0
detail.tsx
src/pages/requisition/aduit/enquirySearch/detail.tsx
+0
-0
index.tsx
src/pages/requisition/aduit/enquirySearch/index.tsx
+236
-0
colorTag.ts
src/pages/requisition/common/colorTag.ts
+32
-0
detailFormColumnType.ts
src/pages/requisition/common/detailFormColumnType.ts
+263
-0
index.less
src/pages/requisition/common/index.less
+0
-0
statusList.ts
src/pages/requisition/common/statusList.ts
+94
-0
tableStatusList.tsx
src/pages/requisition/common/tableStatusList.tsx
+71
-0
confirmModal.tsx
src/pages/requisition/components/confirmModal.tsx
+133
-0
index.less
src/pages/requisition/components/index.less
+224
-0
platType.tsx
src/pages/requisition/components/platType.tsx
+54
-0
index.tsx
src/pages/requisition/effect/index.tsx
+19
-0
index.tsx
src/pages/requisition/schema/index.tsx
+411
-0
productModal.tsx
src/pages/requisition/schema/productModal.tsx
+0
-0
No files found.
config/routes/index.ts
View file @
c9aa16b7
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-08-04 15:47:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-0
8-06 11:24:58
* @LastEditTime: 2020-0
9-25 10:30:02
*/
/**
...
...
@@ -12,6 +12,7 @@ import pageCustomized from './pageCustomized'
import
calssPropertyRoute
from
'./calssPropertyRoute'
// 品类属性路由
import
trademarkRoute
from
'./brandRoute'
// 品牌路由
import
commodity
from
'./commodityRoute'
// 商品审核路由
import
requisitionRoute
from
'./requisitionRoute'
//需求单
import
logisticsRoutes
from
'./logisticsRoutes'
import
memberAbility
from
'./memberAbility'
import
ruleSettingRoutes
from
'./ruleSettingRoutes'
...
...
@@ -24,6 +25,7 @@ const routeList = [
calssPropertyRoute
,
trademarkRoute
,
commodity
,
requisitionRoute
,
logisticsRoutes
,
memberAbility
,
ruleSettingRoutes
,
...
...
config/routes/requisitionRoute.ts
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-08-04 16:21:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-25 14:31:33
*/
const
router
=
{
path
:
'/requisitionManager'
,
name
:
'requisitionManager'
,
key
:
'requisitionManager'
,
icon
:
'SmileOutlined'
,
routes
:[
//需求单查询
{
path
:
'/requisitionManager/aduit/enquirySearch'
,
name
:
'enquirySearch'
,
component
:
'@/pages/requisition/aduit/enquirySearch'
,
},
//需求单查询详情
{
path
:
'/requisitionManager/aduit/enquirySearch/enquiryDetail'
,
name
:
'enquiryDetail'
,
component
:
'@/pages/requisition/aduit/enquirySearch/detail'
,
hideInMenu
:
true
,
hidePageHeader
:
true
},
//需求单审核列表
{
path
:
'/requisitionManager/aduit/aduitList'
,
name
:
'aduitList'
,
component
:
'@/pages/requisition/aduit/aduitList'
,
},
//审核需求单(详情)
{
path
:
'/requisitionManager/aduit/aduitDetail'
,
name
:
'aduitDetail'
,
component
:
'@/pages/requisition/aduit/components/detail'
,
hideInMenu
:
true
,
hidePageHeader
:
true
},
]
}
export
default
router
\ No newline at end of file
src/locales/zh-CN/menu.ts
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-08-04 15:05:52
* @LastEditors:
XieZhiXi
ong
* @LastEditTime: 2020-09-2
3 10:38
:53
* @LastEditors:
LeeJianc
ong
* @LastEditTime: 2020-09-2
5 14:01
:53
*/
import
utils
from
'@/utils'
import
menu
from
'../en-US/menu'
...
...
@@ -79,10 +79,18 @@ export default {
'menu.memberAbility.memberUpgradeRule'
:
'会员升级规则'
,
'menu.memberAbility.memberLevel'
:
'会员等级'
,
'menu.memberAbility.addEquity'
:
'会员权益设置'
,
//需求单
'menu.requisitionManager'
:
'需求单审核'
,
'menu.requisitionManager.enquirySearch'
:
'需求单查询'
,
'menu.requisitionManager.enquiryDetail'
:
'需求单详情'
,
'menu.requisitionManager.aduitList'
:
'需求单审核'
,
//物流管理
'menu.logisticsManager'
:
'物流管理'
,
'menu.logisticsManager.logisticsList'
:
'物流单查询'
,
//规则
'menu.ruleSettingManager'
:
'平台规则配置'
,
...
...
src/pages/requisition/aduit/aduitList/index.tsx
0 → 100644
View file @
c9aa16b7
import
React
,
{
Component
}
from
'react'
import
OrderList
from
"../components/index"
const
List
=
()
=>
{
return
(
<
OrderList
des=
'审核需求单'
type=
{
1
}
/>
)
}
export
default
List
\ No newline at end of file
src/pages/requisition/aduit/components/detail.tsx
0 → 100644
View file @
c9aa16b7
This diff is collapsed.
Click to expand it.
src/pages/requisition/aduit/components/index.tsx
0 → 100644
View file @
c9aa16b7
This diff is collapsed.
Click to expand it.
src/pages/requisition/aduit/enquirySearch/detail.tsx
0 → 100644
View file @
c9aa16b7
This diff is collapsed.
Click to expand it.
src/pages/requisition/aduit/enquirySearch/index.tsx
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-25 14:27:52
*/
/**
* @description: 组件描述:
* @param {type}
* @return {type}
*/
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Card
,
Space
,
Row
,
Col
,
Dropdown
,
Menu
,
Popconfirm
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PlusOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
IFormFilter
,
IButtonFilter
,
}
from
'god/dist/src/standard-table/TableController'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
interiorState
,
interiorStateTwo
,
enquirySearchInteriorState
,
enquirySearchexternalState
}
from
'../../common/tableStatusList'
import
statuStyle
from
'../../common/colorTag'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
timeRange
}
from
'@/utils/index'
import
{
filterInteriorStateList
,
filterExternalStateList
}
from
'./../../common/statusList'
import
moment
from
'moment'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
searchSelectGetSelectCategoryOptionEffect
}
from
'../../effect/index'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
enquierySearchSchema
}
from
'../../schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
values
,
action
}
from
'mobx'
;
export
interface
listParams
{
type
:
number
;
des
?:
string
;
}
const
formActions
=
createFormActions
();
const
List
:
React
.
FC
<
{
listParams
}
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
more
,
setmore
]
=
useState
(
false
)
const
[
selectRow
,
setSelectRow
]
=
useState
([])
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
number
>>
([])
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
const
fetchData
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderPlatformRequisitionFormList
(
params
);
return
res
.
data
}
/**
* @description:
* @param {type} 可以根据props.type处理
* @return {type}
*/
const
handleToDetail
=
(
id
)
=>
{
history
.
push
(
`/requisitionManager/aduit/enquirySearch/enquiryDetail?page_type=
${
6
}
&id=
${
id
}
`
)
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'需求单号'
,
key
:
'requisitionFormNo'
,
dataIndex
:
'requisitionFormNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleToDetail
(
records
.
id
)
}
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'需求摘要'
,
key
:
'details'
,
dataIndex
:
'details'
,
align
:
'left'
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
,
align
:
'left'
},
{
title
:
'需求会员'
,
key
:
'demandMembers'
,
dataIndex
:
'demandMembers'
,
align
:
'left'
},
{
title
:
'交付日期'
,
key
:
'deliveryTime'
,
dataIndex
:
'deliveryTime'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
format
(
text
)
},
{
title
:
'报价截至时间'
,
key
:
'quotationAsTime'
,
dataIndex
:
'quotationAsTime'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
format
(
text
)
},
{
title
:
'单据时间'
,
key
:
'voucherTime'
,
dataIndex
:
'voucherTime'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
format
(
text
)
},
{
title
:
'外部状态'
,
key
:
'externalState'
,
dataIndex
:
'externalState'
,
align
:
'center'
,
filters
:
filterExternalStateList
,
filterMultiple
:
false
,
onFilter
:
(
value
,
record
)
=>
record
.
externalState
===
value
,
render
:
(
text
:
any
,
reconds
)
=>
enquirySearchexternalState
(
text
)
},
{
title
:
'内部状态'
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
align
:
'left'
,
filters
:
filterInteriorStateList
,
filterMultiple
:
false
,
onFilter
:
(
value
,
record
)
=>
record
.
interiorState
===
value
,
render
:(
text
:
any
)
=>
enquirySearchInteriorState
(
text
)
}
]
useEffect
(()
=>
{
},[])
const
toEdit
=
(
id
:
number
|
string
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/enquirySubmit/addEnquiry?id=
${
id
}
`
)
}
/**
* @description: 删除
* @param {type}
* @return {type}
*/
const
handleDelete
=
(
arr
:
number
[]
|
string
[])
=>
{
PublicApi
.
postOrderRequisitionFormDeleteAll
({
ids
:
arr
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
//提交审核
const
handleSubmit
=
(
id
)
=>
{
PublicApi
.
postOrderNewRequisitionFormAudit
({
id
:
id
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
const
handleSumbit
=
(
values
:
any
)
=>
{
if
(
values
.
voucherTime
){
values
.
startVoucherTime
=
timeRange
(
values
.
voucherTime
).
st
values
.
endVoucherTime
=
timeRange
(
values
.
voucherTime
).
et
delete
values
.
voucherTime
}
console
.
log
(
'values'
,
values
)
ref
.
current
.
reload
(
values
)
}
const
handleBatchDel
=
(
e
:
any
)
=>
{
}
const
rowSelection
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
setSelectRow
(
selectedRows
);
setSelectedRowKeys
(
selectedRowKeys
);
console
.
log
(
`selectedRowKeys:
${
selectedRowKeys
}
`
,
'selectedRows: '
,
selectedRows
)
},
}
const
controllerBtns
=
<
Row
>
<
Col
span=
{
24
}
>
</
Col
>
</
Row
>
return
(
<
Card
>
<
StandardTable
currentRef=
{
ref
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
// rowSelection={rowSelection}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
handleSumbit
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'requisitionFormNo'
,
FORM_FILTER_PATH
)
FormEffectHooks
.
onFieldChange$
(
'category'
).
subscribe
(
state
=>
{
searchSelectGetSelectCategoryOptionEffect
(
actions
,
'category'
)
})
}
}
schema=
{
enquierySearchSchema
}
>
</
NiceForm
>
}
/>
</
Card
>
)
}
export
default
List
\ No newline at end of file
src/pages/requisition/common/colorTag.ts
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 17:24:49
*/
export
default
{
default
:
{
padding
:
'2px 5px'
,
background
:
'rgba(244,245,247,1)'
,
borderRadius
:
'4px'
},
confirm
:
{
color
:
'#3F7ED2'
,
padding
:
'2px 5px'
,
background
:
'rgba(240, 248, 255, 1)'
,
borderRadius
:
'4px'
},
success
:
{
color
:
'#00B37A'
,
padding
:
'2px 5px'
,
background
:
'rgba(235,247,242,1)'
,
borderRadius
:
'4px'
},
warn
:
{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,235,230,1)'
,
borderRadius
:
'4px'
}
}
\ No newline at end of file
src/pages/requisition/common/detailFormColumnType.ts
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-10 10:22:41
*/
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
moment
from
'moment'
export
const
dockingColumn
=
(
children
,
optionChild
)
=>
{
let
columns
:
ColumnType
<
any
>
[]
=
[]
columns
=
[
{
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
)
=>
children
?
children
(
text
,
records
,
index
)
:
''
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
key
:
'option'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
optionChild
?
optionChild
(
text
,
records
,
index
)
:
''
}
]
return
columns
}
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/requisition/common/index.less
0 → 100644
View file @
c9aa16b7
src/pages/requisition/common/statusList.ts
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-08-01 11:06:09
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-09 14:47:02
*/
export
const
TimeList
=
[
{
label
:
'单据时间(全部)'
,
value
:
0
},
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type}
* @return {type} 内
*/
export
const
filterExternalStateList
=
[
{
text
:
'提交需求单'
,
value
:
1
},
{
text
:
'审核需求单'
,
value
:
2
},
{
text
:
'提交报价单'
,
value
:
3
},
{
text
:
'确认报价单'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
},
{
text
:
'取消报价单'
,
value
:
7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type}
* @return {type} 内
*/
export
const
filterInteriorStateList
=
[
{
text
:
'新增需求单'
,
value
:
1
},
{
text
:
'审核需求单一级'
,
value
:
2
},
{
text
:
'审核需求单二级'
,
value
:
3
},
{
text
:
'提交需求单'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
},
{
text
:
'取消需求单'
,
value
:
7
}
]
src/pages/requisition/common/tableStatusList.tsx
0 → 100644
View file @
c9aa16b7
import
React
,
{
Component
,
ReactNode
}
from
'react'
;
import
{
Badge
}
from
'antd'
/****** *********************** 需求单 ************************** */
/**
* @description: 需求提交一级
* @param {type}
* @return {type}
*/
export
const
interiorState
=
(
text
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
text
===
1
?
component
=
<
Badge
status=
'default'
text=
"待提交审核"
/>:
text
===
2
?
component
=
<
Badge
status=
'processing'
text=
"待审核"
/>:
text
===
3
?
component
=
<
Badge
status=
'success'
text=
"审核通过"
/>:
component
=
<
Badge
status=
'error'
text=
"审核不通过"
/>
return
component
;
}
/**
* @description: 需求提交二级
* @param {type}
* @return {type}
*/
export
const
interiorStateTwo
=
(
text
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
text
===
1
?
component
=
<
Badge
status=
'default'
text=
"待提交审核"
/>:
text
===
3
?
component
=
<
Badge
status=
'processing'
text=
"待审核"
/>:
text
===
4
?
component
=
<
Badge
status=
'success'
text=
"审核通过"
/>:
component
=
<
Badge
status=
'error'
text=
"审核不通过"
/>
return
component
;
}
/**
* @description: 专用需求发布的需求单查询
* @param {type}
* @return {type} 内
*/
export
const
enquirySearchInteriorState
=
(
text
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
text
===
1
?
component
=
<
Badge
status=
'default'
text=
"新增需求单"
/>:
text
===
2
?
component
=
<
Badge
color=
"#FFC400"
text=
"审核需求单一级"
/>:
text
===
3
?
component
=
<
Badge
color=
"#FFC400"
text=
"审核需求单二级"
/>:
text
===
4
?
component
=
<
Badge
status=
'processing'
text=
"待提交需求单"
/>:
text
===
5
?
component
=
<
Badge
status=
'success'
text=
"完成"
/>:
text
===
6
?
component
=
<
Badge
status=
'error'
text=
"审核不通过"
/>:
component
=
<
Badge
status=
"default"
text=
"取消需求单"
/>
return
component
;
}
/**
* @description: 专用需求发布的需求单查询
* @param {type}
* @return {type} 外
*/
export
const
enquirySearchexternalState
=
(
text
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
text
===
1
?
component
=
<
Badge
status=
'default'
text=
"提交需求单"
/>:
text
===
2
?
component
=
<
Badge
color=
"#FFC400"
text=
"审核需求单"
/>:
text
===
3
?
component
=
<
Badge
status=
'default'
text=
"提交报价单"
/>:
text
===
4
?
component
=
<
Badge
status=
'processing'
text=
"确认报价单"
/>:
text
===
5
?
component
=
<
Badge
status=
'success'
text=
"完成"
/>:
text
===
6
?
component
=
<
Badge
status=
'error'
text=
"审核不通过"
/>:
component
=
<
Badge
status=
"default"
text=
"取消报价单"
/>
return
component
;
}
/****** *********************** 报价单 ************************** */
src/pages/requisition/components/confirmModal.tsx
0 → 100644
View file @
c9aa16b7
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
}
from
'antd'
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
Input
,
Radio
,
FormMegaLayout
}
from
'@formily/antd-components'
import
{
PublicApi
}
from
'@/services/api'
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
export
interface
Params
{
id
:
number
|
string
;
type
:
number
|
string
;
//1是一级 2是二级
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
dontReceive
?:
boolean
;
//默认展示
}
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
:
any
)
=>
{
console
.
log
(
props
.
dialogVisible
)
const
handleCancel
=
()
=>
{
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
console
.
log
(
'value'
,
value
)
//平台审核
if
(
props
.
type
==
1
){
PublicApi
.
postOrderPlatformRequisitionFormAudit
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
}
// else if(props.type == 2){
// PublicApi.postOrderRequisitionFormAuditTwo(value).then(res => {
// if (res.code === 1000) {
// props.onOK()
// }
// })
// }
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'state'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'cause'
,
state
=>
{
if
(
value
==
1
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
return
(
<>
<
Modal
title=
'审核确认'
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
actions
.
submit
()
}
onCancel=
{
()
=>
props
.
onCancel
()
}
destroyOnClose
afterClose=
{
()
=>
actions
.
reset
()
}
okText=
'确定'
cancelText=
{
`取消`
}
>
<
SchemaForm
labelCol=
{
4
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
state
:
1
}
}
>
<
Field
enum=
{
[
{
label
:
'审核通过'
,
value
:
1
},
{
label
:
'审核不通过'
,
value
:
0
}
]
}
name=
'state'
required
x
-
component=
"Radio"
x
-
component
-
props=
{
{
}
}
/>
{
props
.
dontReceive
&&
<>
{
/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */
}
<
Field
title=
'审核不通过原因'
name=
"cause"
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
placeholder
:
'在此输入你的内容,最多60个汉字'
}
}
x
-
rules
={{
max
:60,
// maximum:10,//最大数值
message
:'原因最多60个汉字'
}}
/>
</>
}
</
SchemaForm
>
</
Modal
>
</>
)
}
comfirmDialog
.
defaultProps
=
{
dontReceive
:
true
}
export
default
comfirmDialog
\ No newline at end of file
src/pages/requisition/components/index.less
0 → 100644
View file @
c9aa16b7
.nameCell {
text-align: left;
.nameCellTitle {
color : @main-color;
cursor: pointer;
}
.levelIcon1 {
width : 100%;
height : 16px;
background : url("/static/imgs/level1@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon2 {
width : 100%;
height : 16px;
background : url("/static/imgs/level2@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
.levelIcon3 {
width : 100%;
height : 16px;
background : url("/static/imgs/level3@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
}
.headerTop {
display : flex;
align-items: center;
font-size : 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
&-prefix {
width : 48px;
height : 48px;
line-height : 48px;
border-radius : 4px;
border : 1px solid #DFE1E6;
color : #fff;
text-align : center;
background-color: #8777D9;
}
&-name {
color : #172B4D;
margin: 0 8px 0 12px;
}
}
.headerMain {
display: flex;
&-left {
flex : 6;
display : flex;
flex-wrap : wrap;
padding-left: 90px;
&-option {
display : flex;
width : calc(100% / 3);
margin-bottom: 17px;
font-size : 14px;
font-family : PingFangSC-Regular, PingFang SC;
font-weight : 400;
color : #6B778C;
padding-right: 20px;
// &:nth-of-type(n + 4) {
// margin: 0;
// }
&:nth-of-type(3n+1) {
margin: 0;
}
div {
flex: 1;
&:nth-last-of-type(1) {
flex: 2;
}
}
}
}
&-right {
flex : 1;
text-align: right;
}
}
.saveBtn {
color : #fff;
background : @main-color;
margin-left: 10px;
}
.count{
font-size: 24px;
color: #172B4D;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #172B4D;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #6B778C;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #172B4D;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #6B778C;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #172B4D;
}
}
}
}
}
}
\ No newline at end of file
src/pages/requisition/components/platType.tsx
0 → 100644
View file @
c9aa16b7
/*
* @Author: LeeJiancong
* @Date: 2020-09-10 11:00:17
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-10 11:17:09
*/
/**
* @description: 需求选择
* @param {type}
* @return {type}
*/
import
React
,
{
Component
}
from
'react'
;
import
{
Space
,
Radio
,
Tooltip
}
from
'antd'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
export
interface
plarms
{
platType
:
number
;
//类型 1平台 2系统匹配 3会员选择
changePlatform
?:
Function
;
//事件
disabled
?:
boolean
;
}
const
PlatType
:
React
.
FC
<
plarms
>
=
(
props
)
=>
{
return
(
<
Space
size=
{
16
}
>
<
Radio
.
Group
disabled=
{
props
.
disabled
}
value=
{
props
.
platType
}
onChange=
{
(
e
)
=>
props
.
changePlatform
(
e
)
}
>
<
Radio
value=
{
1
}
>
发布至平台
<
Tooltip
title=
"需求发布至企业商城求购频"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
Radio
>
<
Radio
value=
{
2
}
>
系统匹配
<
Tooltip
title=
"系统通过需求单品类、商品属性、适用地市与平台会员发布的商品品类、
商品属性、归属地区进行匹配,推荐满足条件的平台会员"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
Radio
>
<
Radio
value=
{
3
}
>
指定会员
<
Tooltip
title=
"选择与当前会员有归属关系的会员且角色类型为服务提供的会员(供应商),
需求只发送给指定会员"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
Radio
>
</
Radio
.
Group
>
</
Space
>
)
}
PlatType
.
defaultProps
=
{
platType
:
1
,
disabled
:
false
}
export
default
PlatType
\ No newline at end of file
src/pages/requisition/effect/index.tsx
0 → 100644
View file @
c9aa16b7
import
React
,
{
useEffect
}
from
'react'
import
{
ISchemaFormActions
,
FormEffectHooks
,
IFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
const
{
onFieldValueChange$
}
=
FormEffectHooks
// 高级筛选schema中用于输入搜索需求发布品类的Effect
export
const
searchSelectGetSelectCategoryOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
PublicApi
.
getProductSelectGetSelectCategory
({
name
:
state
.
props
[
'x-component-props'
].
searchValue
}).
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
})
})
}
\ No newline at end of file
src/pages/requisition/schema/index.tsx
0 → 100644
View file @
c9aa16b7
This diff is collapsed.
Click to expand it.
src/pages/requisition/schema/productModal.tsx
0 → 100644
View file @
c9aa16b7
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