Commit 0461a885 authored by 张伯涛's avatar 张伯涛

往来单位

parent 01672549
<template> <template>
<div class="contactsUnitAdd"> <div class="contactsUnitAdd">
<div class="addTitle">新增往来单位</div> <div class="addTitle">新增往来单位</div>
<el-form ref="form" inline :model="form" label-width="auto" label-position="right"> <el-form ref="form" inline :model="form" :disabled="$route.query.type === 'details'" label-width="auto" label-position="right">
<div class="step-header"> <div class="step-header">
<div class="step-label">基本信息</div> <div class="step-label">基本信息</div>
</div> </div>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div> <div v-if="$route.query.type !== 'details'">
<el-button style="margin-top: 140px" type="success" @click.stop="add()">保 存</el-button> <el-button style="margin-top: 140px" type="success" @click.stop="add()">保 存</el-button>
</div> </div>
</el-form> </el-form>
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
} }
}, },
created() { created() {
if (this.$route.query.type === 'update') { if (this.$route.query.type === 'update' || this.$route.query.type === 'details') {
this.getDetail() this.getDetail()
} }
}, },
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<el-table-column width="180px" label="操作"> <el-table-column width="180px" label="操作">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-link :underline="false" type="primary" @click.stop="updateForm(row)">修改</el-link> <el-link :underline="false" type="primary" @click.stop="updateForm(row)">修改</el-link>
<el-link :underline="false" type="success" style="margin-left: 10px " @click.stop="checkDetails(row)">查看</el-link>
<el-link :underline="false" type="danger" style="margin-left: 10px " @click.stop="del(row)">删除</el-link> <el-link :underline="false" type="danger" style="margin-left: 10px " @click.stop="del(row)">删除</el-link>
</template> </template>
</el-table-column> </el-table-column>
...@@ -100,6 +101,16 @@ export default { ...@@ -100,6 +101,16 @@ export default {
data: row data: row
} }
}) })
},
/** 查看按钮 */
checkDetails(row) {
this.$router.push({
path: '/contactsUnit/add',
query: {
type: 'details',
data: row
}
})
} }
} }
} }
......
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