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
4f14490b
Commit
4f14490b
authored
Dec 02, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增代客售后换货UI
parent
c0c7374f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
117 additions
and
0 deletions
+117
-0
exchangeManageRoute.ts
config/routes/afterServiceRoute/exchangeManageRoute.ts
+7
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.ts
...ervice/exchangeManage/exchangeValetApply/effects/index.ts
+38
-0
useBusinessEffects.ts
...geManage/exchangeValetApply/effects/useBusinessEffects.ts
+71
-0
index.less
...afterService/exchangeManage/exchangeValetApply/index.less
+0
-0
index.tsx
.../afterService/exchangeManage/exchangeValetApply/index.tsx
+0
-0
schema.ts
.../afterService/exchangeManage/exchangeValetApply/schema.ts
+0
-0
No files found.
config/routes/afterServiceRoute/exchangeManageRoute.ts
View file @
4f14490b
...
...
@@ -342,6 +342,13 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 代客换货申请
{
path
:
'/memberCenter/afterService/exchangeManage/exchangeValetApply/index'
,
name
:
'exchangeValetApply'
,
component
:
'@/pages/afterService/exchangeManage/exchangeValetApply/index'
,
noMargin
:
true
,
},
]
};
...
...
src/locales/zh-CN/menu.ts
View file @
4f14490b
...
...
@@ -589,6 +589,7 @@ export default {
'menu.afterService.exchangeManage.verifyExchangePrDeliver'
:
'换货发货'
,
'menu.afterService.exchangeManage.exchangePrConfirmBack'
:
'待确认换货回单'
,
'menu.afterService.exchangeManage.verifyExchangePrConfirmBack'
:
'确认换货回单'
,
'menu.afterService.exchangeManage.exchangeValetApply'
:
'代客换货申请'
,
'menu.afterService.exchangeManage.orderPreview'
:
'查看订单'
,
'menu.afterService.returnApplication'
:
'退货申请'
,
...
...
src/pages/afterService/exchangeManage/exchangeValetApply/effects/index.ts
0 → 100644
View file @
4f14490b
/*
* @Author: XieZhiXiong
* @Date: 2021-12-02 14:15:28
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-02 14:15:28
* @Description:
*/
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
import
{
getLogisticsSelectListReceiverAddress
,
getLogisticsSelectListShipperAddress
}
from
'@/services/LogisticsV2Api'
;
export
const
createEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
}
=
actions
;
useBusinessEffects
(
context
,
actions
);
// 获取收件地址
getLogisticsSelectListReceiverAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setFieldState
(
'deliveryAddress'
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataSource
=
res
.
data
;
});
}
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
// 获取发货地址
getLogisticsSelectListShipperAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setFieldState
(
'*(shippingAddress,pickupAddress)'
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataSource
=
res
.
data
;
});
}
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
};
\ No newline at end of file
src/pages/afterService/exchangeManage/exchangeValetApply/effects/useBusinessEffects.ts
0 → 100644
View file @
4f14490b
/*
* @Author: XieZhiXiong
* @Date: 2021-12-02 14:15:36
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-02 14:15:36
* @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
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
case
1
:
{
linkage
.
show
(
'shippingAddress'
);
linkage
.
hide
(
'pickupAddress'
);
break
;
};
// 自提
case
2
:
{
linkage
.
hide
(
'shippingAddress'
);
linkage
.
show
(
'pickupAddress'
);
break
;
};
// 无需物流
case
3
:
{
linkage
.
hide
(
'*(shippingAddress,pickupAddress)'
);
break
;
};
default
:
break
};
});
// 校验换货数量
onFieldInputChange$
(
'replaceGoodsList.*.replaceCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已换货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`replaceGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
remaining
,
);
});
// 供应会员联动 单据明细
onFieldInputChange$
(
'*(supplierMember,orderType)'
).
subscribe
(
fieldState
=>
{
const
replaceGoodsListValue
=
getFieldValue
(
'replaceGoodsList'
);
if
(
replaceGoodsListValue
&&
replaceGoodsListValue
.
length
)
{
setFieldValue
(
'replaceGoodsList'
,
[]);
}
});
}
\ No newline at end of file
src/pages/afterService/exchangeManage/exchangeValetApply/index.less
0 → 100644
View file @
4f14490b
src/pages/afterService/exchangeManage/exchangeValetApply/index.tsx
0 → 100644
View file @
4f14490b
This diff is collapsed.
Click to expand it.
src/pages/afterService/exchangeManage/exchangeValetApply/schema.ts
0 → 100644
View file @
4f14490b
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