Commit 9eba1bb3 authored by 熊成伟's avatar 熊成伟

debug

parent c0781567
Pipeline #15898 passed with stages
in 59 seconds
......@@ -70,7 +70,8 @@ const Process = (props) => {
setBasic(result)
});
};
const [applicateData, setapplicateData] = useState([])
const [applicateData, setapplicateData] = useState([]);
const [applicateList, setApplicateList] = useState([])
const getApplication = (uuid) => {
axiosRequest({
method: 'post',
......@@ -78,7 +79,8 @@ const Process = (props) => {
body: {attachId: uuid, templatePath: 'cgwpxx_list'}
}).then(res => {
setBasicLoading(true);
setapplicateData(res.rows)
setapplicateData(res.rows);
setApplicateList(res.elementList)
});
};
const treeClick = (BGYPMC) => {
......@@ -240,7 +242,7 @@ const Process = (props) => {
<Basic data={basic}/>
<WhiteSpace/>
<div className="good-title">申领物品信息</div>
<Goods data={applicateData} onClick={treeClick}/>
<Goods list={applicateList} data={applicateData} onClick={treeClick}/>
</div>
) : <Skeleton/>}
<div id="event-adjunct"/>
......
......@@ -2,26 +2,24 @@ import React from 'react';
import './index.less'
const Index = (props) => {
const {data, onClick} = props;
const {data, list, onClick} = props;
console.log(list)
return (
<div className="address-box">
{data && data.length > 0 && data.map((item, index) => (
<div key={index} className="good-item">
<div className="address-item address-title" onClick={() => onClick(item.BGYPMC)}>
品名:{item.BGYPMC || ''}
{list.length > 0 && list[0].showName}{list.length > 0 && item[list[0].colName]}
{/*{list[0] && list[0].showName}:{item[list[0].showName] || ''}*/}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div>
{ item.checked && (
<div>
<div className="address-item address-title">
领取人:{item.BGYPMC || ''}
</div>
<div className="address-item address-title">
申请数量:{item.SL || ''}
</div>
<div className="address-item address-title">
实际发放数量:{item.BGYPMC || ''}
{list.length > 1 && list.map((child, index2) => index2 > 0 && (
<div key={index2} className="address-item address-title">
{child.showName}{item[child.colName] || ''}
</div>
))}
</div>
)}
......
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