Commit ae47326b authored by 黄奎's avatar 黄奎

页面修改

parent 50fe631d
......@@ -31,7 +31,7 @@
</q-popup-proxy>
</q-btn>
<q-btn v-if="authObj&&authObj.isShowDownload" color="accent" class="q-mr-md" size="sm" icon="add" label="下载"
@click="downloadCustomer" />
@click="downloadCustomerLinkMan" />
</div>
</template>
<template v-slot:body-cell-CustomerName="props">
......@@ -220,7 +220,6 @@
pageMsg: {
rowsPerPage: 12
},
loading: false,
isShowCustomForm: false,
isShowRightForm: false,
customerObj: null, //传入参数
......@@ -260,12 +259,12 @@
},
methods: {
//下载同行联系人
downloadCustomer() {
downloadCustomerLinkMan() {
var msg = JSON.parse(JSON.stringify(this.queryMsg));
EduDownLoad(
"/b2bcustomer/DownLoadCustomerLinkMan",
msg,
"同行资料.xls"
"同行联系人资料.xls"
);
},
//初始化权限
......
......@@ -16,6 +16,8 @@
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="EditCustom(null)" label="新增客户" />
<q-btn v-if="authObj&&authObj.isShowDownload" color="accent" class="q-mr-md" size="sm" icon="add" label="下载"
@click="downLoadCustomer" />
</div>
</template>
<template v-slot:body-cell-CategoryName="props">
......@@ -62,6 +64,9 @@
import {
deleteCustomerCategory
} from "../../api/users/user";
import {
EduDownLoad
} from "../../api/common/common";
import categoryEditForm from "../sale/categoryEdit-form";
import peerRight from "../sale/peerInfo/peerRight";
export default {
......@@ -73,6 +78,14 @@
loading: {
type: Boolean,
default: false,
},
queryMsg: {
type: Object,
default: null,
},
authObj: {
type: Object,
default: null,
}
},
components: {
......@@ -131,7 +144,6 @@
pageMsg: {
rowsPerPage: 12
},
loading: false,
isShowCategoryForm: false,
customerObj: null, //传入参数
tabId: 1,
......@@ -151,6 +163,15 @@
},
mounted() {},
methods: {
//下载同行
downLoadCustomer() {
var msg = JSON.parse(JSON.stringify(this.queryMsg));
EduDownLoad(
"/b2bcustomer/DownLoadCustomer",
msg,
"同行资料.xls"
);
},
//新增或者修改客户
EditCustom(obj) {
if (obj) {
......
......@@ -331,7 +331,6 @@
pageMsg: {
rowsPerPage: 12
},
loading: false,
isShowStuForm: false,
resetLoading: false,
isShowStuRight: false,
......
......@@ -55,7 +55,7 @@
</div>
</div>
</div>
<customcategorylist :dataList="dataList" :loading="loading" @success="getList"
<customcategorylist :dataList="dataList" :loading="loading" @success="getList" :authObj="authObj" :queryMsg="categoryMsg"
sticky="sticky-tow-column-table sticky-right-column-table">
</customcategorylist>
<q-pagination class="full-width justify-end" v-model="categoryMsg.pageIndex" color="primary"
......
......@@ -7,14 +7,15 @@
.Sysuser_Date .el-range-editor .el-range-input {
background: transparent !important;
}
.makeOutDiv .el-table th{
.makeOutDiv .el-table th {
background: #f5f6f7;
}
.CustomerName {
cursor: pointer;
color: var(--q-color-primary);
}
</style>
<template>
<div class="page-body">
......@@ -23,8 +24,9 @@
<div class="col-4 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" type="daterange" style="width:100%" :picker-options="pickerOptions0" align="right" value-format="yyyy-MM-dd"
@change="getData" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
<el-date-picker v-model="dateList" type="daterange" style="width:100%" :picker-options="pickerOptions0"
align="right" value-format="yyyy-MM-dd" @change="getData" unlink-panels range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</template>
</q-field>
......@@ -40,10 +42,13 @@
</template>
</q-field>
</div>
<div class="col-3">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="下载" @click="downloadMarketChannelStatic" />
</div>
</div>
</div>
<div class="makeOutDiv">
<el-table :data="dataList" ref="table" style="width: 100%;" :height="tableHeight">
<el-table :data="dataList" ref="table" style="width: 100%;" :height="tableHeight" v-loading="loading">
<el-table-column label="序号" type="index">
</el-table-column>
<el-table-column prop="ChannelName" label="渠道名">
......@@ -87,6 +92,9 @@
import {
queryEmployee
} from "../../api/users/user";
import {
EduDownLoad
} from "../../api/common/common";
import customerInfo from "../../components/sale/b2bcustomerinfo/b2bCustomerInfo.vue";
export default {
components: {
......@@ -107,11 +115,11 @@
return time.getTime() > Date.now() - 8.64e6
}
},
tableHeight:50,
isShowDetailForm:false,
tableHeight: 50,
isShowDetailForm: false,
curRowId: 0,
tabId: 1,
employeeList:[],
employeeList: [],
//权限设置
AuthorityObj: {
isShowEdit: false, //是否显示新增修改按钮
......@@ -119,7 +127,7 @@
isShowBankBook: false, //是否显示幸福存折
isShowRebate: false //是否显示返佣
},
loading: false,
};
},
created() {
......@@ -132,23 +140,34 @@
var month = now.getMonth() + 1;
var day = now.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
month = "0" + month;
}
if (day >= 1 && day <= 9) {
day = "0" + day;
day = "0" + day;
}
this.msg.startTime = year + strLink + month + strLink + '01';
this.msg.endTime = year + strLink + month + strLink + day;
this.msg.endTime = year + strLink + month + strLink + day;
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.getMyEmployeeList();
this.getData();
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop-80;
},100)
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 80;
}, 100)
},
methods: {
downloadMarketChannelStatic() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/UserCenter/DownLoadMarketChannelStatic",
msg,
"细分渠道.xls", res => {
this.loading = false;
}
);
},
//获取员工列表
getMyEmployeeList() {
queryEmployee({
......@@ -166,12 +185,14 @@
this.msg.startTime = "";
this.msg.endTime = "";
}
this.loading = true;
MarketChannelStatic(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
this.dataList.forEach(x=>{
x.VisitingRate = this.getStatical(x.VisitCount,x.ClueCount)
x.ContractRate = this.getStatical(x.OrderCount,x.VisitCount)
this.dataList.forEach(x => {
x.VisitingRate = this.getStatical(x.VisitCount, x.ClueCount)
x.ContractRate = this.getStatical(x.OrderCount, x.VisitCount)
})
}
});
......@@ -210,5 +231,4 @@
},
}
}
</script>
</script>
\ No newline at end of file
......@@ -136,11 +136,15 @@
</template>
</q-field>
</div>
<div class="col-3">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="下载"
@click="downloadMarketChannelStudentStatic" />
</div>
</div>
</div>
<div class="makeOutDiv">
<el-table :data="tableData" style="width: 100%" ref="table" :fit='true'
:default-sort="{prop: 'date', order: 'descending'}">
:default-sort="{prop: 'date', order: 'descending'}" v-loading="loading">
<template v-for="(item, index) in tableHeader">
<template v-if="item.label=='员工'">
<el-table-column :prop="item.prop" :label="item.label" fixed="left" width="70" :key="index">
......@@ -168,19 +172,6 @@
</el-table-column>
</template>
</template>
<!-- <template v-if="index=='EmployeeName'">
<el-table-column :prop="index" :label="item" fixed="left" width="70" :key="index">
</el-table-column>
</template>
<template v-else-if="item=='合计回单'||item=='合计到访'||item=='合计转化率'">
<el-table-column :prop="index" :label="item" fixed="right" sortable width="70" :key="index">
</el-table-column>
</template>
<template v-else>
<el-table-column :prop="index" :label="item" sortable width="80" :key="index">
</el-table-column>
</template> -->
</template>
</el-table>
</div>
......@@ -193,6 +184,9 @@
import {
queryEmployee
} from "../../api/users/user";
import {
EduDownLoad
} from "../../api/common/common";
export default {
data() {
return {
......@@ -213,7 +207,8 @@
},
IsQueryAuth: false, //是否有查询市场部和课程顾问部人员权限
IsShowEmpQuery: false, //是否显示员工下拉框
tableHeight: 50
tableHeight: 50,
loading:false,
};
},
created() {
......@@ -256,6 +251,17 @@
}, 200)
},
methods: {
downloadMarketChannelStudentStatic() {
var msg = JSON.parse(JSON.stringify(this.msg));
this.loading=true;
EduDownLoad(
"/UserCenter/DownLoadMarketChannelStudentStatic",
msg,
"渠道总表.xls",res=>{
this.loading=false;
}
);
},
getFixed(index) {
if (index == 0) {
return true
......@@ -275,7 +281,9 @@
prop: "EmployeeName",
label: "员工"
}];
this.loading=true;
MarketChannelStudentStatic(this.msg).then(res => {
this.loading=false;
if (res.Code == 1) {
var tempArray = res.Data;
if (tempArray && tempArray.length > 0) {
......
......@@ -7,7 +7,8 @@
.Sysuser_Date .el-range-editor .el-range-input {
background: transparent !important;
}
.makeOutDiv .el-table th{
.makeOutDiv .el-table th {
background: #f5f6f7;
}
</style>
......@@ -36,16 +37,19 @@
</template>
</q-field>
</div>
<div class="col-3">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="下载" @click="downloadMarketCreateType" />
</div>
</div>
</div>
<div class="makeOutDiv">
<q-tabs v-model="top_Check" @input="getCheck" class="text-primary" align="left">
<q-tabs v-model="msg.top_Check" @input="getCheck" class="text-primary" align="left">
<q-tab :name="1" label="同行渠道" />
<q-tab :name="2" label="内部渠道" />
<q-tab :name="3" label="学校渠道" />
<q-tab :name="4" label="转介渠道" />
</q-tabs>
<el-table :data="dataList" ref="table" style="width: 100%;" :height="tableHeight">
<el-table :data="dataList" ref="table" style="width: 100%;" :height="tableHeight" v-loading="loading">
<el-table-column label="序号" type="index">
</el-table-column>
<el-table-column prop="ChannelName" label="渠道名">
......@@ -79,13 +83,17 @@
import {
queryEmployee
} from "../../api/users/user";
import {
EduDownLoad
} from "../../api/common/common";
export default {
data() {
return {
msg: {
startTime: "",
endTime: "",
empList: []
empList: [],
top_Check: 1,
},
dateList: [],
dataList: [],
......@@ -95,9 +103,9 @@
return time.getTime() > Date.now() - 8.64e6
}
},
top_Check: 1,
allData: [],
tableHeight:50
tableHeight: 50,
loading:false,
};
},
created() {
......@@ -122,12 +130,33 @@
this.getEmployeeList();
this.getData();
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop-90;
},100)
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 90;
}, 100)
},
methods: {
downloadMarketCreateType() {
var msg = JSON.parse(JSON.stringify(this.msg));
var fileName = "同行渠道.xls";
if (this.msg.top_Check == 2) {
fileName = "内部渠道.xls";
}
if (this.msg.top_Check == 3) {
fileName = "学校渠道.xls";
}
if (this.msg.top_Check == 4) {
fileName = "转交渠道.xls";
}
this.loading=true;
EduDownLoad(
"/UserCenter/DownLoadMarketCreateType",
msg,
fileName,res=>{
this.loading=false;
}
);
},
getCheck() {
switch (this.top_Check) {
switch (this.msg.top_Check) {
case 1:
this.dataList = this.allData.customerDataList;
break;
......@@ -151,14 +180,15 @@
this.msg.startTime = "";
this.msg.endTime = "";
}
this.loading=true;
MarketCreateType(this.msg).then(res => {
if (res.Code == 1) {
this.loading=false;
if (res.Code == 1) {
this.allData = res.Data;
this.dataList = this.allData.customerDataList;
this.dataList[0].VisitCount = 2
this.dataList.forEach(x=>{
x.VisitingRate = this.getStatical(x.VisitCount,x.ClueCount)
x.ContractRate = this.getStatical(x.OrderCount,x.VisitCount)
this.dataList.forEach(x => {
x.VisitingRate = this.getStatical(x.VisitCount, x.ClueCount)
x.ContractRate = this.getStatical(x.OrderCount, x.VisitCount)
})
}
});
......@@ -186,5 +216,4 @@
}
}
</script>
</script>
\ No newline at end of file
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