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
黄庭坚
jinfa-platform
Commits
020a6280
Commit
020a6280
authored
Nov 10, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
699bd636
188b5f40
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
326 additions
and
266 deletions
+326
-266
CustomRelevance.tsx
src/components/NiceForm/components/CustomRelevance.tsx
+3
-1
index.ts
src/constants/index.ts
+35
-0
index.tsx
src/pages/afterService/components/AddressFormItem/index.tsx
+11
-10
index.ts
...ges/afterService/components/FinishedModal/schema/index.ts
+2
-2
constants.ts
src/pages/afterService/constants.ts
+38
-0
index.tsx
...afterService/repairApplication/repairPrFinished/index.tsx
+59
-59
index.ts
...ervice/repairApplication/repairPrFinished/schema/index.ts
+3
-4
verify.tsx
...fterService/repairApplication/repairPrFinished/verify.tsx
+18
-5
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+22
-49
index.tsx
...s/afterService/repairApplication/repairPrSubmit/index.tsx
+60
-60
index.ts
...rService/repairApplication/repairPrSubmit/schema/index.ts
+6
-6
index.tsx
...ages/afterService/repairApplication/repairQuery/index.tsx
+48
-59
index.ts
...fterService/repairApplication/repairQuery/schema/index.ts
+3
-4
index.tsx
...nage/quotaMenage/detail/components/IntroduceRow/index.tsx
+5
-1
index.tsx
...anage/quotaMenage/detail/components/TradeRecord/index.tsx
+13
-6
No files found.
src/components/NiceForm/components/CustomRelevance.tsx
View file @
020a6280
...
...
@@ -63,7 +63,9 @@ const Relevance = props => {
const
keys
=
rows
.
map
(
item
=>
item
[
tableRowKey
]);
if
(
props
.
mutators
)
{
props
.
mutators
.
change
(
rows
);
if
(
rows
&&
rows
.
length
)
{
props
.
mutators
.
change
(
rows
);
}
setVisible
(
false
);
return
;
}
...
...
src/constants/index.ts
View file @
020a6280
...
...
@@ -986,4 +986,38 @@ export const CREDIT_OUTER_STATUS = {
[
CREDIT_OUTER_STATUS_UNCONFIRMED
]:
'待确认'
,
[
CREDIT_OUTER_STATUS_SUCCESS
]:
'接受申请'
,
[
CREDIT_OUTER_STATUS_FAILED
]:
'不接受申请'
,
};
// 售后维修申请内部状态
export
const
REPAIR_INNER_STATUS_UNCOMMITTED
=
1
;
// 待提交维修
export
const
REPAIR_INNER_STATUS_COMMITTED
=
2
;
// 已提交
export
const
REPAIR_INNER_STATUS_SUCCESS_1
=
3
;
// 一级审核通过
export
const
REPAIR_INNER_STATUS_SUCCESS_2
=
4
;
// 二级审核通过
export
const
REPAIR_INNER_STATUS_FAILED
=
5
;
// 审核不通过(不接受申请)
export
const
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
=
6
;
// 确认审核通过
export
const
REPAIR_INNER_STATUS_CONFIRM_FAILED
=
7
;
// 确认审核不通过
export
const
REPAIR_INNER_STATUS_FINISHED
=
8
;
// 确认售后完成
export
const
REPAIR_INNER_STATUS
=
{
[
REPAIR_INNER_STATUS_UNCOMMITTED
]:
'待提交'
,
[
REPAIR_INNER_STATUS_COMMITTED
]:
'已提交'
,
[
REPAIR_INNER_STATUS_SUCCESS_1
]:
'一级审核通过'
,
[
REPAIR_INNER_STATUS_SUCCESS_2
]:
'二级审核通过'
,
[
REPAIR_INNER_STATUS_FAILED
]:
'审核不通过'
,
[
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
]:
'确认审核通过'
,
[
REPAIR_INNER_STATUS_CONFIRM_FAILED
]:
'确认审核不通过'
,
[
REPAIR_INNER_STATUS_FINISHED
]:
'确认售后完成'
,
};
// 售后维修申请外部状态
export
const
REPAIR_OUTER_STATUS_UNCOMMITTED
=
1
;
// 待提交申请单
export
const
REPAIR_OUTER_STATUS_UNCONFIRMED
=
2
;
// 待确认
export
const
REPAIR_OUTER_STATUS_FAILED
=
3
;
// 不接受申请
export
const
REPAIR_OUTER_STATUS_SUCCESS
=
4
;
// 接受申请
export
const
REPAIR_OUTER_STATUS_FINISHED
=
5
;
// 售后完成
export
const
REPAIR_OUTER_STATUS
=
{
[
REPAIR_OUTER_STATUS_UNCOMMITTED
]:
'待提交'
,
[
REPAIR_OUTER_STATUS_UNCONFIRMED
]:
'待确认'
,
[
REPAIR_OUTER_STATUS_FAILED
]:
'不接受申请'
,
[
REPAIR_OUTER_STATUS_SUCCESS
]:
'接受申请'
,
[
REPAIR_OUTER_STATUS_FINISHED
]:
'售后完成'
,
};
\ No newline at end of file
src/pages/afterService/components/AddressFormItem/index.tsx
View file @
020a6280
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 10:30:54
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
05 13:51:47
* @LastEditTime: 2020-11-
10 10:48:56
* @Description: 地址 Form Item
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -37,15 +37,15 @@ const AddressFormItem: React.FC<AddressFormItemProps> & { isFieldComponent: bool
})
=>
{
const
[
showMore
,
setShowMore
]
=
useState
(
false
);
useEffect
(()
=>
{
// 默认选中第一个
if
(
dataSource
&&
dataSource
.
length
&&
!
value
)
{
if
(
onChange
)
{
onChange
(
dataSource
[
0
].
id
);
}
}
//
useEffect(() => {
//
// 默认选中第一个
//
if (dataSource && dataSource.length && !value) {
//
if (onChange) {
//
onChange(dataSource[0].id);
//
}
//
}
},
[
dataSource
]);
//
}, [dataSource]);
const
showDataSource
=
!
showMore
?
[...
dataSource
].
splice
(
0
,
showCount
)
:
dataSource
;
...
...
@@ -94,6 +94,6 @@ const AddressFormItem: React.FC<AddressFormItemProps> & { isFieldComponent: bool
AddressFormItem
.
defaultProps
=
{};
AddressFormItem
.
isFieldComponent
=
tru
e
;
AddressFormItem
.
isFieldComponent
=
fals
e
;
export
default
AddressFormItem
;
\ No newline at end of file
src/pages/afterService/components/FinishedModal/schema/index.ts
View file @
020a6280
...
...
@@ -10,7 +10,7 @@ export const auditModalSchema: ISchema = {
labelAlign
:
'top'
,
},
properties
:
{
star
:
{
level
:
{
type
:
'string'
,
title
:
'售后满意度'
,
default
:
5
,
...
...
@@ -24,7 +24,7 @@ export const auditModalSchema: ISchema = {
'x-component'
:
'radio'
,
'x-component-props'
:
{},
},
co
mm
ent
:
{
co
nt
ent
:
{
type
:
'string'
,
title
:
'售后评价'
,
'x-component'
:
'textarea'
,
...
...
src/pages/afterService/constants.ts
0 → 100644
View file @
020a6280
import
{
REPAIR_OUTER_STATUS_UNCOMMITTED
,
REPAIR_OUTER_STATUS_UNCONFIRMED
,
REPAIR_OUTER_STATUS_FAILED
,
REPAIR_OUTER_STATUS_SUCCESS
,
REPAIR_OUTER_STATUS_FINISHED
,
REPAIR_INNER_STATUS_UNCOMMITTED
,
REPAIR_INNER_STATUS_COMMITTED
,
REPAIR_INNER_STATUS_SUCCESS_1
,
REPAIR_INNER_STATUS_SUCCESS_2
,
REPAIR_INNER_STATUS_FAILED
,
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
,
REPAIR_INNER_STATUS_CONFIRM_FAILED
,
REPAIR_INNER_STATUS_FINISHED
,
}
from
'@/constants'
;
// 售后维修外部状态 StatusTag map
export
const
REPAIR_OUTER_STATUS_TAG_MAP
=
{
[
REPAIR_OUTER_STATUS_UNCOMMITTED
]:
'default'
,
[
REPAIR_OUTER_STATUS_UNCONFIRMED
]:
'success'
,
[
REPAIR_OUTER_STATUS_FAILED
]:
'danger'
,
[
REPAIR_OUTER_STATUS_SUCCESS
]:
'primary'
,
[
REPAIR_OUTER_STATUS_FINISHED
]:
'success'
,
};
// 售后维修内部部状态 Badge map
export
const
REPAIR_INNER_STATUS_BADGE_MAP
=
{
[
REPAIR_INNER_STATUS_UNCOMMITTED
]:
'#669EDE'
,
[
REPAIR_INNER_STATUS_COMMITTED
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_SUCCESS_1
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_SUCCESS_2
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_FAILED
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
]:
'#6C9CEB'
,
[
REPAIR_INNER_STATUS_CONFIRM_FAILED
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_FINISHED
]:
'#41CC9E'
,
};
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrFinished/index.tsx
View file @
020a6280
...
...
@@ -27,9 +27,9 @@ import NiceForm from '@/components/NiceForm';
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT
_OUTER_STATUS_TAG_MAP
,
CREDIT
_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
REPAIR
_OUTER_STATUS_TAG_MAP
,
REPAIR
_INNER_STATUS_BADGE_MAP
,
}
from
'../../con
s
tants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
...
...
@@ -54,17 +54,17 @@ const RepairPrFinished: React.FC = () => {
},
{
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
dataIndex
:
'supplier
Name
'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
},
{
...
...
@@ -74,7 +74,7 @@ const RepairPrFinished: React.FC = () => {
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
outerStatus
]
}
title=
{
text
}
/>
),
},
{
...
...
@@ -83,7 +83,7 @@ const RepairPrFinished: React.FC = () => {
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
REPAIR_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
...
...
@@ -106,67 +106,67 @@ const RepairPrFinished: React.FC = () => {
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsRepairGoodsPageToBeConfirmComplete
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
// return Promise.resolve({
// data: [
// {
// id: 1,
// applyNo: '123',
// parentMemberName: '申请单摘要',
// created: '2020-11-03 11:46:00',
// },
// ],
// total: 10,
// });
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer
();
const
res
=
await
PublicApi
.
getAsRepairGoodsPageItems
();
//
if (res.code === 1000) {
//
const { data } = res;
//
const {
//
outerStatusList = [],
//
innerStatusList = [],
//
} = data;
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
{
outerStatusList
=
[],
innerStatusList
=
[],
}
=
data
;
//
const newColumns = columns.slice();
const
newColumns
=
columns
.
slice
();
//
// filter 0 过滤掉全部选项
//
coverColFiltersItem(
//
newColumns,
//
'outerStatusName',
//
outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
//
coverColFiltersItem(
//
newColumns,
//
'innerStatusName',
//
innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
// filter 0 过滤掉全部选项
coverColFiltersItem
(
newColumns
,
'outerStatusName'
,
outerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
coverColFiltersItem
(
newColumns
,
'innerStatusName'
,
innerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
//
setColumns(newColumns);
setColumns
(
newColumns
);
//
return {
//
outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
};
//
}
return
{
outerStatus
:
outerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
innerStatus
:
innerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
};
}
return
{};
};
...
...
src/pages/afterService/repairApplication/repairPrFinished/schema/index.ts
View file @
020a6280
...
...
@@ -35,7 +35,7 @@ export const listSearchSchema: ISchema = {
columns
:
6
,
},
properties
:
{
abstract
:
{
a
pplyA
bstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
...
...
@@ -51,12 +51,11 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
supplier
:
{
supplier
Name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员
(全部)
'
,
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
...
...
src/pages/afterService/repairApplication/repairPrFinished/verify.tsx
View file @
020a6280
/*
* @Author: XieZhiXiong
* @Date: 2020-11-0
4 17:22:07
* @Date: 2020-11-0
6 17:21:54
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
04 17:29:08
* @Description:
* @LastEditTime: 2020-11-
10 15:08:07
* @Description:
确认售后完成
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
...
...
@@ -15,12 +15,25 @@ import DetailInfo from '../components/DetailInfo';
import
FinishedModal
from
'../../components/FinishedModal'
;
const
RepairPrFinishedDetailVerify
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setConfirmLoading
(
true
);
PublicApi
.
postAsRepairGoodsConfirmComplete
({
repairId
:
id
,
evaluate
:
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setConfirmLoading
(
false
);
});
};
return
(
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
020a6280
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
Search
from
'@/components/NiceForm/components/Search'
;
import
Submit
from
'@/components/NiceForm/components/Submit'
;
import
DateSelect
from
'@/components/NiceForm/components/DateSelect'
;
import
{
}
from
'@/constants'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
import
{
PublicApi
}
from
'@/services/api'
;
// 供应会员列表列
const
supplierColumns
=
[
...
...
@@ -19,55 +17,36 @@ const supplierColumns = [
},
{
title
:
'会员名称'
,
dataIndex
:
'
memberN
ame'
,
dataIndex
:
'
n
ame'
,
align
:
'center'
,
},
{
title
:
'会员类型'
,
dataIndex
:
'memberType'
,
dataIndex
:
'memberType
Name
'
,
align
:
'center'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'
memberRol
e'
,
dataIndex
:
'
roleNam
e'
,
align
:
'center'
,
},
{
title
:
'会员等级'
,
dataIndex
:
'
memberLevel
'
,
dataIndex
:
'
levelTag
'
,
align
:
'center'
,
},
];
// 获取供应会员
const
getSupplier
=
()
=>
{
return
Promise
.
resolve
({
data
:
[
{
memberId
:
1
,
memberName
:
'会员1'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
{
memberId
:
2
,
memberName
:
'会员2'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
{
memberId
:
3
,
memberName
:
'会员3'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
],
total
:
20
,
});
const
getSupplier
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getMemberManageLowerMerchantProviderPage
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
{
totalCount
:
0
,
data
:
[]
};
};
const
supplierSchema
:
ISchema
=
{
...
...
@@ -77,7 +56,7 @@ const supplierSchema: ISchema = {
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
...
...
@@ -118,7 +97,7 @@ export const addBillSchema: ISchema = {
labelAlign
:
'left'
,
},
properties
:
{
invoices
Abstract
:
{
apply
Abstract
:
{
type
:
'string'
,
title
:
'申请单摘要'
,
required
:
true
,
...
...
@@ -131,7 +110,7 @@ export const addBillSchema: ISchema = {
wrapperCol
:
24
,
},
properties
:
{
supplier
:
{
supplier
Member
:
{
type
:
'string'
,
title
:
'供应会员'
,
'x-component'
:
'CustomRelevance'
,
...
...
@@ -139,7 +118,7 @@ export const addBillSchema: ISchema = {
title
:
'关联'
,
tip
:
'请选择对应单据'
,
modalProps
:
{
title
:
'
标题
'
,
title
:
'
选择会员
'
,
},
columns
:
supplierColumns
,
fetchTableData
:
getSupplier
,
...
...
@@ -149,22 +128,16 @@ export const addBillSchema: ISchema = {
components
:
{
Search
,
Submit
,
DateSelect
,
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'search'
,
FORM_FILTER_PATH
,
);
},
inline
:
false
,
}
},
tableProps
:
{
rowKey
:
'memberId'
,
lableKey
:
'
memberN
ame'
,
lableKey
:
'
n
ame'
,
},
},
'x-mega-props'
:
{
...
...
@@ -183,7 +156,7 @@ export const addBillSchema: ISchema = {
type
:
'string'
,
title
:
'申请单号'
,
'x-component'
:
'Text'
,
},
},
createdTime
:
{
type
:
'string'
,
title
:
'单据时间'
,
...
...
@@ -346,7 +319,7 @@ export const addBillSchema: ISchema = {
labelAlign
:
'left'
,
},
properties
:
{
enclosure
:
{
faultFileList
:
{
title
:
'附件'
,
'x-component'
:
'Upload'
,
'x-component-props'
:
{
...
...
@@ -385,7 +358,7 @@ export const addBillSchema: ISchema = {
labelAlign
:
'left'
,
},
properties
:
{
a
ddress
:
{
repairA
ddress
:
{
title
:
'维修地址'
,
type
:
'string'
,
'x-component'
:
'AddressFormItem'
,
...
...
src/pages/afterService/repairApplication/repairPrSubmit/index.tsx
View file @
020a6280
...
...
@@ -27,9 +27,9 @@ import NiceForm from '@/components/NiceForm';
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT
_OUTER_STATUS_TAG_MAP
,
CREDIT
_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
REPAIR
_OUTER_STATUS_TAG_MAP
,
REPAIR
_INNER_STATUS_BADGE_MAP
,
}
from
'../../con
s
tants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
...
...
@@ -54,17 +54,17 @@ const RepairPrSubmit: React.FC = () => {
},
{
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
dataIndex
:
'supplier
Name
'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
},
{
...
...
@@ -74,7 +74,7 @@ const RepairPrSubmit: React.FC = () => {
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
outerStatus
]
}
title=
{
text
}
/>
),
},
{
...
...
@@ -83,7 +83,7 @@ const RepairPrSubmit: React.FC = () => {
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
REPAIR_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
}
text=
{
text
}
/>,
},
{
title
:
'操作'
,
...
...
@@ -125,67 +125,67 @@ const RepairPrSubmit: React.FC = () => {
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsRepairGoodsPageToBeSubmitByConsumer
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
// return Promise.resolve({
// data: [
// {
// id: 1,
// applyNo: '123',
// parentMemberName: '申请单摘要',
// created: '2020-11-03 11:46:00',
// },
// ],
// total: 10,
// });
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer
();
const
res
=
await
PublicApi
.
getAsRepairGoodsPageItems
();
//
if (res.code === 1000) {
//
const { data } = res;
//
const {
//
outerStatusList = [],
//
innerStatusList = [],
//
} = data;
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
{
outerStatusList
=
[],
innerStatusList
=
[],
}
=
data
;
//
const newColumns = columns.slice();
const
newColumns
=
columns
.
slice
();
//
// filter 0 过滤掉全部选项
//
coverColFiltersItem(
//
newColumns,
//
'outerStatusName',
//
outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
//
coverColFiltersItem(
//
newColumns,
//
'innerStatusName',
//
innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
// filter 0 过滤掉全部选项
coverColFiltersItem
(
newColumns
,
'outerStatusName'
,
outerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
coverColFiltersItem
(
newColumns
,
'innerStatusName'
,
innerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
//
setColumns(newColumns);
setColumns
(
newColumns
);
//
return {
//
outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
};
//
}
return
{
outerStatus
:
outerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
innerStatus
:
innerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
};
}
return
{};
};
...
...
@@ -226,7 +226,7 @@ const RepairPrSubmit: React.FC = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
cond
'
,
'
applyNo
'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
...
...
src/pages/afterService/repairApplication/repairPrSubmit/schema/index.ts
View file @
020a6280
...
...
@@ -30,11 +30,12 @@ export const listSearchSchema: ISchema = {
children
:
'{{controllerBtns}}'
,
},
},
cond
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索'
,
tip
:
'输入 申请单号 进行搜索'
,
},
},
},
...
...
@@ -48,7 +49,7 @@ export const listSearchSchema: ISchema = {
},
},
properties
:
{
abstract
:
{
a
pplyA
bstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
...
...
@@ -63,12 +64,11 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
supplier
:
{
supplier
Name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员
(全部)
'
,
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
...
...
src/pages/afterService/repairApplication/repairQuery/index.tsx
View file @
020a6280
...
...
@@ -18,9 +18,9 @@ import NiceForm from '@/components/NiceForm';
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT
_OUTER_STATUS_TAG_MAP
,
CREDIT
_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
REPAIR
_OUTER_STATUS_TAG_MAP
,
REPAIR
_INNER_STATUS_BADGE_MAP
,
}
from
'../../con
s
tants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
...
...
@@ -45,17 +45,17 @@ const RepairQuery: React.FC = () => {
},
{
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
dataIndex
:
'supplier
Name
'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
},
{
...
...
@@ -65,7 +65,7 @@ const RepairQuery: React.FC = () => {
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
outerStatus
]
}
title=
{
text
}
/>
),
},
{
...
...
@@ -74,7 +74,7 @@ const RepairQuery: React.FC = () => {
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
REPAIR_INNER_STATUS_BADGE_MAP
[
record
.
innerStatus
]
}
text=
{
text
}
/>,
},
];
...
...
@@ -82,67 +82,56 @@ const RepairQuery: React.FC = () => {
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getAsRepairGoodsPageByConsumer
({
startTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
endTime
:
startTime
?
moment
(
startTime
).
format
(
'YYYY-MM-DD'
)
:
null
,
...
rest
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer
();
const
res
=
await
PublicApi
.
getAsRepairGoodsPageItems
();
//
if (res.code === 1000) {
//
const { data } = res;
//
const {
//
outerStatusList = [],
//
innerStatusList = [],
//
} = data;
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
{
outerStatusList
=
[],
innerStatusList
=
[],
}
=
data
;
//
const newColumns = columns.slice();
const
newColumns
=
columns
.
slice
();
//
// filter 0 过滤掉全部选项
//
coverColFiltersItem(
//
newColumns,
//
'outerStatusName',
//
outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
//
coverColFiltersItem(
//
newColumns,
//
'innerStatusName',
//
innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
//
);
// filter 0 过滤掉全部选项
coverColFiltersItem
(
newColumns
,
'outerStatusName'
,
outerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
coverColFiltersItem
(
newColumns
,
'innerStatusName'
,
innerStatusList
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
);
//
setColumns(newColumns);
setColumns
(
newColumns
);
//
return {
//
outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
//
};
//
}
return
{
outerStatus
:
outerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
innerStatus
:
innerStatusList
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
status
})).
filter
(
item
=>
item
.
value
),
};
}
return
{};
};
...
...
src/pages/afterService/repairApplication/repairQuery/schema/index.ts
View file @
020a6280
...
...
@@ -35,7 +35,7 @@ export const listSearchSchema: ISchema = {
columns
:
6
,
},
properties
:
{
abstract
:
{
a
pplyA
bstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
...
...
@@ -51,12 +51,11 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
supplier
:
{
supplier
Name
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员
(全部)
'
,
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
...
...
src/pages/payandSettle/creditManage/quotaMenage/detail/components/IntroduceRow/index.tsx
View file @
020a6280
...
...
@@ -353,7 +353,11 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
</
div
>
</>
)
:
(
<
TradeRecord
fetchRecordList=
{
this
.
getRecordList
}
ref=
{
node
=>
this
.
tradeRecordRef
=
node
}
/>
<
TradeRecord
fetchRecordList=
{
this
.
getRecordList
}
ref=
{
node
=>
this
.
tradeRecordRef
=
node
}
onConfirm=
{
this
.
handleConfirm
}
/>
)
}
</
Spin
>
</
MellowCard
>
...
...
src/pages/payandSettle/creditManage/quotaMenage/detail/components/TradeRecord/index.tsx
View file @
020a6280
...
...
@@ -31,7 +31,8 @@ export interface RecordParams {
};
export
interface
RecordItem
{
/**
id
:
number
/**
* 交易流水号
*/
tradeCode
:
string
...
...
@@ -165,11 +166,11 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
});
};
handleVisibleResult
=
(
flag
,
recordId
?,
voucher
?
=
[]
)
=>
{
handleVisibleResult
=
(
flag
,
recordId
?,
voucher
?)
=>
{
this
.
setState
({
visibleResult
:
!!
flag
,
recordId
,
currentVoucher
:
voucher
.
map
(
item
=>
normalizeFiledata
(
item
.
proveUrl
))
,
currentVoucher
:
voucher
?
voucher
.
map
(
item
=>
normalizeFiledata
(
item
.
proveUrl
))
:
[]
,
});
};
...
...
@@ -195,6 +196,7 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
this
.
handleVisibleResult
(
false
);
this
.
getRecordList
();
}
}).
finally
(()
=>
{
if
(
flag
===
BILL_TRADE_STATUS_OUTSTANDIND
)
{
...
...
@@ -239,11 +241,11 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
"交易流水号"
>
<
Row
justify=
"space-between"
>
<
Col
span=
{
1
2
}
>
<
Col
span=
{
1
0
}
>
<
a
onClick=
{
()
=>
this
.
handleCheckVoucher
(
item
.
payProveList
)
}
>
{
item
.
tradeCode
}
</
a
>
</
Col
>
<
Col
span=
{
1
0
}
span=
{
1
4
}
style=
{
{
textAlign
:
'right'
,
}
}
...
...
@@ -270,7 +272,12 @@ class TradeRecord extends React.Component<TradeRecordProps, TradeRecordState> {
<
Descriptions
.
Item
label=
"交易时间"
>
{
item
.
tradeTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"备注"
>
<
Row
justify=
"space-between"
>
<
Col
span=
{
item
.
status
===
BILL_TRADE_STATUS_UNCONFIRMED
?
12
:
24
}
>
<
Col
span=
{
item
.
status
===
BILL_TRADE_STATUS_UNCONFIRMED
?
12
:
24
}
style=
{
{
height
:
32
,
}
}
>
{
item
.
remark
}
</
Col
>
{
/* 状态等于 待确认还款 */
}
...
...
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