Browse Source

uas手机版
通用表单,附件上传逻辑基础处理

RaoMeng 5 years ago
parent
commit
670772eab3

+ 13 - 12
uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx

@@ -270,18 +270,19 @@ class CurrencyDetail extends Component {
   getDbfindModal () {
     const { modalOpen, modalDataSource, selectModel } = this.state
     let selectType = selectModel.type
-    return <Modal visible={modalOpen}
-                  animationType={'slide-up'}
-                  onClose={() => {
-                    this.setState({
-                      modalOpen: false,
-                    })
-                    if (selectModel.nodeId) {
-                      this.toApprovalDetail(selectModel.nodeId)
-                    }
-                  }}
-                  title={selectModel.caption}
-                  popup
+    return <Modal
+      popup
+      animationType={'slide-up'}
+      visible={modalOpen}
+      onClose={() => {
+        this.setState({
+          modalOpen: false,
+        })
+        if (selectModel.nodeId) {
+          this.toApprovalDetail(selectModel.nodeId)
+        }
+      }}
+      title={selectModel.caption}
     >
       <SearchBar
         placeholder={'搜索'}

+ 29 - 13
uas-office-web/uas-mobile/src/components/common/formNew/FormInput.jsx

@@ -11,7 +11,6 @@ import {
   DatePicker,
   List,
   Modal,
-  Toast,
 } from 'antd-mobile'
 import { isObjEmpty, isObjNull } from '../../../utils/common/common.util'
 import moment from 'moment'
@@ -95,22 +94,25 @@ export default class FormInput extends Component {
       </div>
       {valueItem}
       {billIsSelect(billModel) &&
-      <Modal visible={modalOpen}
-             animationType={'slide-up'}
-             onClose={() => {
-               this.setState({
-                 modalOpen: false,
-               })
-             }}
-             title={billModel.caption}
-             popup
+      <Modal
+        visible={modalOpen}
+        animationType={'slide-up'}
+        onClose={() => {
+          this.setState({
+            modalOpen: false,
+          })
+        }}
+        title={billModel.caption}
+        popup
       >
         <List className='form-common-modal-root'>
           {modalList && (
             modalList.map((modalObj, index) => (
-              <List.Item key={index}
-                         onClick={this.onModalSelect.bind(this,
-                           index)}>{modalObj.value + ''}</List.Item>
+              <List.Item
+                key={index}
+                onClick={this.onModalSelect.bind(this,
+                  index)}>{modalObj.value + ''}
+              </List.Item>
             ))
           )}
         </List>
@@ -217,6 +219,20 @@ export default class FormInput extends Component {
     </DatePicker>
   }
 
+  /**
+   * 日期区间类型
+   * @param type
+   * @param billModel
+   * @returns {*}
+   */
+  getDateRangeCom (type, billModel) {
+    return (
+      <div className='form-input-value'>
+
+      </div>
+    )
+  }
+
   /**
    * 数字类型输入框
    * @returns {*}

+ 2 - 0
uas-office-web/uas-mobile/src/model/common/BillModel.js

@@ -116,6 +116,8 @@ export function billIsSelect (billModel) {
     case 'C':
     case 'D':
     case 'DT':
+    case 'YM':
+    case 'YMD':
     case 'MF':
     case 'SF':
     case 'DF':

+ 22 - 1
uas-office-web/uas-mobile/src/pages/private/homePage/MineRoot.jsx

@@ -7,13 +7,18 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import ProfileCard from '../../../components/private/profile/ProfileCard'
 import ProfileList from '../../../components/private/profile/ProfileList'
+import { List, Calendar } from 'antd-mobile'
+
+const now = new Date()
 
 class MineRoot extends Component {
 
   constructor () {
     super()
 
-    this.state = {}
+    this.state = {
+      show: false,
+    }
   }
 
   componentDidMount () {
@@ -30,6 +35,22 @@ class MineRoot extends Component {
       <div style={{ padding: '0px 5px', width: '100%' }}>
         <ProfileCard/>
         <ProfileList accountName={accountName}/>
+        {/*<List.Item*/}
+        {/*  arrow="horizontal"*/}
+        {/*  onClick={() => {*/}
+        {/*    this.setState({*/}
+        {/*      show: true,*/}
+        {/*    })*/}
+        {/*  }}>日期</List.Item>*/}
+        <Calendar
+          visible={this.state.show}
+          // onCancel={this.onCancel}
+          // onConfirm={this.onConfirm}
+          getDateExtra={this.getDateExtra}
+          defaultDate={now}
+          minDate={new Date(+now - 5184000000)}
+          maxDate={new Date(+now + 31536000000)}
+        />
       </div>
     )
   }