Commit 44112079 authored by XieZhiXiong's avatar XieZhiXiong

feat: 初始展示领券时间、发券数量

parent ba4ab1d6
......@@ -8,10 +8,10 @@
import React, { useRef } from 'react';
import { Modal } from 'antd';
import ReasonForm, { ReasonValueType, ReasonFormRefHandle } from '../ReasonForm';
import EditForm, { EditSubmitValueType, EditFormRefHandle } from '../EditForm';
import EditForm, { EditSubmitValueType, EditFormRefHandle, EditValueType } from '../EditForm';
export type ActionModalType = 'stop' | 'cancel' | 'startUp' | 'edit';
export type ActionModalValueType = { id: number };
export type ActionModalValueType = { id: number } & Partial<EditValueType>;
interface IProps {
/**
......@@ -96,6 +96,7 @@ const ActionModal: React.FC<IProps> = (props) => {
render: () => (
<EditForm
onSubmit={handleEditSubmit}
value={value as EditValueType}
ref={formRef}
/>
),
......
......@@ -40,6 +40,10 @@ interface IProps {
* 提交触发事件
*/
onSubmit: (values: EditSubmitValueType) => void,
/**
* 值
*/
value: EditValueType,
}
export interface EditFormRefHandle {
......@@ -70,6 +74,7 @@ const EditForm: React.ForwardRefRenderFunction<EditFormRefHandle, IProps> = ((pr
components={{
DatePicker,
}}
value={value}
effects={($, { setFieldState }) => {
}}
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-22 09:49:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-22 14:09:45
* @LastEditTime: 2021-09-30 17:07:20
* @Description: 商家优惠劵查询
*/
import React, { useRef, useState } from 'react';
......@@ -179,7 +179,7 @@ const PlatformCouponQuery: React.FC = () => {
{record.update && (
<Button
type="link"
onClick={() => handleShowActionModal('edit', { id: record.id })}
onClick={() => handleShowActionModal('edit', { id: record.id, releaseTimeStart: moment(record.releaseTimeStart).format('YYYY-MM-DD HH:mm:ss'), releaseTimeEnd: moment(record.releaseTimeEnd).format('YYYY-MM-DD HH:mm:ss'), quantity: `${record.quantity}` })}
>
修改
</Button>
......
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