master
xy 3 years ago
parent 02dca4290c
commit 346d7e047f

@ -273,7 +273,7 @@ export default {
width: 180 width: 180
}, },
{ {
prop:'customer_address.name', prop:'customer_address.address',
label:'上门地址', label:'上门地址',
minWidth:220, minWidth:220,
align:'left' align:'left'

@ -101,6 +101,7 @@
<timeSelect <timeSelect
ref="timeSelect" ref="timeSelect"
@refresh="()=>{getCustomer();$emit('refresh')}" @refresh="()=>{getCustomer();$emit('refresh')}"
:flag="flag"
:is-show.sync="isShowTime" :is-show.sync="isShowTime"
:skus="detail.product_type.product_skus" :skus="detail.product_type.product_skus"
:addresses="addresses" :addresses="addresses"
@ -137,6 +138,7 @@ export default {
}, },
data() { data() {
return { return {
flag:false,//
nurseId:'', nurseId:'',
productId: '', productId: '',
isShow: false, isShow: false,
@ -191,14 +193,18 @@ export default {
}, },
async getCustomer() { async getCustomer() {
try{
const res = await customerDetail({ const res = await customerDetail({
id: this.id id: this.id
}) })
console.log(res) this.flag = true
this.detail = res.detail this.detail = res.detail
if(this.detail.product?.service_rule === 2 && this.detail.schedule && this.detail.schedule.length > 0){ if(this.detail.product?.service_rule === 2 && this.detail.schedule && this.detail.schedule.length > 0){
this.nurseId = this.detail.schedule[0]?.nurse_id this.nurseId = this.detail.schedule.at(-1)?.nurse_id
}
}catch (err){
this.flag = false
} }
}, },

@ -85,6 +85,10 @@ import {scheduleDelete, scheduleSave} from '@/api/schedule'
export default { export default {
props: { props: {
flag:{
type:Boolean,
default:false
},//
customerId: [Number, String], customerId: [Number, String],
orderId: [Number, String], orderId: [Number, String],
productId: [Number, String], productId: [Number, String],
@ -244,6 +248,7 @@ export default {
}, },
submit() { submit() {
if(this.flag){
this.form.customer_id = this.customerId this.form.customer_id = this.customerId
this.form.product_id = this.productId this.form.product_id = this.productId
this.form.order_id = this.orderId this.form.order_id = this.orderId
@ -262,6 +267,7 @@ export default {
}) })
} }
}) })
}
}, },
destroySchedule(){ destroySchedule(){
scheduleDelete({id:this.form.id}).then(res => { scheduleDelete({id:this.form.id}).then(res => {

Loading…
Cancel
Save