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

debug

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