更改我的预约和服务预约
This commit is contained in:
parent
6ca15aef84
commit
5f2a4eef44
@ -512,7 +512,7 @@
|
|||||||
"path": "Myappointment/Myappointment",
|
"path": "Myappointment/Myappointment",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的预约",
|
"navigationBarTitleText": "我的预约",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "healthtest/healthtest",
|
"path": "healthtest/healthtest",
|
||||||
|
|||||||
@ -7,6 +7,10 @@
|
|||||||
background: #F7F5F5;
|
background: #F7F5F5;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
.app .record .top ._span:nth-child(1) {
|
||||||
|
color: #26A888;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
::v-deep .u-scroll-view {
|
::v-deep .u-scroll-view {
|
||||||
background: #F7F5F5 !important;
|
background: #F7F5F5 !important;
|
||||||
@ -32,7 +36,7 @@
|
|||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
font-size: 27rpx;
|
font-size: 27rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #000000;
|
// color: #000000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
<view class="record" v-for="(item,index) in appointmentlist" :key="index" v-else>
|
<view class="record" v-for="(item,index) in appointmentlist" :key="index" v-else>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<span>{{item.formName}}</span>
|
<span>{{item.formName}}</span>
|
||||||
<span v-if="item.bookingStatus=='1'&&item.approvalStatus=='1'">已完成
|
<span v-if="item.bookingStatus=='1'">已完成 </span>
|
||||||
</span>
|
<span v-if="item.approvalStatus=='1'&&item.bookingStatus=='0'">已同意</span>
|
||||||
<span v-if="item.approvalStatus=='0'&&item.bookingStatus=='1'">待批准</span>
|
<span v-if="item.bookingStatus=='0' &&item.approvalStatus=='2'">已拒绝</span>
|
||||||
<span v-if="item.bookingStatus=='0'">未完成</span>
|
<span v-if="item.bookingStatus=='0' &&item.approvalStatus=='0'">待审批</span>
|
||||||
<span v-if="item.bookingStatus=='2'">已取消</span>
|
<span v-if="item.bookingStatus=='2'">已取消</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="recorddata">
|
<view class="recorddata">
|
||||||
@ -50,6 +50,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
name: '',
|
||||||
tabslist: [{
|
tabslist: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
completed: '',
|
completed: '',
|
||||||
@ -61,6 +62,7 @@
|
|||||||
completed: '1',
|
completed: '1',
|
||||||
}, ],
|
}, ],
|
||||||
tabscurrent: 0,
|
tabscurrent: 0,
|
||||||
|
listtotal: 0,
|
||||||
query: {
|
query: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -70,32 +72,59 @@
|
|||||||
appointmentlist: [],
|
appointmentlist: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
mounted() {
|
||||||
const value = uni.getStorageSync('userinfo');
|
const value = uni.getStorageSync('userinfo');
|
||||||
this.query.identity = value.cardNo
|
this.query.identity = value.cardNo
|
||||||
this.info();
|
this.info();
|
||||||
},
|
},
|
||||||
|
onReachBottom() { //下滑加载
|
||||||
|
if (this.appointmentlist.length >= this.listtotal) {} else {
|
||||||
|
this.query.pageNum++
|
||||||
|
list(this.query).then(res => {
|
||||||
|
this.appointmentlist = res.rows
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() { //下拉刷新
|
||||||
|
this.info();
|
||||||
|
// this.query.pageNum++
|
||||||
|
this.query.pageNum = 1;
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
info() {
|
info() {
|
||||||
list(this.query).then(res => {
|
list(this.query).then(res => {
|
||||||
this.appointmentlist = res.rows
|
this.appointmentlist = res.rows
|
||||||
|
this.listtotal = res.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
evaluatetime(item) {
|
evaluatetime(item) {
|
||||||
cancel(item.bookingNo).then(res => {
|
uni.showModal({
|
||||||
if (res.code == 200) {
|
title: '提示',
|
||||||
this.$refs.uToast.show({
|
content: '确定取消预约吗',
|
||||||
title: '取消预约成功',
|
cancelText: "取消", // 取消按钮的文字
|
||||||
type: 'success',
|
confirmText: "确认", // 确认按钮文字
|
||||||
duration: '1500'
|
success: (res) => {
|
||||||
})
|
console.log(res, '78')
|
||||||
this.info();
|
if (res.confirm) {
|
||||||
} else if (res.code == 500) {
|
cancel(item.bookingNo).then(res => {
|
||||||
this.$refs.uToast.show({
|
if (res.code == 200) {
|
||||||
title: res.msg,
|
uni.showModal({
|
||||||
type: 'error',
|
title: '提示',
|
||||||
duration: '1500'
|
content: '取消预约成功',
|
||||||
})
|
})
|
||||||
|
this.info();
|
||||||
|
} else if (res.code == 500) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: res.msg,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -55,10 +55,10 @@
|
|||||||
console.log(this.listitem.sourceType, '57')
|
console.log(this.listitem.sourceType, '57')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeLog(e){
|
changeLog(e) {
|
||||||
console.log(e,'747')
|
console.log(e, '747')
|
||||||
this.listitem.bookingTime=e
|
this.listitem.bookingTime = e
|
||||||
|
|
||||||
},
|
},
|
||||||
change(e) {
|
change(e) {
|
||||||
this.listitem.bookingTime = e.result
|
this.listitem.bookingTime = e.result
|
||||||
@ -75,45 +75,63 @@
|
|||||||
this.listitem.packageNo = this.appointlist.packageId
|
this.listitem.packageNo = this.appointlist.packageId
|
||||||
this.listitem.formNo = this.appointlist.projectId
|
this.listitem.formNo = this.appointlist.projectId
|
||||||
this.listitem.identity = this.userinfo.cardNo
|
this.listitem.identity = this.userinfo.cardNo
|
||||||
// this.listitem.applyStartTime = this.datetimerange[0]
|
|
||||||
// this.listitem.applyEndTime = this.datetimerange[1]
|
|
||||||
this.listitem.formName = this.appointlist.projectName
|
this.listitem.formName = this.appointlist.projectName
|
||||||
this.$delete(this.listitem, 'projectId')
|
// this.$delete(this.listitem, 'projectId')
|
||||||
this.$delete(this.listitem, 'projectName')
|
// this.$delete(this.listitem, 'projectName')
|
||||||
console.log(this.listitem, '55')
|
if (!this.listitem.bookingTime) {
|
||||||
detail(this.listitem).then(res => {
|
this.$refs.uToast.show({
|
||||||
if (res.code == 200) {
|
title: '请选择预约时间',
|
||||||
this.$refs.uToast.show({
|
type: 'error'
|
||||||
title: '预约成功',
|
})
|
||||||
type: 'success'
|
} else {
|
||||||
})
|
detail(this.listitem).then(res => {
|
||||||
} else if (res.code == '500') {
|
if (res.code == 200) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.msg,
|
title: '预约成功',
|
||||||
type: 'error'
|
type: 'success',
|
||||||
})
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||||
}
|
})
|
||||||
})
|
} else if (res.code == '500') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else if (this.listitem.sourceType == '2') {
|
} else if (this.listitem.sourceType == '2') {
|
||||||
this.listitem.identity = this.userinfo.cardNo
|
this.listitem.identity = this.userinfo.cardNo
|
||||||
this.listitem.applyStartTime = this.datetimerange[0]
|
this.listitem.applyStartTime = this.datetimerange[0]
|
||||||
this.listitem.applyEndTime = this.datetimerange[1]
|
this.listitem.applyEndTime = this.datetimerange[1]
|
||||||
console.log(this.listitem, '555')
|
console.log(this.listitem, '555')
|
||||||
save(this.listitem).then(res => {
|
if (!this.listitem.applyStartTime && !this.listitem.applyEndTime) {
|
||||||
if (res.code == 200) {
|
this.$refs.uToast.show({
|
||||||
this.$refs.uToast.show({
|
title: '请选择预约时间',
|
||||||
title: '预约成功',
|
type: 'error'
|
||||||
type: 'success'
|
})
|
||||||
})
|
} else {
|
||||||
} else if (res.code == '500') {
|
save(this.listitem).then(res => {
|
||||||
this.$refs.uToast.show({
|
if (res.code == 200) {
|
||||||
title: res.msg,
|
this.$refs.uToast.show({
|
||||||
type: 'error'
|
title: '预约成功',
|
||||||
})
|
type: 'success',
|
||||||
}
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||||
})
|
})
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||||
|
// })
|
||||||
|
|
||||||
|
} else if (res.code == '500') {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user