Commit 1846d07c authored by Bill's avatar Bill

fix: 修改会员bug

parent a831cc6d
......@@ -517,6 +517,12 @@ const MemberRoute: RouterChild = {
hideInMenu: true,
},
{
path: '/memberCenter/memberAbility/profile/suggestion/edit',
name: '新增会员反馈',
component: "@/pages/member/memberQuery/suggest/add",
hideInMenu: true,
},
{
path: '/memberCenter/memberAbility/profile/suggestion/detail',
name: '会员反馈详情',
component: "@/pages/member/memberQuery/suggest/detail",
......
......@@ -65,7 +65,7 @@ export const handleFormSchema: ISchema = {
},
handleUserEditPhone: {
type: 'string',
title: '提出人电话',
title: '处理人电话',
// 'x-component': 'FormilyCountryPhone',
"x-component-props": {},
// enum: [
......
......@@ -104,7 +104,8 @@ const TobeEvaluateDetail = () => {
title={`事件主题:${initialValue?.subject}`}
anchors={headers}
extra={
<Button type="primary" onClick={onSubmitRes}>处理结果信息</Button>
initialValue?.handleResult === null &&
( <Button type="primary" onClick={onSubmitRes}>处理结果信息</Button> ) || null
}
>
<CustomizeColumn id="detail" data={basicInfo} title="投诉建议信息" column={3} />
......
......@@ -23,8 +23,10 @@ import { PublicApi } from '@/services/api';
import EvaluateProject from '../components/EvaluateProject';
import useInitialValue from '../../common/hooks/useInitialValue';
import { usePageStatus } from '@/hooks/usePageStatus';
import createRichTextUtils from '@/components/RangeTime/createRichText';
const formActions = createFormActions()
const { help, text } = createRichTextUtils();
const { onFieldValueChange$ } = FormEffectHooks
type ProjectDataType = {
......@@ -153,8 +155,8 @@ const EvaluateAdd = (props) => {
const handleRemove = (index: number) => {
const dataSource = formActions.getFieldValue('tabs.tab-2.items') || [];
const target = dataSource[index];
if(target.type !== 0) {
// 表示他是来自于系统的
if(target.type && target.type !== 0) {
// 表示他是来自于系统的
const projectDataSource = formActions.getFieldValue('tabs.tab-2.selectProject')
const newProjectKeys = projectDataSource.filter((_item) => _item.type !== target.type);
formActions.setFieldValue('tabs.tab-2.selectProject', newProjectKeys);
......@@ -339,7 +341,9 @@ const EvaluateAdd = (props) => {
</div>
) : null,
renderListTableRemove,
fetchUserData: fetchUserData
fetchUserData: fetchUserData,
help,
text,
}}
effects={handleEffect}
/>
......
......@@ -70,9 +70,12 @@ export const evaluateAddSchema: ISchema = {
display: false,
},
'[appraisalDayStart, appraisalDayEnd]': {
title: <div>考评时间 <span style={{color: '#ff4d4f', fontSize: '16px', marginLeft: '4px', fontWeight: 600}}>*</span></div>,
title: <div>考评时间 <span style={{color: '#ff4d4f', fontSize: '16px', marginLeft: '4px'}}>*</span></div>,
type: 'object',
"x-component": 'FormilyRangeTime',
"x-component-props": {
shouldGtCurrent: false
},
"x-rules": [
{
required: true,
......@@ -213,7 +216,7 @@ export const evaluateAddSchema: ISchema = {
]
},
sendAppraisal: {
title: "考评人打分",
title: "{{ text('考评人打分',help('需要考评人进行线上考评打分')) }}",
type: 'string',
'x-component': 'FormilyCheckbox',
"x-props": {
......
......@@ -107,12 +107,12 @@ export const evaluateScoreRes: ISchema = {
]
},
notifyMember: {
title: "{{ text('通知考评结果',help('将考评结果通知给考察对象')) }}",
title: "{{ text('通知考评结果',help('通知会员查收考评结果')) }}",
type: "string",
'x-component': 'FormilyCheckbox',
},
resultAttachments: {
title: '考评模板',
title: '附件',
type: 'object',
'x-component': 'FormilyUploadFiles',
'x-component-props': {
......
......@@ -68,7 +68,7 @@ const rectificationAddDetail = () => {
const handleSubmit = async (value: { reportDigest: string, reportAttachments: { name: string, url: string }[] }) => {
setSubmitLoading(true)
const { data, code } = await PublicApi.postMemberRectifyManageUpdateReport({
id: id,
id: +id,
reportDigest: value.reportDigest,
reportAttachments: value.reportAttachments.map((_row) => ({
name: _row.name,
......@@ -82,6 +82,11 @@ const rectificationAddDetail = () => {
}
}
const formValue = {
reportDigest: initialValue?.reportDigest,
reportAttachments: initialValue?.reportAttachments || []
}
return (
<Spin spinning={loading}>
<AnchorPage
......@@ -143,6 +148,7 @@ const rectificationAddDetail = () => {
actions={formActions}
onSubmit={handleSubmit}
components={{FormilyUploadFiles}}
initialValues={formValue}
/>
</Drawer>
</AnchorPage>
......
......@@ -37,10 +37,10 @@ const List: React.FC<Iprops> = (props: Iprops) => {
<Space>
<Popconfirm placement="top" title={"是否确认整改?"} onConfirm={() => handleSendNotice(record.id)} >
<Spin spinning={isloading}>
<a>整改</a>
<a>提交整改</a>
</Spin>
</Popconfirm>
<Link to={`/memberCenter/memberAbility/profile/memberRectification/edit?id=${record.id}`}></Link>
<Link to={`/memberCenter/memberAbility/profile/memberRectification/edit?id=${record.id}`}>进行整</Link>
</Space>
)
}
......
......@@ -103,7 +103,7 @@ export const rectificationReportSchema: ISchema = {
},
reportAttachments: {
title: <div>附件 <span style={{color: '#FF4D4F'}}>*</span></div>,
type: 'object',
type: 'array',
'x-component': 'FormilyUploadFiles',
'x-rules': [
{
......
import React, { useCallback, useRef, useState } from 'react';
import { Card, Space, Button, Spin } from 'antd'
import { Card, Space, Button, Spin, Popconfirm } from 'antd'
import { setColumnsByLinks } from '../common/columns/queryColumns';
import { rectificationListSchema } from '../common/schema';
import useFetchList from '../../memberEvaluate/hooks/useFetchList';
......@@ -37,9 +37,11 @@ const List: React.FC<Iprops> = (props: Iprops) => {
<a onClick={() => handleSendNotice(record.id, "send")}>发送整改通知</a>
</Spin>
<Link to={`/memberCenter/memberAbility/memberRectification/rectificationAdd/edit?id=${record.id}`}>修改</Link>
<Spin spinning={loading}>
<a onClick={() => handleSendNotice(record.id, "remove")}>删除</a>
</Spin>
<Popconfirm placement="top" title={"是否确认删除"} onConfirm={() => handleSendNotice(record.id, "remove")}>
<Spin spinning={loading}>
<a>删除</a>
</Spin>
</Popconfirm>
</Space>
)
}
......
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