Browse Source

uas手机版
通用表单,从表多选字段识别为单选类型

RaoMeng 5 years ago
parent
commit
067dfe0bf2

+ 14 - 8
uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx

@@ -5,6 +5,7 @@
 
 import React, { Component } from 'react'
 import {
+  isEmptyObject,
   isObjEmpty,
   isObjNull,
   strContain,
@@ -198,13 +199,13 @@ class CurrencyDetail extends Component {
                     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
@@ -397,7 +398,7 @@ class CurrencyDetail extends Component {
    */
   onDbfindSubmit = (selectModel) => {
     let selectMap = {}
-    mModalList.forEach(item => {
+    mModalList.forEach((item, index) => {
       if (item.isSelected) {
         const selectObj = item.obj
         for (let key in selectObj) {
@@ -407,6 +408,11 @@ class CurrencyDetail extends Component {
             selectMap[key] = selectObj[key]
           }
         }
+      } else if (isEmptyObject(selectMap) &&
+        (index === (mModalList.length - 1))) {
+        for (let key in item.obj) {
+          selectMap[key] = ''
+        }
       }
     })
     this.dbfindRefresh(selectModel, selectMap)

+ 9 - 3
uas-office-web/uas-mobile/src/utils/common/form.request.js

@@ -75,14 +75,20 @@ export function getBillGroup (groupItem, groupIndex, isDetail) {
       billModel.appwidth = fieldItem.appwidth
       billModel.length = fieldItem.length
       billModel.isdefault = fieldItem.isdefault
-      billModel.caption = fieldItem.caption
-      billModel.type = fieldItem.type//前端类型
-      billModel.sourcetype = fieldItem.sourcetype//字段原类型
       billModel.readOnly = (fieldItem.readOnly || isDetail)
       billModel.field = fieldItem.field
       billModel.logicType = fieldItem.logicType
       billModel.findFunctionName = fieldItem.findfunctionname
       billModel.allowBlank = (fieldItem.allowBlank || isDetail)
+      billModel.caption = fieldItem.caption
+
+      billModel.type = fieldItem.type//前端类型
+      billModel.sourcetype = fieldItem.sourcetype//字段原类型
+      if (billModel.type === 'MF' && !billGroup.isForm) {
+        //移动端不支持从表的放大镜多选类型
+        //将多选类型识别为放大镜单选类型
+        billModel.type = 'DF'
+      }
 
       billModel.value = fieldItem.value
       billModel.display = fieldItem.display