RaoMeng 5 лет назад
Родитель
Сommit
4726dfe2e3

+ 20 - 16
uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx

@@ -18,7 +18,7 @@ import {
   Modal,
   Checkbox,
   ListView,
-  SearchBar, PullToRefresh,
+  SearchBar,
 } from 'antd-mobile'
 import {
   fetchGet,
@@ -105,6 +105,7 @@ class CurrencyDetail extends Component {
   }
 
   render () {
+    const { isDetail } = this.props
     let formItems = this.getFormItems()
 
     return (
@@ -116,16 +117,18 @@ class CurrencyDetail extends Component {
             {formItems}
           </List>
         </div>
-        {/*{formItems.length > 0 &&*/}
-        {/*<Button type={'primary'}*/}
-        {/*        style={{*/}
-        {/*          margin: '18px 26px',*/}
-        {/*          height: '36px',*/}
-        {/*          lineHeight: '36px',*/}
-        {/*          fontSize: '16px',*/}
-        {/*        }}*/}
-        {/*        onClick={this.onSubmitClick}>提交</Button>}*/}
-        {formItems.length > 0 && this.props.children}
+        {formItems.length > 0
+        && (this.props.children
+          || isDetail
+          || <Button
+            type={'primary'}
+            style={{
+              margin: '18px 26px',
+              height: '36px',
+              lineHeight: '36px',
+              fontSize: '16px',
+            }}
+            onClick={this.onSubmitClick}>提交</Button>)}
         {this.getDbfindModal()}
       </div>
     )
@@ -951,8 +954,8 @@ class CurrencyDetail extends Component {
         if (isObjNull(billModel)) {
           continue
         }
-        if (isObjEmpty(this.getValue(billModel)) && billModel.isdefault ===
-          -1 &&
+        if (isObjEmpty(this.getValue(billModel)) &&
+          billModel.isdefault &&
           (billModel.allowBlank === 'necessaryField'
             || billModel.allowBlank === 'F')) {
           message.error(`${billModel.caption}为必填项`)
@@ -978,7 +981,7 @@ class CurrencyDetail extends Component {
           for (let j = 0; j < gridFields.length; j++) {
             let billModel = gridFields[j]
             if (isObjEmpty(this.getValue(billModel))
-              && billModel.isdefault === -1
+              && billModel.isdefault
               && (billModel.allowBlank === 'necessaryField'
                 || billModel.allowBlank === 'F')) {
               message.error(`${billModel.caption}为必填项`)
@@ -1397,8 +1400,9 @@ class CurrencyDetail extends Component {
     }
   }
 
-  isShow = (billModel) => (billModel.isdefault === -1 && billModel.type !==
-    'H')
+  isShow = (billModel) => (
+    billModel.isdefault && billModel.type !== 'H'
+  )
 
   getAddModel = index => {
     let addBillModel = new BillModel()

+ 1 - 1
uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyList.jsx

@@ -159,6 +159,7 @@ class CurrencyList extends Component {
           onEndReached={hasNextPage ? this.loadDataList : null}
           pageSize={LIST_PAGE_SIZE}
         />
+        {this.props.children}
         {
           addAble && <UasIcon
             type={'uas-add-doc'}
@@ -166,7 +167,6 @@ class CurrencyList extends Component {
             onClick={this.onDocAdd}
           />
         }
-
       </div>
     )
   }

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

@@ -267,7 +267,7 @@ export default class FormInput extends Component {
 
   onInputClick = e => {
     const { billModel } = this.state
-    if (this.isSelect(billModel)) {
+    if (this.isSelect(billModel) && billModel.readOnly === 'F') {
       if (!isObjEmpty(billModel.localDatas)) {
         this.setState({
           modalList: billModel.localDatas,

+ 1 - 0
uas-office-web/uas-mobile/src/configs/antd.config.less

@@ -30,6 +30,7 @@
 .am-list-item .am-list-line .am-list-content {
   font-size: 14px !important;
   color: @com-text-color-normal !important;
+  word-break: break-all;
 }
 
 .am-list-extra {

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

@@ -8,7 +8,7 @@ export default function BillModel (billModel) {
     this.detno = 1000000//序号
     this.length = 0//字符长度
     this.appwidth = 0//宽度
-    this.isdefault = 0//是否显示
+    this.isdefault = false//是否显示
     this.dbfind = ''//是否是dbfind字段判定
     this.caption = ''//字段名称
     this.type = ''//类型(标题类型为Constants.TYPE_TITLE,不触发点击事件等 )
@@ -55,7 +55,7 @@ export default function BillModel (billModel) {
     this.editable = ''//复制字段时要重置
 
     this.isShow = billModel => (
-      billModel.isdefault === -1 && billModel.type === 'H'
+      billModel.isdefault && billModel.type !== 'H'
     )
     if (this.isShow(billModel) == false
       && !isObjEmpty(billModel.renderer)

+ 3 - 2
uas-office-web/uas-mobile/src/pages/private/homePage/DocRoot.jsx

@@ -10,6 +10,7 @@ import FuncGroup from '../../../components/common/func/FuncGroup'
 import { requestServices } from '../../../utils/private/services.util'
 import RefreshLayout
   from '../../../components/common/refreshLayout/RefreshLayout'
+import { PullToRefresh } from 'antd-mobile'
 
 class DocRoot extends Component {
 
@@ -47,13 +48,13 @@ class DocRoot extends Component {
     }
 
     return (
-      <RefreshLayout
+      <PullToRefresh
         direction={'down'}
         refreshing={this.state.refreshing}
         onRefresh={this.refreshFunc}
         className='doc-root'>
         {funcGroupItems}
-      </RefreshLayout>
+      </PullToRefresh>
     )
   }
 

+ 3 - 1
uas-office-web/uas-mobile/src/pages/private/report/ReportList.jsx

@@ -64,7 +64,9 @@ class ReportList extends Component {
             id: 0,
           }}
           addAble={false}
-        />
+        >
+          <div></div>
+        </CurrencyList>
       </div>
     )
   }

+ 9 - 9
uas-office-web/uas-mobile/src/pages/private/service/ServiceAdd.jsx

@@ -36,15 +36,15 @@ class ServiceAdd extends Component {
           caller={this.props.match.params.caller}
           id={this.props.match.params.id}
         >
-          <Button
-            type={'primary'}
-            style={{
-              margin: '12px 26px 16px',
-              height: '36px',
-              lineHeight: '36px',
-              fontSize: '16px',
-            }}
-            onClick={this.onSubmitClick}>提交</Button>
+          {/*<Button*/}
+          {/*  type={'primary'}*/}
+          {/*  style={{*/}
+          {/*    margin: '12px 26px 16px',*/}
+          {/*    height: '36px',*/}
+          {/*    lineHeight: '36px',*/}
+          {/*    fontSize: '16px',*/}
+          {/*  }}*/}
+          {/*  onClick={this.onSubmitClick}>提交</Button>*/}
         </CurrencyDetail>
       </div>
     )