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
0b255b50
Commit
0b255b50
authored
Dec 03, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加代客维修申请
parent
eb944260
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
12 deletions
+104
-12
repairManageRoute.ts
config/routes/afterServiceRoute/repairManageRoute.ts
+7
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+2
-10
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+5
-2
index.tsx
...erService/repairManage/repairValetApply/effects/index.tsx
+30
-0
useBusinessEffects.ts
...pairManage/repairValetApply/effects/useBusinessEffects.ts
+59
-0
index.less
...ges/afterService/repairManage/repairValetApply/index.less
+0
-0
index.tsx
...ages/afterService/repairManage/repairValetApply/index.tsx
+0
-0
schema.ts
...ages/afterService/repairManage/repairValetApply/schema.ts
+0
-0
No files found.
config/routes/afterServiceRoute/repairManageRoute.ts
View file @
0b255b50
...
...
@@ -154,6 +154,13 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 代客维修申请
{
path
:
'/memberCenter/afterService/repairManage/repairValetApply/index'
,
name
:
'repairValetApply'
,
component
:
'@/pages/afterService/repairManage/repairValetApply/index'
,
noMargin
:
true
,
},
]
}
...
...
src/locales/zh-CN/menu.ts
View file @
0b255b50
...
...
@@ -662,6 +662,7 @@ export default {
'menu.afterService.repairManage.repairPrConfirm'
:
'待确认维修申请单'
,
'menu.afterService.repairManage.repairPrConfirmDetail'
:
'查看维修申请单'
,
'menu.afterService.repairManage.verifyRepairPrConfirm'
:
'审核维修申请单'
,
'menu.afterService.repairManage.repairValetApply'
:
'代客维修申请'
,
'menu.afterService.repairManage.orderPreview'
:
'查看订单'
,
// 结算能力
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
0b255b50
...
...
@@ -12,18 +12,11 @@ import { createFormActions, FormEffectHooks } from '@formily/antd';
import
{
getAsRepairGoodsGetDetailByConsumer
,
getAsRepairGoodsPageRepairGoods
,
GetAsRepairGoodsPageRepairGoodsResponseDetail
,
postAsRepairGoodsSave
}
from
'@/services/AfterServiceV2Api'
;
import
{
getOrderBuyerDetail
,
getOrderCommonAfterSalePage
}
from
'@/services/OrderNewV2Api'
;
import
{
normalizeFiledata
,
FileData
,
isJSONStr
}
from
'@/utils'
;
import
{
ORDER_TYPE_INQUIRY_CONTRACT
,
ORDER_TYPE_BIDDING_CONTRACT
,
ORDER_TYPE_TENDER_CONTRACT
,
ORDER_TYPE2
,
}
from
'@/constants/order'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
GoodsDrawer
from
'../../../../components/GoodsDrawer'
;
import
{
OrderListRes
}
from
'../../../../components/GoodsDrawer/interface'
;
import
AddressFormItem
from
'../../../../components/AddressFormItem'
;
import
{
addSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
{
...
...
@@ -630,9 +623,8 @@ const RepairForm: React.FC<BillsFormProps> = ({
beforeUpload
,
}
}
components=
{
{
ArrayTable
,
AddressFormItem
,
OrderNo
,
ArrayTable
,
OrderNo
,
}
}
editable=
{
isEdit
||
!
id
}
effects=
{
(
$
,
actions
)
=>
{
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
0b255b50
...
...
@@ -434,15 +434,18 @@ export const addSchema = (orderType: number): ISchema => {
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
12
,
labelAlign
:
'left'
,
},
properties
:
{
repairAddress
:
{
title
:
'维修地址'
,
type
:
'string'
,
'x-component'
:
'
AddressFormItem
'
,
'x-component'
:
'
CustomAddressSelect
'
,
'x-component-props'
:
{
dataSource
:
[],
isDefaultAddress
:
true
,
addressType
:
1
,
echo
:
true
,
},
'x-rules'
:
[
{
...
...
src/pages/afterService/repairManage/repairValetApply/effects/index.tsx
0 → 100644
View file @
0b255b50
/*
* @Author: XieZhiXiong
* @Date: 2021-12-03 09:56:25
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-03 09:56:25
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
import
{
getLogisticsSelectListReceiverAddress
}
from
'@/services/LogisticsV2Api'
;
const
{
onFormMount$
}
=
FormEffectHooks
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
}
=
actions
;
useBusinessEffects
(
context
,
actions
);
onFormMount$
().
subscribe
(()
=>
{
// 获取收件地址
getLogisticsSelectListReceiverAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setFieldState
(
'repairAddress'
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataSource
=
res
.
data
;
});
}
});
});
};
\ No newline at end of file
src/pages/afterService/repairManage/repairValetApply/effects/useBusinessEffects.ts
0 → 100644
View file @
0b255b50
/*
* @Author: XieZhiXiong
* @Date: 2021-12-03 09:57:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-03 10:31:06
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 校验维修数量
onFieldInputChange$
(
'repairGoodsList.*.repairCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已维修数量
const
repairedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
remaining
,
);
// 不需要做数量校验
// setFieldState(
// FormPath.transform(name, /\d/, $1 => {
// return `repairGoodsList.${$1}.repairCount`
// }),
// state => {
// if (+value > repairedCountValue) {
// state.errors = '填写值已超过最大可维修数量,请重新填写';
// } else {
// state.errors = '';
// }
// }
// );
});
// 供应会员、订单类型 联动 单据明细
onFieldInputChange$
(
'*(supplierMember,orderType)'
).
subscribe
(
fieldState
=>
{
const
replaceGoodsListValue
=
getFieldValue
(
'repairGoodsList'
);
if
(
replaceGoodsListValue
&&
replaceGoodsListValue
.
length
)
{
setFieldValue
(
'repairGoodsList'
,
[]);
}
});
}
\ No newline at end of file
src/pages/afterService/repairManage/repairValetApply/index.less
0 → 100644
View file @
0b255b50
src/pages/afterService/repairManage/repairValetApply/index.tsx
0 → 100644
View file @
0b255b50
This diff is collapsed.
Click to expand it.
src/pages/afterService/repairManage/repairValetApply/schema.ts
0 → 100644
View file @
0b255b50
This diff is collapsed.
Click to expand it.
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