Commit 27de64fd authored by youjie's avatar youjie

no message

parent 29ae8348
import request from '../../utils/request' 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 @@ ...@@ -18,7 +18,7 @@
<div> <div>
<q-card flat class="q-pa-lg q-my-lg" > <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;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 <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="截止日期" stack-label use-input option-value="Id" option-label="Name" ref="ManagerId" :options="WeekList" label="截止日期"
:dense="false" emit-value map-options> :dense="false" emit-value map-options>
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<script> <script>
import { import {
saveDict PlanAppointmentConfig,SetPlanAppointmentConfig
} from "../../api/system/notiveSysSet"; } from "../../api/stuMan/index";
export default { export default {
...@@ -47,12 +47,9 @@ ...@@ -47,12 +47,9 @@
loading: false, loading: false,
dictObjEmp: { dictObjEmp: {
ID: 0, ID: 0,
Code: "", Code: null,
Content: "",
DictKey: "PUSH_STU_STUDYABROAD",
Mask: "",
Name: "学员预约分配规则",
}, },
Name: "学员预约分配规则",
WeekList: [{ WeekList: [{
Id: 1, Id: 1,
Name: "星期一" Name: "星期一"
...@@ -85,66 +82,35 @@ ...@@ -85,66 +82,35 @@
}; };
}, },
created() { created() {
this.init(); this.init();
}, },
methods: { methods: {
init() { init() {
this.loading = true; this.loading = true;
getDictValue({ PlanAppointmentConfig({}).then(res => {
Key: "PUSH_STU_STUDYABROAD"
}).then(res => {
this.loading = false; this.loading = false;
if (res.Code == 1) { if (res.Code == 1) {
var tempObj = res.Data; var tempObj = res.Data;
if (tempObj) { if (tempObj) {
this.dictObjEmp.ID = tempObj.ID; this.dictObjEmp = {
this.dictObjEmp.Content = tempObj.Content; ID: tempObj.ID,
if (tempObj.Content) { Code: Number(tempObj.Code),
this.List = JSON.parse(tempObj.Content); };
}
} }
} }
}); });
}, },
saveHandler() { saveHandler() {
if (this.List.length == 0) { if (this.dictObjEmp.Code == null) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请添加数据` message: `请选择预约截止日期`
}); });
return 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; this.saving = true;
saveDict(this.dictObjEmp).then(r => { SetPlanAppointmentConfig(this.dictObjEmp).then(r => {
this.saving = false; this.saving = false;
if (r.Code == 1) { if (r.Code == 1) {
this.$q.notify({ 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