Kaynağa Gözat

审批详情算式字段,计算结果并展示

RaoMeng 6 yıl önce
ebeveyn
işleme
f895b57930

+ 5 - 5
uas-office-web/wxuasapproval/src/components/approvalAdd/FormEnclosure.jsx

@@ -117,7 +117,7 @@ export default class FormEnclosure extends Component {
     const { billModel } = this.state
     if (isObjNull(count) || fileList.length <= count) {
       //{"success":true,"id":"[52650]"}
-      /*let value = ''
+      let value = ''
       if (fileList) {
         fileList.forEach((file, index) => {
           file.enclosureId = (file.response && file.response.id)
@@ -127,9 +127,9 @@ export default class FormEnclosure extends Component {
       }
       billModel.fileList = fileList
       this.setState({ billModel })
-      this.props.onTextChange &&
-      this.props.onTextChange(this.props.groupIndex, this.props.childIndex,
-        value)*/
+      // this.props.onTextChange &&
+      // this.props.onTextChange(this.props.groupIndex, this.props.childIndex,
+      //   value)
     }
   }
 
@@ -142,7 +142,7 @@ export default class FormEnclosure extends Component {
   beforeUpload = (file, fileList) => {
     uploadFail = false
     if (file.size && file.size > 100 * 1024 * 1024) {
-      uploadFail = false
+      uploadFail = true
       Toast.fail('文件大小不能超过100M')
       return false
     }

+ 6 - 0
uas-office-web/wxuasapproval/src/pages/approval/Approval.jsx

@@ -1614,6 +1614,12 @@ class Approval extends Component {
             } else {
               //暂时不做double类型处理
               newValues = renderer
+              try {
+                let mathResult = eval(renderer)
+                newValues = mathResult.toFixed(2)
+              } catch (e) {
+
+              }
             }
 
           } catch (e) {