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