mk 3 months ago
parent
commit
76e503671b
  1. 8
      src/api/residence/checkout.js
  2. 2
      src/views/components/CheckOutDialog.vue
  3. 23
      src/views/index.vue
  4. 12
      src/views/residence/checkOut/index.vue

8
src/api/residence/checkout.js

@ -17,6 +17,14 @@ export function getRoomFacilities(query) {
params: query,
});
}
// 暂存提交退房
export function tempSaveCheckOut(data) {
return request({
url: "/apartment/manager/tempSaveCheckOut",
method: "post",
data: data,
});
}
// 提交退房
export function submitCheckout(data) {

2
src/views/components/CheckOutDialog.vue

@ -154,7 +154,7 @@ export default {
mounted() {
this.getList();
},
methods: {
methods: {
async getList() {
try {
const response = await listCheckoutAlert(this.queryParams);

23
src/views/index.vue

@ -247,7 +247,7 @@
</template>
<script>
import { listWaitingReleaseRooms } from "@/api/residence/checkout";
import { listWaitingReleaseRooms,listCheckoutAlert } from "@/api/residence/checkout";
import {checkInReservation} from "@/api/recs";
import * as Echarts from "echarts";
@ -456,6 +456,7 @@ export default {
created() {
this.getlistWaitingReleaseRooms();
this.getReservationList()
this.getCheckoutAlertList()
},
methods: {
goTarget(href) {
@ -579,9 +580,7 @@ export default {
handleReservationAction(action, row) {
//
},
getReservationList() {
//
},
handleQuery() {
// 退
},
@ -615,6 +614,22 @@ export default {
releaseItem.count = count;
}
},
async getCheckoutAlertList() {
try {
const response = await listCheckoutAlert(this.queryParams);
if (response.code === 200) {
this.workbenchItems = this.workbenchItems.map((item) => {
if (item.id === 4) {
return {
...item,
count: response.total,
};
}
return item;
});
}
} catch (error) {}
},
//
async getlistWaitingReleaseRooms() {
console.log("zhixing");

12
src/views/residence/checkOut/index.vue

@ -665,6 +665,7 @@ import CommonTitle from "../../components/CommonTitle.vue";
import {
getResidentInfo,
submitCheckout,
tempSaveCheckOut,
getRoomFacilities,
getRoomCheckRecDetail,
releaseRoom,
@ -871,7 +872,7 @@ export default {
...this.form,
facilitiesCheckResults,
};
this.submitCheckoutForm(currentFormData);
this.handleTempSave(currentFormData);
this.currentStep++;
}
});
@ -895,6 +896,14 @@ export default {
this.checkStatus = Array(this.checkItems.length).fill("1");
});
},
//
handleTempSave(formData) {
tempSaveCheckOut(formData).then((res) => {
if (res.code === 200) {
this.$message.success("暂存成功");
}
});
},
//
submitCheckoutForm(formData) {
let formParams = {};
@ -911,6 +920,7 @@ export default {
} else {
formParams = formData;
}
console.log("当前步骤", this.currentStep);
submitCheckout(formParams).then((response) => {
if (response.code === 200) {

Loading…
Cancel
Save