|
|
@@ -398,67 +398,23 @@ export default {
|
|
|
that.$message.warning("实收金额和实收合计必须相等");
|
|
|
return;
|
|
|
}
|
|
|
- var obj = {};
|
|
|
+ var obj = {
|
|
|
+ couponPrice: this.couponAmount.toFixed(2),
|
|
|
+ orderCode: this.model.orderCode,
|
|
|
+ paymentList: [],
|
|
|
+ };
|
|
|
var fees = [];
|
|
|
- if (this.model.coupon) {
|
|
|
- fees.push({
|
|
|
- feeType: this.model.feeType,
|
|
|
- preferentialType: this.model.preferentialType,
|
|
|
- money: this.couponAmount.toFixed(2),
|
|
|
- custorerOrderRemark: "优惠金额",
|
|
|
- isPreferential: true,
|
|
|
- });
|
|
|
- }
|
|
|
- if (this.model.couponCard && this.model.couponId) {
|
|
|
- var find = this.memeberCouponList.find(
|
|
|
- (t) => t.id == this.model.couponId
|
|
|
- );
|
|
|
- if (find) {
|
|
|
- fees.push({
|
|
|
- feeType: this.model.feeType,
|
|
|
- money: find.cost.toFixed(2),
|
|
|
- custorerOrderRemark: "优惠券",
|
|
|
- isPreferential: true,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
this.payList.forEach((item) => {
|
|
|
fees.push({
|
|
|
- feeType: this.model.feeType,
|
|
|
- money: item.money.toFixed(2),
|
|
|
- payType: item.payType,
|
|
|
- custorerOrderRemark: "结账退房",
|
|
|
- isPreferential: false,
|
|
|
+ payMoney: item.money.toFixed(2),
|
|
|
+ paymentMethod: item.payType,
|
|
|
+ orderId: this.model.orderCode,
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
+ obj.paymentList = fees;
|
|
|
that.confirmLoading = true;
|
|
|
- var url =
|
|
|
- "/business/busRoomBookingOrders/settle-checkout?bookingOrderId=" +
|
|
|
- this.model.bookingOrderId;
|
|
|
- if (this.model.livingOrderId) {
|
|
|
- url =
|
|
|
- "/business/busRoomBookingOrders/living-settle-checkout?livingOrderId=" +
|
|
|
- this.model.livingOrderId;
|
|
|
- }
|
|
|
- if (
|
|
|
- this.model.selectedFeeIds &&
|
|
|
- this.model.selectedFeeIds.length > 0
|
|
|
- ) {
|
|
|
- url = "/business/busRoomBookingOrders/partial-settle";
|
|
|
- obj = {
|
|
|
- fees: fees,
|
|
|
- livingOrderId: this.model.livingOrderId,
|
|
|
- selectedFeeIds: this.model.selectedFeeIds,
|
|
|
- };
|
|
|
- }
|
|
|
- httpAction(
|
|
|
- url,
|
|
|
- this.model.selectedFeeIds && this.model.selectedFeeIds.length > 0
|
|
|
- ? obj
|
|
|
- : fees,
|
|
|
- "post"
|
|
|
- )
|
|
|
+ var url = "/pos/posOrderGoodsPayment/add";
|
|
|
+ httpAction(url, obj, "post")
|
|
|
.then((res) => {
|
|
|
if (res.success) {
|
|
|
that.$message.success("结账成功");
|