浏览代码

uas手机版
通用表单添加是否显示箭头逻辑

RaoMeng 4 年之前
父节点
当前提交
917b209bf5

+ 25 - 28
uas-office-web/uas-mobile/src/components/common/formNew/FormInput.jsx

@@ -14,12 +14,12 @@ import {
   Checkbox,
   Button,
   DatePickerView,
+  Icon,
 } from 'antd-mobile'
 import {
   formatCurrency,
-  isEmptyObject,
   isObjEmpty,
-  isObjNull, numFormat,
+  numFormat,
 } from '../../../utils/common/common.util'
 import moment, { now } from 'moment'
 import BillModel, {
@@ -116,6 +116,10 @@ export default class FormInput extends Component {
         : 'visibleHidden'}>*
       </div>
       {valueItem}
+      {
+        (!billReadOnly(billModel) && this.props.showArrow) &&
+        <Icon type={'right'} color={'#666666'}/>
+      }
       {billIsSelect(billModel) &&
       <Modal
         visible={modalOpen}
@@ -211,10 +215,6 @@ export default class FormInput extends Component {
           ? false
           : true)}
       disabled={false}
-      // extra={(billModel.readOnly &&
-      //   billModel.editable === 'F' && billIsSelect(billModel))
-      //   ? '>'
-      //   : ''}
       onChange={this.onTextChange}
       onClick={this.onInputClick}
       value={billGetValue(billModel)}
@@ -390,28 +390,25 @@ export default class FormInput extends Component {
     if (billModel.format) {
       value = formatCurrency(value, parseInt(billModel.format))
     }
-    return <InputItem className='form-input-value' clear
-                      placeholder={billReadOnly(billModel)
-                        ? ''
-                        : (billIsSelect(billModel)
-                          ? '请选择'
-                          : '请输入')}
-                      editable={billReadOnly(billModel) ? false : (billIsSelect(
-                        billModel)
-                        ? false
-                        : true)}
-      // extra={(billModel.readOnly  &&
-      //   billModel.editable === 'F' && billIsSelect(billModel))
-      //   ? '>'
-      //   : ''}
-                      onChange={this.onTextChange}
-                      onClick={this.onInputClick}
-                      type={'digit'}
-                      value={(billReadOnly(billModel)
-                        && !isObjEmpty(caption)
-                        && !caption.toLowerCase().endsWith('id'))
-                        ? numFormat(value)
-                        : value}
+    return <InputItem
+      className='form-input-value' clear
+      placeholder={billReadOnly(billModel)
+        ? ''
+        : (billIsSelect(billModel)
+          ? '请选择'
+          : '请输入')}
+      editable={billReadOnly(billModel) ? false : (billIsSelect(
+        billModel)
+        ? false
+        : true)}
+      onChange={this.onTextChange}
+      onClick={this.onInputClick}
+      type={'digit'}
+      value={(billReadOnly(billModel)
+        && !isObjEmpty(caption)
+        && !caption.toLowerCase().endsWith('id'))
+        ? numFormat(value)
+        : value}
     />
   }
 

+ 3 - 1
uas-office-web/uas-mobile/src/pages/private/schedulePage/ConferenceDetail.jsx

@@ -29,6 +29,7 @@ class ConferenceDetail extends Component {
         caption: '与会人员',
         value: '',
         allowBlank: true,
+        readyOnly: false,
       },
       isCheck: true,
       agreedList: [],
@@ -78,7 +79,8 @@ class ConferenceDetail extends Component {
         >
           <FormInput
             billModel={billModel}
-            onInputClick={this.onInputClick.bind(this)}/>
+            onInputClick={this.onInputClick.bind(this)}
+            showArrow/>
         </CurrencyDetail>
 
         <Modal