lion 1 year ago
parent d6cc5ede29
commit cc47064ec0

@ -216,7 +216,8 @@
accompany_total: 0, accompany_total: 0,
accompany:[], accompany:[],
status: 1, status: 1,
reason: '' reason: '',
is_hand:1
}, },
loading: false, loading: false,
allUser:[], allUser:[],
@ -288,6 +289,7 @@
} }
if (this.type === 'more') { if (this.type === 'more') {
console.log("this.form.user_id",this.form.user_id) console.log("this.form.user_id",this.form.user_id)
this.form.is_hand = 0
let _arr = [] let _arr = []
if (this.base.isNull(this.form.user_id)) { if (this.base.isNull(this.form.user_id)) {
this.allUser.map(item => { this.allUser.map(item => {
@ -308,14 +310,15 @@
this.form.user_id = _arr.join(",") this.form.user_id = _arr.join(",")
} }
if (this.type === 'add') { if (this.type === 'add') {
this.form.is_hand = 1
if (this.base.isNull(this.form.user_id) && this.base.isNull(this.form.name)) { if (this.base.isNull(this.form.user_id) && this.base.isNull(this.form.name)) {
this.$Message.warning('请选择学员或输入预约人姓名') this.$Message.warning('请选择学员或输入预约人姓名')
return return
} }
} }
console.log("form",this.form)
// return // return
if (this.type === "editor") { if (this.type === "editor") {
this.form.status = 0 this.form.status = 0
@ -371,6 +374,7 @@
}).then(res => { }).then(res => {
this.form = this.base.requestToForm(res, this.form) this.form = this.base.requestToForm(res, this.form)
this.form.status = res.status ? res.status : 0 this.form.status = res.status ? res.status : 0
this.form.is_hand = res.is_hand?res.is_hand : 0
let _arr = res.site?res.site.split(","):[] let _arr = res.site?res.site.split(","):[]
_arr.map(item=>{ _arr.map(item=>{
this.siteData.push(parseInt(item)) this.siteData.push(parseInt(item))
@ -400,7 +404,12 @@
this.user_options.map(item => { this.user_options.map(item => {
if (item.id === e) { if (item.id === e) {
this.form.mobile = item.mobile this.form.mobile = item.mobile
this.form.name = item.name this.form.name = item.name
if(this.base.isNull(this.form.plate)){
this.form.plate = item.plate?item.plate:''
}else{
this.form.plate += item.plate?','+item.plate :''
}
} }
}) })
} }
@ -492,7 +501,8 @@
this.getDetail() this.getDetail()
this.typeName = '编辑' this.typeName = '编辑'
} else if (this.type === 'more') { } else if (this.type === 'more') {
this.typeName = '批量预约' this.typeName = '批量预约'
this.form.is_hand = 0
} else { } else {
this.typeName = '手动预约' this.typeName = '手动预约'
} }
@ -518,7 +528,8 @@
accompany_total: 0, accompany_total: 0,
accompany:[], accompany:[],
status: 1, status: 1,
reason: '' reason: '',
is_hand:1
} }
this.$refs['dialog'].reset() this.$refs['dialog'].reset()
} }

Loading…
Cancel
Save