Commit fac0ecd9 authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加代客退货申请

parent 9507af71
...@@ -252,6 +252,13 @@ const route: RouterChild = { ...@@ -252,6 +252,13 @@ const route: RouterChild = {
hideInMenu: true, hideInMenu: true,
noMargin: true, noMargin: true,
}, },
// 代客退货申请
{
path: '/memberCenter/afterService/returnManage/returnValetApply/index',
name: 'returnValetApply',
component: '@/pages/afterService/returnManage/returnValetApply/index',
noMargin: true,
},
] ]
}; };
......
...@@ -632,6 +632,7 @@ export default { ...@@ -632,6 +632,7 @@ export default {
'menu.afterService.returnManage.verifyReturnPrReceived': '确认退货收货', 'menu.afterService.returnManage.verifyReturnPrReceived': '确认退货收货',
'menu.afterService.returnManage.returnPrReturn': '待退款', 'menu.afterService.returnManage.returnPrReturn': '待退款',
'menu.afterService.returnManage.verifyReturnPrReturn': '确认退款', 'menu.afterService.returnManage.verifyReturnPrReturn': '确认退款',
'menu.afterService.returnManage.returnValetApply': '代客退货申请',
'menu.afterService.returnManage.orderPreview': '查看订单', 'menu.afterService.returnManage.orderPreview': '查看订单',
'menu.afterService.repairApplication': '维修申请', 'menu.afterService.repairApplication': '维修申请',
......
...@@ -469,6 +469,7 @@ export const addSchema = (orderType: number): ISchema => { ...@@ -469,6 +469,7 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect', 'x-component': 'CustomAddressSelect',
'x-component-props': { 'x-component-props': {
isDefaultAddress: true, isDefaultAddress: true,
echo: true,
}, },
'x-rules': [ 'x-rules': [
{ {
...@@ -485,6 +486,7 @@ export const addSchema = (orderType: number): ISchema => { ...@@ -485,6 +486,7 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect', 'x-component': 'CustomAddressSelect',
'x-component-props': { 'x-component-props': {
isDefaultAddress: true, isDefaultAddress: true,
echo: true,
}, },
'x-rules': [ 'x-rules': [
{ {
......
/*
* @Author: XieZhiXiong
* @Date: 2021-12-02 19:00:53
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-02 19:53:36
* @Description:
*/
import { useBusinessEffects } from './useBusinessEffects';
import { getLogisticsSelectListShipperAddress } from '@/services/LogisticsV2Api';
export const createEffects = (context, actions) => {
const { setFieldState } = actions;
useBusinessEffects(context, actions);
// 获取发货地址
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
/*
* @Author: XieZhiXiong
* @Date: 2021-12-02 19:01:00
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-12-02 19:01:01
* @Description:
*/
import { FormEffectHooks } from '@formily/antd';
import { useLinkageUtils } from '@/utils/formEffectUtils';
const {
onFieldInputChange$,
onFieldValueChange$,
} = FormEffectHooks;
export const useBusinessEffects = (context, actions) => {
const {
getFieldValue,
setFieldValue,
} = 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$('*(supplierMember,orderType)').subscribe(fieldState => {
const replaceGoodsListValue = getFieldValue('returnGoodsList');
if (replaceGoodsListValue && replaceGoodsListValue.length) {
setFieldValue('returnGoodsList', []);
}
});
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment