|
|
@ -134,7 +134,7 @@ |
|
|
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column fixed width="150" label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" @click="handleEdit(scope.row)">编辑</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="handleEdit(scope.row, scope.$index)">编辑</el-button> |
|
|
|
<el-button type="danger" size="mini" @click="handleDelete(scope.$index)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -320,25 +320,34 @@ export default { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divOpen'].showAdd() |
|
|
|
}, |
|
|
|
handleEdit(row) { |
|
|
|
handleEdit(row, index) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divOpen'].showEdit(row) |
|
|
|
this.$refs['divOpen'].showEdit(row, index) |
|
|
|
}, |
|
|
|
handleDelete(index) { |
|
|
|
this.formobj.pmsSupplierBankList.splice(index, 1) |
|
|
|
}, |
|
|
|
backData(value) { |
|
|
|
backData(value, index) { |
|
|
|
this.viewState = 1 |
|
|
|
value = JSON.parse(JSON.stringify(value)) |
|
|
|
if (value.sid !== '') { |
|
|
|
this.formobj.pmsSupplierBankList.forEach((e) => { |
|
|
|
if (e.sid === value) { |
|
|
|
e = value |
|
|
|
} |
|
|
|
}) |
|
|
|
if (index !== '' && index !== null) { |
|
|
|
this.formobj.pmsSupplierBankList[index] = { |
|
|
|
sid: value.sid, |
|
|
|
supplierSid: value.supplierSid, |
|
|
|
bankName: value.bankName, |
|
|
|
bankAccount: value.bankAccount, |
|
|
|
accountName: value.accountName, |
|
|
|
dueBankKey: value.dueBankKey, |
|
|
|
dueBankValue: value.dueBankValue, |
|
|
|
bankingOutlets: value.bankingOutlets, |
|
|
|
bankAddress: value.bankAddress, |
|
|
|
paymentLines: value.paymentLines, |
|
|
|
swiftCode: value.swiftCode, |
|
|
|
currency: value.currency |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.formobj.pmsSupplierBankList.push({ |
|
|
|
sid: value.sid, |
|
|
|
sid: '', |
|
|
|
supplierSid: value.supplierSid, |
|
|
|
bankName: value.bankName, |
|
|
|
bankAccount: value.bankAccount, |
|
|
|