Commit 29ae8348 authored by youjie's avatar youjie
parents 0f1f93bf c60284f7
...@@ -11,65 +11,37 @@ ...@@ -11,65 +11,37 @@
line-height: 18px; line-height: 18px;
text-align: center; text-align: center;
border-radius: 50%; border-radius: 50%;
cursor:pointer; cursor: pointer;
} }
</style>
</style> <template>
<template>
<div> <div>
<q-card flat class="q-pa-lg q-my-lg" v-loading="loading"> <q-card flat class="q-pa-lg q-my-lg" >
<div class="text-h6 text-weight-bold">分配给以下部门/成员</div> <div class="text-h6 text-weight-bold">学员预约截止日期</div>
<div style="display:flex;justify-content:end;width:600px;margin-bottom:10px;"> <div style="display:flex;margin-bottom:10px;position:relative;width:620px;" :key="index">
<q-btn round color="primary" icon="iconfont icon-img_haha" @click="addEmployee()" /> <q-select class="col-6 q-pb" v-model="dictObjEmp.Code" style="width:300px;margin-right:10px;" clearable filled
</div> stack-label use-input option-value="Id" option-label="Name" ref="ManagerId" :options="WeekList" label="截止日期"
<div style="display:flex;margin-bottom:10px;position:relative;width:620px;" v-for="(item,index) in List" :key="index"> :dense="false" emit-value map-options>
<q-select class="col-6 q-pb" v-model="item.Content" @input="getName(item.Content,index)"
style="width:300px;margin-right:10px;" clearable filled stack-label use-input option-value="Id"
option-label="EmployeeName" ref="ManagerId" :options="EmployeeList" label="留学顾问" :dense="false" 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>
<q-select filled v-model="item.CodeList" multiple option-value="Id" option-label="Name" :options="NeedData"
label="客户需求" style="width: 300px" emit-value map-options />
<div class="stuCloseBtn">
<i @click="delStepStu(index)" class="iconfont icon-guanbi"></i>
</div>
</div> </div>
<q-btn class="q-mt-xl q-px-lg" unelevated color="primary" :loading="saving" @click="saveHandler">立即保存</q-btn> <q-btn class="q-mt-xl q-px-lg" unelevated color="primary" :loading="saving" @click="saveHandler">立即保存</q-btn>
</q-card> </q-card>
<choiceapproval v-if="outerVisible" @close="getclose()" :singleCheck="true" @success="getsuccess2"
:byval="chosenUser" cptype="0">
</choiceapproval>
</div> </div>
</template> </template>
<script> <script>
import choiceapproval from "../../components/enterprise/choiceapproval";
import {
getDictValue
} from "../../api/administration/administration";
import { import {
saveDict saveDict
} from "../../api/system/notiveSysSet"; } from "../../api/system/notiveSysSet";
import {
GetNeedsList
} from "../../api/school/index";
import {
queryEmployee
} from "../../api/users/user"; //获取员工
export default { export default {
components: { components: {
choiceapproval
}, },
data() { data() {
return { return {
chosenUser: [],
outerVisible: false, outerVisible: false,
saving: false, saving: false,
loading: false, loading: false,
...@@ -81,86 +53,45 @@ ...@@ -81,86 +53,45 @@
Mask: "", Mask: "",
Name: "学员预约分配规则", Name: "学员预约分配规则",
}, },
multiCheck: [], WeekList: [{
NeedData: [], //多选 Id: 1,
EmployeeList: [], // 员工 Name: "星期一"
AllemployeeList: [],
List: [{
CodeList: [],
Code: '',
Content: '',
Mask: ""
}]
};
}, },
created() { {
this.getGetNeedsList(); Id: 2,
this.getEmployee(); Name: "星期二"
this.init();
}, },
methods: { {
//点击添加 Id: 3,
addEmployee() { Name: "星期三"
let obj = {
CodeList: [],
Code: '',
Content: '',
Mask: ""
}
this.List.push(obj);
}, },
delStepStu(index){ {
this.List.splice(index,1); Id: 4,
Name: "星期四"
}, },
//选择Name {
getName(Id, index) { Id: 5,
this.EmployeeList.forEach(x => { Name: "星期五"
if (x.Id == Id) {
this.List[index].Mask = x.EmployeeName;
}
})
}, },
//获取业务员 {
getEmployee() { Id: 6,
var qMsg = { Name: "星期六"
EmployeeName: ''
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
}
})
}, },
//筛选员工 {
filterFn(val, update) { Id: 7,
update(() => { Name: "星期天"
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//获取客户需求
getGetNeedsList() {
GetNeedsList().then(res => {
if (res.Code == 1) {
this.NeedData = res.Data;
}
});
}, },
getclose() { ]
// 企业关闭 };
this.ismember = false;
this.outerVisible = false;
}, },
getsuccess2(list, type) { created() {
this.chosenUser = list;
this.outerVisible = false; this.init();
}, },
methods: {
init() { init() {
this.loading = true; this.loading = true;
getDictValue({ getDictValue({
...@@ -180,7 +111,7 @@ ...@@ -180,7 +111,7 @@
}); });
}, },
saveHandler() { saveHandler() {
if(this.List.length==0){ if (this.List.length == 0) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -188,9 +119,9 @@ ...@@ -188,9 +119,9 @@
}); });
return return
} }
if(this.List.length>0){ if (this.List.length > 0) {
for(let i=0;i<this.List.length;i++){ for (let i = 0; i < this.List.length; i++) {
if(this.List[i].Content==''||this.List[i].Content==null){ if (this.List[i].Content == '' || this.List[i].Content == null) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -198,7 +129,7 @@ ...@@ -198,7 +129,7 @@
}); });
return return
} }
if(this.List[i].CodeList.length==0){ if (this.List[i].CodeList.length == 0) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -231,8 +162,6 @@ ...@@ -231,8 +162,6 @@
} }
} }
}; };
</script>
</script> <style>
</style>
<style></style> \ No newline at end of file
\ 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