|
@@ -9,6 +9,9 @@
|
|
|
</a-tabs>
|
|
</a-tabs>
|
|
|
<div style="display: flex; height: calc(100vh - 350px)">
|
|
<div style="display: flex; height: calc(100vh - 350px)">
|
|
|
<a-card style="width: 25%">
|
|
<a-card style="width: 25%">
|
|
|
|
|
+ <p v-if="selectRoomOrder && selectRoomOrder.id">
|
|
|
|
|
+ 房间:{{ selectRoomOrder.tableNo }},姓名:{{ selectRoomOrder.id }}
|
|
|
|
|
+ </p>
|
|
|
<a-table
|
|
<a-table
|
|
|
bordered
|
|
bordered
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
@@ -40,10 +43,17 @@
|
|
|
<div style="display: flex; gap: 5px; flex-flow: wrap">
|
|
<div style="display: flex; gap: 5px; flex-flow: wrap">
|
|
|
<a-button @click="handleClear" :disabled="btnDisabled">清空</a-button>
|
|
<a-button @click="handleClear" :disabled="btnDisabled">清空</a-button>
|
|
|
<!-- <a-button @click="handleAdd" :disabled="btnDisabled">备注</a-button> -->
|
|
<!-- <a-button @click="handleAdd" :disabled="btnDisabled">备注</a-button> -->
|
|
|
- <a-button :disabled="btnDisabled">退货</a-button>
|
|
|
|
|
|
|
+ <!-- <a-button :disabled="btnDisabled">退货</a-button> -->
|
|
|
<a-button v-if="!btnDisabled" @click="handleAdd">挂单</a-button>
|
|
<a-button v-if="!btnDisabled" @click="handleAdd">挂单</a-button>
|
|
|
- <a-button v-else @click="handleAdd">取单</a-button>
|
|
|
|
|
- <a-button>挂房帐</a-button>
|
|
|
|
|
|
|
+ <a-button v-else @click="handlePickingGoodsOrder">取单</a-button>
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ v-if="selectRoomOrder && selectRoomOrder.id && !btnDisabled"
|
|
|
|
|
+ @click="handleToRoomFeePayment"
|
|
|
|
|
+ >确定挂房帐</a-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-button v-else @click="handleSelectCheckInRoomOrder"
|
|
|
|
|
+ >挂房帐</a-button
|
|
|
|
|
+ >
|
|
|
<a-button :disabled="btnDisabled" type="danger" @click="handlePayment"
|
|
<a-button :disabled="btnDisabled" type="danger" @click="handlePayment"
|
|
|
>结账¥{{ amount.toFixed(2) }}</a-button
|
|
>结账¥{{ amount.toFixed(2) }}</a-button
|
|
|
>
|
|
>
|
|
@@ -90,6 +100,14 @@
|
|
|
</div>
|
|
</div>
|
|
|
<payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
|
|
<payment-modal ref="modalPaymentForm" @ok="modalFormOk"></payment-modal>
|
|
|
<goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
|
|
<goods-modal ref="modalGoodsForm" @ok="modalFormOk2"></goods-modal>
|
|
|
|
|
+ <picking-goods-order-modal
|
|
|
|
|
+ ref="modalPickingGoodsOrderForm"
|
|
|
|
|
+ @ok="modalPickingGoodsOrderFormOk"
|
|
|
|
|
+ ></picking-goods-order-modal>
|
|
|
|
|
+ <select-check-in-room-order-modal
|
|
|
|
|
+ ref="modalSelectCheckInRoomOrderModal"
|
|
|
|
|
+ @ok="modalSelectCheckInRoomOrderFormOk"
|
|
|
|
|
+ ></select-check-in-room-order-modal>
|
|
|
</a-card>
|
|
</a-card>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -100,6 +118,8 @@ import { filterObj } from "@/utils/util";
|
|
|
import { getAction, postAction, deleteAction } from "@/api/manage";
|
|
import { getAction, postAction, deleteAction } from "@/api/manage";
|
|
|
import PaymentModal from "./modules/PaymentModal.vue";
|
|
import PaymentModal from "./modules/PaymentModal.vue";
|
|
|
import goodsModal from "./modules/goodStock/goodsModal.vue";
|
|
import goodsModal from "./modules/goodStock/goodsModal.vue";
|
|
|
|
|
+import PickingGoodsOrderModal from "./modules/PickingGoodsOrderModal.vue";
|
|
|
|
|
+import SelectCheckInRoomOrderModal from "./modules/SelectCheckInRoomOrderModal.vue";
|
|
|
import { computed } from "vue";
|
|
import { computed } from "vue";
|
|
|
import { tree } from "@/api/good";
|
|
import { tree } from "@/api/good";
|
|
|
const columns = [
|
|
const columns = [
|
|
@@ -122,6 +142,8 @@ export default {
|
|
|
components: {
|
|
components: {
|
|
|
PaymentModal,
|
|
PaymentModal,
|
|
|
goodsModal,
|
|
goodsModal,
|
|
|
|
|
+ PickingGoodsOrderModal,
|
|
|
|
|
+ SelectCheckInRoomOrderModal,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -163,6 +185,8 @@ export default {
|
|
|
tabgoodsTypeId: "1",
|
|
tabgoodsTypeId: "1",
|
|
|
dataSource: [],
|
|
dataSource: [],
|
|
|
oldSelectGoodsList: [],
|
|
oldSelectGoodsList: [],
|
|
|
|
|
+ selectOrderInfo: {},
|
|
|
|
|
+ selectRoomOrder: {},
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
provide() {
|
|
provide() {
|
|
@@ -215,6 +239,22 @@ export default {
|
|
|
this.$set(good, "num", 1);
|
|
this.$set(good, "num", 1);
|
|
|
this.selectGoodsList.push(good);
|
|
this.selectGoodsList.push(good);
|
|
|
},
|
|
},
|
|
|
|
|
+ modalSelectCheckInRoomOrderFormOk(e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ this.selectRoomOrder = e;
|
|
|
|
|
+ },
|
|
|
|
|
+ modalPickingGoodsOrderFormOk(e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ if (e && e.orderDetailList && e.orderDetailList.length > 0) {
|
|
|
|
|
+ this.selectOrderInfo = e.orderInfo;
|
|
|
|
|
+ e.orderDetailList.forEach((t) => {
|
|
|
|
|
+ t.sellingPrice = t.payMoney;
|
|
|
|
|
+ t.name = t.goodsName;
|
|
|
|
|
+ t.id = t.goodsId;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.selectGoodsList = e.orderDetailList;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
numChange(e, index) {
|
|
numChange(e, index) {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
if (e <= 0) {
|
|
if (e <= 0) {
|
|
@@ -223,6 +263,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleClear() {
|
|
handleClear() {
|
|
|
this.selectGoodsList = [];
|
|
this.selectGoodsList = [];
|
|
|
|
|
+ // this.selectOrderInfo = {};
|
|
|
},
|
|
},
|
|
|
tabPosTypeChange(e) {
|
|
tabPosTypeChange(e) {
|
|
|
this.loadGoodsType();
|
|
this.loadGoodsType();
|
|
@@ -277,11 +318,24 @@ export default {
|
|
|
})
|
|
})
|
|
|
.finally(() => {});
|
|
.finally(() => {});
|
|
|
},
|
|
},
|
|
|
|
|
+ handleSelectCheckInRoomOrder() {
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrderModal.add();
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrderModal.title = "选择转帐人";
|
|
|
|
|
+ this.$refs.modalSelectCheckInRoomOrderModal.disableSubmit = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ handlePickingGoodsOrder() {
|
|
|
|
|
+ this.$refs.modalPickingGoodsOrderForm.add();
|
|
|
|
|
+ this.$refs.modalPickingGoodsOrderForm.title = "取单";
|
|
|
|
|
+ this.$refs.modalPickingGoodsOrderForm.disableSubmit = false;
|
|
|
|
|
+ },
|
|
|
handleAddTempGoods() {
|
|
handleAddTempGoods() {
|
|
|
this.$refs.modalGoodsForm.add();
|
|
this.$refs.modalGoodsForm.add();
|
|
|
this.$refs.modalGoodsForm.title = "新增菜品";
|
|
this.$refs.modalGoodsForm.title = "新增菜品";
|
|
|
this.$refs.modalGoodsForm.disableSubmit = false;
|
|
this.$refs.modalGoodsForm.disableSubmit = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ handleToRoomFeePayment() {
|
|
|
|
|
+ this.handleAdd();
|
|
|
|
|
+ },
|
|
|
handlePayment() {
|
|
handlePayment() {
|
|
|
this.handleAdd((e) => {
|
|
this.handleAdd((e) => {
|
|
|
var amount = this.oldSelectGoodsList.reduce(function (total, item) {
|
|
var amount = this.oldSelectGoodsList.reduce(function (total, item) {
|
|
@@ -312,6 +366,8 @@ export default {
|
|
|
if (_info) {
|
|
if (_info) {
|
|
|
model.hotelId = _info.id;
|
|
model.hotelId = _info.id;
|
|
|
}
|
|
}
|
|
|
|
|
+ model.id = this.selectOrderInfo.id;
|
|
|
|
|
+ model.toRoomFeeOrderId = this.selectRoomOrder.id;
|
|
|
model.posType = this.tabPosTypeId;
|
|
model.posType = this.tabPosTypeId;
|
|
|
var posOrderGoodsDetailList = [];
|
|
var posOrderGoodsDetailList = [];
|
|
|
this.selectGoodsList.forEach((t) => {
|
|
this.selectGoodsList.forEach((t) => {
|
|
@@ -330,6 +386,7 @@ export default {
|
|
|
JSON.stringify(this.selectGoodsList)
|
|
JSON.stringify(this.selectGoodsList)
|
|
|
);
|
|
);
|
|
|
this.selectGoodsList = [];
|
|
this.selectGoodsList = [];
|
|
|
|
|
+ this.selectOrderInfo = {};
|
|
|
this.loadGoods();
|
|
this.loadGoods();
|
|
|
if (callback) {
|
|
if (callback) {
|
|
|
callback(res.result);
|
|
callback(res.result);
|