Commit e69ed114 authored by 罗超's avatar 罗超

2

parent 064965a5
...@@ -96,7 +96,8 @@ ...@@ -96,7 +96,8 @@
style="position:absolute;top:0;right:0" style="position:absolute;top:0;right:0"
class="q-ml-sm" class="q-ml-sm"
v-if=" v-if="
saveObj.AppointState == 1 &&isShowTag(saveObj.GuestList,saveObj.ScrollMinNum) saveObj.AppointState == 1 &&
isShowTag(saveObj.GuestList, saveObj.ScrollMinNum)
" "
/> />
</template> </template>
...@@ -268,28 +269,40 @@ export default { ...@@ -268,28 +269,40 @@ export default {
methods: { methods: {
//取消预约 //取消预约
cancelSub() { cancelSub() {
let that = this;
this.$q
.dialog({
title: "提示信息",
message: "是否要取消预约",
cancel: true,
ok: "是",
cancel: "否"
})
.onOk(() => {
const msg = { const msg = {
Date: this.dateObj.date, Date: that.dateObj.date,
TeacherId: this.saveObj.Tid, TeacherId: that.saveObj.Tid,
AppointIds: this.checkStuType2.toString() AppointIds: that.checkStuType2.toString()
}; };
CancelAppointment(msg).then(res => { CancelAppointment(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ that.$q.notify({
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
this.checkStuType2.map(e => { that.checkStuType2.map(e => {
this.saveObj.GuestList.map((_e, _i) => { that.saveObj.GuestList.map((_e, _i) => {
if (e == _e.AppointmentId) { if (e == _e.AppointmentId) {
this.saveObj.GuestList.splice(_i, 1); that.saveObj.GuestList.splice(_i, 1);
} }
}); });
}); });
this.checkStuType2 = []; that.checkStuType2 = [];
this.$emit("success"); that.$emit("success");
} }
}); });
})
.onCancel(() => {});
}, },
//确认约课 //确认约课
...@@ -343,18 +356,18 @@ export default { ...@@ -343,18 +356,18 @@ export default {
this.$emit("success"); this.$emit("success");
}, },
isShowTag(arr, min) { isShowTag(arr, min) {
let n=0 let n = 0;
arr.map((e)=>{ arr.map(e => {
if(e.AppointType!==3){ if (e.AppointType !== 3) {
n+=1 n += 1;
} }
}) });
if (n < min) { if (n < min) {
return true; return true;
} else { } else {
return false; return false;
} }
}, }
} }
}; };
</script> </script>
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