Commit 47758096 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents cd2566f5 489574eb
...@@ -122,7 +122,7 @@ const EvaluateAdd = (props) => { ...@@ -122,7 +122,7 @@ const EvaluateAdd = (props) => {
} }
}) })
if (totalScoreWeight > 100) { if (totalScoreWeight > 100) {
message.error(`添加的评估项目的权重和为${totalScoreWeight}, 大于100, 请修改`); message.error(`当前添加的评估项目的权重和为${totalScoreWeight}, 大于100, 请修改`);
return return
} }
...@@ -226,7 +226,6 @@ const EvaluateAdd = (props) => { ...@@ -226,7 +226,6 @@ const EvaluateAdd = (props) => {
}); });
const scoreWeight = formActions.getFieldValue(`items.${numberIndex}.scoreWeight`) || 0 const scoreWeight = formActions.getFieldValue(`items.${numberIndex}.scoreWeight`) || 0
const grade = formActions.getFieldValue(`items.${numberIndex}.grade`) || 0; const grade = formActions.getFieldValue(`items.${numberIndex}.grade`) || 0;
console.log(scoreWeight)
formActions.setFieldValue(`items.${numberIndex}.score`, +scoreWeight !== 0 ? scoreWeight * grade / 100 : grade); formActions.setFieldValue(`items.${numberIndex}.score`, +scoreWeight !== 0 ? scoreWeight * grade / 100 : grade);
}) })
} }
...@@ -274,7 +273,7 @@ const EvaluateAdd = (props) => { ...@@ -274,7 +273,7 @@ const EvaluateAdd = (props) => {
return { return {
appraisalDayStart: moment(appraisalDayEnd, 'YYYY-MM-DD'), appraisalDayStart: moment(appraisalDayEnd, 'YYYY-MM-DD'),
appraisalDayEnd: moment(appraisalDayEnd, 'YYYY-MM-DD'), appraisalDayEnd: moment(appraisalDayEnd, 'YYYY-MM-DD'),
selectedProject: selectedProject, selectProject: selectedProject,
items: itmesList, items: itmesList,
...rest, ...rest,
} }
...@@ -287,6 +286,7 @@ const EvaluateAdd = (props) => { ...@@ -287,6 +286,7 @@ const EvaluateAdd = (props) => {
subMemberId: initialValue.subMemberId, subMemberId: initialValue.subMemberId,
subRoleId: initialValue.subRoleId, subRoleId: initialValue.subRoleId,
}]) }])
console.log(initialValue);
} }
}, [initialValue]) }, [initialValue])
......
...@@ -81,6 +81,7 @@ const TobeEvaluateDetail = () => { ...@@ -81,6 +81,7 @@ const TobeEvaluateDetail = () => {
}, [projectColumns, isView]) }, [projectColumns, isView])
const editScore = (record: any) => { const editScore = (record: any) => {
console.log(record);
setEditingScoreData(record); setEditingScoreData(record);
toggle(true); toggle(true);
} }
...@@ -206,12 +207,13 @@ const TobeEvaluateDetail = () => { ...@@ -206,12 +207,13 @@ const TobeEvaluateDetail = () => {
<div className={styles.form}> <div className={styles.form}>
<SchemaForm <SchemaForm
onSubmit={onSubmit} onSubmit={onSubmit}
initialValues={editingScoreData} value={editingScoreData}
schema={modifyEvaluateScore} schema={modifyEvaluateScore}
actions={formActions} actions={formActions}
components={{ components={{
FormilyUploadFiles, FormilyUploadFiles,
ArrayTable, ArrayTable,
FormilyCheckbox
}} }}
/> />
</div> </div>
......
...@@ -38,14 +38,15 @@ export const modifyEvaluateScore: ISchema = { ...@@ -38,14 +38,15 @@ export const modifyEvaluateScore: ISchema = {
sendAppraisal: { sendAppraisal: {
title: '考评人打分', title: '考评人打分',
type: 'string', type: 'string',
editable: false editable: false,
"x-component": 'FormilyCheckbox'
}, },
scoreWeight: { scoreWeight: {
title: '权重', title: '权重',
type: 'string', type: 'string',
'x-rules': [ 'x-rules': [
{ {
pattern: /^((\d+))$/, pattern: /^\d+$/,
message: '请填写整数' message: '请填写整数'
} }
], ],
......
...@@ -133,7 +133,7 @@ const rectificationAddDetail = () => { ...@@ -133,7 +133,7 @@ const rectificationAddDetail = () => {
visible={visible} visible={visible}
onClose={() => toggle(false)} onClose={() => toggle(false)}
width={540} width={540}
title="确认整改结果" title="整改报告"
footer={ footer={
<div style={{ textAlign: 'right'}}> <div style={{ textAlign: 'right'}}>
<Button onClick={() => toggle(false)} style={{ marginRight: 8 }}> <Button onClick={() => toggle(false)} style={{ marginRight: 8 }}>
...@@ -150,7 +150,7 @@ const rectificationAddDetail = () => { ...@@ -150,7 +150,7 @@ const rectificationAddDetail = () => {
actions={formActions} actions={formActions}
onSubmit={handleSubmit} onSubmit={handleSubmit}
components={{FormilyUploadFiles}} components={{FormilyUploadFiles}}
initialValues={formValue} value={formValue}
/> />
</Drawer> </Drawer>
</AnchorPage> </AnchorPage>
......
...@@ -83,7 +83,7 @@ export const rectificationReportSchema: ISchema = { ...@@ -83,7 +83,7 @@ export const rectificationReportSchema: ISchema = {
type: 'object', type: 'object',
'x-component': 'mega-layout', 'x-component': 'mega-layout',
'x-component-props': { 'x-component-props': {
labelCol: 4, labelCol: 5,
labelAlign: 'left', labelAlign: 'left',
full: true, full: true,
}, },
...@@ -102,7 +102,7 @@ export const rectificationReportSchema: ISchema = { ...@@ -102,7 +102,7 @@ export const rectificationReportSchema: ISchema = {
} }
}, },
reportAttachments: { reportAttachments: {
title: "件", title: "整改报告文件",
type: 'array', type: 'array',
'x-component': 'FormilyUploadFiles', 'x-component': 'FormilyUploadFiles',
'x-rules': [ 'x-rules': [
......
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