Commit c9be409d authored by yanglilong's avatar yanglilong

修改

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