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

页面修改

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