Commit 7a1fa98b authored by GuanHua's avatar GuanHua
parents b05db1f1 ab95f908
......@@ -7,10 +7,12 @@ interface DatePickerSelectPropsType {
startTimeName?: string,
/** 结束时间name */
endTimeName?: string,
/** ononPress */
onPress?: () => void,
}
const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
const { startTimeName, endTimeName } = props;
const { startTimeName, endTimeName, onPress } = props;
const [timeList, setTimeList] = useState<Array<any>>([]);
/**
......@@ -32,11 +34,22 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
const startTimeChange = (val) => {
let time = [...timeList]
time[0] = val
if (onPress) {
if (time[0] && time[1]) {
onPress()
}
}
setTimeList(time)
}
const endStartTimeChange = (val) => {
let time = [...timeList]
time[1] = val
if (onPress) {
if (time[0] && time[1]) {
onPress()
}
}
setTimeList(time)
}
return (
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-20 15:55:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 15:55:10
* @LastEditTime: 2021-11-16 17:44:47
* @Description: 新增换货入库单
*/
import React, { useState } from 'react';
......@@ -46,6 +46,7 @@ const ExchangeAddWarehouseBill = () => {
relatedCount: item.replaceCount,
billCount: item.replaceDeliveryCount,
count: item.replaceDeliveryCount,
billDetailId: item.replaceDetailId,
})),
orderType: res.data.orderType,
});
......@@ -74,6 +75,7 @@ const ExchangeAddWarehouseBill = () => {
brand: item.brand,
unit: item.unit,
count: item.count,
replaceDetailId: item.billDetailId,
})),
}).then((res) => {
if (res.code === 1000) {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-20 15:14:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-15 10:03:04
* @LastEditTime: 2021-11-16 15:00:28
* @Description: 新增换货发货单
*/
import React, { useState } from 'react';
......@@ -45,6 +45,7 @@ const ExchangeAddDeliverBill = () => {
price: item.purchasePrice,
relatedCount: item.replaceCount,
count: item.receiveCount,
billDetailId: item.detailId,
})),
orderType: res.data.orderType,
});
......@@ -73,6 +74,7 @@ const ExchangeAddDeliverBill = () => {
brand: item.brand,
unit: item.unit,
count: item.count,
replaceDetailId: item.billDetailId,
})),
}).then((res) => {
if (res.code === 1000) {
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-20 14:20:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-20 14:20:05
* @LastEditTime: 2021-11-16 17:45:16
* @Description: 新增换货退货入库单
*/
import React, { useState } from 'react';
......@@ -46,6 +46,7 @@ const ExchangeAddWarehouseBill = () => {
relatedCount: item.replaceCount,
billCount: item.replaceDeliveryCount,
count: item.replaceDeliveryCount,
billDetailId: item.replaceDetailId,
})),
orderType: res.data.orderType,
});
......@@ -74,6 +75,7 @@ const ExchangeAddWarehouseBill = () => {
brand: item.brand,
unit: item.unit,
count: item.count,
replaceDetailId: item.billDetailId,
})),
}).then((res) => {
if (res.code === 1000) {
......
......@@ -172,6 +172,7 @@ const Table: React.FC<Iprops> = (props: any) => {
useImperativeHandle(reload, () => ({
reload: () => {
tableRef.current.reload();
selectRowFns.setSelectedRowKeys([]);
}
}));
......
......@@ -55,13 +55,14 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
}
}, [fetchdata])
const handleSummary = () => {
form.setFieldsValue({ 'summary': `${form.getFieldValue('startTime').format('YYYY-MM-DD')}-${form.getFieldValue('endTime').format('YYYY-MM-DD')}需求计划` })
}
return (
<Form {...layout} form={form}>
<Form.Item noStyle shouldUpdate={(prevValues, curValues) => (prevValues.startTime && prevValues.endTime) !== (curValues.startTime && curValues.endTime)}>
{({ getFieldValue }) => {
if (getFieldValue('startTime') && getFieldValue('endTime')) {
form.setFieldsValue({'summary': `${getFieldValue('startTime').format('YYYY-MM-DD')}-${getFieldValue('endTime').format('YYYY-MM-DD')}需求计划`})
}
return (getFieldValue('startTime') && getFieldValue('endTime')) && (
<Form.Item
label="需求计划摘要"
......@@ -80,6 +81,7 @@ const BasicInfo: React.FC<BasicInfoprops> = (props: any) => {
<DatePicker
startTimeName='startTime'
endTimeName='endTime'
onPress={handleSummary}
/>
</Form.Item>
<Form.Item label="需求计划编号" name="needPlanNo">
......
......@@ -76,6 +76,9 @@ const AuditInquiryOne = () => {
</>
)
}];
console.log(rowkeys, 'rowkeys')
return (
<Table
selectedRow
......
......@@ -78,6 +78,9 @@ const AuditInquiryTwo = () => {
</>
)
}];
console.log(rowkeys, 'rowkeys')
return (
<Table
selectedRow
......
......@@ -5,7 +5,7 @@ import { formatTimeString } from '@/utils'
import './index.less'
import cx from 'classnames'
import { ReadyAddOrderDetailContext } from '../../context'
import StatusColors from '../statusColors'
import StatusColors from '../StatusColors'
export interface CirculationRecordProps {}
......
import React from 'react'
import { history } from 'umi'
import { formatTimeString } from '@/utils'
import StatusColors from '../components/statusColors'
import StatusColors from '../components/StatusColors'
import EyePreview from '@/components/EyePreview'
import { ORDER_TYPE_CHANNEL_POINTS, ORDER_TYPE_POINTS } from '@/constants/order'
......
......@@ -4,7 +4,7 @@ import { Row, Col, Progress } from 'antd'
import { PublicApi } from '@/services/api'
import EyePreview from '@/components/EyePreview'
import { formatTimeString } from '@/utils'
import StatusColors from '../../components/statusColors'
import StatusColors from '../../components/StatusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import {
Chart,
......
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