|
@@ -76,9 +76,9 @@
|
|
|
>锁房</a-button
|
|
>锁房</a-button
|
|
|
>
|
|
>
|
|
|
<a-button
|
|
<a-button
|
|
|
- disabled
|
|
|
|
|
|
|
+ :disabled="joinDisabled"
|
|
|
style="margin-bottom: 10px"
|
|
style="margin-bottom: 10px"
|
|
|
- @click="handleAdd"
|
|
|
|
|
|
|
+ @click="addUnion"
|
|
|
type="danger"
|
|
type="danger"
|
|
|
>联房</a-button
|
|
>联房</a-button
|
|
|
><a-button
|
|
><a-button
|
|
@@ -801,7 +801,6 @@ import continuedModalVue from "./modules/fangtaiModal/continuedModal/continuedMo
|
|
|
import SelectCheckInRoomOrderModal from "./modules/checkIn/SelectCheckInRoomOrderModal.vue";
|
|
import SelectCheckInRoomOrderModal from "./modules/checkIn/SelectCheckInRoomOrderModal.vue";
|
|
|
import CustomerModal from "./modules/checkIn/CustomerModal.vue";
|
|
import CustomerModal from "./modules/checkIn/CustomerModal.vue";
|
|
|
import exchangeHousesModalVue from "./modules/fangtaiModal/exchangeHouses/exchangeHousesModal.vue";
|
|
import exchangeHousesModalVue from "./modules/fangtaiModal/exchangeHouses/exchangeHousesModal.vue";
|
|
|
-
|
|
|
|
|
import { TreeSelect } from "ant-design-vue";
|
|
import { TreeSelect } from "ant-design-vue";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
const SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
|
const SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
|
@@ -915,6 +914,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ joinDisabled() {
|
|
|
|
|
+ return !this.roomList.some((t) => {
|
|
|
|
|
+ return (
|
|
|
|
|
+ t.rooms.filter((c) => c.roomInfo.state === 88).length == 1 &&
|
|
|
|
|
+ t.rooms.filter(
|
|
|
|
|
+ (c) =>
|
|
|
|
|
+ c.roomInfo.state === 88 &&
|
|
|
|
|
+ (c.roomInfo.roomStatus === 3 || c.roomInfo.roomStatus === 4)
|
|
|
|
|
+ ).length == 1
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
lockDisabled() {
|
|
lockDisabled() {
|
|
|
return !this.roomList.some((t) =>
|
|
return !this.roomList.some((t) =>
|
|
|
t.rooms.some(
|
|
t.rooms.some(
|
|
@@ -1022,6 +1033,30 @@ export default {
|
|
|
// this.$refs.ModalEditScheduleRoom.disableSubmit = false;
|
|
// this.$refs.ModalEditScheduleRoom.disableSubmit = false;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ addUnion() {
|
|
|
|
|
+ var selectRoom = [];
|
|
|
|
|
+ this.roomList.forEach((t) => {
|
|
|
|
|
+ t.rooms.forEach((c) => {
|
|
|
|
|
+ if (c.roomInfo.state === 88) {
|
|
|
|
|
+ selectRoom.push({
|
|
|
|
|
+ roomId: c.roomInfo.id,
|
|
|
|
|
+ livingOrderId: c.livingData.livingOrder.id,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ if (selectRoom.length === 0) {
|
|
|
|
|
+ this.$message.warning("请先选择房间");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.add();
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.title = "请选择需要关联的订单";
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.disableSubmit = false;
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.livingOrderId =
|
|
|
|
|
+ selectRoom[0].livingOrderId;
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrder.livingRoomId =
|
|
|
|
|
+ selectRoom[0].roomId;
|
|
|
|
|
+ },
|
|
|
moment,
|
|
moment,
|
|
|
posOrderClick() {
|
|
posOrderClick() {
|
|
|
this.$refs.posOrderModal.visible = true;
|
|
this.$refs.posOrderModal.visible = true;
|