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
42e2522f
Commit
42e2522f
authored
Nov 20, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接售后换货中
parent
0ca4ecdc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
392 additions
and
110 deletions
+392
-110
index.tsx
...ges/afterService/components/ExchangeAddressInfo/index.tsx
+126
-7
index.ts
...terService/components/ExchangeAddressInfo/schema/index.ts
+44
-14
index.tsx
...pages/afterService/components/ReturnAddressInfo/index.tsx
+124
-8
index.ts
...afterService/components/ReturnAddressInfo/schema/index.ts
+33
-12
index.tsx
...ervice/exchangeApplication/exchangePrAddDeliver/index.tsx
+5
-5
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+6
-7
index.tsx
...terService/exchangeManage/components/DetailInfo/index.tsx
+0
-0
index.tsx
src/pages/afterService/exchangeManage/exchangePr1/index.tsx
+3
-3
verify.tsx
src/pages/afterService/exchangeManage/exchangePr1/verify.tsx
+12
-13
index.tsx
src/pages/afterService/exchangeManage/exchangePr2/index.tsx
+1
-1
verify.tsx
src/pages/afterService/exchangeManage/exchangePr2/verify.tsx
+11
-12
index.tsx
...fterService/exchangeManage/exchangePrAddDeliver/index.tsx
+3
-3
verify.tsx
.../afterService/exchangeManage/exchangePrConfirm/verify.tsx
+12
-13
verify.tsx
...s/afterService/exchangeManage/exchangePrSubmit/verify.tsx
+12
-12
No files found.
src/pages/afterService/components/ExchangeAddressInfo/index.tsx
View file @
42e2522f
...
@@ -2,12 +2,15 @@
...
@@ -2,12 +2,15 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
17 17:49:19
* @LastEditTime: 2020-11-
20 14:43:15
* @Description:
退货地址信息
* @Description:
换货收货地址
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
schema
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
...
@@ -18,23 +21,88 @@ const {
...
@@ -18,23 +21,88 @@ const {
onFieldInputChange$
,
onFieldInputChange$
,
}
=
FormEffectHooks
;
}
=
FormEffectHooks
;
export
interface
Values
{
deliveryType
:
number
,
id
:
number
,
isDefault
:
number
,
sendAddress
:
string
|
undefined
,
sendUserName
:
string
|
undefined
,
sendUserTel
:
string
|
undefined
,
};
interface
ExchangeAddressInfo
{
interface
ExchangeAddressInfo
{
// 是否是编辑的
// 是否是编辑的
isEdit
?:
boolean
;
isEdit
?:
boolean
;
// 换货收货地址
deliveryAddress
:
{
// id
id
?:
number
;
// 配送方式
deliveryType
?:
number
;
// 收件人姓名
name
:
string
;
// phone
phone
:
string
;
// 完整地址
fullAddress
:
string
;
},
// 换货发货地址
shippingAddress
:
{
// id
id
?:
number
;
// 配送方式
deliveryType
?:
number
;
// 收件人姓名
name
:
string
;
// phone
phone
:
string
;
// 完整地址
fullAddress
:
string
;
},
// onSubmit
onSubmit
:
(
values
:
Values
)
=>
void
;
};
};
const
ExchangeAddressInfo
:
React
.
FC
<
ExchangeAddressInfo
>
=
({
const
ExchangeAddressInfo
:
React
.
FC
<
ExchangeAddressInfo
>
=
({
isEdit
=
false
,
isEdit
=
false
,
deliveryAddress
=
{},
shippingAddress
=
{},
onSubmit
,
})
=>
{
})
=>
{
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
};
};
const
DeliveryAddress
=
(
// 获取发货地址
const
fetchShipperAddress
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListShipperAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
options
=
res
.
data
?
res
.
data
.
map
(
item
=>
({
label
:
`
${
item
.
fullAddress
}
/
${
item
.
shipperName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
,
...
item
,
}))
:
[];
resolve
(
options
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
const
Address
=
(
<
div
>
<
div
>
<
p
>
张三 / 185 2929 6475
</
p
>
<
p
>
{
deliveryAddress
.
name
||
''
}
/
{
deliveryAddress
.
phone
||
''
}
</
p
>
<
p
>
广东省广州市海珠区新港东路1068号中洲中心北塔6楼
</
p
>
<
p
>
{
deliveryAddress
.
fullAddress
||
''
}
</
p
>
</
div
>
</
div
>
);
);
...
@@ -44,11 +112,62 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
...
@@ -44,11 +112,62 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
fullHeight
fullHeight
>
>
<
NiceForm
<
NiceForm
initialValues=
{
{
deliveryType
:
shippingAddress
.
deliveryType
,
shippingAddress
:
shippingAddress
.
id
,
pickupAddress
:
shippingAddress
.
id
,
}
}
expressionScope=
{
{
expressionScope=
{
{
Delivery
Address
,
Address
,
}
}
}
}
effects=
{
(
$
,
{
setFieldState
})
=>
{
effects=
{
(
$
,
{
setFieldState
,
getFieldValue
})
=>
{
useAsyncSelect
(
'*(shippingAddress,pickupAddress)'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
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$
(
'*(shippingAddress,pickupAddress)'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
,
originAsyncData
}
=
fieldState
;
const
deliveryTypeValue
=
getFieldValue
(
'deliveryType'
);
const
fullData
=
originAsyncData
.
find
(
item
=>
item
.
id
===
value
);
if
(
onSubmit
)
{
onSubmit
({
deliveryType
:
deliveryTypeValue
,
id
:
fullData
?
fullData
.
id
:
undefined
,
isDefault
:
fullData
?
fullData
.
isDefault
:
undefined
,
sendAddress
:
fullData
?
fullData
.
fullAddress
:
undefined
,
sendUserName
:
fullData
?
fullData
.
shipperName
:
undefined
,
sendUserTel
:
fullData
?
fullData
.
phone
:
undefined
,
});
}
});
}
}
}
}
editable=
{
isEdit
}
editable=
{
isEdit
}
actions=
{
modalFormActions
}
actions=
{
modalFormActions
}
...
...
src/pages/afterService/components/ExchangeAddressInfo/schema/index.ts
View file @
42e2522f
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
17 17:46:41
* @LastEditTime: 2020-11-
20 14:54:37
* @Description:
* @Description:
*/
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
,
DELIVERY_TYPE_ENUM
}
from
'@/constants'
;
export
const
schema
:
ISchema
=
{
export
const
schema
:
ISchema
=
{
type
:
'object'
,
type
:
'object'
,
...
@@ -14,34 +15,63 @@ export const schema: ISchema = {
...
@@ -14,34 +15,63 @@ export const schema: ISchema = {
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
labelCol
:
6
,
labelCol
:
8
,
full
:
true
,
wrapperCol
:
16
,
labelAlign
:
'left'
,
labelAlign
:
'left'
,
},
},
properties
:
{
properties
:
{
mode
:
{
deliveryType
:
{
type
:
'string'
,
title
:
'配送方式'
,
title
:
'配送方式'
,
default
:
'物流'
,
type
:
'string'
,
'x-component'
:
'Text'
,
default
:
1
,
'x-component-props'
:
{},
enum
:
DELIVERY_TYPE_ENUM
,
'x-component-props'
:
{
style
:
{
width
:
'80%'
,
},
},
shippingAddress
:
{
},
},
deliveryAddress
:
{
type
:
'string'
,
type
:
'string'
,
title
:
'换货收货地址'
,
title
:
'换货收货地址'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{Address}}'
,
},
},
shippingAddress
:
{
type
:
'string'
,
title
:
'换货发货地址'
,
enum
:
[],
enum
:
[],
required
:
true
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
style
:
{
width
:
'80%'
,
},
},
},
},
deliveryAddress
:
{
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择换货发货地址'
,
},
],
},
pickupAddress
:
{
type
:
'string'
,
type
:
'string'
,
title
:
'换货
发货地址'
,
title
:
'换货
自提地址'
,
'x-component'
:
'Children'
,
enum
:
[]
,
'x-component-props'
:
{
'x-component-props'
:
{
children
:
'{{DeliveryAddress}}'
,
placeholder
:
'请选择'
,
style
:
{
width
:
'80%'
,
},
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择换货自提地址'
,
},
},
],
},
},
},
},
},
},
...
...
src/pages/afterService/components/ReturnAddressInfo/index.tsx
View file @
42e2522f
...
@@ -2,12 +2,15 @@
...
@@ -2,12 +2,15 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
12 13:48:08
* @LastEditTime: 2020-11-
20 15:40:21
* @Description: 退货地址信息
* @Description: 退货地址信息
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
schema
}
from
'./schema'
;
import
{
schema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
...
@@ -18,23 +21,88 @@ const {
...
@@ -18,23 +21,88 @@ const {
onFieldInputChange$
,
onFieldInputChange$
,
}
=
FormEffectHooks
;
}
=
FormEffectHooks
;
export
interface
Values
{
deliveryType
:
number
,
id
:
number
,
isDefault
:
number
,
receiveAddress
:
string
|
undefined
,
receiveUserName
:
string
|
undefined
,
receiveUserTel
:
string
|
undefined
,
};
interface
ReturnAddressInfo
{
interface
ReturnAddressInfo
{
// 是否是编辑的
// 是否是编辑的
isEdit
?:
boolean
;
isEdit
?:
boolean
;
// 退货收货地址
deliveryAddress
:
{
// id
id
?:
number
;
// 配送方式
deliveryType
?:
number
;
// 收件人姓名
name
:
string
;
// phone
phone
:
string
;
// 完整地址
fullAddress
:
string
;
},
// 退货发货地址
shippingAddress
:
{
// id
id
?:
number
;
// 配送方式
deliveryType
?:
number
;
// 收件人姓名
name
:
string
;
// phone
phone
:
string
;
// 完整地址
fullAddress
:
string
;
},
// onSubmit
onSubmit
:
(
values
:
Values
)
=>
void
;
};
};
const
ReturnAddressInfo
:
React
.
FC
<
ReturnAddressInfo
>
=
({
const
ReturnAddressInfo
:
React
.
FC
<
ReturnAddressInfo
>
=
({
isEdit
=
false
,
isEdit
=
false
,
deliveryAddress
=
{},
shippingAddress
=
{},
onSubmit
,
})
=>
{
})
=>
{
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
values
=>
{
};
};
const
DeliveryAddress
=
(
// 获取收货地址
const
fetchDeliveryAddress
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListReceiverAddress
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
options
=
res
.
data
?
res
.
data
.
map
(
item
=>
({
label
:
`
${
item
.
fullAddress
}
/
${
item
.
receiverName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
,
...
item
,
}))
:
[];
resolve
(
options
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
const
Address
=
(
<
div
>
<
div
>
<
p
>
张三 / 185 2929 6475
</
p
>
<
p
>
{
shippingAddress
.
name
||
''
}
/
{
shippingAddress
.
phone
||
''
}
</
p
>
<
p
>
广东省广州市海珠区新港东路1068号中洲中心北塔6楼
</
p
>
<
p
>
{
shippingAddress
.
fullAddress
||
''
}
</
p
>
</
div
>
</
div
>
);
);
...
@@ -44,13 +112,61 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
...
@@ -44,13 +112,61 @@ const ReturnAddressInfo: React.FC<ReturnAddressInfo> = ({
fullHeight
fullHeight
>
>
<
NiceForm
<
NiceForm
effects=
{
(
$
,
{
setFieldState
})
=>
{
initialValues=
{
{
onFieldValueChange$
(
'shippingAddress'
).
subscribe
(
fieldState
=>
{
deliveryType
:
shippingAddress
.
deliveryType
,
console
.
log
(
'配送方式'
,
fieldState
.
value
);
deliveryAddress
:
deliveryAddress
.
id
,
}
}
effects=
{
(
$
,
{
setFieldState
,
getFieldValue
})
=>
{
useAsyncSelect
(
'deliveryAddress'
,
fetchDeliveryAddress
,
[
'label'
,
'value'
]);
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$
(
'deliveryAddress'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
,
originAsyncData
}
=
fieldState
;
const
deliveryTypeValue
=
getFieldValue
(
'deliveryType'
);
const
fullData
=
originAsyncData
.
find
(
item
=>
item
.
id
===
value
);
if
(
onSubmit
)
{
onSubmit
({
deliveryType
:
deliveryTypeValue
,
id
:
fullData
?
fullData
.
id
:
undefined
,
isDefault
:
fullData
?
fullData
.
isDefault
:
undefined
,
receiveAddress
:
fullData
?
fullData
.
fullAddress
:
undefined
,
receiveUserName
:
fullData
?
fullData
.
receiverName
:
undefined
,
receiveUserTel
:
fullData
?
fullData
.
phone
:
undefined
,
});
}
});
});
}
}
}
}
expressionScope=
{
{
expressionScope=
{
{
Delivery
Address
,
Address
,
}
}
}
}
editable=
{
isEdit
}
editable=
{
isEdit
}
actions=
{
modalFormActions
}
actions=
{
modalFormActions
}
...
...
src/pages/afterService/components/ReturnAddressInfo/schema/index.ts
View file @
42e2522f
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
09 16:19:24
* @LastEditTime: 2020-11-
20 15:41:12
* @Description:
* @Description:
*/
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
,
DELIVERY_TYPE_ENUM
}
from
'@/constants'
;
export
const
schema
:
ISchema
=
{
export
const
schema
:
ISchema
=
{
type
:
'object'
,
type
:
'object'
,
...
@@ -14,33 +15,53 @@ export const schema: ISchema = {
...
@@ -14,33 +15,53 @@ export const schema: ISchema = {
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
labelCol
:
6
,
labelCol
:
8
,
full
:
true
,
wrapperCol
:
16
,
labelAlign
:
'left'
,
labelAlign
:
'left'
,
},
},
properties
:
{
properties
:
{
mode
:
{
deliveryType
:
{
type
:
'string'
,
title
:
'配送方式'
,
title
:
'配送方式'
,
default
:
'物流'
,
type
:
'string'
,
'x-component'
:
'Text'
,
enum
:
DELIVERY_TYPE_ENUM
,
'x-component-props'
:
{},
editable
:
false
,
'x-component-props'
:
{
style
:
{
width
:
'80%'
,
},
},
shippingAddress
:
{
},
},
deliveryAddress
:
{
type
:
'string'
,
type
:
'string'
,
title
:
'退货收货地址'
,
title
:
'退货收货地址'
,
enum
:
[],
enum
:
[],
required
:
true
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
style
:
{
width
:
'80%'
,
},
},
},
},
deliveryAddress
:
{
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择退货收货地址'
,
},
],
},
shippingAddress
:
{
type
:
'string'
,
type
:
'string'
,
title
:
'退货发货地址'
,
title
:
'退货发货地址'
,
'x-component'
:
'Children'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
'x-component-props'
:
{
children
:
'{{DeliveryAddress}}'
,
children
:
'{{Address}}'
,
},
},
pickupAddress
:
{
type
:
'string'
,
title
:
'退货自提地址'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{Address}}'
,
},
},
},
},
},
},
...
...
src/pages/afterService/exchangeApplication/exchangePrAddDeliver/index.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
19 18:15:56
* @LastEditTime: 2020-11-
20 16:03:42
* @Description: 待新增退货发货单
* @Description: 待新增退货发货单
*/
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
@@ -67,7 +67,7 @@ const ExchangePrAddDeliver: React.FC = () => {
...
@@ -67,7 +67,7 @@ const ExchangePrAddDeliver: React.FC = () => {
},
},
{
{
title
:
'申请单摘要'
,
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
...
@@ -77,17 +77,17 @@ const ExchangePrAddDeliver: React.FC = () => {
...
@@ -77,17 +77,17 @@ const ExchangePrAddDeliver: React.FC = () => {
},
},
{
{
title
:
'单据时间'
,
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'退货批次'
,
title
:
'退货批次'
,
dataIndex
:
'
b
atch'
,
dataIndex
:
'
returnB
atch'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'退货发货单号'
,
title
:
'退货发货单号'
,
dataIndex
:
'
deliver
No'
,
dataIndex
:
'
returnDelivery
No'
,
align
:
'center'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
},
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
42e2522f
...
@@ -58,7 +58,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -58,7 +58,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const
[
replaceGoodsList
,
setReplaceGoodsList
]
=
useState
<
GetAsReplaceGoodsPageReturnedGoodsResponse
>
({
data
:
[],
totalCount
:
0
});
const
[
replaceGoodsList
,
setReplaceGoodsList
]
=
useState
<
GetAsReplaceGoodsPageReturnedGoodsResponse
>
({
data
:
[],
totalCount
:
0
});
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
replaceGoodsLoading
,
set
Repair
GoodsLoading
]
=
useState
(
false
);
const
[
replaceGoodsLoading
,
set
Exchange
GoodsLoading
]
=
useState
(
false
);
const
[
goodsValue
,
setGoodsValue
]
=
useState
([]);
const
[
goodsValue
,
setGoodsValue
]
=
useState
([]);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
...
@@ -194,14 +194,13 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -194,14 +194,13 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
);
);
setDetailInfo
({
setDetailInfo
({
...
detailInfo
,
proofFileList
:
faultFileList
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
)),
proofFileList
:
faultFileList
.
map
(
item
=>
normalizeFiledata
(
item
.
filePath
)),
deliveryAddress
:
{
deliveryAddress
:
{
fullAddress
:
replaceGoodsAddress
.
send
Address
,
fullAddress
:
replaceGoodsAddress
.
receive
Address
,
id
:
123
,
// 缺
id
:
123
,
// 缺
isDefault
:
1
,
// 缺
isDefault
:
1
,
// 缺
phone
:
replaceGoodsAddress
.
send
UserTel
,
phone
:
replaceGoodsAddress
.
receive
UserTel
,
receiverName
:
replaceGoodsAddress
.
send
UserName
,
receiverName
:
replaceGoodsAddress
.
receive
UserName
,
},
},
// 物流
// 物流
shippingAddress
:
returnGoodsAddress
.
deliveryType
===
1
?
{
shippingAddress
:
returnGoodsAddress
.
deliveryType
===
1
?
{
...
@@ -243,7 +242,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -243,7 +242,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
set
Repair
GoodsLoading
(
true
);
set
Exchange
GoodsLoading
(
true
);
PublicApi
.
getAsReplaceGoodsPageReturnedGoods
({
PublicApi
.
getAsReplaceGoodsPageReturnedGoods
({
replaceId
:
id
,
replaceId
:
id
,
current
:
`
${
1
}
`
,
current
:
`
${
1
}
`
,
...
@@ -254,7 +253,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
@@ -254,7 +253,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
set
Repair
GoodsLoading
(
false
);
set
Exchange
GoodsLoading
(
false
);
});
});
};
};
...
...
src/pages/afterService/exchangeManage/components/DetailInfo/index.tsx
View file @
42e2522f
This diff is collapsed.
Click to expand it.
src/pages/afterService/exchangeManage/exchangePr1/index.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-17 18:07:41
* @Date: 2020-11-17 18:07:41
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
19 18:28:1
6
* @LastEditTime: 2020-11-
20 15:43:5
6
* @Description: 待提交审核换货申请单
* @Description: 待提交审核换货申请单
*/
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
@@ -42,7 +42,7 @@ const ExchangePr1: React.FC = () => {
...
@@ -42,7 +42,7 @@ const ExchangePr1: React.FC = () => {
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<>
<>
<
EyePreview
<
EyePreview
url=
{
`/memberCenter/afterService/exchangeManage/exchangPr1/detail?id=${record.replaceId}`
}
url=
{
`/memberCenter/afterService/exchangeManage/exchang
e
Pr1/detail?id=${record.replaceId}`
}
>
>
{
text
}
{
text
}
</
EyePreview
>
</
EyePreview
>
...
@@ -86,7 +86,7 @@ const ExchangePr1: React.FC = () => {
...
@@ -86,7 +86,7 @@ const ExchangePr1: React.FC = () => {
<>
<>
<
Button
<
Button
type=
"link"
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/exchangeManage/exchangPr1/verify?id=${record.replaceId}`
)
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/exchangeManage/exchang
e
Pr1/verify?id=${record.replaceId}`
)
}
>
>
提交审核
提交审核
</
Button
>
</
Button
>
...
...
src/pages/afterService/exchangeManage/exchangePr1/verify.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
17 18:13:55
* @LastEditTime: 2020-11-
20 15:46:31
* @Description:
* @Description:
*/
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
...
@@ -23,17 +23,17 @@ const ExchangePr1Verify: React.FC = () => {
...
@@ -23,17 +23,17 @@ const ExchangePr1Verify: React.FC = () => {
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
//
setConfirmLoading(true);
setConfirmLoading
(
true
);
// PublicApi.postAsReturnGoodsSubmitVerify
({
PublicApi
.
postAsReplaceGoodsVerifyStepOne
({
//
applyId: id,
applyId
:
id
,
//
...values,
...
values
,
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code === 1000) {
if
(
res
.
code
===
1000
)
{
//
history.goBack();
history
.
goBack
();
//
}
}
//
}).finally(() => {
}).
finally
(()
=>
{
//
setConfirmLoading(false);
setConfirmLoading
(
false
);
//
});
});
};
};
return
(
return
(
...
@@ -50,7 +50,6 @@ const ExchangePr1Verify: React.FC = () => {
...
@@ -50,7 +50,6 @@ const ExchangePr1Verify: React.FC = () => {
单据审核
单据审核
</
Button
>
</
Button
>
)
}
)
}
isEdit
/>
/>
<
VerifyModal
<
VerifyModal
...
...
src/pages/afterService/exchangeManage/exchangePr2/index.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-17 18:07:41
* @Date: 2020-11-17 18:07:41
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
18 10:11:17
* @LastEditTime: 2020-11-
20 15:47:08
* @Description: 待提交审核换货申请单
* @Description: 待提交审核换货申请单
*/
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
src/pages/afterService/exchangeManage/exchangePr2/verify.tsx
View file @
42e2522f
...
@@ -23,17 +23,17 @@ const ExchangePr2Verify: React.FC = () => {
...
@@ -23,17 +23,17 @@ const ExchangePr2Verify: React.FC = () => {
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
//
setConfirmLoading(true);
setConfirmLoading
(
true
);
// PublicApi.postAsReturnGoodsSubmitVerify
({
PublicApi
.
postAsReplaceGoodsVerifyStepTwo
({
//
applyId: id,
applyId
:
id
,
//
...values,
...
values
,
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code === 1000) {
if
(
res
.
code
===
1000
)
{
//
history.goBack();
history
.
goBack
();
//
}
}
//
}).finally(() => {
}).
finally
(()
=>
{
//
setConfirmLoading(false);
setConfirmLoading
(
false
);
//
});
});
};
};
return
(
return
(
...
@@ -50,7 +50,6 @@ const ExchangePr2Verify: React.FC = () => {
...
@@ -50,7 +50,6 @@ const ExchangePr2Verify: React.FC = () => {
单据审核
单据审核
</
Button
>
</
Button
>
)
}
)
}
isEdit
/>
/>
<
VerifyModal
<
VerifyModal
...
...
src/pages/afterService/exchangeManage/exchangePrAddDeliver/index.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
19 18:55:37
* @LastEditTime: 2020-11-
20 16:02:32
* @Description: 待新增换货发货单
* @Description: 待新增换货发货单
*/
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
@@ -67,7 +67,7 @@ const ExchangePrAddDeliver: React.FC = () => {
...
@@ -67,7 +67,7 @@ const ExchangePrAddDeliver: React.FC = () => {
},
},
{
{
title
:
'申请单摘要'
,
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
...
@@ -77,7 +77,7 @@ const ExchangePrAddDeliver: React.FC = () => {
...
@@ -77,7 +77,7 @@ const ExchangePrAddDeliver: React.FC = () => {
},
},
{
{
title
:
'单据时间'
,
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
...
...
src/pages/afterService/exchangeManage/exchangePrConfirm/verify.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
18 10:19:22
* @LastEditTime: 2020-11-
20 15:49:38
* @Description:
* @Description:
*/
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
...
@@ -23,17 +23,17 @@ const ExchangePrConfirmVerify: React.FC = () => {
...
@@ -23,17 +23,17 @@ const ExchangePrConfirmVerify: React.FC = () => {
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
//
setConfirmLoading(true);
setConfirmLoading
(
true
);
// PublicApi.postAsReturnGoodsSubmit
Verify({
PublicApi
.
postAsReplaceGoodsConfirm
Verify
({
//
applyId: id,
applyId
:
id
,
//
...values,
...
values
,
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code === 1000) {
if
(
res
.
code
===
1000
)
{
//
history.goBack();
history
.
goBack
();
//
}
}
//
}).finally(() => {
}).
finally
(()
=>
{
//
setConfirmLoading(false);
setConfirmLoading
(
false
);
//
});
});
};
};
return
(
return
(
...
@@ -50,7 +50,6 @@ const ExchangePrConfirmVerify: React.FC = () => {
...
@@ -50,7 +50,6 @@ const ExchangePrConfirmVerify: React.FC = () => {
确认单据
确认单据
</
Button
>
</
Button
>
)
}
)
}
isEdit
/>
/>
<
VerifyModal
<
VerifyModal
...
...
src/pages/afterService/exchangeManage/exchangePrSubmit/verify.tsx
View file @
42e2522f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
17 18:13:55
* @LastEditTime: 2020-11-
20 10:47:03
* @Description:
* @Description:
*/
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
...
@@ -23,17 +23,17 @@ const ExchangePrSubmitVerify: React.FC = () => {
...
@@ -23,17 +23,17 @@ const ExchangePrSubmitVerify: React.FC = () => {
if
(
!
id
)
{
if
(
!
id
)
{
return
;
return
;
}
}
//
setConfirmLoading(true);
setConfirmLoading
(
true
);
// PublicApi.postAsReturn
GoodsSubmitVerify({
PublicApi
.
postAsReplace
GoodsSubmitVerify
({
//
applyId: id,
applyId
:
id
,
//
...values,
...
values
,
//
}).then(res => {
}).
then
(
res
=>
{
//
if (res.code === 1000) {
if
(
res
.
code
===
1000
)
{
//
history.goBack();
history
.
goBack
();
//
}
}
//
}).finally(() => {
}).
finally
(()
=>
{
//
setConfirmLoading(false);
setConfirmLoading
(
false
);
//
});
});
};
};
return
(
return
(
...
...
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