Commit c9be409d authored by yanglilong's avatar yanglilong

修改

parent c400445b
This diff is collapsed.
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(index)">修改</a-button> <a-button type="link" @click.stop="editEvt(index)">修改</a-button>
<a-button v-if="record.eobNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> <!-- <a-button v-if="record.eobNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> -->
</template> </template>
</a-table> </a-table>
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div> <div>
<div class="flex title-div"> <div class="flex title-div">
<span>费用明细</span> <span>费用明细</span>
<a-button type="primary" @click.stop="addEvt">新增</a-button> <a-button type="primary" @click.stop="addEvt" v-if="!id">新增</a-button>
</div> </div>
<a-table :columns="columns" :data-source="dataList" :pagination="false"> <a-table :columns="columns" :data-source="dataList" :pagination="false">
<template slot="itemCode" slot-scope="text"> <template slot="itemCode" slot-scope="text">
{{formatProject(text)}} {{formatProject(text)}}
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(index)">修改</a-button> <a-button type="link" @click.stop="editEvt(index)" v-if="!id">修改</a-button>
<a-button v-if="record.eobNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> <a-button type="link" class="danger" @click.stop="delRecord(index)" v-if="!id">删除</a-button>
</template> </template>
<template slot="footer"> <template slot="footer">
<div class="flex footer-div"> <div class="flex footer-div">
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
<script> <script>
export default{ export default{
props: { props: {
id: {
default: ''
},
ProjectList: { ProjectList: {
default: [] default: []
} }
...@@ -122,6 +125,20 @@ export default{ ...@@ -122,6 +125,20 @@ export default{
}; };
this.dialogShow = true; this.dialogShow = true;
}, },
//删除记录
delRecord(index) {
this.$modal.confirm({
title: "删除",
content: "确定删除该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
},
onCancel: () => {},
});
},
//编辑保存 //编辑保存
handleEditOK() { handleEditOK() {
this.$refs.editForm.validate((valid) => { this.$refs.editForm.validate((valid) => {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(record)">修改</a-button> <a-button type="link" @click.stop="editEvt(record)">修改</a-button>
<a-button type="link" class="success" @click.stop="addEvt(record)">新增</a-button> <!-- <a-button type="link" class="success" @click.stop="addEvt(record)">新增</a-button> -->
<a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> <a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
</template> </template>
</a-table> </a-table>
...@@ -187,7 +187,12 @@ export default{ ...@@ -187,7 +187,12 @@ export default{
}); });
}, },
editEvt(record){ editEvt(record){
console.log(record); this.$router.push({
path: '/pre-auth/add',
query: {
id: record.id
}
})
}, },
//查看预授权使用数据 //查看预授权使用数据
seeEvt(record={}){ seeEvt(record={}){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment