Commit 2450d0e2 authored by zhengke's avatar zhengke

修改

parent 256e3b0a
......@@ -12,7 +12,7 @@ export default {
<style>
@import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_v5y4jdrtlx.css');
@import url('//at.alicdn.com/t/font_2077629_006c4joct5c8d.css');
html,
body,
......
......@@ -244,4 +244,16 @@ export function setVisitorReserveStatus(data) {
method: 'post',
data
})
}
/**
* 删除约课数据
* @param {JSON参数} data
*/
export function RemoveVisitorReserve(data) {
return request({
url: '/VisitorReserve/RemoveVisitorReserve',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -150,7 +150,7 @@
}
},
mounted() {
this.queryClassInfo();
// this.queryClassInfo();
},
methods: {
queryClassInfo() {
......
......@@ -24,7 +24,8 @@
<div style="margin-bottom:20px;">
<div class="Appoint_Line"></div>预约申请
</div>
<q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']" ref="ClassDate" mask="date" label="预约日期">
<q-input filled v-model="addMsg.ClassDate" class="col-6 q-pb-lg" :rules="[val => !!val || '请选择预约日期']"
ref="ClassDate" mask="date" label="预约日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
......@@ -37,17 +38,17 @@
<q-field filled class="q-pb-lg">
  <template v-slot:control>
<el-time-select v-model="addMsg.ClassTime" ref="ClassTime" style="width:100%" :picker-options="{
start: '09:00',
step: '00:15',
end: '21:00'
}" placeholder="预约时间">
start: '09:00',
step: '00:15',
end: '21:00'
}" placeholder="预约时间">
</el-time-select>
</template>
</q-field>
</div>
<q-select filled stack-label option-value="Name" option-label="Name"
v-model="addMsg.ClassContent" ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
<q-select filled stack-label option-value="Name" option-label="Name" v-model="addMsg.ClassContent"
ref="ClassContent" :options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
<div style="display:flex;align-items:center;">
<q-select filled stack-label option-value="TId" style="width:90%" option-label="TeacherName"
v-model="addMsg.TeacherId" ref="TeacherId" :options="TeacherList" label="选择教师" :dense="false"
......@@ -144,7 +145,7 @@
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
var obj = {
var obj = {
TeacherName: '请选择',
TId: 0
}
......@@ -167,31 +168,39 @@
},
//保存
saveAppointForm() {
if(this.saveObj){
if (this.saveObj) {
this.addMsg.Visitor_Id = this.saveObj.Id;
}
this.$refs.ClassDate.validate();
this.$refs.ClassContent.validate();
if (!this.$refs.ClassDate.hasError && !this.$refs.ClassContent.hasError){
if (this.addMsg.ClassTime == '') {
this.$q.notify({
type: 'negative',
position: "top",
timeout: 2000,
message: '请选择预约时间!',
})
return;
}
if (!this.$refs.ClassDate.hasError && !this.$refs.ClassContent.hasError) {
SetVisitorReserve(this.addMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit('success');
this.closeAppointForm();
}
})
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit('success');
this.closeAppointForm();
}
})
}
},
//子组件选中传值
getchildInfo(obj){
getchildInfo(obj) {
this.addMsg.TeacherId = obj.TeacherId;
this.addMsg.ClassRoomId = obj.ClassRoomId;
this.addMsg.ReserveClassId = obj.ReserveClassId;
......
......@@ -101,7 +101,7 @@
this.msg.ReserveStatus = 3;
}
if (this.ChoiceType == 2) {
this.msg.remark = this.chooseLiudan.toString();
this.msg.Remark = this.chooseLiudan.toString();
}
setVisitorReserveStatus(this.msg).then(res => {
if (res.Code == 1) {
......
......@@ -54,7 +54,7 @@
<template v-slot:body-cell-OrderId="props">
<q-td :props="props">
<template v-if="props.row.OrderId && props.row.OrderId>0">
{{props.row.OrderId}}
<span style="color:blue;cursor:pointer" @click="goOrderStatistics(props.row.OrderId)">{{props.row.OrderId}}</span>
</template>
</q-td>
</template>
......@@ -67,7 +67,7 @@
<span style="color:green;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span>
</template>
<template v-if="props.row.ReserveStatus==2">
<span style="color:#8F4586;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span>
<span style="color:#ff00ff;cursor:pointer;"> {{props.row.ReserveStatusStr}}</span>
  <q-tooltip :offset="[10, 10]">
   {{props.row.Remark}}
 </q-tooltip>
......@@ -84,6 +84,8 @@
<q-td :props="props">
<q-btn flat size="xs" @click="getDetail(props.row)" icon="iconfont icon-View" color="accent"
style="font-weight:400" label="详情" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400;" label="删除"
@click="deleteAppoint(props.row)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;"
v-if="props.row.ReserveStatus==0">
<q-list>
......@@ -122,7 +124,8 @@
<script>
import {
queryVisitorReservePage
queryVisitorReservePage,
RemoveVisitorReserve
} from '../../api/scheduling/schedu'
import {
getTeacherDropDownList,
......@@ -308,7 +311,41 @@
getDetail(item) {
this.orderObj = item;
this.isShowDetail = true;
console.log(item, 'item');
},
//跳转到报名统计
goOrderStatistics(id){
this.OpenNewUrl("/sale/orderStatistics", {
OrderId: id
});
},
//删除约课管理
deleteAppoint(item){
let delMsg = {
Id: item.Id
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除约课信息?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
RemoveVisitorReserve(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getList();
}
})
}).onCancel(() => {
});
}
}
}
......
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