|
|
@@ -28,99 +28,166 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-divider />
|
|
|
-
|
|
|
- <a-descriptions :column="2">
|
|
|
- <a-descriptions-item label="主客姓名">
|
|
|
- 张三
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- /></a-descriptions-item>
|
|
|
- <a-descriptions-item label="房间数量"> 3间 </a-descriptions-item>
|
|
|
- <a-descriptions-item label="手机号">
|
|
|
- 1588888888
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- /></a-descriptions-item>
|
|
|
- <a-descriptions-item label="房间号"> 8888/9999 </a-descriptions-item>
|
|
|
- <a-descriptions-item label="宾客类型">
|
|
|
- 散客
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- /></a-descriptions-item>
|
|
|
- <a-descriptions-item label="入住时间">
|
|
|
- 2023-03-21 18:55
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item label="房价方案">
|
|
|
- 会员京卡折扣
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item label="预离时间">
|
|
|
- 2023-03-21 18:55
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item label="订单来源">
|
|
|
- 美团
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- /></a-descriptions-item>
|
|
|
- <a-descriptions-item label="已住时长"> 3天 </a-descriptions-item>
|
|
|
- <a-descriptions-item label="外部单号">
|
|
|
- MT8888888888
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item label="销售员工">
|
|
|
- 无
|
|
|
- <a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- /></a-descriptions-item>
|
|
|
- <a-descriptions-item label="订单备注" :span="2">
|
|
|
- 该房间打碎玻璃杯1只,应赔付80元<a-icon
|
|
|
- type="edit"
|
|
|
- style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
- />
|
|
|
- </a-descriptions-item>
|
|
|
- <a-descriptions-item
|
|
|
- label="叫醒服务"
|
|
|
- :span="2"
|
|
|
- v-for="(item, index) in wakeList"
|
|
|
- :key="index"
|
|
|
+ <a-tabs>
|
|
|
+ <a-tab-pane
|
|
|
+ :key="item.id"
|
|
|
+ :tab="item.roomName"
|
|
|
+ v-for="(item, livingIndex) in model.livingRoomIds"
|
|
|
>
|
|
|
- <a-select
|
|
|
- style="width: 100px"
|
|
|
- placeholder="房间号"
|
|
|
- @change="onChange"
|
|
|
- >
|
|
|
- <a-select-option value="jack"> 1001 </a-select-option>
|
|
|
- <a-select-option value="lucy"> 1002 </a-select-option>
|
|
|
- </a-select>
|
|
|
- <a-date-picker
|
|
|
- style="width: 120px; margin-left: 2px"
|
|
|
- placeholder="日期"
|
|
|
- @change="onChange"
|
|
|
- />
|
|
|
- <a-time-picker
|
|
|
- style="width: 100px; margin-left: 2px"
|
|
|
- :default-value="moment('12:08', 'HH:mm')"
|
|
|
- format="HH:mm"
|
|
|
- />
|
|
|
- <a-icon
|
|
|
- v-if="wakeList.length - 1 == index"
|
|
|
- type="plus-circle"
|
|
|
- class="dynamic-delete-button"
|
|
|
- @click="puls()"
|
|
|
- />
|
|
|
- <a-icon
|
|
|
- type="minus-circle"
|
|
|
- style="color: #f56c6c"
|
|
|
- class="dynamic-delete-button"
|
|
|
- v-if="wakeList.length > 1"
|
|
|
- @click="() => remove(index)"
|
|
|
- />
|
|
|
- </a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
- <h4
|
|
|
+ <a-descriptions :column="2">
|
|
|
+ <a-descriptions-item label="主客姓名">
|
|
|
+ {{ item.livingCustomers[0].customerName }}
|
|
|
+ <a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /></a-descriptions-item>
|
|
|
+ <a-descriptions-item label="性别">
|
|
|
+ {{
|
|
|
+ item.livingCustomers[0].gender === 1 ? "男" : "女"
|
|
|
+ }}</a-descriptions-item
|
|
|
+ >
|
|
|
+ <a-descriptions-item label="房间数量">
|
|
|
+ {{ livingIndex == 0 ? model.livingRoomIds.length : 1 }}间
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="手机号">
|
|
|
+ {{ item.livingCustomers[0].phone }}
|
|
|
+ <a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /></a-descriptions-item>
|
|
|
+
|
|
|
+ <a-descriptions-item label="宾客类型">
|
|
|
+ {{ customerTypeName(model.orderInfo.customerType) }}
|
|
|
+ <a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /></a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入住时间">
|
|
|
+ {{ model.orderInfo.arrivalTime }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="房价方案"> -- </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="预离时间">
|
|
|
+ {{ model.orderInfo.dueOutTime }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="订单来源">
|
|
|
+ {{ customerSourceName(model.orderInfo.customerSource) }}
|
|
|
+ <a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /></a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入住类型">
|
|
|
+ {{ model.orderInfo.bookingType == 1 ? "全天" : "钟点" }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="入住天数">
|
|
|
+ {{ model.orderInfo.dayCount }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="早餐券">
|
|
|
+ {{ model.orderInfo.breakfastNum }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="外部单号">
|
|
|
+ {{ model.orderInfo.outerOrdersNo }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="销售员工">
|
|
|
+ {{ warranterName(model.orderInfo.warranter) }}
|
|
|
+ <a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /></a-descriptions-item>
|
|
|
+ <a-descriptions-item label="订单备注" :span="2">
|
|
|
+ {{ model.orderInfo.remark
|
|
|
+ }}<a-icon
|
|
|
+ type="edit"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ />
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item
|
|
|
+ label="叫醒服务"
|
|
|
+ :span="2"
|
|
|
+ v-for="(item, index) in wakeList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ style="width: 100px"
|
|
|
+ placeholder="房间号"
|
|
|
+ @change="onChange"
|
|
|
+ >
|
|
|
+ <a-select-option value="jack"> 1001 </a-select-option>
|
|
|
+ <a-select-option value="lucy"> 1002 </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-date-picker
|
|
|
+ style="width: 120px; margin-left: 2px"
|
|
|
+ placeholder="日期"
|
|
|
+ @change="onChange"
|
|
|
+ />
|
|
|
+ <a-time-picker
|
|
|
+ style="width: 100px; margin-left: 2px"
|
|
|
+ :default-value="moment('12:08', 'HH:mm')"
|
|
|
+ format="HH:mm"
|
|
|
+ />
|
|
|
+ <a-icon
|
|
|
+ v-if="wakeList.length - 1 == index"
|
|
|
+ type="plus-circle"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="puls()"
|
|
|
+ />
|
|
|
+ <a-icon
|
|
|
+ type="minus-circle"
|
|
|
+ style="color: #f56c6c"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ v-if="wakeList.length > 1"
|
|
|
+ @click="() => remove(index)"
|
|
|
+ />
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
+ <h4
|
|
|
+ style="
|
|
|
+ color: rgba(255, 141, 26, 1);
|
|
|
+ font-weight: 600;
|
|
|
+ margin-top: 15px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 同住人
|
|
|
+ </h4>
|
|
|
+ <div style="display: flex">
|
|
|
+ <div style="display: flex; flex-direction: column">
|
|
|
+ <a-icon
|
|
|
+ type="user-add"
|
|
|
+ style="color: rgba(255, 141, 26, 1); font-size: 18px"
|
|
|
+ /><a-button
|
|
|
+ type="link"
|
|
|
+ @click="addlivingCustomer(item.livingOrder.id, item.roomId)"
|
|
|
+ >
|
|
|
+ 添加
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="livingCustomers-grid">
|
|
|
+ <a-row
|
|
|
+ v-for="(customer, index) in item.livingCustomers"
|
|
|
+ :key="customer.id"
|
|
|
+ >
|
|
|
+ <template v-if="index > 0">
|
|
|
+ <a-col :span="7"> {{ customer.customerName }} </a-col>
|
|
|
+ <a-col :span="1"
|
|
|
+ >{{ customer.gender == 1 ? "男" : "女" }}
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8"> {{ customer.certNo }}</a-col>
|
|
|
+ <a-col :span="6"> {{ customer.phone }}</a-col>
|
|
|
+ <a-col :span="2">
|
|
|
+ <a-icon
|
|
|
+ type="minus-circle"
|
|
|
+ style="color: #f56c6c"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="() => removeLivingCustomer(customer.id)"
|
|
|
+ /></a-col>
|
|
|
+ </template>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ <!-- <h4
|
|
|
style="
|
|
|
color: rgba(255, 141, 26, 1);
|
|
|
font-weight: 600;
|
|
|
@@ -140,7 +207,7 @@
|
|
|
<a-descriptions-item label="会员级别"> 金卡 </a-descriptions-item>
|
|
|
<a-descriptions-item label="余额"> 3000.00元 </a-descriptions-item>
|
|
|
<a-descriptions-item label="积分"> 888888分 </a-descriptions-item>
|
|
|
- </a-descriptions>
|
|
|
+ </a-descriptions> -->
|
|
|
</div>
|
|
|
<div style="width: 40%">
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
@@ -268,13 +335,15 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <customer-modal ref="modalCustomerForm" @ok="modalFormOk"></customer-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { httpAction, getAction } from "@/api/manage";
|
|
|
+import { httpAction, getAction, deleteAction } from "@/api/manage";
|
|
|
import { validateDuplicateValue } from "@/utils/util";
|
|
|
import moment from "moment";
|
|
|
+import CustomerModal from "./CustomerModal.vue";
|
|
|
const columns = [
|
|
|
// {
|
|
|
// title: "",
|
|
|
@@ -358,9 +427,11 @@ for (let i = 0; i < 8; i++) {
|
|
|
amount: 888,
|
|
|
});
|
|
|
}
|
|
|
+const date = new Date();
|
|
|
+const endDate = new Date(date.setDate(date.getDate() + 1));
|
|
|
export default {
|
|
|
name: "BusMeetingRoomForm",
|
|
|
- components: {},
|
|
|
+ components: { CustomerModal },
|
|
|
props: {
|
|
|
//表单禁用
|
|
|
disabled: {
|
|
|
@@ -377,7 +448,13 @@ export default {
|
|
|
data2,
|
|
|
columns2,
|
|
|
wakeList: [{}],
|
|
|
- model: {},
|
|
|
+ model: {
|
|
|
+ // data: data,
|
|
|
+ orderInfo: {},
|
|
|
+ roomIds: [],
|
|
|
+ layoutDayPrices: [],
|
|
|
+ livingRoomIds: [],
|
|
|
+ },
|
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
|
sm: { span: 5 },
|
|
|
@@ -395,7 +472,12 @@ export default {
|
|
|
add: "/business/busMeetingRoom/add",
|
|
|
edit: "/business/busMeetingRoom/edit",
|
|
|
queryById: "/business/busMeetingRoom/queryById",
|
|
|
+ getBookingOrderInfo:
|
|
|
+ "/business/busRoomBookingOrders/getBookingOrderInfo",
|
|
|
},
|
|
|
+ id: "",
|
|
|
+ customerSourceList: [],
|
|
|
+ warranterList: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -410,8 +492,85 @@ export default {
|
|
|
}
|
|
|
//备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
+ getAction("/business/busDictItem/list", {
|
|
|
+ hotelId: _info.id,
|
|
|
+ dictId: "1639538915239743490",
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.customerSourceList = res.result.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ getAction("/business/busSalesPerson/list", {
|
|
|
+ hotelId: _info.id,
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.warranterList = res.result.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
+ removeLivingCustomer(id) {
|
|
|
+ deleteAction("/business/busLivingCustomer/delete", { id: id }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.getBookingOrderInfo();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ addlivingCustomer(id, roomId) {
|
|
|
+ console.log(id);
|
|
|
+ this.$refs.modalCustomerForm.add(id, roomId);
|
|
|
+ this.$refs.modalCustomerForm.title = "添加同住人";
|
|
|
+ this.$refs.modalCustomerForm.disableSubmit = false;
|
|
|
+ },
|
|
|
+ modalFormOk(e) {
|
|
|
+ this.getBookingOrderInfo();
|
|
|
+ },
|
|
|
+ customerTypeName(customerType) {
|
|
|
+ switch (customerType) {
|
|
|
+ case 1:
|
|
|
+ return "散客";
|
|
|
+ case 2:
|
|
|
+ return "会员";
|
|
|
+ case 3:
|
|
|
+ return "协议单位";
|
|
|
+ case 4:
|
|
|
+ return "中介";
|
|
|
+ default:
|
|
|
+ return "散客";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ warranterName(warranter) {
|
|
|
+ var find = this.warranterList.find((t) => t.id == warranter);
|
|
|
+ return find ? find.name : "--";
|
|
|
+ },
|
|
|
+ customerSourceName(customerSource) {
|
|
|
+ var find = this.customerSourceList.find((t) => t.id == customerSource);
|
|
|
+ return find ? find.itemText : "--";
|
|
|
+ },
|
|
|
+ getBookingOrderInfo() {
|
|
|
+ getAction(this.url.getBookingOrderInfo, {
|
|
|
+ bookingNo: this.id,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ var livingRoomId = JSON.parse(
|
|
|
+ JSON.stringify(res.result.livingRoomIds[0])
|
|
|
+ );
|
|
|
+ livingRoomId.id = "1";
|
|
|
+ livingRoomId.roomName = "全部";
|
|
|
+ var list = [];
|
|
|
+ res.result.livingRoomIds.forEach((t) => {
|
|
|
+ list = [...list, ...t.livingCustomers];
|
|
|
+ });
|
|
|
+ livingRoomId.livingCustomers = list;
|
|
|
+ res.result.livingRoomIds.unshift(livingRoomId);
|
|
|
+ this.model = res.result;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
|
this.selectionRows = selectionRows;
|
|
|
@@ -427,8 +586,10 @@ export default {
|
|
|
onChange(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
- add() {
|
|
|
+ add(id) {
|
|
|
+ this.id = id;
|
|
|
this.edit(this.modelDefault);
|
|
|
+ this.getBookingOrderInfo();
|
|
|
},
|
|
|
edit(record) {
|
|
|
this.model = Object.assign({}, record);
|
|
|
@@ -513,4 +674,11 @@ export default {
|
|
|
padding: 5px 5px !important;
|
|
|
overflow-wrap: break-word;
|
|
|
}
|
|
|
+
|
|
|
+#livingCustomers-grid [class~="ant-col"] {
|
|
|
+ border: #ccc 1px solid;
|
|
|
+}
|
|
|
+#livingCustomers-grid [class~="ant-col"]:last-child {
|
|
|
+ border: 0;
|
|
|
+}
|
|
|
</style>
|