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
linweijiong
jinfa-platform
Commits
fa0269a0
Commit
fa0269a0
authored
Apr 15, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修复确认报价bug
parent
2e4cdf89
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
27 deletions
+104
-27
index.tsx
...lity/components/detail/components/contrastLyout/index.tsx
+32
-10
index.tsx
...saction/purchaseAbility/components/modalOperate/index.tsx
+1
-1
index.ts
src/pages/transaction/purchaseAbility/constants/index.ts
+32
-1
add.tsx
...action/purchaseAbility/purchaseInquiry/addInquiry/add.tsx
+4
-3
demand.tsx
...eAbility/purchaseInquiry/addInquiry/components/demand.tsx
+22
-7
selectMenber.tsx
...Ability/purchaseInquiry/addInquiry/modal/selectMenber.tsx
+10
-2
index.ts
src/pages/transaction/purchaseAbility/schema/index.ts
+3
-3
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/contrastLyout/index.tsx
View file @
fa0269a0
...
...
@@ -12,6 +12,7 @@ import BidTable from '../bidTable';
import
{
Context
,
BidDetailContext
}
from
'../context'
;
import
{
useBidTable
}
from
'../../../effects/useBidTable'
;
import
{
FilePdfOutlined
}
from
'@ant-design/icons'
;
import
ModalOperate
from
'../../../modalOperate'
;
export
interface
ContrastProps
{
effect
?:
any
,
...
...
@@ -34,6 +35,11 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
ctl
:
{
setDataSource
}
}
}
=
useBidTable
();
const
context
=
useContext
(
Context
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
);
const
[
type
,
setType
]
=
useState
<
string
>
(
''
);
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
format
=
(
text
)
=>
{
return
<>
{
moment
(
text
).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
...
...
@@ -44,7 +50,8 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
dataIndex
:
'quotedPriceNo'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
direction=
'vertical'
>
<
EyePreview
url=
{
`/memberCenter/procurementAbility/confirmOffer/quote/detail?id=${record.id}&number=${record.quotedPriceNo}`
}
>
{
text
}
</
EyePreview
>
{
context
.
priceContrast
===
PRICECONTRAST_TYPE
.
UNENCRYPTED
&&
<
EyePreview
url=
{
`/memberCenter/procurementAbility/confirmOffer/quote/detail?id=${record.id}&number=${record.quotedPriceNo}`
}
>
{
text
}
</
EyePreview
>
}
{
context
.
priceContrast
===
PRICECONTRAST_TYPE
.
UNDECRYPTED
&&
<
Typography
.
Text
type=
'success'
>
{
text
}
</
Typography
.
Text
>
}
<
Typography
.
Text
>
{
record
.
details
}
</
Typography
.
Text
>
</
Space
>
)
...
...
@@ -87,9 +94,6 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
)
},
]
const
context
=
useContext
(
Context
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
);
const
fetchTableData
=
(
params
:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
...
...
@@ -164,7 +168,7 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
id
,
turn
}
PublicApi
.
getPurchaseConfirmQuotedPriceRightOffContrastPrice
(
params
).
then
((
res
:
any
)
=>
{
PublicApi
.
getPurchaseConfirmQuotedPriceRightOffContrastPrice
(
{...
params
},
{
ctrlType
:
'none'
}
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
if
(
data
.
length
>
0
)
{
...
...
@@ -192,10 +196,17 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
useEffect
(()
=>
{
if
(
preview
&&
Object
.
keys
(
context
).
length
>
0
)
{
atonceContrast
()
if
(
context
.
priceContrast
===
PRICECONTRAST_TYPE
.
UNENCRYPTED
)
{
atonceContrast
()
}
}
},
[
context
])
const
handleSubmit
=
(
type
:
string
)
=>
{
setVisible
(
true
)
setType
(
type
)
}
return
(
<
BidDetailContext
.
Provider
value=
{
dataSource
}
>
<
Card
...
...
@@ -204,11 +215,11 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
extra=
{
preview
?
null
:
<
Space
>
<
Button
onClick=
{
()
=>
h
istory
.
goBack
(
)
}
>
发起下轮报价
</
Button
>
<
Button
onClick=
{
()
=>
h
andleSubmit
(
'next'
)
}
>
发起下轮报价
</
Button
>
{
context
.
priceContrast
===
PRICECONTRAST_TYPE
.
UNDECRYPTED
&&
<
Button
>
<
Button
onClick=
{
()
=>
handleSubmit
(
'key'
)
}
>
解密报价单
</
Button
>
}
</
Button
>
}
<
Button
type=
'primary'
disabled=
{
disabled
}
...
...
@@ -276,7 +287,18 @@ const ContrastLyout: React.FC<ContrastProps> = (props: any) => {
</
Col
>
</
Row
>
}
<
ModalOperate
id=
{
id
}
title=
{
type
===
'next'
?
'调整下轮报价时间'
:
'输入密匙'
}
modalType=
{
type
===
'next'
?
'next'
:
'key'
}
visible=
{
visible
}
fetch=
{
type
===
'next'
?
PublicApi
.
postPurchaseConfirmQuotedPriceLaunchTurnQuotedPrice
:
PublicApi
.
postPurchaseConfirmQuotedPriceDecryptQuotedPrice
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onOk=
{
()
=>
history
.
goBack
()
}
/>
</
Card
>
</
BidDetailContext
.
Provider
>
)
...
...
src/pages/transaction/purchaseAbility/components/modalOperate/index.tsx
View file @
fa0269a0
...
...
@@ -139,7 +139,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
if
(
modalType
===
'next'
)
{
actions
.
setFieldValue
(
'quotedPriceTime'
,
moment
().
format
())
}
},
[])
},
[
visible
])
const
handleSubmit
=
(
val
:
any
)
=>
{
let
value
=
{
...
val
}
...
...
src/pages/transaction/purchaseAbility/constants/index.ts
View file @
fa0269a0
...
...
@@ -202,7 +202,7 @@ export const FILTEREXTERNALSTATE = [
},
]
/** 筛选
外部状态
*/
/** 筛选
确认报价内部状态
*/
export
const
FILTERINTERNALSTATE
=
[
{
label
:
'待提交审核'
,
value
:
1
...
...
@@ -236,6 +236,37 @@ export const FILTERINTERNALSTATE = [
},
]
/** 筛选内部状态 */
export
const
FILTERCONFIRMINTERNALSTATE
=
[
{
label
:
'待比价'
,
value
:
1
},
{
label
:
'待审核授标结果(一级)'
,
value
:
2
},
{
label
:
'待审核授标结果(二级)'
,
value
:
3
},
{
label
:
'待确认授标结果'
,
value
:
4
},
{
label
:
'审核授标结果通过(一级)'
,
value
:
5
},
{
label
:
'审核授标结果通过(二级)'
,
value
:
6
},
{
label
:
'审核授标结果不通过(一级)'
,
value
:
7
},
{
label
:
'审核授标结果不通过(二级)'
,
value
:
8
},
{
label
:
'已完成'
,
value
:
99
},
]
/** 确认报价内部状态 */
export
const
OFFTER_CONFIRMINTERIORSTATE
=
{
99
:
'已完成'
,
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/add.tsx
View file @
fa0269a0
...
...
@@ -73,11 +73,11 @@ const AddForm = () => {
}
else
{
res
=
await
PublicApi
.
postPurchasePurchaseInquiryAdd
({
...
params
});
}
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
else
{
if
(
res
.
code
!==
1000
)
{
setLoading
(
false
);
return
}
history
.
goBack
()
}
else
{
setLoading
(
false
);
}
...
...
@@ -139,6 +139,7 @@ const AddForm = () => {
setCondition
(
conditionInfo
);
demandInfo
.
type
=
params
.
type
;
demandInfo
.
shopIds
=
params
.
shopIds
;
demandInfo
.
demandMembers
=
params
.
demandMembers
;
setDemand
(
demandInfo
);
}
})
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/demand.tsx
View file @
fa0269a0
...
...
@@ -51,6 +51,14 @@ const Demand: React.FC<Iprops> = (props: any) => {
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
menberVisible
,
setMenberVidible
]
=
useState
<
boolean
>
(
false
);
const
[
rowCtl
,
setRowCtl
]
=
useState
<
any
>
([])
const
handleGetSwitch
=
(
e
:
any
,
index
:
number
)
=>
{
const
state
=
e
?
1
:
0
;
const
params
=
[...
rowCtl
];
params
[
index
].
state
=
state
;
setRowCtl
([...
params
]);
}
/** 表头 */
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -82,18 +90,19 @@ const Demand: React.FC<Iprops> = (props: any) => {
title
:
'是否归属会员'
,
key
:
'membershipOrNot'
,
dataIndex
:
'membershipOrNot'
,
render
:
(
_text
:
any
,
_record
:
any
)
=>
<
span
>
是
</
span
>
render
:
(
_text
:
any
,
_record
:
any
)
=>
<>
{
value
===
3
&&
<
Typography
.
Text
type=
'success'
>
是
</
Typography
.
Text
>
}
</>
},
{
title
:
'状态'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
_text
:
any
,
_record
:
any
)
=>
(
render
:
(
_text
:
any
,
_record
:
any
,
index
:
number
)
=>
(
<
Form
.
Item
style=
{
{
marginBottom
:
0
}
}
initialValue=
{
_text
}
>
<
Switch
/>
<
Switch
checked=
{
_text
}
onChange=
{
(
e
:
any
)
=>
handleGetSwitch
(
e
,
index
)
}
/>
</
Form
.
Item
>
)
},
...
...
@@ -102,7 +111,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
_text
:
any
,
_record
:
any
)
=>
(
<
Link
href=
{
`/shop?shopId=${btoa(JSON.stringify({
shopId: _record.i
d, memberId: _record.memberId }))}`
}
target=
"_blank"
>
<
Link
href=
{
`/shop?shopId=${btoa(JSON.stringify({
roleId: _record.roleI
d, memberId: _record.memberId }))}`
}
target=
"_blank"
>
进入店铺
</
Link
>
)
...
...
@@ -115,6 +124,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
setVisible
(
true
)
}
setStore
([]);
setRowCtl
([]);
setValue
(
value
)
}
/** 确认选择商城 */
...
...
@@ -143,13 +153,16 @@ const Demand: React.FC<Iprops> = (props: any) => {
const
data
:
any
=
[]
RowCtl
.
forEach
(
item
=>
{
data
.
push
({
id
:
item
.
id
,
isSubMember
:
1
,
memberId
:
item
.
memberId
,
memberName
:
item
.
name
,
memberTypeName
:
item
.
memberTypeName
,
roleId
:
item
.
roleId
,
roleName
:
item
.
roleName
,
levelTag
:
item
.
levelTag
,
state
:
false
,
membershipOrNot
:
1
,
state
:
0
,
type
:
2
,
})
})
...
...
@@ -209,7 +222,8 @@ const Demand: React.FC<Iprops> = (props: any) => {
setStoreList
(
shopList
)
}
setValue
(
fetchdata
.
type
);
handleStoreIds
(
fetchdata
.
shopIds
);
fetchdata
.
shopIds
&&
handleStoreIds
(
fetchdata
.
shopIds
);
fetchdata
.
demandMembers
&&
setRowCtl
([...
fetchdata
.
demandMembers
]);
}
},
[
fetchdata
])
...
...
@@ -291,6 +305,7 @@ const Demand: React.FC<Iprops> = (props: any) => {
/>
<
SelectMenber
visible=
{
menberVisible
}
rowCtl=
{
rowCtl
}
onclose=
{
()
=>
setMenberVidible
(
false
)
}
confirm=
{
(
e
)
=>
handleMenberList
(
e
)
}
/>
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/modal/selectMenber.tsx
View file @
fa0269a0
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
use
Effect
,
use
Ref
}
from
'react'
;
import
{
Drawer
,
Button
...
...
@@ -15,6 +15,7 @@ import {
const
formActions
=
createFormActions
();
interface
Iprops
{
rowCtl
?:
any
,
visible
:
boolean
,
onclose
?(),
confirm
?(
e
:
any
),
...
...
@@ -22,7 +23,7 @@ interface Iprops {
const
SelectMenber
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
{
visible
,
onclose
,
confirm
}
=
props
;
const
{
visible
,
onclose
,
confirm
,
rowCtl
}
=
props
;
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -60,6 +61,13 @@ const SelectMenber: React.FC<Iprops> = (props: any) => {
})
}
useEffect
(()
=>
{
if
(
rowCtl
)
{
RowCtl
.
setSelectRow
(
rowCtl
)
RowCtl
.
setSelectedRowKeys
(
rowCtl
.
map
(
v
=>
v
.
id
))
}
},
[
visible
])
return
(
<
Drawer
visible=
{
visible
}
...
...
src/pages/transaction/purchaseAbility/schema/index.ts
View file @
fa0269a0
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
PublicApi
}
from
'@/services/api'
import
{
FILTEREXTERNALSTATE
,
FILTERINTERNALSTATE
}
from
'../constants'
import
{
FILTEREXTERNALSTATE
,
FILTERINTERNALSTATE
,
FILTERCONFIRMINTERNALSTATE
}
from
'../constants'
/** 采购询价 - 需求单查询 */
...
...
@@ -609,7 +609,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
},
enum
:
FILTEREXTERNALSTATE
},
i
nteriorState
:
{
confirmI
nteriorState
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'内部状态'
,
...
...
@@ -617,7 +617,7 @@ export const CONFIRMOFFERSERAH_SCHEMA: ISchema = {
width
:
160
}
},
enum
:
FILTERINTERNALSTATE
enum
:
FILTER
CONFIRM
INTERNALSTATE
},
}
},
...
...
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