Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
shidongli 2023-11-08 13:52:22 +08:00
commit 7fc9dd2b0e
2 changed files with 53 additions and 17 deletions

View File

@ -3,8 +3,10 @@
<view class="content"> <view class="content">
<view class="appointtime">预约时间 <view class="appointtime">预约时间
</view> </view>
<uni-datetime-picker v-if="listitem.sourceType==2" v-model="datetimerange" type="datetimerange"
<uni-datetime-picker v-model="datetimerange" type="datetimerange" rangeSeparator="至" /> rangeSeparator="至" />
<uni-datetime-picker type="datetime" v-model="datetimesingle" @change="changeLog"
v-if="listitem.sourceType==1" />
<view class="submit" @tap="submit"> <view class="submit" @tap="submit">
提交 提交
</view> </view>
@ -24,21 +26,40 @@
show: false, show: false,
mode: 'date', mode: 'date',
appointlist: [], appointlist: [],
datetimesingle: [Date.now(), this.todayEndTime()],
listitem: { listitem: {
bookingTime: '', bookingTime: '',
identity:'', identity: '',
}, },
datetimerange: [Date.now(), this.todayEndTime()], datetimerange: [Date.now(), this.todayEndTime()],
}; };
}, },
watch: {
datetimesingle(newval) {
console.log("单选:", this.datetimesingle);
// this.listitem.bookingTime=this.datetimesingle
},
// range(newval) {
// console.log(":", this.range);
// },
// datetimerange(newval) {
// console.log(":", this.datetimerange);
// },
},
onLoad(e) { onLoad(e) {
console.log(e,'567') console.log(e, '567')
this.userinfo = uni.getStorageSync('userinfo'); this.userinfo = uni.getStorageSync('userinfo');
// this.listitem.identity=this.userinfo.cardNo // this.listitem.identity=this.userinfo.cardNo
this.appointlist = JSON.parse(e.item) this.appointlist = JSON.parse(e.item)
this.listitem = this.appointlist this.listitem = this.appointlist
console.log(this.listitem.sourceType, '57')
}, },
methods: { methods: {
changeLog(e){
console.log(e,'747')
this.listitem.bookingTime=e
},
change(e) { change(e) {
this.listitem.bookingTime = e.result this.listitem.bookingTime = e.result
}, },
@ -53,9 +74,9 @@
if (this.listitem.sourceType == '1') { if (this.listitem.sourceType == '1') {
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.applyStartTime = this.datetimerange[0]
this.listitem.applyEndTime = this.datetimerange[1] // 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')
@ -74,7 +95,7 @@
} }
}) })
} 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')
@ -82,7 +103,7 @@
if (res.code == 200) { if (res.code == 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '预约成功', title: '预约成功',
type: 'error' type: 'success'
}) })
} else if (res.code == '500') { } else if (res.code == '500') {
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -158,4 +179,4 @@
} }
} }
</style> </style>

View File

@ -137,7 +137,7 @@
export default { export default {
data() { data() {
return { return {
count: 4, count: 5,
value: 2, value: 2,
tabslist: [{ tabslist: [{
name: '全部', name: '全部',
@ -160,7 +160,8 @@
openId: '', openId: '',
orderNo: '', orderNo: '',
orderSource: 'FAMILY_DOCTOR', orderSource: 'FAMILY_DOCTOR',
evaluateChanne: 'WE_CHAT_APPLET', evaluateChannel: 'WE_CHAT_APPLET',
evaluateSatisfaction:'',
}, },
query: { query: {
pageNum: 1, pageNum: 1,
@ -174,13 +175,27 @@
}, },
onShow() { onShow() {
const value = uni.getStorageSync('userinfo'); const value = uni.getStorageSync('userinfo');
this.query.identity=value.cardNo this.query.identity = value.cardNo
this.info() this.info()
}, },
watch: { //
'list.compositeScore'() {
if (this.list.compositeScore == 5) {
this.list.evaluateSatisfaction = 'VERYSATISFIED'
} else if (this.list.compositeScore == 4) {
this.list.evaluateSatisfaction = 'SATISFIED'
} else if (this.list.compositeScore == 3) {
this.list.evaluateSatisfaction = 'COMMONLY'
} else if (this.list.compositeScore == 2) {
this.list.evaluateSatisfaction = 'DISSATISFIED'
} else if (this.list.compositeScore == 1) {
this.list.evaluateSatisfaction = 'VERYDISSATISFIED'
}
},
},
methods: { methods: {
cancel(){ cancel() {
this.evaluateshow=false this.evaluateshow = false
}, },
submit(item) { submit(item) {
console.log(this.list, '45') console.log(this.list, '45')
@ -239,7 +254,7 @@
this.list.patientId = uni.getStorageSync('patientId'); this.list.patientId = uni.getStorageSync('patientId');
this.list.openId = uni.getStorageSync('openid'); this.list.openId = uni.getStorageSync('openid');
this.list.orderSource = 'FAMILY_DOCTOR' this.list.orderSource = 'FAMILY_DOCTOR'
this.list.evaluateChanne = 'WE_CHAT_APPLET' this.list.evaluateChannel = 'WE_CHAT_APPLET'
} }
} }