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
42b124cb
Commit
42b124cb
authored
Dec 14, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
dd3a3b52
bd59a776
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
270 additions
and
143 deletions
+270
-143
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+121
-81
index.tsx
...ges/afterService/components/ManualDeliveryModal/index.tsx
+50
-2
index.ts
...terService/components/ManualDeliveryModal/schema/index.ts
+6
-10
constants.ts
src/pages/afterService/constants.ts
+20
-0
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+1
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+1
-0
verify.tsx
...afterService/returnApplication/returnPrDeliver/verify.tsx
+13
-8
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+14
-38
index.tsx
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
+4
-1
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+11
-2
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+19
-1
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+10
-0
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
42b124cb
This diff is collapsed.
Click to expand it.
src/pages/afterService/components/ManualDeliveryModal/index.tsx
View file @
42b124cb
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 10:48:12
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-18 17:31:42
* @LastEditTime: 2020-1
2-14 16:38:53
* @Description: 手动发货弹窗
*/
import
React
from
'react'
;
...
...
@@ -10,6 +10,8 @@ import { Modal } from 'antd';
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
DatePicker
}
from
'@formily/antd-components'
import
NiceForm
from
'@/components/NiceForm'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
schema
}
from
'./schema'
;
const
modalFormActions
=
createFormActions
();
...
...
@@ -42,6 +44,51 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
onSubmit
(
values
);
}
};
// 获取发货地址
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
fetchLogisticsCompany
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getLogisticsSelectListCompany
({
cooperateType
:
'2'
,
// 1-平台物流服务商,2-商户合作物流公司
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
options
=
res
.
data
?
res
.
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
id
,
}))
:
[];
resolve
(
options
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
return
(
<
Modal
...
...
@@ -54,7 +101,8 @@ const VerifyModal: React.FC<VerifyModalProps> = ({
>
<
NiceForm
effects=
{
(
$
,
{
setFieldState
})
=>
{
useAsyncSelect
(
'deliveryAddress'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
useAsyncSelect
(
'logisticsName'
,
fetchLogisticsCompany
,
[
'label'
,
'value'
]);
}
}
components=
{
{
DatePicker
,
...
...
src/pages/afterService/components/ManualDeliveryModal/schema/index.ts
View file @
42b124cb
...
...
@@ -17,17 +17,15 @@ export const schema: ISchema = {
labelAlign
:
'top'
,
},
properties
:
{
a
ddress
:
{
deliveryA
ddress
:
{
type
:
'string'
,
title
:
'发货地址'
,
enum
:
[
],
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
},
send
Time
:
{
delivery
Time
:
{
type
:
'string'
,
title
:
'发货时间'
,
'x-component'
:
'DatePicker'
,
...
...
@@ -38,7 +36,7 @@ export const schema: ISchema = {
style
:
{
width
:
'100%'
},
},
},
code
No
:
{
logisticsOrder
No
:
{
type
:
'string'
,
title
:
'发货单号'
,
required
:
true
,
...
...
@@ -46,13 +44,11 @@ export const schema: ISchema = {
placeholder
:
'请选择'
,
},
},
company
:
{
logisticsName
:
{
type
:
'string'
,
title
:
'物流公司'
,
required
:
true
,
enum
:
[
],
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
...
...
src/pages/afterService/constants.ts
View file @
42b124cb
...
...
@@ -277,3 +277,22 @@ export const REFUND_OUTER_STATUS_TAG_MAP = {
[
REFUND_OUTER_STATUS_NOT_RECEIVED
]:
'warning'
,
[
REFUND_OUTER_STATUS_RECEIVED
]:
'success'
,
};
// 工作流相关
/**
* 售后退货外部流转
*/
export
const
RETURN_GOODS_OUTER_DELIVERY
=
18
;
/**
* 售后换货外部流转
*/
export
const
EXCHANGE_GOODS_OUTER_DELIVERY
=
20
;
/**
* 售后换货手工发货
*/
export
const
EXCHANGE_GOODS_MANUAL_DELIVERY
=
30
;
/**
* 售后退货手工发货
*/
export
const
RETURN_GOODS_MANUAL_DELIVERY
=
31
;
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
42b124cb
...
...
@@ -541,6 +541,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
<
GoodsDrawer
title=
"选择换货商品"
type=
{
2
}
visible=
{
visibleGoodsDrawer
}
fetchOrderList=
{
getOrderList
}
onClose=
{
()
=>
setVisibleGoodsDrawer
(
false
)
}
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
42b124cb
...
...
@@ -370,6 +370,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
</
Card
>
<
GoodsDrawer
type=
{
4
}
visible=
{
visibleDrawer
}
fetchOrderList=
{
getOrderList
}
onClose=
{
()
=>
setVisibleDrawer
(
false
)
}
...
...
src/pages/afterService/returnApplication/returnPrDeliver/verify.tsx
View file @
42b124cb
...
...
@@ -6,6 +6,7 @@ import { SettingOutlined } from '@ant-design/icons';
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
{
RETURN_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
const
ReturnPrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
...
...
@@ -36,14 +37,18 @@ const ReturnPrDeliverVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
()
=>
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
RETURN_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
)
}
</>
)
}
/>
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
42b124cb
...
...
@@ -63,7 +63,6 @@ const ReturnForm: React.FC<BillsFormProps> = ({
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
returnGoodsLoading
,
setReturnGoodsLoading
]
=
useState
(
false
);
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
OrderInfo
>
(
null
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
[
visibleReturnInfoDrawer
,
setVisibleReturnInfoDrawer
]
=
useState
(
false
);
...
...
@@ -153,7 +152,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
// 缺
{
title
:
'已退款金额'
,
dataIndex
:
're
turnCount2
'
,
dataIndex
:
're
funded
'
,
align
:
'center'
,
},
];
...
...
@@ -248,47 +247,29 @@ const ReturnForm: React.FC<BillsFormProps> = ({
,
...
rest
,
});
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
// 获取退货明细列表
const
getReturnGoods
=
()
=>
{
if
(
!
id
)
{
return
;
}
setReturnGoodsLoading
(
true
);
PublicApi
.
getAsReturnGoodsPageReturnedGoods
({
returnId
:
id
,
current
:
`
${
1
}
`
,
pageSize
:
`
${
99999
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setReturnGoodsList
(
res
.
data
);
setReturnGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
data
:
goodsDetailList
.
map
(
item
=>
({
...
item
,
returnedCount
:
item
.
purchaseCount
||
0
,
// 已退货数量,这里取 采购数量判断即可
returnedCount
:
item
.
purchaseCount
||
0
,
// 已退货数量,这里取 采购数量判断即可
extraData
:
{
id
:
item
.
orderRecordId
,
returnReason
:
item
.
returnReason
,
payList
:
item
.
payList
,
payList
:
item
.
payList
||
[],
id
:
item
.
orderRecordId
||
[],
taskType
,
},
})),
totalCount
:
res
.
data
.
totalCount
,
totalCount
:
goodsDetailList
.
length
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]
);
setGoodsValue
(
goodsDetailList
.
map
(
item
=>
item
.
orderRecordId
)
);
}
}).
finally
(()
=>
{
set
ReturnGoods
Loading
(
false
);
set
Info
Loading
(
false
);
});
};
useEffect
(()
=>
{
getDetailInfo
();
getReturnGoods
();
},
[]);
const
handleAddGoods
=
()
=>
{
...
...
@@ -405,7 +386,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}),
isNeedReturn
:
1
,
})),
taskType
:
18
,
// taskType: returnGoodsList[0].taskType,
taskType
:
31
,
};
PublicApi
.
postAsReturnGoodsSave
(
payload
)
...
...
@@ -490,6 +472,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
id
:
item
.
id
,
returnReason
:
''
,
payList
:
item
.
payList
,
taskType
:
item
.
processEnum
,
},
};
value
.
push
(
atom
);
...
...
@@ -541,7 +524,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
);
return
(
<
Spin
spinning=
{
infoLoading
||
returnGoodsLoading
}
>
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
style=
{
{
padding
:
24
,
...
...
@@ -575,14 +558,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
<
NiceForm
initialValues=
{
{
...
detailInfo
,
returnGoodsList
:
returnGoodsList
.
data
.
map
(
item
=>
({
...
item
,
extraData
:
{
returnReason
:
item
.
returnReason
,
payList
:
item
.
payList
||
[],
id
:
item
.
orderRecordId
||
[],
},
})),
returnGoodsList
:
returnGoodsList
.
data
,
}
}
expressionScope=
{
{
TableAddButton
,
...
...
src/pages/payandSettle/creditManage/quotaMenage/index.tsx
View file @
42b124cb
...
...
@@ -188,7 +188,10 @@ const QuotaMenage: React.FC = () => {
render
:
(
text
,
record
)
=>
(
<>
{
/* 授信状态为 正常 时可申请调额 */
}
{
record
.
status
===
CREDIT_STATUS_NORMAL
&&
(
{
(
record
.
status
===
CREDIT_STATUS_NORMAL
&&
record
.
isCanApply
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
handleAdjustment
(
record
)
}
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
42b124cb
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 16:00:20
* @LastEditTime: 2020-12-
14 16:55:09
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
...
...
@@ -217,6 +217,8 @@ const fetchOrderPurchaseReceiptAddList = async (params: any) => {
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
supplyMembersName
,
membersId
:
item
.
supplyMembersId
,
membersRoleId
:
item
.
supplyMembersRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
...
...
@@ -234,6 +236,8 @@ const getOrderSalesInvoiceOrderList = async (params: any) => {
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
memberName
,
membersId
:
item
.
memberId
,
membersRoleId
:
item
.
memberRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
...
...
@@ -481,7 +485,7 @@ export const useBusinessEffects = (context, actions) => {
const
{
originAsyncData
=
[]
}
=
fieldState
;
const
current
=
originAsyncData
.
find
(
item
=>
item
.
id
===
fieldState
.
value
);
const
params
=
getParams
(
fieldState
.
value
);
if
(
current
)
{
linkage
.
value
(
'invoicesTypeCode'
,
current
.
number
);
}
...
...
@@ -493,8 +497,11 @@ export const useBusinessEffects = (context, actions) => {
if
(
fieldState
.
name
===
'invoicesTypeId'
)
{
const
invoicesTypeIdState
=
getFieldState
(
'invoicesTypeId'
);
console
.
log
(
'invoicesTypeIdState2'
,
invoicesTypeIdState
)
if
(
invoicesTypeIdState
.
value
)
{
const
current
=
invoicesTypeIdState
.
originAsyncData
.
find
(
item
=>
item
.
id
===
invoicesTypeIdState
.
value
);
if
(
current
)
{
linkage
.
value
(
'invoicesTypeCode'
,
current
.
number
);
}
...
...
@@ -518,6 +525,8 @@ export const useBusinessEffects = (context, actions) => {
// 设置单据公用的数据相关
setFieldValue
(
'memberName'
,
first
?
first
.
memberName
:
''
);
setFieldValue
(
'membersId'
,
first
?
first
.
membersId
:
''
);
setFieldValue
(
'membersRoleId'
,
first
?
first
.
membersRoleId
:
''
);
setFieldValue
(
'address'
,
first
?
`
${
first
.
fullAddress
}
${
first
.
receiverName
}
/
${
first
.
phone
}
`
:
''
);
// 以下数据只用于收集,不用于展示
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
42b124cb
...
...
@@ -224,6 +224,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
const
{
supplyMembersName
,
supplyMembersId
,
supplyMembersRoleId
,
deliveryAddresId
,
orderNo
,
deliveryAddressInfo
,
...
...
@@ -239,6 +241,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
+
deliveryAddresId
,
memberName
:
supplyMembersName
,
membersId
:
supplyMembersId
,
membersRoleId
:
supplyMembersRoleId
,
fullAddress
:
deliveryAddressInfo
.
fullAddress
||
''
,
receiverName
:
deliveryAddressInfo
.
receiverName
||
''
,
phone
:
deliveryAddressInfo
.
phone
||
''
,
...
...
@@ -265,6 +269,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
const
{
createMemberName
,
createMemberId
,
createRoleId
,
deliveryAddresId
,
orderNo
,
deliveryAddressInfo
,
...
...
@@ -280,6 +286,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
id
:
+
relevanceInvoicesId
,
deliveryAddresId
:
+
deliveryAddresId
,
memberName
:
createMemberName
,
membersId
:
createMemberId
,
membersRoleId
:
createRoleId
,
fullAddress
:
deliveryAddressInfo
.
fullAddress
||
''
,
receiverName
:
deliveryAddressInfo
.
receiverName
||
''
,
phone
:
deliveryAddressInfo
.
phone
||
''
,
...
...
@@ -716,6 +724,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
transport
,
invoicesDetailsRequests
=
[],
memberName
,
membersId
,
membersRoleId
,
...
rest
}
=
value
;
const
newInvoicesDetailsRequests
=
invoicesDetailsRequests
.
map
(({
...
...
@@ -738,6 +748,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postOrderPurchaseReceiptAdd
({
...
rest
,
invoicesTypeCode
:
invoicesTypeCode
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
...
...
@@ -766,6 +777,8 @@ const BillsForm: React.FC<BillsFormProps> = ({
};
}),
supplyMembersName
:
memberName
,
supplyMembersId
:
membersId
,
supplyMembersRoleId
:
membersRoleId
,
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
@@ -837,6 +850,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
PublicApi
.
postOrderSalesInvoiceOrder
({
...
rest
,
invoicesTypeCode
:
invoicesTypeCode
,
orderNo
:
orderNo
[
0
].
orderNo
,
relevanceInvoicesId
:
orderNo
[
0
].
id
,
transactionTime
:
newTransactionTime
,
...
...
@@ -864,7 +878,11 @@ const BillsForm: React.FC<BillsFormProps> = ({
productCount
:
goodsCount
,
};
}),
createMemberName
:
memberName
,
// 后台说 不管是 采购入库单,还是 销售发货单 都用这三个字段
// createMemberName: memberName,
supplyMembersName
:
memberName
,
supplyMembersId
:
membersId
,
supplyMembersRoleId
:
membersRoleId
,
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
42b124cb
...
...
@@ -377,6 +377,16 @@ export const addBillSchema: ISchema = {
type
:
'boolean'
,
display
:
false
,
},
// 会员id,可以是采购会员id、销售会员id
membersId
:
{
type
:
'boolean'
,
display
:
false
,
},
// 会员角色id,可以是采购会员角色id、销售会员角色id
membersRoleId
:
{
type
:
'boolean'
,
display
:
false
,
},
},
},
},
...
...
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