Commit 049e27ad authored by LeeJiancong's avatar LeeJiancong

'物流栈溢出问题'

parent d47152e5
......@@ -3,7 +3,7 @@
* @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-29 10:05:44
* @LastEditTime: 2020-09-29 10:54:58
*/
import React, { Component, useEffect, useRef, useState, ReactNode } from 'react'
......@@ -36,6 +36,7 @@ import {
useFormSpy,
createFormActions
} from '@formily/antd'
import createAscyncActions from '@formily/antd/esm'
import {
Input,
NumberPicker,
......@@ -543,10 +544,11 @@ const Deatail: React.FC<{}> = () => {
const useTabEffect = () => {
const { setFieldValue } = createFormActions()
onFieldValueChange$('detailList').subscribe(({ value }) => {
setFieldValue('detailList', value)
let detailData = value
// setFieldValue('detailList', [...value])
let detailData = [...value]
computedALL(detailData)
})
}
/**
......@@ -555,8 +557,12 @@ const Deatail: React.FC<{}> = () => {
* @return {type}
*/
const computedALL = (data) => {
let _totalCarton = 0, _totalVolume = 0, _totalWeight = 0
if (data && data.length > 0) {
console.log('全部',data)
data.forEach(v => {
if (v.amount && v.carton) {
_totalCarton += Number(v.carton)
......@@ -569,6 +575,7 @@ const Deatail: React.FC<{}> = () => {
}
});
}
setTotalCarton(_totalCarton)
setTotalVolume(_totalVolume)
setTotalWeight(_totalWeight)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment