Commit af310a86 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复非代客申请售后地址默认值不会回填的问题

parent 4b8fdcbc
......@@ -357,6 +357,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
shopName,
shopId,
shopLogo,
agentFlag,
...rest
} = res.data;
......@@ -367,6 +368,11 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
}
);
addSchemaAction.setFieldState('*(shippingAddress,pickupAddress,deliveryAddress)', (state) => {
// 非代客申请 echo 设置成 false
state.props['x-component-props'].echo = agentFlag === 0 ? false : true;
});
setOrderTypeValue(rest.orderType);
setDetailInfo({
proofFileList: faultFileList.map(item => normalizeFiledata(item.filePath)),
......@@ -779,6 +785,13 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
field.visible = false;
});
}
if (id) {
addSchemaAction.setFieldState('*(shippingAddress,pickupAddress,deliveryAddress)', (state) => {
// 非代客申请 echo 设置成 false
state.props['x-component-props'].isDefaultAddress = false;
});
}
});
onFieldInputChange$('supplierMember').subscribe(() => {
......
......@@ -478,7 +478,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect',
'x-component-props': {
isDefaultAddress: true,
echo: true,
},
'x-rules': [
{
......@@ -495,7 +494,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect',
'x-component-props': {
isDefaultAddress: true,
echo: true,
},
'x-rules': [
{
......@@ -512,7 +510,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component-props': {
isDefaultAddress: true,
addressType: 1,
echo: true,
},
'x-rules': [
{
......
......@@ -265,6 +265,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
shopName,
shopId,
shopLogo,
agentFlag,
...rest
} = res.data;
......@@ -275,6 +276,11 @@ const RepairForm: React.FC<BillsFormProps> = ({
}
);
addSchemaAction.setFieldState('repairAddress', (state) => {
// 非代客申请 echo 设置成 false
state.props['x-component-props'].echo = agentFlag === 0 ? false : true;
});
getRepairGoods({
shopName,
shopId,
......@@ -645,6 +651,12 @@ const RepairForm: React.FC<BillsFormProps> = ({
field.visible = false;
});
}
if (id) {
addSchemaAction.setFieldState('repairAddress', (state) => {
state.props['x-component-props'].isDefaultAddress = false;
});
}
});
onFieldInputChange$('orderType').subscribe(fieldState => {
......
......@@ -448,7 +448,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component-props': {
isDefaultAddress: true,
addressType: 1,
echo: true,
},
'x-rules': [
{
......
......@@ -365,6 +365,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
shopName,
shopId,
shopLogo,
agentFlag,
...rest
} = res.data;
......@@ -375,6 +376,11 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}
);
addSchemaAction.setFieldState('*(shippingAddress,pickupAddress)', (state) => {
// 非代客申请 echo 设置成 false
state.props['x-component-props'].echo = agentFlag === 0 ? false : true;
});
setDetailInfo({
proofFileList: faultFileList.map(item => normalizeFiledata(item.filePath)),
// 物流
......@@ -850,6 +856,12 @@ const ReturnForm: React.FC<BillsFormProps> = ({
// field.value = +outerOrderType;
});
}
if (id) {
addSchemaAction.setFieldState('*(shippingAddress,pickupAddress)', (state) => {
state.props['x-component-props'].isDefaultAddress = false;
});
}
});
onFieldInputChange$('orderType').subscribe(fieldState => {
......
......@@ -472,7 +472,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect',
'x-component-props': {
isDefaultAddress: true,
echo: true,
},
'x-rules': [
{
......@@ -489,7 +488,6 @@ export const addSchema = (orderType: number): ISchema => {
'x-component': 'CustomAddressSelect',
'x-component-props': {
isDefaultAddress: true,
echo: true,
},
'x-rules': [
{
......
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