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
15cdf00d
Commit
15cdf00d
authored
Apr 22, 2022
by
前端-彭佳文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix418' into 'v2-220418'
待审核请购单 一级二级,待提交请购单页面显示问题 See merge request linkseeks-design/pro-platform!496
parents
286286fd
21561974
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
264 additions
and
136 deletions
+264
-136
order.ts
src/locales/en-US/order.ts
+1
-1
order.ts
src/locales/ko-KR/order.ts
+1
-1
order.ts
src/locales/zh-CN/order.ts
+2
-2
index.tsx
...purchaseRequisition/components/billDetailHeader/index.tsx
+1
-1
index.tsx
...ion/purchaseRequisition/components/billMaterial/index.tsx
+0
-1
index.tsx
...on/purchaseRequisition/firstApprovedBill/detail/index.tsx
+1
-1
index.tsx
...creaseRequisition/components/materialModalTable/index.tsx
+46
-49
index.tsx
...urchaseRequisition/increaseRequisition/constant/index.tsx
+41
-42
index.less
...action/purchaseRequisition/increaseRequisition/index.less
+40
-1
index.tsx
...saction/purchaseRequisition/increaseRequisition/index.tsx
+9
-7
useMaterialTable.tsx
...equisition/increaseRequisition/model/useMaterialTable.tsx
+61
-3
index.ts
...n/purchaseRequisition/increaseRequisition/schema/index.ts
+3
-2
modal.ts
...n/purchaseRequisition/increaseRequisition/schema/modal.ts
+57
-24
index.tsx
...tion/purchaseRequisition/readySubmitBill/detail/index.tsx
+1
-1
No files found.
src/locales/en-US/order.ts
View file @
15cdf00d
...
...
@@ -604,7 +604,7 @@ export default {
'purchaseRequisition.qingshuruquxiao'
:
'Please enter the reason for cancellation'
,
'purchaseRequisition.zhongzhiyuanyin'
:
'Reason for suspension'
,
'purchaseRequisition.shenhe'
:
'Review'
,
'purchaseRequisition.tijiaoshenhe'
:
'
Submit
'
,
'purchaseRequisition.tijiaoshenhe'
:
'
Documents review
'
,
'purchaseRequisition.xinjian'
:
'New'
,
'purchaseRequisition.shifouzhixingshan'
:
'Do you want to delete it? '
,
'purchaseRequisition.xiugai'
:
'Modify'
,
...
...
src/locales/ko-KR/order.ts
View file @
15cdf00d
...
...
@@ -602,7 +602,7 @@ export default {
'purchaseRequisition.qingshuruquxiao'
:
'취소 이유를 입력하십시오.'
,
'purchaseRequisition.zhongzhiyuanyin'
:
'중단 원인'
,
'purchaseRequisition.shenhe'
:
'심사'
,
'purchaseRequisition.tijiaoshenhe'
:
'
제출
'
,
'purchaseRequisition.tijiaoshenhe'
:
'
증빙서류 심사
'
,
'purchaseRequisition.xinjian'
:
'새로 만들다'
,
'purchaseRequisition.shifouzhixingshan'
:
'삭제 작업을 수행하시겠습니까?'
,
'purchaseRequisition.xiugai'
:
'수정'
,
...
...
src/locales/zh-CN/order.ts
View file @
15cdf00d
...
...
@@ -601,8 +601,8 @@ export default {
'purchaseRequisition.zaicishuruni'
:
'在此输入你的原因, 最多50个汉字'
,
'purchaseRequisition.qingshuruquxiao'
:
'请输入取消原因'
,
'purchaseRequisition.zhongzhiyuanyin'
:
'中止原因'
,
'purchaseRequisition.shenhe'
:
'
审核
'
,
'purchaseRequisition.tijiaoshenhe'
:
'
提交
'
,
'purchaseRequisition.shenhe'
:
'
提交
'
,
'purchaseRequisition.tijiaoshenhe'
:
'
单据审核
'
,
'purchaseRequisition.xinjian'
:
'新建'
,
'purchaseRequisition.shifouzhixingshan'
:
'是否执行删除操作?'
,
'purchaseRequisition.xiugai'
:
'修改'
,
...
...
src/pages/transaction/purchaseRequisition/components/billDetailHeader/index.tsx
View file @
15cdf00d
...
...
@@ -80,7 +80,7 @@ const BillDetailHeader: React.FC<BillDetailHeaderProps> = ({
<
ArrowLeftOutlined
onClick=
{
()
=>
backLink
?
history
.
push
(
backLink
)
:
history
.
goBack
()
}
/>
</
Col
>
<
Col
>
<
div
className=
{
style
.
titleAvatorText
}
>
{
formContext
.
data
.
requisitionNo
}
</
div
>
<
div
className=
{
style
.
titleAvatorText
}
>
{
`${formContext.data.digest}|${formContext.data.requisitionNo}`
}
</
div
>
</
Col
>
</
Row
>
<
Row
>
...
...
src/pages/transaction/purchaseRequisition/components/billMaterial/index.tsx
View file @
15cdf00d
...
...
@@ -97,7 +97,6 @@ const BidMaterial: React.FC<BidMaterialProps> = ({ cardTitle }) => {
];
const
renderDescription
=
async
(
record
)
=>
{
console
.
log
(
record
,
'dd'
)
const
newData
=
[...
tableData
];
const
index
=
newData
.
findIndex
(
item
=>
record
.
id
===
item
.
id
);
const
item
=
newData
[
index
];
...
...
src/pages/transaction/purchaseRequisition/firstApprovedBill/detail/index.tsx
View file @
15cdf00d
...
...
@@ -49,7 +49,7 @@ const FirstOrderPreview: React.FC = () => {
extraRight=
{
<
AuthButton
btnCode=
'firstApprovedBill.xiangqingshenhe'
>
<
Button
type=
'primary'
onClick=
{
handleClick
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'
提交
审核'
})
}
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'
单据
审核'
})
}
</
Button
>
</
AuthButton
>
}
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/components/materialModalTable/index.tsx
View file @
15cdf00d
...
...
@@ -17,6 +17,7 @@ import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from '../
import
{
useIntl
,
getIntl
}
from
'umi'
import
{
fetchTreeData
,
useAsyncCascader
}
from
'./useGetTableSearchData'
import
{
getProductGoodsGetGoodsByMemberList
}
from
'@/services/ProductV2Api'
import
DrawerTable
from
'@/components/DrawerTable'
export
interface
MaterialModalTableProps
extends
ModalTableProps
{
type
?:
'radio'
|
'checkbox'
,
...
...
@@ -166,9 +167,6 @@ const MaterialModalTable: React.FC<MaterialModalTableProps> = (props) => {
clearModalParams
()
}
const
otherHandle
=
<>
<
a
className=
"ant-btn"
href=
"/memberCenter/commodityAbility/material/pendingAdd/add"
target=
"_blank"
style=
{
{
marginRight
:
16
}
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinzenghuopin'
,
defaultMessage
:
'新增货品'
})
}
</
a
>
<
Tooltip
title=
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.dianjichaxun'
,
defaultMessage
:
'点击查询,列表可显示新增的物料'
})
}
>
...
...
@@ -186,61 +184,60 @@ const MaterialModalTable: React.FC<MaterialModalTableProps> = (props) => {
}
return
(
<
ModalTable
modalTitle=
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xuanzewuliao'
,
defaultMessage
:
'选择物料'
})
}
width=
{
1200
}
columns=
{
materialColumns
}
visible=
{
visible
}
// 抽屉
<
DrawerTable
drawerTitle=
{
intl
.
formatMessage
({
id
:
'table.purchase.xuanzezhuanjia'
})
}
confirm=
{
handleConfirm
}
actions=
{
addSchemaAction
}
cancel=
{
handleCancel
}
fetchTableData=
{
getPurchaseRequesitionMaterielList
}
visible=
{
visible
}
columns=
{
materialColumns
}
rowSelection=
{
rowSelection
}
resetModal=
{
{
destroyOnClose
:
true
}
}
modalType=
'none'
tableProps=
{
{
rowKey
:
'id'
,
onRow
:
(
record
)
=>
({
onClick
:
()
=>
{
rowSelectionCtl
.
appendSelectRow
(
record
);
rowSelectionCtl
.
appendSelectRowKeys
(
record
.
id
);
},
})
fetchTableData=
{
getPurchaseRequesitionMaterielList
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyProps=
{
{
ctx
:
{
schema
:
addRequesitionMaterialSchema
,
components
:
{
ModalSearch
:
Search
,
Submit
,
Children
,
CustomInputSearch
,
CustomCategorySearch
,
Cascader
,
Checkbox
,
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
,
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
FormEffectHooks
.
onFieldChange$
(
'brandId'
).
subscribe
(()
=>
{
searchBrandOptionEffect
(
actions
,
'brandId'
)
})
FormEffectHooks
.
onFieldChange$
(
'customerCategoryId'
).
subscribe
(()
=>
{
searchCustomerCategoryOptionEffect
(
actions
,
'customerCategoryId'
)
})
formilyChilds=
{
{
children
:
otherHandle
,
layouts
:
{
order
:
1
,
span
:
4
}
}
}
formilyProps=
{
{
ctx
:
{
schema
:
addRequesitionMaterialSchema
,
components
:
{
Submit
,
CustomInputSearch
,
CustomCategorySearch
,
Cascader
,
Checkbox
,
},
effects
:
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
,
);
}
},
expressionScope
:
{
otherHandle
layouts
:
{
order
:
2
,
span
:
20
}
}
}
resetDrawer=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'id'
,
}
}
{
...
restProps
}
/>
)
}
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/constant/index.tsx
View file @
15cdf00d
...
...
@@ -137,30 +137,30 @@ export const materialInfoColumns: any[] = [
align
:
'center'
,
key
:
'goodsGroup'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
}),
dataIndex
:
'type'
,
align
:
'center'
,
key
:
'type'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.pinlei'
,
defaultMessage
:
'品类'
}),
dataIndex
:
'category'
,
align
:
'center'
,
key
:
'category'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.pinpai'
,
defaultMessage
:
'品牌'
}),
dataIndex
:
'brand'
,
align
:
'center'
,
key
:
'brand'
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.danwei'
,
defaultMessage
:
'单位'
}),
dataIndex
:
'unit'
,
align
:
'center'
,
key
:
'unit'
,
},
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.guigexinghao', defaultMessage: '规格型号' }),
//
dataIndex: 'type',
//
align: 'center',
//
key: 'type',
//
},
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinlei', defaultMessage: '品类' }),
//
dataIndex: 'category',
//
align: 'center',
//
key: 'category',
//
},
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.pinpai', defaultMessage: '品牌' }),
//
dataIndex: 'brand',
//
align: 'center',
//
key: 'brand',
//
},
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.danwei', defaultMessage: '单位' }),
//
dataIndex: 'unit',
//
align: 'center',
//
key: 'unit',
//
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.yugudanjia'
,
defaultMessage
:
'预估单价(元)'
}),
dataIndex
:
'price'
,
...
...
@@ -178,24 +178,24 @@ export const materialInfoColumns: any[] = [
formItem
:
'input'
,
editable
:
true
,
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.shengchangchangjia'
,
defaultMessage
:
'生产厂家'
}),
dataIndex
:
'manuFacturer'
,
align
:
'center'
,
key
:
'manuFacturer'
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
manuFacturer
}
</
span
>
)
}
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.shengchangchangjia', defaultMessage: '生产厂家' }),
//
dataIndex: 'manuFacturer',
//
align: 'center',
//
key: 'manuFacturer',
//
render: (text, record) => {
//
return (
//
<span>{record.manuFacturer}</span>
//
)
//
}
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.changdi'
,
defaultMessage
:
'产地'
}),
dataIndex
:
'placeOrigin'
,
align
:
'center'
,
key
:
'placeOrigin'
,
},
//
},
//
{
//
title: getIntl().formatMessage({ id: 'purchaseRequisition.changdi', defaultMessage: '产地' }),
//
dataIndex: 'placeOrigin',
//
align: 'center',
//
key: 'placeOrigin',
//
},
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.beizu'
,
defaultMessage
:
'备注'
}),
dataIndex
:
'remark'
,
...
...
@@ -220,7 +220,6 @@ export const materialInfoColumns: any[] = [
]
export
const
RequisitiColumns
:
any
[]
=
[
{
title
:
"姓名"
,
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/index.less
View file @
15cdf00d
...
...
@@ -15,8 +15,47 @@
.Select{
background: rgba(0,169,143,0.04);
border: 1px solid #00A98F;
}
}
}
.childrenWrap {
background-color: #fff;
.childrenTitle {
height: 100%;
background: linear-gradient(to left, #FFFFFF, #DAF2E7);
color: #00B37A;
p {
padding-left: 16px;
margin: 0;
font-size: 12px;
height: 14px;
line-height: 14px;
}
padding: 12px 0;
}
.childrenContent {
margin-top: 8px;
p {
margin: 0;
span {
height: 12px;
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 12px;
padding-right: 10px;
}
}
}
}
.restContainer {
margin-top: 24px;
:global {
.ant-table-expanded-row td {
padding: 0;
}
}
}
src/pages/transaction/purchaseRequisition/increaseRequisition/index.tsx
View file @
15cdf00d
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
import
{
history
,
useIntl
}
from
'umi'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
import
{
Button
,
Col
,
message
,
Radio
,
Row
,
Select
,
Upload
}
from
'antd'
import
{
Button
,
C
ard
,
C
ol
,
message
,
Radio
,
Row
,
Select
,
Upload
}
from
'antd'
import
{
createFormActions
,
registerVirtualBox
,
useFormSpy
}
from
'@formily/antd'
import
{
SaveOutlined
,
LinkOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
...
...
@@ -47,8 +47,9 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', () => {
const
intl
=
useIntl
()
const
{
form
}
=
useFormSpy
({
selector
:
[[
'onFieldValueChange'
,
'products'
]],
reducer
:
v
=>
v
})
const
data
=
form
.
getFieldValue
(
'products'
)
const
sum
=
data
.
reduce
((
prev
,
next
)
=>
(
prev
*
1000
+
(
next
.
amount
||
0
)
*
1000
)
/
1000
,
0
)
const
total
=
data
.
reduce
((
prev
,
next
)
=>
(
prev
*
1000
+
(
next
.
quantity
||
0
)
*
1000
)
/
1000
,
0
)
console
.
log
(
data
,
'data'
)
const
sum
=
data
?
data
.
reduce
((
prev
,
next
)
=>
(
prev
*
1000
+
(
next
.
amount
||
0
)
*
1000
)
/
1000
,
0
)
:
0
const
total
=
data
?
data
.
reduce
((
prev
,
next
)
=>
(
prev
*
1000
+
(
next
.
quantity
||
0
)
*
1000
)
/
1000
,
0
)
:
0
return
<
RowStyle
>
<
Col
span=
{
2
}
>
...
...
@@ -80,7 +81,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
const
intl
=
useIntl
()
// 请购单物料
const
{
materialAddButton
,
materialRef
,
materialColumns
,
materialComponents
,
...
surplusProps
}
=
useMaterialTable
(
addSchemaAction
)
const
{
materialAddButton
,
materialRef
,
materialColumns
,
materialComponents
,
materialChildren
,
...
surplusProps
}
=
useMaterialTable
(
addSchemaAction
)
useEffect
(()
=>
{
if
(
id
)
{
...
...
@@ -433,12 +434,12 @@ const IncreaseRequisition: React.FC<{}> = () => {
<
AuthButton
btnCode=
{
id
?
'increaseRequisition.bianji'
:
'increaseRequisition.xingzheng'
}
>
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.baocun'
,
defaultMessage
:
'保存'
})
}
</
Button
>
,
</
Button
>
</
AuthButton
>
]
}
/>
<
FormDetailWrapper
>
<
Card
className=
{
styles
.
restContainer
}
>
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
...
...
@@ -477,6 +478,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
materialAddButton
,
RequisitionerBtn
,
materialComponents
,
materialChildren
,
help
,
enclosureColumns
,
enclosureColumnsButton
,
...
...
@@ -484,7 +486,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
}
}
/>
</
Card
>
</
FormDetailWrapper
>
</
FormDetailContext
.
Provider
>
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/model/useMaterialTable.tsx
View file @
15cdf00d
import
{
useRef
,
useState
}
from
'react'
import
{
ISchemaFormActions
,
ISchemaFormAsyncActions
}
from
'@formily/antd'
;
import
{
Button
}
from
'antd'
;
import
{
Button
,
Row
,
Col
,
Spin
}
from
'antd'
;
import
{
getIntl
,
useIntl
}
from
'umi'
;
import
{
materialInfoColumns
}
from
'../constant'
;
import
MaterialTableCell
,
{
MaterialEditableRow
}
from
'../components/materialTableCell'
;
import
{
useModalTable
}
from
'./useModalTable'
;
import
{
useIntl
}
from
'umi'
;
import
style
from
'../index.less'
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
const
intl
=
getIntl
();
export
const
getUnitPriceTotal
=
(
record
)
=>
{
const
purchaseCount
=
Number
(
record
[
'quantity'
])
||
0
...
...
@@ -47,7 +50,7 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
}
}
const
materialAddButton
=
<
Button
onClick=
{
handleShowMaterial
}
block
type=
'default'
style=
{
{
margin
:
'24px auto'
}
}
>
{
intl
.
formatMessage
({
id
:
'
purchaseRequisition.xuanzecaigouwu'
,
defaultMessage
:
'选择采购物料
'
})
}
</
Button
>
const
materialAddButton
=
<
Button
onClick=
{
handleShowMaterial
}
block
type=
'default'
style=
{
{
margin
:
'24px auto'
}
}
>
{
intl
.
formatMessage
({
id
:
'
common.button.select'
,
defaultMessage
:
'选择
'
})
}
</
Button
>
const
materialComponents
=
{
body
:
{
row
:
MaterialEditableRow
,
...
...
@@ -89,11 +92,66 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
};
})
const
renderDescription
=
(
record
)
=>
{
const
newData
=
[...
ctx
.
getFieldValue
(
'products'
)];
const
index
=
newData
.
findIndex
(
item
=>
record
.
id
===
item
.
id
);
const
item
=
newData
[
index
];
newData
[
index
]
=
item
item
.
description
=
(<
div
className=
{
style
.
childrenWrap
}
>
<
Row
>
<
Col
span=
{
3
}
>
<
div
className=
{
style
.
childrenTitle
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.wuliao'
})
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinxi'
})
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
})
}
:
</
span
>
{
record
.
spec
}
</
p
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.pinlei'
,
defaultMessage
:
'品类'
})
}
:
</
span
>
{
record
.
category
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.pinpai'
,
defaultMessage
:
'品牌'
})
}
:
</
span
>
{
record
.
brand
}
</
p
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.danwei'
,
defaultMessage
:
'单位'
})
}
:
</
span
>
{
record
.
unit
}
</
p
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
childrenContent
}
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.shengchangchangjia'
,
defaultMessage
:
'生产厂家'
})
}
:
</
span
>
{
record
.
manuFacturer
}
</
p
>
<
p
><
span
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.changdi'
,
defaultMessage
:
'产地'
})
}
:
</
span
>
{
record
.
placeOrigin
}
</
p
>
</
div
>
</
Col
>
</
Row
>
</
div
>)
ctx
.
setFieldValue
(
'products'
,
[...
newData
])
}
// 嵌套子表格
const
materialChildren
=
{
expandedRowRender
:
record
=>
<
p
style=
{
{
margin
:
0
}
}
>
{
record
?.
id
?
(
record
.
description
||
<
Spin
size=
"small"
style=
{
{
margin
:
'15px auto'
,
width
:
'100%'
}
}
/>)
:
null
}
</
p
>,
rowExpandable
:
record
=>
record
.
name
!==
'Not Expandable'
,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
:
(
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
),
onExpand
:
(
expanded
,
record
)
=>
{
if
(
expanded
)
{
renderDescription
(
record
)
}
}
}
return
{
materialRef
,
materialAddButton
,
materialColumns
:
materialMergeColumns
,
materialComponents
,
materialChildren
,
visible
,
setVisible
,
rowSelection
,
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/schema/index.ts
View file @
15cdf00d
...
...
@@ -243,7 +243,7 @@ const material: ISchema = {
type
:
'object'
,
"x-component"
:
'MellowCard'
,
"x-component-props"
:
{
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.
dingdanwuliao'
,
defaultMessage
:
'订单
物料'
}),
title
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.
qinggouwuliao'
,
defaultMessage
:
'请购
物料'
}),
id
:
'orderMaterial'
,
},
properties
:
{
...
...
@@ -252,10 +252,11 @@ const material: ISchema = {
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'i
ndex
'
,
rowKey
:
'i
d
'
,
columns
:
"{{materialColumns}}"
,
components
:
"{{materialComponents}}"
,
prefix
:
"{{materialAddButton}}"
,
expandable
:
"{{materialChildren}}"
,
},
},
NO_SUBMIT_SPY
:
{
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/schema/modal.ts
View file @
15cdf00d
...
...
@@ -8,12 +8,54 @@ import { getIntl } from 'umi';
export
const
addRequesitionMaterialSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
code
:
{
type
:
'
string
'
,
'x-component'
:
'
ModalSearch
'
,
topLayout
:
{
type
:
'
object
'
,
'x-component'
:
'
mega-layout
'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.qingshuruhuohao'
,
defaultMessage
:
'请输入物料编号'
}),
align
:
'flex-start'
,
full
:
true
,
autoRow
:
true
,
justifyContent
:
'flex-end'
,
align
:
'flex-right'
,
className
:
'sc-fzpans'
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{otherHandle}}'
,
},
},
ctlRight
:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
// flexWrap: 'wrap',
// width: '100%',
justifyContent
:
'flex-end'
,
// style: {
// marginRight: 0,
// }
},
// colStyle: {
// marginTop: 20,
// },
},
properties
:
{
watch
:
{
"x-component"
:
'Checkbox'
,
title
:
'只查看供应商可供应物料'
,
},
code
:
{
type
:
'string'
,
'x-component'
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.qingshuruhuohao'
,
defaultMessage
:
'请输入物料编号'
}),
},
},
}
},
},
},
[
FORM_FILTER_PATH
]:
{
...
...
@@ -21,8 +63,9 @@ import { getIntl } from 'umi';
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
// flexWrap: 'nowrap',
justifyContent
:
'flex-start'
,
flexWrap
:
'wrap'
,
width
:
'100%'
,
justifyContent
:
'flex-end'
,
style
:
{
marginRight
:
0
,
}
...
...
@@ -36,7 +79,7 @@ import { getIntl } from 'umi';
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.materialName'
,
defaultMessage
:
'物料名称'
}),
style
:
{
width
:
'174px'
},
//
style: { width: '174px' },
},
},
brandId
:
{
...
...
@@ -49,7 +92,7 @@ import { getIntl } from 'umi';
defaultActiveFirstOption
:
false
,
filterOption
:
false
,
notFoundContent
:
null
,
style
:
{
width
:
'174
px'
},
// style: { width: '145
px' },
searchValue
:
null
,
dataoption
:
[],
},
...
...
@@ -61,7 +104,7 @@ import { getIntl } from 'umi';
placeholder
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.shangpinpinlei'
,
defaultMessage
:
'商品品类'
}),
showSearch
:
true
,
notFoundContent
:
null
,
style
:
{
width
:
'174
px'
},
// style: { width: '145
px' },
dataoption
:
[],
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
...
...
@@ -71,23 +114,19 @@ import { getIntl } from 'umi';
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
placeholder
:
'物料组'
,
allowClear
:
true
,
allowClear
:
true
,
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
style
:
{
width
:
'150
px'
},
// style: { width: '145
px' },
showSearch
:
true
},
},
},
type
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.guigexinghao'
,
defaultMessage
:
'规格型号'
}),
style
:
{
width
:
'174px'
},
//
style: { width: '174px' },
}
},
watch
:
{
"x-component"
:
'Checkbox'
,
title
:
'只查看供应商可供应物料'
,
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
...
...
@@ -97,12 +136,6 @@ import { getIntl } from 'umi';
children
:
getIntl
().
formatMessage
({
id
:
'purchaseRequisition.chaxun'
,
defaultMessage
:
'查询'
})
}
},
submit1
:
{
"x-component"
:
'Children'
,
"x-component-props"
:
{
children
:
'{{otherHandle}}'
}
}
}
}
}
...
...
src/pages/transaction/purchaseRequisition/readySubmitBill/detail/index.tsx
View file @
15cdf00d
...
...
@@ -36,7 +36,7 @@ const ReadySubmitBillDetail: React.FC = () => {
extraRight=
{
<
AuthButton
btnCode=
'readySubmitBill.xiangqingsheng'
>
<
Button
type=
'primary'
onClick=
{
handleClick
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.
tijiaoshenhe'
,
defaultMessage
:
'提交
审核'
})
}
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.
shenhe'
,
defaultMessage
:
'
审核'
})
}
</
Button
>
</
AuthButton
>
}
...
...
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