Commit f49a1e03 authored by 黄卓's avatar 黄卓

查看客户详情

parent 0948b630
......@@ -2,6 +2,7 @@ import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
import query from '@/views/ecw/customer/query'
Vue.use(Router)
......@@ -91,16 +92,6 @@ export const constantRoutes = [
meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'}
}
]
}, {
path: '/c',
component: Layout,
hidden: true,
children: [{
path: 'ecw/customer/edit/:customerId(\\d+)',
component: (resolve) => require(['@/views/ecw/customer/edit'], resolve),
name: 'Data',
meta: {title: '字典数据', icon: '', activeMenu: '/system/dict'}
}]
}, {
path: '/job',
component: Layout,
......@@ -247,12 +238,28 @@ export const constantRoutes = [
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [{
path: '/customerCommissionInfo/:dictId(\\d+)',
component: (resolve) => require(['@/views/ecw/customerCommissionInfo/index'], resolve),
name: 'customerCommissionInfo',
meta: {title: '佣金详情', icon: '', activeMenu: '/customer/customerCommissionInfo'}
}]
children: [
{
path: '/customerCommissionInfo/:dictId(\\d+)',
component: (resolve) => require(['@/views/ecw/customerCommissionInfo/index'], resolve),
name: 'customerCommissionInfo',
meta: {title: '佣金详情', icon: '', activeMenu: '/customer/customerCommissionInfo'}
},
{
path: 'edit/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'customerEdit',
meta: {title: '编辑客户', icon: '', activeMenu: '/customer/customer'}
},
{
path: 'query/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/query'),
props: true,
name: 'customerQuery',
meta: {title: '客户详情', icon: '', activeMenu: '/customer/customer'}
}
]
},
]
......
......@@ -363,12 +363,13 @@ import { getProductList } from '@/api/ecw/product'
export default {
name: "edit",
props: {
customerId: String
},
components: {
upload
},
created() {
this.customerId = this.$route.params && this.$route.params.customerId;
console.log(this.customerId)
this.reset()
if(this.customerId !== '0')
this.getCustomer(this.customerId)
......@@ -386,7 +387,6 @@ export default {
},
data(){
return {
customerId: undefined,
getDictDatas,
DICT_TYPE,
......@@ -426,7 +426,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
// return;
return;
}
// 修改的提交
if (this.form.id != null) {
......@@ -483,6 +483,7 @@ export default {
remarks: undefined,
arrivalConfirm: undefined,
weightUnit: undefined,
createTime: undefined
};
this.resetForm("form");
},
......
......@@ -91,6 +91,8 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleQuery(scope.row)"
v-hasPermi="['ecw:customer:query']">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:customer:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
......@@ -600,6 +602,10 @@ export default {
// this.open = true;
// this.title = "添加客户";
},
/** 查看按钮操作 */
handleQuery(row) {
this.$router.push('/customer/query/' + row.id)
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('/customer/edit/' + row.id)
......
This diff is collapsed.
<template>
<view>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<h2></h2>
<el-row :gutter="10">
<el-col>
<h2>查看</h2>
</el-col>
<el-col>
<el-button type="primary">主要按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="primary">主要按钮</el-button>
<el-button type="danger">危险按钮</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</view>
</template>
<script>
export default {
name: 'view'
}
</script>
<style scoped>
</style>
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