|
|
@@ -11,10 +11,10 @@
|
|
|
<el-input
|
|
|
:clearable="true"
|
|
|
@change="searchBtn"
|
|
|
- v-model="searchInput.keyWord"
|
|
|
+ v-model.trim="searchInput.keyWord"
|
|
|
class="w-50 m-2"
|
|
|
- placeholder="请输入预订人、手机号码、身份证"
|
|
|
- style="width: 230px"
|
|
|
+ placeholder="请输入预订人、手机号码、身份证、房间号"
|
|
|
+ style="width: 290px"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
@@ -42,7 +42,7 @@
|
|
|
class="m-2"
|
|
|
style="width: 180px"
|
|
|
placeholder="请选择房间类型"
|
|
|
- @change="searchBtn"
|
|
|
+ @change="houseTypeChange"
|
|
|
>
|
|
|
<el-option label="全日房" :value="1" />
|
|
|
<el-option label="钟点房" :value="2" />
|
|
|
@@ -84,6 +84,7 @@
|
|
|
<el-option label="已退款" :value="7" />
|
|
|
<el-option label="已退房" :value="8" />
|
|
|
<el-option label="已取消,超时" :value="9" />
|
|
|
+ <el-option label="已支付,未入住" :value="10" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="condition">
|
|
|
@@ -256,7 +257,6 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- prop="houseName"
|
|
|
width="140"
|
|
|
label="钥匙类型"
|
|
|
>
|
|
|
@@ -277,6 +277,18 @@
|
|
|
src="../../assets/icons/eyes.png"
|
|
|
alt=""
|
|
|
/>
|
|
|
+ <img
|
|
|
+ v-if="row.orderStart == 8"
|
|
|
+ @click="lookPassword(row)"
|
|
|
+ style="
|
|
|
+ width: 25px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 3px;
|
|
|
+ transform: translateY(3px);
|
|
|
+ "
|
|
|
+ src="../../assets/icons/passEyes.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</div>
|
|
|
<div v-if="row.lockStatus == 2">
|
|
|
<span>房卡</span>
|
|
|
@@ -413,7 +425,7 @@
|
|
|
align="center"
|
|
|
prop="orderStatusName"
|
|
|
label="订单状态"
|
|
|
- width="120"
|
|
|
+ width="130"
|
|
|
>
|
|
|
<template #default="{ row }">
|
|
|
<div style="color: #f07218" v-if="row.orderStart == 1">
|
|
|
@@ -443,6 +455,9 @@
|
|
|
<div style="color: #818282" v-if="row.orderStart == 9">
|
|
|
已取消,超时
|
|
|
</div>
|
|
|
+ <div style="color: #eebe77" v-if="row.orderStart == 10">
|
|
|
+ 已支付,未入住
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="支付类型" width="120">
|
|
|
@@ -513,7 +528,7 @@
|
|
|
<!-- 取消订单 -->
|
|
|
<el-popconfirm
|
|
|
v-if="
|
|
|
- (scope.row.orderStart == 1 || scope.row.orderStart == 2) &&
|
|
|
+ scope.row.orderStart == 1 &&
|
|
|
flagBtn.quxiao == 1
|
|
|
"
|
|
|
width="220"
|
|
|
@@ -529,13 +544,13 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
<el-popconfirm
|
|
|
- v-if="scope.row.orderStart == 3 && flagBtn.quxiao == 1"
|
|
|
+ v-if="(scope.row.orderStart == 2 || scope.row.orderStart == 3) && flagBtn.quxiao == 1"
|
|
|
width="220"
|
|
|
confirm-button-text="确认"
|
|
|
cancel-button-text="取消"
|
|
|
:icon="InfoFilled"
|
|
|
icon-color="#f89626"
|
|
|
- title="当前取消订单不退款,是否继续?"
|
|
|
+ title="当前订单已付款,取消订单 '将不退款' ,是否继续?"
|
|
|
@confirm="orderCancel(scope.row)"
|
|
|
>
|
|
|
<template #reference>
|
|
|
@@ -629,6 +644,7 @@
|
|
|
>
|
|
|
<!-- 备注 -->
|
|
|
<span
|
|
|
+ v-if="flagBtn.beizhu == 1"
|
|
|
style="cursor: pointer; margin: 0 10px"
|
|
|
@click="orderRemarkClick(scope.row)"
|
|
|
>备注</span
|
|
|
@@ -664,54 +680,54 @@
|
|
|
<div class="info">
|
|
|
<div class="user">
|
|
|
<div class="name">预订人</div>
|
|
|
- <el-input v-model="order.userName" placeholder=""></el-input>
|
|
|
+ <el-input v-model.trim="order.userName" placeholder=""></el-input>
|
|
|
</div>
|
|
|
<div class="user">
|
|
|
<div class="name">联系方式</div>
|
|
|
- <el-input v-model="order.userPhone"></el-input>
|
|
|
+ <el-input v-model.trim="order.userPhone"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="user">
|
|
|
<div class="name">入住人</div>
|
|
|
- <el-input v-model="order.liveName" placeholder=""></el-input>
|
|
|
+ <el-input v-model.trim="order.liveName" placeholder=""></el-input>
|
|
|
</div>
|
|
|
<div class="user">
|
|
|
<div class="name">身份证号</div>
|
|
|
- <el-input v-model="order.idCard"></el-input>
|
|
|
+ <el-input v-model.trim="order.idCard"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="user">
|
|
|
<div class="name">订单号</div>
|
|
|
- <el-input v-model="order.orderNo"></el-input>
|
|
|
+ <el-input v-model.trim="order.orderNo"></el-input>
|
|
|
<!-- <el-tooltip placement="top" :content="order.orderNo">
|
|
|
<el-input v-model="order.orderNo"></el-input>
|
|
|
</el-tooltip> -->
|
|
|
</div>
|
|
|
<div class="user">
|
|
|
<div class="name">支付金额(元)</div>
|
|
|
- <el-input v-model="order.allOfReceiveAmount"></el-input>
|
|
|
+ <el-input v-model.trim="order.allOfReceiveAmount"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="user">
|
|
|
<div class="name">入住时间</div>
|
|
|
- <el-input v-model="order.realStartTime"></el-input>
|
|
|
+ <el-input v-model.trim="order.realStartTime"></el-input>
|
|
|
</div>
|
|
|
<div class="user">
|
|
|
<div class="name">离住时间</div>
|
|
|
- <el-input v-model="order.realEndTime"></el-input>
|
|
|
+ <el-input v-model.trim="order.realEndTime"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="user">
|
|
|
<div class="name">入住天数</div>
|
|
|
- <el-input v-model="order.housDay"></el-input>
|
|
|
+ <el-input v-model.trim="order.housDay"></el-input>
|
|
|
</div>
|
|
|
<div class="user">
|
|
|
<div class="name">支付时间</div>
|
|
|
- <el-input v-model="order.payTime"></el-input>
|
|
|
+ <el-input v-model.trim="order.payTime"></el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -837,7 +853,7 @@
|
|
|
<div class="residentInfo">
|
|
|
<el-form-item label="预订人 :" prop="name">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.name"
|
|
|
+ v-model.trim="checkInRuleForm.name"
|
|
|
placeholder="请输入预订人"
|
|
|
clearable
|
|
|
style="width: 150px"
|
|
|
@@ -846,7 +862,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号码 :" prop="phone">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.phone"
|
|
|
+ v-model.trim="checkInRuleForm.phone"
|
|
|
placeholder="请输入手机号码"
|
|
|
clearable
|
|
|
style="width: 220px"
|
|
|
@@ -857,15 +873,15 @@
|
|
|
<div class="residentInfo">
|
|
|
<el-form-item label="入住人 :" prop="checkName">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.checkName"
|
|
|
- placeholder="请输入预订人"
|
|
|
+ v-model.trim="checkInRuleForm.checkName"
|
|
|
+ placeholder="请输入入住人"
|
|
|
clearable
|
|
|
style="width: 150px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号 :" prop="checkIdcard">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.checkIdcard"
|
|
|
+ v-model.trim="checkInRuleForm.checkIdcard"
|
|
|
placeholder="请输入身份证号"
|
|
|
clearable
|
|
|
style="width: 220px"
|
|
|
@@ -919,7 +935,7 @@
|
|
|
<el-form-item label="房价 :" prop="roomPrice">
|
|
|
<div class="block">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.roomPrice"
|
|
|
+ v-model.trim="checkInRuleForm.roomPrice"
|
|
|
clearable
|
|
|
placeholder="请输入房价"
|
|
|
:disabled="true"
|
|
|
@@ -930,7 +946,7 @@
|
|
|
<el-form-item label="预住天数 :" prop="dayNum">
|
|
|
<div class="block">
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.dayNum"
|
|
|
+ v-model.trim="checkInRuleForm.dayNum"
|
|
|
placeholder="请输入预住天数"
|
|
|
clearable
|
|
|
:disabled="true"
|
|
|
@@ -1019,7 +1035,7 @@
|
|
|
prop="icCard"
|
|
|
>
|
|
|
<el-input
|
|
|
- v-model="checkInRuleForm.icCard"
|
|
|
+ v-model.trim="checkInRuleForm.icCard"
|
|
|
placeholder="请输入卡号"
|
|
|
style="width: 400px"
|
|
|
type="textarea"
|
|
|
@@ -1064,6 +1080,7 @@
|
|
|
>
|
|
|
入住
|
|
|
</el-button>
|
|
|
+ <span style="color:#e8a849" v-if="checkAdvanceTime">( 提示:当前未到入住时间,是否前提办理入住?) </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -1093,12 +1110,11 @@
|
|
|
<div class="titles">
|
|
|
<img src="@/assets/icons/info.png" alt="" />
|
|
|
<span>订单信息 </span>
|
|
|
- >
|
|
|
</div>
|
|
|
<el-form-item label="入住订单 :" prop="order">
|
|
|
<div class="block">
|
|
|
<el-input
|
|
|
- v-model="payPriceRuleForm.order"
|
|
|
+ v-model.trim="payPriceRuleForm.order"
|
|
|
clearable
|
|
|
placeholder="请输入入住订单"
|
|
|
:disabled="true"
|
|
|
@@ -1109,7 +1125,7 @@
|
|
|
<el-form-item label="金额 :" prop="price">
|
|
|
<div class="block">
|
|
|
<el-input
|
|
|
- v-model="payPriceRuleForm.price"
|
|
|
+ v-model.trim="payPriceRuleForm.price"
|
|
|
clearable
|
|
|
placeholder="请输入金额"
|
|
|
:disabled="false"
|
|
|
@@ -1221,7 +1237,17 @@
|
|
|
>
|
|
|
<div class="middles">
|
|
|
<!-- <div class="content">确定退房吗?</div> -->
|
|
|
- <div>
|
|
|
+ <div v-if="checkLockFlag == 2">
|
|
|
+ <div style="color: #e6a23c; margin: 10px 0">
|
|
|
+ 提示:当前开锁方式为房卡时需要归还房卡!!!
|
|
|
+ </div>
|
|
|
+ <div class="content">是否归还了房卡?</div>
|
|
|
+ <el-radio-group v-model="checkOutForm.lockBack">
|
|
|
+ <el-radio :value="1" size="large">是</el-radio>
|
|
|
+ <el-radio :value="2" size="large">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="checkLockFlag == 5">
|
|
|
<div style="color: #e6a23c; margin: 10px 0">
|
|
|
提示:当前开锁方式为钥匙时需要归还钥匙!!!
|
|
|
</div>
|
|
|
@@ -1231,6 +1257,9 @@
|
|
|
<el-radio :value="2" size="large">否</el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
+ <div v-else>
|
|
|
+ <div class="content">确定是否退房?</div>
|
|
|
+ </div>
|
|
|
<div class="options">
|
|
|
<el-button
|
|
|
color="rgba(41, 109, 227, 1)"
|
|
|
@@ -1291,9 +1320,9 @@
|
|
|
<!-- <div class="title">备注 :</div> -->
|
|
|
<div class="remark">
|
|
|
<el-input
|
|
|
- v-model="remarkForm.remark"
|
|
|
+ v-model.trim="remarkForm.remark"
|
|
|
placeholder="请输入备注"
|
|
|
- style="width: 420px;margin:20px 0 10px 0"
|
|
|
+ style="width: 420px; margin: 20px 0 10px 0"
|
|
|
type="textarea"
|
|
|
rows="4"
|
|
|
>
|
|
|
@@ -1395,7 +1424,7 @@
|
|
|
>
|
|
|
<el-input
|
|
|
clearable
|
|
|
- v-model="roomChangeRuleForm.houseNumberNow"
|
|
|
+ v-model.trim="roomChangeRuleForm.houseNumberNow"
|
|
|
class="w-50 m-2"
|
|
|
style="width: 80px"
|
|
|
/>
|
|
|
@@ -1403,7 +1432,7 @@
|
|
|
|
|
|
<el-input
|
|
|
clearable
|
|
|
- v-model="roomChangeRuleForm.roomPriceNow"
|
|
|
+ v-model.trim="roomChangeRuleForm.roomPriceNow"
|
|
|
class="w-50 m-2"
|
|
|
style="width: 80px"
|
|
|
/>
|
|
|
@@ -1612,6 +1641,7 @@ const remarkForm = reactive({
|
|
|
// 入住(---------------------------------------------------------)
|
|
|
const orderDialogVisible = ref(false); // 控制添加员工弹窗
|
|
|
const changeIndex = ref(1);
|
|
|
+const checkAdvanceTime=ref(false); // 判断当前房间的入住时间和现在时间作对比,提前入住要提示
|
|
|
const checkInIndex = ref(3);
|
|
|
const checkInRef = ref();
|
|
|
const lockShow = ref(false);
|
|
|
@@ -1782,6 +1812,14 @@ const payPriceRuleForm = reactive({
|
|
|
id: "",
|
|
|
});
|
|
|
// 表单验证
|
|
|
+var priceRules = (rule, value, callback) => {
|
|
|
+ let reg=/^(0|[1-9]\d*)(\.\d{1,2})?$/
|
|
|
+ if (reg.test(value)) {
|
|
|
+ callback();
|
|
|
+ } else {
|
|
|
+ callback(new Error("金额必须大于等于0且不能超过两位小数"));
|
|
|
+ }
|
|
|
+};
|
|
|
const payPriceRules = reactive({
|
|
|
order: [{ required: true, message: "入住订单不能为空", trigger: "blur" }],
|
|
|
price: [
|
|
|
@@ -1790,6 +1828,7 @@ const payPriceRules = reactive({
|
|
|
message: "金额不能为空",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
+ { validator: priceRules, trigger: "blur" },
|
|
|
],
|
|
|
type: [
|
|
|
{
|
|
|
@@ -1861,6 +1900,9 @@ const schoolData = async () => {
|
|
|
};
|
|
|
// 房型列表数据
|
|
|
const roomTypeList = async () => {
|
|
|
+ const data = {
|
|
|
+ type: searchInput.houseType,
|
|
|
+ };
|
|
|
let res = await axios({
|
|
|
method: "get",
|
|
|
url: api.value + "/house/displayBar",
|
|
|
@@ -1868,6 +1910,7 @@ const roomTypeList = async () => {
|
|
|
token: sessionStorage.getItem("token"),
|
|
|
user_head: sessionStorage.getItem("user_head"),
|
|
|
},
|
|
|
+ params:data
|
|
|
});
|
|
|
console.log(res, "房型列表数据");
|
|
|
if (res.data.code == 200) {
|
|
|
@@ -2031,8 +2074,9 @@ const orderInfoClose = () => {
|
|
|
// 入住弹窗 (----------------------------------------------)
|
|
|
const orderliveRoom = async (row) => {
|
|
|
console.log(row);
|
|
|
+ checkAdvanceTime.value = false;// 重置判断是否前提办理入住
|
|
|
+ // 判断有没有绑定门锁 没有的话只能用钥匙
|
|
|
{
|
|
|
- // 判断有没有绑定门锁 没有的话只能用钥匙
|
|
|
let data = {
|
|
|
houseNumberId: row.houseNumberId,
|
|
|
};
|
|
|
@@ -2048,8 +2092,10 @@ const orderliveRoom = async (row) => {
|
|
|
console.log(res, "判断房间是否绑定了设备");
|
|
|
if (res.data.data.binging == 1) {
|
|
|
lockShow.value = true;
|
|
|
+ checkInIndex.value = 3;
|
|
|
} else {
|
|
|
lockShow.value = false;
|
|
|
+ checkInIndex.value = 5;
|
|
|
ElMessage({
|
|
|
type: "warning",
|
|
|
showClose: true,
|
|
|
@@ -2058,6 +2104,7 @@ const orderliveRoom = async (row) => {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
orderDialogVisible.value = true;
|
|
|
let data = {
|
|
|
orderNumber: row.orderNumber,
|
|
|
@@ -2086,6 +2133,14 @@ const orderliveRoom = async (row) => {
|
|
|
checkInRuleForm.houseNumberId = data.houseNumberId;
|
|
|
checkInRuleForm.orderNumber = data.orderNumber;
|
|
|
checkInRuleForm.forecastTime = data.reserveLiveTime;
|
|
|
+ let nowTime=dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ if(nowTime < checkInRuleForm.forecastTime){
|
|
|
+ checkAdvanceTime.value=true;
|
|
|
+ }
|
|
|
+ console.log(nowTime,'现在时间');
|
|
|
+ console.log(checkInRuleForm.forecastTime,'预抵日期');
|
|
|
+ console.log(nowTime < checkInRuleForm.forecastTime);
|
|
|
+
|
|
|
checkInRuleForm.preionizationTime = data.reserveLeaveTime;
|
|
|
checkInRuleForm.roomPrice = row.orderPrice;
|
|
|
checkInRuleForm.type = row.roomType;
|
|
|
@@ -2228,76 +2283,6 @@ const cancelAddFingerprint = () => {
|
|
|
// checkInRuleForm.pass = "";
|
|
|
ws.value.close();
|
|
|
};
|
|
|
-// 选择日期时间段
|
|
|
-const radioFingerprintChange = (value) => {
|
|
|
- // console.log(value);
|
|
|
- radioFingerprintDate.value = value;
|
|
|
- if (radioFingerprintDate.value == "一个星期") {
|
|
|
- checkInRuleForm.failureTime = dayjs(checkInRuleForm.effectiveTime)
|
|
|
- .add(1, "week")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "一个月") {
|
|
|
- checkInRuleForm.failureTime = dayjs(checkInRuleForm.effectiveTime)
|
|
|
- .add(1, "month")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "半年") {
|
|
|
- checkInRuleForm.failureTime = dayjs(checkInRuleForm.effectiveTime)
|
|
|
- .add(6, "month")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "一年") {
|
|
|
- checkInRuleForm.failureTime = dayjs(checkInRuleForm.effectiveTime)
|
|
|
- .add(1, "year")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "长期") {
|
|
|
- checkInRuleForm.failureTime = dayjs(checkInRuleForm.effectiveTime)
|
|
|
- .add(100, "year")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- }
|
|
|
-};
|
|
|
-// 改变生效日期
|
|
|
-const effectiveTimeChange = (val) => {
|
|
|
- console.log(val);
|
|
|
- if (radioFingerprintDate.value == "一个星期") {
|
|
|
- checkInRuleForm.failureTime = dayjs(val)
|
|
|
- .add(1, "week")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "一个月") {
|
|
|
- checkInRuleForm.failureTime = dayjs(val)
|
|
|
- .add(1, "month")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "半年") {
|
|
|
- checkInRuleForm.failureTime = dayjs(val)
|
|
|
- .add(6, "month")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "一年") {
|
|
|
- checkInRuleForm.failureTime = dayjs(val)
|
|
|
- .add(1, "year")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- } else if (radioFingerprintDate.value == "长期") {
|
|
|
- checkInRuleForm.failureTime = dayjs(val)
|
|
|
- .add(100, "year")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- }
|
|
|
-};
|
|
|
-// 改变失效日期
|
|
|
-const failureTimeChange = (val) => {
|
|
|
- console.log(val);
|
|
|
- radioFingerprintDate.value = "";
|
|
|
-};
|
|
|
-// 判断失效日期大于生效日期
|
|
|
-const endT = () => {
|
|
|
- if (checkInRuleForm.failureTime && checkInRuleForm.effectiveTime) {
|
|
|
- if (checkInRuleForm.failureTime < checkInRuleForm.effectiveTime) {
|
|
|
- ElMessage({
|
|
|
- type: "error",
|
|
|
- showClose: true,
|
|
|
- message: "失效日期应大于生效日期至少一天",
|
|
|
- center: true,
|
|
|
- });
|
|
|
- checkInRuleForm.failureTime = "";
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
|
|
|
const Card = () => {
|
|
|
var wsUrl = "ws://localhost:8181/";
|
|
|
@@ -2426,21 +2411,11 @@ const configPayPrice = lodash.debounce(async (formEl) => {
|
|
|
if (!formEl) return;
|
|
|
await formEl.validate(async (valid, fields) => {
|
|
|
if (valid) {
|
|
|
- let datassss = {
|
|
|
- orderNumber: payPriceRuleForm.order,
|
|
|
- payType: payPriceRuleForm.type,
|
|
|
- price: payPriceRuleForm.price,
|
|
|
- };
|
|
|
- let resssss = await axios({
|
|
|
- method: "post",
|
|
|
- url: api.value + "/house-order/payOrderPrice",
|
|
|
- headers: {
|
|
|
- token: sessionStorage.getItem("token"),
|
|
|
- user_head: sessionStorage.getItem("user_head"),
|
|
|
- },
|
|
|
- data: datassss,
|
|
|
- });
|
|
|
- if (resssss.data.code == 200) {
|
|
|
+ if (
|
|
|
+ checkInRuleForm.orderStatus == 2 ||
|
|
|
+ checkInRuleForm.orderStatus == 3
|
|
|
+ ) {
|
|
|
+ let liveTime=dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
let data = {
|
|
|
adminMenuId: sessionStorage.getItem("permissionSettingId"), //权限表id
|
|
|
adminId: sessionStorage.getItem("id"), //用户id
|
|
|
@@ -2450,7 +2425,8 @@ const configPayPrice = lodash.debounce(async (formEl) => {
|
|
|
// phone: checkInRuleForm.phone,
|
|
|
idCard: checkInRuleForm.checkIdcard,
|
|
|
// cardNumber: "", //有就填,没有就不填
|
|
|
- liveTime: checkInRuleForm.forecastTime,
|
|
|
+ // liveTime: checkInRuleForm.forecastTime,
|
|
|
+ liveTime: liveTime,
|
|
|
leaveTime: checkInRuleForm.preionizationTime,
|
|
|
payPrice: checkInRuleForm.roomPrice,
|
|
|
liveDay: checkInRuleForm.dayNum,
|
|
|
@@ -2475,12 +2451,12 @@ const configPayPrice = lodash.debounce(async (formEl) => {
|
|
|
if (checkInIndex.value == 1) {
|
|
|
passVisible.value = true;
|
|
|
let data = {
|
|
|
- houseNumberId: checkInRuleForm.houseNumberId,
|
|
|
- dateTime: checkInRuleForm.forecastTime,
|
|
|
+ orderNumber: checkInRuleForm.orderNumber,
|
|
|
+ adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
};
|
|
|
let res = await axios({
|
|
|
method: "get",
|
|
|
- url: api.value + "/house-number-state/particular",
|
|
|
+ url: api.value + "/house-order/particulars",
|
|
|
headers: {
|
|
|
token: sessionStorage.getItem("token"),
|
|
|
user_head: sessionStorage.getItem("user_head"),
|
|
|
@@ -2489,9 +2465,12 @@ const configPayPrice = lodash.debounce(async (formEl) => {
|
|
|
});
|
|
|
console.log(res, "点击房间查看详情");
|
|
|
if (res.data.code == 200) {
|
|
|
- passForm.pass = res.data.data.passWord;
|
|
|
- passForm.reserveLiveTime = res.data.data.liveTime;
|
|
|
- passForm.reserveLeaveTime = res.data.data.leaveTime;
|
|
|
+ passForm.pass = res.data.data.houseOrder.keyPassWord;
|
|
|
+ passForm.reserveLiveTime = dayjs(
|
|
|
+ res.data.data.houseOrder.liveTime
|
|
|
+ ).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ passForm.reserveLeaveTime =
|
|
|
+ res.data.data.houseOrder.reserveLeaveTime;
|
|
|
}
|
|
|
} else {
|
|
|
orderDialogVisible.value = false;
|
|
|
@@ -2513,15 +2492,108 @@ const configPayPrice = lodash.debounce(async (formEl) => {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- type: "error",
|
|
|
- showClose: true,
|
|
|
- message: resssss.data.message,
|
|
|
- center: true,
|
|
|
+ let datassss = {
|
|
|
+ orderNumber: payPriceRuleForm.order,
|
|
|
+ payType: payPriceRuleForm.type,
|
|
|
+ price: payPriceRuleForm.price,
|
|
|
+ };
|
|
|
+ let resssss = await axios({
|
|
|
+ method: "post",
|
|
|
+ url: api.value + "/house-order/payOrderPrice",
|
|
|
+ headers: {
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
+ },
|
|
|
+ data: datassss,
|
|
|
});
|
|
|
+ if (resssss.data.code == 200) {
|
|
|
+ let liveTime=dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ let data = {
|
|
|
+ adminMenuId: sessionStorage.getItem("permissionSettingId"), //权限表id
|
|
|
+ adminId: sessionStorage.getItem("id"), //用户id
|
|
|
+ houseId: checkInRuleForm.houseId,
|
|
|
+ houseNumberId: checkInRuleForm.houseNumberId,
|
|
|
+ liveName: checkInRuleForm.checkName,
|
|
|
+ // phone: checkInRuleForm.phone,
|
|
|
+ idCard: checkInRuleForm.checkIdcard,
|
|
|
+ // cardNumber: "", //有就填,没有就不填
|
|
|
+ // liveTime: checkInRuleForm.forecastTime,
|
|
|
+ liveTime: liveTime,
|
|
|
+ leaveTime: checkInRuleForm.preionizationTime,
|
|
|
+ payPrice: checkInRuleForm.roomPrice,
|
|
|
+ liveDay: checkInRuleForm.dayNum,
|
|
|
+ lockStatus: checkInIndex.value, //开锁方式 1:密码,2:卡片 3:指纹
|
|
|
+ fingerprint: checkInRuleForm.fingerprintNum, // 指纹特征码 有就填,没有就不填
|
|
|
+ idCardInformation: checkInRuleForm.icCard, // 卡片特征码 有就填,没有就不填
|
|
|
+ orderNumber: checkInRuleForm.orderNumber, //有订单就填,没有就不填
|
|
|
+ };
|
|
|
+ let res = await axios({
|
|
|
+ method: "post",
|
|
|
+ url: api.value + "/house-number-state/checkIdCard",
|
|
|
+ headers: {
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
+ },
|
|
|
+ data: data,
|
|
|
+ });
|
|
|
+ console.log(res, "确定入住");
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ getList();
|
|
|
+ // 支付入住成功弹窗查看密码弹窗
|
|
|
+ if (checkInIndex.value == 1) {
|
|
|
+ passVisible.value = true;
|
|
|
+ let data = {
|
|
|
+ orderNumber: checkInRuleForm.orderNumber,
|
|
|
+ adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
+ };
|
|
|
+ let res = await axios({
|
|
|
+ method: "get",
|
|
|
+ url: api.value + "/house-order/particulars",
|
|
|
+ headers: {
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
+ },
|
|
|
+ params: data,
|
|
|
+ });
|
|
|
+ console.log(res, "点击房间查看详情");
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ passForm.pass = res.data.data.houseOrder.keyPassWord;
|
|
|
+ passForm.reserveLiveTime = dayjs(
|
|
|
+ res.data.data.houseOrder.liveTime
|
|
|
+ ).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ passForm.reserveLeaveTime =
|
|
|
+ res.data.data.houseOrder.reserveLeaveTime;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ orderDialogVisible.value = false;
|
|
|
+ payPriceVisible.value = false;
|
|
|
+ paymentCodeVisible.value = false;
|
|
|
+ }
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ showClose: true,
|
|
|
+ message: resssss.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(resssss, "扫码支付显示二维码");
|
|
|
}
|
|
|
|
|
|
- console.log(resssss, "扫码支付显示二维码");
|
|
|
// let data = new FormData();
|
|
|
// data.append("outTradeNo", payPriceRuleForm.order);
|
|
|
// let res = await axios({
|
|
|
@@ -2598,6 +2670,7 @@ const paymentCodeClick = async () => {
|
|
|
if (ress.data.code == 200) {
|
|
|
if (ress.data.data.tradeState == "SUCCESS") {
|
|
|
successPay.value = true;
|
|
|
+ let liveTime=dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
let livedata = {
|
|
|
adminMenuId: sessionStorage.getItem("permissionSettingId"), //权限表id
|
|
|
adminId: sessionStorage.getItem("id"), //用户id
|
|
|
@@ -2607,7 +2680,8 @@ const paymentCodeClick = async () => {
|
|
|
// phone: checkInRuleForm.phone,
|
|
|
idCard: checkInRuleForm.checkIdcard,
|
|
|
// cardNumber: "", //有就填,没有就不填
|
|
|
- liveTime: checkInRuleForm.forecastTime,
|
|
|
+ // liveTime: checkInRuleForm.forecastTime,
|
|
|
+ liveTime: liveTime,
|
|
|
leaveTime: checkInRuleForm.preionizationTime,
|
|
|
payPrice: checkInRuleForm.roomPrice,
|
|
|
liveDay: checkInRuleForm.dayNum,
|
|
|
@@ -2634,12 +2708,12 @@ const paymentCodeClick = async () => {
|
|
|
if (checkInIndex.value == 1) {
|
|
|
passVisible.value = true;
|
|
|
let data = {
|
|
|
- houseNumberId: checkInRuleForm.houseNumberId,
|
|
|
- dateTime: checkInRuleForm.forecastTime,
|
|
|
+ orderNumber: checkInRuleForm.orderNumber,
|
|
|
+ adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
};
|
|
|
let res = await axios({
|
|
|
method: "get",
|
|
|
- url: api.value + "/house-number-state/particular",
|
|
|
+ url: api.value + "/house-order/particulars",
|
|
|
headers: {
|
|
|
token: sessionStorage.getItem("token"),
|
|
|
user_head: sessionStorage.getItem("user_head"),
|
|
|
@@ -2648,9 +2722,12 @@ const paymentCodeClick = async () => {
|
|
|
});
|
|
|
console.log(res, "点击房间查看详情");
|
|
|
if (res.data.code == 200) {
|
|
|
- passForm.pass = res.data.data.passWord;
|
|
|
- passForm.reserveLiveTime = res.data.data.liveTime;
|
|
|
- passForm.reserveLeaveTime = res.data.data.leaveTime;
|
|
|
+ passForm.pass = res.data.data.houseOrder.keyPassWord;
|
|
|
+ passForm.reserveLiveTime = dayjs(
|
|
|
+ res.data.data.houseOrder.liveTime
|
|
|
+ ).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ passForm.reserveLeaveTime =
|
|
|
+ res.data.data.houseOrder.reserveLeaveTime;
|
|
|
}
|
|
|
} else {
|
|
|
orderDialogVisible.value = false;
|
|
|
@@ -2699,8 +2776,13 @@ const lookPassword = (i) => {
|
|
|
console.log(i);
|
|
|
passVisible.value = true;
|
|
|
passForm.pass = i.keyPassWord;
|
|
|
- passForm.reserveLiveTime = i.liveTime;
|
|
|
- passForm.reserveLeaveTime = i.leaveTime;
|
|
|
+ if(i.orderStart==4){
|
|
|
+ passForm.reserveLiveTime = i.liveTime;
|
|
|
+ passForm.reserveLeaveTime = i.reserveLeaveTime;
|
|
|
+ }else if(i.orderStart==8){
|
|
|
+ passForm.reserveLiveTime = i.liveTime;
|
|
|
+ passForm.reserveLeaveTime = i.leaveTime;
|
|
|
+ }
|
|
|
};
|
|
|
const cancelPass = () => {
|
|
|
passVisible.value = false;
|
|
|
@@ -2782,10 +2864,10 @@ const orderRemarkClick = (row) => {
|
|
|
remarkForm.remark = row.remark;
|
|
|
remarkForm.id = row.id;
|
|
|
};
|
|
|
-const orderRemarkConfig=async ()=>{
|
|
|
+const orderRemarkConfig = async () => {
|
|
|
let datas = {
|
|
|
houseOrderId: remarkForm.id,
|
|
|
- remark:remarkForm.remark,
|
|
|
+ remark: remarkForm.remark,
|
|
|
};
|
|
|
let ress = await axios({
|
|
|
method: "get",
|
|
|
@@ -2814,7 +2896,7 @@ const orderRemarkConfig=async ()=>{
|
|
|
center: true,
|
|
|
});
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
const orderRemarkCancel = () => {
|
|
|
remarkVisible.value = false;
|
|
|
};
|
|
|
@@ -2981,39 +3063,84 @@ const searchBtn = lodash.debounce(async () => {
|
|
|
getList();
|
|
|
}, 300);
|
|
|
|
|
|
+// 改变房间类型改变房间名称
|
|
|
+const houseTypeChange=(val)=>{
|
|
|
+ searchInput.houseId=""
|
|
|
+ roomTypeList().then(res=>{
|
|
|
+ searchBtn()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
// 取消订单 (------------------------------------------------------)
|
|
|
const orderCancel = async (row) => {
|
|
|
console.log(row, "取消预定");
|
|
|
- let data = {
|
|
|
- orderNumber: row.orderNumber,
|
|
|
- houseNumberId: row.houseNumberId,
|
|
|
- adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
- };
|
|
|
- let res = await axios({
|
|
|
- method: "post",
|
|
|
- url: api.value + "/house-order/cancel",
|
|
|
- headers: {
|
|
|
- token: sessionStorage.getItem("token"),
|
|
|
- user_head: sessionStorage.getItem("user_head"),
|
|
|
- },
|
|
|
- data: data,
|
|
|
- });
|
|
|
- console.log(res, "取消预定");
|
|
|
- if (res.data.code == 200) {
|
|
|
- getList();
|
|
|
- ElMessage({
|
|
|
- type: "success",
|
|
|
- showClose: true,
|
|
|
- message: res.data.message,
|
|
|
- center: true,
|
|
|
+ // 待支付订单
|
|
|
+ if(row.orderStart==1){
|
|
|
+ let data = {
|
|
|
+ orderNumber: row.orderNumber,
|
|
|
+ houseNumberId: row.houseNumberId,
|
|
|
+ adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
+ };
|
|
|
+ let res = await axios({
|
|
|
+ method: "post",
|
|
|
+ url: api.value + "/house-order/cancel",
|
|
|
+ headers: {
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
+ },
|
|
|
+ data: data,
|
|
|
});
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- type: "error",
|
|
|
- showClose: true,
|
|
|
- message: res.data.message,
|
|
|
- center: true,
|
|
|
+ console.log(res, "取消预定");
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ getList();
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 已支付 未入住 订单
|
|
|
+ else if(row.orderStart==2 || row.orderStart==3){
|
|
|
+ let data = {
|
|
|
+ orderNumber: row.orderNumber,
|
|
|
+ houseNumberId: row.houseNumberId,
|
|
|
+ adminId: sessionStorage.getItem("permissionSettingId"),
|
|
|
+ };
|
|
|
+ let res = await axios({
|
|
|
+ method: "post",
|
|
|
+ url: api.value + "/house-order/payNotCheckIn",
|
|
|
+ headers: {
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
+ },
|
|
|
+ data: data,
|
|
|
});
|
|
|
+ console.log(res, "取消预定");
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ getList();
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ showClose: true,
|
|
|
+ message: res.data.message,
|
|
|
+ center: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
// 订单退款
|
|
|
@@ -4113,8 +4240,8 @@ onUnmounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 备注
|
|
|
- :deep(.remarkDialog) {
|
|
|
+ // 备注
|
|
|
+ :deep(.remarkDialog) {
|
|
|
/* // height: 600px; */
|
|
|
overflow: hidden;
|
|
|
border-radius: 11px;
|
|
|
@@ -4136,33 +4263,33 @@ onUnmounted(() => {
|
|
|
|
|
|
.el-dialog__body {
|
|
|
padding: 0px 20px 10px;
|
|
|
- .title{
|
|
|
- padding:15px 0;
|
|
|
+ .title {
|
|
|
+ padding: 15px 0;
|
|
|
}
|
|
|
.options {
|
|
|
- display: flex;
|
|
|
- flex-direction: row-reverse;
|
|
|
- align-items: center;
|
|
|
- margin: 10px 0;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+ align-items: center;
|
|
|
+ margin: 10px 0;
|
|
|
|
|
|
- .queding {
|
|
|
- margin-left: 20px;
|
|
|
- }
|
|
|
+ .queding {
|
|
|
+ margin-left: 20px;
|
|
|
}
|
|
|
- .item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin: 24px 0;
|
|
|
+ }
|
|
|
+ .item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin: 24px 0;
|
|
|
|
|
|
- .title {
|
|
|
- width: 100px;
|
|
|
- text-align: right;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
- .againPass {
|
|
|
- margin: 24px 0 40px 0;
|
|
|
+ .title {
|
|
|
+ width: 100px;
|
|
|
+ text-align: right;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
+ }
|
|
|
+ .againPass {
|
|
|
+ margin: 24px 0 40px 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// 确定入住 弹出支付页面弹窗
|