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
0966f2c2
Commit
0966f2c2
authored
Dec 03, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接中
parent
206f5468
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
927 additions
and
272 deletions
+927
-272
index.ts
src/constants/index.ts
+0
-0
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+122
-77
interface.d.ts
...fterService/components/ExchangeDeliverInfo/interface.d.ts
+142
-0
index.tsx
...es/afterService/components/ExchangeReceivedInfo/index.tsx
+125
-77
interface.d.ts
...terService/components/ExchangeReceivedInfo/interface.d.ts
+142
-0
constants.ts
src/pages/afterService/constants.ts
+20
-2
index.tsx
...rvice/exchangeApplication/components/DetailInfo/index.tsx
+15
-24
index.tsx
...ervice/exchangeApplication/exchangePrAddDeliver/index.tsx
+12
-3
index.tsx
...ce/exchangeApplication/exchangePrAddWarehousing/index.tsx
+37
-14
index.tsx
...erService/exchangeApplication/exchangePrDeliver/index.tsx
+7
-7
verify.tsx
...rService/exchangeApplication/exchangePrDeliver/verify.tsx
+2
-1
index.tsx
...Service/exchangeManage/exchangePrAddWarehousing/index.tsx
+41
-19
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+59
-35
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+202
-13
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+1
-0
No files found.
src/constants/index.ts
View file @
0966f2c2
This diff is collapsed.
Click to expand it.
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
0966f2c2
This diff is collapsed.
Click to expand it.
src/pages/afterService/components/ExchangeDeliverInfo/interface.d.ts
0 → 100644
View file @
0966f2c2
/*
* @Author: XieZhiXiong
* @Date: 2020-11-30 18:19:05
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-30 18:19:06
* @Description:
*/
export
interface
SummaryData
{
/**
* 订单号
*/
orderNo
:
string
/**
* 商品id
*/
productId
:
number
/**
* 商品名称
*/
productName
:
string
/**
* 品类
*/
category
:
string
/**
* 品牌
*/
brand
:
string
/**
* 单位
*/
unit
:
string
/**
* 换货数量
*/
replaceCount
:
number
/**
* 发货数量
*/
deliveryCount
:
number
/**
* 未退货发货数量,(未退货发货=换货数量-已退货发货)
*/
unDeliveryCount
:
number
/**
* 收货数量
*/
receiveCount
:
number
/**
* 差异数量,(差异数量=已退货发货-已退货收货)
*/
differenceCount
:
number
}
export
interface
Detailed
{
/**
* 发货Id
*/
deliveryId
:
number
/**
* 批次
*/
batch
:
number
/**
* 发货单号
*/
deliveryNo
:
string
/**
* 发货时间(yyyy-MM-ddHH:mm)
*/
deliveryTime
:
string
/**
* 物流单号
*/
logisticsOrderNo
:
string
/**
* 物流公司
*/
logisticsName
:
string
/**
* 入库单号
*/
storageNo
:
string
/**
* 入库时间(yyyy-MM-ddHH:mm)
*/
storageTime
:
string
/**
* 内部状态
*/
innerStatus
:
number
/**
* 内部状态名称
*/
innerStatusName
:
string
/**
* 发货明细 ,DeliveryGoodsDetailVO
*/
detailList
:
{
/**
* 订单号
*/
orderNo
?:
string
/**
* 商品id
*/
productId
?:
number
/**
* 商品名称
*/
productName
?:
string
/**
* 品类
*/
category
?:
string
/**
* 品牌
*/
brand
?:
string
/**
* 单位
*/
unit
?:
string
/**
* 数量
*/
count
?:
number
/**
* 发货数量
*/
deliveryCount
?:
number
/**
* 入库数量
*/
storageCount
?:
number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount
?:
number
}[]
}
\ No newline at end of file
src/pages/afterService/components/ExchangeReceivedInfo/index.tsx
View file @
0966f2c2
This diff is collapsed.
Click to expand it.
src/pages/afterService/components/ExchangeReceivedInfo/interface.d.ts
0 → 100644
View file @
0966f2c2
/*
* @Author: XieZhiXiong
* @Date: 2020-11-30 18:44:40
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-30 18:44:41
* @Description:
*/
export
interface
SummaryData
{
/**
* 订单号
*/
orderNo
:
string
/**
* 商品id
*/
productId
:
number
/**
* 商品名称
*/
productName
:
string
/**
* 品类
*/
category
:
string
/**
* 品牌
*/
brand
:
string
/**
* 单位
*/
unit
:
string
/**
* 换货数量
*/
replaceCount
:
number
/**
* 发货数量
*/
deliveryCount
:
number
/**
* 未退货发货数量,(未退货发货=换货数量-已退货发货)
*/
unDeliveryCount
:
number
/**
* 收货数量
*/
receiveCount
:
number
/**
* 差异数量,(差异数量=已退货发货-已退货收货)
*/
differenceCount
:
number
}
export
interface
Detailed
{
/**
* 发货Id
*/
deliveryId
:
number
/**
* 批次
*/
batch
:
number
/**
* 发货单号
*/
deliveryNo
:
string
/**
* 发货时间(yyyy-MM-ddHH:mm)
*/
deliveryTime
:
string
/**
* 物流单号
*/
logisticsOrderNo
:
string
/**
* 物流公司
*/
logisticsName
:
string
/**
* 入库单号
*/
storageNo
:
string
/**
* 入库时间(yyyy-MM-ddHH:mm)
*/
storageTime
:
string
/**
* 内部状态
*/
innerStatus
:
number
/**
* 内部状态名称
*/
innerStatusName
:
string
/**
* 发货明细 ,DeliveryGoodsDetailVO
*/
detailList
:
{
/**
* 订单号
*/
orderNo
?:
string
/**
* 商品id
*/
productId
?:
number
/**
* 商品名称
*/
productName
?:
string
/**
* 品类
*/
category
?:
string
/**
* 品牌
*/
brand
?:
string
/**
* 单位
*/
unit
?:
string
/**
* 数量
*/
count
?:
number
/**
* 发货数量
*/
deliveryCount
?:
number
/**
* 入库数量
*/
storageCount
?:
number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount
?:
number
}[]
}
\ No newline at end of file
src/pages/afterService/constants.ts
View file @
0966f2c2
...
...
@@ -134,4 +134,22 @@ export const EXCHANGE_INNER_STATUS_BADGE_MAP = {
[
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
]:
'#6C9CEB'
,
[
EXCHANGE_INNER_STATUS_UNCONFIRMED_FINISHED
]:
'#6C9CEB'
,
[
EXCHANGE_INNER_STATUS_FINISHED
]:
'#41CC9E'
,
};
\ No newline at end of file
};
// 换货明细内部状态
/**
* 未确认发货
*/
export
const
EXCHANGE_INNER_STATUS_UNCONFIRMED_DELIVER
=
1
;
/**
* 已确认发货
*/
export
const
EXCHANGE_INNER_STATUS_CONFIRMED_DELIVER
=
2
;
/**
* 已确认收货
*/
export
const
EXCHANGE_INNER_STATUS_CONFIRMED_RECEIVING
=
3
;
/**
* 确认回单
*/
export
const
EXCHANGE_INNER_STATUS_CONFIRMED_BACK
=
4
;
\ No newline at end of file
src/pages/afterService/exchangeApplication/components/DetailInfo/index.tsx
View file @
0966f2c2
...
...
@@ -194,6 +194,16 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
getReplaceGoods
();
},
[]);
const
handleReceivedConfirmReturnDeliver
=
(
id
):
Promise
<
any
>
=>
{
return
PublicApi
.
postAsReplaceGoodsConfirmReturnDeliveryGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
...
...
@@ -275,19 +285,10 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
/* 退货发货信息 */
}
<
Suspense
fallback=
{
null
}
>
<
ExchangeReceivedInfo
summary=
{
[
{
orderNo
:
'123'
,
id
:
1
,
},
]
}
detailed=
{
[
{
orderNo
:
'123'
,
id
:
1
,
},
]
}
summary=
{
detailInfo
&&
detailInfo
.
returnStatisticsList
?
detailInfo
.
returnStatisticsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
returnDeliveryGoodsList
?
detailInfo
.
returnDeliveryGoodsList
:
[]
}
isPurchaser=
{
true
}
onConfirmReturnDeliver=
{
handleReceivedConfirmReturnDeliver
}
/>
</
Suspense
>
</
Col
>
...
...
@@ -296,18 +297,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{
/* 换货收货信息 */
}
<
Suspense
fallback=
{
null
}
>
<
ExchangeDeliverInfo
summary=
{
[
{
orderNo
:
'123'
,
id
:
1
,
},
]
}
detailed=
{
[
{
orderNo
:
'123'
,
id
:
1
,
},
]
}
summary=
{
detailInfo
&&
detailInfo
.
replaceStatisticsList
?
detailInfo
.
replaceStatisticsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
replaceDeliveryGoodsList
?
detailInfo
.
replaceDeliveryGoodsList
:
[]
}
isPurchaser=
{
true
}
/>
</
Suspense
>
...
...
src/pages/afterService/exchangeApplication/exchangePrAddDeliver/index.tsx
View file @
0966f2c2
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
27 17:16:30
* @LastEditTime: 2020-11-
30 14:11:06
* @Description: 待新增退货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -49,8 +49,17 @@ const ExchangePrAddDeliver: React.FC = () => {
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认审核退货发货单号为
${
record
.
applyNo
}
的退货发货单?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsVerifyReturnDeliveryGoods
({
dataId
:
record
.
replaceId
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postAsReplaceGoodsVerifyReturnDeliveryGoods
({
dataId
:
record
.
replaceId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
},
});
...
...
src/pages/afterService/exchangeApplication/exchangePrAddWarehousing/index.tsx
View file @
0966f2c2
...
...
@@ -18,6 +18,12 @@ 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
{
DOC_TYPE_EXCHANGE_RECEIPT
,
DEPENDENT_DOC_EXCHANGE
,
EXCHANGE_INNER_STATUS_NOT_ADDED_REPLACE_STORAGE
,
EXCHANGE_INNER_STATUS_UNREVIEWED_REPLACE_STORAGE
}
from
'@/constants'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -29,6 +35,7 @@ import {
EXCHANGE_INNER_STATUS_BADGE_MAP
,
}
from
'../../constants'
;
import
styles
from
'./index.less'
;
import
{
reject
}
from
'lodash'
;
const
{
confirm
}
=
Modal
;
...
...
@@ -43,8 +50,17 @@ const ExchangePrAddWarehousing: React.FC = () => {
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认审核换货入库单号为
${
record
.
applyNo
}
的换货入库单?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsVerifyReplaceGoodsStorage
({
dataId
:
record
.
replaceId
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postAsReplaceGoodsVerifyReplaceGoodsStorage
({
dataId
:
record
.
replaceId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
},
});
...
...
@@ -111,18 +127,25 @@ const ExchangePrAddWarehousing: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
handleVerify
(
record
)
}
>
审核
</
Button
>
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_NOT_ADDED_REPLACE_STORAGE
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/bills/add?relevanceInvoicesId=${record.replaceId}&invoicesTypeId=${DOC_TYPE_EXCHANGE_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_EXCHANGE}`
)
}
>
新增
</
Button
>
)
}
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_UNREVIEWED_REPLACE_STORAGE
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handleVerify
(
record
)
}
>
审核
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/exchangeApplication/exchangePrDeliver/index.tsx
View file @
0966f2c2
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
19 18:17:01
* @LastEditTime: 2020-11-
30 14:14:07
* @Description: 待退货发货
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -52,27 +52,27 @@ const ExchangePrDeliver: React.FC = () => {
},
{
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
},
},
{
title
:
'供应会员'
,
dataIndex
:
'supplierName'
,
align
:
'center'
,
},
},
{
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
},
{
title
:
'退货批次'
,
dataIndex
:
'
b
atch'
,
dataIndex
:
'
returnB
atch'
,
align
:
'center'
,
},
{
title
:
'退货发货单号'
,
dataIndex
:
'
deliver
No'
,
dataIndex
:
'
returnDelivery
No'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
...
...
src/pages/afterService/exchangeApplication/exchangePrDeliver/verify.tsx
View file @
0966f2c2
...
...
@@ -40,7 +40,8 @@ const ExchangePrDeliverVerify: React.FC = () => {
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
// onClick=
{()
=
>
handleVisible(true)}
onClick=
{
()
=>
handleSubmit
({})
}
>
手工退货发货
</
Button
>
...
...
src/pages/afterService/exchangeManage/exchangePrAddWarehousing/index.tsx
View file @
0966f2c2
...
...
@@ -18,6 +18,12 @@ 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
{
DOC_TYPE_RETURN_RECEIPT
,
DEPENDENT_DOC_EXCHANGE
,
EXCHANGE_INNER_STATUS_NOT_ADDED_RETURN_STORAGE
,
EXCHANGE_INNER_STATUS_UNREVIEWED_RETURN_STORAGE
,
}
from
'@/constants'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
@@ -43,8 +49,17 @@ const ExchangePrAddWarehousing: React.FC = () => {
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认审核退货入库单号为
${
record
.
applyNo
}
的退货入库单?`
,
onOk
()
{
return
PublicApi
.
postAsReplaceGoodsVerifyReturnGoodsStorage
({
dataId
:
record
.
replaceId
,
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
postAsReplaceGoodsVerifyReturnGoodsStorage
({
dataId
:
record
.
replaceId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
},
});
...
...
@@ -67,7 +82,7 @@ const ExchangePrAddWarehousing: React.FC = () => {
},
{
title
:
'申请单摘要'
,
dataIndex
:
'
parentMemberName
'
,
dataIndex
:
'
applyAbstract
'
,
align
:
'center'
,
},
{
...
...
@@ -77,17 +92,17 @@ const ExchangePrAddWarehousing: React.FC = () => {
},
{
title
:
'单据时间'
,
dataIndex
:
'
created
'
,
dataIndex
:
'
applyTime
'
,
align
:
'center'
,
},
{
title
:
'退货批次'
,
dataIndex
:
'
b
atch'
,
dataIndex
:
'
returnB
atch'
,
align
:
'center'
,
},
{
title
:
'退货
发货
单号'
,
dataIndex
:
'
deliver
No'
,
title
:
'退货
入库
单号'
,
dataIndex
:
'
returnStorage
No'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
...
...
@@ -111,18 +126,25 @@ const ExchangePrAddWarehousing: React.FC = () => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
handleVerify
(
record
)
}
>
审核
</
Button
>
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_NOT_ADDED_RETURN_STORAGE
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/bills/add?relevanceInvoicesId=${record.replaceId}&invoicesTypeId=${DOC_TYPE_RETURN_RECEIPT}&relevanceInvoices=${DEPENDENT_DOC_EXCHANGE}`
)
}
>
新增
</
Button
>
)
}
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_UNREVIEWED_RETURN_STORAGE
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handleVerify
(
record
)
}
>
审核
</
Button
>
)
}
</>
),
},
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
0966f2c2
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-
27 19:05:56
* @LastEditTime: 2020-11-
30 16:54:39
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
...
...
@@ -354,6 +354,30 @@ const getParams = type => {
basicParams
.
formilyProps
.
ctx
.
schema
=
machiningDeliveryBillSchema
;
break
;
}
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
{
break
;
}
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
break
;
}
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
{
break
;
}
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
break
;
}
default
:
break
;
...
...
@@ -403,10 +427,11 @@ export const useBusinessEffects = (context, actions) => {
break
;
}
// 退货发货单、退货入库单只能选择 退货申请单
// 退货发货单、退货入库单只能选择 退货申请单
、换货申请单
case
DOC_TYPE_RETURN_INVOICE
:
case
DOC_TYPE_RETURN_RECEIPT
:
{
freeEnumItem
(
newEnum
,
'value'
,
DEPENDENT_DOC_RETURN
);
freeEnumItem
(
newEnum
,
'value'
,
DEPENDENT_DOC_EXCHANGE
);
break
;
}
...
...
@@ -555,7 +580,13 @@ export const useBusinessEffects = (context, actions) => {
}
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
{
case
DOC_TYPE_RETURN_INVOICE
:
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
switch
(
relevanceInvoicesVal
)
{
// 换货申请单
case
DEPENDENT_DOC_EXCHANGE
:
{
...
...
@@ -593,20 +624,7 @@ export const useBusinessEffects = (context, actions) => {
};
break
;
}
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
break
;
}
// 换货发货单、换货入库单
case
DOC_TYPE_EXCHANGE_INVOICE
:
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
break
;
}
default
:
{
break
;
...
...
@@ -795,9 +813,14 @@ export const useBusinessEffects = (context, actions) => {
break
;
}
// 退货发货单
、退货入库单
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
case
DOC_TYPE_RETURN_RECEIPT
:
{
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
switch
(
relevanceInvoicesVal
)
{
// 换货申请单
case
DEPENDENT_DOC_EXCHANGE
:
{
...
...
@@ -828,14 +851,7 @@ export const useBusinessEffects = (context, actions) => {
};
break
;
}
// 换货发货单、换货入库单
case
DOC_TYPE_EXCHANGE_INVOICE
:
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
break
;
}
default
:
{
break
;
...
...
@@ -857,8 +873,8 @@ export const useBusinessEffects = (context, actions) => {
undefined
,
id
:
current
.
id
,
// 加工发货单需要,明细id
orderNo
:
current
.
orderNo
,
// 加工发货单需要,订单编号
processNum
:
current
.
processNum
,
// 加工发货单需要,加工数量
orderNo
:
current
.
orderNo
,
// 订单编号
goodsCount
:
current
.
purchaseCount
,
// 采购数量
};
}
...
...
@@ -915,14 +931,24 @@ export const useBusinessEffects = (context, actions) => {
content
:
'单据数量已超过加工数量'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelButtonProps
:
{
style
:
{
display
:
'none'
,
},
},
});
}
break
;
}
// 退货发货单
、退货入库单
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
case
DOC_TYPE_RETURN_RECEIPT
:
{
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
switch
(
relevanceInvoicesVal
)
{
// 换货申请单
case
DEPENDENT_DOC_EXCHANGE
:
{
...
...
@@ -933,6 +959,11 @@ export const useBusinessEffects = (context, actions) => {
content
:
'单据数量已超过换货数量'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelButtonProps
:
{
style
:
{
display
:
'none'
,
},
},
});
}
break
;
...
...
@@ -946,13 +977,6 @@ export const useBusinessEffects = (context, actions) => {
break
;
}
// 换货发货单、换货入库单
case
DOC_TYPE_EXCHANGE_INVOICE
:
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
break
;
}
default
:
{
break
;
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
0966f2c2
...
...
@@ -445,7 +445,60 @@ const BillsForm: React.FC<BillsFormProps> = ({
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
switch
(
+
relevanceInvoices
)
{
// 换货申请单
case
DEPENDENT_DOC_EXCHANGE
:
{
setInfoLoading
(
true
);
PublicApi
.
getAsReplaceGoodsGetDetailBySupplier
({
replaceId
:
relevanceInvoicesId
,
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
const
{
supplierName
,
consumerName
,
returnGoodsAddress
,
applyNo
,
parentMemberId
,
parentMemberRoleId
,
}
=
res
.
data
;
setBillInfo
({
invoicesTypeId
:
intInvoicesTypeId
,
relevanceInvoices
:
+
relevanceInvoices
,
orderNo
:
relevanceInvoicesId
?
[
{
orderNo
:
applyNo
,
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
returnGoodsAddress
.
receiveId
,
memberName
:
consumerName
,
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
break
;
}
// 退货申请单
case
DEPENDENT_DOC_RETURN
:
{
break
;
}
}
break
;
}
...
...
@@ -541,12 +594,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
storageCount
:
productCount
,
};
}),
supplyMembersName
:
memberName
,
...
...
@@ -583,12 +638,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
storageCount
:
productCount
,
};
}),
})
...
...
@@ -628,12 +685,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
shipmentQuantity
:
productCount
,
};
}),
createMemberName
:
memberName
,
...
...
@@ -670,12 +729,14 @@ const BillsForm: React.FC<BillsFormProps> = ({
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
shipmentQuantity
:
productCount
,
};
}),
})
...
...
@@ -794,9 +855,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
break
;
}
// 退货发货单、
退货入库
单
// 退货发货单、
换货发货
单
case
DOC_TYPE_RETURN_INVOICE
:
case
DOC_TYPE_
RETURN_RECEIPT
:
{
case
DOC_TYPE_
EXCHANGE_INVOICE
:
{
if
(
!
id
)
{
if
(
isEdit
)
{
return
;
...
...
@@ -830,6 +891,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
storageCount
:
0
,
shipmentQuantity
:
productCount
,
productCount
:
extraData
.
goodsCount
,
orderNo
:
extraData
.
orderNo
,
};
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
...
...
@@ -855,20 +917,147 @@ const BillsForm: React.FC<BillsFormProps> = ({
if
(
!
isEdit
)
{
return
;
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
{
const
{
extraData
=
{},
amount
,
productCount
,
itemName
,
...
rest
}
=
item
;
return
{
...
rest
,
goodsName
:
itemName
,
productModel
:
rest
.
specifications
,
productName
:
extraData
.
productName
,
storageCount
:
0
,
shipmentQuantity
:
productCount
,
productCount
:
extraData
.
goodsCount
,
orderNo
:
extraData
.
orderNo
,
};
}),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
break
;
}
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
{
break
;
}
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
// 换货入库单、退货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
case
DOC_TYPE_RETURN_RECEIPT
:
{
if
(
!
id
)
{
if
(
isEdit
)
{
return
;
}
PublicApi
.
postWarehouseInvoicesAdd
({
invoicesTypeCode
:
invoicesTypeCode
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
memberName
:
memberName
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
orderNo
:
orderNo
[
0
].
orderNo
,
deliveryAddresId
:
orderNo
[
0
].
deliveryAddresId
,
receiverName
:
rest
.
receiverName
,
fullAddress
:
rest
.
fullAddress
,
phone
:
rest
.
phone
,
deliveryType
:
rest
.
deliveryType
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
{
const
{
extraData
=
{},
amount
,
productCount
,
itemName
,
...
rest
}
=
item
;
return
{
...
rest
,
goodsName
:
itemName
,
productModel
:
rest
.
specifications
,
productName
:
extraData
.
productName
,
shipmentQuantity
:
0
,
storageCount
:
productCount
,
productCount
:
extraData
.
goodsCount
,
orderNo
:
extraData
.
orderNo
,
};
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
else
{
// update action
if
(
!
isEdit
)
{
return
;
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
{
const
{
extraData
=
{},
amount
,
productCount
,
itemName
,
...
rest
}
=
item
;
return
{
...
rest
,
goodsName
:
itemName
,
productModel
:
rest
.
specifications
,
productName
:
extraData
.
productName
,
shipmentQuantity
:
0
,
storageCount
:
productCount
,
productCount
:
extraData
.
goodsCount
,
orderNo
:
extraData
.
orderNo
,
};
}),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
break
;
}
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
0966f2c2
...
...
@@ -442,6 +442,7 @@ export const addBillSchema: ISchema = {
brand
:
{
type
:
'string'
,
title
:
'品牌'
,
default
:
'品牌可以为空'
,
'x-component'
:
'Text'
,
},
unit
:
{
...
...
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