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" <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" @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"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" :value="OrderMsg.Class_Price*OrderMsg.GuestNum*(1-OrderMsg.B2CRatio)" 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}}
......
This diff is collapsed.
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>
This diff is collapsed.
...@@ -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,137 +3,223 @@ ...@@ -3,137 +3,223 @@
<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> <div class="col-3">
<div class="page-option"> <q-select
<q-btn color="accent" class="q-mr-md" icon="add" label="新增客户" @click="EditStudent(null)" /> @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>
</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";
meta: { export default {
title: "客户管理" meta: {
title: "客户管理"
},
components: {
stulist
},
data() {
return {
currentUrl: "",
data: [],
loading: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
StuName: "",
StuTel: "",
Status: "-1",
CreateBy: "",
IsQueryMyStu: 1,
StuStage: "", //客户阶段
StartTime: "", //开始时间
EndTime: "", //结束时间
CustomerId: 0
},
dateArray: [], //日期数组
pageCount: 0,
//客户阶段状态列表
customState: [],
myCustomerList: [], //同行列表
allCustomerList: [] //所有同行列表
};
},
created() {
this.getSchool();
this.getStuStageList();
},
mounted() {
this.currentUrl = this.$route.path;
this.getStudent();
this.getCustomerList();
},
methods: {
//获取客户阶段列表
getStuStageList() {
queryStuStageList().then(res => {
this.customState = res.Data;
});
}, },
components: { resetSearch() {
stulist this.msg.pageIndex = 1;
this.getStudent();
}, },
data() { changePage(val) {
return { this.msg.pageIndex = val;
currentUrl: "", this.getStudent();
data: [],
loading: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
StuName: "",
StuTel: "",
Status: "-1",
CreateBy: "",
IsQueryMyStu: 1,
StuStage: "", //客户阶段
StartTime: "", //开始时间
EndTime: "", //结束时间
},
dateArray: [], //日期数组
pageCount: 0,
//客户阶段状态列表
customState: [],
}
}, },
created() { getSchool() {
this.getSchool(); getSchoolDropdown({}).then(res => {
this.getStuStageList(); this.schoolList = res.Data;
});
}, },
mounted() { getStudent() {
this.currentUrl = this.$route.path if (this.dateArray && this.dateArray.length > 0) {
this.getStudent() this.msg.StartTime = this.dateArray[0];
}, this.msg.EndTime = this.dateArray[1];
methods: { } else {
//获取客户阶段列表 this.msg.StartTime = "";
getStuStageList() { this.msg.EndTime = "";
queryStuStageList().then(res => { }
this.customState = res.Data; this.loading = true;
}) getStudentPage(this.msg)
}, .then(res => {
resetSearch() { this.loading = false;
this.msg.pageIndex = 1; this.data = res.Data.PageData;
this.getStudent() this.pageCount = res.Data.PageCount;
},
changePage(val) {
this.msg.pageIndex = val;
this.getStudent();
},
getSchool() {
getSchoolDropdown({}).then(res => {
this.schoolList = res.Data;
}) })
}, .catch(() => {
getStudent() {
if (this.dateArray && this.dateArray.length > 0) {
this.msg.StartTime = this.dateArray[0];
this.msg.EndTime = this.dateArray[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
}
this.loading = true;
getStudentPage(this.msg).then(res => {
this.loading = false; this.loading = false;
this.data = res.Data.PageData });
this.pageCount = res.Data.PageCount },
}).catch(() => { refreshPage() {
this.loading = false this.getStudent();
},
getCustomerList() {
getMyCustomerList({}).then(res => {
this.myCustomerList = res.Data;
this.allCustomerList = res.Data;
this.myCustomerList.unshift({
CustomerName:"不限",
CustomerId:0,
}) })
}, });
refreshPage() {
this.getStudent()
},
}, },
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>
\ 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