Commit d7a19f54 authored by zhengke's avatar zhengke

1

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