|
@@ -10,7 +10,11 @@
|
|
|
>
|
|
|
<!-- tabel -->
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
- <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
|
|
|
+ <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false">
|
|
|
+ <span slot="unitCost" slot-scope="text,record">
|
|
|
+ <a-input placeholder="请输入" v-model="record.unitCost" @change="changeUnitCost(record)"/>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
<!-- 导出 打印 返回 -->
|
|
|
<a-row style="marginTop:20px;">
|
|
|
<a-col :md="24" :sm="12">
|
|
@@ -73,10 +77,11 @@ export default {
|
|
|
dataIndex: 'unitCost',
|
|
|
width: 120,
|
|
|
className: 'replacecolor',
|
|
|
- customRender: (text, record, index) => {
|
|
|
- var re = Number(text).toFixed(3)
|
|
|
- return re
|
|
|
- }
|
|
|
+ scopedSlots: { customRender: 'unitCost' },
|
|
|
+ // customRender: (text, record, index) => {
|
|
|
+ // var re = Number(text).toFixed(3)
|
|
|
+ // return re
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
title: '总成本',
|
|
@@ -130,6 +135,9 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
+ changeUnitCost(record){
|
|
|
+ record.cost = record.unitCost*record.number
|
|
|
+ },
|
|
|
// 打印
|
|
|
print() {},
|
|
|
|