Commit f49a1e03 authored by 黄卓's avatar 黄卓

查看客户详情

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