Browse Source

uas手机版
通用表单bug

RaoMeng 5 years ago
parent
commit
996d93ff5e

+ 23 - 21
uas-office-web/uas-mobile/src/components/common/formNew/FormInput.jsx

@@ -153,28 +153,29 @@ export default class FormInput extends Component {
    * @returns {*}
    */
   getTextCom (billModel) {
-    return <TextareaItem className='form-input-value' autoHeight
-                         placeholder={(billModel.readOnly === 'T' ||
-                           billModel.editable === 'F')
-                           ? ''
-                           : (this.isSelect(billModel)
-                             ? '请选择'
-                             : '请输入')}
-                         clear={true}
-                         editable={(billModel.readOnly === 'T' ||
-                           billModel.editable === 'F')
-                           ? false
-                           : (this.isSelect(billModel)
-                             ? false
-                             : true)}
-                         disabled={false}
+    return <TextareaItem
+      className='form-input-value' autoHeight
+      placeholder={(billModel.readOnly === 'T' ||
+        billModel.editable === 'F')
+        ? ''
+        : (this.isSelect(billModel)
+          ? '请选择'
+          : '请输入')}
+      clear={true}
+      editable={(billModel.readOnly === 'T' ||
+        billModel.editable === 'F')
+        ? false
+        : (this.isSelect(billModel)
+          ? false
+          : true)}
+      disabled={false}
       // extra={(billModel.readOnly === 'T' &&
       //   billModel.editable === 'F' && this.isSelect(billModel))
       //   ? '>'
       //   : ''}
-                         onChange={this.onTextChange}
-                         onClick={this.onInputClick}
-                         value={this.getValue(billModel)}
+      onChange={this.onTextChange}
+      onClick={this.onInputClick}
+      value={this.getValue(billModel)}
     />
   }
 
@@ -331,9 +332,10 @@ export default class FormInput extends Component {
     return false
   }
 
-  getValue = (billModel) => (
-    billModel.value || billModel.defValue || ''
-  )
+  getValue = (billModel) => {
+    const value = billModel.value || billModel.defValue || ''
+    return value.toString()
+  }
 }
 
 const DatePickerCustom = ({ extra, onClick, children }) => (

+ 7 - 5
uas-office-web/uas-mobile/src/configs/api.config.js

@@ -4,9 +4,9 @@
  */
 
 export const _host = window.location.origin
-// && 'http://10.1.7.104:8090/ERP'//吴炳
-// && 'http://10.1.7.44:8081/erp'//吴雨骁
-// && 'http://usoft.f3322.net:10007/uas'
+  // && 'http://10.1.7.104:8090/ERP'//吴炳
+  // && 'http://10.1.7.44:8081/erp'//吴雨骁
+  // && 'http://usoft.f3322.net:10007/uas'
 
 export const _baseURL = _host + (process.env.REACT_APP_ROUTER_BASE_NAME || '')
 
@@ -58,11 +58,13 @@ export const API = {
   //日常任务-确认
   APPCOMMON_DAILYTASKCOMFIRM: _baseURL + '/plm/record/confirmBillTask.action',
   //日常任务-驳回
-  APPCOMMON_DAILYTASKNOCOMFIRM: _baseURL + '/plm/record/noConfirmBillTask.action',
+  APPCOMMON_DAILYTASKNOCOMFIRM: _baseURL +
+    '/plm/record/noConfirmBillTask.action',
   //日常任务-回复
   APPCOMMON_DAILYTASKREPLY: _baseURL + '/plm/record/endBillTask.action',
   //项目任务-提交
-  APPCOMMON_PROJECTCOMMIT: _baseURL + '/mobile/appcommon/submitWorkRecord.action',
+  APPCOMMON_PROJECTCOMMIT: _baseURL +
+    '/mobile/appcommon/submitWorkRecord.action',
 
   /*******************************日程*************************************/
   //日程主界面