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
e61ef76b
Commit
e61ef76b
authored
Apr 13, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决请购单的bug
parent
b5c56195
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
40 deletions
+89
-40
order.ts
src/locales/en-US/order.ts
+6
-0
order.ts
src/locales/ko-KR/order.ts
+5
-0
order.ts
src/locales/zh-CN/order.ts
+6
-2
index.tsx
...ion/purchaseRequisition/components/billMaterial/index.tsx
+12
-2
index.tsx
...creaseRequisition/components/materialModalTable/index.tsx
+6
-5
index.tsx
...ncreaseRequisition/components/materialTableCell/index.tsx
+44
-27
index.tsx
...urchaseRequisition/increaseRequisition/constant/index.tsx
+10
-4
No files found.
src/locales/en-US/order.ts
View file @
e61ef76b
...
...
@@ -703,4 +703,10 @@ export default {
'purchaseRequisition.jigoumingcheng'
:
'organ name'
,
'purchaseRequisition.caigoushouhuodan'
:
'Purchase receipt'
,
'purchaseRequisition.dingdan'
:
'order'
,
'purchaseRequisition.wuliaozu'
:
'Material group'
,
'purchaseRequisition.shengchangchangjia'
:
'Manufacturer'
,
'purchaseRequisition.changdi'
:
'Place of Origin'
,
'purchaseRequisition.beizu'
:
'remarks'
,
'purchaseRequisition.neirongbuneng1weikong'
:
'Content cannot be empty'
,
}
src/locales/ko-KR/order.ts
View file @
e61ef76b
...
...
@@ -701,4 +701,9 @@ export default {
'purchaseRequisition.jigoumingcheng'
:
'기관 명칭'
,
'purchaseRequisition.caigoushouhuodan'
:
'구매 인보이스'
,
'purchaseRequisition.dingdan'
:
'주문'
,
'purchaseRequisition.wuliaozu'
:
'재료 그룹'
,
'purchaseRequisition.shengchangchangjia'
:
'생산자'
,
'purchaseRequisition.changdi'
:
'생산지'
,
'purchaseRequisition.beizu'
:
'비고'
,
'purchaseRequisition.neirongbuneng1weikong'
:
'컨텐트는 비워둘 수 없습니다.'
,
}
src/locales/zh-CN/order.ts
View file @
e61ef76b
...
...
@@ -702,6 +702,10 @@ export default {
'purchaseRequisition.jigoumingcheng'
:
'机构名称'
,
'purchaseRequisition.caigoushouhuodan'
:
'采购收货单'
,
'purchaseRequisition.dingdan'
:
'订单'
,
'purchaseRequisition.wuliaozu'
:
'物料组'
,
'purchaseRequisition.shengchangchangjia'
:
'生产厂家'
,
'purchaseRequisition.changdi'
:
'产地'
,
'purchaseRequisition.beizu'
:
'备注'
,
'purchaseRequisition.neirongbuneng1weikong'
:
'内容不能为空'
,
}
src/pages/transaction/purchaseRequisition/components/billMaterial/index.tsx
View file @
e61ef76b
...
...
@@ -29,6 +29,11 @@ const BidMaterial: React.FC<BidMaterialProps> = ({ cardTitle }) => {
key
:
'name'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.wuliaozu'
,
defaultMessage
:
'物料组'
}),
dataIndex
:
'goodsGroup'
,
key
:
'goodsGroup'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
}),
dataIndex
:
'spec'
,
key
:
'spec'
,
...
...
@@ -60,12 +65,12 @@ const BidMaterial: React.FC<BidMaterialProps> = ({ cardTitle }) => {
key
:
'quantity'
,
},
{
title
:
"生产厂家"
,
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.shengchangchangjia'
,
defaultMessage
:
'生产厂家'
})
,
dataIndex
:
'manuFacturer'
,
key
:
'manuFacturer'
,
},
{
title
:
"产地"
,
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.changdi'
,
defaultMessage
:
'产地'
})
,
dataIndex
:
'placeOrigin'
,
key
:
'placeOrigin'
,
},
...
...
@@ -79,6 +84,11 @@ const BidMaterial: React.FC<BidMaterialProps> = ({ cardTitle }) => {
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.yizhuandingdanshu'
,
defaultMessage
:
'已转订单数量'
}),
dataIndex
:
'transferQuantity'
,
key
:
'transferQuantity'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.beizu'
,
defaultMessage
:
'备注'
}),
dataIndex
:
'remark'
,
key
:
'remark'
,
}
];
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialModalTable/index.tsx
View file @
e61ef76b
...
...
@@ -84,20 +84,20 @@ export const materialColumns: any[] = [
key
:
'unitName'
},
{
title
:
"生产厂家"
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.shengchangchangjia'
,
defaultMessage
:
'生产厂家'
})
,
dataIndex
:
'manufacturer'
,
align
:
'center'
,
key
:
'manufacturer'
,
},
{
title
:
"厂地"
,
dataIndex
:
'
placeO
rigin'
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.changdi'
,
defaultMessage
:
'产地'
})
,
dataIndex
:
'
o
rigin'
,
align
:
'center'
,
key
:
'
placeO
rigin'
,
key
:
'
o
rigin'
,
},
{
title
:
"备注"
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.beizu'
,
defaultMessage
:
'备注'
})
,
dataIndex
:
'remake'
,
align
:
'center'
,
key
:
'remake'
...
...
@@ -140,6 +140,7 @@ const MaterialModalTable: React.FC<MaterialModalTableProps> = (props) => {
temp
.
unit
=
v
?.
unitName
||
v
?.
unit
||
null
;
temp
.
manuFacturer
=
v
?.
manufacturer
temp
.
placeOrigin
=
v
?.
origin
temp
.
goodsGroup
=
v
?.
materialGroup
?.
name
;
return
temp
})
let
originIds
=
tempOriginData
.
map
(
item
=>
item
.
id
)
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialTableCell/index.tsx
View file @
e61ef76b
...
...
@@ -19,7 +19,7 @@ export interface MaterialTableCellProps {
const
EditableContext
=
React
.
createContext
<
any
>
({});
export
const
MaterialEditableRow
:
React
.
FC
<
any
>
=
({...
props
})
=>
{
export
const
MaterialEditableRow
:
React
.
FC
<
any
>
=
({
...
props
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
ctx
=
{
...
...
@@ -35,7 +35,7 @@ export const MaterialEditableRow: React.FC<any> = ({...props }) => {
};
export
const
MaterialTableCell
:
React
.
FC
<
MaterialTableCellProps
>
=
({
export
const
MaterialTableCell
:
React
.
FC
<
MaterialTableCellProps
>
=
({
title
,
editable
,
children
,
...
...
@@ -44,7 +44,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
handleSave
,
forceEdit
,
formItem
,
formItemProps
=
{},
formItemProps
=
{},
...
restProps
})
=>
{
const
formItemRef
=
useRef
<
any
>
();
...
...
@@ -57,7 +57,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
const
[
receiveInfo
,
setReceiveInfo
]
=
useState
<
any
>
()
const
getReceiveInfo
=
async
()
=>
{
const
{
data
:
deliveryAddress
}
=
await
getLogisticsSelectListMemberShipperAddress
({
const
{
data
:
deliveryAddress
}
=
await
getLogisticsSelectListMemberShipperAddress
({
memberId
:
record
.
memberId
,
roleId
:
record
.
memberRoleId
})
...
...
@@ -80,7 +80,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
const
change
=
async
(
va
,
op
,
idx
)
=>
{
console
.
log
(
va
,
op
,
idx
)
// 自提情况下 显示地址
if
(
va
===
2
)
{
if
(
va
===
2
)
{
setShowAddress
(
true
)
getReceiveInfo
()
}
else
{
...
...
@@ -97,11 +97,11 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
}
const
chooseFormItem
=
(
type
,
v
)
=>
{
switch
(
type
)
{
switch
(
type
)
{
// input类型
case
'input'
:
{
return
<
Input
style=
{
{
width
:
80
}
}
style=
{
{
width
:
80
}
}
type=
'number'
ref=
{
formItemRef
}
onChange=
{
save
}
...
...
@@ -110,10 +110,20 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
className=
"purchase_amount_input"
/>
}
// select选择类型
case
'select'
:
{
case
'inputText'
:
{
return
<
Input
style=
{
{
width
:
80
}
}
ref=
{
formItemRef
}
onChange=
{
save
}
{
...
formItemProps
}
id=
{
dataIndex
+
record
.
id
}
className=
"purchase_amount_input"
/>
}
// select选择类型
case
'select'
:
{
return
<
Select
style=
{
{
width
:
80
}
}
style=
{
{
width
:
80
}
}
ref=
{
formItemRef
}
onChange=
{
(
value
,
option
)
=>
change
(
value
,
option
,
dataIndex
)
}
id=
{
dataIndex
+
record
.
id
}
...
...
@@ -129,7 +139,7 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
const
validatorNumber
=
(
rule
,
value
,
callback
)
=>
{
try
{
let
_value
=
Number
(
value
)
if
(
_value
>
Number
.
MAX_SAFE_INTEGER
)
{
if
(
_value
>
Number
.
MAX_SAFE_INTEGER
)
{
throw
new
Error
(
intl
.
formatMessage
({
id
:
'purchaseRequisition.shuzhijingduyi'
,
defaultMessage
:
'数值精度溢出'
}))
}
callback
()
...
...
@@ -157,25 +167,32 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
{
validator
:
validatorNumber
},
]
:
[
{
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.danjiajinxiansi'
,
defaultMessage
:
'单价仅限四位小数'
}),
},
{
validator
:
validatorNumber
}
]
}
]
:
dataIndex
===
'remark'
?
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.neirongbuneng1weikong'
,
defaultMessage
:
'内容不能为空'
}),
},
]
:
[
{
pattern
:
/^
\d
+
(\.\d
{1,4}
)?
$/
,
message
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.danjiajinxiansi'
,
defaultMessage
:
'单价仅限四位小数'
}),
},
{
validator
:
validatorNumber
}
]
}
>
{
chooseFormItem
(
formItem
,
record
[
dataIndex
]
||
''
)
}
</
Form
.
Item
>
{
showAddress
?
<
Popover
content=
{
?
<
Popover
content=
{
<
Row
>
<
div
>
<
h3
><
EnvironmentOutlined
/>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.zitidizhi'
,
defaultMessage
:
'自提地址'
})
}
</
h3
>
<
h3
><
EnvironmentOutlined
/>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.zitidizhi'
,
defaultMessage
:
'自提地址'
})
}
</
h3
>
{
receiveInfo
&&
<>
<
p
>
{
receiveInfo
.
shipperName
}
/
{
receiveInfo
.
phone
}
</
p
>
...
...
@@ -185,10 +202,10 @@ export const MaterialTableCell:React.FC<MaterialTableCellProps> = ({
</
div
>
</
Row
>
}
>
<
span
style=
{
{
position
:
'absolute'
,
right
:
0
,
top
:
'42%'
,
}
}
><
EnvironmentOutlined
/></
span
>
</
Popover
>
:
null
<
span
style=
{
{
position
:
'absolute'
,
right
:
0
,
top
:
'42%'
,
}
}
><
EnvironmentOutlined
/></
span
>
</
Popover
>
:
null
}
</>
}
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/constant/index.tsx
View file @
e61ef76b
...
...
@@ -132,6 +132,12 @@ export const materialInfoColumns: any[] = [
key
:
'name'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.wuliaozu'
,
defaultMessage
:
'物料组'
}),
dataIndex
:
'goodsGroup'
,
align
:
'center'
,
key
:
'goodsGroup'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
}),
dataIndex
:
'type'
,
align
:
'center'
,
...
...
@@ -173,7 +179,7 @@ export const materialInfoColumns: any[] = [
editable
:
true
,
},
{
title
:
"生产厂家"
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.shengchangchangjia'
,
defaultMessage
:
'生产厂家'
})
,
dataIndex
:
'manuFacturer'
,
align
:
'center'
,
key
:
'manuFacturer'
,
...
...
@@ -185,17 +191,17 @@ export const materialInfoColumns: any[] = [
},
{
title
:
"厂地"
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.changdi'
,
defaultMessage
:
'产地'
})
,
dataIndex
:
'placeOrigin'
,
align
:
'center'
,
key
:
'placeOrigin'
,
},
{
title
:
"备注"
,
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.beizu'
,
defaultMessage
:
'备注'
})
,
dataIndex
:
'remark'
,
align
:
'center'
,
key
:
'remark'
,
formItem
:
'input'
,
formItem
:
'input
Text
'
,
editable
:
true
,
},
{
...
...
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