Browse Source

uas手机版
应用列表,判断是否可以新增

RaoMeng 5 years ago
parent
commit
5cade05ebb

+ 19 - 11
uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx

@@ -46,6 +46,7 @@ import { _baseURL, API } from '../../../configs/api.config'
 import { analysisFormData } from '../../../utils/common/form.request'
 import { connect } from 'react-redux'
 import './currency-detail.less'
+import FormEnclosure from '../formNew/FormEnclosure'
 
 const alert = Modal.alert
 const CheckboxItem = Checkbox.CheckboxItem
@@ -179,23 +180,31 @@ class CurrencyDetail extends Component {
                 if (billModel.renderer == 'detailAttach') {
                   itemViewType = 2
                 }
+                //测试
+                if (billModel.sourcetype == 'MF') {
+                  itemViewType = 2
+                }
                 switch (itemViewType) {
                   case 1:
                     formItems.push(
-                      <FormInput billModel={billModel} groupIndex={g}
-                                 childIndex={i}
-                                 baseUrl={_baseURL}
-                                 onTextChange={this.onTextChange.bind(this)}
-                                 onInputClick={this.onInputClick.bind(this)}/>,
+                      <FormInput
+                        billModel={billModel}
+                        groupIndex={g}
+                        childIndex={i}
+                        baseUrl={_baseURL}
+                        onTextChange={this.onTextChange.bind(this)}
+                        onInputClick={this.onInputClick.bind(this)}/>,
                     )
                     break
                   case 2:
                     //附件
-                    /*formItems.push(
-                      <FormEnclosure billModel={billModel} groupIndex={g}
-                                     baseUrl={_baseURL}
-                                     childIndex={i}/>,
-                    )*/
+                    formItems.push(
+                      <FormEnclosure
+                        billModel={billModel}
+                        groupIndex={g}
+                        baseUrl={_baseURL}
+                        childIndex={i}/>,
+                    )
                     break
                   default:
                     break
@@ -658,7 +667,6 @@ class CurrencyDetail extends Component {
           selectModel: billModel,
         })
         Toast.loading('数据请求中', 0)
-        let type = billModel.type
         if (billIsCombo(billModel)) {
           //单项选择
           this.getComboValue(billModel)

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

@@ -6,7 +6,7 @@
 import React, { Component } from 'react'
 import './formCommon.less'
 import { Upload } from 'antd'
-import { isObjNull } from '../../utils/common'
+import { isObjNull } from '../../../utils/common/common.util'
 import { Toast } from 'antd-mobile'
 import { UploadOutlined } from '@ant-design/icons'
 import BillModel from '../../../model/common/BillModel'

+ 2 - 1
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -110,7 +110,8 @@ class FuncItem extends Component {
         window.open(funcObj.url, '_self')
       } else if (funcObj.funcType === FUNC_TYPE_DOC) {
         this.props.history.push(
-          '/serviceList/' + funcObj.caller + '/' + funcObj.name)
+          '/serviceList/' + funcObj.readOnly + '/' + funcObj.caller + '/' +
+          funcObj.name)
       } else if (funcObj.funcType === FUNC_TYPE_REPORT) {
         this.props.history.push(
           '/reportList/' + funcObj.caller + '/' + funcObj.id + '/' +

+ 2 - 1
uas-office-web/uas-mobile/src/configs/router.config.js

@@ -138,7 +138,8 @@ class Routes extends React.Component {
           {/*常用应用管理*/}
           <Route path='/oftenFuncManage' component={OftenFuncManage}/>
           {/*应用数据列表*/}
-          <Route path='/serviceList/:caller/:title?' component={ServiceList}/>
+          <Route path='/serviceList/:readOnly/:caller/:title?'
+                 component={ServiceList}/>
           {/*应用单据详情*/}
           <Route path='/serviceDetail/:id/:caller/:title?'
                  component={ServiceDetail}/>

+ 7 - 5
uas-office-web/uas-mobile/src/pages/private/report/ReportList.jsx

@@ -89,11 +89,13 @@ class ReportList extends Component {
    * 列表点击事件
    */
   onItemClick = (rowData) => {
-    ReactDOM.findDOMNode(this.dl).scrollTop = 0
-    this.setState({
-      detailOpen: true,
-      detailData: rowData,
-    })
+    if (rowData.rowList && rowData.rowList.length > 5) {
+      ReactDOM.findDOMNode(this.dl).scrollTop = 0
+      this.setState({
+        detailOpen: true,
+        detailData: rowData,
+      })
+    }
   }
 
   onOpenChange = () => {

+ 3 - 1
uas-office-web/uas-mobile/src/pages/private/service/ServiceList.jsx

@@ -19,6 +19,8 @@ class ServiceList extends Component {
   componentDidMount () {
     this.caller = this.props.match.params.caller
     this.title = this.props.match.params.title
+    this.readOnly = this.props.match.params.readOnly
+    console.log(typeof this.readOnly)
     document.title = this.title || '单据列表'
   }
 
@@ -39,7 +41,7 @@ class ServiceList extends Component {
             caller: this.props.match.params.caller,
             id: 0,
           }}
-          addAble
+          addAble={this.props.match.params.readOnly === 'false'}
         />
       </div>
     )

+ 1 - 0
uas-office-web/uas-mobile/src/utils/common/form.request.js

@@ -81,6 +81,7 @@ export function getBillGroup (groupItem, groupIndex, isDetail) {
       billModel.readOnly = (fieldItem.readOnly || isDetail)
       billModel.field = fieldItem.field
       billModel.logicType = fieldItem.logicType
+      billModel.findFunctionName = fieldItem.findfunctionname
       billModel.allowBlank = (fieldItem.allowBlank || isDetail)
 
       billModel.value = fieldItem.value

+ 1 - 0
uas-office-web/uas-mobile/src/utils/private/services.util.js

@@ -59,6 +59,7 @@ export const analysisDocList = (response) => {
               img: childItem.icon && childItem.icon.exticon,
               icon: childItem.icon && childItem.icon.deficon,
               often: childItem.often,
+              readOnly: childItem.readOnly,
               url: childItem.url && childItem.url.skipurl,
               countUrl: childItem.url && childItem.url.counturl,
               groupIndex: docFuncGroupList.length,