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
XieZhiXiong
jinfa-platform
Commits
50b6fdcd
Commit
50b6fdcd
authored
Sep 02, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'编写需求单详情静态'
parent
7792d18d
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1714 additions
and
14 deletions
+1714
-14
tranactionRoute.ts
config/routes/tranactionRoute.ts
+26
-7
menu.ts
src/locales/zh-CN/menu.ts
+5
-3
confirmModal.tsx
...ges/transaction/enquirySubmit/components/confirmModal.tsx
+141
-0
detail.tsx
src/pages/transaction/enquirySubmit/components/detail.tsx
+645
-0
enquiryListLever.tsx
...transaction/enquirySubmit/components/enquiryListLever.tsx
+240
-0
index.css
src/pages/transaction/enquirySubmit/components/index.css
+102
-0
index.less
src/pages/transaction/enquirySubmit/components/index.less
+119
-0
index.tsx
src/pages/transaction/enquirySubmit/components/index.tsx
+309
-0
index.tsx
src/pages/transaction/enquirySubmit/enquiryOne/index.tsx
+9
-0
index.tsx
src/pages/transaction/enquirySubmit/enquiryTwo/index.tsx
+9
-0
baseForm.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/baseForm.tsx
+0
-0
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+108
-3
detailFormColumnType.ts
...saction/enquirySubmit/toAddSubmit/detailFormColumnType.ts
+0
-0
index.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/index.tsx
+1
-1
No files found.
config/routes/tranactionRoute.ts
View file @
50b6fdcd
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-0
8-25 11:23:35
* @LastEditTime: 2020-0
9-02 19:14:41
*/
const
TranactionRoute
=
{
...
...
@@ -70,19 +70,38 @@ const TranactionRoute = {
key
:
'enquirySubmit'
,
routes
:[
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/
Search
List'
,
name
:
'
Search
List'
,
key
:
'
Search
List'
,
component
:
'@/pages/transaction/enquirySubmit/toSubmit'
path
:
'/memberCenter/tranactionAbility/enquirySubmit/
toAddSubmit
List'
,
name
:
'
toAddSubmit
List'
,
key
:
'
toAddSubmit
List'
,
component
:
'@/pages/transaction/enquirySubmit/to
Add
Submit'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/addEnquiry'
,
name
:
'addEnquiry'
,
key
:
'addEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/toSubmit/detail'
,
component
:
'@/pages/transaction/enquirySubmit/to
Add
Submit/detail'
,
hideInMenu
:
true
,
},
{
//需求单详情
path
:
'/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail'
,
name
:
'viewEnquiryDetail'
,
key
:
'viewEnquiryDetail'
,
component
:
'@/pages/transaction/enquirySubmit/components/detail'
,
hideInMenu
:
true
,
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/enquiryOne'
,
name
:
'enquiryOne'
,
key
:
'enquiryOne'
,
component
:
'@/pages/transaction/enquirySubmit/enquiryOne'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/enquiryTwo'
,
name
:
'enquiryTwo'
,
key
:
'enquiryTwo'
,
component
:
'@/pages/transaction/enquirySubmit/enquiryTwo'
},
]
},
// 采购订单
...
...
src/locales/zh-CN/menu.ts
View file @
50b6fdcd
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors:
XieZhiXi
ong
* @LastEditTime: 2020-0
8-28 17:48:20
* @LastEditors:
LeeJianc
ong
* @LastEditTime: 2020-0
9-02 15:11:21
*/
export
default
{
...
...
@@ -102,8 +102,10 @@ export default {
'menu.tranactionAbility.stockSellStorage.addBills'
:
'新增单据'
,
'menu.tranactionAbility.stockSellStorage.inventory'
:
'库存'
,
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
'menu.tranactionAbility.enquirySubmit.
Search
List'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.
toAddSubmit
List'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.enquirySubmit.enquiryOne'
:
'待审核报价单(一级)'
,
'menu.tranactionAbility.enquirySubmit.enquiryTwo'
:
'待审核报价单(二级)'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch'
:
'订单查询'
,
'menu.tranactionAbility.purchaseOrder.readyAddOrder'
:
'待新增订单'
,
...
...
src/pages/transaction/enquirySubmit/components/confirmModal.tsx
0 → 100644
View file @
50b6fdcd
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
;
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
dontReceive
?:
boolean
;
//默认展示
}
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
console
.
log
(
props
.
dialogVisible
)
const
handleCancel
=
()
=>
{
}
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
console
.
log
(
values
)
PublicApi
.
postLogisticsOrderWaitConfirmConfirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
}
})
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFieldChange$
(
'status'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'remark'
,
state
=>
{
if
(
value
==
3
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
setFieldState
(
'freightPrice'
,
state
=>
{
if
(
value
==
3
)
{
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=
{
3
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handletOk
(
values
)
}
initialValues=
{
{
status
:
3
}
}
>
<
Field
enum=
{
[
{
label
:
'接受物流单'
,
value
:
3
},
{
label
:
'不接受物流单'
,
value
:
4
}
]
}
name=
'status'
required
x
-
component=
"Radio"
/>
{
props
.
dontReceive
&&
<>
<
Field
title=
'运费'
name=
"freightPrice"
x
-
component=
"Input"
required
x
-
component
-
props=
{
{
placeholder
:
'运费'
,
// addonBefore: ' '
}
}
x
-
rules
={{
pattern
:
PATTERN_MAPS
.
money
,
message
:'数字类型,币制为当前站点对应的币制,保留2位小数'
}}
/>
{
/* <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top"> */
}
<
Field
title=
'不接受原因'
name=
"remark"
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/transaction/enquirySubmit/components/detail.tsx
View file @
50b6fdcd
import
React
,
{
Component
,
useEffect
,
useState
,
ReactNode
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Modal
,
Table
,
Tooltip
,
Input
,
Select
,
Button
,
Popconfirm
,
Card
,
Tag
,
Badge
,
Steps
,
Tabs
,
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
EyeOutlined
,
ClockCircleOutlined
,
UpOutlined
,
DownOutlined
,
StopOutlined
,
CheckSquareOutlined
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
EyePreview
from
'@/components/EyePreview'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
ConfirmModal
from
'./confirmModal'
import
{
history
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
moment
from
'moment'
import
style
from
'./index.less'
import
statuStyle
from
'../../common/colorTag'
const
{
Step
}
=
Steps
const
{
TabPane
}
=
Tabs
const
data
=
[
{
key
:
'1'
,
id
:
'1'
,
role
:
'采购商'
,
operation
:
'申请会员'
,
opTime
:
'2020-05-12 08:08'
,
suggest
:
''
,
status
:
2
,
},
];
interface
dataInfoType
{
status
:
any
;
digest
?:
any
;
logisticsOrderNo
:
string
;
companyName
:
string
;
invoicesTime
:
any
,
detailList
:
Array
<
any
>
,
logList
:
Array
<
any
>
,
totalCarton
:
number
,
totalVolume
:
number
,
totalWeight
:
number
,
freightPrice
:
number
,
settlementWay
:
string
}
const
detailInfo
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
let
[
isextraOption
,
setIsextraOption
]
=
useState
(
false
)
let
[
dataInfo
,
setdataInfo
]
=
useState
<
any
>
({
status
:
''
,
digest
:
''
,
logisticsOrderNo
:
''
,
companyName
:
''
,
invoicesTime
:
''
,
detailList
:
[],
logList
:
[],
totalCarton
:
0
,
totalVolume
:
0
,
totalWeight
:
0
,
freightPrice
:
0
,
settlementWay
:
''
})
const
[
id
,
setid
]
=
useState
(
history
.
location
.
query
.
id
)
let
[
visible
,
setvisible
]
=
useState
(
false
)
const
[
pagination
,
setPagination
]
=
useState
({
current
:
1
,
pageSize
:
10
})
const
[
detailData
,
setDetailData
]
=
useState
<
any
>
({
step
:
{
current
:
0
,
title
:
'外部流转'
,
items
:
[
{
title
:
'采购商'
,
desc
:
'提交需求单'
,
},
{
title
:
'平台'
,
desc
:
'审核需求单'
,
},
{
title
:
'供应商'
,
desc
:
'提交报价单'
,
},
{
title
:
'采购商'
,
desc
:
'确认报价单'
,
}
]
},
interiorStateStep
:
{
current
:
0
,
title
:
'内部流转'
,
items
:
[
{
title
:
'采购员'
,
desc
:
'新建需求单'
,
},
{
title
:
'采购经理'
,
desc
:
'审核需求单'
,
},
{
title
:
'副总经理'
,
desc
:
'审核报价单'
,
},
{
title
:
'采购员'
,
desc
:
'提交报价单'
,
},
{
title
:
'完成'
,
desc
:
''
}
]
}
})
const
infoTem
=
{
base
:
{
title
:
'交易条件'
,
leftElem
:
[
{
title
:
'交付日期'
,
key
:
'shipmentOrderNo'
,
value
:
dataInfo
.
shipmentOrderNo
},
{
title
:
'交付地址:'
,
key
:
''
,
value
:
dataInfo
.
invoicesNo
},
{
title
:
'物流要求'
,
key
:
''
,
value
:
dataInfo
.
invoicesNo
}
],
centerElem
:
[
{
title
:
'报价截至日期'
,
key
:
''
,
value
:
dataInfo
.
receiverName
},
{
title
:
'报价要求'
,
key
:
''
,
value
:
dataInfo
.
receiverFullAddress
},
{
title
:
'包装要求'
,
key
:
''
,
value
:
dataInfo
.
receiverFullAddress
},
],
rightElem
:
[
{
title
:
'付款方式'
,
key
:
''
,
value
:
dataInfo
.
shipperFullAddress
},
{
title
:
'税费要求'
,
key
:
''
,
value
:
dataInfo
.
shipperFullAddress
},
{
title
:
'其他要求'
,
key
:
''
,
value
:
dataInfo
.
shipperFullAddress
}
],
elem
:
[
]
},
freight
:
{
title
:
'运费'
,
leftElem
:
[
{
title
:
'运费:'
,
key
:
'freight'
,
value
:
dataInfo
.
freightPrice
},
{
title
:
'结算方式:'
,
key
:
''
,
value
:
dataInfo
.
settlementWay
}
]
}
}
const
columns1
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
key
:
'productId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
key
:
'productName'
,
width
:
240
},
{
title
:
'品类'
,
dataIndex
:
'categoryName'
,
align
:
'center'
,
key
:
'categoryName'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brandName'
,
align
:
'center'
,
key
:
'brandName'
,
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
,
key
:
'unitName'
,
},
{
title
:
'数量'
,
dataIndex
:
'amount'
,
align
:
'center'
,
key
:
'amount'
,
},
{
title
:
'箱数'
,
dataIndex
:
'carton'
,
align
:
'center'
,
key
:
'carton'
,
},
{
title
:
'重量 (KG)'
,
dataIndex
:
'weight'
,
align
:
'center'
,
key
:
'weight'
,
},
{
title
:
'体积 (M3)'
,
dataIndex
:
'volume'
,
align
:
'center'
,
key
:
'volume'
,
}
];
/**
* @description: 打开商品弹窗
* @param {type}
* @return {type}
*/
const
handleOpenModal
=
(
id
)
=>
{
}
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'商品规格型号'
,
dataIndex
:
'model'
,
key
:
'model'
,
align
:
'left'
,
render
:
(
text
:
any
,
records
:
any
)
=>
<
EyePreview
type=
"button"
handleClick=
{
()
=>
{
handleOpenModal
(
records
.
id
)
}
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
key
:
'brand'
,
align
:
'center'
},
// ...otherList,
{
title
:
'单位'
,
dataIndex
:
'purchaseNuit'
,
key
:
'purchaseNuit'
,
align
:
'center'
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseQuantity'
,
key
:
'purchaseQuantity'
,
align
:
'center'
}
]
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'operatorRoleId'
,
align
:
'center'
,
key
:
'operatorRoleId'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'operatorRoleName'
,
align
:
'center'
,
key
:
'operatorRoleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'left'
,
key
:
'status'
,
render
:
(
text
:
number
,
record
:
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
;
},
},
{
title
:
'操作'
,
dataIndex
:
'type'
,
align
:
'center'
,
key
:
'type'
,
render
:
(
text
:
number
,
record
:
any
)
=>
<>
{
text
===
1
?
'提交物流单'
:
'确认物流单'
}
</>
},
{
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
key
:
'operateTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</>
},
{
title
:
'审核意见'
,
dataIndex
:
'remark'
,
align
:
'center'
,
key
:
'remark'
,
width
:
300
},
];
//在这做逻辑判断 判断路由 是由哪个页面进来的
useEffect
(()
=>
{
let
pathname
=
history
.
location
.
pathname
const
id
=
history
.
location
.
query
.
id
setid
(
id
)
if
(
pathname
===
'/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil'
)
{
PublicApi
.
getLogisticsOrderSubmitGet
({
id
:
id
}).
then
(
res
=>
{
setdataInfo
(
res
.
data
)
let
current
=
0
if
(
res
.
data
.
status
<=
2
)
{
current
=
0
}
else
if
(
res
.
data
.
status
==
3
||
res
.
data
.
status
==
4
)
{
current
=
1
}
setDetailData
({
...
detailData
,
'step.current'
:
current
})
})
}
if
(
pathname
===
'/memberCenter/logisticsAbility/logisticsResult/orderResultDeatil'
)
{
PublicApi
.
getLogisticsOrderConfirmGet
({
id
:
id
}).
then
(
res
=>
{
setdataInfo
(
res
.
data
)
let
current
=
0
if
(
res
.
data
.
status
<=
2
)
{
current
=
0
}
else
if
(
res
.
data
.
status
==
3
||
res
.
data
.
status
==
4
)
{
current
=
1
}
setDetailData
({
...
detailData
,
'step.current'
:
current
})
})
}
//待确认物流单
if
(
pathname
===
'/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmDeatil'
)
{
PublicApi
.
getLogisticsOrderWaitConfirmGet
({
id
:
id
}).
then
(
res
=>
{
setdataInfo
(
res
.
data
)
let
current
=
0
if
(
res
.
data
.
status
==
1
)
{
current
=
0
}
else
if
(
res
.
data
.
status
==
2
)
{
current
=
0
setIsextraOption
(
true
)
}
else
if
(
res
.
data
.
status
==
3
||
res
.
data
.
status
==
4
)
{
current
=
1
}
setDetailData
({
...
detailData
,
'step.current'
:
current
})
})
}
return
()
=>
{
}
},
[])
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsOrderWaitSubmitPageOrderLog
({
...
params
,
orderId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
});
};
const
handleModalOK
=
()
=>
{
setvisible
(
false
)
ref
.
current
.
reload
()
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
window
.
history
.
back
()
}
title=
{
<>
<
div
className=
{
style
[
'headerTop'
]
}
>
<
div
className=
{
style
[
'headerTop-prefix'
]
}
>
单
</
div
>
<
div
className=
{
style
[
'headerTop-name'
]
}
>
物流单号:
{
dataInfo
.
logisticsOrderNo
}
</
div
>
<
div
className=
{
style
[
`levelIcon${'1'}`
]
}
></
div
>
</
div
>
</>
}
extra=
{
isextraOption
&&
<>
<
Button
onClick=
{
()
=>
setvisible
(
true
)
}
>
<
StopOutlined
/>
不接受物流单
</
Button
>
<
Button
onClick=
{
()
=>
setvisible
(
true
)
}
className=
{
style
[
'saveBtn'
]
}
>
<
CheckSquareOutlined
/>
接受物流单
</
Button
>
</>
}
content=
{
<
div
className=
{
style
[
'headerMain'
]
}
>
<
div
className=
{
style
[
'headerMain-left'
]
}
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
单据摘要:
</
div
>
<
div
>
{
dataInfo
.
digest
}
</
div
>
</
div
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
商品品类:
</
div
>
<
div
>
{
dataInfo
.
companyName
}
</
div
>
</
div
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
会员名称:
</
div
>
<
div
>
123
</
div
>
</
div
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
单据时间:
</
div
>
<
div
>
<
Tag
color=
"green"
>
{
moment
(
dataInfo
.
invoicesTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</
Tag
>
</
div
>
</
div
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
外部状态:
</
div
>
<
div
>
{
dataInfo
.
status
==
1
?
<><
span
style=
{
statuStyle
.
default
}
>
待提交
</
span
></>
:
dataInfo
.
status
==
2
?
<><
span
style=
{
statuStyle
.
confirm
}
>
待确认
</
span
></>
:
dataInfo
.
status
==
3
?
<><
span
style=
{
statuStyle
.
success
}
>
不接受物流单
</
span
></>
:
<><
span
style=
{
statuStyle
.
warn
}
>
接受物流单
</
span
></>
}
</
div
>
</
div
>
<
div
className=
{
style
[
'headerMain-left-option'
]
}
>
<
div
>
内部状态:
</
div
>
<
div
>
{
dataInfo
.
status
==
1
?
<><
span
style=
{
statuStyle
.
default
}
>
待提交
</
span
></>
:
dataInfo
.
status
==
2
?
<><
span
style=
{
statuStyle
.
confirm
}
>
待确认
</
span
></>
:
dataInfo
.
status
==
3
?
<><
span
style=
{
statuStyle
.
success
}
>
不接受物流单
</
span
></>
:
<><
span
style=
{
statuStyle
.
warn
}
>
接受物流单
</
span
></>
}
</
div
>
</
div
>
</
div
>
</
div
>
}
>
<
Row
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
Tabs
type=
"line"
defaultActiveKey=
'1'
>
<
TabPane
tab=
'外部流转'
key=
"1"
>
<
Steps
style=
{
{
padding
:
'34px 0'
}
}
progressDot
current=
{
detailData
.
step
.
current
}
>
{
detailData
.
step
.
items
.
map
((
item
,
index
)
=>
{
return
(
<
Step
key=
{
index
}
title=
{
item
.
title
}
description=
{
item
.
desc
}
/>
);
})
}
</
Steps
>
</
TabPane
>
<
TabPane
tab=
'内部流转'
key=
"2"
>
<
Steps
style=
{
{
padding
:
'34px 0'
}
}
progressDot
current=
{
detailData
.
interiorStateStep
.
current
}
>
{
detailData
.
interiorStateStep
.
items
.
map
((
item
,
index
)
=>
{
return
(
<
Step
key=
{
index
}
title=
{
item
.
title
}
description=
{
item
.
desc
}
/>
);
})
}
</
Steps
>
</
TabPane
>
</
Tabs
>
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
div
className=
{
style
[
'mainCol-title'
]
}
>
适合地市
</
div
>
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
div
className=
{
style
[
'mainCol-title'
]
}
>
采购商品
</
div
>
<
Table
dataSource=
{
dataInfo
.
detailList
}
columns=
{
equiryColumns
}
pagination=
{
false
}
/>
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
div
className=
{
style
[
'mainCol-title'
]
}
>
{
infoTem
[
'base'
].
title
}
</
div
>
<
div
className=
{
style
[
'mainCol-rows'
]
}
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
>
{
infoTem
[
'base'
].
leftElem
.
map
(
(
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
className=
{
style
[
'cols-main'
]
}
key=
{
index
}
>
<
div
className=
{
style
[
'cols-main-options'
]
}
style=
{
{
flex
:
'1.5 1'
}
}
>
{
item
.
title
}
</
div
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
<
Button
type=
'link'
>
{
item
.
value
}
</
Button
>
</
div
>
</
div
>
);
},
)
}
</
div
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
>
{
infoTem
[
'base'
].
centerElem
.
map
(
(
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
className=
{
style
[
'cols-main'
]
}
key=
{
index
}
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
title
}
</
div
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
</
div
>
</
div
>
);
},
)
}
</
div
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
>
{
infoTem
[
'base'
].
rightElem
.
map
(
(
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
className=
{
style
[
'cols-main'
]
}
key=
{
index
}
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
title
}
</
div
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
</
div
>
</
div
>
);
},
)
}
</
div
>
</
div
>
{
/* <div className={style['mainCol-row']}>
{infoTem['base'].elem.map((item: any, index: number) => {
return (
<div className={style['mainCol-row-col']} key={index}>
<div className={style['mainCol-row-col-option']}>
{item.title}
</div>
<div className={style['mainCol-row-col-option']}>
185 2929 6547
</div>
</div>
);
})}
</div> */
}
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
div
className=
{
style
[
'mainCol-title'
]
}
>
{
infoTem
[
'freight'
].
title
}
</
div
>
<
div
className=
{
style
[
'mainCol-rows'
]
}
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
>
{
infoTem
[
'freight'
].
leftElem
.
map
(
(
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
className=
{
style
[
'cols-main'
]
}
key=
{
index
}
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
title
}
</
div
>
{
item
.
key
===
'freight'
?
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
dataInfo
.
status
<
3
?
'未报价'
:
item
.
value
}
</
div
>
:
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
</
div
>
}
</
div
>
);
},
)
}
</
div
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
></
div
>
<
div
className=
{
style
[
'mainCol-rows-cols'
]
}
></
div
>
</
div
>
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
div
className=
{
style
[
'mainCol-title'
]
}
>
需求对接
</
div
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
currentRef=
{
ref
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
</
Col
>
<
Col
className=
{
style
[
'mainCol'
]
}
span=
{
24
}
>
<
Tabs
type=
"line"
defaultActiveKey=
'1'
>
<
TabPane
tab=
'外部流转记录'
key=
"1"
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
currentRef=
{
ref
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
</
TabPane
>
<
TabPane
tab=
'内部流转记录'
key=
"2"
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
}
}
currentRef=
{
ref
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
</
TabPane
>
</
Tabs
>
{
/* <Table dataSource={dataInfo.logList} columns={columns} pagination={pagination} /> */
}
</
Col
>
</
Row
>
<
ConfirmModal
id=
{
id
}
dialogVisible=
{
visible
}
onCancel=
{
()
=>
setvisible
(
false
)
}
onOK=
{
()
=>
handleModalOK
}
/>
</
PageHeaderWrapper
>
)
}
export
default
detailInfo
\ No newline at end of file
src/pages/transaction/enquirySubmit/components/enquiryListLever.tsx
0 → 100644
View file @
50b6fdcd
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-02 15:26:14
*/
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
}
from
'../../common/tableStatusList'
import
statuStyle
from
'../../common/colorTag'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
timeRange
}
from
'@/utils/index'
import
moment
from
'moment'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
enquierySchema
}
from
'../schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
values
,
action
}
from
'mobx'
;
export
interface
listParams
{
type
:
number
,
des
?:
string
}
const
formActions
=
createFormActions
();
const
fetchData
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderRequisitionFormAwaitList
(
params
);
return
res
.
data
}
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
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'需求单号'
,
key
:
'requisitionFormNo'
,
dataIndex
:
'requisitionFormNo'
,
align
:
'center'
},
{
title
:
'需求摘要'
,
key
:
'details'
,
dataIndex
:
'details'
,
align
:
'left'
},
{
title
:
'品类'
,
key
:
'category'
,
dataIndex
:
'category'
,
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'
,
render
:
(
text
:
any
,
reconds
)
=>
{
let
component
:
ReactNode
=
null
if
(
text
==
3
)
{
component
=
<><
span
style=
{
statuStyle
.
warn
}
>
审核不通过需求单
</
span
></>
}
else
if
(
text
==
1
)
{
component
=
<><
span
style=
{
statuStyle
.
default
}
>
待提交需求单
</
span
></>
}
return
component
}
},
{
title
:
'内部状态'
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
interiorState
(
text
)
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
align
:
'center'
,
render
:
(
_
:
any
,
record
:
any
)
=>
{
return
(
<>
<
Popconfirm
title=
"确定要审核吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
审核
</
Button
>
</
Popconfirm
>
</>
)
}
},
]
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
handleSubmitAll
=
(
ids
:
number
[])
=>
{
PublicApi
.
postOrderSubmitRequisitionFormAll
({
ids
:
ids
}).
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
menu
=
(
<
Menu
onClick=
{
()
=>
handleDelete
(
selectedRowKeys
)
}
>
<
Menu
.
Item
key=
'1'
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
</
Menu
>
)
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
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
批量审核通过
</
Button
>
</
Space
>
</
Col
>
</
Row
>
return
(
<
PageHeaderWrapper
>
<
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
)
}
}
expressionScope=
{
{
controllerBtns
}
}
schema=
{
enquierySchema
}
>
</
NiceForm
>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
List
\ No newline at end of file
src/pages/transaction/enquirySubmit/components/index.css
0 → 100644
View file @
50b6fdcd
.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
;
}
.select
:nth-last-of-type
(
1
)
{
margin-right
:
0
;
}
.mainCol
{
background-color
:
#fff
;
margin-bottom
:
24px
;
padding
:
0
24px
;
box-sizing
:
border-box
;
}
.mainCol-title
{
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#172B4D
;
padding
:
20px
0
;
}
.mainCol
:nth-last-of-type
(
1
)
{
margin
:
0
;
}
.mainCol-row
{
display
:
flex
;
flex-wrap
:
wrap
;
padding-bottom
:
16px
;
}
.mainCol-row-col
{
display
:
flex
;
width
:
calc
(
100%
/
3
);
padding
:
16px
0
;
}
.mainCol-row-col-option
{
flex
:
1
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#6B778C
;
}
.mainCol-row-col-option
:nth-last-of-type
(
1
)
{
flex
:
3
;
padding-right
:
20px
;
box-sizing
:
border-box
;
color
:
#172B4D
;
}
.mainCol-rows
{
display
:
flex
;
padding-bottom
:
16px
;
}
.mainCol-rows-cols
{
flex
:
1
;
}
.mainCol-rows-cols
.cols-main
{
display
:
flex
;
padding
:
16px
0
;
}
.mainCol-rows-cols
.cols-main
:nth-last-of-type
(
1
)
{
padding-bottom
:
0
;
}
.mainCol-rows-cols
.cols-main-options
{
flex
:
1
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#6B778C
;
}
.mainCol-rows-cols
.cols-main-options
:nth-last-of-type
(
1
)
{
flex
:
3
;
padding-right
:
20px
;
box-sizing
:
border-box
;
color
:
#172B4D
;
}
src/pages/transaction/enquirySubmit/components/index.less
0 → 100644
View file @
50b6fdcd
@import "../../../member/components/index.less";
.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/transaction/enquirySubmit/components/index.tsx
0 → 100644
View file @
50b6fdcd
/*
* @Author: LeeJiancong
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-02 19:44:31
*/
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
}
from
'../../common/tableStatusList'
import
statuStyle
from
'../../common/colorTag'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
timeRange
}
from
'@/utils/index'
import
moment
from
'moment'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
enquierySchema
}
from
'../schema'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
values
,
action
}
from
'mobx'
;
/**
* @description: 按页面来 type一级为1 二级为2
* @param {type}
* @return {type}
*/
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
)
=>
{
if
(
props
.
type
===
1
){
//一级
const
res
=
await
PublicApi
.
getOrderRequisitionFormAuditList
(
params
);
return
res
.
data
}
else
if
(
props
.
type
===
2
){
//二级
const
res
=
await
PublicApi
.
getOrderRequisitionFormAuditTwoList
(
params
);
return
res
.
data
}
// else{
// const res = await PublicApi.getOrderRequisitionFormAwaitList(params);
// return res.data
// }
}
/**
* @description:
* @param {type} 可以根据props.type处理
* @return {type}
*/
const
handleToDetail
=
(
id
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?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
:
'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'
,
render
:
(
text
:
any
,
reconds
)
=>
{
let
component
:
ReactNode
=
null
if
(
text
==
3
)
{
component
=
<><
span
style=
{
statuStyle
.
warn
}
>
审核不通过需求单
</
span
></>
}
else
if
(
text
==
1
)
{
component
=
<><
span
style=
{
statuStyle
.
default
}
>
待提交需求单
</
span
></>
}
return
component
}
},
{
title
:
'内部状态'
,
key
:
'interiorState'
,
dataIndex
:
'interiorState'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
interiorState
(
text
)
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
align
:
'center'
,
render
:
(
_
:
any
,
record
:
any
)
=>
{
return
(
<>
{
(
props
.
type
===
1
||
props
.
type
===
2
)
?
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
审核
</
Button
>
:
<>
{
(
record
.
interiorState
!==
3
&&
<
Button
type=
"link"
onClick=
{
()
=>
toEdit
(
record
.
id
)
}
>
编辑
</
Button
>
)
}
{
(
record
.
externalState
===
1
&&
record
.
interiorState
===
1
)
&&
<>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
([
record
.
id
])
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
<
Popconfirm
title=
"确定要提交吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
>
提交
</
Button
>
</
Popconfirm
>
</>
}
</>
}
</>
)
}
},
]
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
handleSubmitAll
=
(
ids
:
number
[])
=>
{
if
(
ids
.
length
===
0
){
return
}
PublicApi
.
postOrderSubmitRequisitionFormAll
({
ids
:
ids
}).
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
menu
=
(
<
Menu
onClick=
{
()
=>
handleDelete
(
selectedRowKeys
)
}
>
<
Menu
.
Item
key=
'1'
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
</
Menu
.
Item
>
</
Menu
>
)
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
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
{
(
props
.
type
!==
1
&&
props
.
type
!==
2
)
&&
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/enquirySubmit/addEnquiry'
)
}
icon=
{
<
PlusOutlined
/>
}
>
新建
</
Button
>
}
<
Button
onClick=
{
()
=>
handleSubmitAll
(
selectedRowKeys
)
}
>
批量提交审核
</
Button
>
{
(
props
.
type
!==
1
&&
props
.
type
!==
2
)
&&
<>
<
Dropdown
.
Button
overlay=
{
menu
}
trigger=
{
[
'click'
]
}
icon=
{
<
DownOutlined
/>
}
>
更多
</
Dropdown
.
Button
>
</>
}
</
Space
>
</
Col
>
</
Row
>
return
(
<
PageHeaderWrapper
>
<
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
)
}
}
expressionScope=
{
{
controllerBtns
}
}
schema=
{
enquierySchema
}
>
</
NiceForm
>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
List
\ No newline at end of file
src/pages/transaction/enquirySubmit/enquiryOne/index.tsx
0 → 100644
View file @
50b6fdcd
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/transaction/enquirySubmit/enquiryTwo/index.tsx
0 → 100644
View file @
50b6fdcd
import
React
,
{
Component
}
from
'react'
import
OrderList
from
"../components/index"
const
List
=
()
=>
{
return
(
<
OrderList
des=
'待审核报价单(二级)'
type=
{
2
}
/>
)
}
export
default
List
\ No newline at end of file
src/pages/transaction/enquirySubmit/toSubmit/baseForm.tsx
→
src/pages/transaction/enquirySubmit/to
Add
Submit/baseForm.tsx
View file @
50b6fdcd
File moved
src/pages/transaction/enquirySubmit/toSubmit/detail.tsx
→
src/pages/transaction/enquirySubmit/to
Add
Submit/detail.tsx
View file @
50b6fdcd
...
...
@@ -3,6 +3,7 @@ import ReactDOM from 'react-dom'
import
{
FormSpy
,
SchemaForm
,
ISchema
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormButtonGroup
,
...
...
@@ -27,8 +28,10 @@ import { getAuth} from '@/utils/auth'
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./templateForm.less'
;
import
ReutrnEle
from
'@/components/ReturnEle'
import
ModalTable
from
'@/components/ModalTable'
import
RroductModal
from
'../components/productModal'
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PageStatus
,
usePageStatus
}
from
'@/hooks/usePageStatus'
import
statuStyle
from
'../../common/colorTag'
import
{
interiorState
}
from
'../../common/tableStatusList'
...
...
@@ -67,14 +70,24 @@ interface AreaParams {
cityCode
:
any
;
cityName
:
any
;
}
const
fetchMemberList
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getMemberManageLowerProviderPage
(
params
)
return
res
.
data
}
const
init
=
{
deliveryTime
:
''
}
const
Detail
:
React
.
FC
<
{}
>
=
()
=>
{
const
headerTitle
=
'需求单'
const
[
tabForm
]
=
Form
.
useForm
()
const
{
pageStatus
,
id
}
=
usePageStatus
()
//PageStatus:{0: "ADD", 1: "EDIT", 2: "PREVIEW", ADD: 0, EDIT: 1, PREVIEW: 2}0: "ADD"1: "EDIT"2: "PREVIEW"ADD: 0EDIT: 1PREVIEW: 2} 1
let
_title
=
pageStatus
===
PageStatus
.
PREVIEW
?
'查看'
:
id
?
'编辑'
:
'新建'
const
headerTitle
=
(
`
${
_title
}
需求单`
)
const
[
initialValues
,
setinitialValues
]
=
useState
<
any
>
({
details
:
''
,
addresId
:
null
,
...
...
@@ -89,10 +102,13 @@ const Detail: React.FC<{}> = () => {
voucherTime
:
''
,
requisitionFormAddress
:[]
//地市
})
const
[
menberList2
,
setmenberList2
]
=
useState
([])
const
[
requisitionFormAddress
,
setrequisitionFormAddress
]
=
useState
([])
//地市多项回显用
const
[
customerCategoryId
,
setcustomerCategoryId
]
=
useState
<
any
>
([])
//品类
const
[
selectRow
,
setSelectRow
]
=
useState
([])
//需求单用
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
number
>>
([])
//需求单
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'memberId'
})
const
[
visibleChannelMember
,
setVisibleChannelMember
]
=
useState
(
false
)
const
[
categoryId
,
setcategoryId
]
=
useState
(
null
)
//选择的分类id
const
[
otherList
,
setotherList
]
=
useState
([])
//动态tab循环
const
[
dockingList
,
setdockingList
]
=
useState
([])
//需求列表
...
...
@@ -110,7 +126,51 @@ const Detail: React.FC<{}> = () => {
const
[
memberType
,
setmemberType
]
=
useState
(
1
)
const
{
ProductStore
}
=
store
const
{
setAreaOption
,
productInfoByEdit
,
getBasicFormParamsByEdit
,
setAttributeLists
,
setProductName
}
=
ProductStore
const
columnsSetMember
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
align
:
'center'
,
key
:
'memberTypeName'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
align
:
'center'
,
key
:
'levelTag'
,
}
]
const
menberList
=
[
{
memberId
:
1
,
name
:
'名称1'
,
roleName
:
'角色1'
,
memberTypeName
:
'采购商'
,
levelTag
:
'青铜'
}
]
const
FormSumbit
=
(
values
:
any
)
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
...
...
@@ -249,7 +309,29 @@ const Detail: React.FC<{}> = () => {
align
:
'center'
}
]
const
formSearch
:
ISchema
=
{
type
:
'object'
,
properties
:
{
name
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
"x-component-props"
:
{
placeholder
:
'请输入会员名称'
}
}
}
}
const
handleCancelAddMember
=
()
=>
{
setVisibleChannelMember
(
false
)
}
// 会员添加弹窗控制
const
handleOkAddMember
=
()
=>
{
setVisibleChannelMember
(
false
)
setproductSource
(
memberRowCtl
.
selectRow
)
console
.
log
(
'memberRowCtl.selectRow'
,
memberRowCtl
.
selectRow
)
}
const
[
pagination
,
setPagination
]
=
useState
({
current
:
1
,
pageSize
:
10
...
...
@@ -262,7 +344,7 @@ const Detail: React.FC<{}> = () => {
)
/**
* @description: 操作
* @param {type} 1添加商品
* @param {type} 1添加商品
2选择会员
* @return {type}
*/
const
handleOptionBtn
=
(
type
:
any
)
=>
{
...
...
@@ -270,9 +352,14 @@ const Detail: React.FC<{}> = () => {
case
1
:
setdialogVisible
(
true
)
break
;
case
2
:
setVisibleChannelMember
(
true
)
break
;
}
}
useEffect
(()
=>
{
setmenberList2
(
menberList
)
PublicApi
.
getProductPlatformGetCategoryTree
({
rootNodeId
:
null
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
...
...
@@ -327,6 +414,7 @@ const Detail: React.FC<{}> = () => {
if
(
res
.
code
===
1000
){
let
data
=
res
.
data
let
areaCodeList
=
[]
setplatType
(
data
.
type
)
if
(
data
.
requisitionFormAddress
){
data
.
requisitionFormAddress
.
forEach
((
v
)
=>
{
areaCodeList
.
push
([
v
.
provinceCode
,
v
.
cityCode
])
...
...
@@ -969,8 +1057,25 @@ const Detail: React.FC<{}> = () => {
onOK=
{
(
values
:
any
)
=>
handleSubmit
(
values
)
}
onCancel=
{
()
=>
setdialogVisible
(
false
)
}
>
</
RroductModal
>
<
ModalTable
modalTitle=
'选择会员'
confirm=
{
handleOkAddMember
}
cancel=
{
handleCancelAddMember
}
visible=
{
visibleChannelMember
}
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
formilyProps=
{
{
ctx
:
{
schema
:
formSearch
}
}
}
tableProps=
{
{
rowKey
:
'memberId'
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
...
...
src/pages/transaction/enquirySubmit/toSubmit/detailFormColumnType.ts
→
src/pages/transaction/enquirySubmit/to
Add
Submit/detailFormColumnType.ts
View file @
50b6fdcd
File moved
src/pages/transaction/enquirySubmit/toSubmit/index.tsx
→
src/pages/transaction/enquirySubmit/to
Add
Submit/index.tsx
View file @
50b6fdcd
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-0
8-31 19:49:0
9
* @LastEditTime: 2020-0
9-02 14:40:3
9
*/
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
...
...
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