master
271556543@qq.com 3 years ago
parent bf8f74fd15
commit 907d8516c3

@ -123,6 +123,27 @@ export default {
}
},
data() {
let validateCategory = (rule, value, callback) => {
if(value.length > 0){
let flag = true
value.forEach(item => {
if(item.name){
}else{
flag = false
}
})
if(flag){
callback()
}else{
callback('请输入分类名称')
}
}else{
callback('请添加绑定服务分类')
}
}
return {
id: '',
isShow: false,
@ -154,6 +175,9 @@ export default {
],
cycle: [
{required: true, message: '请填写结算周期'}
],
product_sku_category_list:[
{validator: validateCategory}
]
},

@ -270,7 +270,7 @@ export default {
unit_price: '',
total_time: '',
total_money: '',
account_id: '',
account_id:'',
status: 0,
customer_id: '',
}
@ -415,8 +415,8 @@ export default {
this.pickedProduct = {}
this.ageTemp = false
this.products = []
this.$refs['dialog'].reset()
//this.initForm()
//this.$refs['dialog'].reset()
this.initForm()
}
}
},

@ -45,7 +45,7 @@
</template>
</xy-table>
<addOrder ref="addOrder" :types="types" :accounts="accounts"></addOrder>
<addOrder ref="addOrder" :types="types" :accounts="accounts" @refresh="getCustomers"></addOrder>
<add-customer ref="addCustomer" :level-types="levelTypes" :types="types" :accounts="accounts" :cities="cities" :disability-level="disabilityLevel" @refresh="getCustomers"></add-customer>
</div>
</template>

@ -67,13 +67,15 @@
</template>
<template v-slot:footer>
<Poptip
:transfer="true"
confirm
title="确认要删除吗"
@on-ok="destroySchedule">
<Button type="primary" ghost>删除</Button>
</Poptip>
<template v-if="form.id">
<Poptip
:transfer="true"
confirm
title="确认要删除吗"
@on-ok="destroySchedule">
<Button type="primary" ghost>删除</Button>
</Poptip>
</template>
<Button @click="$emit('update:isShow',false)" style="margin-left: 8px">取消</Button>
<Button type="primary" @click="submit"></Button>
</template>
@ -176,6 +178,20 @@ export default {
}
},
methods: {
initForm(){
this.form = {
id:'',
customer_id: '',
product_id: '',
order_id: '',
nurse_id: '',
address_id:'',
start_time: '',
end_time: '',
schedule_list_skus: []
}
},
nurseLoad(){
this.nurseSelect.page ++
this.getNurses()
@ -202,11 +218,9 @@ export default {
startTimePick(e){
this.form.start_time = `${this.date} ${e}`
console.log(this.form)
},
endTimePick(e){
this.form.end_time = `${this.date} ${e}`
console.log(this.form)
},
// handleCheckAllChange(val){
@ -246,8 +260,8 @@ export default {
})
this.form.schedule_list_skus = temp
this.$refs['elForm'].validate().then(valid => {
console.log(valid)
if (valid) {
console.log(1111,this.form)
scheduleSave(this.form).then(res => {
this.$successMessage('add', '排班')
this.$emit('update:isShow', false)
@ -283,9 +297,8 @@ export default {
} else {
this.$emit('update:date','')
this.$refs['elForm'].resetFields()
this.$refs['table'].clearSelection()
console.log(this.form)
this.initForm()
}
}
},

Loading…
Cancel
Save