Commit 0d6fbf10 authored by rainbowmorel@163.com's avatar rainbowmorel@163.com

日期提交

parent 7ad7a4ff
......@@ -105,7 +105,7 @@ const config: any = {
],
inlineLimit: 10000,
// chunks: isProduction && ['styles', 'vendors', 'umi', 'services'],
chainWebpack: function(config, { webpack }) {
chainWebpack: function (config, { webpack }) {
// config.plugin('case-sensitive-paths-webpack-plugin').use(CaseSensitivePathsWebpackPlugins)
// config.plugin('antd-dayjs-webpack-plugin').use(AntdDayjsWebpackPlugin)
config.plugin('lodash-webpack-plugin').use(LodashModuleReplacementPlugin)
......@@ -160,7 +160,9 @@ const config: any = {
* 配置主题,实际上是配 less 变量。
*/
theme,
tailwindcss: {
tailwindCssFilePath: '@/tailwind.css'
},
devServer: {
https: false,
}
......
......@@ -21,6 +21,14 @@ const DeliveryNotice = [
hideInMenu: true,
noMargin: true
},
{
/** 送货单新增SRM*/
path: '/memberCenter/order/deliveryNotice/manageSRM/add',
name: '送货单新增(SRM)',
component: '@/pages/order/deliveryNotice/manageSRM/add',
hideInMenu: true,
noMargin: true
},
{
......
......@@ -72,13 +72,12 @@
"@ctrl/tinycolor": "^3.4.0",
"@formily/antd": "^1.3.17",
"@formily/antd-components": "^1.3.17",
"@linkseeks/babel-plugin-yapi-import": "^1.0.0",
"@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.2",
"@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.12",
"@linkseeks/god": "^1.0.0",
"@linkseeks/umi-plugin-yapi": "1.0.1",
"@linkseeks/babel-plugin-yapi-import": "^1.0.0",
"@turf/turf": "^6.4.0",
"@types/crypto-js": "^4.0.1",
"@types/js-cookie": "^2.2.6",
......@@ -86,7 +85,7 @@
"@umijs/plugin-esbuild": "^1.0.1",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"antd": "^4.15.1",
"antd": "4.19.3",
"antd-dayjs-webpack-plugin": "^1.0.6",
"antd-img-crop": "^3.12.0",
"babel-plugin-lodash": "^3.3.4",
......
......@@ -10,10 +10,12 @@ interface DatePickerSelectPropsType {
endTimeName?: string,
/** ononPress */
onPress?: () => void,
/** mode */
mode?: any
}
const intl = getIntl();
const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
const { startTimeName, endTimeName, onPress } = props;
const { startTimeName, endTimeName, onPress, mode = 'date' } = props;
const [timeList, setTimeList] = useState<Array<any>>([]);
/**
......@@ -66,6 +68,7 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
format="YYYY-MM-DD"
onChange={(val) => startTimeChange(val)}
disabledDate={startDisabledDate}
mode={mode}
/>
</Form.Item>
</Col>
......@@ -90,6 +93,7 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
placeholder={intl.formatMessage({ id: 'components.xuanzejieshuriqi' })}
disabledDate={endDisabledDate}
onChange={(val) => endStartTimeChange(val)}
mode={mode}
/>
</Form.Item>
</Col>
......
import { DatePicker } from 'antd';
import moment from 'moment';
import React, { useState } from 'react';
function DatePickerSelect(props) {
const { } = props;
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
return (
<DatePicker {...props} disabledDate={disabledDate} />
)
}
function DatePickerSelectRangePicker(props) {
return (
<DatePicker.RangePicker {...props} />
)
}
DatePickerSelect.RangePicker = DatePickerSelectRangePicker
DatePickerSelect.TimePicker = DatePicker.TimePicker
export default DatePickerSelect;
\ No newline at end of file
export { default as DatePickerSelect } from './DatePickerSelect';
\ No newline at end of file
......@@ -36,7 +36,7 @@ export const OutStatusLabel = '外部状态';
export const DeliveryTypeLabel = '配送方式';
export const OutStatusLogTitleLabel = '外部单据流转记录';
......
import { HarvestMaterialInput } from "../assets/context";
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveryNumColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OredrNumColumn, UntilColumn } from "./table-column";
import { BrandColumn, ClassColumn, ConsigneeNumColumn, DeliveryNumColumn, FlowNoteColumn, FlowOnColumn, FlowOptionsColumn, FlowOptionsTimeColumn, FlowRoleColumn, FlowStatusColumn, MaterialNameColumn, MaterialNoColumn, OrderCreatedAtColumn, OrderNoColumn, OredrNumColumn, UntilColumn } from "./table-column";
export const DeliveryNoteAddFromTableColumn = [
MaterialNoColumn,
......@@ -23,6 +23,16 @@ export const DeliveryNoteAddFromTableColumn = [
}
]
export const OutStatusLogTableColumn = [
FlowOnColumn,
FlowRoleColumn,
FlowStatusColumn,
FlowOptionsColumn,
FlowOptionsTimeColumn,
FlowNoteColumn
]
export const DeliveryNoticeTableColumn = [
{
title: '商品ID',
......
......@@ -53,4 +53,34 @@ export const DeliveryNumColumn = {
export const ConsigneeNumColumn = {
title: '收货数量',
render: (txt, rcoed) => rcoed.ConsigneeNum
}
export const FlowOnColumn = {
title: '流转顺序号',
render: (_, rcode) => rcode.FlowOnColumn
}
export const FlowRoleColumn = {
title: '操作角色',
render: (_, rcode) => rcode.FlowRoleColumn
}
export const FlowStatusColumn = {
title: '状态',
render: (_, rcode) => rcode.FlowStatusColumn
}
export const FlowOptionsColumn = {
title: '操作',
render: (_, rcode) => rcode.FlowOptionsColumn
}
export const FlowOptionsTimeColumn = {
title: '操作时间',
render: (_, rcode) => rcode.FlowOptionsTimeColumn
}
export const FlowNoteColumn = {
title: '备注',
render: (_, rcode) => rcode.FlowNoteColumn
}
\ No newline at end of file
/**
* 订单能力 - 送货单 - 送货单管理详情SRM
* @author: Gavin
* @description: 与B2B内容大致相同,文件分开方便后续对接以及日后变动修改二开
*/
import AnchorPage, { AnchorsItem } from '@/components/AnchorPage'
import React, { useState } from 'react'
import { BillsInfo, BuyerLabel, ConsigneeLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, DeliveryAbstractLabel, DeliveryAddrLabel, DeliveryDateLabel, DeliveryGood, DeliveryInfo, DeliveryNameLabel, DeliveryNoLabel, DeliveryPhoneLabel, DeliverySlefAddrLabel, DeliveryTimeLabel, DeliveryTypeLabel, Distribution, LogisticsCarNoLabel, LogisticsCompanyLabel, LogisticsInfo, LogisticsNoLabel, NoteLabel, OutStatusLabel } from '../../constants'
import { BaseInfo as ContentBox } from '@/components/BaseInfo'
import { Input, Table, Row, Col } from 'antd';
import { DeliveryNoticeTableColumn } from '../../constants/page-table-column';
import { FormItem } from '@/components/FormItem';
import { DatePickerSelect } from '@/components/DatePickerSelect'
import DatePicker from '@/components/DatePicker';
const ContentBoxItem = ContentBox.BaseInfoItem;
const DeliveryNoticeManageSRMDetails: React.FC = () => {
const [anchors, setAnchors] = useState<AnchorsItem[]>([
BillsInfo,
Distribution,
DeliveryInfo,
LogisticsInfo,
DeliveryGood,
])
return (
<AnchorPage title="送货单管理详情(SRM)"
anchors={anchors}
>
<ContentBox title={BillsInfo.name} id={BillsInfo.key}>
<FormItem label={DeliveryAbstractLabel}>
<Input />
</FormItem>
<FormItem label={NoteLabel}>
<Input />
</FormItem>
<FormItem label={BuyerLabel}>
<Input />
</FormItem>
</ContentBox>
<ContentBox title={Distribution.name} id={Distribution.key}>
<FormItem label={DeliveryDateLabel}>
<DatePickerSelect className='w-full' />
</FormItem>
<FormItem label={DeliveryNameLabel}>
<Input />
</FormItem>
<FormItem label={DeliveryTimeLabel}>
<DatePickerSelect.RangePicker className="w-full" picker='time' />
</FormItem>
<FormItem label={DeliveryPhoneLabel}>
<Input />
</FormItem>
</ContentBox>
<ContentBox title={DeliveryInfo.name} id={DeliveryInfo.key}>
<FormItem label={ConsigneeTimeLabel}>
<DatePickerSelect />
</FormItem>
<FormItem label={DeliveryAddrLabel}>
<Input />
</FormItem>
<FormItem label={DeliverySlefAddrLabel}>
</FormItem>
</ContentBox>
<ContentBox title={LogisticsInfo.name} id={LogisticsInfo.key}>
<ContentBoxItem label={DeliveryTypeLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsCarNoLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsCompanyLabel}>
</ContentBoxItem>
<ContentBoxItem label={LogisticsNoLabel}>
</ContentBoxItem>
</ContentBox>
<ContentBox title={DeliveryGood.name} id={DeliveryGood.key} cols={1}>
<Table columns={DeliveryNoticeTableColumn} />
</ContentBox>
</AnchorPage>
)
}
export default DeliveryNoticeManageSRMDetails
\ No newline at end of file
......@@ -37,7 +37,7 @@ const DeliveryNoticeManageSRM: React.FC = () => {
const formActions = createFormActions()
const controllerBtns = (<Space>
<Button type='primary' icon={<PlusOutlined/>}>新增</Button>
<Button type='primary' icon={<PlusOutlined/>} href="/memberCenter/order/deliveryNotice/manageSRM/add">新增</Button>
</Space>)
const renderOptionButton = (record: any) => {
const btnAuthOfOperationTextMap = {
......
......@@ -4,11 +4,11 @@ import { useContext, useState } from "react"
import {
BillsInfo, DeliveryInfo, LogisticsInfo, Harvest, HarvestMaterial,
ReceiptAddLabel, ReceiptAbstractLabel, SupplyMembersLabel, NoteLabel, DeliveryTimeLabel,
ConsigneeLabel, DeliveryAddrLabel, DeliveryOrderNoLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel
ConsigneeLabel, DeliveryAddrLabel, DeliveryOrderNoLabel, ConsigneePhoneLabel, ConsigneeTimeLabel, LogisticsCompanyLabel, LogisticsCarNoLabel, LogisticsNoLabel, OutStatusLogTitleLabel
} from '../../constants'
import { Button, DatePicker, Form, Input, message, Table } from 'antd'
import { FormItem } from '@/components/FormItem'
import { DeliveryNoteAddFromTableColumn } from "../../constants/page-table-column"
import { DeliveryNoteAddFromTableColumn, OutStatusLogTableColumn } from "../../constants/page-table-column"
import { HarvestMaterialMock } from "../../assets/mock/HarvestMaterialMock"
import { HarvestMaterialContext, HarvestMaterialContextProvider } from '../../assets/context'
import { ReceivingNoteAddService } from "../../assets/handles/HandleFormSubmit"
......@@ -44,7 +44,7 @@ function DeliveryNoteAddForm() {
<AnchorPage title={ReceiptAddLabel}
anchors={anchors}
extra={
<Button onClick={() => handleSubmit()}>
<Button onClick={() => handleSubmit()} type="primary">
提交
</Button>
}
......@@ -58,10 +58,8 @@ function DeliveryNoteAddForm() {
<Input />
</FormItem>
<FormItem label={SupplyMembersLabel} name="SupplyMembersLabel" rules={[
{ required: true }
]}>
<Input />
<FormItem label={SupplyMembersLabel} name="SupplyMembersLabel">
<Input disabled />
</FormItem>
<FormItem label={NoteLabel} name="NoteLabel" rules={[
......@@ -73,7 +71,9 @@ function DeliveryNoteAddForm() {
</BaseInfo>
<BaseInfo title={Harvest.name} id={Harvest.key}>
<FormItem label={ConsigneeTimeLabel}>
<FormItem label={ConsigneeTimeLabel} name="ConsigneeTimeLabel" rules={[
{ required: true }
]}>
<DatePicker className="w-full" />
</FormItem>
......@@ -135,6 +135,13 @@ function DeliveryNoteAddForm() {
</HarvestMaterialContextProvider>
</BaseInfo>
<BaseInfo title={OutStatusLogTitleLabel} cols={1}>
<Table className="w-full"
dataSource={[]}
columns={OutStatusLogTableColumn}
/>
</BaseInfo>
</AnchorPage>
)
}
......
@import "tailwindcss/components";
@import "tailwindcss/utilities";
\ No newline at end of file
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