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
d3938b76
Commit
d3938b76
authored
Dec 09, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新增物流单跳转
parent
4f840d2a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
266 additions
and
114 deletions
+266
-114
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+12
-42
interface.d.ts
src/pages/afterService/components/GoodsDrawer/interface.d.ts
+129
-0
index.tsx
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
+2
-1
index.tsx
...vice/exchangeApplication/exchangePrAddLogistics/index.tsx
+27
-13
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+2
-1
index.tsx
...erService/exchangeManage/exchangePrAddLogistics/index.tsx
+28
-14
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+2
-1
index.tsx
...rService/returnApplication/returnPrAddLogistics/index.tsx
+27
-13
useBusinessEffects.ts
...ubmit/components/ReturnForm/effects/useBusinessEffects.ts
+27
-1
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+10
-28
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
d3938b76
...
...
@@ -18,6 +18,7 @@ import { GetOrderOneBatchOrderListResponse } from '@/services/OrderApi';
import
{
PurchaseOrderInsideWorkStateTexts
,
ORDER_TYPE2
}
from
'@/constants'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
goodItem
,
OrderListParams
,
OrderListRes
}
from
'./interface'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
...
...
@@ -25,48 +26,6 @@ const formActions = createFormActions();
const
PAGE_SIZE
=
5
;
interface
goodItem
{
// ID
id
:
string
;
// 商品ID
productId
:
string
;
// 订单ID
orderId
:
string
;
// productName
productName
:
string
;
// 品类
category
:
string
;
// 品牌
brand
:
string
;
// 单位
unit
:
string
;
// 价格
price
:
number
;
// 采购数量
purchaseCount
:
number
;
// 退货数据
returnCount
:
number
;
// 换货数量
replaceCount
:
number
;
// 维修数量
repairCount
:
number
;
// 一加工数量
processNum
:
number
;
};
export
interface
OrderListParams
{
orderNo
:
string
;
orderThe
:
string
;
startCreateTime
:
string
;
endCreateTime
:
string
;
type
:
number
;
};
export
interface
OrderListRes
{
data
:
{
[
key
:
string
]:
any
}[];
totalCount
:
number
;
};
interface
GoodsDrawerProps
{
// 选中值(子表格的值)
checked
:
number
[];
...
...
@@ -422,6 +381,17 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
fullDate
.
push
({
...
product
,
orderNo
:
item
.
orderNo
,
// 手动补全订单单号
payList
:
item
.
payInfoList
?
item
.
payInfoList
.
map
(
item
=>
{
const
{
payPrice
,
...
rest
}
=
item
;
return
{
payAmount
:
payPrice
,
...
rest
,
}
})
:
[]
,
});
}
});
...
...
src/pages/afterService/components/GoodsDrawer/interface.d.ts
0 → 100644
View file @
d3938b76
/*
* @Author: XieZhiXiong
* @Date: 2020-12-09 16:28:28
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 16:28:29
* @Description:
*/
export
interface
goodItem
{
/**
* ID
*/
id
:
string
;
/**
* 商品ID
*/
productId
:
string
;
/**
* 订单ID
*/
orderId
:
string
;
/**
* 商品名称
*/
productName
:
string
;
/**
* 品类
*/
category
:
string
;
/**
* 品牌
*/
brand
:
string
;
/**
* 单位
*/
unit
:
string
;
/**
* 价格
*/
price
:
number
;
/**
* 采购数量
*/
purchaseCount
:
number
;
/**
* 退货数据
*/
returnCount
:
number
;
/**
* 换货数量
*/
replaceCount
:
number
;
/**
* 维修数量
*/
repairCount
:
number
;
/**
* 一加工数量
*/
processNum
:
number
;
/**
* 支付信息
*/
payInfoList
:
{
id
?:
number
/**
* 采购单ID
*/
orderId
?:
number
/**
* 支付次数
*/
payCount
?:
number
/**
* 支付环节
*/
payNode
?:
string
/**
* 外部状态:1.待支付2.待确认支付结果3.确认到账4.确认未到账
*/
externalState
?:
number
/**
* 支付比例
*/
payRatio
?:
number
/**
* 支付金额
*/
payPrice
?:
number
/**
* 支付方式:1.线上支付2.线下3.授信4.货到付款
*/
payWay
?:
number
/**
* 支付渠道
*/
channel
?:
number
/**
* 支付时间
*/
payTime
?:
number
/**
* 支付凭证
*/
payOrderUrls
?:
string
/**
* 支付流水号
*/
payCode
?:
string
/**
* 支付配置:1.平台代收2.会员直接到账
*/
ruleConfigurationId
?:
number
}[]
};
export
interface
OrderListParams
{
orderNo
:
string
;
orderThe
:
string
;
startCreateTime
:
string
;
endCreateTime
:
string
;
type
:
number
;
};
export
interface
OrderListRes
{
data
:
{
[
key
:
string
]:
any
}[];
totalCount
:
number
;
};
\ No newline at end of file
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
View file @
d3938b76
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 1
4:11:01
* @LastEditTime: 2020-12-09 1
6:38:48
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
from
'react'
;
...
...
@@ -167,6 +167,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
>
<
NiceForm
initialValues=
{
orderInfo
}
previewPlaceholder=
" "
components=
{
{
Stamp
,
SteamerTicket
,
...
...
src/pages/afterService/exchangeApplication/exchangePrAddLogistics/index.tsx
View file @
d3938b76
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-18 11:22:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-19 18:16:33
* @LastEditTime: 2020-1
2-09 17:06:14
* @Description: 待新增换货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -17,6 +17,10 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
EXCHANGE_INNER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS
,
EXCHANGE_INNER_STATUS_CONSUMER_UNCONFIRMED_LOGISTICS
,
}
from
'@/constants'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -95,18 +99,28 @@ const ExchangePrAddLogistics: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
查看物流单
</
Button
>
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${4}&shipmentOrderCode=${record.returnDeliveryNo}&relevanceOrderId=${record.replaceId}&relevanceType=${2}`
)
}
>
新增
</
Button
>
)
}
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_CONSUMER_UNCONFIRMED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${record.returnDeliveryId}`
)
}
>
查看物流单
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
d3938b76
...
...
@@ -15,7 +15,8 @@ import { PurchaseOrderInsideWorkStateTexts, ORDER_TYPE2 } from '@/constants';
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
GoodsDrawer
,
{
OrderListRes
}
from
'../../../../components/GoodsDrawer'
;
import
GoodsDrawer
from
'../../../../components/GoodsDrawer'
;
import
{
OrderListRes
}
from
'../../../../components/GoodsDrawer/interface'
;
import
AddressFormItem
from
'../../../../components/AddressFormItem'
;
import
{
addBillSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
...
...
src/pages/afterService/exchangeManage/exchangePrAddLogistics/index.tsx
View file @
d3938b76
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-18 11:22:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-19 18:57:56
* @LastEditTime: 2020-1
2-09 17:10:48
* @Description: 待新增换货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -17,6 +17,10 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
EXCHANGE_INNER_STATUS_SUPPLIER_NOT_ADDED_LOGISTICS
,
EXCHANGE_INNER_STATUS_SUPPLIER_UNCONFIRMED_LOGISTICS
,
}
from
'@/constants'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -71,7 +75,7 @@ const ReturnPrAddLogistics: React.FC = () => {
},
{
title
:
'换货发货单号'
,
dataIndex
:
're
turn
DeliveryNo'
,
dataIndex
:
're
place
DeliveryNo'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
...
...
@@ -95,18 +99,28 @@ const ReturnPrAddLogistics: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
查看物流单
</
Button
>
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_SUPPLIER_NOT_ADDED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${5}&shipmentOrderCode=${record.replaceDeliveryNo}&relevanceOrderId=${record.replaceId}&relevanceType=${3}`
)
}
>
新增
</
Button
>
)
}
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_SUPPLIER_UNCONFIRMED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${record.replaceDeliveryId}`
)
}
>
查看物流单
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
d3938b76
...
...
@@ -13,7 +13,8 @@ import { normalizeFiledata, FileData, isJSONStr } from '@/utils';
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
GoodsDrawer
,
{
OrderListRes
}
from
'../../../../components/GoodsDrawer'
;
import
GoodsDrawer
from
'../../../../components/GoodsDrawer'
;
import
{
OrderListRes
}
from
'../../../../components/GoodsDrawer/interface'
;
import
AddressFormItem
from
'../../../../components/AddressFormItem'
;
import
{
addBillSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
...
...
src/pages/afterService/returnApplication/returnPrAddLogistics/index.tsx
View file @
d3938b76
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-17 17:22:0
7
* @LastEditTime: 2020-1
2-09 17:14:3
7
* @Description: 待新增退货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -17,6 +17,10 @@ import { ColumnType } from 'antd/lib/table/interface';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
RETURN_INNER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS
,
RETURN_INNER_STATUS_CONSUMER_UNCONFIRMED_LOGISTICS
,
}
from
'@/constants'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -100,18 +104,28 @@ const ReturnPrAddLogistics: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
查看物流单
</
Button
>
{
record
.
innerStatus
===
RETURN_INNER_STATUS_CONSUMER_NOT_ADDED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${6}&shipmentOrderCode=${record.returnDeliveryNo}&relevanceOrderId=${record.returnId}&relevanceType=${4}`
)
}
>
新增
</
Button
>
)
}
{
record
.
innerStatus
===
RETURN_INNER_STATUS_CONSUMER_UNCONFIRMED_LOGISTICS
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${record.returnDeliveryId}`
)
}
>
查看物流单
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/effects/useBusinessEffects.ts
View file @
d3938b76
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-0
8 13:48:59
* @LastEditTime: 2020-12-0
9 16:18:45
* @Description: 联动逻辑相关
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
...
...
@@ -48,4 +48,29 @@ export const useBusinessEffects = (context, actions) => {
break
};
});
// 校验退货数量
onFieldInputChange$
(
'returnGoodsList.*.returnCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已退货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`returnGoodsList.
${
$1
}
.returnedCount`
}),
state
=>
state
.
value
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`returnGoodsList.
${
$1
}
.returnCount`
}),
state
=>
{
if
(
+
value
>
replacedCountValue
)
{
state
.
errors
=
'填写值已超过最大可退货数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
}
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
d3938b76
...
...
@@ -15,7 +15,8 @@ import { PurchaseOrderInsideWorkStateTexts, ORDER_TYPE2 } from '@/constants';
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
GoodsDrawer
,
{
OrderListRes
}
from
'../../../../components/GoodsDrawer'
;
import
GoodsDrawer
from
'../../../../components/GoodsDrawer'
;
import
{
OrderListRes
}
from
'../../../../components/GoodsDrawer/interface'
;
import
AddressFormItem
from
'../../../../components/AddressFormItem'
;
import
ReturnInfoDrawer
,
{
OrderInfo
}
from
'../../../../components/ReturnInfoDrawer'
;
import
{
addBillSchema
}
from
'./schema'
;
...
...
@@ -471,12 +472,13 @@ const ReturnForm: React.FC<BillsFormProps> = ({
purchasePrice
:
item
.
price
,
purchaseCount
:
item
.
purchaseCount
,
purchaseAmount
:
+
(
item
.
price
*
item
.
purchaseCount
).
toFixed
(
2
),
returnedCount
:
item
.
returnCount
||
item
.
purchaseCount
||
0
,
// 已退货数量
returnCount
:
''
,
returnAmount
:
''
,
extraData
:
{
id
:
item
.
id
,
returnReason
:
''
,
payList
:
[]
,
payList
:
item
.
payList
,
},
};
value
.
push
(
atom
);
...
...
@@ -492,32 +494,12 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const
{
getFieldValue
}
=
addSchemaAction
;
const
returnGoodsListValue
=
getFieldValue
(
'returnGoodsList'
);
const
item
=
returnGoodsListValue
[
index
];
if
(
!
item
.
extraData
.
payList
.
length
)
{
const
res
=
await
PublicApi
.
getOrderProcurementOrderDetails
({
id
:
item
.
orderId
,
});
if
(
res
.
code
!==
1000
)
{
return
;
}
setOrderInfo
({
index
,
...
item
,
payList
:
res
.
data
.
paymentInformationResponses
.
map
(
item
=>
{
return
{
...
item
,
payAmount
:
item
.
payPrice
,
};
}),
});
}
else
{
setOrderInfo
({
index
,
...
item
,
payList
:
item
.
extraData
.
payList
,
});
}
setOrderInfo
({
index
,
...
item
,
payList
:
item
.
extraData
.
payList
,
});
setVisibleReturnInfoDrawer
(
true
)
};
...
...
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