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
d94afcc8
Commit
d94afcc8
authored
Jun 16, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 修复采购计划bug
parent
dea5b597
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
16 deletions
+65
-16
index.tsx
...nsaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
+1
-1
material.tsx
...bility/demandPlan/demandPlanAdded/components/material.tsx
+13
-5
selectProduct.tsx
...y/demandPlan/demandPlanAdded/components/selectProduct.tsx
+34
-3
index.tsx
...pages/transaction/purchaseAbility/offter/demand/index.tsx
+2
-2
index.ts
src/pages/transaction/purchaseAbility/schema/index.ts
+15
-5
No files found.
src/pages/transaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
View file @
d94afcc8
...
...
@@ -63,7 +63,7 @@ const InquirySearch = () => {
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiry
Quote/addInquiryOrder/quote
?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiry
Offer/waitAddOffer/offer
?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
}
];
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/material.tsx
View file @
d94afcc8
...
...
@@ -83,7 +83,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
key
:
'costPrice'
,
dataIndex
:
'costPrice'
,
render
:
(
text
:
any
)
=>
(
<
Typography
.
Text
>
{
text
?
`¥${text.toFixed(2)}`
:
`¥0`
}
</
Typography
.
Text
>
<
Typography
.
Text
>
{
text
?
`¥${text.toFixed(2)}`
:
`¥0`
}
</
Typography
.
Text
>
)
},
{
...
...
@@ -150,19 +150,20 @@ const Material: React.FC<Materialprops> = (props: any) => {
message
.
warning
(
'请选择货品'
)
return
}
console
.
log
(
e
,
10086
)
setDataSource
(
e
.
selectRow
.
map
((
item
:
any
)
=>
{
return
{
i
d
:
item
.
id
,
productI
d
:
item
.
id
,
number
:
item
.
code
,
name
:
item
.
name
,
model
:
item
.
type
,
category
:
!
isEmpty
(
item
.
customerCategory
)
&&
item
.
customerCategory
.
name
,
brand
:
!
isEmpty
(
item
.
brand
)
&&
item
.
brand
.
name
,
unit
:
item
.
unitName
,
needCount
:
null
,
needCount
:
item
.
needCount
?
item
.
needCount
:
null
,
costPrice
:
item
.
costPrice
,
needPrice
:
null
,
arriveTime
:
null
,
needPrice
:
item
.
needPrice
?
item
.
needPrice
:
null
,
arriveTime
:
item
.
arriveTime
?
item
.
arriveTime
:
null
,
}
}))
setVisible
(
false
)
...
...
@@ -179,6 +180,12 @@ const Material: React.FC<Materialprops> = (props: any) => {
const
data
=
[...
dataSource
];
data
.
splice
(
index
,
1
);
message
.
success
(
'删除成功'
)
data
.
forEach
((
item
,
index
)
=>
{
form
.
setFieldsValue
({
[
`needCount
${
index
}
`
]:
item
.
needCount
?
item
.
needCount
:
undefined
,
[
`arriveTime
${
index
}
`
]:
item
.
arriveTime
?
moment
(
item
.
arriveTime
)
:
undefined
,
})
})
setDataSource
(
data
)
}
...
...
@@ -244,6 +251,7 @@ const Material: React.FC<Materialprops> = (props: any) => {
visible=
{
visible
}
onclose=
{
()
=>
setVisible
(
false
)
}
confirm=
{
handleConfirm
}
rowCtlData=
{
dataSource
}
/>
</
Form
>
)
...
...
src/pages/transaction/purchaseAbility/demandPlan/demandPlanAdded/components/selectProduct.tsx
View file @
d94afcc8
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
use
Effect
,
use
Ref
}
from
'react'
;
import
{
Drawer
,
Button
...
...
@@ -19,14 +19,19 @@ import {
const
formActions
=
createFormActions
();
interface
Iprops
{
/** 显示隐藏 */
visible
:
boolean
,
/** 关闭 */
onclose
?(),
/** 确认 */
confirm
?(
e
:
any
),
/** 回显时选中的勾选 */
rowCtlData
?:
Array
<
any
>
[],
}
const
SelectProduct
:
React
.
FC
<
Iprops
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
{
visible
,
onclose
,
confirm
}
=
props
;
const
ref
=
useRef
<
any
>
({});
const
{
visible
,
onclose
,
confirm
,
rowCtlData
}
=
props
;
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
});
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -71,6 +76,31 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
})
}
useEffect
(()
=>
{
if
(
rowCtlData
)
{
RowCtl
.
setSelectRow
(
rowCtlData
.
map
((
item
:
any
)
=>
{
return
{
id
:
item
.
productId
,
code
:
item
.
number
,
name
:
item
.
name
,
type
:
item
.
model
,
customerCategory
:
{
name
:
item
.
category
},
brand
:
{
name
:
item
.
brand
},
unitName
:
item
.
unit
,
costPrice
:
item
.
costPrice
,
needCount
:
item
.
needCount
,
needPrice
:
item
.
needPrice
,
arriveTime
:
item
.
arriveTime
,
}
}))
RowCtl
.
setSelectedRowKeys
(
rowCtlData
.
map
(
v
=>
v
.
productId
))
}
},
[
rowCtlData
])
const
search
=
(
values
:
any
)
=>
{
ref
.
current
.
reload
(
values
)
}
return
(
<
Drawer
visible=
{
visible
}
...
...
@@ -101,6 +131,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
search
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
)
FormEffectHooks
.
onFieldChange$
(
'category'
).
subscribe
(
state
=>
{
...
...
src/pages/transaction/purchaseAbility/offter/demand/index.tsx
View file @
d94afcc8
...
...
@@ -80,8 +80,8 @@ const DemandDetailed = () => {
{
label
:
'适用地市'
,
extra
:
(
<
div
>
{
areas
.
map
((
item
:
any
,
inde
x
:
number
)
=>
(
<
p
key=
{
`areas${i
ndex + 1}`
}
>
{
item
}
</
p
>
{
data
.
areas
.
map
((
it
:
any
,
id
x
:
number
)
=>
(
<
p
key=
{
`areas${i
dx + 1}`
}
>
{
`${it.province}/${it.city}`
}
</
p
>
))
}
</
div
>
)
...
...
src/pages/transaction/purchaseAbility/schema/index.ts
View file @
d94afcc8
...
...
@@ -407,16 +407,27 @@ export const SelectProductSchema: ISchema = {
placeholder
:
'货号'
}
},
customerCategory
:
{
customerCategory
Id
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'品类'
placeholder
:
'请选择品类'
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
PublicApi
.
getProductSelectGetSelectCustomerCategory
,
style
:
{
width
:
160
}
}
},
brand
:
{
brand
Id
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'品牌'
placeholder
:
'请选择品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetSelectBrand
,
style
:
{
width
:
160
}
}
},
type
:
{
...
...
@@ -425,7 +436,6 @@ export const SelectProductSchema: ISchema = {
placeholder
:
'规格型号'
}
},
}
},
sumbit
:
{
...
...
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