|
@@ -19,11 +19,15 @@
|
|
|
label="入住类型"
|
|
label="入住类型"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.bookingType"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="入住类型">
|
|
|
|
|
- <a-select-option value="全天"> 全天 </a-select-option>
|
|
|
|
|
- <a-select-option value="钟点"> 钟点 </a-select-option>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="入住类型"
|
|
|
|
|
+ v-model="model.orderInfo.bookingType"
|
|
|
|
|
+ @change="bookingTypeChange"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option :value="1"> 全天 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="2"> 钟点 </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -33,17 +37,22 @@
|
|
|
label="预抵时间"
|
|
label="预抵时间"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.arrivalTime2"
|
|
|
>
|
|
>
|
|
|
<j-date
|
|
<j-date
|
|
|
placeholder="预抵时间"
|
|
placeholder="预抵时间"
|
|
|
- v-model="model.endTime"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.arrivalTime2"
|
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
|
|
|
+ :allowClear="false"
|
|
|
|
|
+ :disabled-date="disabledDate"
|
|
|
|
|
+ @change="arrivalTimeChange"
|
|
|
/>
|
|
/>
|
|
|
<a-time-picker
|
|
<a-time-picker
|
|
|
style="width: 80px; margin-left: 2px"
|
|
style="width: 80px; margin-left: 2px"
|
|
|
- :default-value="moment('18:00', 'HH:mm')"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.arrivalTimeSpan"
|
|
|
|
|
+ :default-value="moment('12:00', 'HH:mm')"
|
|
|
format="HH:mm"
|
|
format="HH:mm"
|
|
|
|
|
+ :allowClear="false"
|
|
|
/>
|
|
/>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -52,17 +61,21 @@
|
|
|
label="预离时间"
|
|
label="预离时间"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.dueOutTime2"
|
|
|
>
|
|
>
|
|
|
<j-date
|
|
<j-date
|
|
|
placeholder="预离时间"
|
|
placeholder="预离时间"
|
|
|
- v-model="model.endTime"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.dueOutTime2"
|
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
|
|
|
+ :allowClear="false"
|
|
|
|
|
+ :disabled-date="disabledDate"
|
|
|
|
|
+ @change="arrivalTimeChange"
|
|
|
/>
|
|
/>
|
|
|
<a-time-picker
|
|
<a-time-picker
|
|
|
style="width: 80px; margin-left: 2px"
|
|
style="width: 80px; margin-left: 2px"
|
|
|
- :default-value="moment('12:00', 'HH:mm')"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.dueOutTimeSpan"
|
|
|
format="HH:mm"
|
|
format="HH:mm"
|
|
|
|
|
+ :allowClear="false"
|
|
|
/>
|
|
/>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -71,25 +84,70 @@
|
|
|
label="客人来源"
|
|
label="客人来源"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.customerSource"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="订单来源">
|
|
|
|
|
- <a-select-option value="散客"> 散客 </a-select-option>
|
|
|
|
|
- <a-select-option value="美团"> 美团 </a-select-option>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="客人来源"
|
|
|
|
|
+ v-model="model.orderInfo.customerSource"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ v-for="(item, index) in customerSourceList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.itemText }}
|
|
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
|
|
|
|
+ <a-col :span="24" v-if="model.orderInfo.bookingType == 2">
|
|
|
|
|
+ <a-form-model-item
|
|
|
|
|
+ label="时长"
|
|
|
|
|
+ :labelCol="labelCol"
|
|
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
|
|
+ prop="orderInfo.hourRoomId"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="时长"
|
|
|
|
|
+ v-model="model.orderInfo.hourRoomId"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ v-for="(item, index) in hourRoomRuleList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.hourRoomName }}
|
|
|
|
|
+ </a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="24" v-else>
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
label="天数"
|
|
label="天数"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.dayCount"
|
|
|
>
|
|
>
|
|
|
<a-input-number
|
|
<a-input-number
|
|
|
- v-model="model.userName"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.dayCount"
|
|
|
placeholder="天数"
|
|
placeholder="天数"
|
|
|
:min="1"
|
|
:min="1"
|
|
|
|
|
+ @change="dayCountChange"
|
|
|
|
|
+ ></a-input-number>
|
|
|
|
|
+ </a-form-model-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <a-form-model-item
|
|
|
|
|
+ label="早餐"
|
|
|
|
|
+ :labelCol="labelCol"
|
|
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
|
|
+ prop="orderInfo.breakfastNum"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ v-model="model.orderInfo.breakfastNum"
|
|
|
|
|
+ placeholder="早餐"
|
|
|
|
|
+ :min="0"
|
|
|
></a-input-number>
|
|
></a-input-number>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -98,14 +156,18 @@
|
|
|
label="预定方式"
|
|
label="预定方式"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.bookingDicWay"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="预定方式">
|
|
|
|
|
- <a-select-option value="美团酒店">
|
|
|
|
|
- 美团酒店
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="携程酒店">
|
|
|
|
|
- 携程酒店
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="预定方式"
|
|
|
|
|
+ v-model="model.orderInfo.bookingDicWay"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ v-for="(item, index) in bookingdicWayList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.itemText }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -115,22 +177,30 @@
|
|
|
label="客人类型"
|
|
label="客人类型"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.customerType"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="客人类型">
|
|
|
|
|
- <a-select-option value="散客"> 散客 </a-select-option>
|
|
|
|
|
- <a-select-option value="会员"> 会员 </a-select-option>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="客人类型"
|
|
|
|
|
+ v-model="model.orderInfo.customerType"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option :value="1"> 散客 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="2"> 会员 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="3"> 协议单位 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="4"> 中介 </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
|
|
|
|
+ <a-col :span="24" v-if="model.orderInfo.bookingType === 1">
|
|
|
<a-form-model-item
|
|
<a-form-model-item
|
|
|
label="房价方案"
|
|
label="房价方案"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.roomPriceSlnId"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="房价方案">
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="房价方案"
|
|
|
|
|
+ v-model="model.orderInfo.roomPriceSlnId"
|
|
|
|
|
+ >
|
|
|
<a-select-option value="会员价"> 会员价 </a-select-option>
|
|
<a-select-option value="会员价"> 会员价 </a-select-option>
|
|
|
<a-select-option value="平日价"> 平日价 </a-select-option>
|
|
<a-select-option value="平日价"> 平日价 </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
@@ -145,10 +215,10 @@
|
|
|
label="联系人"
|
|
label="联系人"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="contactName"
|
|
|
>
|
|
>
|
|
|
<a-auto-complete
|
|
<a-auto-complete
|
|
|
- v-model="model.key1"
|
|
|
|
|
|
|
+ v-model="model.contactName"
|
|
|
placeholder="联系人"
|
|
placeholder="联系人"
|
|
|
@search="handleSearch"
|
|
@search="handleSearch"
|
|
|
@select="(e) => handleSelectMember(e)"
|
|
@select="(e) => handleSelectMember(e)"
|
|
@@ -166,9 +236,9 @@
|
|
|
label="电话"
|
|
label="电话"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="phone"
|
|
|
>
|
|
>
|
|
|
- <a-input v-model="model.mobile" placeholder="电话"></a-input>
|
|
|
|
|
|
|
+ <a-input v-model="model.phone" placeholder="电话"></a-input>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
@@ -176,11 +246,15 @@
|
|
|
label="担保方式"
|
|
label="担保方式"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.warrantType"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="担保方式">
|
|
|
|
|
- <a-select-option value="无担保"> 无担保 </a-select-option>
|
|
|
|
|
- <a-select-option value="有担保"> 有担保 </a-select-option>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="担保方式"
|
|
|
|
|
+ v-model="model.orderInfo.warrantType"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option :value="1"> 无担保 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="2"> 有担保 </a-select-option>
|
|
|
|
|
+ <a-select-option :value="3"> OTA担保 </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -189,11 +263,19 @@
|
|
|
label="销售员"
|
|
label="销售员"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.warranter"
|
|
|
>
|
|
>
|
|
|
- <a-select placeholder="销售员">
|
|
|
|
|
- <a-select-option value="a"> a </a-select-option>
|
|
|
|
|
- <a-select-option value="b"> b </a-select-option>
|
|
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ placeholder="销售员"
|
|
|
|
|
+ v-model="model.orderInfo.warranter"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ value="a"
|
|
|
|
|
+ v-for="item in warranterList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.name }}
|
|
|
|
|
+ </a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -202,10 +284,10 @@
|
|
|
label="外部单号"
|
|
label="外部单号"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="sex"
|
|
|
|
|
|
|
+ prop="orderInfo.outerOrdersNo"
|
|
|
>
|
|
>
|
|
|
<a-input
|
|
<a-input
|
|
|
- v-model="model.mobile"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.outerOrdersNo"
|
|
|
placeholder="外部单号"
|
|
placeholder="外部单号"
|
|
|
></a-input>
|
|
></a-input>
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -215,10 +297,10 @@
|
|
|
label="备注"
|
|
label="备注"
|
|
|
:labelCol="labelCol"
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol"
|
|
:wrapperCol="wrapperCol"
|
|
|
- prop="remark"
|
|
|
|
|
|
|
+ prop="orderInfo.remark"
|
|
|
>
|
|
>
|
|
|
<a-textarea
|
|
<a-textarea
|
|
|
- v-model="model.remark"
|
|
|
|
|
|
|
+ v-model="model.orderInfo.remark"
|
|
|
rows="4"
|
|
rows="4"
|
|
|
placeholder="备注"
|
|
placeholder="备注"
|
|
|
/>
|
|
/>
|
|
@@ -231,46 +313,75 @@
|
|
|
</h4>
|
|
</h4>
|
|
|
<a-divider />
|
|
<a-divider />
|
|
|
<p>
|
|
<p>
|
|
|
- <span>占房天数:1晚</span>
|
|
|
|
|
- <span style="padding-left: 10px">总价:599.00</span>
|
|
|
|
|
|
|
+ <span>占房天数:{{ model.orderInfo.dayCount }}晚</span>
|
|
|
|
|
+ <span style="padding-left: 10px">总价:{{ amount }}</span>
|
|
|
</p>
|
|
</p>
|
|
|
<a-table
|
|
<a-table
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
- :data-source="model.data"
|
|
|
|
|
|
|
+ :data-source="canUserRooms"
|
|
|
:pagination="false"
|
|
:pagination="false"
|
|
|
- rowKey="id"
|
|
|
|
|
|
|
+ :rowKey="rowKey"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
slot="expandedRowRender"
|
|
slot="expandedRowRender"
|
|
|
- slot-scope="text, record, index"
|
|
|
|
|
|
|
+ slot-scope="record, index, indent, expanded"
|
|
|
style="margin: 0"
|
|
style="margin: 0"
|
|
|
>
|
|
>
|
|
|
<p>
|
|
<p>
|
|
|
- 已排房:<a-tag
|
|
|
|
|
- color="blue"
|
|
|
|
|
- closable
|
|
|
|
|
- :visible="visible"
|
|
|
|
|
- @close.stop="tagClose2(rindex, index)"
|
|
|
|
|
- v-for="(item, rindex) in text.rooms"
|
|
|
|
|
- :key="rindex"
|
|
|
|
|
- >{{ item.roomNo }}</a-tag
|
|
|
|
|
|
|
+ 已排房:
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-for="(building, bIndex) in record.buildingRooms"
|
|
|
>
|
|
>
|
|
|
|
|
+ <a-tag
|
|
|
|
|
+ color="blue"
|
|
|
|
|
+ closable
|
|
|
|
|
+ :visible="visible"
|
|
|
|
|
+ @close.stop="tagClose2(rindex, bIndex, index)"
|
|
|
|
|
+ v-for="(item, rindex) in building.floorRooms"
|
|
|
|
|
+ :key="rindex"
|
|
|
|
|
+ v-if="item.check && item.check == 1"
|
|
|
|
|
+ >{{ item.name }}</a-tag
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- <a-tag
|
|
|
|
|
+ color="blue"
|
|
|
|
|
+ closable
|
|
|
|
|
+ :visible="visible"
|
|
|
|
|
+ @close.stop="tagClose2(rindex, index)"
|
|
|
|
|
+ v-for="(item, rindex) in record.rooms"
|
|
|
|
|
+ :key="rindex"
|
|
|
|
|
+ >{{ item.name }}</a-tag
|
|
|
|
|
+ > -->
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p>
|
|
|
|
|
+ 未排房:{{
|
|
|
|
|
+ record.layout.presetNum - (record.rooms || []).length
|
|
|
|
|
+ }}间
|
|
|
</p>
|
|
</p>
|
|
|
- <p>未排房:0间</p>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <template slot="key3" slot-scope="text, record, index">
|
|
|
|
|
- <editable-cell
|
|
|
|
|
- :text="text"
|
|
|
|
|
- @change="onCellChange('key3', index, $event)"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <template slot="favPrice" slot-scope="text, record, index">
|
|
|
|
|
+ <!-- <editable-cell
|
|
|
|
|
+ :text="record.layout.favPrice"
|
|
|
|
|
+ @change="onCellChange('favPrice', index, $event)"
|
|
|
|
|
+ /> -->
|
|
|
|
|
+ {{ record.layout.favPrice }}
|
|
|
</template>
|
|
</template>
|
|
|
- <template slot="key6" slot-scope="text, record, index">
|
|
|
|
|
|
|
+ <template slot="presetNum" slot-scope="text, record, index">
|
|
|
<div>
|
|
<div>
|
|
|
- <a-input-number v-model="model.data[index].key6" :min="0" />
|
|
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ v-model="record.layout.presetNum"
|
|
|
|
|
+ :min="(record.rooms || []).length"
|
|
|
|
|
+ :max="record.layout.oldTags"
|
|
|
|
|
+ @change="presetNumChange($event, record)"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<span slot="action" slot-scope="text, record, index">
|
|
<span slot="action" slot-scope="text, record, index">
|
|
|
- <a @click="pulsRoom(index)">排房</a>
|
|
|
|
|
|
|
+ <a
|
|
|
|
|
+ :disabled="record.layout.presetNum <= 0"
|
|
|
|
|
+ @click="pulsRoom(index)"
|
|
|
|
|
+ >排房</a
|
|
|
|
|
+ >
|
|
|
</span>
|
|
</span>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -286,11 +397,13 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { httpAction, getAction } from "@/api/manage";
|
|
|
|
|
|
|
+import { httpAction, getAction, postAction } from "@/api/manage";
|
|
|
import { validateDuplicateValue } from "@/utils/util";
|
|
import { validateDuplicateValue } from "@/utils/util";
|
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
|
import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
|
|
import EditableCell from "@views/room/modules/checkIn/EditableCell.vue";
|
|
|
import SelectRoomFormModal from "./SelectRoomFormModal.vue";
|
|
import SelectRoomFormModal from "./SelectRoomFormModal.vue";
|
|
|
|
|
+const date = new Date();
|
|
|
|
|
+const endDate = new Date(date.setDate(date.getDate() + 1));
|
|
|
const columns = [
|
|
const columns = [
|
|
|
// {
|
|
// {
|
|
|
// title: "",
|
|
// title: "",
|
|
@@ -299,33 +412,39 @@ const columns = [
|
|
|
// },
|
|
// },
|
|
|
{
|
|
{
|
|
|
title: "房型",
|
|
title: "房型",
|
|
|
- dataIndex: "key1",
|
|
|
|
|
|
|
+ dataIndex: "name",
|
|
|
width: 150,
|
|
width: 150,
|
|
|
|
|
+ customRender: function (text, record) {
|
|
|
|
|
+ return record.layout.name;
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "门市价",
|
|
title: "门市价",
|
|
|
- dataIndex: "key2",
|
|
|
|
|
|
|
+ dataIndex: "marketPrice",
|
|
|
width: 100,
|
|
width: 100,
|
|
|
|
|
+ customRender: function (text, record) {
|
|
|
|
|
+ return record.layout.marketPrice;
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "优惠价",
|
|
title: "优惠价",
|
|
|
- dataIndex: "key3",
|
|
|
|
|
|
|
+ dataIndex: "favPrice",
|
|
|
width: 120,
|
|
width: 120,
|
|
|
- scopedSlots: { customRender: "key3" },
|
|
|
|
|
|
|
+ scopedSlots: { customRender: "favPrice" },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "可订数/可超数",
|
|
title: "可订数/可超数",
|
|
|
- dataIndex: "key4",
|
|
|
|
|
|
|
+ dataIndex: "canUseCount",
|
|
|
width: 170,
|
|
width: 170,
|
|
|
customRender: function (text, record) {
|
|
customRender: function (text, record) {
|
|
|
- return text + "/" + record.key5;
|
|
|
|
|
|
|
+ return record.layout.canUseCount + "/0";
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "预定间数",
|
|
title: "预定间数",
|
|
|
- dataIndex: "key6",
|
|
|
|
|
|
|
+ dataIndex: "presetNum",
|
|
|
width: 100,
|
|
width: 100,
|
|
|
- scopedSlots: { customRender: "key6" },
|
|
|
|
|
|
|
+ scopedSlots: { customRender: "presetNum" },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "操作",
|
|
title: "操作",
|
|
@@ -363,7 +482,23 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
visible: true,
|
|
visible: true,
|
|
|
columns,
|
|
columns,
|
|
|
- model: { data: data },
|
|
|
|
|
|
|
+ model: {
|
|
|
|
|
+ // data: data,
|
|
|
|
|
+ orderInfo: {
|
|
|
|
|
+ bookingOrdersType: 1,
|
|
|
|
|
+ arrivalTime2: moment(new Date()).format("YYYY-MM-DD"),
|
|
|
|
|
+ dueOutTime2: moment(endDate).format("YYYY-MM-DD"),
|
|
|
|
|
+ arrivalTimeSpan: moment("18:00", "HH:mm"),
|
|
|
|
|
+ dueOutTimeSpan: moment("12:00", "HH:mm"),
|
|
|
|
|
+ bookingType: 1,
|
|
|
|
|
+ dayCount: 1,
|
|
|
|
|
+ warrantType: 1,
|
|
|
|
|
+ hourRoomId: "",
|
|
|
|
|
+ breakfastNum: 0,
|
|
|
|
|
+ },
|
|
|
|
|
+ roomIds: [],
|
|
|
|
|
+ layoutDayPrices: [],
|
|
|
|
|
+ },
|
|
|
labelCol: {
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
xs: { span: 24 },
|
|
|
sm: { span: 5 },
|
|
sm: { span: 5 },
|
|
@@ -374,22 +509,52 @@ export default {
|
|
|
},
|
|
},
|
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
|
validatorRules: {
|
|
validatorRules: {
|
|
|
- dateRange: [{ required: true, message: "请选择维修时间!" }],
|
|
|
|
|
- remark: [{ required: true, message: "请输入维修原因!" }],
|
|
|
|
|
|
|
+ "orderInfo.bookingType": [
|
|
|
|
|
+ { required: true, message: "请选择入住类型!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ "orderInfo.arrivalTime2": [
|
|
|
|
|
+ { required: true, message: "请选择预抵时间!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ "orderInfo.dueOutTime2": [
|
|
|
|
|
+ { required: true, message: "请选择预离时间!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ "orderInfo.customerSource": [
|
|
|
|
|
+ { required: true, message: "请选择客人来源!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ "orderInfo.bookingDicWay": [
|
|
|
|
|
+ { required: true, message: "请选择预定方式!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ "orderInfo.customerType": [
|
|
|
|
|
+ { required: true, message: "请选择客人类型!" },
|
|
|
|
|
+ ],
|
|
|
|
|
+ contactName: [{ required: true, message: "请输入联系人!" }],
|
|
|
|
|
+ phone: [{ required: true, message: "请输入电话!" }],
|
|
|
},
|
|
},
|
|
|
url: {
|
|
url: {
|
|
|
- add: "/business/busMeetingRoom/add",
|
|
|
|
|
|
|
+ add: "/business/busRoomBookingOrders/add",
|
|
|
edit: "/business/busMeetingRoom/edit",
|
|
edit: "/business/busMeetingRoom/edit",
|
|
|
queryById: "/business/busMeetingRoom/queryById",
|
|
queryById: "/business/busMeetingRoom/queryById",
|
|
|
},
|
|
},
|
|
|
result: [],
|
|
result: [],
|
|
|
selectIndex: 0,
|
|
selectIndex: 0,
|
|
|
|
|
+ customerSourceList: [],
|
|
|
|
|
+ bookingdicWayList: [],
|
|
|
|
|
+ warranterList: [],
|
|
|
|
|
+ hourRoomRuleList: [],
|
|
|
|
|
+ canUserRooms: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
formDisabled() {
|
|
formDisabled() {
|
|
|
return this.disabled;
|
|
return this.disabled;
|
|
|
},
|
|
},
|
|
|
|
|
+ amount() {
|
|
|
|
|
+ var sum = 0;
|
|
|
|
|
+ this.canUserRooms.forEach((t) => {
|
|
|
|
|
+ sum += t.layout.favPrice * t.layout.presetNum;
|
|
|
|
|
+ });
|
|
|
|
|
+ return sum.toFixed(2);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
@@ -398,21 +563,167 @@ export default {
|
|
|
}
|
|
}
|
|
|
//备份model原始值
|
|
//备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.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/busDictItem/list", {
|
|
|
|
|
+ hotelId: _info.id,
|
|
|
|
|
+ dictId: "1639544187093995521",
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.bookingdicWayList = res.result.records;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ getAction("/business/busSalesPerson/list", {
|
|
|
|
|
+ hotelId: _info.id,
|
|
|
|
|
+ pageNo: 1,
|
|
|
|
|
+ pageSize: 100,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.warranterList = res.result.records;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ getAction("/rooms/cesHourRoomRule/list", {
|
|
|
|
|
+ pageNo: 1,
|
|
|
|
|
+ pageSize: 100,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.hourRoomRuleList = res.result.records;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
|
|
|
|
|
+ (res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ res.result &&
|
|
|
|
|
+ res.result.cesAllDayPriceRule &&
|
|
|
|
|
+ res.result.cesAllDayPriceRule.leaveTime
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.model.orderInfo.dueOutTimeSpan = moment(
|
|
|
|
|
+ res.result.cesAllDayPriceRule.leaveTime,
|
|
|
|
|
+ "HH:mm"
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.loadRooms();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- tagClose2(rindex, index) {
|
|
|
|
|
- this.model.data[index].rooms.splice(rindex, 1);
|
|
|
|
|
|
|
+ presetNumChange(e, record) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ record.layout.canUseCount = record.layout.oldTags - e;
|
|
|
|
|
+ },
|
|
|
|
|
+ onCellChange(key, dataIndex, value) {
|
|
|
|
|
+ const dataSource = [...this.canUserRooms];
|
|
|
|
|
+ const target = dataSource[dataIndex];
|
|
|
|
|
+ console.log("target", target);
|
|
|
|
|
+ if (target && target.layout) {
|
|
|
|
|
+ target.layout[key] = value;
|
|
|
|
|
+ this.canUserRooms = dataSource;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("this.canUserRooms", this.canUserRooms);
|
|
|
|
|
+ },
|
|
|
|
|
+ rowKey(record) {
|
|
|
|
|
+ return record.layout.id;
|
|
|
|
|
+ },
|
|
|
|
|
+ loadRooms() {
|
|
|
|
|
+ getAction("/rooms/cesRooms/can-user-rooms", {
|
|
|
|
|
+ startOf:
|
|
|
|
|
+ this.model.orderInfo.arrivalTime2 +
|
|
|
|
|
+ " " +
|
|
|
|
|
+ moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm"),
|
|
|
|
|
+ endOf:
|
|
|
|
|
+ this.model.orderInfo.dueOutTime2 +
|
|
|
|
|
+ " " +
|
|
|
|
|
+ moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm"),
|
|
|
|
|
+ bookingType: this.model.orderInfo.bookingType,
|
|
|
|
|
+ hourRoomRuleId: this.model.orderInfo.hourRoomId,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ res.result.forEach((t) => {
|
|
|
|
|
+ t.layout = Object.assign({}, t.layout, {
|
|
|
|
|
+ presetNum: 0,
|
|
|
|
|
+ oldTags: t.layout.canUseCount,
|
|
|
|
|
+ });
|
|
|
|
|
+ t.buildingRooms.forEach((b) => {
|
|
|
|
|
+ b.floorRooms.forEach((f) => {
|
|
|
|
|
+ this.$set(f, "check", 0);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ this.canUserRooms = res.result;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ bookingTypeChange(e) {
|
|
|
|
|
+ if (this.model.orderInfo.bookingType == 1) {
|
|
|
|
|
+ this.model.orderInfo.hourRoomId = "";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var hourRoomRule = this.hourRoomRuleList[0];
|
|
|
|
|
+ if (hourRoomRule) {
|
|
|
|
|
+ this.model.orderInfo.hourRoomId = hourRoomRule.id;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loadRooms();
|
|
|
|
|
+ },
|
|
|
|
|
+ dayCountChange(e) {
|
|
|
|
|
+ this.model.orderInfo.dueOutTime2 = moment(
|
|
|
|
|
+ this.model.orderInfo.arrivalTime2
|
|
|
|
|
+ )
|
|
|
|
|
+ .add(e, "days")
|
|
|
|
|
+ .format("YYYY-MM-DD");
|
|
|
|
|
+ this.loadRooms();
|
|
|
|
|
+ },
|
|
|
|
|
+ disabledDate(current) {
|
|
|
|
|
+ return current && current < moment().add(-1, "days").endOf("day");
|
|
|
|
|
+ },
|
|
|
|
|
+ arrivalTimeChange(e) {
|
|
|
|
|
+ this.model.orderInfo.dayCount = Math.abs(
|
|
|
|
|
+ parseInt(
|
|
|
|
|
+ (new Date(this.model.orderInfo.arrivalTime2).getTime() -
|
|
|
|
|
+ new Date(this.model.orderInfo.dueOutTime2).getTime()) /
|
|
|
|
|
+ (1000 * 60 * 60 * 24)
|
|
|
|
|
+ )
|
|
|
|
|
+ );
|
|
|
|
|
+ this.loadRooms();
|
|
|
|
|
+ },
|
|
|
|
|
+ arrivalTimeSpanChange(m, time) {
|
|
|
|
|
+ console.log(time);
|
|
|
|
|
+ console.log(moment(m).format("HH:mm"));
|
|
|
|
|
+ },
|
|
|
|
|
+ tagClose2(rindex, bindex, index) {
|
|
|
|
|
+ // console.log(rindex, index);
|
|
|
|
|
+ // console.log(this.canUserRooms[index]);
|
|
|
|
|
+ this.canUserRooms[index].rooms.splice(rindex, 1);
|
|
|
|
|
+
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.canUserRooms[index].buildingRooms[bindex].floorRooms[rindex],
|
|
|
|
|
+ "check",
|
|
|
|
|
+ 0
|
|
|
|
|
+ );
|
|
|
|
|
+ console.log(this.canUserRooms);
|
|
|
},
|
|
},
|
|
|
modalFormOk(e) {
|
|
modalFormOk(e) {
|
|
|
// this.modelDefault = Object.assign({}, this.modelDefault, {
|
|
// this.modelDefault = Object.assign({}, this.modelDefault, {
|
|
|
// rooms: e,
|
|
// rooms: e,
|
|
|
// });
|
|
// });
|
|
|
// this.edit(this.modelDefault);
|
|
// this.edit(this.modelDefault);
|
|
|
- this.$set(this.model.data[this.selectIndex], "rooms", e);
|
|
|
|
|
|
|
+ this.$set(this.canUserRooms[this.selectIndex], "rooms", e);
|
|
|
|
|
+ console.log(this.canUserRooms[this.selectIndex]);
|
|
|
},
|
|
},
|
|
|
pulsRoom(index) {
|
|
pulsRoom(index) {
|
|
|
this.selectIndex = index;
|
|
this.selectIndex = index;
|
|
|
- this.$refs.modalSelectRoomForm.add();
|
|
|
|
|
|
|
+ this.$refs.modalSelectRoomForm.add(this.canUserRooms[this.selectIndex]);
|
|
|
this.$refs.modalSelectRoomForm.title = "排房";
|
|
this.$refs.modalSelectRoomForm.title = "排房";
|
|
|
this.$refs.modalSelectRoomForm.disableSubmit = false;
|
|
this.$refs.modalSelectRoomForm.disableSubmit = false;
|
|
|
},
|
|
},
|
|
@@ -449,11 +760,51 @@ export default {
|
|
|
},
|
|
},
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
const that = this;
|
|
const that = this;
|
|
|
- that.$message.warning("未实现");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ that.model.roomIds = [];
|
|
|
|
|
+ that.canUserRooms.forEach((t) => {
|
|
|
|
|
+ var lastlayoutId = t.layout.id;
|
|
|
|
|
+ t.buildingRooms.forEach((b) => {
|
|
|
|
|
+ b.floorRooms.forEach((f) => {
|
|
|
|
|
+ if (f.check && f.check === 1) {
|
|
|
|
|
+ that.model.roomIds.push({ layoutId: t.layout.id, roomId: f.id });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ const roomIds = that.model.roomIds.filter(
|
|
|
|
|
+ (it) => it.layoutId === lastlayoutId
|
|
|
|
|
+ );
|
|
|
|
|
+ var len = roomIds.length;
|
|
|
|
|
+ for (var i = len; i < t.layout.presetNum; i++) {
|
|
|
|
|
+ that.model.roomIds.push({ layoutId: t.layout.id, roomId: null });
|
|
|
|
|
+ }
|
|
|
|
|
+ for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
|
|
|
|
|
+ var dayTime = moment(this.model.orderInfo.arrivalTime2)
|
|
|
|
|
+ .add(b, "days")
|
|
|
|
|
+ .format("YYYY-MM-DD");
|
|
|
|
|
+ that.model.layoutDayPrices.push({
|
|
|
|
|
+ bookingType: 1,
|
|
|
|
|
+ dayTime: dayTime,
|
|
|
|
|
+ price: t.layout.favPrice,
|
|
|
|
|
+ roomLayoutId: t.layout.id,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log("this.model", this.model);
|
|
|
|
|
+ if (that.model.roomIds.length <= 0) {
|
|
|
|
|
+ that.$message.warning("请先添加房间");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 触发表单验证
|
|
// 触发表单验证
|
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+ this.model.orderInfo.arrivalTime =
|
|
|
|
|
+ this.model.orderInfo.arrivalTime2 +
|
|
|
|
|
+ " " +
|
|
|
|
|
+ moment(this.model.orderInfo.arrivalTimeSpan).format("HH:mm");
|
|
|
|
|
+ this.model.orderInfo.dueOutTime =
|
|
|
|
|
+ this.model.orderInfo.dueOutTime2 +
|
|
|
|
|
+ " " +
|
|
|
|
|
+ moment(this.model.orderInfo.dueOutTimeSpan).format("HH:mm");
|
|
|
that.confirmLoading = true;
|
|
that.confirmLoading = true;
|
|
|
let httpurl = "";
|
|
let httpurl = "";
|
|
|
let method = "";
|
|
let method = "";
|