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
cd54cd87
Commit
cd54cd87
authored
Sep 03, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
ea7d5519
033cd60f
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
305 additions
and
662 deletions
+305
-662
logisticsForm.tsx
...ages/commodity/products/addProductsItem/logisticsForm.tsx
+6
-6
index.tsx
...pages/transaction/components/approvedOrderModal/index.tsx
+3
-3
index.tsx
...ages/transaction/components/createElectronModal/index.tsx
+6
-15
index.ts
...transaction/components/orderHandDeleved/constant/index.ts
+6
-6
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+4
-3
index.tsx
src/pages/transaction/purchaseOrder/constant/index.tsx
+1
-0
index.tsx
...saction/purchaseOrder/firstApprovedOrder/detail/index.tsx
+2
-2
index.tsx
...es/transaction/purchaseOrder/firstApprovedOrder/index.tsx
+9
-16
useSelfTable.tsx
...n/purchaseOrder/firstApprovedOrder/model/useSelfTable.tsx
+2
-11
index.ts
...nsaction/purchaseOrder/firstApprovedOrder/schema/index.ts
+58
-56
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+1
-1
index.ts
...ransaction/purchaseOrder/orderCollectB2b/effects/index.ts
+18
-16
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+0
-3
index.tsx
...ansaction/purchaseOrder/readySubmitOrder/detail/index.tsx
+3
-4
index.tsx
...ages/transaction/purchaseOrder/readySubmitOrder/index.tsx
+13
-20
useSelfTable.tsx
...ion/purchaseOrder/readySubmitOrder/model/useSelfTable.tsx
+4
-12
index.ts
...ransaction/purchaseOrder/readySubmitOrder/schema/index.ts
+58
-55
index.tsx
...action/purchaseOrder/secondApprovedOrder/detail/index.tsx
+2
-2
index.tsx
...s/transaction/purchaseOrder/secondApprovedOrder/index.tsx
+9
-12
useSelfTable.tsx
.../purchaseOrder/secondApprovedOrder/model/useSelfTable.tsx
+1
-5
index.ts
...saction/purchaseOrder/secondApprovedOrder/schema/index.ts
+58
-52
index.tsx
src/pages/transaction/saleOrder/constant/index.tsx
+3
-28
index.tsx
...transaction/saleOrder/firstApprovedOrder/detail/index.tsx
+4
-5
index.tsx
src/pages/transaction/saleOrder/firstApprovedOrder/index.tsx
+5
-5
useSelfTable.tsx
...ction/saleOrder/firstApprovedOrder/model/useSelfTable.tsx
+2
-3
index.ts
.../transaction/saleOrder/firstApprovedOrder/schema/index.ts
+0
-69
index.tsx
src/pages/transaction/saleOrder/readyApprovedOrder/index.tsx
+2
-2
useSelfTable.tsx
...ction/saleOrder/readyApprovedOrder/model/useSelfTable.tsx
+1
-2
index.ts
.../transaction/saleOrder/readyApprovedOrder/schema/index.ts
+0
-74
index.tsx
.../transaction/saleOrder/readyConfirmOrder/detail/index.tsx
+4
-5
index.tsx
src/pages/transaction/saleOrder/readyConfirmOrder/index.tsx
+5
-5
useSelfTable.tsx
...action/saleOrder/readyConfirmOrder/model/useSelfTable.tsx
+1
-2
index.ts
...s/transaction/saleOrder/readyConfirmOrder/schema/index.ts
+0
-72
index.tsx
...ransaction/saleOrder/secondApprovedOrder/detail/index.tsx
+4
-5
index.tsx
...pages/transaction/saleOrder/secondApprovedOrder/index.tsx
+9
-12
useSelfTable.tsx
...tion/saleOrder/secondApprovedOrder/model/useSelfTable.tsx
+1
-2
index.ts
...transaction/saleOrder/secondApprovedOrder/schema/index.ts
+0
-71
No files found.
src/pages/commodity/products/addProductsItem/logisticsForm.tsx
View file @
cd54cd87
...
@@ -219,12 +219,12 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
...
@@ -219,12 +219,12 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
deliveryType
!==
3
&&
<
Form
.
Item
deliveryType
!==
3
&&
<
Form
.
Item
name=
"sendAddress"
name=
"sendAddress"
label=
"发货地址"
label=
"发货地址"
rules=
{
[
//
rules=
{[
{
//
{
required
:
true
,
//
required: true,
message
:
'请选择发货地址'
//
message: '请选择发货地址'
},
//
},
]
}
//
]
}
>
>
<
Select
<
Select
placeholder=
"请选择发货地址"
placeholder=
"请选择发货地址"
...
...
src/pages/transaction/components/approvedOrderModal/index.tsx
View file @
cd54cd87
...
@@ -131,7 +131,7 @@ const ApproveSchema = {
...
@@ -131,7 +131,7 @@ const ApproveSchema = {
labelAlign
:
'top'
,
labelAlign
:
'top'
,
},
},
properties
:
{
properties
:
{
stat
e
:
{
agre
e
:
{
type
:
'radio'
,
type
:
'radio'
,
enum
:
[
enum
:
[
{
label
:
'审核通过'
,
value
:
1
},
{
label
:
'审核通过'
,
value
:
1
},
...
@@ -144,7 +144,7 @@ const ApproveSchema = {
...
@@ -144,7 +144,7 @@ const ApproveSchema = {
"x-linkages"
:
[
"x-linkages"
:
[
{
{
type
:
'value:visible'
,
type
:
'value:visible'
,
target
:
'
cause
'
,
target
:
'
reason
'
,
condition
:
"{{$value === 0}}"
condition
:
"{{$value === 0}}"
},
},
{
{
...
@@ -159,7 +159,7 @@ const ApproveSchema = {
...
@@ -159,7 +159,7 @@ const ApproveSchema = {
}
}
]
]
},
},
cause
:
{
reason
:
{
type
:
'textarea'
,
type
:
'textarea'
,
"x-component-props"
:
{
"x-component-props"
:
{
rows
:
4
,
rows
:
4
,
...
...
src/pages/transaction/components/createElectronModal/index.tsx
View file @
cd54cd87
import
React
,
{
useContext
,
useRef
}
from
'react'
import
React
,
{
useContext
,
useRef
}
from
'react'
import
{
Modal
,
Button
,
message
}
from
'antd'
import
{
Button
,
message
}
from
'antd'
import
{
createFormActions
,
ISchema
}
from
'@formily/antd'
import
{
createFormActions
,
ISchema
}
from
'@formily/antd'
import
ModalForm
from
'@/components/ModalForm'
import
ModalForm
from
'@/components/ModalForm'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
{
fetchOptions
}
from
'@/pages/balance/common'
export
interface
OrderElectronModalProps
{
export
interface
OrderElectronModalProps
{
currentRef
:
any
currentRef
:
any
...
@@ -84,7 +82,7 @@ const schema: ISchema = {
...
@@ -84,7 +82,7 @@ const schema: ISchema = {
type
:
'string'
,
type
:
'string'
,
display
:
false
,
display
:
false
,
},
},
stat
e
:
{
agre
e
:
{
type
:
'radio'
,
type
:
'radio'
,
title
:
'是否审核通过'
,
title
:
'是否审核通过'
,
enum
:
[
enum
:
[
...
@@ -95,12 +93,12 @@ const schema: ISchema = {
...
@@ -95,12 +93,12 @@ const schema: ISchema = {
"x-linkages"
:
[
"x-linkages"
:
[
{
{
type
:
'value:visible'
,
type
:
'value:visible'
,
target
:
'
cause
'
,
target
:
'
reason
'
,
condition
:
"{{$value === 0}}"
condition
:
"{{$value === 0}}"
}
}
]
]
},
},
cause
:
{
reason
:
{
type
:
'textarea'
,
type
:
'textarea'
,
"x-component-props"
:
{
"x-component-props"
:
{
rows
:
4
,
rows
:
4
,
...
@@ -127,7 +125,7 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
...
@@ -127,7 +125,7 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
const
formRef
=
useRef
<
any
>
({})
const
formRef
=
useRef
<
any
>
({})
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postContractContractSignSaleSignContractCreate
,
{
ctlType
:
'none'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postContractContractSignSaleSignContractCreate
,
{
ctlType
:
'none'
})
const
{
run
:
submitRun
,
loading
:
submitLoading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrder
)
const
{
run
:
submitRun
,
loading
:
submitLoading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateSubmit
)
const
createElectron
=
async
()
=>
{
const
createElectron
=
async
()
=>
{
const
contractTemplateId
=
schemaActions
.
getFieldValue
(
'contractTemplateId'
)
const
contractTemplateId
=
schemaActions
.
getFieldValue
(
'contractTemplateId'
)
if
(
data
.
isElectronicContract
===
1
&&
!
contractTemplateId
)
{
if
(
data
.
isElectronicContract
===
1
&&
!
contractTemplateId
)
{
...
@@ -156,10 +154,9 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
...
@@ -156,10 +154,9 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
const
electronBtn
=
<
Button
style=
{
{
marginLeft
:
24
}
}
onClick=
{
createElectron
}
loading=
{
loading
}
>
生成电子合同
</
Button
>
const
electronBtn
=
<
Button
style=
{
{
marginLeft
:
24
}
}
onClick=
{
createElectron
}
loading=
{
loading
}
>
生成电子合同
</
Button
>
const
handleSubmit
=
async
(
value
)
=>
{
const
handleSubmit
=
async
(
value
)
=>
{
const
params
=
{
const
params
=
{
...
value
,
...
value
,
id
:
data
.
i
d
,
orderId
:
data
.
orderI
d
,
}
}
const
{
code
}
=
await
submitRun
(
params
)
const
{
code
}
=
await
submitRun
(
params
)
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
...
@@ -189,9 +186,6 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
...
@@ -189,9 +186,6 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
effects=
{
(
$
,
actions
)
=>
{
effects=
{
(
$
,
actions
)
=>
{
$
(
'onFormInit'
).
subscribe
(
async
()
=>
{
$
(
'onFormInit'
).
subscribe
(
async
()
=>
{
if
(
data
.
isElectronicContract
===
1
)
{
if
(
data
.
isElectronicContract
===
1
)
{
// useAsyncSelect('contractTemplateId', async () => (await PublicApi.getContractSelectListContractTemplate()).data, ['name', 'id']).then(()=>
{
// actions.setFieldValue("contractTemplateId", data.contractTemplateId)
//
})
const
res
=
await
PublicApi
.
getContractSelectListContractTemplate
()
const
res
=
await
PublicApi
.
getContractSelectListContractTemplate
()
let
options
=
res
.
data
.
map
(
item
=>
({
let
options
=
res
.
data
.
map
(
item
=>
({
label
:
item
.
name
,
label
:
item
.
name
,
...
@@ -212,9 +206,6 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
...
@@ -212,9 +206,6 @@ const CreateOrderElectronModal:React.FC<OrderElectronModalProps> = (props) => {
})
})
actions
.
setFieldValue
(
'usingElectronicContracts'
,
data
.
usingElectronicContracts
||
0
)
actions
.
setFieldValue
(
'usingElectronicContracts'
,
data
.
usingElectronicContracts
||
0
)
}
}
$
(
'onFieldValueChange'
,
'contractTemplateId'
).
subscribe
(
state
=>
{
// console.log(state.props)
})
// 采购合同下单 隐藏使用电子合同
// 采购合同下单 隐藏使用电子合同
if
(
data
?.
orderModel
>
30
)
{
if
(
data
?.
orderModel
>
30
)
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
actions
.
setFieldState
(
'usingElectronicContracts'
,
state
=>
{
...
...
src/pages/transaction/components/orderHandDeleved/constant/index.ts
View file @
cd54cd87
...
@@ -124,12 +124,12 @@ export const productColumns: any = [
...
@@ -124,12 +124,12 @@ export const productColumns: any = [
align
:
'center'
,
align
:
'center'
,
key
:
'unit'
key
:
'unit'
},
},
{
//
{
title
:
'单价'
,
//
title: '单价',
dataIndex
:
'price'
,
//
dataIndex: 'price',
align
:
'center'
,
//
align: 'center',
key
:
'price'
,
//
key: 'price',
},
//
},
{
{
title
:
'已发货'
,
title
:
'已发货'
,
dataIndex
:
'delivered'
,
dataIndex
:
'delivered'
,
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
cd54cd87
...
@@ -158,9 +158,10 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
...
@@ -158,9 +158,10 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
else
if
(
checked
.
id
===
4
)
{
// 余额支付
}
else
if
(
checked
.
id
===
4
)
{
// 余额支付
console
.
log
(
'选择了余额支付'
)
console
.
log
(
'选择了余额支付'
)
setIsSpin
(
true
)
setIsSpin
(
true
)
PublicApi
.
getPayAssetAccountGetUserBalance
({
PublicApi
.
getPayAssetAccountBalance
({
parentMemberId
:
data
.
vendorMemberId
,
fundMode
:
checked
.
fundMode
,
parentMemberRoleId
:
data
.
vendorRoleId
,
vendorMemberId
:
data
.
vendorMemberId
,
vendorRoleId
:
data
.
vendorRoleId
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
setBalanceInfo
(
res
.
data
)
setBalanceInfo
(
res
.
data
)
...
...
src/pages/transaction/purchaseOrder/constant/index.tsx
View file @
cd54cd87
...
@@ -34,6 +34,7 @@ export const baseOrderListColumns: any = () => {
...
@@ -34,6 +34,7 @@ export const baseOrderListColumns: any = () => {
dataIndex
:
'vendorMemberName'
,
dataIndex
:
'vendorMemberName'
,
key
:
'vendorMemberName'
,
key
:
'vendorMemberName'
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
(
t
,
r
)
=>
t
?
t
:
r
.
memberName
},
},
{
{
title
:
'下单时间'
,
title
:
'下单时间'
,
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/detail/index.tsx
View file @
cd54cd87
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
const
FirstApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
FirstApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrderReviewed
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidateGradeOne
)
const
approvedRef
=
useRef
<
any
>
({})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
const
handleClick
=
useCallback
(()
=>
{
...
@@ -24,7 +24,7 @@ const FirstApprovedOrderDetail: React.FC = () => {
...
@@ -24,7 +24,7 @@ const FirstApprovedOrderDetail: React.FC = () => {
const
handleSubmit
=
useCallback
(()
=>
{
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
const
params
=
{
const
params
=
{
i
d
:
Number
(
id
),
orderI
d
:
Number
(
id
),
...
values
...
values
}
}
const
result
=
await
run
(
params
)
const
result
=
await
run
(
params
)
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/index.tsx
View file @
cd54cd87
...
@@ -9,7 +9,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
...
@@ -9,7 +9,6 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
'../index.less'
import
'../index.less'
...
@@ -18,12 +17,11 @@ import '../index.less'
...
@@ -18,12 +17,11 @@ import '../index.less'
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
ProcurementReviewedListOn
e
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
BuyerValidateGradeOnePag
e
(
params
)
return
data
return
data
}
}
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
()
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
...
@@ -31,23 +29,18 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -31,23 +29,18 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrderReviewedAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidateGradeOneBatch
)
const
handleSubmitBatch
=
async
()
=>
{
const
handleSubmitBatch
=
async
()
=>
{
if
(
rowSelectionCtl
.
selectRow
.
length
===
0
)
{
if
(
rowSelectionCtl
.
selectRow
.
length
===
0
)
{
message
.
error
(
'请先勾选订单'
)
message
.
error
(
'请先勾选订单'
)
return
;
return
;
}
}
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ONE_LEVEL_AUDIT_ORDER
)
const
{
code
}
=
await
run
(
rowSelectionCtl
.
selectedRowKeys
.
map
(
item
=>
({
orderId
:
item
})))
if
(
canBitch
)
{
if
(
code
===
1000
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
ref
.
current
.
reload
()
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
else
{
message
.
error
(
'只能批量提交内部状态为审核中的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
...
@@ -57,7 +50,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -57,7 +50,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'
i
d'
}
rowKey=
{
'
orderI
d'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -5,21 +5,12 @@ import { history } from 'umi'
...
@@ -5,21 +5,12 @@ import { history } from 'umi'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
,
extendsSelection
:
{
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'orderId'
})
getCheckboxProps
:
record
=>
({
// 不等于可提交审核的 都无法通过批量提交
disabled
:
record
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ONE_LEVEL_AUDIT_ORDER
,
interiorState
:
record
.
interiorState
,
})
}})
const
handleSubmit
=
async
(
record
)
=>
{
const
handleSubmit
=
async
(
record
)
=>
{
if
(
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
ONE_LEVEL_AUDIT_ORDER
)
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/firstApprovedOrder/detail?id=
${
record
.
orderId
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/firstApprovedOrder/detail?id=
${
record
.
id
}
`
)
}
// await PublicApi.postOrderQuotationBeReviewed({id})
// await PublicApi.postOrderQuotationBeReviewed({id})
// ref.current.reload()
// ref.current.reload()
}
}
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/schema/index.ts
View file @
cd54cd87
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
// import { getOrderType
} from '@/pages/transaction/effect';
import
{
getPurchaseOrderSelectOption
}
from
'@/pages/transaction/effect'
;
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
any
=
()
=>
{
export
const
tableListSchema
:
any
=
()
=>
{
// const OrderType = getOrderType()
const
res
=
getPurchaseOrderSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
return
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{
orderNo
:
{
orderNo
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
"supplyMembersName"
:
{
},
type
:
'string'
,
[
FORM_FILTER_PATH
]:
{
"x-component-props"
:
{
type
:
'object'
,
placeholder
:
'请输入供应会员名称'
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
}
},
},
"type"
:
{
properties
:
{
type
:
'string'
,
digest
:
{
"x-component-props"
:
{
type
:
'string'
,
placeholder
:
'请选择订单类型'
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
// enum: OrderType.map(item => ({
"memberName"
:
{
// label: item['name'],
type
:
'string'
,
// value: item['status'],
"x-component-props"
:
{
// }))
placeholder
:
'请输入供应会员名称'
enum
:
[]
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
},
"orderType"
:
{
submit
:
{
type
:
'string'
,
'x-component'
:
'Submit'
,
"x-component-props"
:
{
'x-component-props'
:
{
placeholder
:
'请选择订单类型'
children
:
'查询'
,
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'text'
],
value
:
item
[
'id'
],
}))
},
"[startDate, endDate]"
:
{
type
:
'daterange'
,
// "x-component": 'DateRangePickerUnix',
'x-component-props'
:
{
// showTime: true,
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
}
,
}
}
}
}
}
}
}
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
cd54cd87
...
@@ -64,6 +64,7 @@ export const procurementRenderField = (data) => {
...
@@ -64,6 +64,7 @@ export const procurementRenderField = (data) => {
purchaseCount
:
item
.
quantity
,
purchaseCount
:
item
.
quantity
,
taxInclusive
:
item
.
tax
,
taxInclusive
:
item
.
tax
,
money
:
item
.
amount
,
money
:
item
.
amount
,
imgUrl
:
item
.
logo
,
// 冗余memberId memberRoleId查询自提地址使用
// 冗余memberId memberRoleId查询自提地址使用
memberId
:
data
.
vendorMemberId
,
memberId
:
data
.
vendorMemberId
,
memberRoleId
:
data
.
vendorRoleId
,
memberRoleId
:
data
.
vendorRoleId
,
...
@@ -80,7 +81,6 @@ export const procurementProcessField = (value) => {
...
@@ -80,7 +81,6 @@ export const procurementProcessField = (value) => {
skuId
:
item
.
productId
,
skuId
:
item
.
productId
,
name
:
item
.
productName
,
name
:
item
.
productName
,
logo
:
item
.
imgUrl
,
logo
:
item
.
imgUrl
,
deliveryType
:
item
.
deliveryType
.
deliveryType
,
quantity
:
item
.
purchaseCount
,
quantity
:
item
.
purchaseCount
,
}
}
})
})
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/effects/index.ts
View file @
cd54cd87
...
@@ -18,26 +18,28 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
...
@@ -18,26 +18,28 @@ const asyncPadDataForProduct = async (ctx: ISchemaFormActions | ISchemaFormAsync
ctx
.
setFieldState
(
productValue
.
path
,
state
=>
{
ctx
.
setFieldState
(
productValue
.
path
,
state
=>
{
state
.
loading
=
true
state
.
loading
=
true
})
})
// 折扣请求
//
//
折扣请求
const
asyncPriceRequests
:
any
[]
=
await
Promise
.
all
(
productData
.
filter
(
v
=>
v
.
memberPrice
===
undefined
).
map
(
async
v
=>
{
//
const asyncPriceRequests: any[] = await Promise.all(productData.filter(v => v.memberPrice === undefined).map(async v => {
const
{
code
,
data
}
=
await
PublicApi
.
getMemberManageUpperCreditParamGet
({
//
const {code, data} = await PublicApi.getMemberManageUpperCreditParamGet({
parentMemberId
:
v
.
memberId
,
//
parentMemberId: v.memberId,
parentMemberRoleId
:
v
.
memberRoleId
//
parentMemberRoleId: v.memberRoleId
},
{
ttl
:
60
*
1000
,
useCache
:
true
})
//
}, {ttl: 60 * 1000, useCache: true})
return
code
===
1000
?
{
value
:
data
.
parameter
,
id
:
v
.
id
}
:
{
value
:
''
,
id
:
0
}
//
return code === 1000 ? { value: data.parameter, id: v.id } : { value: '', id: 0 }
}
//
}
))
//
))
// 存在需要异步请求的, 则进行赋值
//
//
存在需要异步请求的, 则进行赋值
if
(
asyncPriceRequests
.
length
>
0
)
{
//
if (asyncPriceRequests.length > 0) {
const
newData
=
productData
.
map
((
v
,
i
)
=>
{
const
newData
=
productData
.
map
((
v
,
i
)
=>
{
if
(
!
v
.
memberPrice
)
{
// if (!v.memberPrice) {
v
.
memberPrice
=
asyncPriceRequests
.
find
(
j
=>
j
.
id
===
v
.
id
)?.
value
||
''
// v.memberPrice = asyncPriceRequests.find(j => j.id === v.id)?.value || ''
}
// }
// // @ b2b订单不考虑会员折扣 字段固定100
v
.
discount
=
100
return
v
return
v
})
})
ctx
.
setFieldValue
(
'products'
,
newData
)
ctx
.
setFieldValue
(
'products'
,
newData
)
}
//
}
ctx
.
setFieldState
(
productValue
.
path
,
state
=>
{
ctx
.
setFieldState
(
productValue
.
path
,
state
=>
{
state
.
loading
=
false
state
.
loading
=
false
})
})
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
cd54cd87
...
@@ -220,9 +220,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
...
@@ -220,9 +220,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const
address
=
deliveryAddress
[
0
]
const
address
=
deliveryAddress
[
0
]
return
{
return
{
...
item
,
...
item
,
spec
:
item
.
type
,
quotedSpec
:
item
.
relevanceProductType
,
deliveryType
:
item
.
logistics
,
addressId
:
address
.
id
,
addressId
:
address
.
id
,
address
:
address
.
fullAddress
,
address
:
address
.
fullAddress
,
receiver
:
address
.
shipperName
,
receiver
:
address
.
shipperName
,
...
...
src/pages/transaction/purchaseOrder/readySubmitOrder/detail/index.tsx
View file @
cd54cd87
import
React
,
{
use
State
,
useCallback
,
useRef
}
from
'react'
;
import
React
,
{
use
Callback
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
...
@@ -12,12 +12,11 @@ import OrderDetailSection from '../../../components/orderDetailSection';
...
@@ -12,12 +12,11 @@ import OrderDetailSection from '../../../components/orderDetailSection';
const
ReadySubmitOrderDetail
:
React
.
FC
=
()
=>
{
const
ReadySubmitOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrder
Submit
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidate
Submit
)
const
handleClick
=
useCallback
(
async
()
=>
{
const
handleClick
=
useCallback
(
async
()
=>
{
const
params
=
{
const
params
=
{
id
:
Number
(
id
),
orderId
:
Number
(
id
),
state
:
-
1
}
}
const
result
=
await
run
(
params
)
const
result
=
await
run
(
params
)
...
...
src/pages/transaction/purchaseOrder/readySubmitOrder/index.tsx
View file @
cd54cd87
import
React
from
'react'
import
React
from
'react'
import
{
Card
,
Button
,
Space
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
...
@@ -9,40 +9,33 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
...
@@ -9,40 +9,33 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
PurchaseOrderOutWorkState
,
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
'../index.less'
import
'../index.less'
// 待提交订单
// 待提交订单
export
interface
FirstApproved
OrderProps
{}
export
interface
ReadySubmit
OrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
ProcurementSubmitList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
BuyerValidateSubmitPage
(
params
)
return
data
return
data
}
}
// TODO
const
ReadySubmitOrder
:
React
.
FC
<
ReadySubmitOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrderSubmitAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidateSubmitBatch
)
const
handleBitchPush
=
async
()
=>
{
const
handleBitchPush
=
async
()
=>
{
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
externalState
!==
PurchaseOrderOutWorkState
.
SUBMIT_ORDER
||
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
SUBMIT_ORDER
)
const
{
code
}
=
await
run
(
rowSelectionCtl
.
selectedRowKeys
.
map
(
item
=>
({
orderId
:
item
})))
if
(
canBitch
)
{
if
(
code
===
1000
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
ref
.
current
.
reload
()
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
else
{
message
.
error
(
'只能提交内部状态为审核通过并且外部状态为待提交的订单'
)
}
}
}
}
...
@@ -53,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -53,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'
i
d'
}
rowKey=
{
'
orderI
d'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
...
@@ -92,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -92,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApproved
Order
.
defaultProps
=
{}
ReadySubmit
Order
.
defaultProps
=
{}
export
default
FirstApproved
Order
export
default
ReadySubmit
Order
src/pages/transaction/purchaseOrder/readySubmitOrder/model/useSelfTable.tsx
View file @
cd54cd87
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
Button
,
Popconfirm
}
from
'antd'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
PublicApi
}
from
'@/services/api'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
PurchaseOrderOutWorkState
}
from
'@/constants/order'
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'orderId'
})
const
handleSubmit
=
async
(
id
)
=>
{
const
handleSubmit
=
async
(
id
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readySubmitOrder/detail?id=
${
id
}
&preview=0`
)
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readySubmitOrder/detail?id=
${
id
}
&preview=0`
)
}
}
// 取消订单
const
handleCancel
=
async
(
id
)
=>
{
await
PublicApi
.
postOrderPurchaseOrderCancel
({
id
})
ref
.
current
.
reload
()
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
{
{
title
:
'操作'
,
title
:
'操作'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
i
d
)
}
>
提交订单
</
Button
>
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
orderI
d
)
}
>
提交订单
</
Button
>
}
}
])
])
...
...
src/pages/transaction/purchaseOrder/readySubmitOrder/schema/index.ts
View file @
cd54cd87
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getPurchaseOrderSelectOption
}
from
'@/pages/transaction/effect'
;
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
any
=
()
=>
{
export
const
tableListSchema
:
any
=
()
=>
{
// const OrderType = getOrderType()
const
res
=
getPurchaseOrderSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
return
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{
orderNo
:
{
orderNo
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
"supplyMembersName"
:
{
},
type
:
'string'
,
[
FORM_FILTER_PATH
]:
{
"x-component-props"
:
{
type
:
'object'
,
placeholder
:
'请输入供应会员名称'
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
}
},
},
"type"
:
{
properties
:
{
type
:
'string'
,
digest
:
{
"x-component-props"
:
{
type
:
'string'
,
placeholder
:
'请选择订单类型'
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
// enum: OrderType.map(item => ({
"memberName"
:
{
// label: item['name'],
type
:
'string'
,
// value: item['status'],
"x-component-props"
:
{
// }))
placeholder
:
'请输入供应会员名称'
enum
:
[]
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
},
"orderType"
:
{
submit
:
{
type
:
'string'
,
'x-component'
:
'Submit'
,
"x-component-props"
:
{
'x-component-props'
:
{
placeholder
:
'请选择订单类型'
children
:
'查询'
,
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'text'
],
value
:
item
[
'id'
],
}))
},
"[startDate, endDate]"
:
{
type
:
'daterange'
,
// "x-component": 'DateRangePickerUnix',
'x-component-props'
:
{
// showTime: true,
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
}
,
}
}
}
}
}
}
}
src/pages/transaction/purchaseOrder/secondApprovedOrder/detail/index.tsx
View file @
cd54cd87
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
const
SecondApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
SecondApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'purchaseOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrderReviewed
Two
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidateGrade
Two
)
const
approvedRef
=
useRef
<
any
>
({})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
const
handleClick
=
useCallback
(()
=>
{
...
@@ -24,7 +24,7 @@ const SecondApprovedOrderDetail: React.FC = () => {
...
@@ -24,7 +24,7 @@ const SecondApprovedOrderDetail: React.FC = () => {
const
handleSubmit
=
useCallback
(()
=>
{
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
const
params
=
{
const
params
=
{
i
d
:
Number
(
id
),
orderI
d
:
Number
(
id
),
...
values
...
values
}
}
const
result
=
await
run
(
params
)
const
result
=
await
run
(
params
)
...
...
src/pages/transaction/purchaseOrder/secondApprovedOrder/index.tsx
View file @
cd54cd87
...
@@ -14,26 +14,23 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
...
@@ -14,26 +14,23 @@ import { useHttpRequest } from '@/hooks/useHttpRequest'
// 二级待审核订单
// 二级待审核订单
export
interface
First
ApprovedOrderProps
{}
export
interface
Second
ApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
ProcurementReviewedListTwo
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
BuyerValidateGradeTwoPage
(
params
)
return
data
return
data
}
}
// TODO
const
SecondApprovedOrder
:
React
.
FC
<
SecondApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
ref
}
=
useSelfTable
()
}
=
useSelfTable
()
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
orderI
d'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ProcurementOrderReviewedAllTwo
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
BuyerValidateGradeTwoBatch
)
const
handleSubmitBatch
=
async
()
=>
{
const
handleSubmitBatch
=
async
()
=>
{
const
{
code
}
=
await
run
({
const
{
code
}
=
await
run
(
rowSelectionCtl
.
selectedRowKeys
.
map
(
item
=>
({
orderId
:
item
})))
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
// 清空选中的值
// 清空选中的值
...
@@ -49,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -49,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'
i
d'
}
rowKey=
{
'
orderI
d'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
...
@@ -88,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -88,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
First
ApprovedOrder
.
defaultProps
=
{}
Second
ApprovedOrder
.
defaultProps
=
{}
export
default
First
ApprovedOrder
export
default
Second
ApprovedOrder
src/pages/transaction/purchaseOrder/secondApprovedOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -2,15 +2,11 @@ import React, { useRef } from 'react'
...
@@ -2,15 +2,11 @@ import React, { useRef } from 'react'
import
{
Button
}
from
'antd'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
handleSubmit
=
async
(
record
)
=>
{
const
handleSubmit
=
async
(
record
)
=>
{
if
(
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
TWO_LEVEL_AUDIT_ORDER
)
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/secondApprovedOrder/detail?id=
${
record
.
orderId
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/secondApprovedOrder/detail?id=
${
record
.
id
}
`
)
}
}
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
{
{
...
...
src/pages/transaction/purchaseOrder/secondApprovedOrder/schema/index.ts
View file @
cd54cd87
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getPurchaseOrderSelectOption
}
from
'@/pages/transaction/effect'
;
export
const
tableListSchema
:
any
=
()
=>
{
export
const
tableListSchema
:
any
=
()
=>
{
// const OrderType = getOrderType()
const
res
=
getPurchaseOrderSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
return
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{
orderNo
:
{
orderNo
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
"supplyMembersName"
:
{
},
type
:
'string'
,
[
FORM_FILTER_PATH
]:
{
"x-component-props"
:
{
type
:
'object'
,
placeholder
:
'请输入供应会员名称'
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
}
},
},
"type"
:
{
properties
:
{
type
:
'string'
,
digest
:
{
"x-component-props"
:
{
type
:
'string'
,
placeholder
:
'请选择订单类型'
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
},
// enum: OrderType.map(item => ({
"memberName"
:
{
// label: item['name'],
type
:
'string'
,
// value: item['status'],
"x-component-props"
:
{
// }))
placeholder
:
'请输入供应会员名称'
enum
:
[]
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
},
"orderType"
:
{
submit
:
{
type
:
'string'
,
'x-component'
:
'Submit'
,
"x-component-props"
:
{
'x-component-props'
:
{
placeholder
:
'请选择订单类型'
children
:
'查询'
,
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'text'
],
value
:
item
[
'id'
],
}))
},
"[startDate, endDate]"
:
{
type
:
'daterange'
,
// "x-component": 'DateRangePickerUnix',
'x-component-props'
:
{
// showTime: true,
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
}
,
}
}
}
}
}
}
}
src/pages/transaction/saleOrder/constant/index.tsx
View file @
cd54cd87
...
@@ -3,18 +3,9 @@ import { formatTimeString } from '@/utils'
...
@@ -3,18 +3,9 @@ import { formatTimeString } from '@/utils'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
EyePreview
from
'@/components/EyePreview'
import
EyePreview
from
'@/components/EyePreview'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
getSaleOrderSelectOption
}
from
'../../effect'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getSaleOrderAuditPageSelectOption
}
from
'@/pages/transaction/effect'
;
import
{
getSaleOrderAuditPageSelectOption
}
from
'@/pages/transaction/effect'
;
interface
LayoutState
{
/** flex布局的对齐方式 */
align
?:
string
,
/** 列的样式 */
colStyle
?:
Object
}
/** 订单审核各个页面 只有订单类型查询的Schema */
/** 订单审核各个页面 只有订单类型查询的Schema */
export
const
tableListSchema
:
any
=
(
align
?:
String
,
colStyle
?:
Object
)
=>
{
export
const
tableListSchema
:
any
=
(
align
?:
String
,
colStyle
?:
Object
)
=>
{
...
@@ -43,7 +34,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
...
@@ -43,7 +34,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
colStyle
:
colStyle
||
{
marginRight
:
20
}
colStyle
:
colStyle
||
{
marginRight
:
20
}
},
},
properties
:
{
properties
:
{
orderThe
:
{
digest
:
{
type
:
'string'
,
type
:
'string'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
placeholder
:
'请输入订单摘要'
,
...
@@ -89,14 +80,6 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
...
@@ -89,14 +80,6 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
export
const
baseOrderListColumns
:
any
=
()
=>
{
export
const
baseOrderListColumns
:
any
=
()
=>
{
// const res = getSaleOrderSelectOption()
// if(res) {
// const {
// orderTypes: OrderType,
// innerStatus: SaleOrderInsideWorkStateTexts,
// outerStatus: SaleOrderOutWorkStateTexts
// } = res
return
[
return
[
{
{
title
:
'订单号'
,
title
:
'订单号'
,
...
@@ -104,7 +87,6 @@ export const baseOrderListColumns: any = () => {
...
@@ -104,7 +87,6 @@ export const baseOrderListColumns: any = () => {
dataIndex
:
'orderNo'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
return
(
<
EyePreview
url=
{
`${history.location.pathname}/preview?id=${record.orderId}`
}
>
<
EyePreview
url=
{
`${history.location.pathname}/preview?id=${record.orderId}`
}
>
{
text
}
{
text
}
...
@@ -121,8 +103,8 @@ export const baseOrderListColumns: any = () => {
...
@@ -121,8 +103,8 @@ export const baseOrderListColumns: any = () => {
{
{
title
:
'采购会员'
,
title
:
'采购会员'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'
buyerM
emberName'
,
dataIndex
:
'
m
emberName'
,
key
:
'
buyerM
emberName'
,
key
:
'
m
emberName'
,
},
},
{
{
title
:
'下单时间'
,
title
:
'下单时间'
,
...
@@ -142,8 +124,6 @@ export const baseOrderListColumns: any = () => {
...
@@ -142,8 +124,6 @@ export const baseOrderListColumns: any = () => {
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'orderTypeName'
,
dataIndex
:
'orderTypeName'
,
key
:
'orderTypeName'
,
key
:
'orderTypeName'
,
// filters: OrderType.map((e, i) => ({ text: e['text'], value: Number(e['id']) })),
// onFilter: (value, record) => value === record.orderType,
},
},
{
{
title
:
'外部状态'
,
title
:
'外部状态'
,
...
@@ -151,8 +131,6 @@ export const baseOrderListColumns: any = () => {
...
@@ -151,8 +131,6 @@ export const baseOrderListColumns: any = () => {
dataIndex
:
'outerStatusName'
,
dataIndex
:
'outerStatusName'
,
key
:
'outerStatusName'
,
key
:
'outerStatusName'
,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'out'
text=
{
record
[
'outerStatusName'
]
}
/>,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'out'
text=
{
record
[
'outerStatusName'
]
}
/>,
// filters: SaleOrderOutWorkStateTexts.map((e, i) => ({ text: e['text'], value: Number(e['id']) })),
// onFilter: (value, record) => value === record.outerStatus,
},
},
{
{
title
:
'内部状态'
,
title
:
'内部状态'
,
...
@@ -160,9 +138,6 @@ export const baseOrderListColumns: any = () => {
...
@@ -160,9 +138,6 @@ export const baseOrderListColumns: any = () => {
dataIndex
:
'innerStatusName'
,
dataIndex
:
'innerStatusName'
,
key
:
'innerStatusName'
,
key
:
'innerStatusName'
,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
text=
{
record
[
'innerStatusName'
]
}
/>,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
text=
{
record
[
'innerStatusName'
]
}
/>,
// filters: SaleOrderInsideWorkStateTexts.map((e, i) => ({ text: e['text'], value: Number(e['id']) })),
// onFilter: (value, record) => value === record.innerStatus,
},
},
]
]
// }
}
}
src/pages/transaction/saleOrder/firstApprovedOrder/detail/index.tsx
View file @
cd54cd87
import
React
,
{
use
State
,
use
Callback
,
useRef
}
from
'react'
;
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
const
FirstApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
FirstApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrder
One
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateGrade
One
)
const
approvedRef
=
useRef
<
any
>
({})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
const
handleClick
=
useCallback
(()
=>
{
...
@@ -24,9 +24,8 @@ const FirstApprovedOrderDetail: React.FC = () => {
...
@@ -24,9 +24,8 @@ const FirstApprovedOrderDetail: React.FC = () => {
const
handleSubmit
=
useCallback
(()
=>
{
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
const
params
=
{
const
params
=
{
id
:
Number
(
id
),
orderId
:
Number
(
id
),
state
:
v
.
values
.
state
,
...
v
,
cause
:
v
.
values
.
cause
,
}
}
const
result
=
await
run
(
params
)
const
result
=
await
run
(
params
)
...
...
src/pages/transaction/saleOrder/firstApprovedOrder/index.tsx
View file @
cd54cd87
...
@@ -17,11 +17,11 @@ import '../index.less'
...
@@ -17,11 +17,11 @@ import '../index.less'
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
SubmittedReviewOrderOneList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
VendorValidateGradeOnePage
(
params
)
return
data
return
data
}
}
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
()
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
...
@@ -29,11 +29,11 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -29,11 +29,11 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrderOneAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateGradeOneBatch
)
const
handleBitchPush
=
async
()
=>
{
const
handleBitchPush
=
async
()
=>
{
if
(
rowSelectionCtl
.
selectedRowKeys
.
length
>
0
)
{
if
(
rowSelectionCtl
.
selectedRowKeys
.
length
>
0
)
{
const
{
code
}
=
await
run
(
{
ids
:
rowSelectionCtl
.
selectedRowKeys
}
)
const
{
code
}
=
await
run
(
rowSelectionCtl
.
selectedRowKeys
.
map
(
item
=>
({
orderId
:
item
}))
)
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
...
@@ -50,7 +50,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -50,7 +50,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'
i
d'
}
rowKey=
{
'
orderI
d'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
...
...
src/pages/transaction/saleOrder/firstApprovedOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -4,13 +4,12 @@ import { baseOrderListColumns } from '../../constant'
...
@@ -4,13 +4,12 @@ import { baseOrderListColumns } from '../../constant'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
orderI
d'
})
const
handleSubmit
=
async
(
record
)
=>
{
const
handleSubmit
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/firstApprovedOrder/detail?id=
${
record
.
i
d
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/firstApprovedOrder/detail?id=
${
record
.
orderI
d
}
`
)
}
}
const
secondColumns
=
()
=>
{
const
secondColumns
=
()
=>
{
...
...
src/pages/transaction/saleOrder/firstApprovedOrder/schema/index.ts
deleted
100644 → 0
View file @
ea7d5519
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getOrderType
}
from
'@/pages/transaction/effect'
;
export
const
tableListSchema
:
any
=
()
=>
{
const
OrderType
=
getOrderType
()
return
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'name'
],
value
:
item
[
'status'
],
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
}
}
}
src/pages/transaction/saleOrder/readyApprovedOrder/index.tsx
View file @
cd54cd87
...
@@ -16,11 +16,11 @@ import { tableListSchema } from '../constant'
...
@@ -16,11 +16,11 @@ import { tableListSchema } from '../constant'
export
interface
ReadyApprovedOrderProps
{}
export
interface
ReadyApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
SubmittedReviewOrderList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
VendorValidateSubmitPage
(
params
)
return
data
return
data
}
}
const
ReadyApprovedOrder
:
React
.
FC
<
ReadyApprovedOrderProps
>
=
(
props
)
=>
{
const
ReadyApprovedOrder
:
React
.
FC
<
ReadyApprovedOrderProps
>
=
()
=>
{
const
{
columns
,
ref
}
=
useSelfTable
()
const
{
columns
,
ref
}
=
useSelfTable
()
...
...
src/pages/transaction/saleOrder/readyApprovedOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -3,7 +3,6 @@ import { Button } from 'antd'
...
@@ -3,7 +3,6 @@ import { Button } from 'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
// 业务hooks, 待审核订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
...
@@ -22,7 +21,7 @@ export const useSelfTable = () => {
...
@@ -22,7 +21,7 @@ export const useSelfTable = () => {
key
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
{
render
:
(
text
,
record
)
=>
{
return
<>
return
<>
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
i
d
)
}
>
提交审核
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
.
orderI
d
)
}
>
提交审核
</
Button
>
</>
</>
}
}
}
}
...
...
src/pages/transaction/saleOrder/readyApprovedOrder/schema/index.ts
deleted
100644 → 0
View file @
ea7d5519
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getSaleOrderAuditPageSelectOption
}
from
'@/pages/transaction/effect'
;
export
const
tableListSchema
:
any
=
()
=>
{
const
res
=
getSaleOrderAuditPageSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-start'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginRight
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'text'
],
value
:
item
[
'id'
],
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
}
}
}
}
src/pages/transaction/saleOrder/readyConfirmOrder/detail/index.tsx
View file @
cd54cd87
import
React
,
{
use
State
,
use
Callback
,
useRef
}
from
'react'
;
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
...
@@ -14,7 +14,7 @@ import OrderElectronModal from '@/pages/transaction/components/orderElectronModa
...
@@ -14,7 +14,7 @@ import OrderElectronModal from '@/pages/transaction/components/orderElectronModa
const
ReadyConfirmOrderDetail
:
React
.
FC
=
()
=>
{
const
ReadyConfirmOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
ConfirmedOrder
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateConfirm
)
const
approvedRef
=
useRef
<
any
>
({})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
const
handleClick
=
useCallback
(()
=>
{
...
@@ -36,9 +36,8 @@ const ReadyConfirmOrderDetail: React.FC = () => {
...
@@ -36,9 +36,8 @@ const ReadyConfirmOrderDetail: React.FC = () => {
const
handleSubmit
=
()
=>
{
const
handleSubmit
=
()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
const
params
=
{
const
params
=
{
id
:
Number
(
id
),
orderId
:
Number
(
id
),
state
:
v
.
values
.
state
,
...
v
.
values
,
cause
:
v
.
values
.
cause
,
}
}
if
(
formContext
.
data
.
usingElectronicContracts
&&
v
.
values
.
state
)
{
// 使用合同 并且通过
if
(
formContext
.
data
.
usingElectronicContracts
&&
v
.
values
.
state
)
{
// 使用合同 并且通过
approvedRef
.
current
.
setVisible
(
false
)
approvedRef
.
current
.
setVisible
(
false
)
...
...
src/pages/transaction/saleOrder/readyConfirmOrder/index.tsx
View file @
cd54cd87
...
@@ -13,14 +13,14 @@ import '../index.less'
...
@@ -13,14 +13,14 @@ import '../index.less'
// 待确认订单
// 待确认订单
export
interface
FirstApproved
OrderProps
{}
export
interface
ReadyConfirm
OrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
ConfirmedOrderList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
VendorValidateConfirmPage
(
params
)
return
data
return
data
}
}
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
ReadyConfirmOrder
:
React
.
FC
<
ReadyConfirmOrderProps
>
=
(
)
=>
{
const
{
const
{
columns
columns
}
=
useSelfTable
()
}
=
useSelfTable
()
...
@@ -57,6 +57,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -57,6 +57,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApproved
Order
.
defaultProps
=
{}
ReadyConfirm
Order
.
defaultProps
=
{}
export
default
FirstApproved
Order
export
default
ReadyConfirm
Order
src/pages/transaction/saleOrder/readyConfirmOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -3,10 +3,9 @@ import { history } from 'umi'
...
@@ -3,10 +3,9 @@ import { history } from 'umi'
import
{
Button
}
from
'antd'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
baseOrderListColumns
}
from
'../../constant'
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
handleConfirm
=
async
(
record
)
=>
{
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmOrder/detail?id=
${
record
.
i
d
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmOrder/detail?id=
${
record
.
orderI
d
}
`
)
}
}
const
secondColumns
=
()
=>
{
const
secondColumns
=
()
=>
{
...
...
src/pages/transaction/saleOrder/readyConfirmOrder/schema/index.ts
deleted
100644 → 0
View file @
ea7d5519
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getOrderType
}
from
'@/pages/transaction/effect'
;
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
any
=
()
=>
{
const
OrderType
=
getOrderType
()
return
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-start'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginRight
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'name'
],
value
:
item
[
'status'
],
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
}
}
}
src/pages/transaction/saleOrder/secondApprovedOrder/detail/index.tsx
View file @
cd54cd87
import
React
,
{
use
State
,
use
Callback
,
useRef
}
from
'react'
;
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
...
@@ -13,7 +13,7 @@ import OrderDetailSection from '../../../components/orderDetailSection';
const
SecondApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
SecondApprovedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrder
Two
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateGrade
Two
)
const
approvedRef
=
useRef
<
any
>
({})
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
const
handleClick
=
useCallback
(()
=>
{
...
@@ -24,9 +24,8 @@ const SecondApprovedOrderDetail: React.FC = () => {
...
@@ -24,9 +24,8 @@ const SecondApprovedOrderDetail: React.FC = () => {
const
handleSubmit
=
useCallback
(()
=>
{
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
(
v
)
=>
{
const
params
=
{
const
params
=
{
id
:
Number
(
id
),
orderId
:
Number
(
id
),
state
:
v
.
values
.
state
,
...
v
.
values
cause
:
v
.
values
.
cause
,
}
}
const
result
=
await
run
(
params
)
const
result
=
await
run
(
params
)
...
...
src/pages/transaction/saleOrder/secondApprovedOrder/index.tsx
View file @
cd54cd87
...
@@ -15,25 +15,23 @@ import '../index.less'
...
@@ -15,25 +15,23 @@ import '../index.less'
// 二级待审核订单
// 二级待审核订单
export
interface
First
ApprovedOrderProps
{}
export
interface
Second
ApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrder
SubmittedReviewOrderTwoList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrder
VendorValidateGradeTwoPage
(
params
)
return
data
return
data
}
}
const
FirstApprovedOrder
:
React
.
FC
<
First
ApprovedOrderProps
>
=
(
props
)
=>
{
const
SecondApprovedOrder
:
React
.
FC
<
Second
ApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
ref
}
=
useSelfTable
()
}
=
useSelfTable
()
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'
orderI
d'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
SubmittedReviewOrderTwoAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrder
VendorValidateGradeTwoBatch
)
const
handleSubmitBatch
=
async
()
=>
{
const
handleSubmitBatch
=
async
()
=>
{
const
{
code
}
=
await
run
({
const
{
code
}
=
await
run
(
rowSelectionCtl
.
selectedRowKeys
.
map
(
item
=>
({
orderId
:
item
})))
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
...
@@ -48,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -48,7 +46,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'
i
d'
}
rowKey=
{
'
orderI
d'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
...
@@ -56,7 +54,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -56,7 +54,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
(
'flex-end'
,
{
marginLeft
:
20
}),
schema
:
tableListSchema
(
'flex-end'
,
{
marginLeft
:
20
}),
// schema: tableListSchema(),
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
...
@@ -88,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -88,6 +85,6 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
First
ApprovedOrder
.
defaultProps
=
{}
Second
ApprovedOrder
.
defaultProps
=
{}
export
default
First
ApprovedOrder
export
default
Second
ApprovedOrder
src/pages/transaction/saleOrder/secondApprovedOrder/model/useSelfTable.tsx
View file @
cd54cd87
...
@@ -2,13 +2,12 @@ import React, { useRef } from 'react'
...
@@ -2,13 +2,12 @@ import React, { useRef } from 'react'
import
{
Button
}
from
'antd'
import
{
Button
}
from
'antd'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
baseOrderListColumns
}
from
'../../constant'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
SaleOrderInsideWorkState
}
from
'@/constants/order'
// 业务hooks, 待新增订单
// 业务hooks, 待新增订单
export
const
useSelfTable
=
()
=>
{
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
handleSubmit
=
async
(
record
)
=>
{
const
handleSubmit
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/secondApprovedOrder/detail?id=
${
record
.
i
d
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/secondApprovedOrder/detail?id=
${
record
.
orderI
d
}
`
)
}
}
const
secondColumns
=
()
=>
{
const
secondColumns
=
()
=>
{
...
...
src/pages/transaction/saleOrder/secondApprovedOrder/schema/index.ts
deleted
100644 → 0
View file @
ea7d5519
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getOrderType
}
from
'@/pages/transaction/effect'
;
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
any
=
()
=>
{
const
OrderType
=
getOrderType
()
return
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'name'
],
value
:
item
[
'status'
],
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
}
}
}
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