Commit ccdb038428b7eb7604e5e935e079d1d6ac16a921

Authored by 曾柯
1 parent 66ab58ec

考评组配置及数据导入

src/pages/performance/EvaDataImport/components/Filter.tsx
... ... @@ -75,8 +75,8 @@ export default function Filter({ setParams }: Props) {
75 75 ))}
76 76 </Select>
77 77 <RangePicker
78   - showTime={{ format: "HH:mm:ss" }}
79   - format="YYYY-MM-DD HH:mm:ss"
  78 + // showTime={{ format: "HH:mm:ss" }}
  79 + // format="YYYY-MM-DD HH:mm:ss"
80 80 onChange={onChange}
81 81 style={{ height: 32 }}
82 82 />
... ...
src/pages/performance/EvaDataImport/index.tsx
... ... @@ -14,7 +14,6 @@ const Column = Table.Column;
14 14 export default () => {
15 15 const { loading, list, paginationConfig, setParams, innerParams } = usePagination(evaDataListApi, {
16 16 pageSize: 10,
17   - enable: true,
18 17 });
19 18 const uploadPerson: UploadProps = {
20 19 name: "file",
... ... @@ -54,7 +53,7 @@ export default () =&gt; {
54 53 return (
55 54 <PageHeaderWrapper title="考评数据导入">
56 55 <Card>
57   - <Row style={{ marginBottom: 10 }} justify='space-between'>
  56 + <Row style={{ marginBottom: 10 }} justify="space-between">
58 57 <Filter setParams={setParams} />
59 58 <div>
60 59 <Button type="default" style={{ marginRight: 10 }}>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCommissionParamsModal.tsx
... ... @@ -102,8 +102,9 @@ export default function AddCommissionParamsModal(props: Props) {
102 102 switch (key) {
103 103 case "commissionParams":
104 104 const _options = value || {};
  105 + console.log(_options);
105 106 detail.code = _options.key;
106   - detail.name = _options.label;
  107 + detail.name = _options.label[0];
107 108 detail.code = _options.value;
108 109 break;
109 110 default:
... ... @@ -149,7 +150,7 @@ export default function AddCommissionParamsModal(props: Props) {
149 150 <Form form={form} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} onFinish={handSubmit}>
150 151 <Form.Item name="commissionParams" label="计分指标" rules={[{ required: true, message: "计分指标" }]}>
151 152 <Select
152   - placeholder="选择指标"
  153 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
153 154 labelInValue
154 155 disabled={!!comItem.code}
155 156 onChange={(value, Option: any) => {
... ... @@ -157,7 +158,7 @@ export default function AddCommissionParamsModal(props: Props) {
157 158 setItemId(Option.key);
158 159 setId(Option.key);
159 160 setIndicatorName(Option.children);
160   - setParamAlias(Option.children);
  161 + setParamAlias(Option.name);
161 162 setCodeType(Option.codeType);
162 163 setDataType(Option.dataType);
163 164 }}
... ... @@ -171,8 +172,9 @@ export default function AddCommissionParamsModal(props: Props) {
171 172 targetType={item.targetType}
172 173 dataType={item.dataType}
173 174 codeType={item.codeType}
  175 + name={item.name}
174 176 >
175   - {item.name}
  177 + {item.name}{item.codeType == 2 ? '*' : ''}
176 178 </Option>
177 179 ))}
178 180 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCommissionParamsModalSal.tsx
... ... @@ -102,7 +102,7 @@ export default function AddCommissionParamsModal(props: Props) {
102 102 case "commissionParams":
103 103 const _options = value || {};
104 104 detail.code = _options.key;
105   - detail.name = _options.label;
  105 + detail.name = _options.label[0];
106 106 detail.code = _options.value;
107 107 break;
108 108 default:
... ... @@ -148,7 +148,7 @@ export default function AddCommissionParamsModal(props: Props) {
148 148 <Form form={form} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} onFinish={handSubmit}>
149 149 <Form.Item name="commissionParams" label="计分指标" rules={[{ required: true, message: "计分指标" }]}>
150 150 <Select
151   - placeholder="选择指标"
  151 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
152 152 labelInValue
153 153 disabled={!!comItem.code}
154 154 onChange={(value, Option: any) => {
... ... @@ -156,7 +156,7 @@ export default function AddCommissionParamsModal(props: Props) {
156 156 setItemId(Option.key);
157 157 setId(Option.key);
158 158 setIndicatorName(Option.children);
159   - setCommissionParamAlias(Option.children);
  159 + setCommissionParamAlias(Option.name);
160 160 setCodeType(Option.codeType);
161 161 setDataType(Option.dataType);
162 162 }}
... ... @@ -170,8 +170,10 @@ export default function AddCommissionParamsModal(props: Props) {
170 170 targetType={item.targetType}
171 171 dataType={item.dataType}
172 172 codeType={item.codeType}
  173 + name={item.name}
173 174 >
174 175 {item.name}
  176 + {item.codeType == 2 ? "*" : ""}
175 177 </Option>
176 178 ))}
177 179 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCondModal.tsx
... ... @@ -99,7 +99,7 @@ export default function AddCondModal(props: Props) {
99 99 switch (key) {
100 100 case "conds":
101 101 const _options = value || {};
102   - detail.name = _options.label;
  102 + detail.name = _options.label[0];
103 103 detail.code = _options.value;
104 104 break;
105 105 default:
... ... @@ -153,7 +153,7 @@ export default function AddCondModal(props: Props) {
153 153 >
154 154 <Form.Item name="conds" label="前置条件配置" rules={[{ required: true, message: "前置条件配置" }]}>
155 155 <Select
156   - placeholder="选择指标"
  156 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
157 157 labelInValue
158 158 disabled={!!comItem.code}
159 159 onChange={(value, Option: any) => {
... ... @@ -163,7 +163,7 @@ export default function AddCondModal(props: Props) {
163 163 // 列表id
164 164 setId(Option.key);
165 165 setIndicatorName(Option.children);
166   - setPreconditionAlias(Option.children);
  166 + setPreconditionAlias(Option.name);
167 167 setCodeType(Option.codeType);
168 168 setDataType(Option.dataType);
169 169 }}
... ... @@ -171,8 +171,16 @@ export default function AddCondModal(props: Props) {
171 171 optionFilterProp="children"
172 172 >
173 173 {newIndicators.map((item) => (
174   - <Option value={item.code} key={item.id} targetType={item.targetType} codeType={item.codeType} dataType={item.dataType}>
  174 + <Option
  175 + value={item.code}
  176 + key={item.id}
  177 + targetType={item.targetType}
  178 + codeType={item.codeType}
  179 + dataType={item.dataType}
  180 + name={item.name}
  181 + >
175 182 {item.name}
  183 + {item.codeType == 2 ? "*" : ""}
176 184 </Option>
177 185 ))}
178 186 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddCondModalSal.tsx
... ... @@ -97,7 +97,7 @@ export default function AddCondModal(props: Props) {
97 97 switch (key) {
98 98 case "conds":
99 99 const _options = value || {};
100   - detail.name = _options.label;
  100 + detail.name = _options.label[0];
101 101 detail.code = _options.value;
102 102 break;
103 103 default:
... ... @@ -151,7 +151,7 @@ export default function AddCondModal(props: Props) {
151 151 >
152 152 <Form.Item name="conds" label="前置条件配置" rules={[{ required: true, message: "前置条件配置" }]}>
153 153 <Select
154   - placeholder="选择指标"
  154 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
155 155 labelInValue
156 156 disabled={!!comItem.code}
157 157 onChange={(value, Option: any) => {
... ... @@ -161,7 +161,7 @@ export default function AddCondModal(props: Props) {
161 161 // 列表id
162 162 setId(Option.key);
163 163 setIndicatorName(Option.children);
164   - setPreconditionAliasSal(Option.children);
  164 + setPreconditionAliasSal(Option.name);
165 165 setCodeType(Option.codeType);
166 166 setDataType(Option.dataType);
167 167 }}
... ... @@ -175,8 +175,10 @@ export default function AddCondModal(props: Props) {
175 175 targetType={item.targetType}
176 176 codeType={item.codeType}
177 177 dataType={item.dataType}
  178 + name={item.name}
178 179 >
179 180 {item.name}
  181 + {item.codeType == 2 ? "*" : ""}
180 182 </Option>
181 183 ))}
182 184 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddEvaGroupModal.tsx
... ... @@ -238,7 +238,7 @@ export default function AddIndicatorsModal(props: Props) {
238 238 >
239 239 {({ getFieldValue }) =>
240 240 getFieldValue("scopeType") === 2 ? (
241   - <Form.Item name="role" label="管理角色" rules={[{ required: true, message: "请选择管理角色" }]}>
  241 + <Form.Item name="role" label="门店奖惩分配" rules={[{ required: true, message: "请选择管理角色" }]}>
242 242 <Select
243 243 labelInValue
244 244 placeholder="请选择管理角色"
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddLadderParamsModal.tsx
... ... @@ -96,7 +96,7 @@ export default function AddLadderParamsModal(props: Props) {
96 96 switch (key) {
97 97 case "ladderParams":
98 98 const _options = value || {};
99   - detail.name = _options.label;
  99 + detail.name = _options.label[0];
100 100 detail.code = _options.value;
101 101 break;
102 102 default:
... ... @@ -147,7 +147,7 @@ export default function AddLadderParamsModal(props: Props) {
147 147 <Form form={form} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} onFinish={handSubmit}>
148 148 <Form.Item name="ladderParams" label="计分指标" rules={[{ required: true, message: "计分指标" }]}>
149 149 <Select
150   - placeholder="选择指标"
  150 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
151 151 labelInValue
152 152 disabled={!!comItem.code}
153 153 onChange={(value, Option: any) => {
... ... @@ -155,7 +155,7 @@ export default function AddLadderParamsModal(props: Props) {
155 155 setItemId(Option.key);
156 156 setId(Option.key);
157 157 setIndicatorName(Option.children);
158   - setParamAlias(Option.children);
  158 + setParamAlias(Option.name);
159 159 setDataType(Option.dataType);
160 160 setCodeType(Option.codeType);
161 161 }}
... ... @@ -169,8 +169,10 @@ export default function AddLadderParamsModal(props: Props) {
169 169 targetType={item.targetType}
170 170 dataType={item.dataType}
171 171 codeType={item.codeType}
  172 + name={item.name}
172 173 >
173 174 {item.name}
  175 + {item.codeType == 2 ? "*" : ""}
174 176 </Option>
175 177 ))}
176 178 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/AddLadderParamsModalSal.tsx
... ... @@ -96,7 +96,7 @@ export default function AddLadderParamsModal(props: Props) {
96 96 switch (key) {
97 97 case "ladderParams":
98 98 const _options = value || {};
99   - detail.name = _options.label;
  99 + detail.name = _options.label[0];
100 100 detail.code = _options.value;
101 101 break;
102 102 default:
... ... @@ -147,7 +147,7 @@ export default function AddLadderParamsModal(props: Props) {
147 147 <Form form={form} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} onFinish={handSubmit}>
148 148 <Form.Item name="ladderParams" label="计分指标" rules={[{ required: true, message: "计分指标" }]}>
149 149 <Select
150   - placeholder="选择指标"
  150 + placeholder="选择指标(*为考评指标,无*为绩效指标)"
151 151 labelInValue
152 152 disabled={!!comItem.code}
153 153 onChange={(value, Option: any) => {
... ... @@ -155,7 +155,7 @@ export default function AddLadderParamsModal(props: Props) {
155 155 setItemId(Option.key);
156 156 setId(Option.key);
157 157 setIndicatorName(Option.children);
158   - setLadderParamAlias(Option.children);
  158 + setLadderParamAlias(Option.name);
159 159 setDataType(Option.dataType);
160 160 setCodeType(Option.codeType);
161 161 }}
... ... @@ -169,8 +169,10 @@ export default function AddLadderParamsModal(props: Props) {
169 169 targetType={item.targetType}
170 170 dataType={item.dataType}
171 171 codeType={item.codeType}
  172 + name={item.name}
172 173 >
173 174 {item.name}
  175 + {item.codeType == 2 ? "*" : ""}
174 176 </Option>
175 177 ))}
176 178 </Select>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/components/RankModal.tsx
... ... @@ -405,7 +405,7 @@ const TotalAmount = ({
405 405 }}
406 406 />
407 407 </Form>
408   - <div>金额可为负数</div>
  408 + <div>金额可为负数,负数为负激励</div>
409 409 </Modal>
410 410 ) : (
411 411 <>
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/index.tsx
... ... @@ -36,6 +36,7 @@ function Index(props: Props) {
36 36 setParamAlias,
37 37 setSubmit,
38 38 calType,
  39 + loading
39 40 } = useStore();
40 41  
41 42 const [form] = Form.useForm();
... ... @@ -117,7 +118,7 @@ function Index(props: Props) {
117 118 }
118 119  
119 120 return (
120   - <PageHeaderWrapper title="考评组配置">
  121 + <PageHeaderWrapper title="考评组配置" loading={loading}>
121 122 <Card>
122 123 {detailError ? (
123 124 <Result status="warning" title={detailError} />
... ...
src/pages/performance/EvaGroupSetting/EditComfirm/store.ts
... ... @@ -13,6 +13,7 @@ export default function useStore() {
13 13 data,
14 14 errMsg: detailError,
15 15 setParams,
  16 + loading,
16 17 } = useInitail(submit == 1 ? api.queryDetailListApi : api.draftQueryDetailListApi, {}, {}, delay);
17 18 const [readOnly, setReadOnly] = useState(false);
18 19 // 存储选择计算方式
... ... @@ -75,5 +76,6 @@ export default function useStore() {
75 76 setPreconditionAliasSal,
76 77 calType,
77 78 setCalType,
  79 + loading,
78 80 };
79 81 }
... ...
src/pages/performance/EvaSetting/components/EditModal.tsx
... ... @@ -203,7 +203,7 @@ export default function EditModal({ onClose, setItem, item, roleList }: Props) {
203 203 { pattern: /^(?:[1-9]|[1-2]\d|3[0-1])$/, message: "请输入1至31的正整数" },
204 204 ]}
205 205 >
206   - <InputNumber placeholder="请输入滚动天数" addonAfter="天" style={{ width: 1014 }} />
  206 + <InputNumber placeholder="请输入滚动天数" addonAfter="天" style={{ width: 567 }} />
207 207 </Form.Item>
208 208 </>
209 209 );
... ...
src/pages/performance/KpiGroupSetting/EditComfirm/index.tsx
... ... @@ -39,6 +39,7 @@ function Index(props: Props) {
39 39 paramAlias,
40 40 setParamAlias,
41 41 setSubmit,
  42 + loading
42 43 } = useStore();
43 44  
44 45 const [form] = Form.useForm();
... ... @@ -156,7 +157,7 @@ function Index(props: Props) {
156 157 };
157 158  
158 159 return (
159   - <PageHeaderWrapper title="绩效组配置">
  160 + <PageHeaderWrapper title="绩效组配置" loading={loading}>
160 161 <Card>
161 162 {detailError ? (
162 163 <Result status="warning" title={detailError} />
... ...
src/pages/performance/KpiGroupSetting/EditComfirm/store.ts
... ... @@ -9,7 +9,7 @@ export default function useStore() {
9 9 const [submit, setSubmit] = useState<number>(1);
10 10 const { list: postList } = usePagination(getAllPostListApi, { pageSize: 999 }, {});
11 11 const [delay, setDelay] = useState(true);
12   - const { data, errMsg: detailError, setParams } = useInitail(submit == 1 ? api.queryDetailListApi : api.draftQueryDetailListApi, {}, {}, delay);
  12 + const { data, errMsg: detailError, setParams, loading } = useInitail(submit == 1 ? api.queryDetailListApi : api.draftQueryDetailListApi, {}, {}, delay);
13 13 const [readOnly, setReadOnly] = useState(false);
14 14  
15 15 // 保存已经配置过阶梯的指标的id
... ... @@ -42,5 +42,6 @@ export default function useStore() {
42 42 selectedIndicatorsLadder,
43 43 setSelectedIndicatorsLadder, //台阶条件指标库
44 44 setSubmit,
  45 + loading,
45 46 };
46 47 }
... ...