Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
11b8868a
Commit
11b8868a
authored
Nov 15, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复采购询价新增的bug
parent
3a525ab7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
70 additions
and
61 deletions
+70
-61
index.tsx
...es/transaction/purchaseAbility/components/table/index.tsx
+30
-19
basicInfo.tsx
...ility/demandPlan/demandPlanAdded/components/basicInfo.tsx
+18
-2
basic.tsx
...seAbility/purchaseInquiry/addInquiry/components/basic.tsx
+1
-1
condition.tsx
...ility/purchaseInquiry/addInquiry/components/condition.tsx
+6
-6
index.tsx
...urchaseAbility/purchaseInquiry/addInquiry/modal/index.tsx
+2
-1
demandPlan.ts
src/pages/transaction/purchaseAbility/schema/demandPlan.ts
+2
-5
index.ts
src/pages/transaction/purchaseAbility/schema/index.ts
+8
-20
onlineBid.ts
src/pages/transaction/purchaseAbility/schema/onlineBid.ts
+0
-0
purchaseBid.ts
src/pages/transaction/purchaseAbility/schema/purchaseBid.ts
+3
-7
No files found.
src/pages/transaction/purchaseAbility/components/table/index.tsx
View file @
11b8868a
import
React
,
{
useRef
,
useState
,
useImperativeHandle
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useImperativeHandle
,
useEffect
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -43,10 +43,11 @@ import {
ONLINEBIDREADYBID_SCHEMA
,
ONLINEBIDREADYSIGN_SCHEMA
,
}
from
'../../schema/onlineBid'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
interface
Iprops
{
fetch
?:
()
=>
Promise
<
unknown
>
,
fetchRowkeys
?(
e
:
any
),
fetchRowkeys
?(
e
:
number
[]
),
controllerBtns
?:
React
.
ReactNode
,
schemaType
?:
'PurchaseDemand'
|
...
...
@@ -76,6 +77,10 @@ interface Iprops {
reload
?:
any
,
externalStatusFetch
?:
()
=>
Promise
<
unknown
>
,
interiorStatusFetch
?:
()
=>
Promise
<
unknown
>
,
/** rowKey */
rowKey
?:
string
,
/** 禁用 */
getCheckboxProps
?:
(
record
:
any
)
=>
void
,
}
const
formActions
=
createFormActions
();
const
Table
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
...
...
@@ -88,6 +93,8 @@ const Table: React.FC<Iprops> = (props: any) => {
selectedRow
,
reload
,
fetchRowkeys
,
rowKey
,
getCheckboxProps
,
externalStatusFetch
,
interiorStatusFetch
}
=
props
;
...
...
@@ -151,14 +158,16 @@ const Table: React.FC<Iprops> = (props: any) => {
}
/**多选 */
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
number
>>
([]);
const
rowSelection
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
fetchRowkeys
(
selectedRowKeys
)
setSelectedRowKeys
(
selectedRowKeys
);
},
}
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
customKey
:
rowKey
||
'id'
,
extendsSelection
:
{
getCheckboxProps
:
(
record
)
=>
getCheckboxProps
&&
getCheckboxProps
(
record
),
}
});
useEffect
(()
=>
{
fetchRowkeys
&&
fetchRowkeys
(
selectRowFns
.
selectedRowKeys
)
},
[
selectRowFns
])
useImperativeHandle
(
reload
,
()
=>
({
reload
:
()
=>
{
...
...
@@ -176,17 +185,17 @@ const Table: React.FC<Iprops> = (props: any) => {
onFormMount$
().
subscribe
(()
=>
{
externalStatusFetch
&&
externalStatusFetch
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
return
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}
})
linkage
.
enum
(
'externalState'
,
_enum
)
linkage
.
enum
(
'externalStatusList'
,
_enum
)
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}
})
linkage
.
enum
(
'externalState'
,
_enum
)
linkage
.
enum
(
'externalStatusList'
,
_enum
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
interiorStatusFetch
&&
interiorStatusFetch
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
return
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}
})
linkage
.
enum
(
'interiorState'
,
_enum
)
linkage
.
enum
(
'innerStatusList'
,
_enum
)
const
_enum
=
res
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
name
||
item
.
message
,
value
:
item
.
satatus
||
item
.
code
}
})
linkage
.
enum
(
'interiorState'
,
_enum
)
linkage
.
enum
(
'innerStatusList'
,
_enum
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
...
...
@@ -200,13 +209,15 @@ const Table: React.FC<Iprops> = (props: any) => {
<
StandardTable
currentRef=
{
tableRef
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'id'
}
}
rowSelection=
{
selectedRow
&&
rowSelection
}
tableProps=
{
{
rowKe
y
:
rowKey
?
rowKey
:
'id'
}
}
rowSelection=
{
selectedRow
&&
selectRow
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
expressionScope=
{
{
controllerBtns
}
}
components=
{
{
controllerBtns
:
()
=>
controllerBtns
,
}
}
onSubmit=
{
values
=>
search
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
effects
,
FORM_FILTER_PATH
)
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/basicInfo.tsx
View file @
11b8868a
...
...
@@ -57,8 +57,24 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
return
(
<
Form
{
...
layout
}
form=
{
form
}
>
<
Form
.
Item
label=
"需求计划摘要"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
name=
"summary"
>
<
Input
/>
<
Form
.
Item
noStyle
shouldUpdate=
{
(
prevValues
,
curValues
)
=>
(
prevValues
.
startTime
&&
prevValues
.
endTime
)
!==
(
curValues
.
startTime
&&
curValues
.
endTime
)
}
>
{
({
getFieldValue
})
=>
{
if
(
getFieldValue
(
'startTime'
)
&&
getFieldValue
(
'endTime'
))
{
form
.
setFieldsValue
({
'summary'
:
`${getFieldValue('startTime').format('YYYY-MM-DD')}-${getFieldValue('endTime').format('YYYY-MM-DD')}需求计划`
})
}
return
(
getFieldValue
(
'startTime'
)
&&
getFieldValue
(
'endTime'
))
&&
(
<
Form
.
Item
label=
"需求计划摘要"
name=
"summary"
rules=
{
[{
required
:
true
,
message
:
'请输入需求计划摘要'
}]
}
>
<
Input
/>
</
Form
.
Item
>
)
}
}
</
Form
.
Item
>
<
Form
.
Item
required
label=
"需求计划周期"
style=
{
{
marginBottom
:
0
}
}
>
<
DatePicker
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/basic.tsx
View file @
11b8868a
...
...
@@ -251,7 +251,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
name=
'details'
rules=
{
[{
required
:
true
,
message
:
'请输入需求单摘要'
}]
}
>
<
Input
/>
<
Input
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/condition.tsx
View file @
11b8868a
...
...
@@ -159,37 +159,37 @@ const Condition: React.FC<Iprops> = (props: any) => {
label=
"报价要求"
name=
"offer"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"付款要求"
name=
"paymentType"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"税费要求"
name=
"taxes"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"物流要求"
name=
"logistics"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"包装要求"
name=
"packRequire"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"其他要求"
name=
"otherRequire"
>
<
TextArea
rows=
{
3
}
/>
<
TextArea
rows=
{
3
}
maxLength=
{
50
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/modal/index.tsx
View file @
11b8868a
...
...
@@ -146,7 +146,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
if
(
data
.
customerCategory
)
{
const
fullId
=
data
.
customerCategory
.
fullId
;
const
ids
=
fullId
.
replace
(
/
\b(
0+
)
/gi
,
''
).
split
(
'.'
);
console
.
log
(
ids
,
fullId
)
form
.
setFieldsValue
({
ids
:
ids
.
join
(
','
).
split
(
','
),
})
...
...
@@ -189,6 +188,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
urls
:
files
}
onConfirm
(
data
)
setProduct
([])
form
.
resetFields
();
setFiles
([])
}).
catch
(
error
=>
{
...
...
@@ -197,6 +197,7 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
}
/** 取消提交 */
const
handleClose
=
()
=>
{
setProduct
([])
form
.
resetFields
();
setFiles
([])
onClose
()
...
...
src/pages/transaction/purchaseAbility/schema/demandPlan.ts
View file @
11b8868a
...
...
@@ -96,11 +96,8 @@ export const DEMANDPLANADDED_SECHEMA: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
needPlanNo
:
{
type
:
'string'
,
...
...
src/pages/transaction/purchaseAbility/schema/index.ts
View file @
11b8868a
...
...
@@ -108,11 +108,8 @@ export const INQUIRYWAITORDER_SCHEMA: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
purchaseInquiryNo
:
{
type
:
'string'
,
...
...
@@ -277,11 +274,8 @@ export const PurchaseDemandPublicSchema: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
requisitionFormNo
:
{
type
:
'string'
,
...
...
@@ -729,11 +723,8 @@ export const CONFIRMOFFERAUDIT_SCHEMA: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
purchaseInquiryNo
:
{
type
:
'string'
,
...
...
@@ -996,11 +987,8 @@ export const OFFERSERAHAUDIT_SCHEMA: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
quotedPriceNo
:
{
type
:
'string'
,
...
...
src/pages/transaction/purchaseAbility/schema/onlineBid.ts
View file @
11b8868a
This diff is collapsed.
Click to expand it.
src/pages/transaction/purchaseAbility/schema/purchaseBid.ts
View file @
11b8868a
...
...
@@ -108,11 +108,8 @@ export const PURCHASEBIDREADYADD_SCHEMA: ISchema = {
},
properties
:
{
ctl
:
{
type
:
'object'
,
"x-component"
:
"Children"
,
"x-component-props"
:
{
children
:
"{{controllerBtns}}"
}
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
biddingNo
:
{
type
:
'string'
,
...
...
@@ -251,4 +248,4 @@ export const PURCHASEBIDOSIGNUP_SCHEMA: ISchema = {
}
}
}
}
\ No newline at end of file
}
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