Commit 27de64fd authored by youjie's avatar youjie

no message

parent 29ae8348
import request from '../../utils/request'
/**
* 新增修改学员预约配置
*/
export function SetPlanAppointmentConfig(data) {
return request({
url: '/PlanAppoiment/SetPlanAppointmentConfig',
method: 'post',
data
});
}
/**
* 获取学员预约配置
*/
export function PlanAppointmentConfig(data) {
return request({
url: '/PlanAppoiment/PlanAppointmentConfig',
method: 'post',
data
});
}
/**
* 获取学员出勤情况
*/
......
......@@ -18,7 +18,7 @@
<div>
<q-card flat class="q-pa-lg q-my-lg" >
<div class="text-h6 text-weight-bold">学员预约截止日期</div>
<div style="display:flex;margin-bottom:10px;position:relative;width:620px;" :key="index">
<div style="display:flex;margin-bottom:10px;position:relative;width:620px;">
<q-select class="col-6 q-pb" v-model="dictObjEmp.Code" style="width:300px;margin-right:10px;" clearable filled
stack-label use-input option-value="Id" option-label="Name" ref="ManagerId" :options="WeekList" label="截止日期"
:dense="false" emit-value map-options>
......@@ -31,8 +31,8 @@
<script>
import {
saveDict
} from "../../api/system/notiveSysSet";
PlanAppointmentConfig,SetPlanAppointmentConfig
} from "../../api/stuMan/index";
export default {
......@@ -47,12 +47,9 @@
loading: false,
dictObjEmp: {
ID: 0,
Code: "",
Content: "",
DictKey: "PUSH_STU_STUDYABROAD",
Mask: "",
Name: "学员预约分配规则",
Code: null,
},
Name: "学员预约分配规则",
WeekList: [{
Id: 1,
Name: "星期一"
......@@ -85,66 +82,35 @@
};
},
created() {
this.init();
},
methods: {
init() {
this.loading = true;
getDictValue({
Key: "PUSH_STU_STUDYABROAD"
}).then(res => {
PlanAppointmentConfig({}).then(res => {
this.loading = false;
if (res.Code == 1) {
var tempObj = res.Data;
if (tempObj) {
this.dictObjEmp.ID = tempObj.ID;
this.dictObjEmp.Content = tempObj.Content;
if (tempObj.Content) {
this.List = JSON.parse(tempObj.Content);
}
this.dictObjEmp = {
ID: tempObj.ID,
Code: Number(tempObj.Code),
};
}
}
});
},
saveHandler() {
if (this.List.length == 0) {
if (this.dictObjEmp.Code == null) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请添加数据`
message: `请选择预约截止日期`
});
return
}
if (this.List.length > 0) {
for (let i = 0; i < this.List.length; i++) {
if (this.List[i].Content == '' || this.List[i].Content == null) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择第${i+1}条留学顾问`
});
return
}
if (this.List[i].CodeList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择第${i+1}条客户需求`
});
return
}
}
this.List.forEach(x => {
x.Code = x.CodeList.toString();
})
}
this.dictObjEmp.Content = JSON.stringify(this.List);
this.saving = true;
saveDict(this.dictObjEmp).then(r => {
SetPlanAppointmentConfig(this.dictObjEmp).then(r => {
this.saving = false;
if (r.Code == 1) {
this.$q.notify({
......
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