Commit ff62d7d5 authored by 黄奎's avatar 黄奎
parents d0702076 4f854f3c
......@@ -23,20 +23,35 @@
></q-input>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<div class="col-6">
<q-select
filled
v-model="customObj.cusfrom"
dense
:options="customFrom"
option-label="Name"
option-value="Id"
emit-value
map-options
label="客户来源"
behavior="menu"
/>
</div>
<q-select
filled
v-model="customObj.CreateType"
dense
:options="customFromList"
option-label="Name"
option-value="Id"
emit-value
map-options
label="客户来源"
behavior="menu"
class="col-6"
/>
<q-select
v-if="customObj.CreateType == 3"
filled
v-model="customObj.StuSourceId"
dense
@filter="filterEmployee"
use-input
:options="myEmployeeList"
option-label="EmployeeName"
option-value="Id"
emit-value
map-options
label="关联员工"
behavior="menu"
class="col-6"
/>
</div>
<div class="q-mt-xs row q-col-gutter-md">
<q-select
......@@ -161,7 +176,13 @@
</div>
<q-separator class="q-my-md" />
<div class="text-right q-py-xs">
<q-btn flat color="dark" @click="closeForm" class="q-mr-md q-px-xs" label="取消"></q-btn>
<q-btn
flat
color="dark"
@click="closeForm"
class="q-mr-md q-px-xs"
label="取消"
></q-btn>
<q-btn
unelevated
color="primary"
......@@ -183,9 +204,10 @@ import {
getGuestBasicsEnumList,
getGuestEducationEnumList,
getGuestLearningGoalsEnumList,
GetStuChannelList
GetStuChannelList,
CreateTypeList
} from "../../../api/sale/sale";
import { queryEmployee,queryStudentByTel } from "../../../api/users/user";
import { queryEmployee, queryStudentByTel } from "../../../api/users/user";
export default {
meta: {
title: "学员管理"
......@@ -199,16 +221,6 @@ export default {
},
data() {
return {
customFrom: [
{
Name: "个人录入",
Id: 1
},
{
Name: "同业录入",
Id: 2
}
],
//客户阶段状态列表
customState: [],
customMsg: {
......@@ -235,6 +247,7 @@ export default {
//员工列表
employeeList: [],
myEmployeeList: [],
customFromList: [],
StuChannelList: [], //收客渠道
AssistDropList: [] //协助人员
};
......@@ -246,6 +259,7 @@ export default {
this.queryGoalsList();
this.getEmployeeList();
this.GetStuChannelList();
this.getCustomFrom();
if (this.saveObj && this.saveObj.StuId > 0) {
this.customMsg.StuId = this.saveObj.StuId;
this.queryStuInfo();
......@@ -253,23 +267,31 @@ export default {
},
mounted() {},
methods: {
checkStuTel(){
if (this.customObj.StuTel && this.customObj.StuTel.length == 11){
queryStudentByTel({StuTel:this.customObj.StuTel}).then(r=>{
if(r.Data){
this.$emit("success",r.Data,1);
//获取客户来源
getCustomFrom() {
CreateTypeList({}).then(res => {
if (res.Code == 1) {
this.customFromList = res.Data;
}
});
},
checkStuTel() {
if (this.customObj.StuTel && this.customObj.StuTel.length == 11) {
queryStudentByTel({ StuTel: this.customObj.StuTel }).then(r => {
if (r.Data) {
this.$emit("success", r.Data, 1);
}
})
});
}
},
validate() {
let msg = "";
console.log(this.customObj)
console.log(this.customObj);
if (!this.customObj.StuName) {
msg = "请输入客户名称";
} else if (!this.customObj.StuTel || this.customObj.StuTel.length != 11) {
msg = "请输入正确的客户手机号";
} else if (!this.customObj.cusfrom) {
} else if (!this.customObj.CreateType) {
msg = "请选择客户来源";
} else if (!this.customObj.StuChannel) {
msg = "请选择客户获客渠道";
......@@ -303,12 +325,12 @@ export default {
message: "数据保存成功!",
position: "top"
});
this.$emit("success",res.Data,0);
this.$emit("success", res.Data, 0);
}
});
},
closeForm(){
this.$emit("close")
closeForm() {
this.$emit("close");
},
//获取员工列表
getEmployeeList() {
......
......@@ -26,7 +26,6 @@
</div>
<div style="row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-6 field">
<q-input
filled
stack-label
......@@ -38,8 +37,8 @@
label="人数"
:rules="[val => !!val || '请填写人数']"
disable
class="col-6 q-py-sm"
/>
</div>
<template v-if="OrderMsg.isChaBan == 1">
<q-select
filled
......@@ -51,7 +50,7 @@
:options="CourseList"
emit-value
map-options
class="col-6"
class="col-6 q-py-sm"
:rules="[val => !!val || '请选择课程']"
label="选择课程"
@input="calcPrice()"
......@@ -65,7 +64,7 @@
@keyup.native="checkInteger(OrderMsg, 'StartClassHours')"
ref="StartClassHours"
@input="calcPrice()"
class="col-6"
class="col-6 q-py-sm"
label="起始课时"
/>
<q-input
......@@ -73,7 +72,7 @@
v-model="OrderMsg.EffectTime"
ref="EffectTime"
:rules="[val => !!val || '请填生效时间']"
class="col-6"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
mask="date"
label="生效时间"
......@@ -97,7 +96,7 @@
filled
option-value="OrderId"
option-label="CourseName"
class="col-6"
class="col-6 q-py-sm"
:disable="modityOrderType == 2"
v-model="OrderMsg.UpOrderId"
:options="beforeOrderList"
......@@ -132,7 +131,7 @@
:dense="false"
v-model="OrderMsg.Class_Price"
:disable="true"
class="col-6"
class="col-6 q-py-sm"
label="单价(课程售价)"
style="display:none;"
/>
......@@ -144,7 +143,7 @@
v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice == true ? false : true"
@blur="calcPrice()"
class="col-6"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
......@@ -163,7 +162,7 @@
v-model="OrderMsg.Unit_Price"
:disable="true"
@input="calcPrice()"
class="col-6"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
......@@ -174,11 +173,11 @@
:dense="false"
v-model="OrderMsg.DiscountMoney"
:disable="true"
class="col-6"
class="col-6 q-py-sm"
label="优惠金额"
/>
<!-- <q-input filled stack-label :dense="false" v-model="OrderMsg.PerDiscountMoney" :disable="true"
class="col-6" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
class="col-6 q-py-sm" label="优惠金额(每人)" :hint="'总优惠金额:'+(OrderMsg.PerDiscountMoney*OrderMsg.GuestNum)" /> -->
<template v-if="modityOrderType == 3">
<q-input
filled
......@@ -186,7 +185,7 @@
:dense="false"
v-model="OrderMsg.Unit_Price"
@input="calcPrice()"
class="col-6"
class="col-6 q-py-sm"
label="成交单价"
:rules="[val => !!val || '请填成交单价']"
/>
......@@ -199,7 +198,7 @@
maxlength="10"
@keyup.native="checkPrice(OrderMsg, 'PreferPrice')"
v-model="OrderMsg.PreferPrice"
class="col-6"
class="col-6 q-py-sm"
label="应收"
/>
......@@ -212,7 +211,7 @@
:options="SourceEnumList"
emit-value
map-options
class="col-6"
class="col-6 q-py-sm"
label="客人来源"
/>
<q-select
......@@ -225,7 +224,7 @@
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName"
class="col-6"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn"
......@@ -248,7 +247,7 @@
option-label="EmployeeName"
option-value="Id"
ref="EmployeeName"
class="col-6"
class="col-6 q-py-sm"
emit-value
map-options
@filter="filterFn"
......@@ -271,7 +270,7 @@
option-label="CustomerName"
option-value="CustomerId"
ref="CustomerName"
class="col-6"
class="col-6 q-py-sm"
emit-value
map-options
@filter="cusfilterFn"
......@@ -292,7 +291,7 @@
:dense="false"
maxlength="50"
v-model="OrderMsg.GeneralOccupation"
class="col-6"
class="col-6 q-py-sm"
label="一般同行"
/>
<q-input
......@@ -303,7 +302,7 @@
:dense="false"
maxlength="50"
v-model="OrderMsg.EduOccupation"
class="col-6"
class="col-6 q-py-sm"
label="教育同行"
/>
<!-- <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
......@@ -318,7 +317,7 @@
stack-label
:dense="false"
v-model="OrderMsg.PerLessMoney"
class="col-6"
class="col-6 q-py-sm"
label="少价金额(每人)"
:hint="'总少价金额:' + OrderMsg.PerLessMoney * OrderMsg.GuestNum"
/>
......@@ -327,9 +326,8 @@
stack-label
:dense="false"
v-model="OrderMsg.SaleRemark"
style="margin-top: 20px"
type="textarea"
class="col-12"
class="col-12 q-py-sm"
label="备注"
/>
</div>
......
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