|
|
@@ -364,65 +364,296 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item
|
|
|
- label="订单来源"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.customerSource"
|
|
|
+ label="房价方案"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.roomPriceSlnId"
|
|
|
>
|
|
|
<a-select
|
|
|
- placeholder="订单来源"
|
|
|
- v-model="model.orderInfo.customerSource"
|
|
|
- @change="customerSourceChange"
|
|
|
+ v-if="model.orderInfo.bookingType !== 5"
|
|
|
+ placeholder="房价方案"
|
|
|
+ v-model="model.orderInfo.roomPriceSlnId"
|
|
|
+ @change="roomPriceChange"
|
|
|
>
|
|
|
+ <a-select-option value="0">平日价</a-select-option>
|
|
|
<a-select-option
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in customerSourceList"
|
|
|
- :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="(item, index) in housePriceSchemeList"
|
|
|
+ :key="item.id"
|
|
|
>
|
|
|
- {{ item.itemText }}
|
|
|
+ {{ item.priceScheme }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12" 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"
|
|
|
- @change="hourRoomIdChange"
|
|
|
+ v-else
|
|
|
+ placeholder="房价方案"
|
|
|
+ @change="longRentChange"
|
|
|
>
|
|
|
<a-select-option
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in hourRoomRuleList"
|
|
|
- :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ v-for="(item, index) in longRentSchemeList"
|
|
|
+ :key="item.id"
|
|
|
>
|
|
|
- {{ item.hourRoomName }}
|
|
|
+ {{ item.name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="12" v-else>
|
|
|
- <a-form-model-item
|
|
|
- label="天数"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.dayCount"
|
|
|
- >
|
|
|
- <a-input-number
|
|
|
- v-model="model.orderInfo.dayCount"
|
|
|
- placeholder="天数"
|
|
|
- :min="1"
|
|
|
- @change="dayCountChange"
|
|
|
- ></a-input-number
|
|
|
- >天
|
|
|
- </a-form-model-item>
|
|
|
+ <a-col :span="12">
|
|
|
+ <div>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-model-item
|
|
|
+ label="订单来源"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.customerSource"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ placeholder="订单来源"
|
|
|
+ v-model="model.orderInfo.customerSource"
|
|
|
+ @change="customerSourceChange"
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ :value="item.id"
|
|
|
+ v-for="(item, index) in customerSourceList"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ {{ item.itemText }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <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"
|
|
|
+ @change="hourRoomIdChange"
|
|
|
+ >
|
|
|
+ <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
|
|
|
+ label="天数"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.dayCount"
|
|
|
+ >
|
|
|
+ <a-input-number
|
|
|
+ v-model="model.orderInfo.dayCount"
|
|
|
+ placeholder="天数"
|
|
|
+ :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.arrivalTime2"
|
|
|
+ >
|
|
|
+ <j-date
|
|
|
+ placeholder="入住时间"
|
|
|
+ v-model="model.orderInfo.arrivalTime2"
|
|
|
+ style="width: 120px"
|
|
|
+ :allowClear="false"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ @change="arrivalTimeChange"
|
|
|
+ />
|
|
|
+ <a-time-picker
|
|
|
+ style="width: 80px; margin-left: 2px"
|
|
|
+ v-model="model.orderInfo.arrivalTimeSpan"
|
|
|
+ :default-value="moment('12:00', 'HH:mm')"
|
|
|
+ format="HH:mm"
|
|
|
+ :allowClear="false"
|
|
|
+ @change="arrivalTimeSpanChange"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-model-item
|
|
|
+ label="预离时间"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.dueOutTime2"
|
|
|
+ >
|
|
|
+ <j-date
|
|
|
+ placeholder="预离时间"
|
|
|
+ v-model="model.orderInfo.dueOutTime2"
|
|
|
+ style="width: 120px"
|
|
|
+ :allowClear="false"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ :disabled="model.orderInfo.bookingType === 2"
|
|
|
+ @change="arrivalTimeChange2"
|
|
|
+ />
|
|
|
+ <a-time-picker
|
|
|
+ style="width: 80px; margin-left: 2px"
|
|
|
+ v-model="model.orderInfo.dueOutTimeSpan"
|
|
|
+ format="HH:mm"
|
|
|
+ :allowClear="false"
|
|
|
+ :disabled="true"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-model-item
|
|
|
+ label="销售员工"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.warranter"
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ placeholder="销售员工"
|
|
|
+ v-model="model.orderInfo.warranter"
|
|
|
+ >
|
|
|
+ <a-select-option
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in warranterList"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-model-item
|
|
|
+ label="订单备注"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.remark"
|
|
|
+ >
|
|
|
+ <a-textarea
|
|
|
+ v-model="model.orderInfo.remark"
|
|
|
+ rows="4"
|
|
|
+ placeholder="订单备注"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ </div>
|
|
|
</a-col>
|
|
|
+ <!-- 长租房房价方案start -->
|
|
|
<a-col :span="12">
|
|
|
+ <div v-if="model.orderInfo.bookingType === 5">
|
|
|
+ <a-form-model-item
|
|
|
+ label="租金标准"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="">
|
|
|
+ <a-col :span="7">
|
|
|
+ <a-input-number v-model="rentCharges.money" :min="0" placeholder="输入金额" style="width: 100%"></a-input-number>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="2"><span>元/</span></a-col>
|
|
|
+ <a-col :span="7">
|
|
|
+ <a-input-number v-model="rentCharges.cycleNum" :min="0" placeholder="输入周期" style="width: 80%"></a-input-number>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="2"><span>月</span></a-col>
|
|
|
+
|
|
|
+ <!-- <a-col :span="6">-->
|
|
|
+ <!-- <a-select v-model="rentCharges.cycleUnit">-->
|
|
|
+ <!-- <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>-->
|
|
|
+ <!-- </a-col>-->
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item
|
|
|
+ label="押金金额"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="">
|
|
|
+ <a-col :span="10">
|
|
|
+ <a-input-number v-model="depositCharges.money" :min="0" placeholder="输入金额" style="width: 70%"></a-input-number>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="2" v-if="depositCharges.isDepositCustom"><span>元</span></a-col>
|
|
|
+ </a-form-model-item>
|
|
|
+
|
|
|
+ <a-form-model-item
|
|
|
+ label="押付方式"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.roomPriceSlnId">
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-select v-model="depositCharges.num" @change="depositNumChange">
|
|
|
+ <a-select-option :value="1"> 押1 </a-select-option>
|
|
|
+ <a-select-option :value="2"> 押2 </a-select-option>
|
|
|
+ <a-select-option :value="3"> 押3 </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-select v-model="rentCharges.num" @change="rentNumChange">
|
|
|
+ <a-select-option :value="1"> 付1 </a-select-option>
|
|
|
+ <a-select-option :value="2"> 付2 </a-select-option>
|
|
|
+ <a-select-option :value="3"> 付3 </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-col>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item
|
|
|
+ label="新增费项"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol">
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-select v-model="chargeType">
|
|
|
+ <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-option :value="5"> 抄费类燃气费 </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="3">
|
|
|
+ <a-button @click="addCharges">添加</a-button>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-row v-for="(item, index) in chooseLongRentScheme.houseLongRentChargeList" v-if="!item.isMust">
|
|
|
+ <a-icon
|
|
|
+ type="minus-circle"
|
|
|
+ style="color: #f56c6c"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="removeCharge(index)"
|
|
|
+ />
|
|
|
+ <a-col :span="5">
|
|
|
+ <a-input v-model="item.name" placeholder="输入费项名称" style="width: 90%"></a-input>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="5">
|
|
|
+ <a-input-number v-model="item.money":min="0" placeholder="输入金额" style="width: 90%" @change="$forceUpdate()"></a-input-number>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="4"><span>{{ item.chargeType == 3 ? '元/吨' : (item.chargeType == 4 ? '元/度' : '元') }}</span></a-col>
|
|
|
+ <a-col :span="5" v-if="item.chargeType == 2">
|
|
|
+ <a-input-number v-model="item.cycleNum" :min="0" placeholder="输入周期" style="width: 90%"></a-input-number>
|
|
|
+ </a-col>
|
|
|
+ <!-- <a-col :span="5" v-if="item.chargeType == 2">-->
|
|
|
+ <!-- <a-select v-model="item.cycleUnit">-->
|
|
|
+ <!-- <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>-->
|
|
|
+ <!-- </a-col>-->
|
|
|
+ </a-row>
|
|
|
+
|
|
|
+ </a-col>
|
|
|
+ </a-form-model-item>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <!-- 长租房房价方案end -->
|
|
|
+ <a-col :span="12" v-if="model.orderInfo.bookingType != 5">
|
|
|
<a-form-model-item
|
|
|
label="外部单号"
|
|
|
:labelCol="labelCol"
|
|
|
@@ -435,57 +666,7 @@
|
|
|
></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-model-item
|
|
|
- label="入住时间"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.arrivalTime2"
|
|
|
- >
|
|
|
- <j-date
|
|
|
- placeholder="入住时间"
|
|
|
- v-model="model.orderInfo.arrivalTime2"
|
|
|
- style="width: 120px"
|
|
|
- :allowClear="false"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- @change="arrivalTimeChange"
|
|
|
- />
|
|
|
- <a-time-picker
|
|
|
- style="width: 80px; margin-left: 2px"
|
|
|
- v-model="model.orderInfo.arrivalTimeSpan"
|
|
|
- :default-value="moment('12:00', 'HH:mm')"
|
|
|
- format="HH:mm"
|
|
|
- :allowClear="false"
|
|
|
- @change="arrivalTimeSpanChange"
|
|
|
- />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-model-item
|
|
|
- label="预离时间"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.dueOutTime2"
|
|
|
- >
|
|
|
- <j-date
|
|
|
- placeholder="预离时间"
|
|
|
- v-model="model.orderInfo.dueOutTime2"
|
|
|
- style="width: 120px"
|
|
|
- :allowClear="false"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- :disabled="model.orderInfo.bookingType === 2"
|
|
|
- @change="arrivalTimeChange2"
|
|
|
- />
|
|
|
- <a-time-picker
|
|
|
- style="width: 80px; margin-left: 2px"
|
|
|
- v-model="model.orderInfo.dueOutTimeSpan"
|
|
|
- format="HH:mm"
|
|
|
- :allowClear="false"
|
|
|
- :disabled="true"
|
|
|
- />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
+ <a-col :span="12" v-if="model.orderInfo.bookingType != 5">
|
|
|
<a-form-model-item
|
|
|
label="宾客类型"
|
|
|
:labelCol="labelCol"
|
|
|
@@ -625,51 +806,8 @@
|
|
|
</p>
|
|
|
</a-card>
|
|
|
</a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-model-item
|
|
|
- label="房价方案"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.roomPriceSlnId"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- placeholder="房价方案"
|
|
|
- v-model="model.orderInfo.roomPriceSlnId"
|
|
|
- @change="roomPriceChange"
|
|
|
- >
|
|
|
- <a-select-option value="0">平日价</a-select-option>
|
|
|
- <a-select-option
|
|
|
- :value="item.id"
|
|
|
- v-for="(item, index) in housePriceSchemeList"
|
|
|
- :key="item.id"
|
|
|
- >
|
|
|
- {{ item.priceScheme }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-model-item
|
|
|
- label="销售员工"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.warranter"
|
|
|
- >
|
|
|
- <a-select
|
|
|
- placeholder="销售员工"
|
|
|
- v-model="model.orderInfo.warranter"
|
|
|
- >
|
|
|
- <a-select-option
|
|
|
- :value="item.id"
|
|
|
- v-for="item in warranterList"
|
|
|
- :key="item.id"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
+
|
|
|
+ <a-col :span="12" v-if="model.orderInfo.bookingType != 5">
|
|
|
<a-form-model-item
|
|
|
label="早餐数量"
|
|
|
:labelCol="labelCol"
|
|
|
@@ -684,23 +822,6 @@
|
|
|
>份
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-model-item
|
|
|
- label="订单备注"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
|
|
|
- :wrapperCol="{
|
|
|
- xs: { span: 24 },
|
|
|
- sm: { span: 15 },
|
|
|
- }"
|
|
|
- prop="orderInfo.remark"
|
|
|
- >
|
|
|
- <a-textarea
|
|
|
- v-model="model.orderInfo.remark"
|
|
|
- rows="4"
|
|
|
- placeholder="订单备注"
|
|
|
- />
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
</div>
|
|
|
<div style="width: 43%;">
|
|
|
<div
|
|
|
@@ -724,7 +845,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-divider />
|
|
|
+ <!-- 账单-->
|
|
|
<a-table
|
|
|
+ v-if="model.orderInfo.bookingType !== 5"
|
|
|
:columns="columns"
|
|
|
:data-source="model.roomPrices"
|
|
|
:pagination="false"
|
|
|
@@ -750,6 +873,17 @@
|
|
|
<a-input-number v-model="record.deposit" @change="onCellChangeCopy('deposit', index, $event)" :min="bookingPaidMoney == null ? 0 : bookingPaidMoney"></a-input-number>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
+ <!-- 长租房账单-->
|
|
|
+ <a-table
|
|
|
+ v-else
|
|
|
+ :columns="longRentColumns"
|
|
|
+ :data-source="chooseLongRentScheme.houseLongRentChargeList"
|
|
|
+ :pagination="false"
|
|
|
+ rowKey="id"
|
|
|
+ :scroll="{ y: 200, x: 500 }"
|
|
|
+ style=" height: auto"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
<div
|
|
|
style="
|
|
|
color: rgba(255, 87, 51, 1);
|
|
|
@@ -759,23 +893,7 @@
|
|
|
>
|
|
|
合计应收:{{ amount.toFixed(2) }}
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-top: 30px;
|
|
|
- "
|
|
|
- >
|
|
|
- <!-- <h4
|
|
|
- style="
|
|
|
- color: rgba(255, 141, 26, 1);
|
|
|
- font-weight: 600;
|
|
|
- margin-top: 15px;
|
|
|
- "
|
|
|
- >
|
|
|
- 收款
|
|
|
- </h4> -->
|
|
|
+ <div style=" display: flex; justify-content: space-between; align-items: center; margin-top: 30px; " >
|
|
|
<a-tabs
|
|
|
default-active-key="1"
|
|
|
@change="paymentTabsChange"
|
|
|
@@ -783,6 +901,7 @@
|
|
|
>
|
|
|
<a-tab-pane key="1" tab="收款">
|
|
|
<a-table
|
|
|
+ v-if="model.orderInfo.bookingType !== 5"
|
|
|
:columns="columns2"
|
|
|
:data-source="model.orderFees"
|
|
|
:pagination="false"
|
|
|
@@ -848,6 +967,38 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
+ <a-table
|
|
|
+ v-else
|
|
|
+ :columns="longRentColumns2"
|
|
|
+ :data-source="collectionChargeList"
|
|
|
+ :pagination="false"
|
|
|
+ rowKey="id"
|
|
|
+ :scroll="{ y: 160 }"
|
|
|
+ style=" height: auto">
|
|
|
+ <template slot="payType" slot-scope="text, record, index" >
|
|
|
+ <div>
|
|
|
+ <a-select
|
|
|
+ v-model="collectionChargeList[index].payType"
|
|
|
+ placeholder="收款方式">
|
|
|
+ <a-select-option
|
|
|
+ :value="item.id"
|
|
|
+ v-for="item in payTypeList"
|
|
|
+ :key="item.id">
|
|
|
+ {{ item.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="relMoney" slot-scope="text, record, index">
|
|
|
+ <div>
|
|
|
+ <a-input-number
|
|
|
+ v-model="record.relMoney"
|
|
|
+ :min="0"
|
|
|
+ @change="presetNumChange($event, record)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
<div style="color: rgba(255, 141, 26, 1); font-weight: 200">
|
|
|
<p style="margin-bottom: 2px">
|
|
|
预定已收:{{ bookingPaidMoney }}
|
|
|
@@ -1063,6 +1214,76 @@ const columns = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
+const longRentColumns = [
|
|
|
+ // {
|
|
|
+ // title: "",
|
|
|
+ // dataIndex: "key",
|
|
|
+ // width: 20,
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ title: '费项',
|
|
|
+ dataIndex: 'name',
|
|
|
+ width: 70
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '费用类型',
|
|
|
+ dataIndex: 'chargeType',
|
|
|
+ width: 80,
|
|
|
+ customRender(text, record) {
|
|
|
+ if (text === 1) {
|
|
|
+ return '一次性'
|
|
|
+ } else if (text === 2) {
|
|
|
+ return '周期性'
|
|
|
+ } else if (text === 3) {
|
|
|
+ return '水费'
|
|
|
+ } else if (text === 4) {
|
|
|
+ return '电费'
|
|
|
+ } else if (text === 5) {
|
|
|
+ return '燃气费'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '费用标准',
|
|
|
+ dataIndex: 'marketPrice',
|
|
|
+ width: 60,
|
|
|
+ customRender(text, record) {
|
|
|
+ let standard = ''
|
|
|
+ standard = record.money + '元'
|
|
|
+ if (record.cycleUnit === 1) {
|
|
|
+ standard += '/月'
|
|
|
+ } else if (record.cycleUnit === 1) {
|
|
|
+ standard += '/季'
|
|
|
+ } else if (record.cycleUnit === 1) {
|
|
|
+ standard += '/年'
|
|
|
+ }
|
|
|
+ return standard
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // {
|
|
|
+ // title: '优惠价',
|
|
|
+ // dataIndex: 'prefPrice',
|
|
|
+ // width: 80,
|
|
|
+ // scopedSlots: { customRender: 'prefPrice' }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '天数',
|
|
|
+ // dataIndex: 'day',
|
|
|
+ // width: 50
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '房费',
|
|
|
+ // dataIndex: 'roomFee',
|
|
|
+ // width: 60
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '押金',
|
|
|
+ // dataIndex: 'deposit',
|
|
|
+ // scopedSlots: { customRender: 'deposit' },
|
|
|
+ // width: 100
|
|
|
+ // }
|
|
|
+]
|
|
|
+
|
|
|
const columns2 = [
|
|
|
{
|
|
|
title: '费项',
|
|
|
@@ -1089,6 +1310,31 @@ const columns2 = [
|
|
|
scopedSlots: { customRender: 'money' }
|
|
|
}
|
|
|
]
|
|
|
+const longRentColumns2 = [
|
|
|
+ {
|
|
|
+ title: '费项',
|
|
|
+ dataIndex: 'name',
|
|
|
+ width: '25%',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '收款方式',
|
|
|
+ dataIndex: 'payType',
|
|
|
+ width: '25%',
|
|
|
+ scopedSlots: { customRender: 'payType' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '应缴',
|
|
|
+ dataIndex: 'payable',
|
|
|
+ width: '25%',
|
|
|
+ // scopedSlots: { customRender: 'prefPrice' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '实收',
|
|
|
+ dataIndex: 'relMoney',
|
|
|
+ width: '25%',
|
|
|
+ scopedSlots: { customRender: 'relMoney' }
|
|
|
+ }
|
|
|
+]
|
|
|
const date = new Date()
|
|
|
const endDate = new Date(date.setDate(date.getDate() + 1))
|
|
|
export default {
|
|
|
@@ -1133,8 +1379,10 @@ export default {
|
|
|
selectedRowKeys: [],
|
|
|
// data,
|
|
|
columns,
|
|
|
+ longRentColumns,
|
|
|
// data2,
|
|
|
columns2,
|
|
|
+ longRentColumns2,
|
|
|
wakeList: [{}],
|
|
|
// model: { rooms: panes, data: data, data2: data2 },
|
|
|
modelDefault: {},
|
|
|
@@ -1205,7 +1453,34 @@ export default {
|
|
|
selectIndex: 0,
|
|
|
customerSourceList: [],
|
|
|
housePriceSchemeList: [],
|
|
|
- cesAllDayPriceRule: {}, //全天房计费规则
|
|
|
+ /** 长租房start */
|
|
|
+ // 长租房方案
|
|
|
+ longRentSchemeList: [],
|
|
|
+ // 选中的方案
|
|
|
+ chooseLongRentScheme: {},
|
|
|
+ // 新增费项
|
|
|
+ // 新增时选择的费项类型
|
|
|
+ chargeType: 1,
|
|
|
+ // 收款费项
|
|
|
+ collectionChargeList: [],
|
|
|
+ // 租金费项
|
|
|
+ rentCharges: {
|
|
|
+ num: 0,
|
|
|
+ money: 0,
|
|
|
+ cycleUnit: 1,
|
|
|
+ cycleNum: 0,
|
|
|
+ chargeType: 0
|
|
|
+ },
|
|
|
+ // 押金费项
|
|
|
+ depositCharges: {
|
|
|
+ num: 0,
|
|
|
+ money: 0,
|
|
|
+ cycleUnit: 0,
|
|
|
+ chargeType: 0
|
|
|
+ },
|
|
|
+ longRentFee: [],
|
|
|
+ /** 长租房end */
|
|
|
+ cesAllDayPriceRule: {}, // 全天房计费规则
|
|
|
bookingdicWayList: [],
|
|
|
warranterList: [],
|
|
|
hourRoomRuleList: [],
|
|
|
@@ -1341,7 +1616,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
'model.orderInfo.bookingType'(val, old) {
|
|
|
-
|
|
|
if (val) {
|
|
|
this.model.orderInfo.dayCount = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
|
|
|
}
|
|
|
@@ -1434,7 +1708,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
paymentSplit(value) {
|
|
|
-
|
|
|
if (this.loadRemenmberPayState) {
|
|
|
console.log(1111111, this.loadRemenmberPayState)
|
|
|
if (!value) {
|
|
|
@@ -1486,6 +1759,38 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ 'chooseLongRentScheme.houseLongRentChargeList': {
|
|
|
+ handler(newValue, oldValue) {
|
|
|
+ newValue.forEach((e,index) => {
|
|
|
+ this.$watch(
|
|
|
+ () => e.money,
|
|
|
+ (newName, oldName) => {
|
|
|
+ let num = e.num == null ? 1 : e.num
|
|
|
+ let payable = e.money * num
|
|
|
+ e.payable = payable
|
|
|
+ // this.$set(e,'relMoney', payable)
|
|
|
+ e.relMoney = payable
|
|
|
+ }
|
|
|
+ );
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deep: true, // 监听数组的变化需要设置 deep 为 true
|
|
|
+ },
|
|
|
+ // collectionChargeList: {
|
|
|
+ //
|
|
|
+ // handler(newValue, oldValue) {
|
|
|
+ // newValue.forEach((e,index) => {
|
|
|
+ // this.$watch(
|
|
|
+ // () => e.money,
|
|
|
+ // (newName, oldName) => {
|
|
|
+ // e.relMoney = e.money
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // deep: true, // 监听数组的变化需要设置 deep 为 true
|
|
|
+ // },
|
|
|
+
|
|
|
// "model.roomIds": {
|
|
|
// handler(newValue, oldValue) {
|
|
|
// console.log(newValue, oldValue);
|
|
|
@@ -1493,7 +1798,6 @@ export default {
|
|
|
// deep: true,
|
|
|
// immediate: true,
|
|
|
// },
|
|
|
-
|
|
|
cPhone: {
|
|
|
handler: function (val, old) {
|
|
|
console.log(val, old)
|
|
|
@@ -1577,6 +1881,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
//
|
|
|
// getAction('/business/busHousePriceSchemeLayout/list?hotelId=' + this.model.hotelId, {}
|
|
|
// ).then((res) => {
|
|
|
@@ -1706,6 +2011,59 @@ export default {
|
|
|
})
|
|
|
this.editPriceOk()
|
|
|
},
|
|
|
+ // 房价方案改变事件
|
|
|
+ longRentChange(record) {
|
|
|
+ console.log(record, 'record')
|
|
|
+ this.chooseLongRentScheme = this.longRentSchemeList.find(e => e.id === record)
|
|
|
+ if (this.chooseLongRentScheme == null) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 押金
|
|
|
+ this.depositCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 1 && e.isMust)
|
|
|
+ // 租金
|
|
|
+ this.rentCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 2 && e.isMust)
|
|
|
+ this.collectionChargeList = this.chooseLongRentScheme.houseLongRentChargeList.filter(e => e.chargeType !== 3 && e.chargeType !== 4 && e.chargeType !== 5)
|
|
|
+ console.log(this.depositCharges)
|
|
|
+ console.log(this.rentCharges, 'rentCharges')
|
|
|
+ console.log(this.model.orderFees, 'orderFees')
|
|
|
+ },
|
|
|
+ depositNumChange(value) {
|
|
|
+ let payable = this.depositCharges.money * this.depositCharges.num
|
|
|
+ this.depositCharges.relMoney = payable
|
|
|
+ this.depositCharges.payable = payable
|
|
|
+ },
|
|
|
+ rentNumChange(value) {
|
|
|
+ let payable = this.rentCharges.money * this.rentCharges.num
|
|
|
+ this.rentCharges.relMoney = payable
|
|
|
+ this.rentCharges.payable = payable
|
|
|
+ },
|
|
|
+ addCharges() {
|
|
|
+ if (this.chargeType == null) {
|
|
|
+ this.$message.warning('请先选择要添加的费项')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let charge = {
|
|
|
+ name: null,
|
|
|
+ chargeType: this.chargeType,
|
|
|
+ money: null,
|
|
|
+ cycleUnit: null,
|
|
|
+ payType: this.payTypeList[0].id
|
|
|
+ }
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.push(charge)
|
|
|
+ if (charge.chargeType === 1 || charge.chargeType === 2) {
|
|
|
+ this.collectionChargeList.push(charge)
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ /** 移除新增费项目 */
|
|
|
+ removeCharge(index) {
|
|
|
+ console.log(index, 'index')
|
|
|
+ let findIndex = this.collectionChargeList.findIndex(e => e === this.chooseLongRentScheme.houseLongRentChargeList[index])
|
|
|
+ if (findIndex !== -1) {
|
|
|
+ this.collectionChargeList.splice(findIndex, 1)
|
|
|
+ }
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.splice(index, 1)
|
|
|
+ },
|
|
|
// 还原价格
|
|
|
restorePrice() {
|
|
|
this.editPriceData.forEach((e) => {
|
|
|
@@ -1742,7 +2100,7 @@ export default {
|
|
|
this.model.orderInfo.contractTeamProtocolId = null
|
|
|
this.model.orderInfo.contractTeamId = null
|
|
|
console.log(value)
|
|
|
- if (value === 1){
|
|
|
+ if (value === 1) {
|
|
|
this.changeRoomPrice(100)
|
|
|
}
|
|
|
},
|
|
|
@@ -1992,7 +2350,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
var find = orderFees.find(
|
|
|
(t) => t.subjectType == 2 && t.roomId == this.model.roomIds[0].id
|
|
|
)
|
|
|
@@ -2818,6 +3175,7 @@ export default {
|
|
|
if (!this.remenmberPayState) {
|
|
|
await this.getHotelInfo()
|
|
|
}
|
|
|
+ await this.loadScheme()
|
|
|
if (this.customerSourceList) {
|
|
|
if (!this.model.orderInfo.customerSource) {
|
|
|
this.model.orderInfo.customerSource = this.customerSourceList[0].id
|
|
|
@@ -3031,25 +3389,45 @@ export default {
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
+ // 获取长租方案
|
|
|
+ loadScheme(){
|
|
|
+ getAction('rooms/cesHouseLongRentScheme/page', {}
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.success && res.result.records.length > 0) {
|
|
|
+ this.longRentSchemeList = res.result.records
|
|
|
+ this.longRentSchemeList.forEach(e => {
|
|
|
+ e.houseLongRentChargeList.forEach(ele => {
|
|
|
+ let num = ele.num == null ? 1 : ele.num
|
|
|
+ let payable = ele.money * num
|
|
|
+ this.$set(ele,'payable', payable)
|
|
|
+ this.$set(ele,'relMoney', payable)
|
|
|
+ this.$set(ele,'payType', this.payTypeList[0].id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
submitForm() {
|
|
|
const that = this
|
|
|
that.model.livingRoomDayPrices = []
|
|
|
console.log('that.model.roomPrices', that.model.roomPrices)
|
|
|
- that.model.roomPrices.forEach((t) => {
|
|
|
- for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
|
|
|
- var dayTime = moment(this.model.orderInfo.arrivalTime2)
|
|
|
- .add(b, 'days')
|
|
|
- .format('YYYY-MM-DD')
|
|
|
+ console.log('that.model.roomPrices', that.model.orderFees)
|
|
|
+ if (this.model.orderInfo.bookingType !== 5) {
|
|
|
+ that.model.roomPrices.forEach((t) => {
|
|
|
+ for (var b = 0; b < that.model.orderInfo.dayCount; b++) {
|
|
|
+ var dayTime = moment(this.model.orderInfo.arrivalTime2)
|
|
|
+ .add(b, 'days')
|
|
|
+ .format('YYYY-MM-DD')
|
|
|
console.log(t.editPriceTime)
|
|
|
if (t.editPriceTime && t.editPriceTime[b]) {
|
|
|
- that.model.livingRoomDayPrices.push({
|
|
|
+ that.model.livingRoomDayPrices.push({
|
|
|
livingType: 1,
|
|
|
dayTime: t.editPriceTime ? (t.editPriceTime[b] || '').toString() : dayTime,
|
|
|
// price: t.editPrice? t.editPrice[b].toString() : t.prefPrice,
|
|
|
price:
|
|
|
- t.editPrice && t.editPriceTime && t.editPriceTime[b] == dayTime
|
|
|
- ? t.editPrice[b].toString()
|
|
|
- : t.prefPrice,
|
|
|
+ t.editPrice && t.editPriceTime && t.editPriceTime[b] == dayTime
|
|
|
+ ? t.editPrice[b].toString()
|
|
|
+ : t.prefPrice,
|
|
|
// dayTime: dayTime,
|
|
|
// price: t.prefPrice,
|
|
|
roomLayoutId: t.layoutId,
|
|
|
@@ -3068,23 +3446,41 @@ export default {
|
|
|
roomId: t.roomId
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let chargeList = []
|
|
|
+ this.collectionChargeList.forEach(e => {
|
|
|
+ let subjectType = null
|
|
|
+ if (e.isMust) {
|
|
|
+ subjectType = e.chargeType
|
|
|
+ } else if (e.chargeType === 3 || e.chargeType === 4 || e.chargeType === 5) {
|
|
|
+ subjectType = 12
|
|
|
+ } else {
|
|
|
+ subjectType = 14
|
|
|
+ }
|
|
|
+ let charge = {
|
|
|
+ money: e.relMoney,
|
|
|
+ payType: e.payType,
|
|
|
+ remark: e.name,
|
|
|
+ subjectType: subjectType,
|
|
|
+ roomId: this.model.roomIds[0].id
|
|
|
+ }
|
|
|
+ chargeList.push(charge)
|
|
|
+ })
|
|
|
+ that.model.orderFees = chargeList
|
|
|
+ }
|
|
|
+
|
|
|
// let arr = JSON.parse(JSON.stringify(that.model.roomIds))
|
|
|
that.model.roomIds.forEach((t) => {
|
|
|
- console.log(t)
|
|
|
- console.log(that.model.roomPrices.findIndex((item) => item.roomId == t.id))
|
|
|
let info = {}
|
|
|
- let idx = that.model.roomPrices.findIndex((item) => item.roomId == t.id)
|
|
|
info = JSON.parse(JSON.stringify(that.model.orderInfo))
|
|
|
console.log(info, 'info')
|
|
|
- // 第一行不知道干嘛的,不过加上会导致钟点房的居住订单的预离时间多一天
|
|
|
- // info.dueOutTime = that.addDate(info.arrivalTime2, that.model.roomPrices[idx].day) + ' ' + moment(that.model.orderInfo.dueOutTimeSpan).format('HH:mm')
|
|
|
- // info.dueOutTime = that.model.roomPrices[idx].editPriceTime[that.model.roomPrices[idx].editPriceTime.length-1] + " " + moment(that.model.orderInfo.dueOutTimeSpan).format("HH:mm")
|
|
|
info.dueOutTime = moment(this.model.orderInfo.dueOutTime2).format('yyyy-MM-DD') + ' ' + moment(that.model.orderInfo.dueOutTimeSpan).format('HH:mm')
|
|
|
t.roomOrderInfo = info
|
|
|
t.roomOrderInfo.customerSource = t.customerSource
|
|
|
t.roomId = t.id
|
|
|
+ t.longRentScheme = this.chooseLongRentScheme
|
|
|
var obj = {
|
|
|
certNo: t.key4,
|
|
|
certType: 1,
|