Commit 07023e19 authored by 黄奎's avatar 黄奎

页面修改

parent b06b9a52
...@@ -87,18 +87,19 @@ ...@@ -87,18 +87,19 @@
/deep/ .q-field__prepend { /deep/ .q-field__prepend {
padding-right: 0px !important; padding-right: 0px !important;
} }
.custom_Close{
width:25px; .custom_Close {
height:25px; width: 25px;
background:red; height: 25px;
color:#fff; background: red;
text-align:center; color: #fff;
line-height:25px; text-align: center;
line-height: 25px;
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right:-10px; right: -10px;
top:-10px; top: -10px;
} }
</style> </style>
<template> <template>
...@@ -128,15 +129,17 @@ ...@@ -128,15 +129,17 @@
ref="ContactNumber" class="col-6 q-pr-lg q-pb-lg" label="联系电话" /> ref="ContactNumber" class="col-6 q-pr-lg q-pb-lg" label="联系电话" />
</div> </div>
<div class="col-6"> <div class="col-6">
<q-select stack-label color="primary" filled label="类型" @input="getCustomList(objOption.CustomerType)" option-value="Id" option-label="Name" <q-select stack-label color="primary" filled label="类型" @input="getCustomList(objOption.CustomerType)"
:options="typeOptions" class="q-pb-lg" v-model="objOption.CustomerType" emit-value map-options /> option-value="Id" option-label="Name" :options="typeOptions" class="q-pb-lg"
v-model="objOption.CustomerType" emit-value map-options />
</div> </div>
</div> </div>
<div class="row wrap"> <div class="row wrap">
<q-input filled v-if="objOption.CustomerType==4" stack-label maxlength="20" :dense="false" v-model="objOption.EnterpriseName" lazy-rules <q-input filled v-if="objOption.CustomerType==4" stack-label maxlength="20" :dense="false"
ref="EnterpriseName" class="col-6 q-pr-lg q-pb-lg" /> v-model="objOption.EnterpriseName" lazy-rules ref="EnterpriseName" class="col-6 q-pr-lg q-pb-lg" />
<q-select stack-label color="primary" v-else filled label="请选择客户" option-value="CategoryId" option-label="CategoryName" <q-select stack-label color="primary" v-else filled label="请选择客户" option-value="CategoryId"
:options="customList" class="col-6 q-pr-lg q-pb-lg" v-model="objOption.CategoryId" use-input @filter="filterFn" clearable emit-value map-options /> option-label="CategoryName" :options="customList" class="col-6 q-pr-lg q-pb-lg"
v-model="objOption.CategoryId" use-input @filter="filterFn" clearable emit-value map-options />
<template v-if="objOption.CustomerType!=4"> <template v-if="objOption.CustomerType!=4">
<div class="col-6" v-if="!isShowEdit"> <div class="col-6" v-if="!isShowEdit">
<q-btn label="立即添加同行" @click="isShowEdit=true" size="sm" color="primary" /> <q-btn label="立即添加同行" @click="isShowEdit=true" size="sm" color="primary" />
...@@ -168,8 +171,8 @@ ...@@ -168,8 +171,8 @@
<div class="col-12"> <div class="col-12">
<!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Account" ref="Account" <!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Account" ref="Account"
class="col-6 q-pr-lg q-pb-lg" label="账号" /> --> class="col-6 q-pr-lg q-pb-lg" label="账号" /> -->
<q-input filled stack-label :dense="false" v-model="objOption.Address" ref="Address" <q-input filled stack-label :dense="false" v-model="objOption.Address" ref="Address" class="col-12 q-pb-lg"
class="col-12 q-pb-lg" label="详细地址" /> label="详细地址" />
</div> </div>
</div> </div>
<div class="row wrap"> <div class="row wrap">
...@@ -261,8 +264,8 @@ ...@@ -261,8 +264,8 @@
WeChatPhoto: '', WeChatPhoto: '',
CustomerType: 1, //同业类型 1企业 2学校 CustomerType: 1, //同业类型 1企业 2学校
EnterpriseName: "", //企业名称 EnterpriseName: "", //企业名称
CategoryId:'', CategoryId: '',
CategoryName:'' CategoryName: ''
}, },
EnterpriseLabelName: "企业名称", EnterpriseLabelName: "企业名称",
saveCustomLoading: false, saveCustomLoading: false,
...@@ -272,16 +275,17 @@ ...@@ -272,16 +275,17 @@
CustomerBrandList: [], //所属品牌下拉 CustomerBrandList: [], //所属品牌下拉
optionTitle: '', optionTitle: '',
typeOptions: [], typeOptions: [],
customList:[], customList: [],
AllcustomList:[], AllcustomList: [],
isShowEdit: false isShowEdit: false
} }
}, },
created() {}, created() {
mounted() {
this.getTypeList(); this.getTypeList();
this.getCustomList();
},
mounted() {
this.initObj() this.initObj()
this.getCustomList(1);
}, },
methods: { methods: {
//筛选客户 //筛选客户
...@@ -295,10 +299,9 @@ ...@@ -295,10 +299,9 @@
} }
}) })
}, },
closeCageName() {
closeCageName(){ this.isShowEdit = false;
this.isShowEdit=false; this.objOption.CategoryName = '';
this.objOption.CategoryName='';
}, },
//初始化表单 //初始化表单
initObj() { initObj() {
...@@ -354,12 +357,12 @@ ...@@ -354,12 +357,12 @@
saveCourse() { saveCourse() {
this.$refs.CustomerName.validate(); this.$refs.CustomerName.validate();
// this.$refs.ContactNumber.validate(); // this.$refs.ContactNumber.validate();
if(this.objOption.CustomerType!=4){ if (this.objOption.CustomerType != 4) {
if (!this.objOption.CategoryId && this.objOption.CategoryName=='') { if (!this.objOption.CategoryId && this.objOption.CategoryName == '') {
this.$q.notify({ this.$q.notify({
type:'warning', type: 'warning',
message: "请选择客户或立即添加", message: "请选择客户或立即添加",
timeout:2000, timeout: 2000,
position: "top", position: "top",
}); });
return return
...@@ -367,24 +370,24 @@ ...@@ -367,24 +370,24 @@
} }
if (!this.objOption.ContactNumber && !this.objOption.QQ && !this.objOption.WeChatNo) { if (!this.objOption.ContactNumber && !this.objOption.QQ && !this.objOption.WeChatNo) {
this.$q.notify({ this.$q.notify({
type:'warning', type: 'warning',
message: "电话,qq,微信至少填写一个", message: "电话,qq,微信至少填写一个",
timeout:2000, timeout: 2000,
position: "top", position: "top",
}); });
return return
} }
if(this.objOption.ContactNumber&& !validateTel(this.objOption.ContactNumber)){ if (this.objOption.ContactNumber && !validateTel(this.objOption.ContactNumber)) {
this.$q.notify({ this.$q.notify({
type:'warning', type: 'warning',
message: "请输入正确的11位号码", message: "请输入正确的11位号码",
timeout:2000, timeout: 2000,
position: "top", position: "top",
}); });
return return
} }
if (!this.$refs.CustomerName.hasError) { if (!this.$refs.CustomerName.hasError) {
if(this.objOption.CategoryId>0){ if (this.objOption.CategoryId > 0) {
this.objOption.CategoryName = ''; this.objOption.CategoryName = '';
} }
SetCustomer(this.objOption).then(res => { SetCustomer(this.objOption).then(res => {
...@@ -414,6 +417,7 @@ ...@@ -414,6 +417,7 @@
this.EnterpriseLabelName = '学校名称' this.EnterpriseLabelName = '学校名称'
} }
}, },
//获取同行类型列表
getTypeList() { getTypeList() {
GetCatetoryTypeList({}).then(res => { GetCatetoryTypeList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -421,13 +425,16 @@ ...@@ -421,13 +425,16 @@
} }
}) })
}, },
getCustomList(Type){ //获取同行列表
getCustomList(Type) {
let msg = { let msg = {
CategoryName:"", CatetoryType: Type
CatetoryType:Type
} }
if(Type)
{
this.objOption.CategoryId = ''; this.objOption.CategoryId = '';
this.isShowEdit=false; }
this.isShowEdit = false;
queryCustomerCategoryList(msg).then(res => { queryCustomerCategoryList(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.customList = res.Data; this.customList = res.Data;
...@@ -437,5 +444,4 @@ ...@@ -437,5 +444,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
</style> </style>
<template> <template>
<div> <div>
...@@ -10,18 +10,21 @@ ...@@ -10,18 +10,21 @@
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small" type="year" placeholder="选择年"> <el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small"
type="year" placeholder="选择年">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;display:none;" label="下载" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
@click="downloadStudentStaticMonth" label="下载" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}" no-data-label="暂无相关数据" flat <q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
class="sticky-column-table sticky-header-column-table no-bottom-table" separator="none" :data="dataList" :columns="columns" row-key=""> no-data-label="暂无相关数据" flat class="sticky-column-table sticky-header-column-table no-bottom-table"
separator="none" :data="dataList" :columns="columns" row-key="">
<template v-slot:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
...@@ -32,7 +35,9 @@ ...@@ -32,7 +35,9 @@
import { import {
GetStudentStaticMonth GetStudentStaticMonth
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -236,8 +241,8 @@ ...@@ -236,8 +241,8 @@
], ],
dataList: [], dataList: [],
loading: false, loading: false,
myDate:'', myDate: '',
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
rowsPerPage: 0 rowsPerPage: 0
...@@ -255,11 +260,22 @@ ...@@ -255,11 +260,22 @@
this.getList(); this.getList();
}, },
methods: { methods: {
downloadStudentStaticMonth() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/StudentStat/DownLoadStudentStaticMonth",
msg,
"课程顾问部每月数据统计.xls", res => {
this.loading = false;
}
);
},
//获取数据 //获取数据
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentStaticMonth(this.msg).then(res => { GetStudentStaticMonth(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -267,8 +283,7 @@ ...@@ -267,8 +283,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.TotalredClass{
color:red; .TotalredClass {
} color: red;
}
</style> </style>
<template> <template>
<div> <div>
...@@ -20,7 +21,8 @@ ...@@ -20,7 +21,8 @@
</q-field> </q-field>
</div> </div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;display:none;" label="下载" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
@click="downloadStudentStaticMonthRate" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
...@@ -102,6 +104,9 @@ ...@@ -102,6 +104,9 @@
import { import {
GetStudentStaticRateMonth GetStudentStaticRateMonth
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -112,11 +117,11 @@ ...@@ -112,11 +117,11 @@
return { return {
tabCheck: 1, tabCheck: 1,
dataList: [], dataList: [],
loading:false, loading: false,
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
rowsPerPage:0 rowsPerPage: 0
}, },
columns: [{ columns: [{
name: 'ItemName', name: 'ItemName',
...@@ -216,10 +221,22 @@ ...@@ -216,10 +221,22 @@
this.getList(); this.getList();
}, },
methods: { methods: {
//下载文件
downloadStudentStaticMonthRate() {
this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg));
EduDownLoad(
"/StudentStat/DownLoadStudentStaticMonthRate",
msg,
"课程顾问部月成长率统计.xls", res => {
this.loading = false;
}
);
},
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentStaticRateMonth(this.msg).then(res => { GetStudentStaticRateMonth(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -227,5 +244,4 @@ ...@@ -227,5 +244,4 @@
} }
} }
} }
</script>
</script> \ No newline at end of file
<style> <style>
.Sysuser_Date .el-input__inner { .Sysuser_Date .el-input__inner {
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.myTable_Zk tbody tr:first-child td{
background:yellow!important; .myTable_Zk tbody tr:first-child td {
}; background: yellow !important;
.myTable_Zk tbody tr:first-child{ }
background:yellow!important;
z-index:1!important; ;
}
.myTable_Zk tbody tr:first-child {
background: yellow !important;
z-index: 1 !important;
}
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -17,18 +21,21 @@ ...@@ -17,18 +21,21 @@
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col-3 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()" size="small" type="month" placeholder="选择年月"> <el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()"
size="small" type="month" placeholder="选择年月">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;display:none;" label="下载" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
@click="downloadStudentStatic" label="下载" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}" no-data-label="暂无相关数据" flat <q-table :pagination="msg" ref="table" :loading="loading" :style="{'height':tableHeight+'px'}"
class="sticky-column-table sticky-header-column-table no-bottom-table myTable_Zk" separator="none" :data="dataList" :columns="columns" row-key=""> no-data-label="暂无相关数据" flat class="sticky-column-table sticky-header-column-table no-bottom-table myTable_Zk"
separator="none" :data="dataList" :columns="columns" row-key="">
<template v-slot:bottom> <template v-slot:bottom>
</template> </template>
</q-table> </q-table>
...@@ -39,7 +46,9 @@ ...@@ -39,7 +46,9 @@
import { import {
GetStudentStatic GetStudentStatic
} from '../../api/sale/sale'; } from '../../api/sale/sale';
import {
EduDownLoad
} from "../../api/common/common";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -243,8 +252,8 @@ ...@@ -243,8 +252,8 @@
], ],
dataList: [], dataList: [],
loading: false, loading: false,
myDate:'', myDate: '',
tableHeight:500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
MonthStr: '', MonthStr: '',
...@@ -260,23 +269,35 @@ ...@@ -260,23 +269,35 @@
mounted() { mounted() {
let d = new Date(); let d = new Date();
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.msg.MonthStr = (d.getMonth()+1).toString(); this.msg.MonthStr = (d.getMonth() + 1).toString();
this.myDate = this.msg.YearStr+'-'+this.msg.MonthStr this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr
this.getList(); this.getList();
}, },
methods: { methods: {
getCheckDate(){ //下载数据
if(this.myDate){ downloadStudentStatic() {
this.msg.YearStr = this.myDate.split('-')[0]; this.loading = true;
this.msg.MonthStr = this.myDate.split('-')[1]; var msg = JSON.parse(JSON.stringify(this.msg));
this.getList(); EduDownLoad(
"/StudentStat/DownLoadStudentStatic",
msg,
"课程顾问部每日数据统计.xls", res => {
this.loading = false;
}
);
},
getCheckDate() {
if (this.myDate) {
this.msg.YearStr = this.myDate.split('-')[0];
this.msg.MonthStr = this.myDate.split('-')[1];
this.getList();
} }
}, },
//获取数据 //获取数据
getList() { getList() {
this.loading=true; this.loading = true;
GetStudentStatic(this.msg).then(res => { GetStudentStatic(this.msg).then(res => {
this.loading=false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
this.dataList = res.Data; this.dataList = res.Data;
} }
...@@ -284,8 +305,7 @@ ...@@ -284,8 +305,7 @@
} }
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ 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