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
1a23251a
Commit
1a23251a
authored
Apr 30, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 对接 v2售后维修相关
parent
e1ae334e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
21 deletions
+60
-21
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+2
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+50
-18
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+8
-3
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
1a23251a
...
...
@@ -234,6 +234,8 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
orderNo
:
item
.
orderNo
,
payInfoList
:
item
.
payInfoList
,
orderType
:
item
.
type
,
contractId
:
item
.
contractId
,
contractNo
:
item
.
contractNo
,
});
}
});
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
1a23251a
...
...
@@ -146,15 +146,24 @@ const RepairForm: 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
:
'品类'
,
...
...
@@ -375,6 +384,8 @@ const RepairForm: React.FC<BillsFormProps> = ({
...
rest
}
=
values
;
console
.
log
(
'values'
,
values
)
setSubmitLoading
(
true
);
const
payload
=
{
repairId
:
id
||
0
,
// 有 id 表示编辑,0表示新增
...
...
@@ -387,18 +398,26 @@ const RepairForm: React.FC<BillsFormProps> = ({
filePath
:
item
.
url
,
})),
repairGoodsList
:
repairGoodsList
.
map
(({
repairCount
,
brand
,
unit
,
extraData
,
repairCount
,
brand
,
unit
,
extraData
,
associated
,
...
rest
})
=>
({
orderId
:
extraData
.
orderId
,
orderRecordId
:
extraData
.
id
,
repairCount
:
+
repairCount
,
brand
:
brand
||
''
,
unit
:
unit
||
''
,
...
rest
,
orderId
:
extraData
.
orderId
,
orderRecordId
:
extraData
.
id
,
repairCount
:
+
repairCount
,
brand
:
brand
||
''
,
unit
:
unit
||
''
,
associatedGoods
:
extraData
.
productInfo
?
extraData
.
productInfo
.
productName
:
''
,
associatedDataId
:
extraData
.
productInfo
?
extraData
.
productInfo
.
productId
:
''
,
associatedMaterielNo
:
''
,
associatedMaterielName
:
''
,
associatedType
:
''
,
associatedCategory
:
extraData
.
productInfo
?
extraData
.
productInfo
.
category
:
''
,
associatedBrand
:
extraData
.
productInfo
?
extraData
.
productInfo
.
brand
:
''
,
...
rest
,
})),
...
rest
,
};
...
...
@@ -452,18 +471,31 @@ const RepairForm: React.FC<BillsFormProps> = ({
values
.
forEach
(
item
=>
{
const
atom
=
{
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
orderNo
:
item
.
orderNo
,
productId
:
!
isMateriel
?
item
.
productId
:
item
.
materialId
,
productName
:
!
isMateriel
?
item
.
productName
:
item
.
materialName
,
category
:
!
isMateriel
?
item
.
category
:
item
.
materialCategory
,
brand
:
!
isMateriel
?
item
.
brand
:
item
.
materialBrand
,
unit
:
item
.
unit
,
materielNo
:
!
isMateriel
?
''
:
item
.
materialCode
,
type
:
!
isMateriel
?
''
:
item
.
materialType
,
associated
:
!
isMateriel
?
''
:
`
${
item
.
productId
}
/
${
item
.
productName
}
/
${
item
.
category
}
/
${
item
.
brand
}
`
,
purchaseCount
:
item
.
purchaseCount
,
isHasTax
:
item
.
taxInclusive
,
taxRate
:
item
.
taxRate
,
contractId
:
item
.
contractId
,
contractNo
:
item
.
contractNo
,
repairReason
:
''
,
extraData
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
remaining
:
item
.
purchaseCount
-
(
item
.
repairCount
||
0
),
// 可维修数量
productInfo
:
!
isMateriel
?
null
:
{
productName
:
item
.
productName
,
productId
:
item
.
productId
,
category
:
item
.
category
,
brand
:
item
.
brand
,
},
},
};
value
.
push
(
atom
);
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
1a23251a
...
...
@@ -296,14 +296,19 @@ export const addSchema = (orderType: number): ISchema => {
title
:
'订单号'
,
'x-component'
:
'OrderNo'
,
},
productId
:
{
materielNo
:
{
type
:
'string'
,
title
:
'物料编号'
,
'x-component'
:
'Text'
,
},
productName
:
{
type
:
'string'
,
title
:
'物料名称、规格'
,
title
:
'物料名称'
,
'x-component'
:
'Text'
,
},
type
:
{
type
:
'string'
,
title
:
'规格'
,
'x-component'
:
'Text'
,
},
category
:
{
...
...
@@ -321,7 +326,7 @@ export const addSchema = (orderType: number): ISchema => {
title
:
'单位'
,
'x-component'
:
'Text'
,
},
a
aa
:
{
a
ssociated
:
{
type
:
'string'
,
title
:
orderType
!==
ORDER_TYPE_TENDER_CONTRACT
?
'关联报价商品ID、名称、规格、品类、品牌'
:
'关联投标商品ID、名称、规格、品类、品牌'
,
'x-component'
:
'Text'
,
...
...
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