|
@@ -651,66 +651,81 @@
|
|
|
<a-tab-pane key="1" tab="收款">
|
|
<a-tab-pane key="1" tab="收款">
|
|
|
<a-table
|
|
<a-table
|
|
|
:columns="columns2"
|
|
:columns="columns2"
|
|
|
- :data-source="model.data2"
|
|
|
|
|
|
|
+ :data-source="model.orderFees"
|
|
|
:pagination="false"
|
|
:pagination="false"
|
|
|
rowKey="id"
|
|
rowKey="id"
|
|
|
:scroll="{ y: 160 }"
|
|
:scroll="{ y: 160 }"
|
|
|
>
|
|
>
|
|
|
- <template slot="key1" slot-scope="text, record, index">
|
|
|
|
|
|
|
+ <template
|
|
|
|
|
+ slot="subjectTypeLabel"
|
|
|
|
|
+ slot-scope="text, record, index"
|
|
|
|
|
+ >
|
|
|
<div>
|
|
<div>
|
|
|
<!-- <a-input
|
|
<!-- <a-input
|
|
|
style="margin: -5px 0"
|
|
style="margin: -5px 0"
|
|
|
:value="text"
|
|
:value="text"
|
|
|
@change="
|
|
@change="
|
|
|
- (e) => handleChange(e.target.value, index, 'key1')
|
|
|
|
|
|
|
+ (e) => handleChange(e.target.value, index, 'subjectTypeLabel')
|
|
|
"
|
|
"
|
|
|
/> -->
|
|
/> -->
|
|
|
<a-select
|
|
<a-select
|
|
|
- v-model="model.data2[index].key1"
|
|
|
|
|
|
|
+ v-model="model.orderFees[index].subjectType"
|
|
|
placeholder="费项"
|
|
placeholder="费项"
|
|
|
>
|
|
>
|
|
|
- <a-select-option value="房费">
|
|
|
|
|
|
|
+ <a-select-option :value="2">
|
|
|
房费
|
|
房费
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
- <a-select-option value="押金">
|
|
|
|
|
|
|
+ <a-select-option :value="1">
|
|
|
押金
|
|
押金
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <template slot="key2" slot-scope="text, record, index">
|
|
|
|
|
|
|
+ <template
|
|
|
|
|
+ slot="payType"
|
|
|
|
|
+ slot-scope="text, record, index"
|
|
|
|
|
+ >
|
|
|
<div>
|
|
<div>
|
|
|
<a-select
|
|
<a-select
|
|
|
- v-model="model.data2[index].key2"
|
|
|
|
|
|
|
+ v-model="model.orderFees[index].payType"
|
|
|
placeholder="收款方式"
|
|
placeholder="收款方式"
|
|
|
>
|
|
>
|
|
|
- <a-select-option value="现金">
|
|
|
|
|
- 现金
|
|
|
|
|
- </a-select-option>
|
|
|
|
|
- <a-select-option value="支付宝">
|
|
|
|
|
- 支付宝
|
|
|
|
|
|
|
+ <a-select-option
|
|
|
|
|
+ :value="item.id"
|
|
|
|
|
+ v-for="item in payTypeList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.name }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <template slot="key4" slot-scope="text, record, index">
|
|
|
|
|
|
|
+ <template slot="money" slot-scope="text, record, index">
|
|
|
<div>
|
|
<div>
|
|
|
- <a-input-number v-model="model.data2[index].key4" />
|
|
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ v-model="record.money"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ @change="presetNumChange($event, record)"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table>
|
|
</a-table>
|
|
|
<div
|
|
<div
|
|
|
style="color: rgba(255, 141, 26, 1); font-weight: 200"
|
|
style="color: rgba(255, 141, 26, 1); font-weight: 200"
|
|
|
>
|
|
>
|
|
|
- <p style="margin-bottom: 2px">
|
|
|
|
|
|
|
+ <!-- <p style="margin-bottom: 2px">
|
|
|
实收:支付宝600.00元;微信292.00元;现金1000.00元;会员卡400元。
|
|
实收:支付宝600.00元;微信292.00元;现金1000.00元;会员卡400元。
|
|
|
|
|
+ </p> -->
|
|
|
|
|
+ <p style="margin-bottom: 2px">
|
|
|
|
|
+ 合计实款:{{ orderFeesAmout.toFixed(2) }}
|
|
|
</p>
|
|
</p>
|
|
|
- <p style="margin-bottom: 2px">合计实款:2922.00</p>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
style="color: rgba(255, 87, 51, 1); font-weight: 200"
|
|
style="color: rgba(255, 87, 51, 1); font-weight: 200"
|
|
|
>
|
|
>
|
|
|
- <p>欠费:-500.00元</p>
|
|
|
|
|
|
|
+ <p v-if="orderFeesArrearsAmout < 0">
|
|
|
|
|
+ 欠费:{{ orderFeesArrearsAmout.toFixed(2) }}元
|
|
|
|
|
+ </p>
|
|
|
</div>
|
|
</div>
|
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="2" tab="信用卡预授权">
|
|
<a-tab-pane key="2" tab="信用卡预授权">
|
|
@@ -846,29 +861,30 @@ const columns = [
|
|
|
// width: 60,
|
|
// width: 60,
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
|
|
+
|
|
|
const columns2 = [
|
|
const columns2 = [
|
|
|
{
|
|
{
|
|
|
title: "费项",
|
|
title: "费项",
|
|
|
- dataIndex: "key1",
|
|
|
|
|
|
|
+ dataIndex: "subjectType",
|
|
|
width: "25%",
|
|
width: "25%",
|
|
|
- scopedSlots: { customRender: "key1" },
|
|
|
|
|
|
|
+ scopedSlots: { customRender: "subjectTypeLabel" },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "收款方式",
|
|
title: "收款方式",
|
|
|
- dataIndex: "key2",
|
|
|
|
|
|
|
+ dataIndex: "payType",
|
|
|
width: "25%",
|
|
width: "25%",
|
|
|
- scopedSlots: { customRender: "key2" },
|
|
|
|
|
|
|
+ scopedSlots: { customRender: "payType" },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "应缴",
|
|
title: "应缴",
|
|
|
- dataIndex: "key3",
|
|
|
|
|
|
|
+ dataIndex: "receivable",
|
|
|
width: "25%",
|
|
width: "25%",
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: "实收",
|
|
title: "实收",
|
|
|
- dataIndex: "key4",
|
|
|
|
|
|
|
+ dataIndex: "money",
|
|
|
width: "25%",
|
|
width: "25%",
|
|
|
- scopedSlots: { customRender: "key4" },
|
|
|
|
|
|
|
+ scopedSlots: { customRender: "money" },
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
const data = [];
|
|
const data = [];
|
|
@@ -947,6 +963,7 @@ export default {
|
|
|
roomIds: [],
|
|
roomIds: [],
|
|
|
livingRoomDayPrices: [],
|
|
livingRoomDayPrices: [],
|
|
|
roomPrices: [],
|
|
roomPrices: [],
|
|
|
|
|
+ orderFees: [],
|
|
|
},
|
|
},
|
|
|
labelCol: {
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
xs: { span: 24 },
|
|
@@ -998,12 +1015,23 @@ export default {
|
|
|
amount: 0,
|
|
amount: 0,
|
|
|
roomIdsIndex: 0,
|
|
roomIdsIndex: 0,
|
|
|
busMemberCardList: [],
|
|
busMemberCardList: [],
|
|
|
|
|
+ payTypeList: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
formDisabled() {
|
|
formDisabled() {
|
|
|
return this.disabled;
|
|
return this.disabled;
|
|
|
},
|
|
},
|
|
|
|
|
+ orderFeesAmout() {
|
|
|
|
|
+ var sum = 0;
|
|
|
|
|
+ this.model.orderFees.forEach((item) => {
|
|
|
|
|
+ sum += item.money;
|
|
|
|
|
+ });
|
|
|
|
|
+ return sum;
|
|
|
|
|
+ },
|
|
|
|
|
+ orderFeesArrearsAmout() {
|
|
|
|
|
+ return this.orderFeesAmout - this.amount;
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
@@ -1067,6 +1095,7 @@ export default {
|
|
|
this.busMemberCardList = res.result.records;
|
|
this.busMemberCardList = res.result.records;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
|
|
postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
|
|
|
(res) => {
|
|
(res) => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
@@ -1088,6 +1117,9 @@ export default {
|
|
|
// this.getcesRoomLayout();
|
|
// this.getcesRoomLayout();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ presetNumChange(e, record) {
|
|
|
|
|
+ console.log(e, record);
|
|
|
|
|
+ },
|
|
|
async getcesRoomLayout() {
|
|
async getcesRoomLayout() {
|
|
|
await getAction("/rooms/cesRoomLayout/list", {
|
|
await getAction("/rooms/cesRoomLayout/list", {
|
|
|
pageSize: 99999,
|
|
pageSize: 99999,
|
|
@@ -1099,6 +1131,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ async getbusRoomPayType() {
|
|
|
|
|
+ await getAction("/business/busRoomPayType/list", {
|
|
|
|
|
+ pageSize: 99999,
|
|
|
|
|
+ pageNo: 1,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.payTypeList = res.result.records;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
roomPriceSlnIdChange(e) {
|
|
roomPriceSlnIdChange(e) {
|
|
|
this.model.orderInfo.vipCustomerId = e;
|
|
this.model.orderInfo.vipCustomerId = e;
|
|
|
},
|
|
},
|
|
@@ -1390,6 +1432,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
return deposit;
|
|
return deposit;
|
|
|
},
|
|
},
|
|
|
|
|
+ getSubjectTypeLabel(value) {
|
|
|
|
|
+ switch (value) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ return "押金";
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ return "预收房费";
|
|
|
|
|
+ default:
|
|
|
|
|
+ return "";
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
addList(roomLiveList, key) {
|
|
addList(roomLiveList, key) {
|
|
|
console.log("roomLiveList", roomLiveList);
|
|
console.log("roomLiveList", roomLiveList);
|
|
|
this.modelDefault = Object.assign({}, this.modelDefault, {
|
|
this.modelDefault = Object.assign({}, this.modelDefault, {
|
|
@@ -1406,10 +1458,14 @@ export default {
|
|
|
if (this.roomLayoutList.length === 0) {
|
|
if (this.roomLayoutList.length === 0) {
|
|
|
await this.getcesRoomLayout();
|
|
await this.getcesRoomLayout();
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.payTypeList == 0) {
|
|
|
|
|
+ await this.getbusRoomPayType();
|
|
|
|
|
+ }
|
|
|
if (this.model.roomIds && this.model.roomIds.length > 0) {
|
|
if (this.model.roomIds && this.model.roomIds.length > 0) {
|
|
|
this.activeKey = this.model.roomIds[0].id;
|
|
this.activeKey = this.model.roomIds[0].id;
|
|
|
|
|
|
|
|
var roomPrices = [];
|
|
var roomPrices = [];
|
|
|
|
|
+ var orderFees = [];
|
|
|
this.model.roomIds.forEach((item) => {
|
|
this.model.roomIds.forEach((item) => {
|
|
|
var roomLayout = this.roomLayoutList.find(
|
|
var roomLayout = this.roomLayoutList.find(
|
|
|
(t) => (t.id = item.layoutId)
|
|
(t) => (t.id = item.layoutId)
|
|
@@ -1425,6 +1481,27 @@ export default {
|
|
|
layoutName: roomLayout ? roomLayout.name : "",
|
|
layoutName: roomLayout ? roomLayout.name : "",
|
|
|
layoutId: item.layoutId,
|
|
layoutId: item.layoutId,
|
|
|
});
|
|
});
|
|
|
|
|
+ var payType = this.payTypeList[0];
|
|
|
|
|
+
|
|
|
|
|
+ orderFees.push({
|
|
|
|
|
+ subjectType: 2,
|
|
|
|
|
+ subjectTypeLabel: "预收房费",
|
|
|
|
|
+ payType: payType ? payType.id : "",
|
|
|
|
|
+ payTypeLabel: payType ? payType.name : "",
|
|
|
|
|
+ receivable: item.marketPrice,
|
|
|
|
|
+ money: item.marketPrice,
|
|
|
|
|
+ });
|
|
|
|
|
+ var deposit = this.compuleDeposit(item.marketPrice);
|
|
|
|
|
+ if (deposit > 0) {
|
|
|
|
|
+ orderFees.push({
|
|
|
|
|
+ subjectType: 1,
|
|
|
|
|
+ subjectTypeLabel: "押金",
|
|
|
|
|
+ payType: payType ? payType.id : "",
|
|
|
|
|
+ payTypeLabel: payType ? payType.name : "",
|
|
|
|
|
+ receivable: deposit,
|
|
|
|
|
+ money: deposit,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
this.model.roomPrices = roomPrices;
|
|
this.model.roomPrices = roomPrices;
|
|
|
var sum = 0;
|
|
var sum = 0;
|
|
@@ -1432,6 +1509,9 @@ export default {
|
|
|
sum += item.roomFee + item.deposit;
|
|
sum += item.roomFee + item.deposit;
|
|
|
});
|
|
});
|
|
|
this.amount = sum;
|
|
this.amount = sum;
|
|
|
|
|
+
|
|
|
|
|
+ this.model.orderFees = orderFees;
|
|
|
|
|
+ console.log("this.model", this.model);
|
|
|
}
|
|
}
|
|
|
// console.log("this.amount2", JSON.stringify(this.amount));
|
|
// console.log("this.amount2", JSON.stringify(this.amount));
|
|
|
},
|
|
},
|