Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
e68aa329
Commit
e68aa329
authored
Jan 18, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'featStrategies' into dev
parents
66592fed
4bf65218
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1307 additions
and
855 deletions
+1307
-855
commodityRoute.ts
config/routes/commodityRoute.ts
+54
-8
menu.ts
src/locales/zh-CN/menu.ts
+9
-5
index.tsx
src/pages/priceManage/constant/index.tsx
+68
-0
index.tsx
src/pages/priceManage/effect/index.tsx
+51
-0
PriceSetting.tsx
...ages/priceManage/priceStrategy/component/PriceSetting.tsx
+0
-0
index.less
src/pages/priceManage/priceStrategy/index.less
+15
-0
index.tsx
src/pages/priceManage/priceStrategy/index.tsx
+208
-0
setStrategy.tsx
src/pages/priceManage/priceStrategy/setStrategy.tsx
+66
-0
index.tsx
src/pages/priceManage/schema/index.tsx
+0
-0
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+2
-0
index.tsx
...es/transaction/purchaseOrder/firstApprovedOrder/index.tsx
+104
-105
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+4
-4
index.tsx
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
+131
-132
index.tsx
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
+103
-104
index.tsx
...ages/transaction/purchaseOrder/readySubmitOrder/index.tsx
+99
-100
index.tsx
...s/transaction/purchaseOrder/secondApprovedOrder/index.tsx
+96
-97
index.tsx
src/pages/transaction/saleOrder/firstApprovedOrder/index.tsx
+99
-100
index.tsx
...pages/transaction/saleOrder/readyReturnDocument/index.tsx
+103
-104
index.tsx
...pages/transaction/saleOrder/secondApprovedOrder/index.tsx
+95
-96
No files found.
config/routes/commodityRoute.ts
View file @
e68aa329
...
@@ -202,13 +202,13 @@ const CommodityRoute: RouterChild = {
...
@@ -202,13 +202,13 @@ const CommodityRoute: RouterChild = {
icon
:
'smile'
,
icon
:
'smile'
,
component
:
'@/pages/commodity/products/viewProducts'
,
component
:
'@/pages/commodity/products/viewProducts'
,
},
},
// 快捷修改单价
//
//
快捷修改单价
{
//
{
path
:
'/memberCenter/commodityAbility/commodity/products/fastModifyPrice'
,
//
path: '/memberCenter/commodityAbility/commodity/products/fastModifyPrice',
name
:
'fastModifyPrice'
,
//
name: 'fastModifyPrice',
icon
:
'smile'
,
//
icon: 'smile',
component
:
'@/pages/commodity/products/fastModifyPrice'
,
//
component: '@/pages/commodity/products/fastModifyPrice',
},
//
},
// 渠道直采商品
// 渠道直采商品
{
{
path
:
'/memberCenter/commodityAbility/commodity/products/directChannel'
,
path
:
'/memberCenter/commodityAbility/commodity/products/directChannel'
,
...
@@ -242,6 +242,52 @@ const CommodityRoute: RouterChild = {
...
@@ -242,6 +242,52 @@ const CommodityRoute: RouterChild = {
},
},
]
]
},
},
// 价格管理
{
path
:
'/memberCenter/commodityAbility/priceManage'
,
name
:
'priceManage'
,
icon
:
'smile'
,
routes
:
[
// 价格策略
{
path
:
'/memberCenter/commodityAbility/priceManage/priceStrategy'
,
name
:
'priceStrategy'
,
icon
:
'smile'
,
component
:
'@/pages/priceManage/priceStrategy'
,
},
// 快捷修改单价
{
path
:
'/memberCenter/commodityAbility/priceManage/fastModifyPrice'
,
name
:
'fastModifyPrice'
,
icon
:
'smile'
,
component
:
'@/pages/commodity/products/fastModifyPrice'
,
},
// 新增价格策略
{
path
:
'/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/add'
,
name
:
'addStrategy'
,
icon
:
'smile'
,
component
:
'@/pages/priceManage/priceStrategy/setStrategy'
,
hideInMenu
:
true
,
},
// 编辑价格策略
{
path
:
'/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/edit'
,
name
:
'editStrategy'
,
icon
:
'smile'
,
component
:
'@/pages/priceManage/priceStrategy/setStrategy'
,
hideInMenu
:
true
,
},
// 查看价格策略
{
path
:
'/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/detail'
,
name
:
'previewStrategy'
,
icon
:
'smile'
,
component
:
'@/pages/priceManage/priceStrategy/setStrategy'
,
hideInMenu
:
true
,
},
]
},
// 仓位
// 仓位
{
{
path
:
'/memberCenter/commodityAbility/repositories'
,
path
:
'/memberCenter/commodityAbility/repositories'
,
...
@@ -280,7 +326,7 @@ const CommodityRoute: RouterChild = {
...
@@ -280,7 +326,7 @@ const CommodityRoute: RouterChild = {
icon
:
'smile'
,
icon
:
'smile'
,
component
:
'./repositories/adjustRepository'
,
component
:
'./repositories/adjustRepository'
,
hideInMenu
:
true
,
hideInMenu
:
true
,
}
}
,
]
]
}
}
...
...
src/locales/zh-CN/menu.ts
View file @
e68aa329
...
@@ -47,11 +47,11 @@ export default {
...
@@ -47,11 +47,11 @@ export default {
'menu.commodityAbility.classAndProperty.propertyValueDetail'
:
'查看属性值'
,
'menu.commodityAbility.classAndProperty.propertyValueDetail'
:
'查看属性值'
,
'menu.commodityAbility.classAndProperty.categoryAttributes'
:
'关联品类属性'
,
'menu.commodityAbility.classAndProperty.categoryAttributes'
:
'关联品类属性'
,
'menu.commodityAbility.classAndProperty.viewAttributes'
:
'品类属性'
,
'menu.commodityAbility.classAndProperty.viewAttributes'
:
'品类属性'
,
'menu.commodityAbility.trademark'
:
'品牌'
,
'menu.commodityAbility.trademark'
:
'品牌
管理
'
,
'menu.commodityAbility.addBrand'
:
'新建品牌'
,
'menu.commodityAbility.addBrand'
:
'新建品牌'
,
'menu.commodityAbility.editBrand'
:
'编辑品牌'
,
'menu.commodityAbility.editBrand'
:
'编辑品牌'
,
'menu.commodityAbility.brandDetail'
:
'查看品牌'
,
'menu.commodityAbility.brandDetail'
:
'查看品牌'
,
'menu.commodityAbility.commodity'
:
'商品'
,
'menu.commodityAbility.commodity'
:
'商品
管理
'
,
'menu.commodityAbility.commodity.goods'
:
'货品'
,
'menu.commodityAbility.commodity.goods'
:
'货品'
,
'menu.commodityAbility.commodity.addGoods'
:
'新建货品'
,
'menu.commodityAbility.commodity.addGoods'
:
'新建货品'
,
'menu.commodityAbility.commodity.editGoods'
:
'编辑货品'
,
'menu.commodityAbility.commodity.editGoods'
:
'编辑货品'
,
...
@@ -60,17 +60,21 @@ export default {
...
@@ -60,17 +60,21 @@ export default {
'menu.commodityAbility.commodity.addProducts'
:
'新建商品'
,
'menu.commodityAbility.commodity.addProducts'
:
'新建商品'
,
'menu.commodityAbility.commodity.editProducts'
:
'编辑商品'
,
'menu.commodityAbility.commodity.editProducts'
:
'编辑商品'
,
'menu.commodityAbility.commodity.productsDetail'
:
'查看商品'
,
'menu.commodityAbility.commodity.productsDetail'
:
'查看商品'
,
'menu.commodityAbility.commodity.fastModifyPrice'
:
'快捷修改单价'
,
'menu.commodityAbility.commodity.directChannel'
:
'渠道直采商品'
,
'menu.commodityAbility.commodity.directChannel'
:
'渠道直采商品'
,
'menu.commodityAbility.commodity.addDirectChannel'
:
'新建渠道直采商品'
,
'menu.commodityAbility.commodity.addDirectChannel'
:
'新建渠道直采商品'
,
'menu.commodityAbility.commodity.editDirectChannel'
:
'修改渠道直采商品'
,
'menu.commodityAbility.commodity.editDirectChannel'
:
'修改渠道直采商品'
,
'menu.commodityAbility.commodity.directChannelDetail'
:
'查看渠道直采商品'
,
'menu.commodityAbility.commodity.directChannelDetail'
:
'查看渠道直采商品'
,
'menu.commodityAbility.repositories'
:
'仓位'
,
'menu.commodityAbility.repositories'
:
'仓位
管理
'
,
'menu.commodityAbility.addRepository'
:
'新建仓位'
,
'menu.commodityAbility.addRepository'
:
'新建仓位'
,
'menu.commodityAbility.editRepository'
:
'编辑仓位'
,
'menu.commodityAbility.editRepository'
:
'编辑仓位'
,
'menu.commodityAbility.repositoryDetail'
:
'查看仓位'
,
'menu.commodityAbility.repositoryDetail'
:
'查看仓位'
,
'menu.commodityAbility.adjustRepository'
:
'仓位库存调拨'
,
'menu.commodityAbility.adjustRepository'
:
'仓位库存调拨'
,
'menu.commodityAbility.priceManage'
:
'价格管理'
,
'menu.commodityAbility.priceManage.priceStrategy'
:
'价格策略'
,
'menu.commodityAbility.priceManage.addStrategy'
:
'新建商品价格策略'
,
'menu.commodityAbility.priceManage.editStrategy'
:
'编辑商品价格策略'
,
'menu.commodityAbility.priceManage.previewStrategy'
:
'查看商品价格策略'
,
'menu.commodityAbility.priceManage.fastModifyPrice'
:
'快捷修改单价'
,
// 会员能力
// 会员能力
'menu.memberAbility'
:
'会员'
,
'menu.memberAbility'
:
'会员'
,
'menu.memberAbility.memberManage'
:
'会员管理'
,
'menu.memberAbility.memberManage'
:
'会员管理'
,
...
...
src/pages/priceManage/constant/index.tsx
0 → 100644
View file @
e68aa329
// 选择商品和会员弹框和商品规格的列
export
const
columnsSetMember
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
align
:
'center'
,
key
:
'memberTypeName'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
align
:
'center'
,
key
:
'levelTag'
,
}
]
export
const
columnsSetProduct
:
any
[]
=
[
{
title
:
'商品ID'
,
dataIndex
:
'commodityId'
,
align
:
'center'
,
key
:
'commodityId'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
align
:
'center'
,
key
:
'name'
,
width
:
210
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'customerCategoryName'
,
align
:
'center'
,
key
:
'customerCategoryName'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brandName'
,
align
:
'center'
,
key
:
'brandName'
,
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
,
align
:
'center'
,
key
:
'unitName'
,
},
]
src/pages/priceManage/effect/index.tsx
0 → 100644
View file @
e68aa329
import
React
,
{
useEffect
}
from
'react'
import
{
ISchemaFormActions
,
FormEffectHooks
,
IFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
const
{
onFieldValueChange$
}
=
FormEffectHooks
export
const
createAddRepositoryEffect
=
(
context
:
ISchemaFormActions
)
=>
{
const
fetchWarehouseAll
=
async
()
=>
{
const
{
data
}
=
await
PublicApi
.
getWarehouseWarehouseAll
()
context
.
setFieldState
(
'warehouseId'
,
state
=>
{
state
.
warehouseLists
=
data
})
return
data
.
map
(
v
=>
({
value
:
v
.
id
,
label
:
v
.
name
}))
}
useAsyncSelect
(
'warehouseId'
,
fetchWarehouseAll
)
// useWarehouseSelect(context)
}
// 高级筛选schema中用于输入搜索品牌的Effect
export
const
searchBrandOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
// console.log(state.props['x-component-props'].searchValue, 'pagesearchvalue') // 此处可以实时获取到输入并暂存在schema props的值
PublicApi
.
getProductSelectGetSelectBrand
({
name
:
state
.
props
[
'x-component-props'
].
searchValue
}).
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
})
})
}
// 高级筛选schema中用于输入搜索商品品类的Effect
export
const
searchCustomerCategoryOptionEffect
=
(
context
:
any
,
fieldName
:
string
)
=>
{
context
.
getFieldState
(
fieldName
,
state
=>
{
// PublicApi.getProductSelectGetSelectCustomerCategory({ name: state.props['x-component-props'].searchValue }).then(res => {
// context.setFieldState(fieldName, state => {
// state.props['x-component-props'].dataoption = res.data
// })
// })
PublicApi
.
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
context
.
setFieldState
(
fieldName
,
state
=>
{
state
.
props
[
'x-component-props'
].
dataoption
=
res
.
data
})
})
})
}
src/pages/priceManage/priceStrategy/component/PriceSetting.tsx
0 → 100644
View file @
e68aa329
This diff is collapsed.
Click to expand it.
src/pages/priceManage/priceStrategy/index.less
0 → 100644
View file @
e68aa329
.setStrategy {
.ant-input-group-addon {
padding: 0;
border: none;
}
.connectBtn {
width: 80px;
height: 32px;
line-height: 32px;
background: #909399;
color: #fff;
text-align: center;
cursor: pointer;
}
}
src/pages/priceManage/priceStrategy/index.tsx
0 → 100644
View file @
e68aa329
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
import
{
Button
,
Form
,
Card
,
Space
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
moment
from
'moment'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
NiceForm
from
'@/components/NiceForm'
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
searchCustomerCategoryOptionEffect
,
searchBrandOptionEffect
}
from
'../effect'
import
{
schema
}
from
'../schema'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
history
}
from
'umi'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
PlusOutlined
}
from
'@ant-design/icons'
const
formActions
=
createFormActions
();
const
PriceManage
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'价格策略ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
},
{
title
:
'价格策略名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
EyePreview
url=
{
`/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/detail?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'商品ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
'品类'
,
dataIndex
:
[
"commodity"
,
"customerCategory"
,
"name"
],
key
:
'commodity'
,
},
{
title
:
'品牌'
,
dataIndex
:
[
"commodity"
,
"brand"
,
"name"
],
key
:
'commodity'
,
},
{
title
:
'单位'
,
dataIndex
:
[
"commodity"
,
"unitName"
],
key
:
'commodity'
,
},
{
title
:
'商品定价'
,
dataIndex
:
'priceType'
,
key
:
'priceType'
,
render
:
(
t
,
r
)
=>
{
if
(
t
===
1
)
return
'现货价格'
if
(
t
===
2
)
return
'价格需要询价'
if
(
t
===
3
)
return
'积分兑换商品'
}
},
{
title
:
'价格'
,
dataIndex
:
'min'
,
key
:
'min'
,
render
:
(
text
:
any
,
reocrd
:
any
)
=>
{
if
(
reocrd
.
priceType
===
1
){
if
(
reocrd
.
max
===
reocrd
.
min
)
return
<>
¥
{
reocrd
.
min
}
</>
else
return
<>
¥
{
reocrd
.
min
}
~ ¥
{
reocrd
.
max
}
</>
}
if
(
reocrd
.
priceType
===
3
){
if
(
reocrd
.
max
===
reocrd
.
min
)
return
<>
{
reocrd
.
min
}
</>
else
return
<>
{
reocrd
.
min
}
~
{
reocrd
.
max
}
</>
}
if
(
reocrd
.
priceType
===
2
)
return
null
}
},
{
title
:
'状态'
,
dataIndex
:
'isEnable'
,
key
:
'isEnable'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
handleConfirm=
{
()
=>
handleUpdateState
(
record
)
}
record=
{
record
}
fieldNames=
"isEnable"
/>
),
filters
:
[
{
text
:
'有效'
,
value
:
true
,
},
{
text
:
'无效'
,
value
:
false
,
}
],
onFilter
:
(
value
,
record
)
=>
record
.
isEnable
===
value
,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
width
:
128
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<>
<
Button
type=
'link'
className=
"padLeft0"
onClick=
{
()
=>
handleModify
(
record
)
}
>
修改
</
Button
>
<
Button
type=
'link'
className=
"padLeft0"
onClick=
{
()
=>
handleDelete
(
record
)
}
>
删除
</
Button
>
</>
)
}
}
];
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getProductCommodityGetUnitPriceStrategyList
(
params
).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
})
}
const
handleUpdateState
=
(
record
:
any
)
=>
{
PublicApi
.
postProductCommodityUpdateUnitPriceStrategyStatus
({
id
:
record
.
id
,
isEnable
:
!
record
.
isEnable
})
}
const
handleModify
=
(
record
:
any
)
=>
{
history
.
push
(
`/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/edit?id=
${
record
.
id
}
`
)
}
const
handleDelete
=
(
record
:
any
)
=>
{
}
const
controllerBtns
=
(
<
Space
>
<
Button
type=
'primary'
onClick=
{
()
=>
history
.
push
(
'/memberCenter/commodityAbility/priceManage/priceStrategy/setStrategy/add'
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
</
Space
>
)
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
'id'
}
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
expressionScope=
{
{
controllerBtns
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
)
FormEffectHooks
.
onFieldChange$
(
'brandId'
).
subscribe
(
state
=>
{
searchBrandOptionEffect
(
actions
,
'brandId'
)
})
FormEffectHooks
.
onFieldChange$
(
'customerCategoryId'
).
subscribe
(
state
=>
{
searchCustomerCategoryOptionEffect
(
actions
,
'customerCategoryId'
)
})
}
}
schema=
{
schema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
PriceManage
src/pages/priceManage/priceStrategy/setStrategy.tsx
0 → 100644
View file @
e68aa329
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
import
{
Button
,
Form
,
Card
,
Modal
,
Checkbox
,
Row
,
Col
,
Input
,
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
history
}
from
"umi"
import
ReutrnEle
from
'@/components/ReturnEle'
import
{
SaveOutlined
}
from
'@ant-design/icons'
import
{
createFormActions
}
from
'@formily/antd'
import
{
setPriceSchema
}
from
'../schema'
import
PriceSetting
from
'./component/PriceSetting'
import
'./index.less'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
const
addSchemaAction
=
createFormActions
()
const
SetStrategy
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
,
preview
,
pageStatus
}
=
usePageStatus
()
// 整体表单提交
const
formSubmit
=
async
(
values
)
=>
{
console
.
log
(
values
,
'values'
)
// const params = omit(values, ['NO_SUBMIT3'])
// if (params['applyMember']) {
// params['applyMember'] = params['applyMember']
// }
// if(!params['isAllMemberShare'] && !params['applyMember']?.length) {
// message.error('请选择指定会员')
// } else {
// addSchemaAction.getFieldState('warehouseId', prevState => {
// params['warehouseName'] = prevState.props.enum.filter((item: any) => item.value === prevState.value)[0]['label']
// })
// await PublicApi.postWarehouseFreightSpaceAdd(params)
// setTimeout(() => {
// history.goBack(-1)
// }, 1000)
// }
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
className=
"setStrategy"
title=
{
pageStatus
===
PageStatus
.
PREVIEW
?
'查看商品价格策略'
:
'新建商品价格策略'
}
extra=
{
(
pageStatus
!==
PageStatus
.
PREVIEW
?
(
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>
)
:
null
)
}
>
<
Card
>
<
PriceSetting
addSchemaAction=
{
addSchemaAction
}
schema=
{
setPriceSchema
}
formSubmit=
{
formSubmit
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
SetStrategy
src/pages/priceManage/schema/index.tsx
0 → 100644
View file @
e68aa329
This diff is collapsed.
Click to expand it.
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
e68aa329
...
@@ -184,6 +184,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -184,6 +184,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex
:
'deliveryNo'
,
dataIndex
:
'deliveryNo'
,
align
:
'center'
,
align
:
'center'
,
key
:
'deliveryNo'
,
key
:
'deliveryNo'
,
render
:
text
=>
<
a
href=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?deliveryNo=${text}`
}
>
{
text
}
</
a
>
},
},
{
{
title
:
'发货时间'
,
title
:
'发货时间'
,
...
@@ -197,6 +198,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
...
@@ -197,6 +198,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex
:
'logisticsNo'
,
dataIndex
:
'logisticsNo'
,
align
:
'center'
,
align
:
'center'
,
key
:
'logisticsNo'
,
key
:
'logisticsNo'
,
render
:
text
=>
<
a
href=
{
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?code=${data.orderNo}`
}
>
{
text
}
</
a
>
},
},
{
{
title
:
'物流公司'
,
title
:
'物流公司'
,
...
...
src/pages/transaction/purchaseOrder/firstApprovedOrder/index.tsx
View file @
e68aa329
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 一级待审核订单
// 一级待审核订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderProcurementReviewedListOne
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderProcurementReviewedListOne
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderReviewedAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderReviewedAll
)
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
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ONE_LEVEL_AUDIT_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
ref
.
current
.
reload
()
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
}
else
{
}
else
{
message
.
error
(
'只能批量提交内部状态为审核中的订单'
)
message
.
error
(
'只能批量提交内部状态为审核中的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
e68aa329
...
@@ -297,10 +297,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
...
@@ -297,10 +297,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
if
(
!
judgementByCount
||
judgementByCount
.
includes
(
false
)){
if
(
!
judgementByCount
||
judgementByCount
.
includes
(
false
)){
throw
new
Error
(
'请填写商品采购数量'
)
throw
new
Error
(
'请填写商品采购数量'
)
}
}
// 校验简单电子合同必选
//
//
校验简单电子合同必选
if
(
processEnum
===
24
&&
!
usingElectronicContracts
){
//
if(processEnum === 24 && !usingElectronicContracts){
throw
new
Error
(
'此订单必须签署电子合同'
)
//
throw new Error('此订单必须签署电子合同')
}
//
}
// logistics render字段字符串化
// logistics render字段字符串化
params
.
orderProductRequests
=
params
.
orderProductRequests
.
map
(
item
=>
{
params
.
orderProductRequests
=
params
.
orderProductRequests
.
map
(
item
=>
{
let
logistics
:
any
=
{
...
item
.
logistics
,
render
:
item
.
logistics
?.
render
?
JSON
.
stringify
(
item
.
logistics
.
render
)
:
''
};
let
logistics
:
any
=
{
...
item
.
logistics
,
render
:
item
.
logistics
?.
render
?
JSON
.
stringify
(
item
.
logistics
.
render
)
:
''
};
...
...
src/pages/transaction/purchaseOrder/readyAddOrder/index.tsx
View file @
e68aa329
import
React
from
'react'
import
React
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
DatePicker
}
from
'@formily/antd-components'
import
{
DatePicker
}
from
'@formily/antd-components'
import
{
useSelfTable
}
from
'./model/useReadyAddOrder'
import
{
useSelfTable
}
from
'./model/useReadyAddOrder'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
// 待新增订单
// 待新增订单
export
interface
ReadyAddOrderProps
{}
export
interface
ReadyAddOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderProcurementStayAddList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderProcurementStayAddList
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
ReadyAddOrder
:
React
.
FC
<
ReadyAddOrderProps
>
=
(
props
)
=>
{
const
ReadyAddOrder
:
React
.
FC
<
ReadyAddOrderProps
>
=
(
props
)
=>
{
const
{
run
:
deleteRun
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderDeleteAll
)
const
{
run
:
deleteRun
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderDeleteAll
)
const
{
loading
:
submitLoading
,
run
:
submitRun
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderSubmitExamineAll
)
const
{
loading
:
submitLoading
,
run
:
submitRun
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderSubmitExamineAll
)
const
{
columns
,
ref
,
rowSelection
,
rowSelectionCtl
}
=
useSelfTable
()
const
{
columns
,
ref
,
rowSelection
,
rowSelectionCtl
}
=
useSelfTable
()
const
handleMenuClick
=
async
(
e
)
=>
{
const
handleMenuClick
=
async
(
e
)
=>
{
switch
(
e
.
key
)
{
switch
(
e
.
key
)
{
case
'1'
:
{
case
'1'
:
{
// 批量删除
// 批量删除
const
canDelete
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ADD_PURCHASE_ORDER
)
const
canDelete
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ADD_PURCHASE_ORDER
)
if
(
canDelete
)
{
if
(
canDelete
)
{
const
{
code
}
=
await
deleteRun
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
deleteRun
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
ref
.
current
.
reload
()
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
}
else
{
}
else
{
message
.
error
(
'只能删除内部状态为未审核过的订单'
)
message
.
error
(
'只能删除内部状态为未审核过的订单'
)
}
}
break
;
break
;
}
}
}
}
}
}
const
handleBitchPush
=
async
()
=>
{
const
handleBitchPush
=
async
()
=>
{
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ADD_PURCHASE_ORDER
)
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
ADD_PURCHASE_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
submitRun
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
submitRun
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
ref
.
current
.
reload
()
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
}
else
{
}
else
{
message
.
error
(
'只能提交审核待新增的订单'
)
message
.
error
(
'只能提交审核待新增的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
<
Button
icon=
{
<
PlusCircleOutlined
/>
}
icon=
{
<
PlusCircleOutlined
/>
}
type=
'primary'
type=
'primary'
// onClick=
{()
=
>
history.push('/memberCenter/tranactionAbility/purchaseOrder/orderDetail')}
// onClick=
{()
=
>
history.push('/memberCenter/tranactionAbility/purchaseOrder/orderDetail')}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add'
)
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add'
)
}
>
>
新建
新建
</
Button
>
</
Button
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
submitLoading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
submitLoading
}
>
批量提交审核
</
Button
>
<
DropDeleteDown
>
<
DropDeleteDown
>
<
Menu
onClick=
{
(
e
)
=>
handleMenuClick
(
e
)
}
>
<
Menu
onClick=
{
(
e
)
=>
handleMenuClick
(
e
)
}
>
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
<
Menu
.
Item
key=
"1"
icon=
{
<
DeleteOutlined
/>
}
>
批量删除
批量删除
</
Menu
.
Item
>
</
Menu
.
Item
>
</
Menu
>
</
Menu
>
</
DropDeleteDown
>
</
DropDeleteDown
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
ReadyAddOrder
.
defaultProps
=
{}
ReadyAddOrder
.
defaultProps
=
{}
export
default
ReadyAddOrder
export
default
ReadyAddOrder
\ No newline at end of file
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
View file @
e68aa329
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
// 待归档订单
// 待归档订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderFiledOrderList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderFiledOrderList
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderFiledOrderAddAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderFiledOrderAddAll
)
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
.
FILLING_ORDER
)
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
ref
.
current
.
reload
()
ref
.
current
.
reload
()
}
}
}
else
{
}
else
{
message
.
error
(
'只能批量提交内部状态为待确认归档的订单'
)
message
.
error
(
'只能批量提交内部状态为待确认归档的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/purchaseOrder/readySubmitOrder/index.tsx
View file @
e68aa329
import
React
from
'react'
import
React
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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'
import
{
PurchaseOrderOutWorkState
,
PurchaseOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 待提交订单
// 待提交订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderProcurementSubmitList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderProcurementSubmitList
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderSubmitAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderSubmitAll
)
const
handleBitchPush
=
async
()
=>
{
const
handleBitchPush
=
async
()
=>
{
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
externalState
!==
PurchaseOrderOutWorkState
.
SUBMIT_ORDER
||
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
SUBMIT_ORDER
)
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
externalState
!==
PurchaseOrderOutWorkState
.
SUBMIT_ORDER
||
v
.
interiorState
!==
PurchaseOrderInsideWorkState
.
SUBMIT_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
ref
.
current
.
reload
()
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
}
else
{
}
else
{
message
.
error
(
'只能提交内部状态为审核通过并且外部状态为待提交的订单'
)
message
.
error
(
'只能提交内部状态为审核通过并且外部状态为待提交的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
loading
}
>
批量提交
</
Button
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
loading
}
>
批量提交
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/purchaseOrder/secondApprovedOrder/index.tsx
View file @
e68aa329
import
React
from
'react'
import
React
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 二级待审核订单
// 二级待审核订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderProcurementReviewedListTwo
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderProcurementReviewedListTwo
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
ref
}
=
useSelfTable
()
}
=
useSelfTable
()
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderReviewedAllTwo
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderProcurementOrderReviewedAllTwo
)
const
handleSubmitBatch
=
async
()
=>
{
const
handleSubmitBatch
=
async
()
=>
{
const
{
code
}
=
await
run
({
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
ids
:
rowSelectionCtl
.
selectedRowKeys
})
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
// 清空选中的值
// 清空选中的值
ref
.
current
.
reload
()
ref
.
current
.
reload
()
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/saleOrder/firstApprovedOrder/index.tsx
View file @
e68aa329
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 一级待审核订单
// 一级待审核订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderSubmittedReviewOrderOneList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderSubmittedReviewOrderOneList
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderSubmittedReviewOrderOneAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderSubmittedReviewOrderOneAll
)
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
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
ref
.
current
.
reload
()
ref
.
current
.
reload
()
}
}
}
else
{
}
else
{
message
.
error
(
'请勾选要审核的订单'
)
message
.
error
(
'请勾选要审核的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleBitchPush
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/saleOrder/readyReturnDocument/index.tsx
View file @
e68aa329
import
React
,
{
useRef
}
from
'react'
import
React
,
{
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
,
message
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
// 待归档订单
// 待归档订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderListOfOrdersToBeFiled
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderListOfOrdersToBeFiled
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
,
ref
,
rowSelection
,
rowSelection
,
rowSelectionCtl
rowSelectionCtl
}
=
useSelfTable
()
}
=
useSelfTable
()
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderOfOrdersToBeFiledAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderOfOrdersToBeFiledAll
)
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
.
purchaseOrderInteriorState
!==
SaleOrderInsideWorkState
.
FILLING_ORDER
)
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
purchaseOrderInteriorState
!==
SaleOrderInsideWorkState
.
FILLING_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
ref
.
current
.
reload
()
ref
.
current
.
reload
()
}
}
}
else
{
}
else
{
message
.
error
(
'只能批量提交内部状态为待确认归档的订单'
)
message
.
error
(
'只能批量提交内部状态为待确认归档的订单'
)
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
src/pages/transaction/saleOrder/secondApprovedOrder/index.tsx
View file @
e68aa329
import
React
from
'react'
import
React
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
}
from
'antd'
import
{
Card
,
Button
,
Space
,
Dropdown
,
Menu
}
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'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
PlusCircleOutlined
,
DownOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
DropDeleteDown
from
'@/components/DropDeleteDown'
import
{
tableListSchema
}
from
'./schema'
import
{
tableListSchema
}
from
'./schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
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
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
// 二级待审核订单
// 二级待审核订单
export
interface
FirstApprovedOrderProps
{}
export
interface
FirstApprovedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
getOrderSubmittedReviewOrderTwoList
(
params
)
const
{
data
}
=
await
PublicApi
.
getOrderSubmittedReviewOrderTwoList
(
params
)
return
data
return
data
}
}
// TODO
// TODO
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
FirstApprovedOrder
:
React
.
FC
<
FirstApprovedOrderProps
>
=
(
props
)
=>
{
const
{
const
{
columns
,
columns
,
ref
ref
}
=
useSelfTable
()
}
=
useSelfTable
()
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderSubmittedReviewOrderTwoAll
)
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderSubmittedReviewOrderTwoAll
)
const
handleSubmitBatch
=
async
()
=>
{
const
handleSubmitBatch
=
async
()
=>
{
const
{
code
}
=
await
run
({
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
ids
:
rowSelectionCtl
.
selectedRowKeys
})
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectRow
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
rowSelectionCtl
.
setSelectedRowKeys
([])
ref
.
current
.
reload
()
ref
.
current
.
reload
()
}
}
}
}
return
<
PageHeaderWrapper
>
return
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
StandardTable
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
rowSelection=
{
rowSelection
}
rowSelection=
{
rowSelection
}
columns=
{
columns
}
columns=
{
columns
}
currentRef=
{
ref
}
currentRef=
{
ref
}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
formilyLayouts=
{
{
formilyLayouts=
{
{
justify
:
'space-between'
justify
:
'space-between'
}
}
}
}
formilyProps=
{
{
formilyProps=
{
{
ctx
:
{
ctx
:
{
inline
:
false
,
inline
:
false
,
schema
:
tableListSchema
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
useStateFilterSearchLinkageEffect
(
$
,
$
,
actions
,
actions
,
'orderNo'
,
'orderNo'
,
FORM_FILTER_PATH
,
FORM_FILTER_PATH
,
);
);
},
},
components
:
{
components
:
{
DateRangePickerUnix
,
DateRangePickerUnix
,
Submit
Submit
}
}
},
},
layouts
:
{
layouts
:
{
order
:
2
,
order
:
2
,
span
:
16
span
:
24
}
}
}
}
}
}
formilyChilds=
{
{
formilyChilds=
{
{
children
:
<
Space
>
children
:
<
Space
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
<
Button
onClick=
{
handleSubmitBatch
}
loading=
{
loading
}
>
批量提交审核
</
Button
>
</
Space
>,
</
Space
>,
layouts
:
{
layouts
:
{
span
:
8
span
:
8
}
}
}
}
}
}
/>
/>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
FirstApprovedOrder
.
defaultProps
=
{}
FirstApprovedOrder
.
defaultProps
=
{}
export
default
FirstApprovedOrder
export
default
FirstApprovedOrder
\ No newline at end of file
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