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
linweijiong
jinfa-platform
Commits
942fda90
Commit
942fda90
authored
May 08, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 完善代码逻辑
parent
43d435bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
27 deletions
+28
-27
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+10
-9
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+0
-10
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+18
-8
No files found.
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
942fda90
...
...
@@ -37,7 +37,7 @@ import {
const
addSchemaAction
=
createFormActions
();
const
{
onFormInputChange$
,
onField
Value
Change$
,
onField
Input
Change$
,
onFormInit$
,
}
=
FormEffectHooks
;
...
...
@@ -146,7 +146,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
const
childTableColumn
:
ColumnType
<
any
>
[]
=
[
!
isMateriel
?{
title
:
'ID'
,
title
:
'
商品
ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
}
:
{
...
...
@@ -162,21 +162,21 @@ const RepairForm: React.FC<BillsFormProps> = ({
title
:
'物料名称、规格'
,
dataIndex
:
'materialName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
、
${
record
.
materialType
}
`
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
materialType
}
`
,
},
{
title
:
'品类'
,
dataIndex
:
'c
ategory'
,
dataIndex
:
!
isMateriel
?
'category'
:
'materialC
ategory'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'b
rand'
,
dataIndex
:
!
isMateriel
?
'brand'
:
'materialB
rand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'u
nit'
,
dataIndex
:
!
isMateriel
?
'unit'
:
'materialU
nit'
,
align
:
'center'
,
},
{
...
...
@@ -271,7 +271,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
,
...
rest
,
});
getRepairGoods
(
);
setOrderTypeValue
(
rest
.
orderType
);
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -351,6 +351,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
useEffect
(()
=>
{
getDetailInfo
();
getOrderDetailInfo
();
getRepairGoods
();
},
[]);
const
handleAddGoods
=
()
=>
{
...
...
@@ -396,7 +397,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
setSubmitLoading
(
true
);
const
payload
=
{
repairId
:
id
||
0
,
// 有 id 表示编辑,0表示新增
repairId
:
+
id
||
0
,
// 有 id 表示编辑,0表示新增
supplierMemberId
:
supplierMember
[
0
].
memberId
,
supplierRoleId
:
supplierMember
[
0
].
roleId
,
supplierName
:
supplierMember
[
0
].
name
,
...
...
@@ -589,7 +590,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
}
});
onField
Value
Change$
(
'orderType'
).
subscribe
(
fieldState
=>
{
onField
Input
Change$
(
'orderType'
).
subscribe
(
fieldState
=>
{
setOrderTypeValue
(
fieldState
.
value
);
});
}
}
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
942fda90
...
...
@@ -306,16 +306,6 @@ export const addSchema = (orderType: number): ISchema => {
title
:
'物料名称、规格'
,
'x-component'
:
'Text'
,
},
materielName
:
{
type
:
'string'
,
title
:
'物料名称'
,
'x-component'
:
'Text'
,
},
materielType
:
{
type
:
'string'
,
title
:
'规格'
,
'x-component'
:
'Text'
,
},
materielCategory
:
{
type
:
'string'
,
title
:
'品类'
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
942fda90
...
...
@@ -34,7 +34,7 @@ import {
const
addSchemaAction
=
createFormActions
();
const
{
onFormInputChange$
,
onField
ValueChange$
,
onField
InputChange$
,
onFormInit$
,
}
=
FormEffectHooks
;
...
...
@@ -146,29 +146,38 @@ const ReturnForm: React.FC<BillsFormProps> = ({
].
filter
(
Boolean
)
as
ColumnType
<
any
>
[];
const
childTableColumn
:
ColumnType
<
any
>
[]
=
[
{
!
isMateriel
?
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
}
:
{
title
:
'物料编号'
,
dataIndex
:
'materialCode'
,
align
:
'center'
,
},
{
!
isMateriel
?
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
}
:
{
title
:
'物料名称、规格'
,
dataIndex
:
'materialName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
materialType
}
`
,
},
{
title
:
'品类'
,
dataIndex
:
'c
ategory'
,
dataIndex
:
!
isMateriel
?
'category'
:
'materialC
ategory'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'b
rand'
,
dataIndex
:
!
isMateriel
?
'brand'
:
'materialB
rand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'u
nit'
,
dataIndex
:
!
isMateriel
?
'unit'
:
'materialU
nit'
,
align
:
'center'
,
},
{
...
...
@@ -304,6 +313,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
associated
:
!
item
.
materielId
?
''
:
`
${
item
.
productId
}
/
${
item
.
productName
}
/
${
item
.
category
}
/
${
item
.
brand
}
`
,
materielNameAndType
:
`
${
item
.
materielName
||
''
}${
item
.
materielType
?
'/'
+
item
.
materielType
:
''
}
`
,
})));
setOrderTypeValue
(
rest
.
orderType
);
setGoodsValue
(
goodsDetailList
.
map
(
item
=>
item
.
orderRecordId
));
}
}).
finally
(()
=>
{
...
...
@@ -414,7 +424,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const
payload
=
{
...
rest
,
returnId
:
id
||
0
,
returnId
:
+
id
||
0
,
supplierMemberId
:
supplierMember
[
0
].
memberId
,
supplierRoleId
:
supplierMember
[
0
].
roleId
,
supplierMemberName
:
supplierMember
[
0
].
name
,
...
...
@@ -714,7 +724,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}
});
onField
Value
Change$
(
'orderType'
).
subscribe
(
fieldState
=>
{
onField
Input
Change$
(
'orderType'
).
subscribe
(
fieldState
=>
{
setOrderTypeValue
(
fieldState
.
value
);
});
}
}
...
...
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