请款审核
This commit is contained in:
@@ -44,13 +44,18 @@
|
||||
</el-card>
|
||||
<!--<h3 style="">合同明细</h3>-->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-table :data="gridData1" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContactDetail">
|
||||
<el-table-column min-width="150" align="center" label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120" align="center" label="到货金额(元)" prop="到货金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120" align="center" label="已付金额(元)" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
|
||||
@@ -63,7 +68,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="14">
|
||||
<el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
|
||||
<el-table-column label="物料名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -80,7 +85,7 @@
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" width="70">
|
||||
<el-table-column label="采购数量" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
@@ -169,34 +174,42 @@ export default {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 3) {
|
||||
const values = data.map(item => Number(item['数量']))
|
||||
const values = data.map(item => Number(parseFloat(item['数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
return prev + curr
|
||||
} else {
|
||||
return Number(prev)
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index]
|
||||
sums[index] = sums[index] + ' 件'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
sums[index] = '0'
|
||||
}
|
||||
} else if (index === 4) {
|
||||
const values = data.map(item => Number(item['到货数量']))
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (!data[i].到货数量) {
|
||||
data[i].到货数量 = 0
|
||||
}
|
||||
if (!data[i].已到货数量) {
|
||||
data[i].已到货数量 = 0
|
||||
}
|
||||
}
|
||||
const values = data.map(item => Number(parseInt(item['到货数量'])) + Number(parseInt(item['已到货数量'])))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
return prev + curr
|
||||
} else {
|
||||
return Number(prev)
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index]
|
||||
sums[index] = sums[index] + ' 件'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
sums[index] = '0'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user