Commit bba68658 by 吕明尚

限制订单换房必须有房间才可提交

parent 2dd1d51c
......@@ -516,8 +516,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属房间" prop="roomId">
<el-select v-model="changeForm.roomId" clearable placeholder="请选择所属房间">
<el-form-item label="更换房间" prop="roomId">
<el-select v-model="changeForm.roomId" clearable placeholder="请选择更换房间">
<el-option
v-for="item in changeRoomList"
:key="item.id"
......@@ -1080,8 +1080,9 @@ export default {
},
changeroomList(row) {
changeRoomList(row.id).then(res => {
if (res.code === 500) {
if (res.data === null) {
this.$modal.msgError(res.msg);
this.changeOpen = false;
} else {
this.changeRoomList = res.data
}
......@@ -1113,6 +1114,10 @@ export default {
})
},
submitChangeRoom() {
if (this.changeForm.roomId === '' || this.changeForm.roomId === null) {
this.$modal.msgError("更换房间不能为空");
return;
}
this.$refs["changeForm"].validate(valid => {
if (valid) {
changeRoom(this.changeForm).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment