Commit 00c093eb authored by 罗超's avatar 罗超
parents bc572a01 f451a9b3
...@@ -403,10 +403,10 @@ export function GetAssistTypeList(data) { ...@@ -403,10 +403,10 @@ export function GetAssistTypeList(data) {
}); });
} }
// 保存协助数据 // 获取学生是否续费
export function SetStudentAssist(data) { export function getOrderGuestRenewState(data) {
return request({ return request({
url: '/CustomerStudent/SetStudentAssist', url: '/order/GetOrderGuestRenewState',
method: 'post', method: 'post',
data data
}); });
......
...@@ -78,14 +78,11 @@ ...@@ -78,14 +78,11 @@
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12"
label="成交单价" :rules="[val => !!val || '请填成交单价']" /> label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<!-- <q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" /> -->
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10" <q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" :value="OrderMsg.Class_Price*OrderMsg.GuestNum*(1-OrderMsg.B2CRatio)" class="col-12 q-pb-lg" @keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" /> label="应收" />
<q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name" <q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg" v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg"
label="客人来源" /> label="客人来源" />
...@@ -100,6 +97,17 @@ ...@@ -100,6 +97,17 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-select :disable="(modityOrderType==2)||(OrderMsg.JoinType==3)" v-model="OrderMsg.CourseConsultantId"
:options="EmployeeList" filled use-input label="课程顾问" option-label="EmployeeName" option-value="Id"
ref="EmployeeName" class="col-6 q-pb-lg" emit-value map-options @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-select :disable="(modityOrderType==2)||(OrderMsg.JoinType==3)" v-model="OrderMsg.CustomerId" <q-select :disable="(modityOrderType==2)||(OrderMsg.JoinType==3)" v-model="OrderMsg.CustomerId"
:options="myCustomerList" filled use-input label="同行" option-label="CustomerName" option-value="CustomerId" :options="myCustomerList" filled use-input label="同行" option-label="CustomerName" option-value="CustomerId"
ref="CustomerName" class="col-6 q-pb-lg" emit-value map-options @filter="cusfilterFn"> ref="CustomerName" class="col-6 q-pb-lg" emit-value map-options @filter="cusfilterFn">
...@@ -183,7 +191,7 @@ ...@@ -183,7 +191,7 @@
B2CReNewRatio:0, B2CReNewRatio:0,
CustomerId:0,//市场专员 CustomerId:0,//市场专员
Unit_Price: 0, Unit_Price: 0,
PreferPrice: 0, PreferPrice: 0,//应收
OrderSource: 0, OrderSource: 0,
SaleRemark: "", SaleRemark: "",
Class_Price: 0, //单价 Class_Price: 0, //单价
...@@ -206,6 +214,8 @@ ...@@ -206,6 +214,8 @@
JoinType: 1, //订单报入类型 JoinType: 1, //订单报入类型
DiscountMoney: 0, //优惠金额 DiscountMoney: 0, //优惠金额
PerDiscountMoney: 0, //每人优惠金额 PerDiscountMoney: 0, //每人优惠金额
CourseConsultantId:0,//课程顾问
CustomerId:0,//同行
}, },
Unit_PriceRemark: "", //单价规则 Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价 IsShowUpPrice: false, //是否显示高于定价
...@@ -307,7 +317,8 @@ ...@@ -307,7 +317,8 @@
} }
var perDiscountMoney = Number(tempDiscountMoney).toFixed(2); var perDiscountMoney = Number(tempDiscountMoney).toFixed(2);
this.OrderMsg.PerDiscountMoney = perDiscountMoney; this.OrderMsg.PerDiscountMoney = perDiscountMoney;
this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum; // this.OrderMsg.DiscountMoney = perDiscountMoney * guestNum;
this.OrderMsg.DiscountMoney=this.OrderMsg.Class_Price*this.OrderMsg.GuestNum*this.OrderMsg.B2CRatio
//计算每人优惠和总优惠 //计算每人优惠和总优惠
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
this.OrderMsg.Unit_Price = chaBanPrice; this.OrderMsg.Unit_Price = chaBanPrice;
...@@ -394,6 +405,7 @@ ...@@ -394,6 +405,7 @@
this.OrderMsg.B2CRatio = tempData.B2CRatio>1?(tempData.B2CRatio/100):tempData.B2CRatio; this.OrderMsg.B2CRatio = tempData.B2CRatio>1?(tempData.B2CRatio/100):tempData.B2CRatio;
this.OrderMsg.B2CReNewRatio = tempData.B2CReNewRatio>1?(tempData.B2CReNewRatio/100):tempData.B2CReNewRatio; this.OrderMsg.B2CReNewRatio = tempData.B2CReNewRatio>1?(tempData.B2CReNewRatio/100):tempData.B2CReNewRatio;
this.OrderMsg.CustomerId=tempData.CustomerId this.OrderMsg.CustomerId=tempData.CustomerId
this.OrderMsg.CourseConsultantId=tempData.CourseConsultantId
this.UnitPrice = this.OrderMsg.Unit_Price; this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
} }
...@@ -420,6 +432,7 @@ ...@@ -420,6 +432,7 @@
this.OrderMsg.B2CRatio = 0; this.OrderMsg.B2CRatio = 0;
this.OrderMsg.B2CReNewRatio = 0; this.OrderMsg.B2CReNewRatio = 0;
this.OrderMsg.CustomerId=0; this.OrderMsg.CustomerId=0;
this.OrderMsg.CourseConsultantId=0;
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1; this.OrderMsg.OrderNature = 1;
} }
...@@ -442,14 +455,15 @@ ...@@ -442,14 +455,15 @@
this.OrderMsg.CourseId = ''; this.OrderMsg.CourseId = '';
} }
if(this.saveObj.B2CRatio){ if(this.saveObj.B2CRatio){
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio; this.OrderMsg.B2CRatio = this.saveObj.B2CRatio>1?this.saveObj.B2CRatio/100:this.saveObj.B2CRatio;
} }
if(this.saveObj.B2CReNewRatio){ if(this.saveObj.B2CReNewRatio){
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio; this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio>1?this.saveObj.B2CReNewRatio/100:this.saveObj.B2CReNewRatio;
} }
} }
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
this.calcPrice(); this.calcPrice();
console.log("this.saveObj",this.saveObj)
} }
}, },
//筛选员工 //筛选员工
...@@ -463,7 +477,7 @@ ...@@ -463,7 +477,7 @@
} }
}) })
}, },
//筛选市场专员 //筛选同行
cusfilterFn(val, update) { cusfilterFn(val, update) {
update(() => { update(() => {
if (val === '') { if (val === '') {
...@@ -601,6 +615,10 @@ ...@@ -601,6 +615,10 @@
getMyCustomerList({}).then(res=>{ getMyCustomerList({}).then(res=>{
this.myCustomerList=res.Data this.myCustomerList=res.Data
this.allCustomerList=res.Data this.allCustomerList=res.Data
this.myCustomerList.unshift({
CustomerId:0,
CustomerName:"不限"
})
}) })
} }
} }
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<div class="visit_Cont"> <div class="visit_Cont">
<div class="Log_Content"> <div class="Log_Content">
<div>到访校区:{{tItem.SchoolName}}</div> <div>到访校区:{{tItem.SchoolName}}</div>
<div>到访时间:{{tItem.Date}} {{tItem.VisitTime}}</div>
<div class="StuCom_Remark"> <div class="StuCom_Remark">
<span class="StuCom_Left">接待人</span> <span class="StuCom_Left">接待人</span>
{{tItem.ReceptionPersionName}} {{tItem.ReceptionPersionName}}
......
<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 :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat <q-table
class="sticky-right-column-table sticky-tow-column-table" separator="none" :data="dataList" :pagination="pageMsg"
:columns="columns" row-key="name" hide-bottom> :loading="loading"
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 color="accent" size="md" icon="add" label="新增客户" @click="EditStudent(null)" /> <q-btn
color="accent"
class="q-mr-md"
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">
...@@ -20,120 +47,165 @@ ...@@ -20,120 +47,165 @@
<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 size="md" color="teal-10" text-color="white" v-if="!props.value"> <q-avatar
{{props.row.StuName.substring(0,1)}}</q-avatar> size="md"
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">
<q-td :props="props"> <q-td :props="props">
<div class="text-blue cursor-pointer" @click="getStuRight(props.row)">{{props.value}}</div> <div class="text-blue cursor-pointer" @click="getStuRight(props.row)">
{{ props.value }}
</div>
</q-td> </q-td>
</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 :color="props.value==1?'negative':'primary'" :label="props.value==1?'女':'男'" /> <q-badge
: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 size="md" color="primary" :false-value="1" :true-value="0" v-model="props.row.Status" <q-toggle
title="注意:关闭后,学员将无法正常使用." @input="deleteStudentInfo(props.row)" /> size="md"
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 v-if="isShowStuForm" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList"> <student-form
v-if="isShowStuForm"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</student-form> </student-form>
<studentRight-form v-if="isShowStuRight" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList"> <studentRight-form
v-if="isShowStuRight"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</studentRight-form> </studentRight-form>
<studentAdd-form v-if="isShowAdd" :save-obj="stuOption" @close="closeStuForm" @success="refreshStuList"> <studentAdd-form
v-if="isShowAdd"
:save-obj="stuOption"
@close="closeStuForm"
@success="refreshStuList"
>
</studentAdd-form> </studentAdd-form>
<transfer-order
v-if="isShowTransfer"
:select="selection"
@close="closeStuForm"
@success="refreshStuList"
>
</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";
export default { import transferOrder from "./transfer-order"
export default {
props: { props: {
dataList: { dataList: {
type: Array, type: Array,
default: null default: null
}, }
}, },
components: { components: {
studentForm, studentForm,
studentRightForm, studentRightForm,
studentAddForm studentAddForm,
transferOrder
}, },
data() { data() {
return { return {
columns: [{ columns: [
name: 'StuIcon', {
label: '', name: "StuIcon",
field: 'StuIcon', label: "",
align: 'left', field: "StuIcon",
align: "left"
}, },
{ {
name: 'StuName', name: "StuName",
required: true, required: true,
label: '昵称', label: "昵称",
align: 'left', align: "left",
field: row => row.StuName field: row => row.StuName
}, },
{ {
name: 'StuSex', name: "StuSex",
label: '性别', label: "性别",
field: 'StuSex', field: "StuSex",
align: 'left' align: "left"
}, },
{ {
name: 'StuBirth', name: "StuBirth",
label: '出生日期', label: "出生日期",
field: 'StuBirth', field: "StuBirth",
align: 'left' align: "left"
}, },
{ {
name: 'StuTel', name: "StuTel",
label: '手机号码', label: "手机号码",
field: 'StuTel', field: "StuTel",
align: 'left' align: "left"
}, },
{ {
name: 'CreateTypeStr', name: "CreateTypeStr",
label: '客户来源', label: "客户来源",
field: 'CreateTypeStr', field: "CreateTypeStr",
align: 'left', align: "left"
}, },
{ {
name: 'StuStageName', name: "StuStageName",
label: '客户阶段', label: "客户阶段",
field: 'StuStageName', field: "StuStageName",
align: 'left', align: "left"
}, },
{ {
name: 'CreateTimeStr', name: "CreateTimeStr",
label: '创建时间', label: "创建时间",
field: 'CreateTimeStr', field: "CreateTimeStr",
align: 'left', align: "left"
}, },
{ {
name: 'CreateByName', name: "CreateByName",
label: '负责人', label: "负责人",
align: 'left', align: "left",
field: 'CreateByName' field: "CreateByName"
} }
], ],
pageMsg: { pageMsg: {
rowsPerPage: 12, rowsPerPage: 12
}, },
loading: false, loading: false,
isShowStuForm: false, isShowStuForm: false,
resetLoading: false, resetLoading: false,
isShowStuRight: false, isShowStuRight: false,
stuOption: null, stuOption: null,
isShowAdd:false isShowAdd: false,
} selection: [],
isShowTransfer:false,
};
}, },
created() { created() {
this.initAuth(); this.initAuth();
...@@ -141,16 +213,15 @@ ...@@ -141,16 +213,15 @@
mounted() {}, mounted() {},
methods: { methods: {
//初始化权限 //初始化权限
initAuth() { initAuth() {},
},
//创建账号 //创建账号
createAccount(id) { createAccount(id) {
let that = this let that = this;
createStudentAccount({ createStudentAccount({
StuId: id, StuId: id
}).then(res => { }).then(res => {
that.$q.dialog({ that.$q
.dialog({
title: "创建账号", title: "创建账号",
message: res.Message, message: res.Message,
persistent: true, persistent: true,
...@@ -159,16 +230,19 @@ ...@@ -159,16 +230,19 @@
flat: true, flat: true,
focus: true focus: true
} }
}).onOk(() => {
that.getStudent();
}).onCancel(() => {
that.getStudent();
}) })
.onOk(() => {
that.getStudent();
}) })
.onCancel(() => {
that.getStudent();
});
});
}, },
resetPw(id) { resetPw(id) {
let that = this let that = this;
this.$q.dialog({ this.$q
.dialog({
title: "重置密码", title: "重置密码",
message: "你正在进行重置密码行为,是否确认执行", message: "你正在进行重置密码行为,是否确认执行",
persistent: true, persistent: true,
...@@ -181,13 +255,15 @@ ...@@ -181,13 +255,15 @@
flat: true, flat: true,
focus: true focus: true
} }
}).onOk(() => { })
that.resetLoading = true .onOk(() => {
that.resetLoading = true;
resetPassword({ resetPassword({
AccountType: 4, AccountType: 4,
AccountId: id AccountId: id
}).then(res => { })
that.resetLoading = false .then(res => {
that.resetLoading = false;
that.$q.dialog({ that.$q.dialog({
title: "密码重置成功", title: "密码重置成功",
message: res.Message, message: res.Message,
...@@ -197,19 +273,22 @@ ...@@ -197,19 +273,22 @@
flat: true, flat: true,
focus: true focus: true
} }
});
}) })
}).catch(() => { .catch(() => {
that.resetLoading = false that.resetLoading = false;
}); });
}); });
}, },
//删除客户资料 //删除客户资料
deleteStudentInfo(obj) { deleteStudentInfo(obj) {
let that = this; let that = this;
var str = (obj.Status == 1 ? "【禁用】" : "【启用】"); var str = obj.Status == 1 ? "【禁用】" : "【启用】";
this.$q.dialog({ this.$q
.dialog({
title: str + "学员", title: str + "学员",
message: "你正在进行" + str + "学员行为,一旦执行无法找回,是否确认执行?", message:
"你正在进行" + str + "学员行为,一旦执行无法找回,是否确认执行?",
persistent: true, persistent: true,
cancel: { cancel: {
label: "取消", label: "取消",
...@@ -220,27 +299,29 @@ ...@@ -220,27 +299,29 @@
flat: true, flat: true,
focus: true focus: true
} }
}).onOk(() => { })
that.resetLoading = true .onOk(() => {
that.resetLoading = true;
deleteStudent({ deleteStudent({
StuId: obj.StuId, StuId: obj.StuId,
Status: obj.Status Status: obj.Status
}).then(res => { }).then(res => {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: "iconfont icon-chenggong",
color: 'accent', color: "accent",
timeout: 2000, timeout: 2000,
message: '数据操作成功!', message: "数据操作成功!",
position: 'top' position: "top"
}) });
this.getStudent() this.getStudent();
});
}) })
}).onCancel(() => { .onCancel(() => {
obj.Status = obj.Status == 1 ? 0 : 1; obj.Status = obj.Status == 1 ? 0 : 1;
}); });
}, },
refreshStuList() { refreshStuList() {
this.$emit('success'); this.$emit("success");
}, },
EditStudent(obj) { EditStudent(obj) {
if (obj) { if (obj) {
...@@ -254,6 +335,7 @@ ...@@ -254,6 +335,7 @@
this.isShowStuForm = false; this.isShowStuForm = false;
this.isShowStuRight = false; this.isShowStuRight = false;
this.isShowAdd = false; this.isShowAdd = false;
this.isShowTransfer=false;
}, },
//点击学生姓名弹出 //点击学生姓名弹出
getStuRight(obj) { getStuRight(obj) {
...@@ -263,7 +345,22 @@ ...@@ -263,7 +345,22 @@
this.stuOption = null; this.stuOption = null;
} }
this.isShowStuRight = true; this.isShowStuRight = true;
},
transferOrder(){
const firstId=this.selection[0].CustomerId
const flag= this.selection.every(e=>{
return e.CustomerId==firstId
})
if(!flag){
this.$q.notify({
type: 'negative',
position: "top",
message: `负责人不一致,请重新选择`
})
return
} }
this.isShowTransfer=true
} }
} }
};
</script> </script>
div<template>
<q-dialog
v-model="persistent"
persistent
content-class="bg-grey-1"
transition-show="scale"
transition-hide="scale"
class="addactivetype"
@hide="$emit('close')"
>
<q-card style="width: 800px;max-width:800px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">转订单</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-stepper v-model="step" ref="stepper" color="primary" animated flat>
<q-step :name="1" title="选择班级" icon="settings" :done="step > 1">
<div class="row">
<q-select
v-model="OrderMsg.ClassId"
:options="ClassList"
filled
use-input
label="选择班级"
option-label="ClassName"
option-value="ClassId"
ref="ClassName"
class="col-6"
emit-value
map-options
@filter="filterClass"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</q-step>
<q-step :name="2" title="选择课程" icon="settings" :done="step > 2">
<div class="row">
<q-select
v-model="OrderMsg.HelpEnterId"
:options="EmployeeList"
filled
use-input
label="选择课程"
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName"
class="col-6 q-pb-lg"
emit-value
map-options
@filter="classFilterClass"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</q-step>
<q-step :name="3" title="选择" :done="step > 3">
<q-table
:data="data.StuList"
:columns="columns"
flat
row-key="StuId"
>
<template v-slot:body-cell-IsRenewGuest="props">
<q-td :props="props">
<span v-if="props.row.IsRenewGuest === 0"></span>
<span v-if="props.row.IsRenewGuest === 1"></span>
</q-td>
</template>
<template v-slot:bottom> </template>
</q-table>
</q-step>
<q-step :name="4" title="确认" icon="settings" :done="step > 4">
<div class="row">
<q-input
filled
stack-label
:dense="false"
v-model="OrderMsg.GuestNum"
class="col-12"
label="人数"
disable
/>
</div>
</q-step>
</q-stepper>
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn
label="取消"
flat
color="grey-10"
style="font-weight:400 !important"
v-close-popup
/>
<q-btn
@click="$refs.stepper.previous()"
color="primary"
label="上一步"
v-if="step >1"
/>
<q-btn
@click="$refs.stepper.next()"
color="primary"
label="下一步"
v-if="step <4"
/>
<q-btn label="保存" color="primary" @click="" v-if="step == 4" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
getClassPruductList,//
setClassOrder,
getOrderGuestRenewState
} from "../../../api/sale/sale";
import {
getClassDropDownList,//获取班级下拉列表
} from '../../../api/school/index'
export default {
props: {
select: {
type: Array,
default: () => []
}
},
data() {
return {
persistent: true,
step: 1,
data: {},
columns: [
{
name: "StuName",
label: "名称",
field: "StuName",
align: "left"
},
{
name: "StuTel",
label: "电话",
align: "left",
field: "StuTel"
},
{
name: "IsRenewGuest",
label: "是否续费",
field: "IsRenewGuest",
align: "left"
}
],
OrderMsg: {
ClassId: 0, //班级编号
GuestNum: 0, //人数
B2CRatio: 0,
B2CReNewRatio: 0,
CustomerId: 0, //市场专员
Unit_Price: 0,
PreferPrice: 0,
OrderSource: 0,
SaleRemark: "",
Class_Price: 0, //单价
OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号
HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少
LessPrice: 0, //少价金额
PerLessMoney: 0, //每人少价金额
OrderNature: 1, //订单性质
OldPreferPrice: 0, //原实际应收
IsChaBan: 0, //是否插班报入(1-是)
CourseId: "", //课程编号
StartClassHours: 0, //已上课时
EffectTime: "", //生效时间
UpOrderId: 0, //前置订单编号
JoinType: 1, //订单报入类型
DiscountMoney: 0, //优惠金额
PerDiscountMoney: 0 //每人优惠金额
},
ClassList:[],
allClassList:[],
};
},
mounted() {
this.getOrderGuestRenewState();
this.getClass();
},
methods: {
getOrderGuestRenewState() {
const ids = this.select.map(e => e.StuId).toString();
getOrderGuestRenewState({ StuIds: ids }).then(res => {
console.log("res", res);
this.data = res.Data;
});
},
//获取班级下拉
getClass() {
getClassDropDownList({
CourseId: 0,
IsAddDefault: 0, //添加默认选项
}).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
jsonData.unshift({
ClassId: 0,
ClassName: "不限"
})
if (jsonData && jsonData.length > 0) {
this.ClassList = JSON.parse(JSON.stringify(jsonData));
this.allClassList = JSON.parse(JSON.stringify(jsonData));;
}
}
});
},
//筛选班级
filterClass(val, update) {
update(() => {
if (val === '') {
this.ClassList = JSON.parse(JSON.stringify(this.allClassList))
} else {
const needle = val.toLowerCase()
this.ClassList = this.allClassList.filter(v => v.ClassName.toLowerCase().indexOf(needle) > -1)
}
})
},
}
};
</script>
<style scoped></style>
<template>
<div class="page-body japaneseTrain">
<div class="page-content">
<div>
<span
style="font-size: 20px;font-weight: bold;font-family:'perfectFont' "
></span
>
</div>
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table"
separator="none"
:data="dataList"
:columns="columns"
row-key="name"
title="日语培训产品列表"
>
<template v-slot:body-cell-ClassName="props">
<q-td :props="props" style="padding-right: 0px">
{{ props.row.ClassName }}{{ props.row.ClassNo }}
</q-td>
</template>
<template v-slot:bottom>
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
color="primary"
:max="pageCount"
:input="true"
@input="changePage"
/>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
getClassPruductList, //获取日语培训列表
setClassOrder //新增 修改订单
} from "../../api/sale/sale";
import {
getSchoolDropdown, //获取校区列表
getTeacherDropDownList
} from "../../api/school/index";
import {
queryCourseDropdownList,
getCourseSubject
} from "../../api/course/index";
import editorderForm from "../../components/sale/editorder-form"; //修改订单
export default {
meta: {
title: "日语培训"
},
components: {
editorderForm
},
data() {
return {
dialog: false,
data: [],
loading: false,
dateList: [], //开学时间
msg: {
pageIndex: 1,
pageSize: 10,
ClassName: "", //班级名称
StartTime: "", //开始时间
EndTime: "", //结束时间
School_Id: "", //关联校区
CouseId: 0, //课程id
Teacher_Id: 0, //教师id
Q_CanApply: "0", //是否可以报名 1是
JoinStartTime: "", //报名截止日期开始
JoinEndTime: "", //报名截止日期结束
ClassNo: "", //班号
CourseSubject: "" //所属科目
},
//关联校区列表
schoolList: [],
pageCount: 0,
ClassList: [], //关联课程下拉数据
TeacherList: [], //关联教师下拉数据
elvalue: new Date(),
isShowEditOrderForm: false, //是否显示订单弹窗
//订单对象
orderObj: {
ClassId: 0,
Unit_Price: 0,
CourseId: 0
},
isChaBan: 0, //是否插班(0-正常报入,1-插班报入)
CourseSubjectList: [], //科目列表
myClassList: []
};
},
created() {
this.getSchool();
this.queryCourseSubject();
this.CourseList();
this.GetTeacherList();
if (this.$route.query && this.$route.query.ClassName) {
this.msg.ClassName = decodeURI(this.$route.query.ClassName);
}
if (this.$route.query && this.$route.query.ClassNo) {
this.msg.ClassNo = this.$route.query.ClassNo;
}
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
var currentDay = year + "-" + month + "-" + day;
this.msg.StartTime = currentDay;
},
mounted() {
this.getList();
},
methods: {
//课程筛选
filterCourseFn(val, update, abort) {
update(() => {
this.myClassList = this.ClassList.filter(
v => v.CourseName.indexOf(val) > -1
);
});
},
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
});
},
//关闭订单修改
closeOrderSaveForm() {
this.isShowEditOrderForm = false;
},
refreshOrder() {
this.getList();
},
//跳转到班级订单
goclassorder(item) {
var tempStr = "/course/classorder?ClassId=" + item.ClassId;
this.$router.push({
path: tempStr
});
},
//获取校区列表
getSchool() {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
this.schoolList = tempArray;
}
});
},
//判断是否过期
getEXPDate(time) {
var str = time
.replace(/年/g, "/")
.replace(/月/g, "/")
.replace(/日/g, "");
var date = new Date(str).getTime();
var now = new Date().getTime() + 86400;
if (date < now) {
return true; //过期
} else {
return false; //没过期
}
},
//获取课程
CourseList() {
queryCourseDropdownList({}).then(res => {
if (res.Code == 1) {
this.ClassList = res.Data;
this.ClassList.unshift({
CourseId: 0,
CourseName: "不限"
});
this.myClassList = this.ClassList;
}
});
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.TeacherList.unshift({
TId: 0,
TeacherName: "不限"
});
}
});
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//获取菜单分页列表
getList() {
this.loading = true;
getClassPruductList(this.msg)
.then(res => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
this.data.forEach(x => {
if (x.ClassStyle == 1) {
let weekList = [
//定义一个数组
{
id: 7,
select: false
},
{
id: 1,
select: false
},
{
id: 2,
select: false
},
{
id: 3,
select: false
},
{
id: 4,
select: false
},
{
id: 5,
select: false
},
{
id: 6,
select: false
}
];
weekList.forEach(j => {
x.ClassPlanList.forEach(z => {
if (j.id == z.WeekDay) {
j.select = true;
}
});
});
x.weeks = weekList;
} else if (x.ClassStyle == 2) {
let data = [];
for (let i = 0; i < 31; i++) {
let obj = {
name: i + 1,
select: false
};
x.ClassPlanList.forEach(j => {
if (j.WeekDay == i + 1) {
obj.select = true;
}
});
data.push(obj);
}
x.month = data;
}
});
})
.catch(() => {
this.loading = false;
});
},
//立即报名和插班报名
placeAnorder(item, type) {
if (item.Teacher_Id == 0) {
this.$q.notify({
type: "negative",
position: "top",
message: `请联系班级管理员,关联班级老师后报名`
});
return;
}
this.isChaBan = type;
this.orderObj.ClassId = item.ClassId;
this.orderObj.Unit_Price = item.SellPrice;
this.orderObj.CourseId = item.CouseId;
this.orderObj.B2CRatio = item.B2CRatio;
this.orderObj.B2CReNewRatio = item.B2CReNewRatio;
this.isShowEditOrderForm = true;
},
//跳转到课程大纲
goChapter(CouseId) {
this.OpenNewUrl("/course/chapter", {
CourseId: CouseId
});
}
}
};
</script>
<style>
li {
list-style-type: none;
}
.japaneseTrain ul {
padding: 0px;
}
.japaneseTrain li {
background: rgba(221, 222, 224, 0.2);
border-radius: 4px;
margin-top: 15px;
}
.japaneseTrain li .dline {
display: table;
width: 100%;
display: flex;
flex-direction: row;
}
.japaneseTrain li .d1,
.japaneseTrain li .d2,
.japaneseTrain li .d3,
.japaneseTrain li .d4,
.japaneseTrain li .d5 {
width: 18%;
padding: 20px 20px 10px;
}
.japaneseTrain li .d7 {
flex: 1;
width: 1px;
flex-direction: row;
align-items: center;
justify-content: center;
}
.japaneseTrain li .d1 .di-title {
font-size: 16px;
color: #111111;
}
.japaneseTrain li .d1 .di-c {
font-size: 14px;
display: flex;
align-items: center;
line-height: 28px;
color: #111111;
}
.japaneseTrain li .d6 {
padding: 10px 20px;
width: 100%;
height: inherit;
position: relative;
border-top: 1px solid #dddee0;
}
.japaneseTrain li .d6 .progress {
width: 100%;
height: 5px;
position: absolute;
left: 0;
bottom: 0;
}
.japaneseTrain li .d2 > div {
margin: 10px 0;
font-size: 14px;
color: #111111;
}
.japaneseTrain li .d2-n {
font-size: 12px;
color: #999999;
margin-right: 20px;
}
.japaneseTrain li .d3 .d3-s {
color: var(--q-color-negative);
font-weight: bold;
}
.japaneseTrain li .d3 div {
margin: 10px 0;
font-size: 14px;
}
.japaneseTrain li .d4 div {
font-size: 14px;
color: #111111;
margin: 10px 0;
}
.japaneseTrain li .d5 div {
font-size: 14px;
color: #111111;
margin: 10px 0;
}
.japaneseTrain .price-popup {
border-radius: 4px;
}
.japaneseTrain .el-range-editor .el-range-input {
background: none;
}
.japaneseTrain .el-range-editor.el-input__inner {
background-color: transparent;
}
.japaneseTrain .q-mb-md {
margin-bottom: 0;
}
.japaneseTrain .month-item {
display: inline-block;
width: 45.5px;
height: 45.4px;
line-height: 45.4px;
text-align: center;
font-size: 12px;
color: #2d2d2d;
}
.price-popup .el-calendar-table .el-calendar-day {
height: 60px;
}
.japaneseTrain .el-input__inner {
border: none !important;
background: transparent !important;
}
.japanFeature {
font-size: 14px;
color: #111111;
cursor: pointer;
margin-left: -1px;
}
.CourseFearure {
margin: 10px;
width: 500px;
color: #000;
}
</style>
...@@ -564,6 +564,8 @@ ...@@ -564,6 +564,8 @@
this.orderObj.ClassId = item.ClassId; this.orderObj.ClassId = item.ClassId;
this.orderObj.Unit_Price = item.SellPrice; this.orderObj.Unit_Price = item.SellPrice;
this.orderObj.CourseId = item.CouseId; this.orderObj.CourseId = item.CouseId;
this.orderObj.B2CRatio=item.B2CRatio;
this.orderObj.B2CReNewRatio=item.B2CReNewRatio;
this.isShowEditOrderForm = true; this.isShowEditOrderForm = true;
}, },
//跳转到课程大纲 //跳转到课程大纲
......
...@@ -3,56 +3,112 @@ ...@@ -3,56 +3,112 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.StuName" label="昵称" maxlength="20" /> <q-input
@input="resetSearch"
clearable
filled
v-model="msg.StuName"
label="昵称"
maxlength="20"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.StuTel" label="电话" maxlength="20" /> <q-input
@input="resetSearch"
clearable
filled
v-model="msg.StuTel"
label="电话"
maxlength="20"
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" filled v-model="msg.StuStage" :options="customState" option-label="Name" <q-select
option-value="Id" emit-value map-options label="客户状态" clearable /> @input="resetSearch"
filled
v-model="msg.StuStage"
:options="customState"
option-label="Name"
option-value="Id"
emit-value
map-options
label="客户状态"
clearable
/>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-field filled> <q-field filled>
 <template v-slot:control> <template v-slot:control>
<el-date-picker v-model="dateArray" @change="resetSearch" value-format="yyyy-MM-dd" type="daterange" style="border:none;" <el-date-picker
 range-separator="至"  start-placeholder="开始时间"  end-placeholder="结束时间" />     v-model="dateArray"
@change="resetSearch"
value-format="yyyy-MM-dd"
type="daterange"
style="border:none;"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
/>
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-3">
<q-select
@input="resetSearch"
v-model="msg.CustomerId"
:options="myCustomerList"
filled
use-input
label="同行"
option-label="CustomerName"
option-value="CustomerId"
ref="CustomerName"
class="col-6 q-pb-lg"
emit-value
map-options
@filter="cusfilterFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div> </div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增客户" @click="EditStudent(null)" />
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<stulist :dataList="data" @success="refreshPage" ref="stuList"> <stulist :dataList="data" @success="refreshPage" ref="stuList"> </stulist>
</stulist>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end" <q-pagination
color="primary" :input="true"> v-model="msg.pageIndex"
:max="pageCount"
@input="changePage"
class="full-width justify-end"
color="primary"
:input="true"
>
</q-pagination> </q-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
getStudentPage, getStudentPage,
getSchoolDropdown, getSchoolDropdown,
deleteStudent, deleteStudent,
createStudentAccount, createStudentAccount,
queryStuStageList queryStuStageList
} from '../../api/school/index' } from "../../api/school/index";
import { import { queryEmployee } from "../../api/users/user";
queryEmployee import { resetPassword } from "../../api/users/user.js";
} from '../../api/users/user'
import {
resetPassword
} from '../../api/users/user.js'
import stulist from '../../components/school/student/stulist' import stulist from "../../components/school/student/stulist";
export default { import { getMyCustomerList } from "../../api/sale/sale";
export default {
meta: { meta: {
title: "客户管理" title: "客户管理"
}, },
...@@ -76,31 +132,35 @@ ...@@ -76,31 +132,35 @@
StuStage: "", //客户阶段 StuStage: "", //客户阶段
StartTime: "", //开始时间 StartTime: "", //开始时间
EndTime: "", //结束时间 EndTime: "", //结束时间
CustomerId: 0
}, },
dateArray: [], //日期数组 dateArray: [], //日期数组
pageCount: 0, pageCount: 0,
//客户阶段状态列表 //客户阶段状态列表
customState: [], customState: [],
} myCustomerList: [], //同行列表
allCustomerList: [] //所有同行列表
};
}, },
created() { created() {
this.getSchool(); this.getSchool();
this.getStuStageList(); this.getStuStageList();
}, },
mounted() { mounted() {
this.currentUrl = this.$route.path this.currentUrl = this.$route.path;
this.getStudent() this.getStudent();
this.getCustomerList();
}, },
methods: { methods: {
//获取客户阶段列表 //获取客户阶段列表
getStuStageList() { getStuStageList() {
queryStuStageList().then(res => { queryStuStageList().then(res => {
this.customState = res.Data; this.customState = res.Data;
}) });
}, },
resetSearch() { resetSearch() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.getStudent() this.getStudent();
}, },
changePage(val) { changePage(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
...@@ -109,31 +169,57 @@ ...@@ -109,31 +169,57 @@
getSchool() { getSchool() {
getSchoolDropdown({}).then(res => { getSchoolDropdown({}).then(res => {
this.schoolList = res.Data; this.schoolList = res.Data;
}) });
}, },
getStudent() { getStudent() {
if (this.dateArray && this.dateArray.length > 0) { if (this.dateArray && this.dateArray.length > 0) {
this.msg.StartTime = this.dateArray[0]; this.msg.StartTime = this.dateArray[0];
this.msg.EndTime = this.dateArray[1]; this.msg.EndTime = this.dateArray[1];
} else { } else {
this.msg.StartTime = ''; this.msg.StartTime = "";
this.msg.EndTime = ''; this.msg.EndTime = "";
} }
this.loading = true; this.loading = true;
getStudentPage(this.msg).then(res => { getStudentPage(this.msg)
.then(res => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
}) })
.catch(() => {
this.loading = false;
});
}, },
refreshPage() { refreshPage() {
this.getStudent() this.getStudent();
}, },
getCustomerList() {
getMyCustomerList({}).then(res => {
this.myCustomerList = res.Data;
this.allCustomerList = res.Data;
this.myCustomerList.unshift({
CustomerName:"不限",
CustomerId:0,
})
});
}, },
cusfilterFn(val, update) {
update(() => {
if (val === "") {
this.myCustomerList = JSON.parse(
JSON.stringify(this.allCustomerList)
);
} else {
const needle = val.toLowerCase();
this.myCustomerList = this.allCustomerList.filter(
v => v.CustomerName.toLowerCase().indexOf(needle) > -1
);
}
});
}
} }
};
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
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