Browse Source

问题修改

1178232204@qq.com 3 years ago
parent
commit
f849b5ab17

+ 3 - 3
src/components/BlockLossManage/editBlock.js

@@ -6,7 +6,7 @@ import apiObj from '@api/index';
 import BlockContext from './block-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
-import { disabledDate, getDaysBetween,getValueFromEvent } from '@utils/index'
+import { disabledDate, getDaysBetween, getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
 function EditBlock(props) {
@@ -23,8 +23,8 @@ function EditBlock(props) {
         if (values.startDate > values.endDate) {
             message.warning('开始时间不能大于结束时间');
             return
-        } else if(!limit && getDaysBetween(values.startDate, values.endDate)>30){
-            message.warning('开始时间与结束时间相差不能超过7天');
+        } else if (!limit && getDaysBetween(values.startDate, values.endDate) > 29) {
+            message.warning('开始时间与结束时间相差不能超过30天');
             return
         }
         if (type == 1) {

+ 3 - 2
src/components/FieldProblem/editProblem.js

@@ -20,11 +20,12 @@ function EditBlock(props) {
     const onFinish = values => {
         values.startDate = moment(values.startDate).format('YYYY-MM-DD 00:00:00');
         values.endDate = moment(values.endDate).format('YYYY-MM-DD 23:59:59');
+        console.log(getDaysBetween(values.startDate, values.endDate));
         if (values.startDate > values.endDate) {
             message.warning('开始时间不能大于结束时间');
             return
-        } else if (!limit && getDaysBetween(values.startDate, values.endDate) > 30) {
-            message.warning('开始时间与结束时间相差不能超过7天');
+        } else if (!limit && getDaysBetween(values.startDate, values.endDate) > 29) {
+            message.warning('开始时间与结束时间相差不能超过30天');
             return
         }
         if (type == 1) {

+ 2 - 2
src/components/FieldRules/index.js

@@ -435,9 +435,9 @@ function FieldRules() {
                                 <Input placeholder="标准值" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
-                        <Col span={5} key={6}>
+                        <Col span={6} key={6}>
                             <Form.Item label="正则名称" name="regularName">
-                                <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
+                                <Select showSearch allowClear onSearch={onSearch} placeholder="请选择" style={{ maxWidth: '159px' }}>
                                     {regularList.map((item) => {
                                         return (
                                             <Option value={item.name} key={item.id}>{item.name}</Option>