feat(admin): 课堂回访默认当天日期、跟进方式改为下拉选择
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import dayjs from 'dayjs';
|
||||
import { App, Button, DatePicker, Form, Input, Modal, Select, Table } from 'antd';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import { PlusOutlined } from '@ant-design/icons';
|
||||
@@ -8,7 +9,7 @@ import { useApiMutation } from '../../hooks/useApiMutation';
|
||||
import { usePermission } from '../../hooks/usePermission';
|
||||
import PermissionButton from '../PermissionButton';
|
||||
import { EditableArchiveCell } from './EditableArchiveCell';
|
||||
import { RECORD_TYPE_OPTIONS } from './shared';
|
||||
import { FOLLOW_UP_METHOD_OPTIONS, RECORD_TYPE_OPTIONS } from './shared';
|
||||
import type { LearningRecord, TabProps } from './shared';
|
||||
|
||||
const LEARNING_FIELDS = {
|
||||
@@ -123,7 +124,7 @@ export const LearningTab: React.FC<TabProps & { data: LearningRecord[] }> = ({
|
||||
title: '跟进方式',
|
||||
dataIndex: 'followUpMethod',
|
||||
render: (v: string, r) => (
|
||||
<EditableArchiveCell value={v} field={LEARNING_FIELDS.followUpMethod} record={r} onSave={saveCell}>
|
||||
<EditableArchiveCell value={v} field={LEARNING_FIELDS.followUpMethod} record={r} editor="select" options={FOLLOW_UP_METHOD_OPTIONS} onSave={saveCell}>
|
||||
{v || '-'}
|
||||
</EditableArchiveCell>
|
||||
),
|
||||
@@ -156,6 +157,7 @@ export const LearningTab: React.FC<TabProps & { data: LearningRecord[] }> = ({
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
form.resetFields();
|
||||
form.setFieldValue('recordDate', dayjs());
|
||||
setModalOpen(true);
|
||||
}}
|
||||
style={{ marginBottom: 16 }}
|
||||
@@ -203,7 +205,7 @@ export const LearningTab: React.FC<TabProps & { data: LearningRecord[] }> = ({
|
||||
<Input.TextArea rows={4} placeholder="请记录学情内容" />
|
||||
</Form.Item>
|
||||
<Form.Item name="followUpMethod" label="跟进方式">
|
||||
<Input placeholder="如:电话、微信、面谈" />
|
||||
<Select allowClear options={FOLLOW_UP_METHOD_OPTIONS} placeholder="请选择" />
|
||||
</Form.Item>
|
||||
<Form.Item name="nextStep" label="下一步计划">
|
||||
<Input placeholder="后续跟进计划" />
|
||||
|
||||
Reference in New Issue
Block a user