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
f3a59d7f
Commit
f3a59d7f
authored
Mar 17, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理待核销订单和核销自提码的问题
parent
33cc23dc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+17
-5
useSelfTable.tsx
...ction/saleOrder/readyCheckoutOrder/model/useSelfTable.tsx
+2
-2
index.ts
.../transaction/saleOrder/readyCheckoutOrder/schema/index.ts
+13
-8
No files found.
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
f3a59d7f
...
@@ -7,7 +7,7 @@ import NestTable from '@/components/NestTable'
...
@@ -7,7 +7,7 @@ import NestTable from '@/components/NestTable'
import
{
OrderKindType
}
from
'@/constants/order'
import
{
OrderKindType
}
from
'@/constants/order'
import
{
getIntl
,
history
}
from
'umi'
import
{
getIntl
,
history
}
from
'umi'
import
OverflowText
from
'@/components/OverflowText'
import
OverflowText
from
'@/components/OverflowText'
import
{
postOrderVendor
ValidateReceiptConfirm
}
from
'@/services/OrderNewV2Api'
import
{
postOrderVendor
Transfer
,
postOrderVendorValidateDeliveryConfirm
,
postOrderVendorValidateReceiptConfirm
,
postOrderVendorValidateVerify
}
from
'@/services/OrderNewV2Api'
import
ModalForm
from
'@/components/ModalForm'
import
ModalForm
from
'@/components/ModalForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
createFormActions
}
from
'@formily/antd'
...
@@ -29,11 +29,13 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -29,11 +29,13 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
)
const
[
transData
,
setTransData
]
=
useState
<
string
[]
>
([])
const
[
transData
,
setTransData
]
=
useState
<
string
[]
>
([])
const
[
currentRecord
,
setCurrentRecord
]
=
useState
<
any
>
()
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
// 用于储存已经修改过的订单id
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
dataRef
=
useRef
<
any
>
([])
const
checkoutRef
=
useRef
<
any
>
({})
const
checkoutRef
=
useRef
<
any
>
({})
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
deliveries
,
deliveryDetails
,
orderMode
,
externalState
,
orderKind
}
=
data
const
{
deliveries
,
deliveryDetails
,
orderMode
,
externalState
,
orderKind
,
orderId
}
=
data
const
contractOrder
=
(
orderKind
===
OrderKindType
.
SRM_ORDER
||
orderKind
===
OrderKindType
.
REQUISITION_ORDER
)
const
contractOrder
=
(
orderKind
===
OrderKindType
.
SRM_ORDER
||
orderKind
===
OrderKindType
.
REQUISITION_ORDER
)
const
creditsCommodity
=
(
orderMode
===
10
||
orderMode
===
25
)
// @todo 积分或渠道积分下单模式
const
creditsCommodity
=
(
orderMode
===
10
||
orderMode
===
25
)
// @todo 积分或渠道积分下单模式
...
@@ -419,7 +421,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -419,7 +421,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
}
}
const
handleCheckout
=
(
record
)
=>
{
const
handleCheckout
=
(
record
)
=>
{
console
.
log
(
record
,
'rrr'
)
setCurrentRecord
(
record
)
checkoutRef
.
current
.
setVisible
(
true
)
checkoutRef
.
current
.
setVisible
(
true
)
}
}
...
@@ -459,8 +461,18 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -459,8 +461,18 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 核销自提码
// 核销自提码
const
handleSubmitCheckout
=
()
=>
{
const
handleSubmitCheckout
=
()
=>
{
setLoading
(
true
)
checkoutActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
checkoutActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
console
.
log
(
values
)
console
.
log
(
values
,
currentRecord
)
postOrderVendorValidateVerify
({
orderId
:
orderId
,
batchNo
:
currentRecord
.
batchNo
,
selfCode
:
values
.
code
,
}).
then
(({
code
})
=>
{
if
(
code
===
1000
)
{
reloadFormData
&&
reloadFormData
()
}
}).
finally
(()
=>
{
setLoading
(
false
)
})
})
})
}
}
...
@@ -602,7 +614,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -602,7 +614,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
}
}
}
}
}
}
}
}
//
modalProps={{ confirmLoading: loading }}
modalProps=
{
{
confirmLoading
:
loading
}
}
/>
/>
</>
</>
)
)
...
...
src/pages/transaction/saleOrder/readyCheckoutOrder/model/useSelfTable.tsx
View file @
f3a59d7f
...
@@ -35,8 +35,8 @@ export const useSelfTable = () => {
...
@@ -35,8 +35,8 @@ export const useSelfTable = () => {
{
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.caigouhuiyuan'
,
defaultMessage
:
'采购会员'
}),
title
:
intl
.
formatMessage
({
id
:
'saleOrder.caigouhuiyuan'
,
defaultMessage
:
'采购会员'
}),
align
:
'left'
,
align
:
'left'
,
dataIndex
:
'
m
emberName'
,
dataIndex
:
'
buyerM
emberName'
,
key
:
'
m
emberName'
,
key
:
'
buyerM
emberName'
,
},
},
{
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.xiadanshijian'
,
defaultMessage
:
'下单时间'
}),
title
:
intl
.
formatMessage
({
id
:
'saleOrder.xiadanshijian'
,
defaultMessage
:
'下单时间'
}),
...
...
src/pages/transaction/saleOrder/readyCheckoutOrder/schema/index.ts
View file @
f3a59d7f
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getSaleOrderAuditPageSelectOption
}
from
'@/pages/transaction/effect'
;
import
{
useIntl
}
from
'umi'
;
import
{
useIntl
}
from
'umi'
;
export
const
tableListSchema
:
any
=
()
=>
{
export
const
tableListSchema
:
any
=
()
=>
{
const
intl
=
useIntl
()
const
intl
=
useIntl
()
// const OrderType = getOrderType()
const
res
=
getSaleOrderAuditPageSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
return
{
type
:
'object'
,
type
:
'object'
,
...
@@ -43,15 +48,14 @@ export const tableListSchema: any = () => {
...
@@ -43,15 +48,14 @@ export const tableListSchema: any = () => {
"x-component-props"
:
{
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingxuanzedingdanOrderType'
,
defaultMessage
:
'请选择订单类型'
})
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingxuanzedingdanOrderType'
,
defaultMessage
:
'请选择订单类型'
})
},
},
// enum: OrderType.map(item => ({
enum
:
OrderType
.
map
(
item
=>
({
// label: item['name'],
label
:
item
[
'text'
],
// value: item['status'],
value
:
item
[
'id'
],
// }))
}))
enum
:
[]
},
},
"[startCreateTime,endCreateTime]"
:
{
"[startCreateTime,endCreateTime]"
:
{
type
:
'array
'
,
type
:
'daterange
'
,
"x-component"
:
'DateRangePickerUnix'
,
//
"x-component": 'DateRangePickerUnix',
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
[
intl
.
formatMessage
({
id
:
'saleOrder.kaishishijian'
,
defaultMessage
:
'开始时间'
}),
intl
.
formatMessage
({
id
:
'saleOrder.jieshushijian'
,
defaultMessage
:
'结束时间'
})],
placeholder
:
[
intl
.
formatMessage
({
id
:
'saleOrder.kaishishijian'
,
defaultMessage
:
'开始时间'
}),
intl
.
formatMessage
({
id
:
'saleOrder.jieshushijian'
,
defaultMessage
:
'结束时间'
})],
},
},
...
@@ -66,4 +70,5 @@ export const tableListSchema: any = () => {
...
@@ -66,4 +70,5 @@ export const tableListSchema: any = () => {
},
},
}
}
}
}
}
}
}
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