!2913 修复:组件和五金商品列表UI错误问题

pull/2908/MERGE
林三 2 months ago committed by ChenX
parent 7c10a482e4
commit 4f149d58c2

@ -75,23 +75,40 @@ export class GoodsList extends React.Component<IGoodsListProps>
>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th onClick={this.handleOrderGoods}
style={{ cursor: "pointer", maxWidth: 55 }}
>
<div className="th_goods_thick">
<div></div>
<Icon icon={this.isDesc === undefined ? "double-caret-vertical" : (this.isDesc ? "chevron-up" : "chevron-down")} />
</div>
</th>
<th></th>
<th></th>
<th style={{ minWidth: 80 }}></th>
<th></th>
<th></th>
{
this.props.goods_type === GoodsType.comp || this.props.goods_type === GoodsType.metals ?
<>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</>
:
<>
<th></th>
<th></th>
<th></th>
<th></th>
<th onClick={this.handleOrderGoods}
style={{ cursor: "pointer", maxWidth: 55 }}
>
<div className="th_goods_thick">
<div></div>
<Icon icon={this.isDesc === undefined ? "double-caret-vertical" : (this.isDesc ? "chevron-up" : "chevron-down")} />
</div>
</th>
<th></th>
<th></th>
<th style={{ minWidth: 80 }}></th>
<th></th>
<th></th>
</>
}
</tr>
</thead>
<tbody>
@ -110,6 +127,28 @@ export class GoodsList extends React.Component<IGoodsListProps>
//是否打包
let isPack = v.goods_param.find(t => t.id === 8)?.value == 1 ? "是" : "否";
//类型 型号 厂家 (五金和组件中用到)
let type: string;
let model: string;
let factfactory: string;
//五金 组件
if (v.class_type != GoodsType.board)
{
//类型
type = v.goods_param.find(p => p.id === 0)?.value ?? "";
//规格
goods_spec = v.goods_param.find(p => p.id === 1)?.value ?? "";
//品牌
brand = v.goods_param.find(p => p.id === 2)?.value ?? "";
//颜色
colorName = v.goods_param.find(p => p.id === 3)?.value ?? "";
//型号
model = v.goods_param.find(p => p.id === 4)?.value ?? "";
//厂家
factfactory = v.goods_param.find(p => p.id === 5)?.value ?? "";
}
let info = {
goods_id: v.goods_id,
goods_sn: v.goods_sn,
@ -124,16 +163,34 @@ export class GoodsList extends React.Component<IGoodsListProps>
onClick={() => this.props.select(info)}
style={{ lineHeight: "normal" }}
>
<td>{v.goods_sn}</td>
<td><OneLineText text={brand} /></td>
<td><OneLineText text={v.goods_name} /></td>
<td><OneLineText text={goods_spec} /></td>
<td>{thick}</td>
<td><OneLineText text={matName} /></td>
<td>{waveline}</td>
<td>{isPack}</td>
<td><OneLineText text={colorName} /></td>
<td>{v.goods_stock}</td>
{
this.props.goods_type === GoodsType.comp || this.props.goods_type === GoodsType.metals ?
<>
<td>{v.goods_sn}</td>
<td><OneLineText text={v.goods_name} /></td>
<td><OneLineText text={type} /></td>
<td><OneLineText text={goods_spec} /></td>
<td><OneLineText text={brand} /></td>
<td><OneLineText text={colorName} /></td>
<td><OneLineText text={model} /></td>
<td><OneLineText text={factfactory} /></td>
<td>{v.goods_stock}</td>
</>
:
<>
<td>{v.goods_sn}</td>
<td><OneLineText text={brand} /></td>
<td><OneLineText text={v.goods_name} /></td>
<td><OneLineText text={goods_spec} /></td>
<td>{thick}</td>
<td><OneLineText text={matName} /></td>
<td>{waveline}</td>
<td>{isPack}</td>
<td><OneLineText text={colorName} /></td>
<td>{v.goods_stock}</td>
</>
}
</tr>;
})
}

Loading…
Cancel
Save