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
3529ed15
Commit
3529ed15
authored
Apr 13, 2022
by
leimo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '220418-fix' into 'v2-220418'
fix: 进销存物料组相关问题 See merge request linkseeks-design/pro-platform!264
parents
e212c7ae
0206fff1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
140 additions
and
25 deletions
+140
-25
details.tsx
...liveryNoticeManagement/deliveryNoticeAwaitSRM/details.tsx
+2
-2
index.ts
...ckSellStorage/bills/components/BillsForm/effects/index.ts
+33
-0
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+8
-2
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+49
-18
index.tsx
src/pages/transaction/stockSellStorage/inventory/index.tsx
+36
-3
index.tsx
...s/transaction/stockSellStorage/inventory/schema/index.tsx
+12
-0
No files found.
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/details.tsx
View file @
3529ed15
...
...
@@ -5,14 +5,14 @@
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
history
,
useLocation
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Circulation
,
ConfirmDeliveryPlan
,
DeliveryNoticeDetaitlsAnchors
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
BaseInfo
as
base_Info
,
NoticeNo
,
BuyerLabel
,
NoticeSummary
,
ExternalState
,
ShippingInfo
,
DeliveryDate
,
DeliveryTime
,
ReceivingAddress
,
DeliveryList
,
ExternalRoamRecord
,
}
from
'../../constants'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
StandardTable
from
'@/components/StandardTable'
import
{
Steps
,
Table
,
Tag
}
from
'antd'
import
{
DeliveryMaterialsTableColumn
,
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column'
import
{
getOrderDeliveryNoticeOrderDetail
,
getOrderDeliveryNoticeOrderDetailPage
,
getOrderDeliveryNoticeOrderDeliveryHistory
}
from
'@/services/OrderNewV2Api'
import
{
ORDER_TYPE
,
TAG_STATUS_COLOR
,
OUTER_STATUS
,
STATUS_NAME
}
from
'../../constants/deliveryNotice'
import
{
STATUS_NAME
}
from
'../../constants/deliveryNotice'
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
=
()
=>
{
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/index.ts
View file @
3529ed15
...
...
@@ -8,6 +8,11 @@
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
getProductInvoicesTypeAll
,
getProductWarehouseAll
}
from
'@/services/ProductV2Api'
;
import
{
getProductMaterialGroupTree
}
from
"@/services/ProductV2Api"
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
"@formily/antd"
const
{
onFormMount$
}
=
FormEffectHooks
const
EMPTY_ARRAY
=
[]
// 获取单据类型
const
fetchInvoicesType
=
():
Promise
<
any
[]
>
=>
{
...
...
@@ -43,3 +48,31 @@ export const createEffects = (context, actions) => {
useAsyncSelect
(
'invoicesTypeId'
,
fetchInvoicesType
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'warehouseId'
,
fetchInventory
,
[
'name'
,
'id'
]);
};
export
const
useAsyncCascader
=
async
(
name
,
service
:
()
=>
Promise
<
any
[]
>
)
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFormMount$
().
subscribe
(()
=>
{
service
().
then
(
res
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
res
)
})
}).
catch
(
err
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
[])
})
})
})
}
export
const
fetchTreeData
=
async
()
=>
{
try
{
const
{
data
,
code
}
=
await
getProductMaterialGroupTree
({
rootNodeId
:
'0'
});
if
(
code
===
1000
)
{
return
data
;
}
return
EMPTY_ARRAY
}
catch
{
return
EMPTY_ARRAY
}
}
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
3529ed15
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Card
,
Spin
}
from
'antd'
;
import
{
Button
,
Card
,
Spin
,
Cascader
}
from
'antd'
;
import
{
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
Radio
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
getIntl
,
history
,
Prompt
}
from
'umi'
;
...
...
@@ -23,7 +23,7 @@ import CustomCategorySearch from '@/components/NiceForm/components/CustomCategor
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
addBillSchema
,
goodsSearchSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
{
createEffects
,
useAsyncCascader
,
fetchTreeData
}
from
'./effects'
;
import
EllipsisText
from
'../EllipsisText'
;
const
intl
=
getIntl
();
...
...
@@ -215,6 +215,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
goodsNo
:
item
.
code
,
goodsName
:
item
.
name
,
goodsGroup
:
item
.
materialGroup
?.
name
,
materialGroupId
:
item
.
materialGroup
?.
id
,
specifications
:
item
.
type
,
category
:
item
.
customerCategory
?.
name
||
''
,
brand
:
item
.
brand
?.
name
||
''
,
...
...
@@ -236,8 +237,11 @@ const BillsForm: React.FC<BillsFormProps> = ({
// 获取货品列表
const
fetchProductList
=
async
params
=>
{
const
materialGroupId
=
params
.
materialGroupId
?
params
.
materialGroupId
[
params
.
materialGroupId
.
length
-
1
]
:
undefined
const
res
=
await
getProductGoodsGetGoodsList
({
...
params
,
materialGroupId
,
ids
:
[
99
]
});
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
...
...
@@ -343,8 +347,10 @@ const BillsForm: React.FC<BillsFormProps> = ({
Submit
,
SearchSelect
,
CustomCategorySearch
,
Cascader
},
effects
:
(
$
,
actions
)
=>
{
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useStateFilterSearchLinkageEffect
(
$
,
actions
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
3529ed15
...
...
@@ -21,6 +21,8 @@ import {
}
from
'@/constants/commodity'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
getIntl
}
from
'umi'
;
import
{
getProductSelectGetSelectBrand
,
getProductSelectGetSelectCustomerCategory
}
from
'@/services/ProductV2Api'
const
intl
=
getIntl
();
const
orderDetailSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -307,6 +309,9 @@ export const addBillSchema: ISchema = {
invoicesCount
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'stockSellStorage.danjushuliang'
}),
'x-props'
:
{
width
:
150
,
},
'x-component-props'
:
{
allowClear
:
true
,
style
:
{
...
...
@@ -687,36 +692,62 @@ export const goodsSearchSchema: ISchema = {
allowClear
:
true
,
},
},
// customerCategoryId: {
// type: 'string',
// 'x-component': 'CustomCategorySearch',
// 'x-component-props': {
// placeholder: intl.formatMessage({id: 'stockSellStorage.pinlei'}),
// showSearch: true,
// notFoundContent: null,
// dataoption: [],
// fieldNames: { label: 'title', value: 'id', children: 'children' },
// },
// },
customerCategoryId
:
{
type
:
'string'
,
'x-component'
:
'CustomCategorySearch'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'stockSellStorage.pinlei'
}),
showSearch
:
true
,
notFoundContent
:
null
,
dataoption
:
[],
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.message28'
}),
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
getProductSelectGetSelectCustomerCategory
,
style
:
{
width
:
160
}
}
},
brandId
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'stockSellStorage.pinpai'
}),
allowClear
:
true
,
},
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'detail.purchase.message31'
}),
fetchSearch
:
getProductSelectGetSelectBrand
,
style
:
{
width
:
160
}
}
},
materialGroupId
:
{
type
:
'string'
,
'x-component'
:
'C
ustomCategorySearch
'
,
'x-component'
:
'C
ascader
'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'commodity.goods.schema.goodsSchema.goodsGroupId'
}),
showSearch
:
true
,
notFoundContent
:
null
,
dataoption
:
[],
placeholder
:
'物料组'
,
allowClear
:
true
,
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
style
:
{
width
:
'150px'
},
showSearch
:
true
},
},
// materialGroupId: {
// type: 'string',
// 'x-component': 'CustomCategorySearch',
// 'x-component-props': {
// placeholder: intl.formatMessage({ id: 'commodity.goods.schema.goodsSchema.goodsGroupId' }),
// showSearch: true,
// notFoundContent: null,
// dataoption: [],
// fieldNames: { label: 'title', value: 'id', children: 'children' },
// },
// },
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
src/pages/transaction/stockSellStorage/inventory/index.tsx
View file @
3529ed15
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Input
,
Card
,
Space
,
Modal
,
Button
,
message
}
from
'antd'
;
import
{
Cascader
,
Card
,
Space
,
Modal
,
Button
,
message
}
from
'antd'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getProductInventoryList
,
getProductMaterialGroupTree
,
getProductWarehouseAll
,
postProductInventorySafetyBatchUpdate
,
}
from
'@/services/ProductV2Api'
;
...
...
@@ -20,6 +21,7 @@ import { inventorySchema, safetyModalSchema } from './schema';
import
styles
from
'./index.less'
;
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
;
import
AuthButton
from
'@/components/AuthButton'
;
const
{
onFormMount$
}
=
FormEffectHooks
const
formActions
=
createFormActions
();
const
modalFormActions
=
createFormActions
();
...
...
@@ -40,6 +42,22 @@ const Inventory: React.FC<{}> = () => {
}
};
const
useAsyncCascader
=
async
(
name
,
service
:
()
=>
Promise
<
any
[]
>
)
=>
{
const
{
setFieldState
}
=
createFormActions
()
onFormMount$
().
subscribe
(()
=>
{
service
().
then
(
res
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
res
)
})
}).
catch
(
err
=>
{
setFieldState
(
name
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
[])
})
})
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
intl
.
formatMessage
({
id
:
'stockSellStorage.huohao'
}),
...
...
@@ -120,8 +138,9 @@ const Inventory: React.FC<{}> = () => {
];
const
fetchListData
=
(
params
:
any
)
=>
{
const
materialGroupId
=
params
.
materialGroupId
?
params
.
materialGroupId
[
params
.
materialGroupId
.
length
-
1
]
:
undefined
return
new
Promise
((
resolve
,
reject
)
=>
{
getProductInventoryList
(
params
)
getProductInventoryList
(
{
...
params
,
materialGroupId
}
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
...
...
@@ -143,6 +162,18 @@ const Inventory: React.FC<{}> = () => {
return
[];
};
const
fetchTreeData
=
async
()
=>
{
try
{
const
{
data
,
code
}
=
await
getProductMaterialGroupTree
({
rootNodeId
:
'0'
});
if
(
code
===
1000
)
{
return
data
;
}
return
[]
}
catch
{
return
[]
}
}
// 修改安全库存
const
handleSubmit
=
async
values
=>
{
setConfirmLoading
(
true
);
...
...
@@ -203,6 +234,7 @@ const Inventory: React.FC<{}> = () => {
expressionScope=
{
{
controllerBtns
,
}
}
components=
{
{
Cascader
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
...
...
@@ -211,6 +243,7 @@ const Inventory: React.FC<{}> = () => {
FORM_FILTER_PATH
,
);
useAsyncSelect
(
'warehouseId'
,
fetchInventory
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
}
}
schema=
{
inventorySchema
}
/>
...
...
src/pages/transaction/stockSellStorage/inventory/schema/index.tsx
View file @
3529ed15
...
...
@@ -87,12 +87,24 @@ export const inventorySchema: ISchema = {
warehouseId
:
{
type
:
'string'
,
'x-component-props'
:
{
style
:
{
width
:
'150px'
},
placeholder
:
intl
.
formatMessage
({
id
:
'stockSellStorage.cangku'
,
}),
},
enum
:
[],
},
materialGroupId
:
{
type
:
'string'
,
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
placeholder
:
'物料组'
,
allowClear
:
true
,
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
style
:
{
width
:
'150px'
},
showSearch
:
true
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
...
...
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