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
60109d24
Commit
60109d24
authored
Dec 10, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改待新增物流单
parent
fb311c84
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
206 additions
and
90 deletions
+206
-90
ModalTableOrder.tsx
...ics/logisticsSubmit/detail/components/ModalTableOrder.tsx
+5
-1
basicInfo.tsx
...logistics/logisticsSubmit/detail/components/basicInfo.tsx
+18
-16
goods.tsx
...ges/logistics/logisticsSubmit/detail/components/goods.tsx
+46
-8
index.tsx
src/pages/logistics/logisticsSubmit/detail/index.tsx
+53
-19
settingModal.tsx
src/pages/payandSettle/components/settingModal.tsx
+27
-30
usePayTypeEnum.ts
src/pages/payandSettle/components/usePayTypeEnum.ts
+31
-0
index.tsx
src/pages/payandSettle/paySetting/index.tsx
+1
-1
newPay.tsx
src/pages/payandSettle/paySetting/newPay.tsx
+24
-14
useSelfTable.tsx
...n/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
+1
-1
No files found.
src/pages/logistics/logisticsSubmit/detail/components/ModalTableOrder.tsx
View file @
60109d24
...
...
@@ -146,7 +146,11 @@ const ModalTableOrder: React.FC<ModalTableProps> = (props) => {
})
break
;
case
2
:
PublicApi
.
getAsreplaceGoodspageToBeAddReturnByLogistics
({...
parmas
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
break
;
case
3
:
break
;
...
...
src/pages/logistics/logisticsSubmit/detail/components/basicInfo.tsx
View file @
60109d24
...
...
@@ -121,13 +121,18 @@ const BasicInfo: React.FC<interfaceinfo> = (props) => {
// 确定
const
handleShipping
=
()
=>
{
const
selectRow
=
shippingRowCtl
.
selectRow
[
0
]
console
.
log
(
selectRow
)
form
.
setFieldsValue
({
shipmentOrderCode
:
selectRow
.
invoicesNo
})
onGet
(
selectRow
,
2
);
setshippingvisible
(
false
);
}
const
handleInvoices
=
(
type
:
number
)
=>
{
const
selectRow
=
invoicesRowCtl
.
selectRow
[
0
]
form
.
setFieldsValue
({
invoicesNo
:
selectRow
.
orderNo
relevanceOrderCode
:
selectRow
.
orderNo
})
onGet
(
selectRow
,
3
,
type
);
setinvoicesvisible
(
false
);
...
...
@@ -234,27 +239,24 @@ const BasicInfo: React.FC<interfaceinfo> = (props) => {
digest
:
set
.
digest
,
companyId
:
set
.
companyId
,
shipmentOrderCode
:
set
.
shipmentOrderCode
,
invoicesNo
:
set
.
invoicesNo
,
relevanceOrderCode
:
set
.
relevanceOrderCode
,
shipperAddressId
:
set
.
shipperAddressId
})
if
(
set
.
shipmentOrderCode
)
{
getShipmentOrder
()
}
if
(
set
.
relevanceOrderCode
)
{
getInvoicesOrder
(
Number
(
set
.
relevanceType
))
}
}
},
[
set
.
id
])
/**从别处来新增的 */
useEffect
(()
=>
{
if
(
addId
)
{
if
(
addId
)
{
console
.
log
(
set
,
960
)
form
.
setFieldsValue
({
shipmentOrderCode
:
set
.
shipmentOrderCode
,
invoicesNo
:
set
.
invoicesNo
,
relevanceOrderCode
:
set
.
relevanceOrderCode
,
})
if
(
set
.
shipmentOrderCode
)
{
getShipmentOrder
()
getInvoicesOrder
(
Number
(
set
.
relevanceType
))
}
}
},
[
addId
])
},
[
set
.
id
,
addId
])
return
(
<>
...
...
@@ -276,11 +278,11 @@ const BasicInfo: React.FC<interfaceinfo> = (props) => {
</
Form
.
Item
>
<
Form
.
Item
label=
"物流单号"
name=
'receiverName1'
><
span
></
span
></
Form
.
Item
>
<
Form
.
Item
label=
'对应发货单号'
name=
'shipmentOrderCode'
>
<
Search
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setshippingvisible
(
true
)
}
/>
<
Search
disabled=
{
!!
addId
}
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setshippingvisible
(
true
)
}
/>
{
/* <Button type='link'>查看单号详情</Button> */
}
</
Form
.
Item
>
<
Form
.
Item
label=
'对应订单号/售后单'
name=
'
invoicesNo
'
>
<
Search
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setinvoicesvisible
(
true
)
}
/>
<
Form
.
Item
label=
'对应订单号/售后单'
name=
'
relevanceOrderCode
'
>
<
Search
disabled=
{
!!
addId
}
readOnly
enterButton=
{
<><
LinkOutlined
/>
选择
</>
}
onSearch=
{
()
=>
setinvoicesvisible
(
true
)
}
/>
{
/* <Button type='link'>查看单号详情</Button> */
}
</
Form
.
Item
>
<
Form
.
Item
label=
"收货方"
name=
'receiverName'
><
span
>
{
set
.
receiverName
}
</
span
></
Form
.
Item
>
...
...
src/pages/logistics/logisticsSubmit/detail/components/goods.tsx
View file @
60109d24
...
...
@@ -11,10 +11,12 @@ interface goodsParamsProps {
set
?:
any
,
onGet
?:
Function
,
onBadge
?:
Function
,
addId
?:
Number
,
createType
?:
any
}
const
AddGoods
:
React
.
FC
<
goodsParamsProps
>
=
(
props
)
=>
{
const
{
currentRef
,
set
,
onGet
,
onBadge
}
=
props
;
const
{
currentRef
,
set
,
onGet
,
onBadge
,
addId
,
createType
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
visible
,
setvisible
]
=
useState
<
boolean
>
(
false
);
const
[
rowSelection
,
SelectionRowCtl
]
=
useRowSelectionTable
({
customKey
:
'productId'
});
...
...
@@ -50,7 +52,7 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
key
:
'amount'
,
width
:
120
,
dataIndex
:
'amount'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
noStyle
name=
{
`amount${index}`
}
initialValue=
{
record
.
amount
}
rules=
{
[{
required
:
true
,
message
:
'请输入数量'
}]
}
>
<
Input
type=
'number'
min=
{
1
}
onBlur=
{
(
e
)
=>
inputOnchange
(
record
.
productId
,
e
,
'amount'
)
}
/>
</
Form
.
Item
>
...
...
@@ -61,7 +63,7 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
key
:
'carton'
,
width
:
120
,
dataIndex
:
'carton'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
noStyle
name=
{
`carton${index}`
}
initialValue=
{
record
.
carton
}
rules=
{
[{
required
:
true
,
message
:
'请输入箱数'
}]
}
>
<
Input
type=
'number'
min=
{
1
}
onBlur=
{
(
e
)
=>
inputOnchange
(
record
.
productId
,
e
,
'carton'
)
}
/>
</
Form
.
Item
>
...
...
@@ -71,7 +73,7 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
key
:
'weight'
,
width
:
120
,
dataIndex
:
'weight'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
noStyle
name=
{
`weight${index}`
}
initialValue=
{
record
.
weight
}
rules=
{
[{
required
:
true
,
message
:
'请输入重量 (KG)'
}]
}
>
<
Input
type=
'number'
min=
{
1
}
onBlur=
{
(
e
)
=>
inputOnchange
(
record
.
productId
,
e
,
'weight'
)
}
/>
</
Form
.
Item
>
...
...
@@ -81,7 +83,7 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
key
:
'volume'
,
width
:
120
,
dataIndex
:
'volume'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
noStyle
name=
{
`volume${index}`
}
initialValue=
{
record
.
volume
}
rules=
{
[{
required
:
true
,
message
:
'请输入体积 (M3)'
}]
}
>
<
Input
type=
'number'
min=
{
1
}
onBlur=
{
(
e
)
=>
inputOnchange
(
record
.
productId
,
e
,
'volume'
)
}
/>
</
Form
.
Item
>
...
...
@@ -154,6 +156,25 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
})
}
/**用户循环改变列表返回的字段 */
const
forKeyValue
=
(
data
:
any
)
=>
{
const
arr
:
any
=
[];
data
.
forEach
((
item
:
any
)
=>
{
arr
.
push
({
productId
:
item
.
id
,
productName
:
item
.
productName
,
categoryName
:
item
.
category
,
brandName
:
item
.
brand
,
unitName
:
item
.
unit
,
amount
:
item
.
productCount
,
carton
:
item
.
carton
,
weight
:
item
.
weight
,
volume
:
item
.
volume
})
})
setdata
([...
arr
])
}
/** 打开添加商品 */
const
openModal
=
()
=>
{
const
dataInfo
=
{
...
set
};
...
...
@@ -234,7 +255,7 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
onBadge
(
1
,
1
)
}
}).
catch
(
error
=>
{
if
(
error
&&
error
.
errorFields
)
{
if
(
error
&&
error
.
errorFields
)
{
onBadge
(
error
.
errorFields
.
length
,
1
)
}
})
...
...
@@ -244,16 +265,33 @@ const AddGoods: React.FC<goodsParamsProps> = (props) => {
/**编辑回显 */
useEffect
(()
=>
{
if
(
set
.
id
)
{
if
(
set
.
id
)
{
setdata
([...
set
.
detailList
])
SelectionRowCtl
.
setSelectRow
(
set
.
detailList
);
SelectionRowCtl
.
setSelectedRowKeys
(
set
.
detailList
.
map
(
v
=>
v
=
v
.
productId
))
}
},
[
set
.
id
])
/**别处单据过来 */
useEffect
(()
=>
{
switch
(
Number
(
createType
))
{
case
2
:
PublicApi
.
getWarehouseInvoicesDetailsList
({
invoicesId
:
addId
.
toString
()}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
forKeyValue
(
res
.
data
)
}
})
break
case
3
:
break
case
4
:
break
}
},
[
addId
])
return
(
<>
<
Button
block
type=
'dashed'
style=
{
{
marginBottom
:
'24px'
}
}
onClick=
{
openModal
}
><
PlusOutlined
/>
添加商品
</
Button
>
<
Button
disabled=
{
!!
addId
}
block
type=
'dashed'
style=
{
{
marginBottom
:
'24px'
}
}
onClick=
{
openModal
}
><
PlusOutlined
/>
添加商品
</
Button
>
<
Form
form=
{
form
}
>
<
Table
columns=
{
columns
}
dataSource=
{
data
}
rowKey=
{
'productId'
}
pagination=
{
false
}
/>
</
Form
>
...
...
src/pages/logistics/logisticsSubmit/detail/index.tsx
View file @
60109d24
...
...
@@ -39,7 +39,7 @@ const AddEditLogistics: React.FC<{}> = () => {
shipmentOrderId
:
''
,
//发货单id 1
shipmentOrderCode
:
''
,
//发货单号 1
relevanceOrderId
:
''
,
//对应订单id
invoicesNo
:
''
,
//对应单据编号 1
relevanceOrderCode
:
''
,
//对应单据编号 1
relevanceType
:
1
,
//对应单据类型 1-订单 2-换货申请单(退货发货) 3-换货申请单(换货发货) 4-退货申请单
receiverName
:
''
,
//收货方名称1
receiverAddressId
:
''
,
//收货方id 1
...
...
@@ -48,6 +48,7 @@ const AddEditLogistics: React.FC<{}> = () => {
createType
:
1
,
detailList
:
[],
//物流单明细列表 ,LogisticsOrderDetailRequest
})
const
parmasRef
=
useRef
(
parmas
)
const
[
settlementMethod
,
setSettlementMethod
]
=
useState
<
any
>
();
const
[
memberInfo
,
setmemberInfo
]
=
useState
<
any
>
({});
const
[
badge
,
setbadge
]
=
useState
<
any
>
([
0
,
0
,
0
]);
...
...
@@ -61,13 +62,13 @@ const AddEditLogistics: React.FC<{}> = () => {
if
(
basicRef
.
state
&&
goodsRef
.
state
)
{
if
(
parmas
.
detailList
.
length
>
0
)
{
const
data
=
{
...
basicRef
.
data
};
data
.
invoicesNo
=
parmas
.
invoicesNo
;
data
.
relevanceOrderCode
=
parmas
.
relevanceOrderCode
;
data
.
receiverMemberId
=
parmas
.
receiverMemberId
;
data
.
receiverMemberName
=
parmas
.
receiverMemberName
;
data
.
relevanceOrderId
=
parmas
.
relevanceOrderId
;
data
.
relevanceType
=
parmas
.
relevanceType
;
data
.
detailList
=
parmas
.
detailList
;
data
.
createType
=
parmas
.
createType
;
console
.
log
(
data
)
if
(
type
===
'add'
)
{
PublicApi
.
postLogisticsOrderWaitSubmitAdd
({
...
data
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -76,7 +77,11 @@ const AddEditLogistics: React.FC<{}> = () => {
})
}
else
{
data
.
id
=
parmas
.
id
;
console
.
log
(
data
)
PublicApi
.
postLogisticsOrderWaitSubmitUpdate
({...
data
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
})
}
}
}
else
if
(
!
goodsRef
.
state
)
{
...
...
@@ -92,18 +97,21 @@ const AddEditLogistics: React.FC<{}> = () => {
data
.
companyName
=
value
.
children
setmemberInfo
({
memberId
:
value
.
memberid
,
roleId
:
value
.
roleid
})
}
else
if
(
index
===
2
)
{
data
.
shipmentOrderCode
=
value
.
invoicesNo
;
//发货单号
data
.
receiverPhone
=
value
.
phone
;
data
.
receiverName
=
value
.
receiverName
;
//收货方名称
data
.
receiverFullAddress
=
value
.
fullAddress
;
data
.
receiverMemberName
=
value
.
memberName
;
data
.
shipmentOrderId
=
value
.
id
}
else
if
(
index
===
3
&&
!
data
.
shipmentOrderId
)
{
data
.
shipmentOrderCode
=
value
.
shipmentOrderCode
;
//发货单号
data
.
receiverPhone
=
value
.
phone
;
data
.
receiverName
=
value
.
receiverName
;
//收货方名称
data
.
receiverFullAddress
=
value
.
fullAddress
;
data
.
receiverMemberName
=
value
.
memberName
;
data
.
shipmentOrderId
=
value
.
id
}
else
if
(
index
===
3
)
{
if
(
!
data
.
shipmentOrderId
)
{
data
.
receiverPhone
=
value
.
phone
;
data
.
receiverName
=
value
.
receiverName
;
//收货方名称
data
.
receiverFullAddress
=
value
.
fullAddress
;
data
.
receiverMemberName
=
value
.
memberName
;
}
data
.
relevanceOrderId
=
value
.
id
data
.
relevanceOrderCode
=
value
.
orderNo
data
.
relevanceType
=
type
;
}
else
{
data
.
shipperFullAddress
=
value
.
children
...
...
@@ -144,17 +152,41 @@ const AddEditLogistics: React.FC<{}> = () => {
setParmas
(
res
.
data
)
}
})
}
else
if
(
id
&&
type
===
'add'
)
{
}
else
if
(
id
&&
type
===
'add'
)
{
const
data
=
{
...
parmas
};
if
(
createType
&&
shipmentOrderCode
&&
invoicesNo
&&
relevanceType
)
{
data
.
createType
=
Number
(
createType
);
data
.
shipmentOrderCode
=
shipmentOrderCode
;
data
.
invoicesNo
=
invoicesNo
;
data
.
relevanceType
=
Number
(
relevanceType
);
setParmas
(
data
);
setAddId
(
Number
(
id
));
data
.
createType
=
Number
(
createType
);
data
.
relevanceType
=
Number
(
relevanceType
);
data
.
shipmentOrderCode
=
shipmentOrderCode
;
data
.
relevanceOrderCode
=
invoicesNo
;
switch
(
Number
(
relevanceType
))
{
case
1
:
new
Promise
(
resolve
=>
{
PublicApi
.
getWarehouseInvoicesDetails
({
invoicesId
:
id
}).
then
((
res
:
any
)
=>
{
resolve
(
res
.
data
)
})
}).
then
((
res
:
any
)
=>
{
data
.
relevanceOrderId
=
res
.
relevanceInvoicesId
data
.
receiverPhone
=
res
.
phone
;
data
.
receiverName
=
res
.
receiverName
;
//收货方名称
data
.
receiverFullAddress
=
res
.
fullAddress
;
data
.
receiverMemberName
=
res
.
memberName
;
}).
catch
(
error
=>
{
console
.
log
(
error
)
})
break
;
case
2
:
break
;
case
3
:
break
;
case
4
:
break
;
}
parmasRef
.
current
=
data
setParmas
(
parmasRef
.
current
);
setAddId
(
Number
(
id
));
}
},
[])
return
(
...
...
@@ -176,6 +208,8 @@ const AddEditLogistics: React.FC<{}> = () => {
</
TabPane
>
<
TabPane
key=
'tab-2'
tab=
{
<
TabFormErrors
dot=
{
badge
[
1
]
}
>
物流单明细
</
TabFormErrors
>
}
forceRender
>
<
Goods
addId=
{
addId
}
createType=
{
query
.
createType
}
currentRef=
{
goods
}
set=
{
parmas
}
onBadge=
{
getError
}
...
...
src/pages/payandSettle/components/settingModal.tsx
View file @
60109d24
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Radio
}
from
'antd'
import
React
from
'react'
;
import
{
Modal
,
Radio
}
from
'antd'
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
Input
,
FormMegaLayou
t
}
from
'@formily/antd-components'
import
{
PublicApi
}
from
'@/services/api'
import
{
Input
,
Selec
t
}
from
'@formily/antd-components'
import
usePayTypeEnum
from
'./usePayTypeEnum'
;
export
interface
Params
{
id
?:
any
,
mode
:
number
,
type
?:
number
|
string
,
mode
:
number
,
type
?:
number
|
string
,
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
...
...
@@ -20,32 +20,29 @@ export interface Params {
const
actions
=
createFormActions
()
const
{
onFieldChange$
}
=
FormEffectHooks
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
const
handleCancel
=
()
=>
{
}
const
{
payTypeEnum
}
=
usePayTypeEnum
()
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
if
(
props
.
type
){
payTypeEnum
.
forEach
(
v
=>
{
if
(
v
.
value
===
value
.
code
)
{
value
.
name
=
v
.
label
}
})
console
.
log
(
value
,
100086
)
if
(
props
.
type
)
{
value
.
type
=
props
.
type
}
console
.
log
(
'列表'
,
value
)
props
.
onOK
(
value
)
}
useEffect
(()
=>
{
return
()
=>
{
}
},
[])
const
useFormEffects
=
()
=>
{
const
{
setFieldState
}
=
createFormActions
()
}
return
(
<>
<
Modal
title=
{
props
.
mode
===
0
?
'新增参数配置'
:
'编辑参数配置'
}
title=
{
props
.
mode
===
0
?
'新增参数配置'
:
'编辑参数配置'
}
width=
{
800
}
visible=
{
props
.
dialogVisible
}
onOk=
{
()
=>
actions
.
submit
()
}
...
...
@@ -56,10 +53,11 @@ const comfirmDialog: React.FC<Params> = (props) => {
cancelText=
'取消'
>
<
SchemaForm
labelCol=
{
3
}
components=
{
{
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
Input
,
Radio
:
Radio
.
Group
,
TextArea
:
Input
.
TextArea
,
Select
}
}
actions=
{
actions
}
effects=
{
()
=>
useFormEffects
()
}
...
...
@@ -69,14 +67,14 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
>
<
Field
name=
'
code
'
name=
'
payWayCodeTypeEnum
'
title=
'参数代码'
required
x
-
component
-
props=
{
{
placeholder
:
''
,
}
}
x
-
component=
"
Inpu
t"
enum=
{
payTypeEnum
}
x
-
component=
"
Selec
t"
/>
<>
<
Field
...
...
@@ -86,7 +84,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
required
x
-
component
-
props=
{
{
placeholder
:
''
,
// addonBefore: ' '
// addonBefore: ' '
}
}
x
-
rules=
{
{
...
...
@@ -117,7 +115,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
comfirmDialog
.
defaultProps
=
{
dontReceive
:
true
,
type
:
1
//1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
type
:
1
//1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
}
export
default
comfirmDialog
\ No newline at end of file
export
default
comfirmDialog
src/pages/payandSettle/components/usePayTypeEnum.ts
0 → 100644
View file @
60109d24
import
{
PublicApi
}
from
'@/services/api'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
const
usePayTypeEnum
=
()
=>
{
const
[
payTypeEnum
,
setPayTypeEnum
]
=
useState
<
any
>
([])
const
ref
=
useRef
(
payTypeEnum
);
useEffect
(()
=>
{
const
getPayWayType
=
async
()
=>
{
await
PublicApi
.
getPayGetPayWayCodeTypeEnum
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
payWay
:
any
[]
=
[]
data
.
forEach
(
v
=>
{
payWay
.
push
({
label
:
v
.
name
,
value
:
v
.
type
})
})
ref
.
current
=
payWay
setPayTypeEnum
(
ref
.
current
)
}
})
}
getPayWayType
();
},[])
return
{
payTypeEnum
};
}
export
default
usePayTypeEnum
;
src/pages/payandSettle/paySetting/index.tsx
View file @
60109d24
...
...
@@ -149,7 +149,7 @@ const PaySetting: React.FC<{}> = () => {
}
const
tableColumns
:
ColumnType
<
any
>
[]
=
[
{
dataIndex
:
'code'
,
title
:
'参数代码'
,
align
:
'center'
},
{
dataIndex
:
'code'
,
title
:
'参数代码'
,
align
:
'center'
,
render
:(
text
:
any
,
record
:
any
)
=>
<
span
>
{
record
.
name
}
</
span
>
},
{
dataIndex
:
'value'
,
align
:
'center'
,
title
:
'参数值'
},
{
dataIndex
:
'describe'
,
title
:
'参数描述'
,
align
:
'center'
},
{
...
...
src/pages/payandSettle/paySetting/newPay.tsx
View file @
60109d24
...
...
@@ -9,6 +9,7 @@ import { Button, Card, Tabs } from 'antd';
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
PayWayRadio
from
'./components/payWayRadio'
;
import
{
set
}
from
'mobx'
;
const
{
TabPane
}
=
Tabs
const
PayWaySetTemplate
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -16,6 +17,7 @@ const PayWaySetTemplate:React.FC<{}> = () => {
const
[
name
,
setname
]
=
useState
<
string
>
(
''
);
const
[
isPitchOn
,
setisPitchOn
]
=
useState
<
number
>
(
0
);
const
[
selectId
,
setselectId
]
=
useState
<
number
>
(
1
);
const
[
step
,
setStep
]
=
useState
<
Array
<
number
>>
([]);
const
payWayConfigInfo
=
()
=>
{
// 支付配置信息
return
new
Promise
(
resolve
=>
{
...
...
@@ -27,25 +29,34 @@ const PayWaySetTemplate:React.FC<{}> = () => {
})
}
const
initPayWayStart
=
async
(
id
:
any
)
=>
{
await
PublicApi
.
getPayMemberQueryPlatformIsStart
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setisPitchOn
(
res
.
data
.
isPitchOn
)
setname
(
res
.
data
.
way
);
setselectId
(
res
.
data
.
id
)
}
})
const
data
=
[...
step
,
Number
(
id
)];
let
arr
=
[...
new
Set
(
data
)]
setStep
(
arr
)
const
conditions
=
arr
.
find
(
v
=>
v
===
Number
(
id
))
console
.
log
(
conditions
)
if
(
!
conditions
)
{
await
PublicApi
.
getPayMemberQueryPlatformIsStart
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setisPitchOn
(
res
.
data
.
isPitchOn
)
setname
(
res
.
data
.
way
);
setselectId
(
res
.
data
.
id
)
}
})
}
}
const
handleTabClick
=
(
e
:
any
)
=>
{
initPayWayStart
(
e
)
const
handleTabClick
=
(
key
:
any
)
=>
{
initPayWayStart
(
key
)
}
const
handleChangeRadio
=
(
e
:
any
)
=>
{
setisPitchOn
(
e
.
target
.
value
)
}
useEffect
(()
=>
{
// 支付配置信息
payWayConfigInfo
().
then
(
res
=>
{
payWayConfigInfo
().
then
(
(
res
:
any
)
=>
{
setconfig
(
res
);
initPayWayStart
(
res
[
0
].
id
);
const
id
=
res
[
0
].
id
;
setStep
([...
step
,
id
])
initPayWayStart
(
id
);
})
},
[])
...
...
@@ -55,7 +66,7 @@ const PayWaySetTemplate:React.FC<{}> = () => {
>
<
Card
>
<
Tabs
type=
"card"
onTabClick=
{
handleTabClick
}
>
{
config
.
map
(
item
=>
{
config
.
map
(
item
=>
<
TabPane
tab=
{
item
.
way
}
key=
{
item
.
id
}
forceRender
>
<
PayWayRadio
name=
{
name
}
...
...
@@ -70,4 +81,4 @@ const PayWaySetTemplate:React.FC<{}> = () => {
</
PageHeaderWrapper
>
)
};
export
default
PayWaySetTemplate
;
\ No newline at end of file
export
default
PayWaySetTemplate
;
src/pages/transaction/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
View file @
60109d24
...
...
@@ -101,7 +101,7 @@ export const useSelfTable = () => {
const
handleConfirm
=
async
(
record
)
=>
{
const
params
=
{
id
:
record
.
i
d
,
id
:
record
.
orderDeliveryDetailsI
d
,
createType
:
2
,
// 创建方式
shipmentOrderCode
:
record
.
invoiceNumber
,
// 发货单号
invoicesNo
:
record
.
orderNo
,
// 对应订单号/售后单
...
...
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