|
|
@@ -96,37 +96,74 @@ |
|
|
|
|
|
|
|
<transition name="bounce" v-if="editShow"> |
|
|
|
<el-dialog title="详情" :visible.sync="editShow" width="90%" top="15px"> |
|
|
|
<el-form ref="form" label-width="100px" style="width: 100%;padding-bottom: 20px"> |
|
|
|
<div style="display: flex;width: 100%"> |
|
|
|
<el-form-item v-if="editType" label="ID:" style="width: 80%"> |
|
|
|
<div v-html="editData.id"></div> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-form-item label="名称:" style="width: 80%"> |
|
|
|
<el-input v-model="editData.hotel_name" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="display: flex"> |
|
|
|
<el-form-item label="省:" > |
|
|
|
<el-select v-model="editData.province" placeholder="请选择" style="width: 120px;" clearable> |
|
|
|
<el-option v-for="item in province" :key="item.value" :label="item.name" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="市:" > |
|
|
|
<el-select v-model="editData.city" placeholder="请选择" style="width: 120px;" clearable> |
|
|
|
<el-option v-for="item in edit_city" :key="item.value" :label="item.name" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-form-item label="详细地址:" style="width: 80%"> |
|
|
|
<el-input v-model="editData.detail_address" style="width: 580px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" @click="editDoing()" >保存</el-button> |
|
|
|
</div> |
|
|
|
<el-form ref="form" label-width="140px" style="width: 100%;padding-bottom: 20px"> |
|
|
|
<el-form-item v-if="editType" label="ID:" style="width: 100%"> |
|
|
|
<div v-html="editData.id"></div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="名称:" style="width: 100%"> |
|
|
|
<el-input v-model="editData.plan_name" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="酒店:" style="width: 100%"> |
|
|
|
<el-select v-model="editData.hotel_id" placeholder="请选择" style="width: 120px;" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in hotelList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="房型:" style="width: 100%"> |
|
|
|
<el-select v-model="editData.room_id" placeholder="请选择" style="width: 120px;" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in editRoomList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="早餐数量:" style="width: 100%"> |
|
|
|
<el-input v-model="editData.breakfast_num" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提前预定天数:" style="width: 100%"> |
|
|
|
<el-input v-model="editData.book_end_day" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="几点前预定:" style="width: 100%"> |
|
|
|
<el-input v-model="editData.book_end_hour" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="连续入住类型:" style="width: 100%"> |
|
|
|
<el-radio-group v-model="editData.continuity_type" size="small"> |
|
|
|
<el-radio-button :label="0">无限制</el-radio-button> |
|
|
|
<el-radio-button :label="1">连住几晚</el-radio-button> |
|
|
|
<el-radio-button :label="2">连住几晚及以上</el-radio-button> |
|
|
|
<el-radio-button :label="3">连住几晚及其倍数</el-radio-button> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="editData.continuity_type != 0" label="连续入住天数:" style="width: 100%"> |
|
|
|
<el-input v-model="editData.coutinuity_day" style="width: 280px;" placeholder="请输入内容"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="采购负责人:" style="width: 100%"> |
|
|
|
<el-select v-model="editData.purchase_user_id" placeholder="请选择" style="width: 120px;" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in userList" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="方案说明:" style="width: 100%"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
:rows="4" |
|
|
|
placeholder="请输入内容" |
|
|
|
v-model="editData.plan_memo"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="editDoing()" style="margin: 10px" > 保 存 </el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
</transition> |
|
|
@@ -159,6 +196,7 @@ |
|
|
|
}, |
|
|
|
hotelList:[], |
|
|
|
roomList:[], |
|
|
|
editRoomList:[], |
|
|
|
roomAllList:[], |
|
|
|
userList: [], |
|
|
|
//连续入住类型 0无限制 1连住几晚 2连住几晚及以上 3连住几晚及其倍数 |
|
|
@@ -167,8 +205,8 @@ |
|
|
|
{id:1,name:"连住几晚"}, |
|
|
|
{id:2,name:"连住几晚及以上"}, |
|
|
|
{id:3,name:"连住几晚及其倍数"} |
|
|
|
] |
|
|
|
|
|
|
|
], |
|
|
|
edit_city_set:2 |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@@ -186,6 +224,27 @@ |
|
|
|
}).catch(function (error) { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
"editData.hotel_id" : function (newVal,oldVal){ |
|
|
|
if (this.edit_city_set==2) { |
|
|
|
this.editRoomList = [] |
|
|
|
this.editData.room_id = "" |
|
|
|
} |
|
|
|
if (newVal == "") { |
|
|
|
return false |
|
|
|
} |
|
|
|
axios.post("/hotel.php/cf_room_info/getRoomList?hotelId="+newVal, {}).then((response) => { |
|
|
|
let data = response.data; |
|
|
|
this.editRoomList = data.list; |
|
|
|
this.edit_city_set++ |
|
|
|
}).catch(function (error) { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
"editData.continuity_type" : function (newVal,oldVal) { |
|
|
|
if (newVal == 0) { |
|
|
|
this.editData.coutinuity_day = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@@ -263,27 +322,25 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
edit(info) { |
|
|
|
this.$message.error("功能待完善"); |
|
|
|
return false |
|
|
|
if (info == null) { |
|
|
|
this.editType = false; |
|
|
|
this.editData = { |
|
|
|
hotel_id:"", |
|
|
|
room_id:"", |
|
|
|
plan_name:"", |
|
|
|
breakfast_num:"", |
|
|
|
book_end_day:"", |
|
|
|
book_end_hour:"", |
|
|
|
breakfast_num:0, |
|
|
|
book_end_day:0, |
|
|
|
book_end_hour:0, |
|
|
|
continuity_type:0, |
|
|
|
coutinuity_day:"", |
|
|
|
coutinuity_day:0, |
|
|
|
plan_memo:"", |
|
|
|
purchase_user_id:"", |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
this.edit_city_set = 1; |
|
|
|
this.editType = true; |
|
|
|
this.editData = { |
|
|
|
id:info.id, |
|
|
|
hotel_id:info.hotel_id, |
|
|
|
room_id:info.room_id, |
|
|
|
plan_name:info.plan_name, |
|
|
@@ -308,28 +365,21 @@ |
|
|
|
if (this.editData.plan_name==''){ |
|
|
|
this.$message.error("名称不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.breakfast_num==''){ |
|
|
|
if (this.editData.breakfast_num===''){ |
|
|
|
this.$message.error("早餐数量不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.book_end_day==''){ |
|
|
|
if (this.editData.book_end_day===''){ |
|
|
|
this.$message.error("提前几天预定不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.book_end_hour==''){ |
|
|
|
if (this.editData.book_end_hour===''){ |
|
|
|
this.$message.error("几点前预定不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.continuity_type==''){ |
|
|
|
this.$message.error("选择入住类型不能");return false; |
|
|
|
} |
|
|
|
if (this.editData.coutinuity_day==''){ |
|
|
|
if (this.editData.coutinuity_day===''){ |
|
|
|
this.$message.error("连续入住天数不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.plan_memo==''){ |
|
|
|
this.$message.error("方案说明不能为空");return false; |
|
|
|
} |
|
|
|
if (this.editData.purchase_user_id==''){ |
|
|
|
this.$message.error("请选择采购负责人");return false; |
|
|
|
} |
|
|
|
this.setAreaName(); |
|
|
|
axios.post("/hotel.php/cf_room_plan/save", this.editData).then( (response)=> { |
|
|
|
let data = response.data; |
|
|
|
console.log(this.tableData); |
|
|
|