Commit e9fec2f9 authored by GuanHua's avatar GuanHua
parents f7d7a504 98b39cb0
import React, { useRef, useEffect, useMemo } from 'react'
import { Select } from 'antd';
import moment from 'moment'
export enum DATE_SELECT_TYPE {
TODAY,
WITHIN_WEEK,
WITHIN_MONTH,
WITHIN_THREE_MONTH,
WITHIN_SIX_MONTH,
WITHIN_YEAR,
A_YEAR_AGO
}
const getPrevTime = (num, flag) => {
return moment().subtract(num, flag).valueOf()
}
const DateSelect = (props) => {
const { value = [], mutators } = props
const todayStartTime = moment().startOf('day').format('x')
const nowTime = moment().format('x').valueOf()
const dateMemo = useMemo(() => [
{ label: '今天', value: `${todayStartTime},${nowTime}`},
{ label: '一周内', value: `${getPrevTime(1, 'week')},${nowTime}`},
{ label: '一月内', value: `${getPrevTime(1, 'month')},${nowTime}`},
{ label: '三月内', value: `${getPrevTime(3, 'month')},${nowTime}`},
{ label: '六月内', value: `${getPrevTime(6, 'month')},${nowTime}`},
{ label: '一年内', value: `${getPrevTime(1, 'year')},${nowTime}`},
{ label: '一年前', value: `0,${getPrevTime(1, 'year')}`},
], [])
const handleChange = (e) => {
mutators.change(e.split(','))
}
const { placeholder, dataSource = dateMemo } = props.props["x-component-props"] || {}
return (
<Select
style={{minWidth: 160}}
placeholder={placeholder}
onChange={handleChange}
value={value.join()}
options={dataSource}
/>
)
}
DateSelect.defaultProps = {}
DateSelect.isFieldComponent = true;
export default DateSelect
\ No newline at end of file
......@@ -23,6 +23,7 @@ import SearchSelect from './components/SearchSelect';
import TableTagList from './components/TableTagList';
import './index.less'
import { Checkbox } from '@formily/antd-components';
import DateSelect from './components/DateSelect';
export interface NiceFormProps extends IAntdSchemaFormProps {}
......@@ -88,6 +89,7 @@ export const componentExport = {
SearchSelect,
DateRangePicker: DatePicker.RangePicker,
TableTagList,
DateSelect
}
const NiceForm: React.FC<NiceFormProps> = props => {
const { children, components, ...reset } = props;
......
......@@ -114,6 +114,7 @@ export default {
'menu.tranactionAbility.enquirySubmit.addEnquiry': '新增需求单',
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail': '需求单详情',
'menu.tranactionAbility.enquirySubmit.enquiryOne': '待审核报价单(一级)',
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail': '需求报价单',
'menu.tranactionAbility.enquirySubmit.enquiryTwo': '待审核报价单(二级)',
'menu.tranactionAbility.purchaseOrder': '采购订单',
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch': '订单查询',
......
......@@ -34,7 +34,7 @@ const User: React.FC = () => {
<div className={'adBox'}>
{/*<img src={leftPicture} alt="数商云"/>*/}
<h2>欢迎来到数商云</h2>
<p>数商云是知名云计算及数据服务提供商,在海量文件存储、CDN 内容分发、视频点播、互动直播及大规模异构数据的智能分析与处理等技术深度投入,致力以数据科技驱动数字化未来,赋能各行业全面进入数据时代</p>
<p>广州市数商云网络科技有限公司(软件企业编号:粤RO-2018-0284 | 高新科技企业编号:GR201844008227),简称「数商云」,是一家领先的企业全链数字化运营服务提供商。致力于通过大数据、云计算等新技术协助企业打造渠道端—营销端—数据端等全链数字化运营体系,全面提升企业运营效益与智慧数字化商业转型。自2013年成立以来,数商云致力于提供企业数字化运营产品及解决方案。目前,数商云拥有数商云贸、数商云销、数商云批、数商云MA、数商云DMP五大产品,分别为企业提供大型B2B供应链电商系统开发、企业级B2C电商系统开发、批发销售管理系统、大数据营销自动化、大数据管理平台全链数字化运营解决方案</p>
</div>
</Col>
<Col className={cx('loginItem', 'loginCtl')}>
......
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