Commit daf67bdb authored by 黄奎's avatar 黄奎

页面修改

parent ea70034c
<style lang="scss"> <style lang="scss">
.stuList .q-table__bottom { .stuList .q-table__bottom {
min-height: 0; min-height: 0;
} }
</style> </style>
<template> <template>
<div class="stuList"> <div class="stuList">
<q-table <q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat selection="multiple"
:pagination="pageMsg" :selected.sync="selection" class="sticky-right-column-table sticky-tow-column-table" separator="none"
:loading="loading" :data="dataList" :columns="columns" row-key="StuId" hide-bottom>
no-data-label="暂无相关数据"
flat
selection="multiple"
:selected.sync="selection"
class="sticky-right-column-table sticky-tow-column-table"
separator="none"
:data="dataList"
:columns="columns"
row-key="StuId"
hide-bottom
>
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">我的客户</div> <div class="col-2 q-table__title">我的客户</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn <q-btn color="accent" class="q-mr-md" size="sm" icon="swap_horiz" label="转订单" :disable="selection.length===0"
color="accent" @click="transferOrder" />
class="q-mr-md" <q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增客户" @click="EditStudent(null)" />
size="sm"
icon="swap_horiz"
label="转订单"
:disable="selection.length===0"
@click="transferOrder"
/>
<q-btn
color="accent"
class="q-mr-md"
size="sm"
icon="add"
label="新增客户"
@click="EditStudent(null)"
/>
</div> </div>
</template> </template>
<template v-slot:body-cell-StuIcon="props"> <template v-slot:body-cell-StuIcon="props">
...@@ -47,14 +22,8 @@ ...@@ -47,14 +22,8 @@
<q-avatar size="md" v-if="props.value"> <q-avatar size="md" v-if="props.value">
<img :src="props.value" /> <img :src="props.value" />
</q-avatar> </q-avatar>
<q-avatar <q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value">
size="md" {{ props.row.StuName.substring(0, 1) }}</q-avatar>
color="teal-10"
text-color="white"
v-if="!props.value"
>
{{ props.row.StuName.substring(0, 1) }}</q-avatar
>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StuName="props"> <template v-slot:body-cell-StuName="props">
...@@ -66,62 +35,32 @@ ...@@ -66,62 +35,32 @@
</template> </template>
<template v-slot:body-cell-StuSex="props"> <template v-slot:body-cell-StuSex="props">
<q-td :props="props"> <q-td :props="props">
<q-badge <q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 1 ? '女' : '男'" />
:color="props.value == 1 ? 'negative' : 'primary'"
:label="props.value == 1 ? '女' : '男'"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-toggle <q-toggle size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status"
size="md" title="注意:关闭后,学员将无法正常使用." @input="deleteStudentInfo(props.row)" />
color="primary"
:false-value="1"
:true-value="0"
v-model="props.row.Status"
title="注意:关闭后,学员将无法正常使用."
@input="deleteStudentInfo(props.row)"
/>
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<student-form <student-form v-if="isShowStuForm" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList">
v-if="isShowStuForm"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</student-form> </student-form>
<studentRight-form <studentRight-form v-if="isShowStuRight" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList">
v-if="isShowStuRight"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</studentRight-form> </studentRight-form>
<studentAdd-form <studentAdd-form v-if="isShowAdd" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList">
v-if="isShowAdd"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</studentAdd-form> </studentAdd-form>
<transfer-order <transfer-order v-if="isShowTransfer" :select="selection" @close="closeStuForm" @success="refreshStuList">
v-if="isShowTransfer"
:select="selection"
@close="closeStuForm"
@success="refreshStuList"
>
</transfer-order> </transfer-order>
</div> </div>
</template> </template>
<script> <script>
import studentForm from "./student-form"; import studentForm from "./student-form";
import studentRightForm from "./studentRight-form"; import studentRightForm from "./studentRight-form";
import studentAddForm from "./studentAdd-form"; import studentAddForm from "./studentAdd-form";
import transferOrder from "./transfer-order" import transferOrder from "./transfer-order"
export default { export default {
props: { props: {
dataList: { dataList: {
type: Array, type: Array,
...@@ -136,8 +75,7 @@ export default { ...@@ -136,8 +75,7 @@ export default {
}, },
data() { data() {
return { return {
columns: [ columns: [{
{
name: "StuIcon", name: "StuIcon",
label: "", label: "",
field: "StuIcon", field: "StuIcon",
...@@ -157,33 +95,33 @@ export default { ...@@ -157,33 +95,33 @@ export default {
align: "left" align: "left"
}, },
{ {
name: "StuBirth", name: "StuTel",
label: "出生日期", label: "电话",
field: "StuBirth", field: "StuTel",
align: "left" align: "left"
}, },
{ {
name: "StuTel", name: "StuStageName",
label: "手机号码", label: "客户阶段",
field: "StuTel", field: "StuStageName",
align: "left" align: "left"
}, },
{ {
name: "CreateTypeStr", name: "StuProfession",
label: "客户来源", label: "职业",
field: "CreateTypeStr", field: "StuProfession",
align: "left" align: "left"
}, },
{ {
name: "StuStageName", name: "StuEducationName",
label: "客户阶段", label: "学历",
field: "StuStageName", field: "StuEducationName",
align: "left" align: "left"
}, },
{ {
name: "CreateTimeStr", name: "StuPurposeName",
label: "创建时间", label: "目的",
field: "CreateTimeStr", field: "StuPurposeName",
align: "left" align: "left"
}, },
{ {
...@@ -191,6 +129,42 @@ export default { ...@@ -191,6 +129,42 @@ export default {
label: "负责人", label: "负责人",
align: "left", align: "left",
field: "CreateByName" field: "CreateByName"
},
{
name: "AssistList",
label: "协同人",
align: "left",
field: "AssistList"
},
{
name: "CreateTypeStr",
label: "获取渠道",
field: "CreateTypeStr",
align: "left"
},
{
name: "StuSourceIdName",
label: "关联人",
field: "StuSourceIdName",
align: "left"
},
{
name: "VisitCount",
label: "到访次数",
field: "VisitCount",
align: "left"
},
{
name: "TrialLessonCount",
label: "试听次数",
field: "TrialLessonCount",
align: "left"
},
{
name: "CreateTimeStr",
label: "创建时间",
field: "CreateTimeStr",
align: "left"
} }
], ],
pageMsg: { pageMsg: {
...@@ -203,7 +177,7 @@ export default { ...@@ -203,7 +177,7 @@ export default {
stuOption: null, stuOption: null,
isShowAdd: false, isShowAdd: false,
selection: [], selection: [],
isShowTransfer:false, isShowTransfer: false,
}; };
}, },
...@@ -287,8 +261,7 @@ export default { ...@@ -287,8 +261,7 @@ export default {
this.$q this.$q
.dialog({ .dialog({
title: str + "学员", title: str + "学员",
message: message: "你正在进行" + str + "学员行为,一旦执行无法找回,是否确认执行?",
"你正在进行" + str + "学员行为,一旦执行无法找回,是否确认执行?",
persistent: true, persistent: true,
cancel: { cancel: {
label: "取消", label: "取消",
...@@ -335,7 +308,7 @@ export default { ...@@ -335,7 +308,7 @@ export default {
this.isShowStuForm = false; this.isShowStuForm = false;
this.isShowStuRight = false; this.isShowStuRight = false;
this.isShowAdd = false; this.isShowAdd = false;
this.isShowTransfer=false; this.isShowTransfer = false;
}, },
//点击学生姓名弹出 //点击学生姓名弹出
getStuRight(obj) { getStuRight(obj) {
...@@ -346,12 +319,12 @@ export default { ...@@ -346,12 +319,12 @@ export default {
} }
this.isShowStuRight = true; this.isShowStuRight = true;
}, },
transferOrder(){ transferOrder() {
const firstId=this.selection[0].CustomerId const firstId = this.selection[0].CustomerId
const flag= this.selection.every(e=>{ const flag = this.selection.every(e => {
return e.CustomerId==firstId return e.CustomerId == firstId
}) })
if(!flag){ if (!flag) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -359,8 +332,8 @@ export default { ...@@ -359,8 +332,8 @@ export default {
}) })
return return
} }
this.isShowTransfer=true this.isShowTransfer = true
} }
} }
}; };
</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