<a-table :columns="prepaycolumns" :data-source="prepaydata" :pagination="false" >
<template slot="footer">
<span>应付总金额:¥24000.00</span>
</template>
</a-table>
data() {
const prepaycolumns = [
{ dataIndex: 'id', title: '商品编码', align: 'center', width: 120 },
{ dataIndex: 'name', title: '商品名称', align: 'center', width: 300 },
{ dataIndex: 'type', title: '规格型号', align: 'center', width: 120 },
{ dataIndex: 'price', title: '商品单价', align: 'center', width: 120 },
{ dataIndex: 'payNum', title: '应收数量', align: 'center', width: 120 },
{ dataIndex: 'payPrice', title: '应付金额', align: 'center', width: 120 },
{
dataIndex: 'prepayPrice',
title: '预付款金额',
scopedSlots: { customRender: 'prepayPrice' },
align: 'center',
customRender: (value, row, index) => {
const obj = {
children: <a-input v-model={this.submitData.price}></a-input>,
attrs: {},
};
if (index === 0) {
obj.attrs.rowSpan = 2;
}
if (index === 1) {
obj.attrs.rowSpan = 0;
}
return obj;
},
},
{
dataIndex: 'remark',
title: '备注',
scopedSlots: { customRender: 'remark' },
align: 'center',
customRender: (value, row, index) => {
console.log(value);
const obj = {
children: <a-input v-model={this.submitData.remark}></a-input>,
attrs: {},
};
if (index === 0) {
obj.attrs.rowSpan = 2;
}
if (index === 1) {
obj.attrs.rowSpan = 0;
}
return obj;
},
},
]
return {
prepaycolumns,
prepaydata,
submitData:{}
}
},