Commit 65f62d55 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents d1e9229d b694f8d5
......@@ -202,13 +202,13 @@ const CommodityRoute: RouterChild = {
icon: 'smile',
component: '@/pages/commodity/products/viewProducts',
},
// 快捷修改单价
{
path: '/memberCenter/commodityAbility/commodity/products/fastModifyPrice',
name: 'fastModifyPrice',
icon: 'smile',
component: '@/pages/commodity/products/fastModifyPrice',
},
// // 快捷修改单价
// {
// path: '/memberCenter/commodityAbility/commodity/products/fastModifyPrice',
// name: 'fastModifyPrice',
// icon: 'smile',
// component: '@/pages/commodity/products/fastModifyPrice',
// },
// 渠道直采商品
{
path: '/memberCenter/commodityAbility/commodity/products/directChannel',
......@@ -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',
......@@ -280,7 +326,7 @@ const CommodityRoute: RouterChild = {
icon: 'smile',
component: './repositories/adjustRepository',
hideInMenu: true,
}
},
]
}
......
......@@ -660,13 +660,12 @@ export const logisticsDeliverySearchSchema: ISchema = {
}
}
},
invoicesType: {
invoicesTypeId: {
type: 'string',
// fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
// "x-component": 'SearchSelect',
"x-component": 'SearchSelect',
'x-component-props': {
placeholder: '单据类型',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
style: {
width: 160
}
......
......@@ -47,11 +47,11 @@ export default {
'menu.commodityAbility.classAndProperty.propertyValueDetail': '查看属性值',
'menu.commodityAbility.classAndProperty.categoryAttributes': '关联品类属性',
'menu.commodityAbility.classAndProperty.viewAttributes': '品类属性',
'menu.commodityAbility.trademark': '品牌',
'menu.commodityAbility.trademark': '品牌管理',
'menu.commodityAbility.addBrand': '新建品牌',
'menu.commodityAbility.editBrand': '编辑品牌',
'menu.commodityAbility.brandDetail': '查看品牌',
'menu.commodityAbility.commodity': '商品',
'menu.commodityAbility.commodity': '商品管理',
'menu.commodityAbility.commodity.goods': '货品',
'menu.commodityAbility.commodity.addGoods': '新建货品',
'menu.commodityAbility.commodity.editGoods': '编辑货品',
......@@ -60,17 +60,21 @@ export default {
'menu.commodityAbility.commodity.addProducts': '新建商品',
'menu.commodityAbility.commodity.editProducts': '编辑商品',
'menu.commodityAbility.commodity.productsDetail': '查看商品',
'menu.commodityAbility.commodity.fastModifyPrice': '快捷修改单价',
'menu.commodityAbility.commodity.directChannel': '渠道直采商品',
'menu.commodityAbility.commodity.addDirectChannel': '新建渠道直采商品',
'menu.commodityAbility.commodity.editDirectChannel': '修改渠道直采商品',
'menu.commodityAbility.commodity.directChannelDetail': '查看渠道直采商品',
'menu.commodityAbility.repositories': '仓位',
'menu.commodityAbility.repositories': '仓位管理',
'menu.commodityAbility.addRepository': '新建仓位',
'menu.commodityAbility.editRepository': '编辑仓位',
'menu.commodityAbility.repositoryDetail': '查看仓位',
'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.memberManage': '会员管理',
......
This diff is collapsed.
......@@ -12,6 +12,11 @@ import { SelectGoodsColumns, ExternalListColumns, AfterSalesSelectGoodsColumns }
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import moment from 'moment';
import ModalTableOrder from './components/ModalTableOrder';
import StatusTag from '@/components/StatusTag';
import {
EXCHANGE_OUTER_STATUS_TAG_MAP,
EXCHANGE_INNER_STATUS_BADGE_MAP,
} from './constants';
const { TabPane } = Tabs;
const { Search } = Input;
const { Option } = Select;
......@@ -341,7 +346,7 @@ const AddLogistics: React.FC<{}> = () => {
obj.companyId = option.value
obj.companyName = option.children
setmemberInfo({ memberId: option.memberid, roleId: option.roleid })
}else {
} else {
obj.companyId = ''
obj.companyName = ''
}
......@@ -388,21 +393,21 @@ const AddLogistics: React.FC<{}> = () => {
})
break;
case 4:
PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
break;
case 5:
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
break;
case 6:
PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.relevanceOrderId ? query.relevanceOrderId : query.shipmentOrderId }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......@@ -748,14 +753,21 @@ const AddLogistics: React.FC<{}> = () => {
</Select>
</Form.Item>
<Form.Item label="单据时间" name='voucherTime'><span>{query.voucherTime && moment(query.voucherTime).format('YYYY-MM-DD HH:mm:ss')} </span></Form.Item>
{createType !== 1 &&
{(createType === 2 || createType === 3 ) ?
<Form.Item label="外部状态" name='externalState'>
{query.externalState === 1 ? <Badge status="warning" text='待提交' /> :
{
query.externalState === 1 ? <Badge status="warning" text='待提交' /> :
query.externalState === 2 ? <Badge status="processing" text='待确认' /> :
query.externalState === 3 ? <Badge status="error" text='不接收物流单' /> :
query.externalState === 4 ? <Badge status="success" text='接收物流单' /> : ''
query.externalState === 3 ? <Badge status="error" text='不接收物流单' /> :
query.externalState === 4 ? <Badge status="success" text='接收物流单' /> : ''
}
</Form.Item>
:
(createType === 4 || createType === 5 || createType === 6) ?
<Form.Item label="外部状态" name='externalState'>
{/* <StatusTag type={EXCHANGE_OUTER_STATUS_TAG_MAP[record.outerStatus]} title={text} /> */}
</Form.Item>
: <></>
}
</Form>
</TabPane>
......
@import "../../member/components/index.less";
.count{
font-size: 24px;
color: #303133;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #303133;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
}
}
\ No newline at end of file
@import "../../member/components/index.less";
.count{
font-size: 24px;
color: #303133;
font-weight: 500;
}
.add-btn{
margin-bottom: 24px;
padding: 6px 0;
text-align: center;
background: #FAFBFC;
}
.alignCenter{
text-align: center;
}
.alignLeft{
text-align: left;
}
.hidden{
display: none;
}
.block{
display: block;
}
.selectBtn {
margin: 0 16px;
}
.filter-btn{
width : 112px;
margin: 0 0 0 16px;
}
.select {
width : 160px;
&:nth-last-of-type(1) {
margin-right: 0;
}
}
.mainCol {
background-color: #fff;
margin-bottom : 24px;
padding : 0 24px;
box-sizing : border-box;
border-radius: 8px;
&-title {
font-size : 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color : #303133;
padding : 20px 0;
}
&:nth-last-of-type(1) {
margin: 0;
}
&-row {
display : flex;
flex-wrap : wrap;
padding-bottom: 16px;
&-col {
display: flex;
width : calc(100% / 3);
padding: 16px 0;
&-option {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
&-rows {
display : flex;
padding-bottom: 16px;
&-cols {
flex: 1;
.cols-main {
display: flex;
padding: 16px 0;
&:nth-last-of-type(1) {
padding-bottom: 0;
}
&-options {
flex : 1;
font-size : 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color : #909399;
&:nth-last-of-type(1) {
flex : 3;
padding-right: 20px;
box-sizing : border-box;
color : #303133;
}
}
}
}
}
}
......@@ -346,7 +346,7 @@ const detailInfo: React.FC<{}> = () => {
{item.title}
</div>
<div className={style['cols-main-options']}>
<a>{item.value}</a>
<div>{item.value}</div>
</div>
</div>
);
......
......@@ -76,6 +76,7 @@ const company: React.FC<parmas> = (props) => {
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [excludeList, setExcludeList] = useState<Array<any>>([])
useEffect(() => {
console.log(pageStatus, 1008611)
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流公司`)
if (id) {
......@@ -181,7 +182,7 @@ const company: React.FC<parmas> = (props) => {
const fetchData = (params) => {
if (visible) {
return new Promise(resolve => {
PublicApi.postMemberManageLogisticsPage({ ...params, excludeList }).then(res => {
PublicApi.postMemberManageLogisticsPage({ ...params, excludeList }, {ctlType: 'none'}).then(res => {
resolve(res.data)
})
})
......@@ -279,7 +280,7 @@ const company: React.FC<parmas> = (props) => {
</Form.Item>
</Col>
{
(pageStatus !== PageStatus.PREVIEW) &&
(pageStatus !== 'PREVIEW') &&
<Col span={18}>
<Row>
<Col span={6}></Col>
......
......@@ -98,27 +98,43 @@ const PayWaySetTemplate: React.FC<{}> = () => {
const onHnadleSubmit = () => {
let conditions = false;
let wayName = '';
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0) {
conditions = true
try {
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
console.log(1)
if (item.payParametersAddListRequests.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = `${item.way}缺少支付参数配置`
throw new Error
}
} else if (item.id === 6 && item.isPitchOn === 1) {
if (item.payParametersAddListRequests.length > 0) {
const data = item.payParametersAddListRequests[0]
if (data.code && data.value && data.describe) {
conditions = true
} else {
conditions = false
wayName = `请配置${item.way}的参数`
throw new Error
}
}
} else {
conditions = false
wayName = item.way
return
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
return
}
} else {
conditions = true
}
})
})
} catch {
message.error(wayName)
}
if (conditions) {
PublicApi.postPayMemberQueryPlatformUpdate({
platformPayWays: payItem
......@@ -127,8 +143,6 @@ const PayWaySetTemplate: React.FC<{}> = () => {
history.push('/memberCenter/payandSettle/paySetting/payParamsSetting')
}
})
} else {
message.error(`请新增${wayName}的支付参数配置`)
}
}
......
// 选择商品和会员弹框和商品规格的列
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',
},
]
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
})
})
})
}
This diff is collapsed.
.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;
}
}
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
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
This diff is collapsed.
......@@ -184,6 +184,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex: 'deliveryNo',
align: 'center',
key: 'deliveryNo',
render: text => <a href={`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?deliveryNo=${text}`}>{text}</a>
},
{
title: '发货时间',
......@@ -197,6 +198,7 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
dataIndex: 'logisticsNo',
align: 'center',
key: 'logisticsNo',
render: text => <a href={`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?code=${data.orderNo}`}>{text}</a>
},
{
title: '物流公司',
......
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 一级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListOne(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderReviewedAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能批量提交内部状态为审核中的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 一级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListOne(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderReviewedAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能批量提交内部状态为审核中的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
......@@ -297,10 +297,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
if(!judgementByCount || judgementByCount.includes(false)){
throw new Error('请填写商品采购数量')
}
// 校验简单电子合同必选
if(processEnum === 24 && !usingElectronicContracts){
throw new Error('此订单必须签署电子合同')
}
// // 校验简单电子合同必选
// if(processEnum === 24 && !usingElectronicContracts){
// throw new Error('此订单必须签署电子合同')
// }
// logistics render字段字符串化
params.orderProductRequests = params.orderProductRequests.map(item => {
let logistics: any = { ...item.logistics, render: item.logistics?.render ? JSON.stringify(item.logistics.render) : '' };
......
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { useSelfTable } from './model/useReadyAddOrder'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待新增订单
export interface ReadyAddOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementStayAddList(params)
return data
}
// TODO
const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
const { run: deleteRun } = useHttpRequest(PublicApi.postOrderProcurementOrderDeleteAll)
const { loading: submitLoading, run: submitRun } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitExamineAll)
const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable()
const handleMenuClick = async (e) => {
switch(e.key) {
case '1': {
// 批量删除
const canDelete = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canDelete) {
const { code } = await deleteRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能删除内部状态为未审核过的订单')
}
break;
}
}
}
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canBitch) {
const { code } = await submitRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交审核待新增的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
// onClick={() => history.push('/memberCenter/tranactionAbility/purchaseOrder/orderDetail')}
onClick={() => history.push('/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add')}
>
新建
</Button>
<Button onClick={handleBitchPush} loading={submitLoading}>批量提交审核</Button>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
</DropDeleteDown>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
ReadyAddOrder.defaultProps = {}
export default ReadyAddOrder
\ No newline at end of file
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { useSelfTable } from './model/useReadyAddOrder'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待新增订单
export interface ReadyAddOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementStayAddList(params)
return data
}
// TODO
const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
const { run: deleteRun } = useHttpRequest(PublicApi.postOrderProcurementOrderDeleteAll)
const { loading: submitLoading, run: submitRun } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitExamineAll)
const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable()
const handleMenuClick = async (e) => {
switch(e.key) {
case '1': {
// 批量删除
const canDelete = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canDelete) {
const { code } = await deleteRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能删除内部状态为未审核过的订单')
}
break;
}
}
}
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ADD_PURCHASE_ORDER)
if (canBitch) {
const { code } = await submitRun({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交审核待新增的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button
icon={<PlusCircleOutlined/>}
type='primary'
// onClick={() => history.push('/memberCenter/tranactionAbility/purchaseOrder/orderDetail')}
onClick={() => history.push('/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add')}
>
新建
</Button>
<Button onClick={handleBitchPush} loading={submitLoading}>批量提交审核</Button>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
</DropDeleteDown>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
ReadyAddOrder.defaultProps = {}
export default ReadyAddOrder
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待归档订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderFiledOrderList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderFiledOrderAddAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.FILLING_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('只能批量提交内部状态为待确认归档的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 待归档订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderFiledOrderList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderFiledOrderAddAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.FILLING_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('只能批量提交内部状态为待确认归档的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PurchaseOrderOutWorkState, PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 待提交订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementSubmitList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitAll)
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.externalState !== PurchaseOrderOutWorkState.SUBMIT_ORDER || v.interiorState !== PurchaseOrderInsideWorkState.SUBMIT_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交内部状态为审核通过并且外部状态为待提交的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
rowSelection={rowSelection}
fetchTableData={params => fetchTableData(params)}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PurchaseOrderOutWorkState, PurchaseOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 待提交订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementSubmitList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderSubmitAll)
const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.externalState !== PurchaseOrderOutWorkState.SUBMIT_ORDER || v.interiorState !== PurchaseOrderInsideWorkState.SUBMIT_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
} else {
message.error('只能提交内部状态为审核通过并且外部状态为待提交的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
rowSelection={rowSelection}
fetchTableData={params => fetchTableData(params)}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 二级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListTwo(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref
} = useSelfTable()
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderReviewedAllTwo)
const handleSubmitBatch = async () => {
const { code } = await run({
ids: rowSelectionCtl.selectedRowKeys
})
if (code === 1000) {
// 清空选中的值
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 二级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementReviewedListTwo(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref
} = useSelfTable()
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const { run, loading } = useHttpRequest(PublicApi.postOrderProcurementOrderReviewedAllTwo)
const handleSubmitBatch = async () => {
const { code } = await run({
ids: rowSelectionCtl.selectedRowKeys
})
if (code === 1000) {
// 清空选中的值
ref.current.reload()
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 一级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderSubmittedReviewOrderOneList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrderOneAll)
const handleBitchPush = async () => {
if (rowSelectionCtl.selectedRowKeys.length > 0) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('请勾选要审核的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 一级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderSubmittedReviewOrderOneList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrderOneAll)
const handleBitchPush = async () => {
if (rowSelectionCtl.selectedRowKeys.length > 0) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('请勾选要审核的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleBitchPush} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 待归档订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderListOfOrdersToBeFiled(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderOfOrdersToBeFiledAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.purchaseOrderInteriorState !== SaleOrderInsideWorkState.FILLING_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('只能批量提交内部状态为待确认归档的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React, { useRef } from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState, SaleOrderInsideWorkState } from '@/constants'
import { useHttpRequest } from '@/hooks/useHttpRequest'
// 待归档订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderListOfOrdersToBeFiled(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const { run, loading } = useHttpRequest(PublicApi.postOrderOfOrdersToBeFiledAll)
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return ;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.purchaseOrderInteriorState !== SaleOrderInsideWorkState.FILLING_ORDER)
if (canBitch) {
const { code } = await run({ids: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
} else {
message.error('只能批量提交内部状态为待确认归档的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 二级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderSubmittedReviewOrderTwoList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref
} = useSelfTable()
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const { run, loading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrderTwoAll)
const handleSubmitBatch = async () => {
const { code } = await run({
ids: rowSelectionCtl.selectedRowKeys
})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
\ No newline at end of file
import React from 'react'
import { history } from 'umi'
import { Card, Button, Space, Dropdown, Menu } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusCircleOutlined, DownOutlined, DeleteOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useHttpRequest } from '@/hooks/useHttpRequest'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
// 二级待审核订单
export interface FirstApprovedOrderProps {}
const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderSubmittedReviewOrderTwoList(params)
return data
}
// TODO
const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
const {
columns,
ref
} = useSelfTable()
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({customKey: 'id'})
const { run, loading } = useHttpRequest(PublicApi.postOrderSubmittedReviewOrderTwoAll)
const handleSubmitBatch = async () => {
const { code } = await run({
ids: rowSelectionCtl.selectedRowKeys
})
if (code === 1000) {
rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([])
ref.current.reload()
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePickerUnix,
Submit
}
},
layouts: {
order: 2,
span: 24
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} loading={loading}>批量提交审核</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
FirstApprovedOrder.defaultProps = {}
export default FirstApprovedOrder
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment