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
shenshaokai
jinfa-platform
Commits
d2b27c0d
Commit
d2b27c0d
authored
May 10, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 采购竞价&在线竞价 接入接口,添加部分逻辑
parent
4ab0ac71
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
104 additions
and
56 deletions
+104
-56
index.tsx
...mponents/detail/components/progressCommonLayout/index.tsx
+1
-1
index.tsx
.../transaction/purchaseAbility/onlineBid/readyBid/index.tsx
+3
-12
index.tsx
...ansaction/purchaseAbility/onlineBid/readySignUp/index.tsx
+8
-13
index.tsx
...es/transaction/purchaseAbility/onlineBid/search/index.tsx
+2
-0
add.tsx
.../transaction/purchaseAbility/purchaseBid/readyAdd/add.tsx
+2
-0
bidRequirement.tsx
...bility/purchaseBid/readyAdd/components/bidRequirement.tsx
+20
-14
bidRules.tsx
...chaseAbility/purchaseBid/readyAdd/components/bidRules.tsx
+11
-5
index.tsx
...action/purchaseAbility/purchaseBid/readyConfirm/index.tsx
+1
-1
index.tsx
...rchaseAbility/purchaseBid/readyExamineResultOne/index.tsx
+1
-1
index.tsx
...rchaseAbility/purchaseBid/readyExamineResultTwo/index.tsx
+1
-1
index.tsx
.../purchaseAbility/purchaseBid/readyExamineSignUp/index.tsx
+7
-1
index.tsx
...aseAbility/purchaseBid/readySubmitExamineResult/index.tsx
+2
-2
detail.tsx
...transaction/purchaseAbility/purchaseBid/search/detail.tsx
+45
-5
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/progressCommonLayout/index.tsx
View file @
d2b27c0d
...
...
@@ -33,7 +33,7 @@ const ProgressLayout: React.FC<ProgressProps> = (props: any) => {
<
Steps
progressDot
>
{
logStatesItem
&&
logStatesItem
.
logs
.
map
(
item
=>
(
{
logStatesItem
&&
logStatesItem
.
logs
?
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
roleName
}
...
...
src/pages/transaction/purchaseAbility/onlineBid/readyBid/index.tsx
View file @
d2b27c0d
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Button
,
Tag
,
Badge
,
Typography
,
Space
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
...
...
@@ -44,7 +44,7 @@ const ReadyBid = () => {
dataIndex
:
'createMemberName'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/
memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo
}`
}
>
{
text
}
</
EyePreview
>
url=
{
`/
shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))
}`
}
>
{
text
}
</
EyePreview
>
)
},
{
title
:
'竞价开始/结束时间'
,
...
...
@@ -79,16 +79,7 @@ const ReadyBid = () => {
key
:
'operate'
,
dataIndex
:
'operate'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
<>
<
Button
onClick=
{
()
=>
history
.
push
(
`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`
)
}
type=
'link'
>
开始竞价
</
Button
>
</>
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Link
to=
{
`/memberCenter/procurementAbility/onlineBid/readyBid/detail?id=${record.id}&number=${record.biddingNo}`
}
>
开始竞价
</
Link
>
}];
return
(
...
...
src/pages/transaction/purchaseAbility/onlineBid/readySignUp/index.tsx
View file @
d2b27c0d
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Button
,
Tag
,
Badge
,
Typography
,
Space
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
...
...
@@ -43,8 +43,7 @@ const ReadySignUp = () => {
key
:
'createMemberName'
,
dataIndex
:
'createMemberName'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/procurementAbility/onlineBid/search/detail?id=${record.id}&number=${record.biddingNo}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`
}
>
{
text
}
</
EyePreview
>
)
},
{
title
:
'竞价开始/结束时间'
,
...
...
@@ -79,16 +78,12 @@ const ReadySignUp = () => {
key
:
'operate'
,
dataIndex
:
'operate'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
<>
<
Button
onClick=
{
()
=>
history
.
push
(
`/shop?shopId=${btoa(JSON.stringify({ shopId: record.memberShopId, memberId: record.memberId }))}`
)
}
type=
'link'
>
报名
</
Button
>
</>
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/procurementAbility/onlineBid/readySignUp/signUp?id=${record.id}&number=${record.biddingNo}`
)}
}
type=
'link'
>
报名
</
Button
>
}];
return
(
...
...
src/pages/transaction/purchaseAbility/onlineBid/search/index.tsx
View file @
d2b27c0d
...
...
@@ -86,6 +86,8 @@ const Search = () => {
columns=
{
columns
}
effects=
"biddingNo"
fetch=
{
PublicApi
.
getPurchaseOnlineBiddingList
}
externalStatusFetch=
{
PublicApi
.
getPurchaseBiddingExternalStatus
}
interiorStatusFetch=
{
PublicApi
.
getPurchaseOnlineBiddingInteriorStatus
}
reload=
{
ref
}
/>
</>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/add.tsx
View file @
d2b27c0d
...
...
@@ -229,6 +229,7 @@ const AddForm = () => {
currentRef=
{
currentRules
}
fetchdata=
{
rules
}
onBadge=
{
getError
}
exRef=
{
currentRequirement
}
/>
</
TabPane
>
{
/* 报名要求 */
}
...
...
@@ -237,6 +238,7 @@ const AddForm = () => {
currentRef=
{
currentRequirement
}
fetchdata=
{
requirement
}
onBadge=
{
getError
}
exRef=
{
currentRules
}
/>
</
TabPane
>
{
/* 交易条件 */
}
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/bidRequirement.tsx
View file @
d2b27c0d
...
...
@@ -32,11 +32,12 @@ const layout: any = {
interface
Iprops
{
currentRef
:
any
,
fetchdata
:
GetPurchasePurchaseInquiryDetailsResponse
,
onBadge
?:
Function
onBadge
?:
Function
,
exRef
:
any
}
const
BidRequirement
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
{
currentRef
,
fetchdata
,
onBadge
}
=
props
;
const
{
currentRef
,
fetchdata
,
onBadge
,
exRef
}
=
props
;
const
[
files
,
setFiles
]
=
useState
<
any
>
([]);
const
[
loading
,
setloading
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -62,18 +63,19 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
onBadge
(
error
.
errorFields
.
length
,
3
)
}
})
})
}),
signUpTime
:
()
=>
form
.
getFieldValue
(
'signUpTime'
)
}
})
useEffect
(()
=>
{
fetchdata
.
demandUrls
&&
setFiles
([...
fetchdata
.
demandUrls
])
form
.
setFieldsValue
({
signUpTime
:
[
fetchdata
.
startSignUp
?
moment
(
fetchdata
.
startSignUp
)
:
''
,
fetchdata
.
endSignUp
?
moment
(
fetchdata
.
endSignUp
)
:
''
],
demand
:
fetchdata
.
demand
,
demandUrls
:
fetchdata
.
demandUrls
signUpTime
:
[
fetchdata
.
startSignUp
?
moment
(
fetchdata
.
startSignUp
)
:
''
,
fetchdata
.
endSignUp
?
moment
(
fetchdata
.
endSignUp
)
:
''
],
demand
:
fetchdata
.
demand
,
demandUrls
:
fetchdata
.
demandUrls
})
},[
fetchdata
])
},
[
fetchdata
])
/**判断文件类型和大小 */
const
beforeDocUpload
=
(
file
:
any
)
=>
{
...
...
@@ -97,7 +99,7 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
}
}
setFiles
([...
arr
])
form
.
setFieldsValue
({
demandUrls
:
[...
arr
]
})
form
.
setFieldsValue
({
demandUrls
:
[...
arr
]
})
}
// 删除附件
...
...
@@ -105,9 +107,9 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
const
arr
=
[...
files
];
arr
.
splice
(
index
,
1
);
setFiles
(
arr
);
form
.
setFieldsValue
({
demandUrls
:
[...
arr
]
})
form
.
setFieldsValue
({
demandUrls
:
[...
arr
]
})
}
return
(
<>
...
...
@@ -121,7 +123,11 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
name=
'signUpTime'
rules=
{
[
{
required
:
true
,
message
:
'请选择报名要求时间'
},
()
=>
({
validator
(
_
,
value
)
{
async
validator
(
_
,
value
)
{
let
_exVal
=
await
exRef
.
current
.
biddingTime
();
if
(
_exVal
[
0
]
&&
moment
(
value
[
1
]).
isAfter
(
_exVal
[
0
]))
{
return
Promise
.
reject
(
new
Error
(
'报名结束需要早于竞价开始时间'
));
}
if
(
!
value
[
0
]
||
!
value
[
1
])
{
return
Promise
.
reject
(
new
Error
(
'请选择报名要求时间'
));
}
else
{
...
...
@@ -131,9 +137,9 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
})
]
}
>
<
DatePicker
.
RangePicker
showTime
format=
"YYYY-MM-DD HH:mm:ss"
<
DatePicker
.
RangePicker
showTime
format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
{
[
'开始时间'
,
'结束时间'
]
}
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
moment
().
startOf
(
'second'
)
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/bidRules.tsx
View file @
d2b27c0d
...
...
@@ -30,11 +30,12 @@ const layout: any = {
interface
Iprops
{
currentRef
:
any
,
fetchdata
:
GetPurchasePurchaseInquiryDetailsResponse
,
onBadge
?:
Function
onBadge
?:
Function
,
exRef
:
any
}
const
BidRules
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
{
currentRef
,
fetchdata
,
onBadge
}
=
props
;
const
{
currentRef
,
fetchdata
,
onBadge
,
exRef
}
=
props
;
const
[
isStartingPrice
,
setIsStartingPrice
]
=
useState
<
boolean
>
(
true
)
const
[
isTargetPrice
,
setIsTargetPrice
]
=
useState
<
boolean
>
(
true
)
const
[
isMinPrice
,
setIsMinPrice
]
=
useState
<
boolean
>
(
true
)
...
...
@@ -69,7 +70,8 @@ const BidRules: React.FC<Iprops> = (props: any) => {
onBadge
(
error
.
errorFields
.
length
,
2
)
}
})
})
}),
biddingTime
:
()
=>
form
.
getFieldValue
(
'biddingTime'
)
}
})
...
...
@@ -111,8 +113,12 @@ const BidRules: React.FC<Iprops> = (props: any) => {
label=
'竞价时间'
name=
'biddingTime'
rules=
{
[
{
required
:
true
,
message
:
'请选择竞价时间'
},
()
=>
({
validator
(
_
,
value
)
{
{
required
:
true
,
message
:
'请选择竞价时间'
},
()
=>
({
async
validator
(
_
,
value
)
{
let
_exVal
=
await
exRef
.
current
.
signUpTime
();
if
(
_exVal
[
1
]
&&
moment
(
value
[
0
]).
isBefore
(
_exVal
[
1
]))
{
return
Promise
.
reject
(
new
Error
(
'竞价开始时间需要晚于报名截止时间'
));
}
if
(
!
value
[
0
]
||
!
value
[
1
])
{
return
Promise
.
reject
(
new
Error
(
'请选择竞价时间'
));
}
else
{
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyConfirm/index.tsx
View file @
d2b27c0d
...
...
@@ -92,7 +92,7 @@ const ReadyConfirm = () => {
schemaType=
"PURCHASEBIDOSIGNUP_SCHEMA"
columns=
{
columns
}
effects=
"biddingNo"
fetch=
{
PublicApi
.
getPurchase
QuotedPriceAdd
List
}
fetch=
{
PublicApi
.
getPurchase
BiddingStayConfirmBidding
List
}
/>
<
ConfirmBidResultModal
record=
{
confirmRecord
}
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyExamineResultOne/index.tsx
View file @
d2b27c0d
...
...
@@ -102,7 +102,7 @@ const ReadyExamineResultOne = () => {
schemaType=
"PURCHASEBIDREADYADD_SCHEMA"
columns=
{
columns
}
effects=
"biddingNo"
fetch=
{
PublicApi
.
getPurchaseBiddingStay
ExamineList2
}
fetch=
{
PublicApi
.
getPurchaseBiddingStay
SubmitBiddingList1
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
24
}
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyExamineResultTwo/index.tsx
View file @
d2b27c0d
...
...
@@ -103,7 +103,7 @@ const ReadyExamineResultTwo = () => {
schemaType=
"PURCHASEBIDREADYADD_SCHEMA"
columns=
{
columns
}
effects=
"biddingNo"
fetch=
{
PublicApi
.
getPurchase
QuotedPriceAddList
}
fetch=
{
PublicApi
.
getPurchase
BiddingStaySubmitBiddingList2
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
24
}
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyExamineSignUp/index.tsx
View file @
d2b27c0d
...
...
@@ -35,7 +35,7 @@ const ReadyExamineSignUp = () => {
dataIndex
:
'biddingNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/purchaseBid/readyExamineSignUp/detail?id=${record.
id}&number=${text
}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/purchaseBid/readyExamineSignUp/detail?id=${record.
biddingId}&number=${text}&signUpId=${record.id
}`
}
>
{
text
}
</
EyePreview
>
<
Text
type=
'secondary'
>
{
record
.
details
}
</
Text
>
</
Space
>
)
...
...
@@ -87,6 +87,11 @@ const ReadyExamineSignUp = () => {
setVisible
(
!
visible
);
}
const
handleSubmit
=
()
=>
{
setVisible
(
false
);
ref
.
current
.
reload
();
}
return
(
<>
<
Table
...
...
@@ -102,6 +107,7 @@ const ReadyExamineSignUp = () => {
modalType=
"audit"
visible=
{
visible
}
fetch=
{
PublicApi
.
postPurchaseBiddingExaminBiddingSignup
}
onOk=
{
()
=>
handleSubmit
()
}
onCancel=
{
()
=>
setVisible
(
false
)
}
/>
</>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readySubmitExamineResult/index.tsx
View file @
d2b27c0d
...
...
@@ -105,7 +105,7 @@ const ReadySubmitExamineResult = () => {
schemaType=
"PURCHASEBIDREADYADD_SCHEMA"
columns=
{
columns
}
effects=
"biddingNo"
fetch=
{
PublicApi
.
getPurchase
QuotedPriceAdd
List
}
fetch=
{
PublicApi
.
getPurchase
BiddingStaySubmitBidding
List
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
24
}
>
...
...
@@ -115,7 +115,7 @@ const ReadySubmitExamineResult = () => {
disabled=
{
rowkeys
.
length
===
0
}
>
批量提交
</
Button
>
</
Button
>
</
Space
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/search/detail.tsx
View file @
d2b27c0d
...
...
@@ -36,8 +36,9 @@ const TABLINK = [
{
id
:
'basicLayout'
,
title
:
'基本信息'
},
{
id
:
'materialLayout'
,
title
:
'采购物料'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineOne'
,
'readyExamineTwo'
,
'readySubmit'
]
},
{
id
:
'bidRulesLayout'
,
title
:
'竞价规则'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineOne'
,
'readyExamineTwo'
,
'readySubmit'
]
},
{
id
:
'signUpLayout'
,
title
:
'报名要求'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineOne'
,
'readyExamineTwo'
,
'readySubmit'
]
},
{
id
:
'signUpMsgLayout'
,
title
:
'报名信息'
,
include
:
[
'search'
,
'readyAdd'
]
},
{
id
:
'signUpLayout'
,
title
:
'报名要求'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineOne'
,
'readyExamineTwo'
,
'readySubmit'
,
'readyExamineSignUp'
]
},
{
id
:
'signUpMsgLayout'
,
title
:
'报名信息'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineSignUp'
]
},
{
id
:
'signUpFileLayout'
,
title
:
'报名文件'
,
include
:
[
'readyExamineSignUp'
]
},
{
id
:
'conditionLayout'
,
title
:
'交易条件'
,
include
:
[
'search'
,
'readyAdd'
,
'readyExamineOne'
,
'readyExamineTwo'
,
'readySubmit'
]
},
{
id
:
'fileLayout'
,
title
:
'附件'
,
include
:
[
'search'
,
'readyAdd'
]
},
{
id
:
'demandLayout'
,
title
:
'需求对接'
,
include
:
[
'search'
,
'readyAdd'
]
},
...
...
@@ -49,7 +50,8 @@ const SearchDetail = () => {
const
{
query
:
{
id
,
number
number
,
signUpId
//报名ID
},
pathname
,
}
=
history
.
location
;
...
...
@@ -95,10 +97,10 @@ const SearchDetail = () => {
const
handleProgressEffect
=
(
data
:
any
)
=>
{
let
_list
=
[{
title
:
'外部流转'
,
state
:
1
,
logs
:
data
.
externalLogStates
}];
if
(
pathPci
!==
'readyExamineSignUp'
)
{
if
(
pathPci
!==
'readyExamineSignUp'
)
{
_list
.
push
({
title
:
'内部流转'
,
state
:
2
,
logs
:
data
.
interiorLogStates
});
}
if
(
pathPci
===
'search'
)
{
if
(
pathPci
===
'search'
)
{
_list
.
push
({
title
:
'竞价结果内部流转'
,
state
:
3
,
logs
:
data
.
examineInteriorLogStates
});
}
setProgressEffect
(
_list
);
...
...
@@ -390,6 +392,7 @@ const SearchDetail = () => {
case
'readyExamineOne'
:
case
'readyExamineTwo'
:
case
'readySubmit'
:
case
'readyExamineSignUp'
:
return
(<
BidCommonLayout
layoutId=
"signUpLayout"
title=
"报名要求"
effect=
{
signUpEffect
}
/>)
default
:
return
null
;
...
...
@@ -401,6 +404,43 @@ const SearchDetail = () => {
case
'search'
:
case
'readyAdd'
:
return
(<
BidCommonLayout
layoutId=
"signUpMsgLayout"
title=
"报名信息"
layoutType=
'msg'
effect=
{
dataSource
.
sginUpInfos
||
[]
}
/>)
case
'readyExamineSignUp'
:
let
_data
:
any
=
{};
for
(
let
key
in
dataSource
.
sginUpInfos
){
if
(
dataSource
.
sginUpInfos
[
key
].
id
=
signUpId
){
_data
=
dataSource
.
sginUpInfos
[
key
];
}
}
return
(
<>
<
BidCommonLayout
layoutId=
"signUpMsgLayout"
title=
"报名信息"
effect=
{
[
{
col
:
[
{
label
:
'报名会员'
,
extra
:
_data
.
memberName
,
type
:
'text'
},
{
label
:
'联系人姓名'
,
extra
:
_data
.
contacts
,
type
:
'text'
},
]
},
{
col
:
[
{
label
:
'联系人手机'
,
extra
:
`+${_data.telPrefix} ${_data.tel}`
,
type
:
'text'
},
{
label
:
'电子邮箱'
,
extra
:
_data
.
mail
,
type
:
'text'
},
]
},
{
col
:
[
{
label
:
'单位地址'
,
extra
:
_data
.
address
,
type
:
'text'
},
]
}
]
}
/>
<
BidCommonLayout
layoutId=
"signUpFileLayout"
title=
"报名文件"
effect=
{
[
{
col
:
[
{
label
:
'报名文件'
,
extra
:
_data
.
enclosureUrls
,
type
:
'files'
},
]
}
]
}
/>
</>
)
default
:
return
null
;
}
...
...
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