|
@@ -6,7 +6,7 @@ import type { IndexConfigModel, IndexSourceModel } from '@/services/internalEval
|
|
import { WomanOutlined } from "@ant-design/icons";
|
|
import { WomanOutlined } from "@ant-design/icons";
|
|
import { ProductProps } from "@/sundataImport";
|
|
import { ProductProps } from "@/sundataImport";
|
|
import { deleteRows, getDataList, selectDetailData, updateExistData, createData } from "@/services/internalEvaluation/configuration/indexconfig";
|
|
import { deleteRows, getDataList, selectDetailData, updateExistData, createData } from "@/services/internalEvaluation/configuration/indexconfig";
|
|
-import { countChineseChars } from "../utils/rwacheckutils";
|
|
|
|
|
|
+import { countChineseChars, firstCharIsNotNumber } from "../utils/rwacheckutils";
|
|
import { useModel } from '@umijs/max';
|
|
import { useModel } from '@umijs/max';
|
|
|
|
|
|
type widowRush = {
|
|
type widowRush = {
|
|
@@ -221,6 +221,7 @@ const indexconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
onClick={()=>{
|
|
onClick={()=>{
|
|
setEditType('create');
|
|
setEditType('create');
|
|
setDetailVisible(true);
|
|
setDetailVisible(true);
|
|
|
|
+ setIndexSourceList([]);
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
新增
|
|
新增
|
|
@@ -252,7 +253,22 @@ const indexconfig : React.FC<widowRush> = (prop:widowRush) => {
|
|
formRef={formRef}
|
|
formRef={formRef}
|
|
>
|
|
>
|
|
<SDAreaTtile title='指标配置信息'/>
|
|
<SDAreaTtile title='指标配置信息'/>
|
|
- <SDFormText name="indexNo" readonlyCond="update" required={true} rules={[{required:true},{validator:validateFun.number,message:'请输入数字'}]} label="指标编号"/>
|
|
|
|
|
|
+ <SDFormText name="indexNo" readonlyCond="update"
|
|
|
|
+ rules={[
|
|
|
|
+ { required: true, message: '请输入编号' },
|
|
|
|
+ {
|
|
|
|
+ validator:validateFun.account
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ validator: (rule, value, callback)=> {
|
|
|
|
+ if (firstCharIsNotNumber(value)>0) {
|
|
|
|
+ callback('编号不能以数字开头');
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }]} label="指标编号"/>
|
|
<SDFormText name="indexName" rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]} label="指标名称"/>
|
|
<SDFormText name="indexName" rules={[{validator:validateFun.chineseRex,message:'请输入中文'}]} label="指标名称"/>
|
|
<SDFormText type="textarea" name="indexLogic" label="指标逻辑"/>
|
|
<SDFormText type="textarea" name="indexLogic" label="指标逻辑"/>
|
|
|
|
|