|
|
@@ -257,7 +257,6 @@
|
|
|
prop="contactName"
|
|
|
>
|
|
|
<a-auto-complete
|
|
|
- :disabled="disabled"
|
|
|
v-model="model.contactName"
|
|
|
placeholder="联系人"
|
|
|
@search="handleSearch"
|
|
|
@@ -267,7 +266,7 @@
|
|
|
<a-select-option
|
|
|
v-for="item in customerList"
|
|
|
:key="item.id"
|
|
|
- >{{ item }}</a-select-option
|
|
|
+ >{{ item.name }}-{{ item.phone }}</a-select-option
|
|
|
>
|
|
|
</template>
|
|
|
</a-auto-complete>
|
|
|
@@ -586,7 +585,7 @@ export default {
|
|
|
components: { EditableCell, SelectRoomFormModal },
|
|
|
props: {
|
|
|
//表单禁用
|
|
|
- disabled: {
|
|
|
+ disabled2: {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
required: false,
|
|
|
@@ -598,6 +597,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ disabled: false,
|
|
|
visible: true,
|
|
|
columns,
|
|
|
columns2: [
|
|
|
@@ -701,7 +701,7 @@ export default {
|
|
|
},
|
|
|
url: {
|
|
|
add: "/business/busRoomBookingOrders/add",
|
|
|
- edit: "/business/busRoomBookingOrders/edit",
|
|
|
+ edit: "/business/busRoomBookingOrders/add",
|
|
|
getBookingOrderInfo:
|
|
|
"/business/busRoomBookingOrders/getBookingOrderInfo",
|
|
|
},
|
|
|
@@ -739,91 +739,126 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
- if (_info) {
|
|
|
- this.model.hotelId = _info.id;
|
|
|
- }
|
|
|
- //备份model原始值
|
|
|
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
-
|
|
|
- getAction("/business/busDictItem/list", {
|
|
|
- hotelId: _info.id,
|
|
|
- dictId: "1639538915239743490",
|
|
|
- }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.customerSourceList = res.result.records;
|
|
|
- }
|
|
|
- });
|
|
|
- getAction("/business/busDictItem/list", {
|
|
|
- hotelId: _info.id,
|
|
|
- dictId: "1639544187093995521",
|
|
|
- }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.bookingdicWayList = res.result.records;
|
|
|
- }
|
|
|
- });
|
|
|
- getAction("/business/busSalesPerson/list", {
|
|
|
- hotelId: _info.id,
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 100,
|
|
|
- }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.warranterList = res.result.records;
|
|
|
+ this.load();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ deleteOrder() {
|
|
|
+ deleteAction("/business/busRoomBookingOrders/delete", {
|
|
|
+ id: this.model.orderInfo.id,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message);
|
|
|
+ this.$router.go(-1);
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setOrderStatus(status) {
|
|
|
+ postAction(
|
|
|
+ "/business/busRoomBookingOrders/set-batch-order-status?id=" +
|
|
|
+ this.model.orderInfo.id +
|
|
|
+ "&bookingStatus=" +
|
|
|
+ status,
|
|
|
+ {
|
|
|
+ id: this.model.orderInfo.id,
|
|
|
+ bookingStatus: status,
|
|
|
+ }
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message);
|
|
|
+ this.getBookingOrderInfo();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ load() {
|
|
|
+ this.disabled = this.disabled2;
|
|
|
+ var _info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
+ if (_info) {
|
|
|
+ this.model.hotelId = _info.id;
|
|
|
}
|
|
|
- });
|
|
|
+ //备份model原始值
|
|
|
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
|
|
|
- getAction("/rooms/cesHourRoomRule/list", {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 100,
|
|
|
- }).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.hourRoomRuleList = res.result.records;
|
|
|
- }
|
|
|
- });
|
|
|
- postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
|
|
|
- (res) => {
|
|
|
+ getAction("/business/busDictItem/list", {
|
|
|
+ hotelId: _info.id,
|
|
|
+ dictId: "1639538915239743490",
|
|
|
+ }).then((res) => {
|
|
|
if (res.success) {
|
|
|
- if (
|
|
|
- res.result &&
|
|
|
- res.result.cesAllDayPriceRule &&
|
|
|
- res.result.cesAllDayPriceRule.leaveTime
|
|
|
- ) {
|
|
|
- this.model.orderInfo.dueOutTimeSpan = moment(
|
|
|
- res.result.cesAllDayPriceRule.leaveTime,
|
|
|
- "HH:mm"
|
|
|
- );
|
|
|
- }
|
|
|
+ this.customerSourceList = res.result.records;
|
|
|
}
|
|
|
+ });
|
|
|
+ getAction("/business/busDictItem/list", {
|
|
|
+ hotelId: _info.id,
|
|
|
+ dictId: "1639544187093995521",
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.bookingdicWayList = res.result.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ getAction("/business/busSalesPerson/list", {
|
|
|
+ hotelId: _info.id,
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.warranterList = res.result.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- // this.loadRooms();
|
|
|
- }
|
|
|
- );
|
|
|
+ getAction("/rooms/cesHourRoomRule/list", {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.hourRoomRuleList = res.result.records;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ postAction("/rooms/cesAllDayPriceRule/fetch", { hotelId: _info.id }).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.success) {
|
|
|
+ if (
|
|
|
+ res.result &&
|
|
|
+ res.result.cesAllDayPriceRule &&
|
|
|
+ res.result.cesAllDayPriceRule.leaveTime
|
|
|
+ ) {
|
|
|
+ this.model.orderInfo.dueOutTimeSpan = moment(
|
|
|
+ res.result.cesAllDayPriceRule.leaveTime,
|
|
|
+ "HH:mm"
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // getAction(this.url.getBookingOrderInfo, {
|
|
|
- // bookingNo: this.id,
|
|
|
- // }).then((res) => {
|
|
|
- // if (res.success) {
|
|
|
- // this.model = res.result;
|
|
|
- // this.model.orderInfo.arrivalTime2 = moment(
|
|
|
- // this.model.orderInfo.arrivalTime
|
|
|
- // ).format("YYYY-MM-DD");
|
|
|
- // this.model.orderInfo.dueOutTime2 = moment(
|
|
|
- // this.model.orderInfo.dueOutTime
|
|
|
- // ).format("YYYY-MM-DD");
|
|
|
- // this.model.orderInfo.arrivalTimeSpan = moment(
|
|
|
- // this.model.orderInfo.arrivalTime.substr(11, 15),
|
|
|
- // "HH:mm"
|
|
|
- // );
|
|
|
- // this.model.orderInfo.dueOutTimeSpan = moment(
|
|
|
- // this.model.orderInfo.dueOutTime.substr(11, 15),
|
|
|
- // "HH:mm"
|
|
|
- // );
|
|
|
- // this.getbusCustomer();
|
|
|
- // }
|
|
|
- // });
|
|
|
- this.getBookingOrderInfo();
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ // this.loadRooms();
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ // getAction(this.url.getBookingOrderInfo, {
|
|
|
+ // bookingNo: this.id,
|
|
|
+ // }).then((res) => {
|
|
|
+ // if (res.success) {
|
|
|
+ // this.model = res.result;
|
|
|
+ // this.model.orderInfo.arrivalTime2 = moment(
|
|
|
+ // this.model.orderInfo.arrivalTime
|
|
|
+ // ).format("YYYY-MM-DD");
|
|
|
+ // this.model.orderInfo.dueOutTime2 = moment(
|
|
|
+ // this.model.orderInfo.dueOutTime
|
|
|
+ // ).format("YYYY-MM-DD");
|
|
|
+ // this.model.orderInfo.arrivalTimeSpan = moment(
|
|
|
+ // this.model.orderInfo.arrivalTime.substr(11, 15),
|
|
|
+ // "HH:mm"
|
|
|
+ // );
|
|
|
+ // this.model.orderInfo.dueOutTimeSpan = moment(
|
|
|
+ // this.model.orderInfo.dueOutTime.substr(11, 15),
|
|
|
+ // "HH:mm"
|
|
|
+ // );
|
|
|
+ // this.getbusCustomer();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.getBookingOrderInfo();
|
|
|
+ },
|
|
|
setMain(id) {
|
|
|
postAction("/business/busBookingRooms/set-main", { id: id }).then(
|
|
|
(res) => {
|
|
|
@@ -892,7 +927,8 @@ export default {
|
|
|
this.model.orderInfo.dueOutTime.substr(11, 15),
|
|
|
"HH:mm"
|
|
|
);
|
|
|
-
|
|
|
+ this.$set(this.model, "phone", "");
|
|
|
+ this.$set(this.model, "contactName", "");
|
|
|
this.getbusCustomer();
|
|
|
this.loadRooms();
|
|
|
}
|
|
|
@@ -1152,8 +1188,8 @@ export default {
|
|
|
httpurl += this.url.add;
|
|
|
method = "post";
|
|
|
} else {
|
|
|
- httpurl += this.url.edit;
|
|
|
- method = "put";
|
|
|
+ httpurl = "/business/busRoomBookingOrders/add-batch";
|
|
|
+ method = "post";
|
|
|
}
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
.then((res) => {
|