Commit d7a19f54 authored by zhengke's avatar zhengke

1

parent de5bbf9f
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增客户" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增客户" />
</div> </div>
</template> </template>
<template v-slot:body-cell-CustomerName="props"> <template v-slot:body-cell-CategoryName="props">
<q-td> <q-td>
<div class="CustomerName" @click="showDetail(props.row)"> <div class="CustomerName" @click="showDetail(props.row)">
{{ props.row.CustomerName }} {{ props.row.CategoryName }}
</div> </div>
</q-td> </q-td>
</template> </template>
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<categoryEdit-form v-if="isShowCategoryForm" :customerObj="customerObj" @close="closeCustomForm" <categoryEdit-form v-if="isShowCategoryForm" :customerObj="customerObj" @close="closeCustomForm"
@success="refreshQuestion"> @success="refreshQuestion">
</categoryEdit-form> </categoryEdit-form>
<peerRight v-if="isShowDetailForm" :rowId="curRowId" @close="closeCustomForm" :auth="AuthorityObj" @success="refreshQuestion"></peerRight>
</div> </div>
</template> </template>
<script> <script>
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
deleteCustomerCategory deleteCustomerCategory
} from "../../api/users/user"; } from "../../api/users/user";
import categoryEditForm from "../sale/categoryEdit-form"; import categoryEditForm from "../sale/categoryEdit-form";
import peerRight from "../sale/peerInfo/peerRight";
export default { export default {
props: { props: {
dataList: { dataList: {
...@@ -74,7 +75,8 @@ ...@@ -74,7 +75,8 @@
} }
}, },
components: { components: {
categoryEditForm categoryEditForm,
peerRight
}, },
data() { data() {
return { return {
...@@ -130,7 +132,17 @@ ...@@ -130,7 +132,17 @@
}, },
loading: false, loading: false,
isShowCategoryForm: false, isShowCategoryForm: false,
customerObj: null //传入参数 customerObj: null, //传入参数
tabId:1,
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
isShowAudit: false, //是否显示审批
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false //是否显示返佣
},
isShowDetailForm:false,
curRowId:0
}; };
}, },
created() { created() {
...@@ -191,10 +203,17 @@ ...@@ -191,10 +203,17 @@
//关闭弹窗 //关闭弹窗
closeCustomForm() { closeCustomForm() {
this.isShowCategoryForm = false; this.isShowCategoryForm = false;
this.isShowDetailForm = false;
}, },
refreshQuestion() { refreshQuestion() {
this.$emit("success"); this.$emit("success");
}, },
//客户详情
showDetail(row) {
console.log(row);
this.curRowId = row.CategoryId;
this.isShowDetailForm = true;
}
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
.makeOutDiv .el-table th{ .makeOutDiv .el-table th{
background: #f5f6f7; background: #f5f6f7;
} }
.CustomerName {
cursor: pointer;
color: var(--q-color-primary);
}
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -42,6 +47,14 @@ ...@@ -42,6 +47,14 @@
<el-table-column label="序号" type="index"> <el-table-column label="序号" type="index">
</el-table-column> </el-table-column>
<el-table-column prop="ChannelName" label="渠道名"> <el-table-column prop="ChannelName" label="渠道名">
<template slot-scope="scope">
<div class="CustomerName" v-if="scope.row.CustomerType" @click="showDetail(scope.row)">
{{scope.row.ChannelName}}
</div>
<div v-else>
{{scope.row.ChannelName}}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="ClueCount" label="回单" sortable> <el-table-column prop="ClueCount" label="回单" sortable>
</el-table-column> </el-table-column>
...@@ -63,6 +76,8 @@ ...@@ -63,6 +76,8 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<customerInfo v-if="isShowDetailForm" :rowId="curRowId" :tabId="tabId" :empList="employeeList"
@close="closeCustomForm" :auth="AuthorityObj" @success="refreshQuestion"></customerInfo>
</div> </div>
</template> </template>
<script> <script>
...@@ -72,7 +87,11 @@ ...@@ -72,7 +87,11 @@
import { import {
queryEmployee queryEmployee
} from "../../api/users/user"; } from "../../api/users/user";
import customerInfo from "../../components/sale/b2bcustomerinfo/b2bCustomerInfo.vue";
export default { export default {
components: {
customerInfo
},
data() { data() {
return { return {
msg: { msg: {
...@@ -88,7 +107,19 @@ ...@@ -88,7 +107,19 @@
return time.getTime() > Date.now() - 8.64e6 return time.getTime() > Date.now() - 8.64e6
} }
}, },
tableHeight:50 tableHeight:50,
isShowDetailForm:false,
curRowId: 0,
tabId: 1,
employeeList:[],
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
isShowAudit: false, //是否显示审批
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false //是否显示返佣
},
}; };
}, },
created() { created() {
...@@ -111,12 +142,21 @@ ...@@ -111,12 +142,21 @@
this.dateList.push(year + strLink + month + strLink + '01'); this.dateList.push(year + strLink + month + strLink + '01');
this.dateList.push(year + strLink + month + strLink + day); this.dateList.push(year + strLink + month + strLink + day);
this.getEmployeeList(); this.getEmployeeList();
this.getMyEmployeeList();
this.getData(); this.getData();
setTimeout(() => { setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop-80; this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop-80;
},100) },100)
}, },
methods: { methods: {
//获取员工列表
getMyEmployeeList() {
queryEmployee({
IsLeave: 1
}).then(res => {
this.employeeList = res.Data;
});
},
//获取数据 //获取数据
getData() { getData() {
if (this.dateList && this.dateList.length > 0) { if (this.dateList && this.dateList.length > 0) {
...@@ -156,7 +196,18 @@ ...@@ -156,7 +196,18 @@
} }
return total <= 0 ? "0" : (Math.round(num / total * 10000) / 100.00); return total <= 0 ? "0" : (Math.round(num / total * 10000) / 100.00);
}, },
//客户详情
showDetail(row) {
this.curRowId = row.ChannelId;
this.isShowDetailForm = true;
},
//关闭弹窗
closeCustomForm() {
this.isShowDetailForm = false;
},
refreshQuestion() {
this.getData();
},
} }
} }
......
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