|
|
@@ -22,7 +22,7 @@
|
|
|
<a-tab-pane
|
|
|
v-for="(room, aindex) in model.roomIds"
|
|
|
:key="room.id"
|
|
|
- :tab='(aindex === 0 ? "主" : "") + room.name'
|
|
|
+ :tab="(aindex === 0 ? "主" : "") + room.name"
|
|
|
:closable="true"
|
|
|
force-render
|
|
|
>
|
|
|
@@ -446,16 +446,16 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24" v-else-if="model.orderInfo.bookingType == 5">
|
|
|
<a-form-model-item
|
|
|
- label="月数"
|
|
|
- :labelCol="labelCol"
|
|
|
- :wrapperCol="wrapperCol"
|
|
|
- prop="orderInfo.dayCount"
|
|
|
+ label="月数"
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ prop="orderInfo.dayCount"
|
|
|
>
|
|
|
<a-input-number
|
|
|
- v-model="monthCount"
|
|
|
- placeholder="月数"
|
|
|
- :min="1"
|
|
|
- @change="monthCountChange"
|
|
|
+ v-model="monthCount"
|
|
|
+ placeholder="月数"
|
|
|
+ :min="1"
|
|
|
+ @change="monthCountChange"
|
|
|
></a-input-number
|
|
|
>月
|
|
|
</a-form-model-item>
|
|
|
@@ -484,12 +484,13 @@
|
|
|
prop="orderInfo.arrivalTime2"
|
|
|
>
|
|
|
<j-date
|
|
|
- placeholder="入住时间"
|
|
|
- v-model="model.orderInfo.arrivalTime2"
|
|
|
- style="width: 120px"
|
|
|
- :allowClear="false"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- @change="arrivalTimeChange"
|
|
|
+ placeholder="入住时间"
|
|
|
+ v-model="model.orderInfo.arrivalTime2"
|
|
|
+ style="width: 120px"
|
|
|
+ :disabled="model.orderInfo.bookingType == 5"
|
|
|
+ :allowClear="false"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ @change="arrivalTimeChange"
|
|
|
/>
|
|
|
<a-time-picker
|
|
|
style="width: 80px; margin-left: 2px"
|
|
|
@@ -509,13 +510,13 @@
|
|
|
prop="orderInfo.dueOutTime2"
|
|
|
>
|
|
|
<j-date
|
|
|
- placeholder="预离时间"
|
|
|
- v-model="model.orderInfo.dueOutTime2"
|
|
|
- style="width: 120px"
|
|
|
- :allowClear="false"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- :disabled="model.orderInfo.bookingType === 2 || model.orderInfo.bookingType == 5"
|
|
|
- @change="arrivalTimeChange2"
|
|
|
+ placeholder="预离时间"
|
|
|
+ v-model="model.orderInfo.dueOutTime2"
|
|
|
+ style="width: 120px"
|
|
|
+ :allowClear="false"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ :disabled="model.orderInfo.bookingType === 2 || model.orderInfo.bookingType == 5"
|
|
|
+ @change="arrivalTimeChange2"
|
|
|
/>
|
|
|
<a-time-picker
|
|
|
style="width: 80px; margin-left: 2px"
|
|
|
@@ -574,11 +575,11 @@
|
|
|
<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="3">元/月</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">-->
|
|
|
@@ -611,19 +612,21 @@
|
|
|
<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 :span="2"><span>付</span></a-col>
|
|
|
+ <a-col :span="7">
|
|
|
+<!-- <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-input v-model="rentCharges.num" @change="rentNumChange"></a-input>
|
|
|
</a-col>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item
|
|
|
label="新增费项"
|
|
|
:labelCol="labelCol"
|
|
|
:wrapperCol="wrapperCol">
|
|
|
- <a-col :span="8">
|
|
|
+ <a-col :span="12">
|
|
|
<a-select v-model="chargeType">
|
|
|
<a-select-option :value="1"> 一次性费项 </a-select-option>
|
|
|
<a-select-option :value="2"> 周期性费项 </a-select-option>
|
|
|
@@ -635,38 +638,49 @@
|
|
|
<a-col :span="3">
|
|
|
<a-button @click="addCharges">添加</a-button>
|
|
|
</a-col>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item
|
|
|
+ :wrapperCol="{ span: 18, offset: 4 }"
|
|
|
+ >
|
|
|
<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 :span="2">
|
|
|
+ <a-icon
|
|
|
+ type="minus-circle"
|
|
|
+ style="color: #f56c6c"
|
|
|
+ class="dynamic-delete-button"
|
|
|
+ @click="removeCharge(index)"
|
|
|
+ />
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="7">
|
|
|
+ <a-input v-model="item.name" placeholder="费项名" style="width: 100%"></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 :span="6">
|
|
|
+ <a-input-number v-model="item.money":min="0" placeholder="金额" style="width: 100%" @change="$forceUpdate()"></a-input-number>
|
|
|
</a-col>
|
|
|
<a-col :span="4">
|
|
|
- <span v-if="item.chargeType == 1 || item.chargeType == 2">{{ '元' }}</span>
|
|
|
+ <span v-if="item.chargeType == 1">{{ '元' }}</span>
|
|
|
+ <span v-if="item.chargeType == 2">{{ '元/月' }}</span>
|
|
|
<span v-else-if="item.chargeType == 3">{{ '元/吨' }}</span>
|
|
|
<span v-else-if="item.chargeType == 4">{{ '元/度' }}</span>
|
|
|
- <span v-else-if="item.chargeType == 5">{{'元/立方' }}</span>
|
|
|
+ <span v-else-if="item.chargeType == 5">{{ '元/立方' }}</span>
|
|
|
</a-col>
|
|
|
<a-col :span="5" v-if="item.chargeType == 3">
|
|
|
- <a-input-number v-model="model.roomIds[roomIdsIndex].waterMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
|
|
|
+ <a-input-number v-model="model.roomIds[roomIdsIndex].waterMeter" :min="0" placeholder="读数" style="width: 100%"></a-input-number>
|
|
|
</a-col>
|
|
|
- <a-col :span="5" v-if="item.chargeType == 4">
|
|
|
- <a-input-number v-model="model.roomIds[roomIdsIndex].energyMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
|
|
|
+ <a-col :span="5" v-else-if="item.chargeType == 4">
|
|
|
+ <a-input-number v-model="model.roomIds[roomIdsIndex].energyMeter" :min="0" placeholder="读数" style="width: 100%"></a-input-number>
|
|
|
</a-col>
|
|
|
- <a-col :span="5" v-if="item.chargeType == 5">
|
|
|
- <a-input-number v-model="model.roomIds[roomIdsIndex].gasMeter" :min="0" placeholder="输入读数" style="width: 90%"></a-input-number>
|
|
|
- </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 :span="5" v-else-if="item.chargeType == 5">
|
|
|
+ <a-input-number v-model="model.roomIds[roomIdsIndex].gasMeter" :min="0" placeholder="读数" style="width: 100%"></a-input-number>
|
|
|
</a-col>
|
|
|
+<!-- <a-col :span="5" v-else-if="item.chargeType == 2">-->
|
|
|
+<!-- /月-->
|
|
|
+<!-- </a-col>-->
|
|
|
+
|
|
|
+ <!-- <a-col :span="5" v-else-if="item.chargeType == 2">-->
|
|
|
+<!-- <a-input-number v-model="item.cycleNum" :min="0" placeholder="周期" style="width: 100%"></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>-->
|
|
|
@@ -868,8 +882,8 @@
|
|
|
>
|
|
|
财务信息
|
|
|
</h4>
|
|
|
- <div>
|
|
|
- <a-switch v-model="depositSplit" />押金、房费分别记账到每个房间
|
|
|
+ <div v-if="model.orderInfo.bookingType !== 5">
|
|
|
+ <a-switch v-model="depositSplit"/> 押金、房费分别记账到每个房间
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-divider />
|
|
|
@@ -905,12 +919,52 @@
|
|
|
<a-table
|
|
|
v-else
|
|
|
:columns="longRentColumns"
|
|
|
- :data-source="chooseLongRentScheme.houseLongRentChargeList"
|
|
|
+ :data-source="model.roomIds"
|
|
|
:pagination="false"
|
|
|
rowKey="id"
|
|
|
+ bordered
|
|
|
:scroll="{ y: 200, x: 500 }"
|
|
|
- style=" height: auto"
|
|
|
+ style=" height: auto;"
|
|
|
+ class="zhandan_class "
|
|
|
>
|
|
|
+ <template slot="fangName" slot-scope="text, record, index" >
|
|
|
+<!-- <div style="margin: 0px -16px;">-->
|
|
|
+<!-- <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">-->
|
|
|
+<!-- {{ record.name }}-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+ {{ record.name }}
|
|
|
+ </template>
|
|
|
+ <template slot="name" slot-scope="text, record, index" >
|
|
|
+ <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="item.name" class="table_list_item">
|
|
|
+ {{ item.name }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="chargeType" slot-scope="text, record, index" >
|
|
|
+ <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
+ {{ getChargeTypeText(item.chargeType) }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="marketPrice" slot-scope="text, record, index" >
|
|
|
+ <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" class="table_list_item">
|
|
|
+ {{ getMarketPriceText(item) }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="remark" slot-scope="text, record, index" >
|
|
|
+ <div style="margin: 0 -16px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
|
|
|
+ <div v-for="(item, indexs) in chooseLongRentScheme.houseLongRentChargeList" :key="indexs" :title="getMeterText(item, record)" class="table_list_item">
|
|
|
+
|
|
|
+ <span>{{ getMeterText(item, record) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
</a-table>
|
|
|
<div
|
|
|
style="
|
|
|
@@ -1114,7 +1168,7 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-tab-pane>
|
|
|
- <div slot="tabBarExtraContent">
|
|
|
+ <div slot="tabBarExtraContent" v-if="model.orderInfo.bookingType !== 5">
|
|
|
<a-switch v-model="paymentSplit" />押金、房费分开收款
|
|
|
<a-button type="link" @click="pulsFee">
|
|
|
添加费项
|
|
|
@@ -1247,73 +1301,52 @@ const columns = [
|
|
|
]
|
|
|
|
|
|
const longRentColumns = [
|
|
|
- // {
|
|
|
- // title: "",
|
|
|
- // dataIndex: "key",
|
|
|
- // width: 20,
|
|
|
- // },
|
|
|
+ {
|
|
|
+ title: '房号',
|
|
|
+ dataIndex: 'fangName',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'fangName' }
|
|
|
+ },
|
|
|
{
|
|
|
title: '费项',
|
|
|
dataIndex: 'name',
|
|
|
- width: 70
|
|
|
+ width: 70,
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'name' }
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
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 '燃气费'
|
|
|
- }
|
|
|
- }
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'chargeType' }
|
|
|
+
|
|
|
+ // customRender(text, record) {
|
|
|
+
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
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
|
|
|
- }
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'marketPrice' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ dataIndex: 'remark',
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: { customRender: 'remark' }
|
|
|
}
|
|
|
- // {
|
|
|
- // 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 = [
|
|
|
@@ -1332,7 +1365,7 @@ const columns2 = [
|
|
|
{
|
|
|
title: '应缴',
|
|
|
dataIndex: 'receivable',
|
|
|
- width: '25%',
|
|
|
+ width: '25%'
|
|
|
},
|
|
|
{
|
|
|
title: '实收',
|
|
|
@@ -1388,6 +1421,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ i: 1,
|
|
|
+ allChargeList: [],
|
|
|
utcTxt: null,
|
|
|
editDepositModal: false,
|
|
|
// 会员选中数据
|
|
|
@@ -1635,6 +1670,18 @@ export default {
|
|
|
// model.roomIds[roomIdsIndex].customerSource = model.orderInfo.customerSource
|
|
|
}
|
|
|
},
|
|
|
+ 'model.roomIds.length'(val) {
|
|
|
+ if (this.chooseLongRentScheme.id != null) {
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.forEach(ele => {
|
|
|
+ let num = ele.num == null ? 1 : ele.num
|
|
|
+ let payable = ele.money * num * this.model.roomIds.length
|
|
|
+ this.$set(ele, 'payable', payable) // 应付价
|
|
|
+ this.$set(ele, 'relMoney', payable) // 实际支付价
|
|
|
+ this.$set(ele, 'payType', this.payTypeList[0].id)
|
|
|
+ })
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ },
|
|
|
'model.orderInfo.bookingType'(val, old) {
|
|
|
if (val) {
|
|
|
this.model.orderInfo.dayCount = this.daysBetween(this.model.orderInfo.arrivalTime2, this.model.orderInfo.dueOutTime2)
|
|
|
@@ -1689,7 +1736,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
otherRoomSync(value) {
|
|
|
- debugger
|
|
|
if (!value) {
|
|
|
if (this.modelDefault.roomIds && this.modelDefault.roomIds.length > 0) {
|
|
|
if (this.modelDefault.roomIds[0].key1) {
|
|
|
@@ -1702,11 +1748,7 @@ export default {
|
|
|
this.$set(room, 'key4', this.modelDefault.roomIds[0].key4)
|
|
|
this.$set(room, 'key5', this.modelDefault.roomIds[0].key5)
|
|
|
this.$set(room, 'key6', this.modelDefault.roomIds[0].key6)
|
|
|
- this.$set(
|
|
|
- room,
|
|
|
- 'customerId',
|
|
|
- this.modelDefault.roomIds[0].customerId
|
|
|
- )
|
|
|
+ this.$set(room, 'customerId', this.modelDefault.roomIds[0].customerId)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1783,12 +1825,12 @@ export default {
|
|
|
},
|
|
|
'chooseLongRentScheme.houseLongRentChargeList': {
|
|
|
handler(newValue, oldValue) {
|
|
|
- newValue.forEach((e,index) => {
|
|
|
+ newValue.forEach((e, index) => {
|
|
|
this.$watch(
|
|
|
() => e.money,
|
|
|
(newName, oldName) => {
|
|
|
let num = e.num == null ? 1 : e.num
|
|
|
- let payable = e.money * num
|
|
|
+ let payable = e.money * num * this.model.roomIds.length
|
|
|
e.payable = payable
|
|
|
// this.$set(e,'relMoney', payable)
|
|
|
e.relMoney = payable
|
|
|
@@ -2002,9 +2044,25 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getUserPayType(item) {
|
|
|
- if (this.model.orderInfo.customerType === 2 && item.name === '单位挂账'
|
|
|
- || this.model.orderInfo.customerType === 3 && item.name === '会员卡') {
|
|
|
- return true
|
|
|
+ // if (this.model.orderInfo.customerType === 2 && item.name === '单位挂账' ||
|
|
|
+ // this.model.orderInfo.customerType === 3 && item.name === '会员卡' ||
|
|
|
+ // this.model.orderInfo.customerType === 1 && (item.name === '会员卡' || item.name === '单位挂账')) {
|
|
|
+ // return true
|
|
|
+ // }
|
|
|
+ // return false
|
|
|
+
|
|
|
+ // if (this.model.orderInfo.customerType !== 2 && item.name !== '会员卡' ||
|
|
|
+ // this.model.orderInfo.customerType !== 3 && item.name !== '单位挂账'
|
|
|
+ // ){
|
|
|
+ // return false
|
|
|
+ // }
|
|
|
+ // return true
|
|
|
+
|
|
|
+
|
|
|
+ if (item.name === '会员卡') {
|
|
|
+ return this.model.orderInfo.customerType !== 2
|
|
|
+ } else if (item.name === '单位挂账') {
|
|
|
+ return this.model.orderInfo.customerType !== 3
|
|
|
}
|
|
|
return false
|
|
|
},
|
|
|
@@ -2027,12 +2085,18 @@ export default {
|
|
|
this.editPriceOk()
|
|
|
},
|
|
|
// 房价方案改变事件
|
|
|
- longRentChange(record) {
|
|
|
- console.log(record, 'record')
|
|
|
- this.chooseLongRentScheme = this.longRentSchemeList.find(e => e.id === record)
|
|
|
+ longRentChange(longRentSchemeId) {
|
|
|
+ this.chooseLongRentScheme = this.longRentSchemeList.find(e => e.id === longRentSchemeId)
|
|
|
if (this.chooseLongRentScheme == null) {
|
|
|
return
|
|
|
}
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.forEach(ele => {
|
|
|
+ let num = ele.num == null ? 1 : ele.num
|
|
|
+ let payable = ele.money * num * this.model.roomIds.length
|
|
|
+ this.$set(ele, 'payable', payable) // 应付价
|
|
|
+ this.$set(ele, 'relMoney', payable) // 实际支付价
|
|
|
+ this.$set(ele, 'payType', this.payTypeList[0].id)
|
|
|
+ })
|
|
|
// 押金费项
|
|
|
this.depositCharges = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 1 && e.isMust)
|
|
|
// 租金费项
|
|
|
@@ -2041,29 +2105,84 @@ export default {
|
|
|
this.collectionChargeList = this.chooseLongRentScheme.houseLongRentChargeList.filter(e => e.chargeType !== 3 && e.chargeType !== 4 && e.chargeType !== 5)
|
|
|
this.monthCount = this.rentCharges.num
|
|
|
this.monthCountChange(this.rentCharges.num)
|
|
|
- let find = this.chooseLongRentScheme.houseLongRentChargeList.find(e => e.chargeType === 3)
|
|
|
- if (find != null) {
|
|
|
- // find.meterRead = thi
|
|
|
- }
|
|
|
+
|
|
|
+ this.rentNumChange()
|
|
|
+
|
|
|
},
|
|
|
+ // 押数量改变
|
|
|
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
|
|
|
+ // 付数量改变
|
|
|
+ rentNumChange() {
|
|
|
+ // let payable = this.rentCharges.money * this.rentCharges.num
|
|
|
+ // this.rentCharges.relMoney = payable
|
|
|
+ // this.rentCharges.payable = payable
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.forEach(e => {
|
|
|
+ if (e.chargeType === 2) {
|
|
|
+ console.log(e.name)
|
|
|
+ e.num = this.rentCharges.num
|
|
|
+ let payable = e.money * this.rentCharges.num
|
|
|
+ e.relMoney = payable
|
|
|
+ e.payable = payable
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getChargeTypeText(text) {
|
|
|
+ if (text === 1) {
|
|
|
+ return '一次性费用'
|
|
|
+ } else if (text === 2) {
|
|
|
+ return '周期性费用'
|
|
|
+ } else if (text === 3) {
|
|
|
+ return '抄表类水费'
|
|
|
+ } else if (text === 4) {
|
|
|
+ return '抄表类电费'
|
|
|
+ } else if (text === 5) {
|
|
|
+ return '抄表类燃气费'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getMarketPriceText(record){
|
|
|
+ let standard = ''
|
|
|
+ standard = record.money + '元'
|
|
|
+ if (record.chargeType === 2){
|
|
|
+ standard += '/月'
|
|
|
+ }
|
|
|
+ // if (record.cycleUnit === 1) {
|
|
|
+ // standard += '/月'
|
|
|
+ // } else if (record.cycleUnit === 1) {
|
|
|
+ // standard += '/季'
|
|
|
+ // } else if (record.cycleUnit === 1) {
|
|
|
+ // standard += '/年'
|
|
|
+ // }
|
|
|
+ return standard
|
|
|
+ },
|
|
|
+ getMeterText(charge, room){
|
|
|
+ if (charge.chargeType === 1 && charge.isMust){
|
|
|
+ return '押' + charge.num
|
|
|
+ }
|
|
|
+ if (charge.chargeType === 2 && charge.isMust){
|
|
|
+ return '付' + charge.num
|
|
|
+ }
|
|
|
+ if (charge.chargeType === 3) {
|
|
|
+ return '起始读数: ' + room.waterMeter
|
|
|
+ }
|
|
|
+ if (charge.chargeType === 4) {
|
|
|
+ return '起始读数: ' + room.energyMeter
|
|
|
+ }
|
|
|
+ if (charge.chargeType === 5) {
|
|
|
+ return '起始读数: ' + room.gasMeter
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
addCharges() {
|
|
|
- console.log(this.model, 'model,,,,')
|
|
|
if (this.chargeType == null) {
|
|
|
this.$message.warning('请先选择要添加的费项')
|
|
|
return
|
|
|
}
|
|
|
- if ((this.chargeType === 3 || this.chargeType === 4 || this.chargeType === 5)
|
|
|
- && this.chooseLongRentScheme.houseLongRentChargeList.some(e => e.chargeType === this.chargeType)) {
|
|
|
+ if ((this.chargeType === 3 || this.chargeType === 4 || this.chargeType === 5) &&
|
|
|
+ this.chooseLongRentScheme.houseLongRentChargeList.some(e => e.chargeType === this.chargeType)) {
|
|
|
this.$message.warning('该抄表类费项已存在')
|
|
|
return
|
|
|
}
|
|
|
@@ -2074,7 +2193,8 @@ export default {
|
|
|
relMoney: 0,
|
|
|
payable: 0,
|
|
|
cycleUnit: null,
|
|
|
- payType: this.payTypeList[0].id
|
|
|
+ payType: this.payTypeList[0].id,
|
|
|
+ num: this.chargeType == 2 ? this.rentCharges.num : 1
|
|
|
}
|
|
|
this.chooseLongRentScheme.houseLongRentChargeList.push(charge)
|
|
|
if (charge.chargeType === 1 || charge.chargeType === 2) {
|
|
|
@@ -2123,8 +2243,8 @@ export default {
|
|
|
this.discount = 100
|
|
|
console.log(value)
|
|
|
this.housePriceSchemeList = this.specialSchemeList.filter(e => e.guestType == null || e.guestType === value)
|
|
|
- console.log(this.housePriceSchemeList,'this.housePriceSchemeList')
|
|
|
- console.log(this.model.orderInfo.roomPriceSlnId,'this.housePriceSchemeList')
|
|
|
+ console.log(this.housePriceSchemeList, 'this.housePriceSchemeList')
|
|
|
+ console.log(this.model.orderInfo.roomPriceSlnId, 'this.housePriceSchemeList')
|
|
|
if (this.housePriceSchemeList.find(e => e.id === this.model.orderInfo.roomPriceSlnId) == null) {
|
|
|
this.model.orderInfo.roomPriceSlnId = null
|
|
|
}
|
|
|
@@ -2236,7 +2356,7 @@ export default {
|
|
|
this.model.orderInfo.contractTeamProtocolName = info.name
|
|
|
this.model.orderInfo.contractTeamProtocolId = info.id
|
|
|
this.busMarketAgreementCustomer = info
|
|
|
- if (info.fixedDiscount === 1 && info.discount > 0 && this.model.orderInfo.roomPriceSlnId == null) {
|
|
|
+ if (info.fixedDiscount === 1 && info.discount > 0 && this.model.orderInfo.roomPriceSlnId == null) {
|
|
|
this.discount = info.discount
|
|
|
}
|
|
|
},
|
|
|
@@ -2458,7 +2578,7 @@ export default {
|
|
|
this.editPriceModal = true
|
|
|
},
|
|
|
closeEditPrice() {
|
|
|
- this.editPriceModal = false;
|
|
|
+ this.editPriceModal = false
|
|
|
this.model.roomPrices = this.roomPriceCopy
|
|
|
},
|
|
|
|
|
|
@@ -2688,6 +2808,7 @@ export default {
|
|
|
|
|
|
console.log(this.model.roomPrices)
|
|
|
},
|
|
|
+ // 居住月份数量改变
|
|
|
monthCountChange(e) {
|
|
|
if (e < this.rentCharges.num) {
|
|
|
this.monthCount = this.rentCharges.num
|
|
|
@@ -2700,7 +2821,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
disabledDate(current) {
|
|
|
- if (this.model.orderInfo.bookingType == 5){
|
|
|
+ if (this.model.orderInfo.bookingType == 5) {
|
|
|
return false
|
|
|
}
|
|
|
return current && current < moment().add(-1, 'days').endOf('day')
|
|
|
@@ -2732,8 +2853,7 @@ export default {
|
|
|
arrivalTimeChange2(e) {
|
|
|
var v = parseInt(
|
|
|
(new Date(this.model.orderInfo.dueOutTime2).getTime() -
|
|
|
- new Date(this.model.orderInfo.arrivalTime2).getTime()) /
|
|
|
- (1000 * 60 * 60 * 24)
|
|
|
+ new Date(this.model.orderInfo.arrivalTime2).getTime()) / (1000 * 60 * 60 * 24)
|
|
|
)
|
|
|
if (v <= 0) {
|
|
|
this.model.orderInfo.arrivalTime2 = moment(
|
|
|
@@ -2748,7 +2868,7 @@ export default {
|
|
|
(1000 * 60 * 60 * 24)
|
|
|
)
|
|
|
this.model.orderInfo.dayCount = Math.abs(v)
|
|
|
- this.loadRooms();
|
|
|
+ this.loadRooms()
|
|
|
this.dayCountChange()
|
|
|
},
|
|
|
arrivalTimeSpanChange(m, time) {
|
|
|
@@ -3385,7 +3505,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 节假日
|
|
|
- if (this.holidayScheme != null && this.holidayScheme.allHolidayArr.some(e => {return e.list[0] <= date && e.list[1] >= date })) {
|
|
|
+ if (this.holidayScheme != null && this.holidayScheme.allHolidayArr.some(e => { return e.list[0] <= date && e.list[1] >= date })) {
|
|
|
let findSchemeLayout = this.holidayScheme.schemeLayouts.find(e => e.layoutId === layoutId)
|
|
|
if (findSchemeLayout) {
|
|
|
// let find = findSchemeLayout.schemeLayoutDailyPriceList.find(e => moment(e.date) === date)
|
|
|
@@ -3425,15 +3545,6 @@ export default {
|
|
|
).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)
|
|
|
- })
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -3645,6 +3756,15 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
+<style lang="less">
|
|
|
+.zhandan_class{
|
|
|
+ .ant-table-row td{
|
|
|
+ padding-top: 0 !important;
|
|
|
+ padding-bottom: 0 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
<style scoped>
|
|
|
/deep/ .ant-btn-link {
|
|
|
flex: 1;
|
|
|
@@ -3704,4 +3824,13 @@ export default {
|
|
|
/deep/.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
|
|
|
color: rgba(255, 141, 26, 1);
|
|
|
}
|
|
|
+.table_list_item{
|
|
|
+ height: 42px;
|
|
|
+ line-height: 42px;
|
|
|
+ padding: 0 16px;
|
|
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
</style>
|