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
a849969c
Commit
a849969c
authored
Aug 25, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 对接售后维修相关
parent
bc342a24
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
115 deletions
+110
-115
index.tsx
...Service/repairApplication/components/DetailInfo/index.tsx
+9
-20
addRepair.tsx
...terService/repairApplication/repairPrSubmit/addRepair.tsx
+9
-2
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+69
-67
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+5
-5
editRepair.tsx
...erService/repairApplication/repairPrSubmit/editRepair.tsx
+8
-1
index.tsx
...afterService/repairManage/components/DetailInfo/index.tsx
+10
-20
No files found.
src/pages/afterService/repairApplication/components/DetailInfo/index.tsx
View file @
a849969c
...
...
@@ -56,7 +56,6 @@ interface DetailInfo extends GetAsRepairGoodsGetDetailByConsumerResponse {
const
DetailInfo
:
React
.
FC
<
DetailInfoProps
>
=
({
id
,
isEdit
=
false
,
target
,
headExtra
=
null
,
})
=>
{
...
...
@@ -90,61 +89,51 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
}
]
:
[
{
title
:
'物料编号'
,
dataIndex
:
'materielNo'
,
align
:
'center'
,
dataIndex
:
'productId'
,
},
{
title
:
'物料名称、规格'
,
dataIndex
:
'materielName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
materielType
}
`
,
dataIndex
:
'productName'
,
render
:
(
text
,
record
)
=>
`
${
text
}${
record
.
type
?
'/'
+
record
.
type
:
''
}
`
,
},
{
title
:
'品类'
,
dataIndex
:
'materielCategory'
,
align
:
'center'
,
dataIndex
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'materielBrand'
,
align
:
'center'
,
dataIndex
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'materielUnit'
,
align
:
'center'
,
dataIndex
:
'unit'
,
},
{
title
:
detailInfo
?.
orderType
!==
ORDER_TYPE_TENDER_CONTRACT
?
'关联报价商品ID、名称、规格、品类、品牌'
:
'关联投标商品ID、名称、规格、品类、品牌'
,
dataIndex
:
'productId'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
productName
}
/
${
record
.
category
}
/
${
record
.
brand
}
`
,
dataIndex
:
'associatedProductId'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
associatedProductName
}
/
${
record
.
associatedType
||
'无'
}
/
${
record
.
associatedCategory
}
/
${
record
.
associatedBrand
}
`
,
},
]
),
...
...
src/pages/afterService/repairApplication/repairPrSubmit/addRepair.tsx
View file @
a849969c
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-25 10:55:49
* @Description:
*/
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
RepairForm
from
'./components/RepairForm'
;
const
AddRepair
:
React
.
FC
=
()
=>
{
const
{
orderId
}
=
usePageStatus
();
const
{
orderId
,
orderType
}
=
usePageStatus
();
return
(
<
RepairForm
orderId=
{
orderId
}
isEdit
/>
<
RepairForm
orderId=
{
orderId
}
orderType=
{
+
orderType
}
isEdit
/>
);
};
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
a849969c
...
...
@@ -51,6 +51,10 @@ interface DetailInfo {
* 订单编号
*/
orderNo
?:
string
,
/**
* 订单类型
*/
orderType
?:
number
,
}
interface
BillsFormProps
{
...
...
@@ -63,6 +67,10 @@ interface BillsFormProps {
* 订单id,从订单列表跳转过来的
*/
orderId
?:
number
,
/**
* 订单类型
*/
orderType
?:
number
,
};
interface
OrderNoProps
{
...
...
@@ -86,6 +94,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
id
,
isEdit
=
false
,
orderId
,
orderType
:
outerOrderType
,
})
=>
{
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
DetailInfo
>
({
applyTime
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
...
...
@@ -109,10 +118,9 @@ const RepairForm: React.FC<BillsFormProps> = ({
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
align
:
'center'
,
render
:
(
text
)
=>
(
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`/memberCenter/afterService/re
pairApplication/repairPrSubmit/orderDetail?orderNo=${text
}`
}
href=
{
`/memberCenter/afterService/re
turnApplication/returnPrSubmit/orderDetail?id=${record.orderId
}`
}
target=
"_blank"
>
{
text
}
...
...
@@ -121,35 +129,28 @@ const RepairForm: React.FC<BillsFormProps> = ({
},
{
title
:
'订单摘要'
,
dataIndex
:
'
orderThe
'
,
align
:
'center'
,
dataIndex
:
'
digest
'
,
ellipsis
:
true
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplyMembersName'
,
align
:
'center'
,
dataIndex
:
'vendorMemberName'
,
},
{
title
:
'下单时间'
,
dataIndex
:
'createTime'
,
align
:
'center'
,
render
:
text
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
},
{
title
:
'订单状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
},
{
title
:
'订单类型'
,
dataIndex
:
'type'
,
align
:
'center'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
dataIndex
:
'orderTypeName'
,
},
isMateriel
?
{
title
:
'合同编号'
,
dataIndex
:
'contractNo'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.contractId}`
}
...
...
@@ -164,47 +165,38 @@ const RepairForm: React.FC<BillsFormProps> = ({
const
childTableColumn
:
ColumnType
<
any
>
[]
=
[
!
isMateriel
?{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
dataIndex
:
'productNo'
,
}
:
{
title
:
'物料编号'
,
dataIndex
:
'materialCode'
,
align
:
'center'
,
dataIndex
:
'productNo'
,
},
!
isMateriel
?
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
dataIndex
:
'name'
,
}
:
{
title
:
'物料名称、规格'
,
dataIndex
:
'materialName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
materialType
}
`
,
dataIndex
:
'name'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
quotedSpec
}
`
,
},
{
title
:
'品类'
,
dataIndex
:
!
isMateriel
?
'category'
:
'materialCategory'
,
align
:
'center'
,
dataIndex
:
!
isMateriel
?
'category'
:
'quotedCategory'
,
},
{
title
:
'品牌'
,
dataIndex
:
!
isMateriel
?
'brand'
:
'materialBrand'
,
align
:
'center'
,
dataIndex
:
!
isMateriel
?
'brand'
:
'quotedBrand'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'订单数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
dataIndex
:
'quantity'
,
},
{
title
:
'已维修数量'
,
dataIndex
:
'repairCount'
,
align
:
'center'
,
dataIndex
:
'maintainCount'
,
},
];
...
...
@@ -227,8 +219,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
orderId
:
item
.
orderId
,
remaining
:
item
.
purchaseCount
||
0
,
// 已维修数量,这里取 采购数量判断即可
},
associated
:
!
item
.
materielId
?
''
:
`
${
item
.
productId
}
/
${
item
.
productName
}
/
${
item
.
category
}
/
${
item
.
brand
}
`
,
materielNameAndType
:
`
${
item
.
materielName
||
''
}${
item
.
materielType
?
'/'
+
item
.
materielType
:
''
}
`
,
associated
:
!
item
.
associatedProductId
?
''
:
`
${
item
.
associatedProductId
}
/
${
item
.
associatedProductName
}
/
${
item
.
associatedType
||
' '
}
/
${
item
.
associatedCategory
}
/
${
item
.
associatedBrand
}
`
,
})));
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
...
...
@@ -305,16 +296,15 @@ const RepairForm: React.FC<BillsFormProps> = ({
return
;
}
setInfoLoading
(
true
);
PublicApi
.
getOrderProcurementOrderDetails
({
id
:
`
${
orderId
}
`
,
orderNo
:
''
,
PublicApi
.
getOrderBuyerDetail
({
orderId
:
`
${
orderId
}
`
,
}
as
any
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
supplyMembers
Name
,
supplyMembers
Id
,
supplyMembers
RoleId
,
vendorMember
Name
,
vendorMember
Id
,
vendor
RoleId
,
orderNo
,
}
=
res
.
data
;
...
...
@@ -326,20 +316,22 @@ const RepairForm: React.FC<BillsFormProps> = ({
);
setDetailInfo
({
applyTime
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
supplierMember
:
supplyMembers
Name
?
applyTime
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
),
supplierMember
:
vendorMember
Name
?
[
{
name
:
supplyMembersName
,
memberId
:
supplyMembersId
,
roleId
:
supplyMembersRoleId
,
},
name
:
vendorMemberName
,
memberId
:
vendorMemberId
,
roleId
:
vendorRoleId
,
},
]
:
[]
,
orderNo
,
,
orderNo
,
orderType
:
+
outerOrderType
,
});
setOrderTypeValue
(
+
outerOrderType
);
}
})
.
catch
((
err
)
=>
{
...
...
@@ -353,14 +345,24 @@ const RepairForm: React.FC<BillsFormProps> = ({
// 根据供应会员获取订单列表
const
getOrderList
=
(
params
):
Promise
<
OrderListRes
>
=>
{
const
supplierMemberValue
=
addSchemaAction
.
getFieldValue
(
'supplierMember'
);
const
{
startDate
=
null
,
endDate
=
null
}
=
params
;
const
payload
=
{
...
params
};
if
(
startDate
)
{
payload
.
startDate
=
moment
(
+
startDate
).
format
(
'YYYY-MM-DD'
);
}
if
(
endDate
)
{
payload
.
endDate
=
moment
(
+
endDate
).
format
(
'YYYY-MM-DD'
);
}
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderAfterSalesOrderList
({
orderNo
:
detailInfo
.
orderNo
,
...
params
,
supplyMembersId
:
supplierMemberValue
[
0
].
memberId
,
supplyMembersRoleId
:
supplierMemberValue
[
0
].
roleId
,
type
:
orderTypeValue
,
PublicApi
.
getOrderCommonAfterSalePage
({
...
payload
,
vendorMemberId
:
supplierMemberValue
[
0
].
memberId
,
vendorRoleId
:
supplierMemberValue
[
0
].
roleId
,
orderType
:
orderTypeValue
,
afterSalesType
:
4
,
// 维修
orderNo
:
detailInfo
.
orderNo
?
detailInfo
.
orderNo
:
params
.
orderNo
||
undefined
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
...
...
@@ -499,13 +501,15 @@ const RepairForm: React.FC<BillsFormProps> = ({
values
.
forEach
(
item
=>
{
const
atom
=
{
orderId
:
item
.
orderId
,
orderNo
:
item
.
orderNo
,
productId
:
item
.
product
Id
,
productName
:
item
.
productN
ame
,
productId
:
item
.
product
No
,
productName
:
item
.
n
ame
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
purchaseCount
:
item
.
purchaseCount
,
purchaseCount
:
item
.
quantity
,
type
:
item
.
type
,
repairReason
:
''
,
extraData
:
{
id
:
item
.
id
,
...
...
@@ -516,15 +520,13 @@ const RepairForm: React.FC<BillsFormProps> = ({
taxRate
:
item
.
taxRate
,
contractId
:
item
.
contractId
,
contractNo
:
item
.
contractNo
,
associated
:
!
isMateriel
?
''
:
`
${
item
.
productId
}
/
${
item
.
productName
}
/
${
item
.
category
}
/
${
item
.
brand
}
`
,
materielId
:
item
.
materialId
,
materielNo
:
item
.
materialCode
,
materielNameAndType
:
`
${
item
.
materialName
||
''
}${
item
.
materialType
?
'/'
+
item
.
materialType
:
''
}
`
,
materielName
:
item
.
materialName
,
materielType
:
item
.
materialType
,
materielCategory
:
item
.
materialCategory
,
materielBrand
:
item
.
materialBrand
,
materielUnit
:
item
.
materialUnit
,
associated
:
!
isMateriel
?
''
:
`
${
item
.
quotedProductNo
}
/
${
item
.
quotedName
}
/
${
item
.
quotedSpec
||
' '
}
/
${
item
.
quotedCategory
}
/
${
item
.
quotedBrand
}
`
,
associatedProductId
:
item
.
quotedProductNo
||
''
,
associatedProductName
:
`
${
item
.
quotedName
||
''
}
`
,
associatedType
:
`
${
item
.
quotedSpec
||
''
}
`
,
associatedCategory
:
item
.
quotedCategory
||
''
,
associatedBrand
:
item
.
quotedBrand
||
''
,
associatedUnit
:
item
.
unit
||
''
,
};
value
.
push
(
atom
);
});
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
a849969c
...
...
@@ -299,27 +299,27 @@ export const addSchema = (orderType: number): ISchema => {
title
:
'订单号'
,
'x-component'
:
'OrderNo'
,
},
materielNo
:
{
productId
:
{
type
:
'string'
,
title
:
'物料编号'
,
'x-component'
:
'Text'
,
},
materielNameAndTyp
e
:
{
productNam
e
:
{
type
:
'string'
,
title
:
'物料名称、规格'
,
'x-component'
:
'Text'
,
},
materielC
ategory
:
{
c
ategory
:
{
type
:
'string'
,
title
:
'品类'
,
'x-component'
:
'Text'
,
},
materielB
rand
:
{
b
rand
:
{
type
:
'string'
,
title
:
'品牌'
,
'x-component'
:
'Text'
,
},
materiel
Unit
:
{
associated
Unit
:
{
type
:
'string'
,
title
:
'单位'
,
'x-component'
:
'Text'
,
...
...
src/pages/afterService/repairApplication/repairPrSubmit/editRepair.tsx
View file @
a849969c
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-25 10:55:56
* @Description:
*/
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
RepairForm
from
'./components/RepairForm'
;
const
EditRepair
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
return
(
<
RepairForm
id=
{
id
}
isEdit
/>
...
...
src/pages/afterService/repairManage/components/DetailInfo/index.tsx
View file @
a849969c
...
...
@@ -90,61 +90,51 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
}
]
:
[
{
title
:
'物料编号'
,
dataIndex
:
'materielNo'
,
align
:
'center'
,
dataIndex
:
'productId'
,
},
{
title
:
'物料名称、规格'
,
dataIndex
:
'materielName'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
materielType
}
`
,
dataIndex
:
'productName'
,
render
:
(
text
,
record
)
=>
`
${
text
}${
record
.
type
?
'/'
+
record
.
type
:
''
}
`
,
},
{
title
:
'品类'
,
dataIndex
:
'materielCategory'
,
align
:
'center'
,
dataIndex
:
'category'
,
},
{
title
:
'品牌'
,
dataIndex
:
'materielBrand'
,
align
:
'center'
,
dataIndex
:
'brand'
,
},
{
title
:
'单位'
,
dataIndex
:
'materielUnit'
,
align
:
'center'
,
dataIndex
:
'unit'
,
},
{
title
:
'关联报价商品ID、名称、规格、品类、品牌'
,
dataIndex
:
'productId'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
productName
}
/
${
record
.
category
}
/
${
record
.
brand
}
`
,
title
:
detailInfo
?.
orderType
!==
ORDER_TYPE_TENDER_CONTRACT
?
'关联报价商品ID、名称、规格、品类、品牌'
:
'关联投标商品ID、名称、规格、品类、品牌'
,
dataIndex
:
'associatedProductId'
,
render
:
(
text
,
record
)
=>
`
${
text
}
/
${
record
.
associatedProductName
}
/
${
record
.
associatedType
||
'无'
}
/
${
record
.
associatedCategory
}
/
${
record
.
associatedBrand
}
`
,
},
]
),
...
...
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