Commit f76d7b37 authored by alwayOnlie's avatar alwayOnlie

修改bug

parent 29ea4c5e
......@@ -181,6 +181,7 @@
.gesture{
color: #00B37A;
cursor:pointer;
// margin-right: 10px;
}
.wrapper{
:global {
......
......@@ -260,14 +260,26 @@ const Details = (props: any) => {
title: '操作', dataIndex: 'type', align: 'left',
render: (text, record) => {
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return (
<div>
{
record.payAmount > 0 || record.unPayApplyAmount > 0 && <a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
}
let node = null;
if (record.payAmount !== 0) {
node =
<div>
<a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
return node;
} else if (record.unPayApplyAmount > 0) {
node = <div>
<a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
)
return node;
} else {
node = <div>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
return node;
}
}
},
];
......
......@@ -75,7 +75,7 @@ const table = (props: any) => {
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{record.orderType == 2 ? `-${text}` : text}</div>
<div>{record.orderType == 2 ? `${text}` : text}</div>
</div>
},
......
......@@ -25,6 +25,7 @@ const FormList = (props: any) => {
list.map((item: any, index: number) => {
item.rowId = index + 1
item.price = '';
item.materielId = item.id
})
console.log(list)
setData(list)
......@@ -35,7 +36,7 @@ const FormList = (props: any) => {
return new Promise(resolve => {
PublicApi.getProductGoodsGetGoodsList(params).then(res => {
if (res.code === 1000) {
console.log(res.data, 1231321)
console.log(res.data)
resolve(res.data)
}
})
......@@ -119,6 +120,7 @@ const FormList = (props: any) => {
if (res.code === 1000) {
let data = res.data.data.map((item, index) => {
return {
materielId: _filterArr(sourceType, item, ['', 'productId', 'id', '']),
code: _filter(sourceType, item, ['', 'number', 'code', 'number']),// 物料编号
name: _filter(sourceType, item, ['', 'name', 'name', 'name']),//物料名称
type: _filter(sourceType, item, ['', 'model', 'type', 'model']),//物料规格
......@@ -313,6 +315,7 @@ const FormList = (props: any) => {
dataList.map(item => {
list.push({
id: 0,
materielId: item.materielId,
materielNo: item.code,
materielName: item.name,
type: item.type,
......
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