采购合同审批123

This commit is contained in:
zhangdingyu
2019-11-13 10:54:58 +08:00
parent 6948c1962d
commit 35136d134d
3 changed files with 154 additions and 198 deletions

View File

@@ -59,7 +59,7 @@
</div>
</el-card>
<h3 style="">合同明细</h3>
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" stripe show-summary>
<el-table-column label="合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
@@ -80,19 +80,19 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="80" prop="单价">
<el-table-column label="单价" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
{{ scope.row.单价 }}
{{ parseFloat(scope.row.单价||0).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="合计" align="center" min-width="80" prop="合计">
<el-table-column label="合计" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
@@ -100,11 +100,16 @@
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="80" prop="备注">
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
</el-table>
</div>
</template>
@@ -162,7 +167,7 @@ export default {
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
} else if (index === 7) {
} else if (index === 6) {
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
@@ -173,7 +178,7 @@ export default {
return prev
}
}, 0)
sums[index] += ' 元'
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}