|
|
@ -107,7 +107,9 @@ |
|
|
|
<view v-if="showCalendar" class="calendar-popup"> |
|
|
|
<view class="calendar-mask"></view> |
|
|
|
<view class="calendar-content"> |
|
|
|
<uni-calendar class="uni-calendar--hook" :selected="selectedDate" :startDate="startDate" |
|
|
|
<uni-calendar class="uni-calendar--hook" |
|
|
|
:disabledDay="outDateList" |
|
|
|
:selected="selectedDate" :startDate="startDate" |
|
|
|
:endDate="endDate" @change="change" :showMonth="false" /> |
|
|
|
<u-button color="#FFBF60" type="primary" @click="confirmCanlendar">确定</u-button> |
|
|
|
</view> |
|
|
@ -120,7 +122,12 @@ |
|
|
|
<script> |
|
|
|
import { getDictList } from "@/api/system/user.js" |
|
|
|
import { getPetList, delPet } from "@/api/system/pet" |
|
|
|
import positionMixin from '../../mixins/position'; |
|
|
|
import { |
|
|
|
getTeacherAddressList, |
|
|
|
} from "@/api/order/order" |
|
|
|
export default { |
|
|
|
mixins: [positionMixin], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
defaultPhoto: 'https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/catdog.png', |
|
|
@ -135,11 +142,14 @@ export default { |
|
|
|
endDate: '', |
|
|
|
showCalendar: false, |
|
|
|
selectedDate: [], |
|
|
|
currentPets: [] |
|
|
|
currentPets: [], |
|
|
|
//当前技师不接单日期 |
|
|
|
outDateList : ['2025-6-20'], |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getPetList(); |
|
|
|
this.getOutDateList() |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
this.getPetList(); |
|
|
@ -169,8 +179,29 @@ export default { |
|
|
|
this.showDel = false; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
//获取当前技师不接单日期 |
|
|
|
getOutDateList(){ |
|
|
|
|
|
|
|
|
|
|
|
if(!this.buyInfo.teacher || !this.buyInfo.teacher.userId){ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
console.log('this.buyInfo', this.buyInfo); |
|
|
|
|
|
|
|
getTeacherAddressList({ |
|
|
|
userId : this.buyInfo.teacher.userId |
|
|
|
}).then(response => { |
|
|
|
if (response.code == 200) { |
|
|
|
let addressList = this.calculateDistanceAddressList(response.data) |
|
|
|
if(addressList && addressList[0] && addressList[0].appletOutDate){ |
|
|
|
this.outDateList = addressList[0].appletOutDate.map(n => n.date) |
|
|
|
} |
|
|
|
console.log(addressList, this.outDateList); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPetTypeList() { |
|
|
|
getDictList('pet_type').then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|