Commit b17718de authored by LeeJiancong's avatar LeeJiancong

'新建物流计算'

parent b4834b24
......@@ -3,7 +3,7 @@
* @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-26 17:37:12
* @LastEditTime: 2020-09-29 10:05:44
*/
import React, { Component, useEffect, useRef, useState, ReactNode } from 'react'
......@@ -326,7 +326,8 @@ const Deatail: React.FC<{}> = () => {
}
})
return
} else {//订单
}
if(query.invoicesId){//订单
PublicApi.getOrderLogisticsOrderList({
current: '1',
pageSize: '100000'
......@@ -340,9 +341,6 @@ const Deatail: React.FC<{}> = () => {
}
})
}
}
return () => {
......@@ -628,6 +626,22 @@ const Deatail: React.FC<{}> = () => {
*/
const handleConfirmProduct = () => {
console.log('goodRowCtl', goodRowCtl)
let list = [...goodRowCtl.selectRow]
list.forEach((val:any) => {
if(!val.hasOwnProperty('amount')){
val['amount'] = null
}
if(!val.hasOwnProperty('carton')){
val['carton'] = null
}
if(!val.hasOwnProperty('weight')){
val['weight'] = null
}
if(!val.hasOwnProperty('volume')){
val['volume'] = null
}
})
actions.setFieldValue("detailList", goodRowCtl.selectRow)
setvisibleObj({ ...visibleObj, ModalSeletOrder3: false })
}
......@@ -781,13 +795,13 @@ const Deatail: React.FC<{}> = () => {
</Row>
{state.value.map((item: any, index: any) => {
const onRemove = (index: number) => {
mutators.remove(index)
console.log(index)
// let _list = list.splice(index, 1)
// console.log('_list', _list,mutators)
mutators.remove(index)
let list = actions.getFieldValue('detailList')
let _list = list.splice(1, index)
console.log('_list', _list)
actions.setFieldValue('detailList', ..._list)
computedALL(_list)
// actions.setFieldValue('detailList', ...list)
computedALL(list)
}
return (
<>
......@@ -853,14 +867,15 @@ const Deatail: React.FC<{}> = () => {
<Col span={2} >
<FormItem
name={`detailList.${index}.weight`}
component={Input}
// rules={
// [
// {
// pattern:''
// }
// ]
// }
component={NumberPicker}
rules={
[
{
// pattern:''
message:'请输入数值'
}
]
}
required
/>
......@@ -868,7 +883,7 @@ const Deatail: React.FC<{}> = () => {
<Col span={2}>
<FormItem
name={`detailList.${index}.volume`}
component={Input}
component={NumberPicker}
required
/>
......
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