Commit e21cfc89 authored by 前端-许佳敏's avatar 前端-许佳敏

script脚本更新

parent 97156771
......@@ -37,7 +37,7 @@ const serviceConfig = {
shopInfo: {
url: '/manage/shop/findShopsBySiteId',
params: {
siteId: 502
siteId: 352
},
method: 'get'
},
......
import React, { ReactElement } from 'react'
import { Dropdown, Button } from 'antd'
import { DownOutlined } from '@ant-design/icons'
export interface DropDeleteDownProps {
children: ReactElement
}
const DropDeleteDown:React.FC<DropDeleteDownProps> = (props) => {
return (
<Dropdown overlay={props.children} trigger={['click']}>
<Button>
更多 <DownOutlined />
</Button>
</Dropdown>
)
}
DropDeleteDown.defaultProps = {}
export default DropDeleteDown
\ No newline at end of file
......@@ -2,7 +2,7 @@ import React from 'react';
import SchemaForm, {
IAntdSchemaFormProps, createVirtualBox, registerVirtualBox, Schema, SchemaField, FormButtonGroup, Reset, createControllerBox, registerValidationRules,
} from '@formily/antd';
import { Button, Space, Row, Col } from 'antd';
import { Button, Space, Row, Col, DatePicker } from 'antd';
import CustomUpload from './components/CustomUpload';
import CustomStatus from './components/CustomStatus';
import CustomAddArray from './components/CustomAddArray';
......@@ -87,6 +87,7 @@ export const componentExport = {
Phone,
SearchSelect,
Input,
DateRangePicker: DatePicker.RangePicker,
TableTagList,
}
const NiceForm: React.FC<NiceFormProps> = props => {
......
// 全局注册虚拟布局组件
import React from 'react'
import { registerVirtualBox, SchemaField } from "@formily/antd"
import { Col, Row } from 'antd'
import { Col, Row, Space } from 'antd'
import cx from 'classnames'
import styled from 'styled-components'
......@@ -54,4 +54,14 @@ registerVirtualBox('empty-layout', (_props) => {
return (
<div>{children}</div>
)
})
// 操作按钮集合
registerVirtualBox('controller-group', (_props) => {
const { children, props } = _props
return (
<Space>
{children}
</Space>
)
})
\ No newline at end of file
import React from 'react'
import { Card } from 'antd'
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 { useReadyAddOrder } from './model/useReadyAddOrder'
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'
// 待新增订单
......@@ -13,19 +20,65 @@ const fetchTableData = async (params) => {
const { data } = await PublicApi.getOrderProcurementStayAddList(params)
return data
}
// TODO
const ReadyAddOrder:React.FC<ReadyAddOrderProps> = (props) => {
const {
columns
} = useReadyAddOrder()
const handleMenuClick = (e) => {
switch(e.key) {
case '1': {
// 批量删除
break;
}
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
columns={columns}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'orderNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePicker: DatePicker.RangePicker,
Submit
}
},
layouts: {
order: 2,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button icon={<PlusCircleOutlined/>} type='primary'>新建</Button>
<Button>批量提交审核</Button>
<DropDeleteDown>
<Menu onClick={(e) => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
批量删除
</Menu.Item>
</Menu>
</DropDeleteDown>
</Space>,
layouts: {
span: 8
}
}}
/>
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const tableListSchema: ISchema = {
type: 'object',
properties: {
orderNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '搜索',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginLeft: 20
}
},
properties: {
orderThe: {
type: 'string',
'x-component-props': {
placeholder: '请输入订单摘要',
}
},
"[startCreateTime,endCreateTime]": {
type: 'array',
"x-component": 'daterangepicker',
'x-component-props': {
placeholder: ['开始时间','结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
\ No newline at end of file
import {action, computed, observable, runInAction} from 'mobx'
import { IChannelProductModule } from '@/module/channelProductModule'; // mobx要用到的数据类型
import { GetProductChannelCommodityGetCommodityListResponseDetail } from '@/services';
/**
* 渠道直采商品
......@@ -8,7 +7,7 @@ import { GetProductChannelCommodityGetCommodityListResponseDetail } from '@/serv
class ChannelProductStore implements IChannelProductModule {
// 选择商品区块
@observable public productSelectRowInStore: GetProductChannelCommodityGetCommodityListResponseDetail = null;
@observable public productSelectRowInStore: any = null;
@observable public priceType: number = null
@observable public productName: string = null
......@@ -22,7 +21,7 @@ class ChannelProductStore implements IChannelProductModule {
// }
@action.bound
public setProductSelectRowInStore(data: GetProductChannelCommodityGetCommodityListResponseDetail) {
public setProductSelectRowInStore(data: any) {
this.productSelectRowInStore = data;
}
......
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