Commit f39a0325 authored by 罗超's avatar 罗超

1

parent a99e2d9d
...@@ -403,4 +403,11 @@ export function GetAssistTypeList(data) { ...@@ -403,4 +403,11 @@ export function GetAssistTypeList(data) {
}); });
} }
// 获取学生是否续费
export function getOrderGuestRenewState(data) {
return request({
url: '/order/GetOrderGuestRenewState',
method: 'post',
data
});
}
...@@ -442,14 +442,15 @@ ...@@ -442,14 +442,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 +464,7 @@ ...@@ -463,7 +464,7 @@
} }
}) })
}, },
//筛选市场专员 //筛选同行
cusfilterFn(val, update) { cusfilterFn(val, update) {
update(() => { update(() => {
if (val === '') { if (val === '') {
...@@ -601,6 +602,10 @@ ...@@ -601,6 +602,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:"不限"
})
}) })
} }
} }
......
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