Commit bba68658 by 吕明尚

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

parent 2dd1d51c
...@@ -516,8 +516,8 @@ ...@@ -516,8 +516,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="所属房间" prop="roomId"> <el-form-item label="更换房间" prop="roomId">
<el-select v-model="changeForm.roomId" clearable placeholder="请选择所属房间"> <el-select v-model="changeForm.roomId" clearable placeholder="请选择更换房间">
<el-option <el-option
v-for="item in changeRoomList" v-for="item in changeRoomList"
:key="item.id" :key="item.id"
...@@ -1080,8 +1080,9 @@ export default { ...@@ -1080,8 +1080,9 @@ export default {
}, },
changeroomList(row) { changeroomList(row) {
changeRoomList(row.id).then(res => { changeRoomList(row.id).then(res => {
if (res.code === 500) { if (res.data === null) {
this.$modal.msgError(res.msg); this.$modal.msgError(res.msg);
this.changeOpen = false;
} else { } else {
this.changeRoomList = res.data this.changeRoomList = res.data
} }
...@@ -1113,6 +1114,10 @@ export default { ...@@ -1113,6 +1114,10 @@ export default {
}) })
}, },
submitChangeRoom() { submitChangeRoom() {
if (this.changeForm.roomId === '' || this.changeForm.roomId === null) {
this.$modal.msgError("更换房间不能为空");
return;
}
this.$refs["changeForm"].validate(valid => { this.$refs["changeForm"].validate(valid => {
if (valid) { if (valid) {
changeRoom(this.changeForm).then(res => { 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