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
陈智峰
jinfa-platform
Commits
a5649e79
Commit
a5649e79
authored
Dec 22, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增单据 退货发货单 相关逻辑
parent
5adf255d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
19 deletions
+123
-19
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+51
-12
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+6
-7
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+66
-0
No files found.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
a5649e79
...
...
@@ -2,12 +2,13 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
14 16:55:09
* @LastEditTime: 2020-12-
22 16:57:28
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
moment
from
'moment'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
...
...
@@ -40,6 +41,7 @@ import {
purchaseOrderBillSchema
,
machiningWarehousingBillSchema
,
machiningDeliveryBillSchema
,
refundDeliveryBillSchema
,
}
from
'../schema'
;
const
{
...
...
@@ -178,32 +180,32 @@ const machiningDeliveryColumns = [
},
];
// 售后订单列表
const
afterSaleColumns
=
[
// 售后
退货发货
订单列表
const
afterSale
RefundDelivery
Columns
=
[
{
title
:
'申请单号'
,
align
:
'center'
,
dataIndex
:
'
order
No'
,
dataIndex
:
'
apply
No'
,
},
{
title
:
'申请单摘要'
,
align
:
'center'
,
dataIndex
:
'
invoices
Abstract'
,
dataIndex
:
'
apply
Abstract'
,
},
{
title
:
'
会员名称
'
,
title
:
'
供应会员
'
,
align
:
'center'
,
dataIndex
:
'
memb
erName'
,
dataIndex
:
'
suppli
erName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'
create
Time'
,
dataIndex
:
'
apply
Time'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'
stat
e'
,
dataIndex
:
'
outerStatusNam
e'
,
},
];
...
...
@@ -286,7 +288,36 @@ const getMachiningDeliveryList = async (params: any) => {
phone
:
item
.
receiveUserTel
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};;
};
}
return
[];
};
// 获取售后退货发货单单相关数据
const
getRefundDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReturnGoodsPageToBeAddReturnDeliveryGoods
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
returnId
,
memberName
:
item
.
supplierName
,
membersId
:
item
.
parentMemberId
,
membersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
returnGoodsAddress
.
receiveId
,
fullAddress
:
item
.
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
returnGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
returnGoodsAddress
.
deliveryType
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
...
...
@@ -363,7 +394,12 @@ const getParams = type => {
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
afterSaleRefundDeliveryColumns
;
basicParams
.
fetchTableData
=
getRefundDeliveryList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
refundDeliveryBillSchema
;
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
...
...
@@ -518,7 +554,6 @@ export const useBusinessEffects = (context, actions) => {
// 关联单据改变
onFieldValueChange$
(
'orderNo'
).
subscribe
(
fieldState
=>
{
const
invoicesTypeIdVal
=
getFieldValue
(
'invoicesTypeId'
);
const
relevanceInvoicesVal
=
getFieldValue
(
'relevanceInvoices'
);
const
first
=
fieldState
.
value
&&
fieldState
.
value
[
0
];
// 设置单据公用的数据相关
...
...
@@ -653,6 +688,10 @@ export const useBusinessEffects = (context, actions) => {
case
DOC_TYPE_RETURN_INVOICE
:
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
// 设置配送方式相关字段数据
setFieldValue
(
'transport'
,
DELIVERY_TYPE
[
first
.
deliveryType
]);
setFieldValue
(
'deliveryType'
,
first
.
deliveryType
);
// 获取明细数据 商品 数据
PublicApi
.
getAsReturnGoodsPageReturnedGoods
({
returnId
:
first
.
id
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
a5649e79
...
...
@@ -540,15 +540,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -1010,7 +1010,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
if
(
!
isEdit
)
{
return
;
}
console
.
log
(
'value'
,
value
)
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
...
...
@@ -1400,9 +1399,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
supplyMembersName
:
orderNo
[
0
]
.
supplyMembersName
,
supplyMembersId
:
orderNo
[
0
]
.
supplyMembersId
,
supplyMembersRoleId
:
orderNo
[
0
]
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
a5649e79
...
...
@@ -752,6 +752,72 @@ export const machiningDeliveryBillSchema: ISchema = {
},
};
// 售后退货发货 弹窗 search schema
export
const
refundDeliveryBillSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-start'
,
tip
:
'输入 通知单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
3
,
},
properties
:
{
applyAbstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
supplierName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
'x-component'
:
'DateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
}
}
},
},
},
},
},
};
export
const
goodsSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
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