取消预约

This commit is contained in:
tdg930622 2024-12-25 09:55:38 +08:00
parent a1f19fed84
commit 3d91081b1f
4 changed files with 34 additions and 5 deletions

View File

@ -15,6 +15,7 @@
type="datetime" type="datetime"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择" placeholder="请选择"
:picker-options="pickerOptions"
class="width100"> class="width100">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -46,6 +47,13 @@ export default {
}, },
data() { data() {
return{ return{
pickerOptions: {
disabledDate(time) {
const today = new Date();
const start = new Date(today.getFullYear(), today.getMonth(), today.getDate());
return time.getTime() < start.getTime();
}
},
videoReservationObj: { videoReservationObj: {
bookingTime: '', bookingTime: '',
id: '', // ID id: '', // ID

View File

@ -106,7 +106,7 @@
</template> </template>
<script> <script>
import api from "@/services/eventTracingApi"; import api from "@/services/eventTracingApi";
import videoTelephone from "@/services/videoTelephone";
export default { export default {
components: { components: {
smsDialogDetail: () => import('../dtraceDetail/smsDialogDetail.vue'),// smsDialogDetail: () => import('../dtraceDetail/smsDialogDetail.vue'),//
@ -166,7 +166,7 @@ export default {
getList(val) { getList(val) {
this.queryParam.planBegin = this.queryParam.beginTime this.queryParam.planBegin = this.queryParam.beginTime
this.queryParam.planEnd = this.queryParam.endTime this.queryParam.planEnd = this.queryParam.endTime
this.queryParam.current = val this.queryParam.current = val ? val : this.queryParam.current;
api.posttrace_video(this.queryParam).then(res => { api.posttrace_video(this.queryParam).then(res => {
if (!res.code) { if (!res.code) {
this.tableData = res.records; this.tableData = res.records;
@ -175,7 +175,20 @@ export default {
}) })
}, },
handleDelete() {}, handleDelete() {},
handleBackCase() {}, handleBackCase(row) {
this.$confirm("请确定是否取消?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
if(!this.$clickThrottle()) { return }//
let data = {id:row.id}
videoTelephone.videoTelephoneCancel(data).then((res) => {
this.$message.success("取消成功");
this.getList()
});
}).catch(() => {});
},
} }
}; };
</script> </script>

View File

@ -94,8 +94,8 @@ export default {
codeBtnDisabled: false, codeBtnDisabled: false,
ruleForm: { ruleForm: {
telephone: '', telephone: '',
account: '', account: '18381082759',
password: '', password: 'trydo@123456',
smsCode: '', smsCode: '',
}, },
rules: { rules: {

View File

@ -17,6 +17,7 @@
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime" type="datetime"
placeholder="请选择" placeholder="请选择"
:picker-options="pickerOptions"
class="width100"> class="width100">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -147,6 +148,13 @@ export default {
}, },
data() { data() {
return { return {
pickerOptions: {
disabledDate(time) {
const today = new Date();
const start = new Date(today.getFullYear(), today.getMonth(), today.getDate());
return time.getTime() < start.getTime();
}
},
bookingDurationOptions: [ bookingDurationOptions: [
{ label: '10分钟', value: 10 }, { label: '10分钟', value: 10 },
{ label: '20分钟', value: 20 }, { label: '20分钟', value: 20 },