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
linweijiong
jinfa-platform
Commits
8bb0885e
Commit
8bb0885e
authored
Jun 10, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 销售订单表格操作变更为后端字段控制
parent
37d451f1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
177 additions
and
69 deletions
+177
-69
useSelfTable.tsx
...aseOrder/addPurchaseWarehouseOrder/model/useSelfTable.tsx
+32
-9
useSelfTable.tsx
...ction/purchaseOrder/readyFileOrder/model/useSelfTable.tsx
+3
-3
useSelfTable.tsx
...on/purchaseOrder/readyReceiveOrder/model/useSelfTable.tsx
+3
-3
useSelfTable.tsx
...tion/saleOrder/addSaleDelevedOrder/model/useSelfTable.tsx
+35
-9
useSelfTable.tsx
...ction/saleOrder/firstApprovedOrder/model/useSelfTable.tsx
+6
-5
index.tsx
src/pages/transaction/saleOrder/index.tsx
+37
-11
useSelfTable.tsx
...n/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
+39
-11
useSelfTable.tsx
...saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
+5
-5
useSelfTable.tsx
.../saleOrder/readyConfirmReturnOrder/model/useSelfTable.tsx
+5
-5
useSelfTable.tsx
...tion/saleOrder/readyReturnDocument/model/useSelfTable.tsx
+6
-5
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+3
-3
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+3
-0
No files found.
src/pages/transaction/purchaseOrder/addPurchaseWarehouseOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -8,11 +8,33 @@ import StatusColors from '@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
}
from
'@/constants/order'
import
{
DOC_TYPE_PURCHASE_RECEIPT
}
from
'@/constants/commodity'
import
TableOperation
from
'@/components/TableOperation'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
statusAndOperationList
=
{
'9'
:
[
'新增入库单'
],
'10'
:
[
'审核'
],
}
const
operationHandler
=
{
'审核'
:
()
=>
handleConfirm
(
record
),
'新增入库单'
:
()
=>
handleAdd
(
record
),
}
return
(
<
TableOperation
record=
{
record
}
customField=
'button'
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
'审核'
/>
)
}
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
...
...
@@ -86,15 +108,16 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
READY_WAREHOUSE_APPROVED_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
审核
</
Button
>
}
{
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
WAREHOUSE_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleAdd
(
record
)
}
>
新增入库单
</
Button
>
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
// render: (text, record) => <>
// {/* 支付结果确认到账= 待审核状态 */}
// { record.interiorState === PurchaseOrderInsideWorkState.READY_WAREHOUSE_APPROVED_ORDER &&
// <Button type='link' onClick={() => handleConfirm(record)}>审核</Button>
// }
// { record.interiorState === PurchaseOrderInsideWorkState.WAREHOUSE_ORDER &&
// <Button type='link' onClick={() => handleAdd(record)}>新增入库单</Button>
// }
// </>
}
]
...
...
src/pages/transaction/purchaseOrder/readyFileOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -22,10 +22,10 @@ export const useSelfTable = () => {
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
FILLING_ORDER
&&
{
/* {
record.interiorState === PurchaseOrderInsideWorkState.FILLING_ORDER &&
*/
}
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
)
}
>
归档
</
Button
>
}
{
/* } */
}
</>
}
])
...
...
src/pages/transaction/purchaseOrder/readyReceiveOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -85,10 +85,10 @@ export const useSelfTable = () => {
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
(
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
CONFIRM_RECEIPT
||
record
.
interiorState
===
PurchaseOrderInsideWorkState
.
HAND_RECEIPT_ORDER
)
&&
{
/* 支付结果确认到账= 待审核状态
{ (record.interiorState === PurchaseOrderInsideWorkState.CONFIRM_RECEIPT || record.interiorState === PurchaseOrderInsideWorkState.HAND_RECEIPT_ORDER) && */
}
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认收货
</
Button
>
}
{
/* } */
}
</>
}
]
...
...
src/pages/transaction/saleOrder/addSaleDelevedOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -8,11 +8,36 @@ import { ORDER_TYPE, SaleOrderInsideWorkState } from '@/constants/order'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
DOC_TYPE_SALES_INVOICE
}
from
'@/constants/commodity'
import
TableOperation
from
'@/components/TableOperation'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// 1.(查看)2.(查看、取消订单)3.(查看售后),4.(评价查看售后)5.(提交审核修改删除查看)6.(修改查看),7.(查看中止)8.查看评价9.待新增采购入库单
// 10.审核采购入库单,11.待新增销售发货单12.审核销售发货单13.待新增物流单,14.查看物流单15.修改物流单
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
statusAndOperationList
=
{
'11'
:
[
'新增发货单'
],
'12'
:
[
'审核'
],
}
const
operationHandler
=
{
'审核'
:
()
=>
handleConfirm
(
record
),
'新增发货单'
:
()
=>
handleAdd
(
record
),
}
return
(
<
TableOperation
record=
{
record
}
customField=
'button'
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
'审核'
/>
)
}
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
...
...
@@ -87,15 +112,16 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
READY_DELEVED_APPROVED
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
审核
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
SALE_CREATE_DELIVED_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleAdd
(
record
)
}
>
新增发货单
</
Button
>
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
// render: (text, record) => <>
// {/* 支付结果确认到账= 待审核状态 */}
// { record.purchaseOrderInteriorState === SaleOrderInsideWorkState.READY_DELEVED_APPROVED &&
// <Button type='link' onClick={() => handleConfirm(record)}>审核</Button>
// }
// { record.purchaseOrderInteriorState === SaleOrderInsideWorkState.SALE_CREATE_DELIVED_ORDER &&
// <Button type='link' onClick={() => handleAdd(record)}>新增发货单</Button>
// }
// </>
}
]
...
...
src/pages/transaction/saleOrder/firstApprovedOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -21,12 +21,13 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
ONE_LEVEL_AUDIT_ORDER
&&
render
:
(
text
,
record
)
=>
// <>
// {
// record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER &&
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
)
}
>
提交审核
</
Button
>
}
</>
//
}
//
</>
}
])
...
...
src/pages/transaction/saleOrder/index.tsx
View file @
8bb0885e
...
...
@@ -13,6 +13,7 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
import
Submit
from
'@/components/NiceForm/components/Submit'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
}
from
'@formily/antd'
import
TableOperation
from
'@/components/TableOperation'
// 销售订单查询
...
...
@@ -25,18 +26,44 @@ const fetchTableData = async (params) => {
const
formActions
=
createFormActions
();
// 最后一步开始调试 TODO
const
SaleOrder
:
React
.
FC
<
SaleOrderProps
>
=
(
props
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
saleVisible
,
setSaleVisible
]
=
useState
<
any
>
(
false
)
// 售后唤起弹窗 @todo
const
handleSaleAfter
=
(
id
)
=>
{
const
handleEvaluate
=
(
id
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`
)
}
const
handleCancel
=
(
r
)
=>
{
console
.
log
(
'TODO'
)
}
const
handleEvaluate
=
(
id
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/supplierEvaluation/unevaluated`
)
const
handleSuspend
=
(
r
)
=>
{
console
.
log
(
'TODO'
)
}
// 1.(查看)2.(查看、取消订单)3.(查看售后),4.(评价查看售后)5.(提交审核修改删除查看)6.(修改查看),7.(查看中止)8.查看评价9.待新增采购入库单
// 10.审核采购入库单,11.待新增销售发货单12.审核销售发货单13.待新增物流单,14.查看物流单15.修改物流单
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
statusAndOperationList
=
{
'3'
:
[
'取消订单'
],
'7'
:
[
'中止'
],
'8'
:
[
'评价'
],
}
const
operationHandler
=
{
'取消订单'
:
()
=>
handleCancel
(
record
),
'中止'
:
()
=>
handleSuspend
(
record
),
'评价'
:
()
=>
handleEvaluate
(
record
.
id
),
}
return
(
<
TableOperation
record=
{
record
}
customField=
'button'
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
'审核'
/>
)
}
const
secondColumns
:
any
[]
=
baseOrderListColumns
().
concat
([
...
...
@@ -45,11 +72,10 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
externalState
===
PurchaseOrderOutWorkState
.
FINISH_ORDER
&&
!
record
.
procurementEevaluateState
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleEvaluate
(
record
.
id
)
}
>
评价
</
Button
>
}
{
/* todo */
}
{
/* <Button type='link' onClick={() => handleSaleAfter(record.id)}>售后</Button> */
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
// render: (text, record) => <>
// { record.externalState === PurchaseOrderOutWorkState.FINISH_ORDER && !record.procurementEevaluateState && <Button type='link' onClick={() => handleEvaluate(record.id)}>评价</Button> }
// </>
}
])
...
...
src/pages/transaction/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -7,11 +7,38 @@ import { ORDER_TYPE, SaleOrderInsideWorkState } from '@/constants/order'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
qs
from
'querystring'
import
TableOperation
from
'@/components/TableOperation'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// 1.(查看)2.(查看、取消订单)3.(查看售后),4.(评价查看售后)5.(提交审核修改删除查看)6.(修改查看),7.(查看中止)8.查看评价9.待新增采购入库单
// 10.审核采购入库单,11.待新增销售发货单12.审核销售发货单13.待新增物流单,14.查看物流单15.修改物流单
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
statusAndOperationList
=
{
'13'
:
[
'新增物流单'
],
'14'
:
[
'查看物流单'
],
'15'
:
[
'修改物流单'
],
}
const
operationHandler
=
{
'新增物流单'
:
()
=>
handleConfirm
(
record
),
'查看物流单'
:
()
=>
handlePreview
(
record
),
'修改物流单'
:
()
=>
handleModify
(
record
),
}
return
(
<
TableOperation
record=
{
record
}
customField=
'button'
statusOperationMap=
{
statusAndOperationList
}
operationHandler=
{
operationHandler
}
priorityOperationName=
'审核'
/>
)
}
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
...
...
@@ -86,17 +113,18 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
ADD_LOGISTICS_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
新增物流单
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
DELIVERY_APPROVED_SUCCESS
&&
<
Button
type=
'link'
onClick=
{
()
=>
handlePreview
(
record
)
}
>
查看物流单
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
NOT_ACCEPTED_DELIVERY
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleModify
(
record
)
}
>
修改物流单
</
Button
>
}
</>
render
:
(
text
:
any
,
record
:
any
)
=>
renderOptionButton
(
record
)
// render: (text, record) => <>
// { record.purchaseOrderInteriorState === SaleOrderInsideWorkState.ADD_LOGISTICS_ORDER &&
// <Button type='link' onClick={() => handleConfirm(record)}>新增物流单</Button>
// }
// { record.purchaseOrderInteriorState === SaleOrderInsideWorkState.DELIVERY_APPROVED_SUCCESS &&
// <Button type='link' onClick={() => handlePreview(record)}>查看物流单</Button>
// }
// { record.purchaseOrderInteriorState === SaleOrderInsideWorkState.NOT_ACCEPTED_DELIVERY &&
// <Button type='link' onClick={() => handleModify(record)}>修改物流单</Button>
// }
// </>
}
]
...
...
src/pages/transaction/saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -84,12 +84,12 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
(
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_DELIVERY_ORDER
||
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
HAND_DELEVED_ORDER
)
&&
render
:
(
text
,
record
)
=>
// <>
//
{ (record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_DELIVERY_ORDER || record.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER) &&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认发货
</
Button
>
}
</>
//
}
//
</>
}
]
...
...
src/pages/transaction/saleOrder/readyConfirmReturnOrder/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -84,12 +84,12 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_RECEIPT
&&
render
:
(
text
,
record
)
=>
// <>
//
{ record.purchaseOrderInteriorState === SaleOrderInsideWorkState.CONFIRM_RECEIPT &&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认回单
</
Button
>
}
</>
//
}
//
</>
}
]
...
...
src/pages/transaction/saleOrder/readyReturnDocument/model/useSelfTable.tsx
View file @
8bb0885e
...
...
@@ -21,12 +21,13 @@ export const useSelfTable = () => {
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
FILLING_ORDER
&&
render
:
(
text
,
record
)
=>
// <>
// {
// record.purchaseOrderInteriorState === SaleOrderInsideWorkState.FILLING_ORDER &&
<
Button
type=
'link'
onClick=
{
()
=>
handleSubmit
(
record
)
}
>
归档
</
Button
>
}
</>
//
}
//
</>
}
])
...
...
src/pages/transaction/transactionRules/addRule.tsx
View file @
8bb0885e
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
React
,
{
useState
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Card
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -8,8 +8,8 @@ import {
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
'./index.less'
import
{
ruleDetailSchema
}
from
'./schema'
import
{
createFormActions
,
ISchema
,
FormEffectHooks
}
from
'@formily/antd'
import
{
findItemAndDelete
,
omit
}
from
'@/utils'
import
{
createFormActions
}
from
'@formily/antd'
import
{
omit
}
from
'@/utils'
import
{
PublicApi
}
from
'@/services/api'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
RuleSetting
from
'./components/RuleSetting'
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
8bb0885e
...
...
@@ -259,6 +259,9 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
state
.
visible
=
true
})
}
if
(
pageStatus
===
PageStatus
.
PREVIEW
)
{
data
.
time
=
data
.
time
+
'小时'
}
setInitialValue
(
data
)
}
if
(
id
!=
''
)
{
...
...
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