Kaynağa Gözat

Merge branch 'dev' into test

1178232204@qq.com 3 yıl önce
ebeveyn
işleme
264c0a5a91

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

@@ -121,7 +121,7 @@ function EditBlock(props) {
         }
         post(api.dataRepari, params).then((res) => {
             if (res.data.code === 200) {
-                props.userChange()
+                props.userChange(1)
                 message.success(res.data.message);
                 form.resetFields();
             } else {
@@ -131,8 +131,8 @@ function EditBlock(props) {
     }
     //数据对比
     function dataCompare(values) {
-        values.startDate = moment(values.time[0]).format('YYYY-MM-DD 00:00:00');
-        values.endDate = moment(values.time[1]).format('YYYY-MM-DD 23:23:59');
+        values.startDate = moment(values.startDate).format('YYYY-MM-DD 00:00:00');
+        values.endDate = moment(values.endDate).format('YYYY-MM-DD 23:23:59');
         let params = {
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
@@ -140,7 +140,7 @@ function EditBlock(props) {
         }
         post(api.dataCompare, params).then((res) => {
             if (res.data.code === 200) {
-                props.userChange()
+                props.userChange(2)
                 message.success(res.data.message);
                 form.resetFields();
             } else {
@@ -290,7 +290,7 @@ function EditBlock(props) {
                 <Form.Item wrapperCol={type == 3 ? { offset: 24, span: 16 } : { offset: 8, span: 16 }} style={{ marginTop: 15 }}>
                     <Space size="middle" >
                         <Button htmlType="button" onClick={e => cancel()}>
-                            取消
+                            关闭
                         </Button>
                         <Button type="primary" htmlType="submit" disabled={disable && type != 3}>
                             {type == 3 ? '保存' : '确定'}

+ 12 - 3
src/components/BlockLossManage/index.js

@@ -120,9 +120,19 @@ function BlockLossManage() {
         setVisible(false)
         setBlockDetail(null)
     }
-    function userChange() {
+    function userChange(type) {
+        if (type == 2) {
+            params.current = 1
+            setParams(params)
+            setCurrent(1)
+            getBlockLossPage();
+        }
+        setVisible(false)
+        blockLossTypeGather({ startDate: params.startDate, endDate: params.endDate })
+        setBlockDetail(null)
+    }
+    function userChange2() {
         setVisible(false)
-        getBlockLossPage();
         blockLossTypeGather({ startDate: params.startDate, endDate: params.endDate })
         setBlockDetail(null)
     }
@@ -205,7 +215,6 @@ function BlockLossManage() {
             )
         }
     ];
-    // time1: moment(getCurrentDataFront()), time2: moment(getCurrentData())
     return (
         <div className="wrapper">
             <div className="filter-box">

+ 4 - 5
src/components/FieldProblem/editProblem.js

@@ -7,7 +7,6 @@ import BlockContext from './problem-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
 import { getCookie } from '@utils/index'
-const { RangePicker } = DatePicker;
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
 function EditBlock(props) {
@@ -104,8 +103,8 @@ function EditBlock(props) {
     }
     //数据对比
     function dataCheck(values) {
-        values.startDate = moment(values.time[0]).format('YYYY-MM-DD 00:00:00');
-        values.endDate = moment(values.time[1]).format('YYYY-MM-DD 23:23:59');
+        values.startDate = moment(values.startDate).format('YYYY-MM-DD 00:00:00');
+        values.endDate = moment(values.endDate).format('YYYY-MM-DD 23:23:59');
         let params = {
             behospitalCode: values.behospitalCode,
             dateEnd: values.endDate,
@@ -114,7 +113,7 @@ function EditBlock(props) {
         }
         post(api.dataCheck, params).then((res) => {
             if (res.data.code === 200) {
-                props.userChange()
+                props.userChange(1)
                 message.success(res.data.message);
                 form.resetFields();
             } else {
@@ -288,7 +287,7 @@ function EditBlock(props) {
                 <Form.Item wrapperCol={type == 3 ? { offset: 24, span: 16 } : { offset: 8, span: 16 }} style={{ marginTop: 15 }}>
                     <Space size="middle" >
                         <Button htmlType="button" onClick={e => cancel()}>
-                            取消
+                            关闭
                         </Button>
                         <Button type="primary" htmlType="submit" disabled={disable &&  type == 1}>
                             {type == 1 ? '确定' : '保存'}

+ 4 - 3
src/components/FieldProblem/index.js

@@ -10,7 +10,6 @@ import EditProblem from './editProblem';
 import ProblemContext from './problem-context';
 import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
-const { RangePicker } = DatePicker;
 const { Option } = Select;
 function FieldProblem() {
     useEffect(() => {
@@ -123,6 +122,9 @@ function FieldProblem() {
         setProblemDetail(null)
     }
     function userChange() {
+        params.current = 1
+        setParams(params)
+        setCurrent(1)
         setVisible(false)
         getColumnResultPage();
         getColumnResultNumber({ behospitalStartDate: params.behospitalStartDate, behospitalEndDate: params.behospitalEndDate })
@@ -144,9 +146,8 @@ function FieldProblem() {
         getColumnResultPage()
     }
     const onFinish = (value) => {
-        value.behospitalStartDate = moment(value.tbehospitalStartDate).format('YYYY-MM-DD 00:00:00');
+        value.behospitalStartDate = moment(value.behospitalStartDate).format('YYYY-MM-DD 00:00:00');
         value.behospitalEndDate = moment(value.behospitalEndDate).format('YYYY-MM-DD 23:23:59');
-        delete value.time
         const param = {
             ...data,
             ...value,

+ 1 - 1
src/components/FieldRules/addRules.js

@@ -409,7 +409,7 @@ function ContentForm(props) {
                 </Form.Item>
             </Form>
             <div className="button-box">
-                <Button onClick={back}>取消</Button>
+                <Button onClick={back}>关闭</Button>
                 <Button onClick={handleSave} type='primary'>保存</Button>
             </div>
         </>

+ 2 - 3
src/components/RegularManage/addRegular.js

@@ -22,7 +22,6 @@ function EditBlock(props) {
             setVisible(true)
             setTitle('该正则式关联字段校验规则,修改后将同步更新,确认修改?')
         } else {
-            console.log(data);
             addRegular(values)
         }
 
@@ -90,7 +89,7 @@ function EditBlock(props) {
                 <Form.Item wrapperCol={{ offset: 8, span: 16 }} style={{ marginTop: 15 }}>
                     <Space size="middle" >
                         <Button htmlType="button" onClick={e => cancel()}>
-                            取消
+                            关闭
                         </Button>
                         <Button type="primary" htmlType="submit">
                             保存
@@ -101,7 +100,7 @@ function EditBlock(props) {
             <Modal
                 title="提示"
                 okText='确定'
-                cancelText='取消'
+                cancelText='关闭'
                 width={400}
                 visible={visible}
                 onOk={addRegular}