浏览代码

入住退单

gqx 2 年之前
父节点
当前提交
77dd422818
共有 2 个文件被更改,包括 49 次插入12 次删除
  1. 35 8
      src/views/room/modules/checkIn/BillRoomInfo.vue
  2. 14 4
      src/views/room/modules/checkIn/EditCustomerForm.vue

+ 35 - 8
src/views/room/modules/checkIn/BillRoomInfo.vue

@@ -312,6 +312,7 @@
               /><a-button
                 type="link"
                 :disabled="selectedRowKeys1.length == 0 || selectRoomId == '1'"
+                @click="tuidan"
               >
                 退单
               </a-button>
@@ -502,7 +503,7 @@
 </template>
 
 <script>
-import { httpAction, getAction, deleteAction } from "@/api/manage";
+import { httpAction, getAction, deleteAction, postAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import moment from "moment";
 import CustomerModal from "./CustomerModal.vue";
@@ -705,16 +706,19 @@ export default {
       }, 0);
     },
     paymentAmount() {
-      var list = this.paymentList.filter((t) => t.subjectType !== 5);
-      var amount = list.reduce(function (total, item) {
-        return total + item.money;
-      }, 0);
+      // var list = this.paymentList.filter((t) => t.subjectType !== 5);
+      // var amount = list.reduce(function (total, item) {
+      //   return total + item.money;
+      // }, 0);
 
-      var list2 = this.paymentList.filter((t) => t.subjectType == 5);
-      var amount2 = list2.reduce(function (total, item) {
+      // var list2 = this.paymentList.filter((t) => t.subjectType == 5);
+      // var amount2 = list2.reduce(function (total, item) {
+      //   return total + item.money;
+      // }, 0);
+      var amount = this.paymentList.reduce(function (total, item) {
         return total + item.money;
       }, 0);
-      return amount - amount2;
+      return amount;
     },
     btnSisabled() {
       var index = this.model.livingRoomIds.findLastIndex(
@@ -928,6 +932,19 @@ export default {
       this.$refs.modalFeeForm.title = "增加消费项目";
       this.$refs.modalFeeForm.disableSubmit = false;
     },
+    tuidan() {
+      postAction(
+        "/business/busRoomBookingOrders/退你麻痹单狗东西",
+        this.selectedRowKeys1
+      ).then((res) => {
+        if (res.success) {
+          this.$message.success("退单成功");
+          this.getBookingOrderInfo();
+        } else {
+          this.$message.warning(res.message);
+        }
+      });
+    },
     partialSettle() {
       var list2 = this.feesList.filter((t) =>
         this.selectedRowKeys1.includes(t.id)
@@ -997,6 +1014,16 @@ export default {
         msg = "点餐";
       } else if (text == 8) {
         msg = "夜审房费";
+      } else if (text == 9) {
+        msg = "会议室";
+      } else if (text == 10) {
+        msg = "手工房费";
+      } else if (text == 11) {
+        msg = "水电煤抄表";
+      } else if (text == 12) {
+        msg = "赔偿费";
+      } else if (text == 13) {
+        msg = "退单结账";
       }
       return msg;
     },

+ 14 - 4
src/views/room/modules/checkIn/EditCustomerForm.vue

@@ -19,7 +19,7 @@
                 v-model="model.cusName"
                 placeholder="联系人"
                 @search="handleSearch"
-                @select="(e) => handleSelectMember(e)"
+                @select="(e) => handleSelectMember(e)" style="width: 70%;"
               >
                 <template slot="dataSource">
                   <a-select-option v-for="item in customerList" :key="item.id"
@@ -27,6 +27,9 @@
                   >
                 </template>
               </a-auto-complete>
+              <a-button @click="readCardNo" style="margin-left: 10px"
+                >读取身份证</a-button
+              >
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="24">
@@ -78,7 +81,7 @@ export default {
   },
   data() {
     return {
-      model: { payType: 1, livingOrderId: "",certType:1,gender:1 },
+      model: { payType: 1, livingOrderId: "", certType: 1, gender: 1 },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -132,6 +135,9 @@ export default {
     this.getbusCustomer();
   },
   methods: {
+    readCardNo() {
+      this.$message.error("接口程序未打开,请打开接口程序");
+    },
     handleSearch(value) {
       let result;
       if (!value) {
@@ -155,7 +161,7 @@ export default {
         }
       });
     },
-    add(livingOrderId,roomId) {
+    add(livingOrderId, roomId) {
       this.modelDefault.livingOrderId = livingOrderId;
       this.modelDefault.roomId = roomId;
       this.edit(this.modelDefault);
@@ -180,7 +186,11 @@ export default {
           //   phone: this.model.phone,
           //   roomId: this.model.roomId,
           // });
-          httpAction("/business/busRoomBookingOrders/update-orders?type=2", this.model, "post")
+          httpAction(
+            "/business/busRoomBookingOrders/update-orders?type=2",
+            this.model,
+            "post"
+          )
             .then((res) => {
               if (res.success) {
                 that.$message.success("修改成功");