更新
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总额" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
{{ Number(scope.row.金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -118,6 +118,7 @@ export default {
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue).then(response => {
|
||||
this.loading = false
|
||||
@@ -127,7 +128,19 @@ export default {
|
||||
response.data.rows[i].物料型号 = response.data.rows[i].零件图号
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
采购合同编号: response.data.rows[i].采购合同编号,
|
||||
供应商名称: response.data.rows[i].供应商名称,
|
||||
物料型号: response.data.rows[i].物料型号,
|
||||
物料名称: response.data.rows[i].物料名称,
|
||||
数量: response.data.rows[i].数量,
|
||||
单价: Number(response.data.rows[i].单价).toFixed(2),
|
||||
金额: response.data.rows[i].金额
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(this.tableData)
|
||||
this.total = response.data.total
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user