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
d7a2c3d1
Commit
d7a2c3d1
authored
Dec 17, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:销售订单添加不接受物流单的状态,交易规则添加加工流程交易规则类型,处理采购下单删除已选商品提交数据报错,处理多次支付下单禁用到付
parent
9b49aaa2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
153 additions
and
135 deletions
+153
-135
config.ts
config/config.ts
+1
-0
index.ts
src/constants/index.ts
+7
-1
index.tsx
...ages/transaction/components/createElectronModal/index.tsx
+3
-2
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+2
-7
addGoods.tsx
...transaction/demandPosts/demandAdd/components/addGoods.tsx
+0
-0
demandDbutted.tsx
...action/demandPosts/demandAdd/components/demandDbutted.tsx
+0
-0
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+2
-1
usePaymentInfo.tsx
...ction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
+8
-0
useProductTable.tsx
...tion/purchaseOrder/orderCollect/model/useProductTable.tsx
+5
-0
index.tsx
...tion/transactionRules/components/selectProcesss/index.tsx
+125
-124
No files found.
config/config.ts
View file @
d7a2c3d1
...
@@ -34,6 +34,7 @@ const config: any = {
...
@@ -34,6 +34,7 @@ const config: any = {
[
'import'
,
{
libraryName
:
'antd'
,
libraryDirectory
:
'es'
,
style
:
true
},
'antd'
],
[
'import'
,
{
libraryName
:
'antd'
,
libraryDirectory
:
'es'
,
style
:
true
},
'antd'
],
[
'import'
,
{
libraryName
:
'god'
,
libraryDirectory
:
'es'
,
style
:
true
},
'god'
],
[
'import'
,
{
libraryName
:
'god'
,
libraryDirectory
:
'es'
,
style
:
true
},
'god'
],
[
'import'
,
{
libraryName
:
'@umijs/hooks'
,
libraryDirectory
:
'lib'
,
camel2DashComponentName
:
false
},
'@umijs/hooks'
],
// 将下划线转化关闭
[
'import'
,
{
libraryName
:
'@umijs/hooks'
,
libraryDirectory
:
'lib'
,
camel2DashComponentName
:
false
},
'@umijs/hooks'
],
// 将下划线转化关闭
[
'transform-remove-console'
,
{
"exclude"
:
[
"error"
,
"warn"
]
}],
// 移除 console
],
],
history
:
{
history
:
{
type
:
'browser'
,
// 'brower' | 'hash'
type
:
'browser'
,
// 'brower' | 'hash'
...
...
src/constants/index.ts
View file @
d7a2c3d1
...
@@ -927,6 +927,11 @@ export enum SaleOrderInsideWorkState {
...
@@ -927,6 +927,11 @@ export enum SaleOrderInsideWorkState {
* 手工发货
* 手工发货
*/
*/
HAND_DELEVED_ORDER
,
HAND_DELEVED_ORDER
,
/**
* 不接受物流单
*/
NOT_ACCEPTED_DELIVERY
,
}
}
// 支付外部状态
// 支付外部状态
...
@@ -1039,7 +1044,8 @@ export const SaleOrderInsideWorkStateTexts = {
...
@@ -1039,7 +1044,8 @@ export const SaleOrderInsideWorkStateTexts = {
24
:
'订单归档'
,
24
:
'订单归档'
,
25
:
'待审核发货单'
,
25
:
'待审核发货单'
,
26
:
'待确认物流单'
,
26
:
'待确认物流单'
,
27
:
'待手工发货'
27
:
'待手工发货'
,
28
:
'不接受物流单'
,
}
}
// 订单流转记录外部状态
// 订单流转记录外部状态
...
...
src/pages/transaction/components/createElectronModal/index.tsx
View file @
d7a2c3d1
...
@@ -205,14 +205,15 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
...
@@ -205,14 +205,15 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
}
}
}
else
{
}
else
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
state
.
value
=
0
//
state.value = 0
state
.
props
[
"x-component-props"
]
=
{
state
.
props
[
"x-component-props"
]
=
{
disabled
:
true
disabled
:
true
}
}
})
})
actions
.
setFieldValue
(
'usingElectronicContracts'
,
data
.
usingElectronicContracts
||
0
)
}
}
$
(
'onFieldValueChange'
,
'contractTemplateId'
).
subscribe
(
state
=>
{
$
(
'onFieldValueChange'
,
'contractTemplateId'
).
subscribe
(
state
=>
{
console
.
log
(
state
.
props
)
//
console.log(state.props)
})
})
//
})
//
})
}
}
}
}
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
d7a2c3d1
...
@@ -153,7 +153,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -153,7 +153,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
if
(
qrCodeInfo
.
qrUrl
)
{
if
(
qrCodeInfo
.
qrUrl
)
{
// @ts-ignore
// @ts-ignore
PublicApi
.
getOrderPayResultsl
({
id
,
paymentInformationId
:
currentPayInfoId
}).
then
(
res
=>
{
PublicApi
.
getOrderPayResultsl
({
id
,
paymentInformationId
:
currentPayInfoId
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
setOpenTimer
(
0
)
setOpenTimer
(
0
)
...
@@ -170,14 +169,13 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -170,14 +169,13 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
}
const
handleConfirm
=
()
=>
{
const
handleConfirm
=
()
=>
{
console
.
log
(
data
,
'data'
)
if
(
current
===
0
)
{
if
(
current
===
0
)
{
if
(
checked
.
id
)
{
if
(
checked
.
id
)
{
if
(
checked
.
id
===
5
)
{
// 线下支付
if
(
checked
.
id
===
5
)
{
// 线下支付
setCurrent
(
1
)
setCurrent
(
1
)
setPayStep
(
1
)
setPayStep
(
1
)
// 获取账户信息
// 获取
对公
账户信息
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
data
.
supplyMembersId
}).
then
(
res
=>
{
PublicApi
.
getSettleAccountsCorporateAccountConfig
({
memberId
:
data
.
supplyMembersId
,
memberRoleId
:
data
.
supplyMembersRoleId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setBlankAccountInfo
(
res
.
data
)
setBlankAccountInfo
(
res
.
data
)
}
}
...
@@ -261,7 +259,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -261,7 +259,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
handleSubmitPay
()
handleSubmitPay
()
}
else
if
(
current
===
2
)
{
}
else
if
(
current
===
2
)
{
// 开始提交授信支付数据 (需要输入支付密码)
// 开始提交授信支付数据 (需要输入支付密码)
console
.
log
(
'开始提交授信支付数据'
,
payPrice
)
if
(
payPrice
<=
creditInfo
.
canUseQuota
){
if
(
payPrice
<=
creditInfo
.
canUseQuota
){
setPayStep
(
2
)
setPayStep
(
2
)
setCurrent
(
1000
)
setCurrent
(
1000
)
...
@@ -270,7 +267,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -270,7 +267,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
}
}
else
if
(
current
===
3
)
{
}
else
if
(
current
===
3
)
{
// 开始提交余额支付数据 (需要输入支付密码)
// 开始提交余额支付数据 (需要输入支付密码)
console
.
log
(
'开始提交余额支付数据'
,
payPrice
)
if
(
payPrice
<=
balanceInfo
){
if
(
payPrice
<=
balanceInfo
){
setPayStep
(
2
)
setPayStep
(
2
)
setCurrent
(
1000
)
setCurrent
(
1000
)
...
@@ -279,7 +275,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -279,7 +275,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
}
}
else
if
(
current
===
5
)
{
}
else
if
(
current
===
5
)
{
// 开始提交货到付款数据
// 开始提交货到付款数据
console
.
log
(
'开始提交货到付款数据'
,
payPrice
)
handleSubmitPay
()
handleSubmitPay
()
}
}
...
...
src/pages/transaction/demandPosts/demandAdd/components/addGoods.tsx
View file @
d7a2c3d1
This diff is collapsed.
Click to expand it.
src/pages/transaction/demandPosts/demandAdd/components/demandDbutted.tsx
View file @
d7a2c3d1
This diff is collapsed.
Click to expand it.
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
d7a2c3d1
...
@@ -251,8 +251,9 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
...
@@ -251,8 +251,9 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
history
.
goBack
()
history
.
goBack
()
},
1000
)
},
1000
)
// history.replace('/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder')
// history.replace('/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder')
}
else
{
setBtnLoading
(
false
)
}
}
setBtnLoading
(
false
)
}
catch
(
error
)
{
}
catch
(
error
)
{
setBtnLoading
(
false
)
setBtnLoading
(
false
)
error
?.
message
&&
message
.
error
(
error
.
message
)
error
?.
message
&&
message
.
error
(
error
.
message
)
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/usePaymentInfo.tsx
View file @
d7a2c3d1
...
@@ -87,6 +87,14 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
...
@@ -87,6 +87,14 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
if
(
options
.
filter
(
_item
=>
_item
.
payType
===
4
).
length
)
if
(
options
.
filter
(
_item
=>
_item
.
payType
===
4
).
length
)
options
.
filter
(
_item
=>
_item
.
payType
===
4
)[
0
].
disabled
=
false
options
.
filter
(
_item
=>
_item
.
payType
===
4
)[
0
].
disabled
=
false
}
}
// 多次支付也要禁用到付
if
(
ctx
.
getFieldValue
(
'paymentInformationResponses'
).
length
>
1
)
{
if
(
options
.
filter
(
_item
=>
_item
.
payType
===
4
).
length
)
options
.
filter
(
_item
=>
_item
.
payType
===
4
)[
0
].
disabled
=
true
}
else
{
if
(
options
.
filter
(
_item
=>
_item
.
payType
===
4
).
length
)
options
.
filter
(
_item
=>
_item
.
payType
===
4
)[
0
].
disabled
=
false
}
}
}
},
[
orderProducts
,
columns
])
},
[
orderProducts
,
columns
])
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/useProductTable.tsx
View file @
d7a2c3d1
...
@@ -66,6 +66,11 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
...
@@ -66,6 +66,11 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
rowSelectionCtl
.
setSelectRow
(
newData
)
rowSelectionCtl
.
setSelectRow
(
newData
)
rowSelectionCtl
.
setSelectedRowKeys
(
newData
.
map
(
v
=>
v
.
id
))
rowSelectionCtl
.
setSelectedRowKeys
(
newData
.
map
(
v
=>
v
.
id
))
ctx
.
setFieldValue
(
'orderProductRequests'
,
newData
)
ctx
.
setFieldValue
(
'orderProductRequests'
,
newData
)
// 商品行数变动 清空之前的支付信息
if
(
pageStatus
===
PageStatus
.
ADD
)
{
ctx
.
setFieldValue
(
'paymentInformationResponses'
,
[])
}
}
}
const
[
productColumns
,
setProductColumns
]
=
useState
(()
=>
{
const
[
productColumns
,
setProductColumns
]
=
useState
(()
=>
{
if
(
pageStatus
===
PageStatus
.
ADD
)
{
if
(
pageStatus
===
PageStatus
.
ADD
)
{
...
...
src/pages/transaction/transactionRules/components/selectProcesss/index.tsx
View file @
d7a2c3d1
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
styled
from
'styled-components'
import
styled
from
'styled-components'
import
{
ISchemaFormProps
,
ISchemaFieldProps
,
ISchemaFieldComponentProps
,
createFormActions
,
useFieldState
}
from
'@formily/antd'
import
{
ISchemaFormProps
,
ISchemaFieldProps
,
ISchemaFieldComponentProps
,
createFormActions
,
useFieldState
}
from
'@formily/antd'
import
{
Button
,
Space
,
Row
,
Col
,
Tag
}
from
'antd'
import
{
Button
,
Space
,
Row
,
Col
,
Tag
}
from
'antd'
import
{
PlusOutlined
,
DeleteColumnOutlined
,
EditOutlined
,
DeleteOutlined
,
CaretUpOutlined
,
CaretDownOutlined
,
EyeOutlined
}
from
'@ant-design/icons'
import
{
PlusOutlined
,
DeleteColumnOutlined
,
EditOutlined
,
DeleteOutlined
,
CaretUpOutlined
,
CaretDownOutlined
,
EyeOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
cx
from
'classnames'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
const
SelectStyles
=
styled
((
props
)
=>
<
div
className=
'select-list'
{
...
props
}
></
div
>)
`
const
SelectStyles
=
styled
((
props
)
=>
<
div
className=
'select-list'
{
...
props
}
></
div
>)
`
.select_style_border {
.select_style_border {
border: 1px solid #EEF0F3;
border: 1px solid #EEF0F3;
margin-top: 20px;
margin-top: 20px;
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
padding: 8px 14px;
padding: 8px 14px;
cursor: pointer;
cursor: pointer;
line-height: 28px;
line-height: 28px;
position:relative;
position:relative;
}
}
.select_style_border.active {
.select_style_border.active {
border: 1px solid #00B382;
border: 1px solid #00B382;
}
}
.select_style_border.active::after {
.select_style_border.active::after {
content: '';
content: '';
position: absolute;
position: absolute;
width: 0;
width: 0;
height: 0;
height: 0;
border-bottom: 12px solid #00B37A;
border-bottom: 12px solid #00B37A;
border-left: 12px solid transparent;
border-left: 12px solid transparent;
bottom: 0;
bottom: 0;
right: 0;
right: 0;
z-index: 5;
z-index: 5;
}
}
`
`
enum
ProcessTagColor
{
enum
ProcessTagColor
{
'red'
,
'red'
,
'orange'
,
'orange'
,
'purple'
,
'purple'
,
'blue'
'blue'
,
}
'green'
}
enum
ProcessTagType
{
'订单交易流程'
,
enum
ProcessTagType
{
'售后换货流程'
,
'订单交易流程'
,
'售后退货流程'
,
'售后换货流程'
,
'售后维修流程'
'售后退货流程'
,
}
'售后维修流程'
,
'加工生产流程'
const
SelectProcesss
=
(
props
:
ISchemaFieldComponentProps
)
=>
{
}
const
[
formInitValue
,
setFormInitValue
]
=
useState
<
any
>
(
null
)
const
[
state
,
setFieldState
]
=
useFieldState
({
const
SelectProcesss
=
(
props
:
ISchemaFieldComponentProps
)
=>
{
dataSource
:
[],
const
[
formInitValue
,
setFormInitValue
]
=
useState
<
any
>
(
null
)
showMore
:
false
const
[
state
,
setFieldState
]
=
useFieldState
({
})
dataSource
:
[],
const
{
dataSource
,
showMore
}
=
state
showMore
:
false
const
{
value
,
mutators
,
editable
}
=
props
})
const
{
dataSource
,
showMore
}
=
state
useEffect
(()
=>
{
const
{
value
,
mutators
,
editable
}
=
props
PublicApi
.
getOrderTradingRulesTransactionProcessList
().
then
(
res
=>
{
setFieldState
({
useEffect
(()
=>
{
dataSource
:
res
.
data
,
PublicApi
.
getOrderTradingRulesTransactionProcessList
().
then
(
res
=>
{
showMore
setFieldState
({
})
dataSource
:
res
.
data
,
})
showMore
},
[])
})
})
const
showDataSource
=
showMore
?
dataSource
:
[...
dataSource
].
splice
(
0
,
3
)
},
[])
const
handleCheck
=
(
id
)
=>
{
const
showDataSource
=
showMore
?
dataSource
:
[...
dataSource
].
splice
(
0
,
3
)
if
(
editable
)
{
mutators
.
change
(
id
)
const
handleCheck
=
(
id
)
=>
{
}
if
(
editable
)
{
}
mutators
.
change
(
id
)
}
const
toogleMore
=
()
=>
{
}
setFieldState
({
dataSource
,
const
toogleMore
=
()
=>
{
showMore
:
!
showMore
setFieldState
({
})
dataSource
,
}
showMore
:
!
showMore
})
const
renderProcessType
=
(
v
:
any
)
=>
{
}
return
<
Tag
color=
{
ProcessTagColor
[
v
.
type
-
1
]
}
>
{
ProcessTagType
[
v
.
type
-
1
]
}
const
renderProcessType
=
(
v
:
any
)
=>
{
</
Tag
>
return
<
Tag
color=
{
ProcessTagColor
[
v
.
type
-
1
]
}
>
}
{
ProcessTagType
[
v
.
type
-
1
]
}
</
Tag
>
return
(
}
<
div
style=
{
{
width
:
'100%'
}
}
>
<
SelectStyles
>
return
(
{
<
div
style=
{
{
width
:
'100%'
}
}
>
showDataSource
.
map
(
v
=>
<
div
key=
{
v
.
id
}
onClick=
{
()
=>
handleCheck
(
v
.
id
)
}
className=
{
cx
(
'select_style_border'
,
value
===
v
.
id
?
'active'
:
''
)
}
>
<
SelectStyles
>
<
div
>
{
<
Row
style=
{
{
color
:
'#303133'
}
}
>
showDataSource
.
map
(
v
=>
<
div
key=
{
v
.
id
}
onClick=
{
()
=>
handleCheck
(
v
.
id
)
}
className=
{
cx
(
'select_style_border'
,
value
===
v
.
id
?
'active'
:
''
)
}
>
<
Col
>
{
v
.
name
}
</
Col
>
<
div
>
<
Col
style=
{
{
marginLeft
:
6
}
}
>
<
Row
style=
{
{
color
:
'#303133'
}
}
>
{
<
Col
>
{
v
.
name
}
</
Col
>
renderProcessType
(
v
)
<
Col
style=
{
{
marginLeft
:
6
}
}
>
}
{
</
Col
>
renderProcessType
(
v
)
</
Row
>
}
<
div
style=
{
{
color
:
'#909399'
}
}
>
{
v
.
explain
}
</
div
>
</
Col
>
</
div
>
</
Row
>
</
div
>)
<
div
style=
{
{
color
:
'#909399'
}
}
>
{
v
.
explain
}
</
div
>
}
</
div
>
</
SelectStyles
>
</
div
>)
{
dataSource
.
length
>
3
&&
}
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
}
}
>
</
SelectStyles
>
显示更多
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
{
dataSource
.
length
>
3
&&
</
div
>
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
}
}
>
}
显示更多
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
div
>
</
div
>
)
}
}
</
div
>
)
SelectProcesss
.
defaultProps
=
{}
}
SelectProcesss
.
isFieldComponent
=
true
;
SelectProcesss
.
defaultProps
=
{}
export
default
SelectProcesss
SelectProcesss
.
isFieldComponent
=
true
;
\ No newline at end of file
export
default
SelectProcesss
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