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
d8ecef5c
Commit
d8ecef5c
authored
Apr 12, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418' into 20418order
parents
48f95e60
0a9abfb2
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
235 additions
and
84 deletions
+235
-84
DraggableHeaderCell.tsx
src/components/SortableTableHeader/DraggableHeaderCell.tsx
+29
-7
index.less
src/components/SortableTableHeader/index.less
+15
-4
useSortableColumns.ts
src/components/SortableTableHeader/useSortableColumns.ts
+3
-1
searchTableSchema.tsx
src/pages/commodity/material/common/searchTableSchema.tsx
+1
-1
useGetDetailCommon.tsx
src/pages/commodity/material/common/useGetDetailCommon.tsx
+5
-5
add.tsx
...ges/commodity/material/materialAuditProcessConfig/add.tsx
+14
-3
index.tsx
...ialAuditProcessConfig/components/selectMaterial/index.tsx
+13
-13
schema.ts
src/pages/commodity/material/materialGroup/schema.ts
+1
-0
add.tsx
src/pages/commodity/material/materialPendingAdd/add.tsx
+24
-10
index.tsx
src/pages/commodity/material/materialPendingAdd/index.tsx
+35
-10
add.tsx
...ages/commodity/material/materialPendingAdd/schema/add.tsx
+28
-3
useInitialValue.tsx
...commodity/material/materialPendingAdd/useInitialValue.tsx
+13
-1
index.tsx
...s/commodity/material/materialPendingExamChangeI/index.tsx
+10
-5
index.tsx
.../commodity/material/materialPendingExamChangeII/index.tsx
+10
-5
index.tsx
src/pages/commodity/material/materialPendingExamI/index.tsx
+11
-5
index.tsx
src/pages/commodity/material/materialPendingExamII/index.tsx
+11
-5
index.tsx
src/pages/commodity/material/materialQuery/index.tsx
+11
-5
sourceList.tsx
src/pages/commodity/material/materialQuery/sourceList.tsx
+1
-1
No files found.
src/components/SortableTableHeader/DraggableHeaderCell.tsx
View file @
d8ecef5c
...
...
@@ -11,13 +11,19 @@ import './index.less';
interface
DraggableHeaderCellProps
{
columnIndex
:
number
,
className
:
string
,
/**
* 是否可拖拽
*/
draggable
:
boolean
,
/**
* 是否可改变大小
*/
resizable
:
boolean
,
children
?:
React
.
ReactNode
,
}
const
DraggableHeaderCell
:
React
.
FC
<
DraggableHeaderCellProps
>
=
(
props
)
=>
{
const
{
className
,
children
,
columnIndex
,
...
restProps
}
=
props
;
// console.log('propsprops', props)
const
{
className
,
children
,
columnIndex
,
draggable
,
resizable
,
...
restProps
}
=
props
;
const
context
=
React
.
useContext
(
SortableContext
);
...
...
@@ -26,14 +32,30 @@ const DraggableHeaderCell: React.FC<DraggableHeaderCellProps> = (props) => {
};
return
(
<
th
className=
{
classNames
(
className
,
'sortable-header-cell'
)
}
{
...
restProps
}
>
{
columnIndex
!==
undefined
?
(
<
th
className=
{
classNames
(
className
,
'sortable-header-cell'
,
{
'sortable-header-cell__active'
:
draggable
,
},
)
}
{
...
restProps
}
>
{
draggable
?
(
<
span
className=
{
classNames
(
'draggable-header-handle'
,
'columns-draggable-handle'
)
}
>
<
HolderOutlined
style=
{
{
color
:
'rgba(0, 0, 0, 0.45)'
}
}
/>
<
HolderOutlined
style=
{
{
color
:
'rgba(0, 0, 0, 0.45)'
,
fontSize
:
16
,
position
:
'relative'
,
top
:
-
2
,
}
}
/>
</
span
>
)
:
null
}
{
children
}
{
columnIndex
!==
undefined
?
(
{
resizable
?
(
<
ResizableHandleBar
onSlide=
{
handleCellWidthChange
}
/>
)
:
null
}
</
th
>
...
...
src/components/SortableTableHeader/index.less
View file @
d8ecef5c
...
...
@@ -4,12 +4,14 @@
.sortable-header-cell {
cursor: pointer;
transition: all .3s;
transition: all .3s
!important
;
position: relative;
user-select: none;
overflow: visible;
&__active {
&:hover {
padding-left: @padding-md * 2;
background-color: #EBF9F6;
.@{draggable-header-prefix}-handle {
...
...
@@ -20,16 +22,25 @@
opacity: 1 !important;
}
}
}
.@{draggable-header-prefix} {
&-handle {
position: absolute;
top: 50%;
left: @margin-xss / 2;
top: 0;
left: 0;
bottom: 0;
z-index: 1;
transform: translateY(-50%);
padding: @padding-xs;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
cursor: grabbing;
&:hover {
background-color: rgba(255, 0, 0, 0.1);
}
}
}
}
src/components/SortableTableHeader/useSortableColumns.ts
View file @
d8ecef5c
...
...
@@ -19,7 +19,9 @@ const normailizeAdditionalHeaderCell = (dataSource: ColumnType<any>[]) => {
onHeaderCell
:
()
=>
{
return
{
...(
item
.
onHeaderCell
?.(
item
)
||
{}),
columnIndex
:
index
!==
dataSource
.
length
-
1
?
index
:
undefined
,
columnIndex
:
index
,
draggable
:
!
item
.
fixed
,
resizable
:
index
!==
dataSource
.
length
-
1
,
};
},
};
...
...
src/pages/commodity/material/common/searchTableSchema.tsx
View file @
d8ecef5c
...
...
@@ -73,7 +73,7 @@ export const getSchema = (options: Options) => {
style
:
{
width
:
'150px'
},
},
},
categoryId
:
{
c
ustomerC
ategoryId
:
{
type
:
'string'
,
'x-component'
:
'Cascader'
,
'x-component-props'
:
{
...
...
src/pages/commodity/material/common/useGetDetailCommon.tsx
View file @
d8ecef5c
...
...
@@ -62,7 +62,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title
:
'规格型号'
,
value
:
'M20型号'
value
:
initialValue
?.
type
},
{
title
:
'品牌'
,
...
...
@@ -74,7 +74,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title
:
'备注'
,
value
:
initialValue
?.
rema
rk
||
''
value
:
initialValue
?.
rema
ke
||
''
},
{
title
:
'品类'
,
...
...
@@ -150,7 +150,7 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
{
title
:
'附件'
,
render
:
(
text
,
record
)
=>
{
const
value
=
{
name
:
'设计图纸pdf'
,
url
:
''
};
const
value
=
{
name
:
record
.
name
,
url
:
record
.
url
};
return
(
<
FileItem
value=
{
value
}
/>
)
...
...
@@ -158,10 +158,10 @@ function useGetDetailCommon<T extends GetProductGoodsGetGoodsProcessDetailRespon
},
{
title
:
'备注'
,
dataIndex
:
'desc'
dataIndex
:
'desc
ription
'
}
]
},
[
initialValue
])
},
[])
/**
* 内部单据流转记录
...
...
src/pages/commodity/material/materialAuditProcessConfig/add.tsx
View file @
d8ecef5c
...
...
@@ -92,7 +92,18 @@ const Add = () => {
let
materialGroups
=
[]
if
(
data
.
suitableMaterialType
===
MATERIAL_ITEM
)
{
const
listData
=
await
getProductMaterialProcessPageRelMaterial
({
processId
:
id
})
materials
=
[...
listData
.
data
];
materials
=
[...
listData
.
data
].
map
((
_item
)
=>
{
return
{
name
:
_item
.
materialName
,
code
:
_item
?.
materialCode
||
''
,
materialGroup
:
{
name
:
_item
.
materialGroupName
,
},
id
:
_item
.
materialId
,
...
_item
,
}
});
}
if
(
data
.
suitableMaterialType
===
GROUP
)
{
...
...
@@ -129,11 +140,11 @@ const Add = () => {
}
}),
}
}
else
if
(
values
.
suitableMaterialType
===
2
)
{
}
else
if
(
values
.
suitableMaterialType
===
3
)
{
tempData
=
{
materials
:
values
.
materials
?.
map
((
_item
)
=>
{
return
{
materialId
:
_item
,
materialId
:
_item
.
id
,
}
})
}
...
...
src/pages/commodity/material/materialAuditProcessConfig/components/selectMaterial/index.tsx
View file @
d8ecef5c
...
...
@@ -58,19 +58,19 @@ const SelectMaterial: React.FC<Iprops> & { isFieldComponent: boolean} = (props:
{
title
:
'规格型号'
,
dataIndex
:
'type'
,
render
:
(
text
,
record
)
=>
{
const
{
materialAttributeList
}
=
record
;
const
string
=
materialAttributeList
?.
reduce
((
prev
,
current
)
=>
{
const
{
customerAttributeValueList
}
=
current
;
const
temp
=
customerAttributeValueList
?.
map
((
_item
)
=>
{
return
_item
.
value
}).
join
(
'/'
);
return
prev
+
"/"
+
temp
},
""
).
slice
(
1
);
return
(
<
div
>
{
string
}
</
div
>
)
}
//
render: (text, record) => {
//
const { materialAttributeList } = record;
//
const string = materialAttributeList?.reduce((prev, current) => {
//
const { customerAttributeValueList } = current;
//
const temp = customerAttributeValueList?.map((_item) => {
//
return _item.value
//
}).join('/');
//
return prev + "/" + temp
//
}, "").slice(1);
//
return (
//
<div>{string}</div>
//
)
//
}
},
{
title
:
'品类'
,
...
...
src/pages/commodity/material/materialGroup/schema.ts
View file @
d8ecef5c
...
...
@@ -24,6 +24,7 @@ export const schema: ISchema = {
{
limitByte
:
true
,
maxByte
:
12
,
allowChineseTransform
:
false
,
}
]
},
...
...
src/pages/commodity/material/materialPendingAdd/add.tsx
View file @
d8ecef5c
...
...
@@ -210,9 +210,10 @@ const MaterialAdd = (props) => {
const
toArrayData
=
Array
.
isArray
(
rest
[
_item
])
?
rest
[
_item
]
:
[
rest
[
_item
]]
const
customerAttributeValueList
=
toArrayData
.
map
((
_row
)
=>
{
const
splitData
=
_row
?.
split
(
"-"
);
const
isInput
=
splitData
.
length
===
1
return
{
id
:
splitData
[
0
],
value
:
splitData
[
1
]
id
:
isInput
?
null
:
splitData
[
0
],
value
:
isInput
?
splitData
[
0
]
:
splitData
[
1
]
}
})
return
{
...
...
@@ -238,8 +239,7 @@ const MaterialAdd = (props) => {
...
withMaterialGroup
,
...
withChangeData
,
}
console
.
log
(
postData
)
// return;
console
.
log
(
"postData"
,
postData
)
setSubmitLoading
(
true
);
const
{
code
,
data
}
=
await
postProductGoodsSaveOrUpdateGoods
(
postData
);
setSubmitLoading
(
false
);
...
...
@@ -249,12 +249,21 @@ const MaterialAdd = (props) => {
history
.
back
();
},
100
)
}
console
.
log
(
"postData"
,
postData
)
}
const
renderTitle
=
()
=>
{
if
(
isEdit
)
{
return
'编辑物料'
}
if
(
isAdd
)
{
return
'新增物料'
}
return
'查看物料详情'
}
return
(
<
AnchorPage
title=
{
"新增物料"
}
title=
{
renderTitle
()
}
anchors=
{
anchorHeader
}
extra=
{
(
isAdd
||
isEdit
)
&&
(
...
...
@@ -289,10 +298,17 @@ const MaterialAdd = (props) => {
}
}
effects=
{
(
$
,
actions
)
=>
{
useAsyncCascader
(
'category'
,
fetchCategoryData
)
useAsyncSelect
(
'brand
Id
'
,
fetchBrand
,
[
"name"
,
"id"
])
useAsyncSelect
(
'brand'
,
fetchBrand
,
[
"name"
,
"id"
])
useAsyncCascader
(
'materialGroup'
,
fetchTreeData
);
useAsyncSelect
(
'unitId'
,
fetchUnit
,
[
"name"
,
"id"
])
$
(
'onFieldInputChange'
,
'category'
).
subscribe
((
fieldState
)
=>
{
$
(
'onFormMount'
).
subscribe
(()
=>
{
if
(
isEdit
)
{
formActions
.
setFieldState
(
'code'
,
(
state
)
=>
{
FormPath
.
setIn
(
state
,
'editable'
,
false
);
})
}
})
$
(
'onFieldValueChange'
,
'category'
).
subscribe
((
fieldState
)
=>
{
if
(
!
fieldState
.
value
||
fieldState
.
value
.
length
===
0
)
{
setSchema
(
getSchema
(
...
...
@@ -302,8 +318,6 @@ const MaterialAdd = (props) => {
return
;
}
const
categoryId
=
[...
fieldState
.
value
].
pop
();
console
.
log
(
categoryId
);
getProductCustomerGetCustomerCategoryById
({
id
:
categoryId
})
.
then
((
data
)
=>
{
console
.
log
(
data
);
...
...
src/pages/commodity/material/materialPendingAdd/index.tsx
View file @
d8ecef5c
...
...
@@ -9,7 +9,7 @@ import { Button, Card, Cascader, message, Modal, Popconfirm, Space, Spin } from
import
{
getColumn
}
from
'../common/columns'
;
import
{
createFormActions
,
Schema
}
from
'@formily/antd'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
GetProductGoodsGetMaterialListRequest
,
getProductGoodsGetSubGoodsList
,
getProductGoodsGetToBeAddGoodsList
,
postProductGoodsDeleteBatchGoods
,
postProductGoodsSubmit
}
from
'@/services/ProductV2Api'
;
import
{
GetProductGoodsGetMaterialListRequest
,
getProductGoodsGetSubGoodsList
,
getProductGoodsGetToBeAddGoodsList
,
getProductMaterialProcessIsExistMaterialProcess
,
postProductGoodsDeleteBatchGoods
,
postProductGoodsSubmit
}
from
'@/services/ProductV2Api'
;
import
{
SearchParams
}
from
'../materialQuery'
;
import
{
EMPTY
,
fetchBrand
,
fetchCategoryData
,
fetchTreeData
,
useAsyncCascader
}
from
'../common/useGetTableSearchData'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
...
...
@@ -43,19 +43,37 @@ const MaterialQuery = () => {
const
handleSubmit
=
async
(
_row
)
=>
{
setIsLoading
((
prev
)
=>
prev
.
concat
(
_row
.
id
))
const
{
data
,
code
}
=
await
postProductGoodsSubmit
({
id
:
_row
.
id
});
setIsLoading
((
prev
)
=>
prev
.
filter
((
_item
)
=>
_item
!==
_row
.
id
))
if
(
code
===
1000
)
{
formActions
.
submit
();
}
else
if
(
code
===
43149
)
{
try
{
const
materialGroupId
=
_row
.
materialGroup
?.
id
?
{
materialGroupId
:
_row
.
materialGroup
?.
id
}
:
{}
const
processRes
=
await
getProductMaterialProcessIsExistMaterialProcess
({
materialId
:
_row
.
id
,
processType
:
_row
.
interiorState
===
1
?
`1`
:
`2`
,
...
materialGroupId
,
}
as
any
)
if
(
processRes
.
code
!==
1000
||
!
processRes
.
data
)
{
Modal
.
warning
({
title
:
'提交提醒'
,
content
:
`当前还未创建审核工作流, 请在物料审核流程规则配置设置`
,
content
:
(
<
div
>
当前还未创建审核工作流, 请在
<
a
target=
{
"_blank"
}
href=
{
`/memberCenter/commodityAbility/material/materialAuditProcessConfig`
}
>
物料审核流程规则配置
</
a
>
设置
</
div
>
),
onOk
()
{
console
.
log
(
'OK'
);
},
});
return
;
}
const
{
data
,
code
}
=
await
postProductGoodsSubmit
({
id
:
_row
.
id
});
if
(
code
===
1000
)
{
formActions
.
submit
();
}
}
catch
(
e
)
{}
finally
{
setIsLoading
((
prev
)
=>
prev
.
filter
((
_item
)
=>
_item
!==
_row
.
id
))
}
}
const
columns
=
getColumn
({
...
...
@@ -161,11 +179,17 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
SearchParams
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
result
=
{
...
values
,
...
formatMaterialGroup
Id
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatCategory
Id
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -210,6 +234,7 @@ const MaterialQuery = () => {
unitId
:
target
.
unitId
,
name
:
target
.
name
,
goodsId
:
target
.
id
,
type
:
target
.
type
,
}
}
})
...
...
src/pages/commodity/material/materialPendingAdd/schema/add.tsx
View file @
d8ecef5c
...
...
@@ -44,11 +44,26 @@ export const getSchema = (schema: ISchema): ISchema => {
{
limitByte
:
true
,
maxByte
:
20
,
allowChineseTransform
:
false
},
{
pattern
:
/
(?=
.*
[
0-9
])(?=
.*
[
~!@#$%^&*()_+`
\-
={}:";'<>?,.
\/])(?=
.*
[
a-zA-Z
])
/
,
message
:
'编号由英文(不分大小写)、数字、特殊字符组成'
}
},
]
},
type
:
{
title
:
'规格型号'
,
type
:
'string'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请填写规格型号'
},
{
limitByte
:
true
,
maxByte
:
24
,
},
]
},
unitId
:
{
...
...
@@ -217,6 +232,10 @@ export const getSchema = (schema: ISchema): ISchema => {
{
required
:
true
,
message
:
'请填写备注'
,
},
{
limitByte
:
true
,
maxByte
:
200
,
}
]
}
...
...
@@ -253,7 +272,13 @@ export const getSchema = (schema: ISchema): ISchema => {
properties
:
{
changeRemark
:
{
title
:
'变更内容'
,
type
:
'textarea'
type
:
'textarea'
,
'x-rules'
:
[
{
limitByte
:
true
,
maxByte
:
200
,
}
]
}
}
},
...
...
@@ -351,7 +376,7 @@ export const propsCardSchema = (schema: ISchema): ISchema => {
"x-component"
:
'MellowCard'
,
"x-component-props"
:
{
id
:
'type'
,
title
:
'
规格型号
'
title
:
'
属性
'
},
properties
:
{
layout
:
{
...
...
src/pages/commodity/material/materialPendingAdd/useInitialValue.tsx
View file @
d8ecef5c
...
...
@@ -12,6 +12,8 @@ type Options = {
memberRoleId
:
number
,
unitId
:
string
,
name
:
string
/** 规格 */
type
:
string
}
},
query
?:
{
...
...
@@ -49,6 +51,14 @@ function useInitialValue(options: Options) {
return
null
}
const
category
=
initialValue
.
customerCategory
?.
fullId
?.
split
(
'.'
).
map
((
_item
)
=>
_item
.
replace
(
/0+/
,
""
));
const
customerAttribute
=
{};
initialValue
?.
materialAttributeList
.
forEach
((
_item
)
=>
{
/** 1-单选、2-多选、3-输入 */
const
isInput
=
_item
.
customerAttributeValueList
?.[
0
]?.
type
===
3
;
const
res
=
isInput
?
`
${
_item
.
customerAttributeValueList
?.[
0
]?.
value
}
` : `
$
{
_item
.
customerAttributeValueList
?.[
0
]?.
id
}
-
$
{
_item
.
customerAttributeValueList
?.[
0
]?.
value
}
`
customerAttribute[`
customerAttribute
-
$
{
_item
.
customerAttribute
.
id
}
`] = res;
})
return {
...initialValue,
brand: initialValue?.brand?.id,
...
...
@@ -63,7 +73,9 @@ function useInitialValue(options: Options) {
goodsPic: initialValue.goodsPic?.map((_item) => ({
name: _item,
url: _item,
}))
})),
remark: initialValue?.remake,
...customerAttribute,
}
}, [initialValue])
...
...
src/pages/commodity/material/materialPendingExamChangeI/index.tsx
View file @
d8ecef5c
...
...
@@ -77,11 +77,16 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
any
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
result
=
{
...
values
,
...
formatMaterialGroupId
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatCategoryId
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -99,7 +104,7 @@ const MaterialQuery = () => {
return
(
<
PageHeaderWrapper
title=
{
"
物料
"
}
title=
{
"
待审核变更一级
"
}
>
<
Card
>
<
StandardTable
...
...
@@ -120,7 +125,7 @@ const MaterialQuery = () => {
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'c
ustomerC
ategoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
}
}
/>
...
...
src/pages/commodity/material/materialPendingExamChangeII/index.tsx
View file @
d8ecef5c
...
...
@@ -79,11 +79,16 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
any
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
result
=
{
...
values
,
...
formatMaterialGroupId
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatCategoryId
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -101,7 +106,7 @@ const MaterialQuery = () => {
return
(
<
PageHeaderWrapper
title=
{
"
物料
"
}
title=
{
"
待审核变更二级
"
}
>
<
Card
>
<
StandardTable
...
...
@@ -122,7 +127,7 @@ const MaterialQuery = () => {
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'c
ustomerC
ategoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
}
}
/>
...
...
src/pages/commodity/material/materialPendingExamI/index.tsx
View file @
d8ecef5c
...
...
@@ -77,11 +77,17 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
any
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
result
=
{
...
values
,
...
formatMaterialGroup
Id
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatCategory
Id
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -99,7 +105,7 @@ const MaterialQuery = () => {
return
(
<
PageHeaderWrapper
title=
{
"
物料
"
}
title=
{
"
待审核一级
"
}
>
<
Card
>
<
StandardTable
...
...
@@ -120,7 +126,7 @@ const MaterialQuery = () => {
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'c
ustomerC
ategoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
}
}
/>
...
...
src/pages/commodity/material/materialPendingExamII/index.tsx
View file @
d8ecef5c
...
...
@@ -77,11 +77,17 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
any
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
result
=
{
...
values
,
...
formatMaterialGroup
Id
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatCategory
Id
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -99,7 +105,7 @@ const MaterialQuery = () => {
return
(
<
PageHeaderWrapper
title=
{
"
物料
"
}
title=
{
"
待审核二级
"
}
>
<
Card
>
<
StandardTable
...
...
@@ -120,7 +126,7 @@ const MaterialQuery = () => {
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'c
ustomerC
ategoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
}
}
/>
...
...
src/pages/commodity/material/materialQuery/index.tsx
View file @
d8ecef5c
...
...
@@ -25,7 +25,8 @@ const querySchema = getSchema({ showStatus: true });
export
type
SearchParams
=
Omit
<
GetProductGoodsGetMaterialListRequest
,
'materialGroupId'
>
&
{
materialGroupId
:
string
[],
status
:
string
|
number
status
:
string
|
number
,
customerCategoryId
:
string
[],
}
const
URL_PREFIX
=
'/memberCenter/commodityAbility/material'
...
...
@@ -195,12 +196,17 @@ const MaterialQuery = () => {
}
const
handleSearch
=
(
values
:
SearchParams
)
=>
{
const
formatMaterialGroupId
=
values
.
materialGroupId
&&
values
.
materialGroupId
.
length
>
0
?
{
materialGroupId
:
values
.
materialGroupId
?.
pop
()
}
const
{
materialGroupId
,
customerCategoryId
,
status
,
...
rest
}
=
values
;
const
formatMaterialGroupId
=
materialGroupId
&&
materialGroupId
.
length
>
0
?
{
materialGroupId
:
materialGroupId
?.
pop
()
}
:
{
}
const
formatCategoryId
=
customerCategoryId
&&
customerCategoryId
.
length
>
0
?
{
customerCategoryId
:
customerCategoryId
?.
pop
()
}
:
{
}
const
formatStatus
=
values
.
status
?
{
ids
:[
values
.
status
]
}
:
{}
const
result
=
{
...
values
,
...
formatMaterialGroupId
,
...
formatStatus
}
const
result
=
{
...
rest
,
...
formatMaterialGroupId
,
...
formatStatus
,
...
formatCategoryId
}
ref
.
current
.
reload
(
result
)
};
...
...
@@ -247,7 +253,7 @@ const MaterialQuery = () => {
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'code'
,
FORM_FILTER_PATH
);
useAsyncCascader
(
'materialGroupId'
,
fetchTreeData
)
useAsyncCascader
(
'categoryId'
,
fetchCategoryData
)
useAsyncCascader
(
'c
ustomerC
ategoryId'
,
fetchCategoryData
)
useAsyncSelect
(
'brandId'
,
fetchBrand
,
[
"name"
,
"id"
])
useAsyncSelect
(
'status'
,
fetchStatus
,
[
"name"
,
"status"
])
}
}
...
...
src/pages/commodity/material/materialQuery/sourceList.tsx
View file @
d8ecef5c
...
...
@@ -74,7 +74,7 @@ const SourceList = () => {
const
renderAddition
=
()
=>
(
<
div
className=
{
styles
.
addition
}
onClick=
{
handleOpenModal
}
>
<
PlusOutlined
/>
<
span
className=
{
styles
.
text
}
>
新增附件信息
</
span
>
<
span
className=
{
styles
.
text
}
>
编辑供应商
</
span
>
</
div
>
)
...
...
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