Merge branch 'master' of https://gitea.zianxin.com/zianxin/biz-pc-cloud-zax
build / task (16.x, npm, macOS-latest) (push) Canceled after 0s
build / task (16.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, npm, windows-latest) (push) Canceled after 0s
build / task (16.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (16.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (16.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (16.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, yarn, windows-latest) (push) Canceled after 0s
build / task (18.x, npm, macOS-latest) (push) Canceled after 0s
build / task (18.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, npm, windows-latest) (push) Canceled after 0s
build / task (18.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (18.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (18.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (18.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, yarn, windows-latest) (push) Canceled after 0s
build / task (20.x, npm, macOS-latest) (push) Canceled after 0s
build / task (20.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, npm, windows-latest) (push) Canceled after 0s
build / task (20.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (20.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (20.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (20.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, yarn, windows-latest) (push) Canceled after 0s
build / task (16.x, npm, macOS-latest) (push) Canceled after 0s
build / task (16.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, npm, windows-latest) (push) Canceled after 0s
build / task (16.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (16.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (16.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (16.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, yarn, windows-latest) (push) Canceled after 0s
build / task (18.x, npm, macOS-latest) (push) Canceled after 0s
build / task (18.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, npm, windows-latest) (push) Canceled after 0s
build / task (18.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (18.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (18.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (18.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, yarn, windows-latest) (push) Canceled after 0s
build / task (20.x, npm, macOS-latest) (push) Canceled after 0s
build / task (20.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, npm, windows-latest) (push) Canceled after 0s
build / task (20.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (20.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (20.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (20.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, yarn, windows-latest) (push) Canceled after 0s
This commit is contained in:
commit
080b348259
5 files changed
+86
-5
No files matched your search
Vendored
+3
@@ -3,6 +3,9 @@ import request from "/@/utils/request"
|
||||
/** 手动推送的稳定事件编码,独立于钱包和用餐策略矩阵。 */
|
||||
export const MANUAL_PUSH_EVENT_CODE = "MANUAL_PUSH"
|
||||
|
||||
/** 酒店有房通知事件编码,旁路入箱,不进入商户策略矩阵。 */
|
||||
export const HOTEL_ROOM_AVAILABLE_EVENT_CODE = "HOTEL_ROOM_AVAILABLE"
|
||||
|
||||
/** 单次手动推送允许选择的最大用户数,与服务端校验保持一致。 */
|
||||
export const MANUAL_PUSH_MAX_RECIPIENTS = 500
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ import type {
|
||||
AppRelationTypeOption,
|
||||
PushProviderStatus,
|
||||
} from "/@/api/thirdparty/app-message"
|
||||
import { MANUAL_PUSH_EVENT_CODE } from "/@/api/thirdparty/app-message"
|
||||
import { HOTEL_ROOM_AVAILABLE_EVENT_CODE, MANUAL_PUSH_EVENT_CODE } from "/@/api/thirdparty/app-message"
|
||||
import { useUserInfo } from "/@/stores/userInfo"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message.js"
|
||||
|
||||
@@ -336,8 +336,12 @@ const deliveryState = reactive<DeliveryState>({
|
||||
})
|
||||
/** 供应商尝试详情弹窗状态。 */
|
||||
const attemptDialog = reactive<AttemptDialogState>({ visible: false, loading: false, deliveryId: "", records: [] })
|
||||
/** 投递事件筛选包含手动推送,但不改变钱包、用餐的策略矩阵。 */
|
||||
const deliveryEventOptions = computed(() => [...businessState.policies, { eventCode: MANUAL_PUSH_EVENT_CODE, eventLabel: "手动推送" }])
|
||||
/** 投递事件筛选含手动推送/有房通知,但不改变钱包、用餐的策略矩阵。 */
|
||||
const deliveryEventOptions = computed(() => [
|
||||
...businessState.policies,
|
||||
{ eventCode: MANUAL_PUSH_EVENT_CODE, eventLabel: "手动推送" },
|
||||
{ eventCode: HOTEL_ROOM_AVAILABLE_EVENT_CODE, eventLabel: "有房通知" },
|
||||
])
|
||||
/** 业务配置请求序号,商户切换或刷新后不允许旧响应覆盖当前策略。 */
|
||||
let businessRequestSeq = 0
|
||||
/** 投递分页请求序号,切换筛选或手动提交后使旧响应失效。 */
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<el-table-column prop="bedType" label="床型" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="capacity" label="可住" width="70" />
|
||||
<el-table-column prop="roomNumber" label="房间数" width="80" />
|
||||
<el-table-column prop="floorInfo" label="楼层" min-width="90" show-overflow-tooltip />
|
||||
<el-table-column prop="areaSqm" label="面积(㎡)" width="90" />
|
||||
<el-table-column prop="windowType" label="窗型" width="100" />
|
||||
<el-table-column v-if="isLocal" label="操作" width="140" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button text type="primary" v-auth="'supermarket_smHotel_edit'" @click="openRoomDialog(scope.row)">编辑</el-button>
|
||||
@@ -347,7 +350,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 本地:房型 -->
|
||||
<el-dialog v-model="roomDialogVisible" :title="roomForm.id ? '编辑房型' : '新增房型'" width="480px" append-to-body destroy-on-close>
|
||||
<el-dialog v-model="roomDialogVisible" :title="roomForm.id ? '编辑房型' : '新增房型'" width="520px" append-to-body destroy-on-close>
|
||||
<el-form ref="roomFormRef" :model="roomForm" :rules="roomRules" label-width="100px">
|
||||
<el-form-item label="房型编码" prop="roomTypeCode">
|
||||
<el-input v-model="roomForm.roomTypeCode" :disabled="!!roomForm.id" maxlength="64" />
|
||||
@@ -364,6 +367,20 @@
|
||||
<el-form-item label="房间数" prop="roomNumber">
|
||||
<el-input-number v-model="roomForm.roomNumber" :min="0" :precision="0" class="w-full!" />
|
||||
</el-form-item>
|
||||
<el-form-item label="楼层" prop="floorInfo">
|
||||
<el-input v-model="roomForm.floorInfo" maxlength="64" placeholder="如 3-5层" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面积(㎡)" prop="areaSqm">
|
||||
<el-input-number v-model="roomForm.areaSqm" :min="0" :precision="2" :step="1" class="w-full!" />
|
||||
</el-form-item>
|
||||
<el-form-item label="窗型" prop="windowType">
|
||||
<el-select v-model="roomForm.windowType" clearable placeholder="请选择" class="w-full" allow-create filterable>
|
||||
<el-option label="有窗" value="有窗" />
|
||||
<el-option label="无窗" value="无窗" />
|
||||
<el-option label="部分有窗" value="部分有窗" />
|
||||
<el-option label="其他" value="其他" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="roomDialogVisible = false">取消</el-button>
|
||||
@@ -660,6 +677,9 @@ const openRoomDialog = (row?: any) => {
|
||||
bedType: row?.bedType || "",
|
||||
capacity: row?.capacity ?? 2,
|
||||
roomNumber: row?.roomNumber ?? 0,
|
||||
floorInfo: row?.floorInfo || "",
|
||||
areaSqm: row?.areaSqm ?? null,
|
||||
windowType: row?.windowType || "",
|
||||
})
|
||||
roomDialogVisible.value = true
|
||||
nextTick(() => roomFormRef.value?.clearValidate())
|
||||
|
||||
@@ -246,6 +246,9 @@
|
||||
<el-table-column prop="bedType" label="床型" min-width="100" />
|
||||
<el-table-column prop="capacity" label="可住" width="70" />
|
||||
<el-table-column prop="roomNumber" label="房间数" width="80" />
|
||||
<el-table-column prop="floorInfo" label="楼层" min-width="90" show-overflow-tooltip />
|
||||
<el-table-column prop="areaSqm" label="面积(㎡)" width="90" />
|
||||
<el-table-column prop="windowType" label="窗型" width="100" />
|
||||
<el-table-column label="操作" width="140" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" @click="openRoomDialog(row)">编辑</el-button>
|
||||
@@ -357,7 +360,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 房型弹窗 -->
|
||||
<el-dialog v-model="roomDialogVisible" :title="roomForm.id ? '编辑房型' : '新增房型'" width="480px" append-to-body destroy-on-close>
|
||||
<el-dialog v-model="roomDialogVisible" :title="roomForm.id ? '编辑房型' : '新增房型'" width="520px" append-to-body destroy-on-close>
|
||||
<el-form ref="roomFormRef" :model="roomForm" :rules="roomRules" label-width="100px">
|
||||
<el-form-item label="房型编码" prop="roomTypeCode">
|
||||
<el-input v-model="roomForm.roomTypeCode" :disabled="!!roomForm.id" maxlength="64" />
|
||||
@@ -374,6 +377,20 @@
|
||||
<el-form-item label="房间数" prop="roomNumber">
|
||||
<el-input-number v-model="roomForm.roomNumber" :min="0" :precision="0" class="w-full!" />
|
||||
</el-form-item>
|
||||
<el-form-item label="楼层" prop="floorInfo">
|
||||
<el-input v-model="roomForm.floorInfo" maxlength="64" placeholder="如 3-5层" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面积(㎡)" prop="areaSqm">
|
||||
<el-input-number v-model="roomForm.areaSqm" :min="0" :precision="2" :step="1" class="w-full!" />
|
||||
</el-form-item>
|
||||
<el-form-item label="窗型" prop="windowType">
|
||||
<el-select v-model="roomForm.windowType" clearable placeholder="请选择" class="w-full" allow-create filterable>
|
||||
<el-option label="有窗" value="有窗" />
|
||||
<el-option label="无窗" value="无窗" />
|
||||
<el-option label="部分有窗" value="部分有窗" />
|
||||
<el-option label="其他" value="其他" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="roomDialogVisible = false">取消</el-button>
|
||||
@@ -940,6 +957,9 @@ const openRoomDialog = (row?: any) => {
|
||||
bedType: row?.bedType || "",
|
||||
capacity: row?.capacity ?? 2,
|
||||
roomNumber: row?.roomNumber ?? 0,
|
||||
floorInfo: row?.floorInfo || "",
|
||||
areaSqm: row?.areaSqm ?? null,
|
||||
windowType: row?.windowType || "",
|
||||
})
|
||||
roomDialogVisible.value = true
|
||||
nextTick(() => roomFormRef.value?.clearValidate())
|
||||
|
||||
@@ -118,11 +118,26 @@
|
||||
{{ dataSourceText(scope.row.hotelDataSource) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deptName" label="部门" min-width="140" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ scope.row.deptName || (scope.row.deptId != null ? scope.row.deptId : "-") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入住/离店" min-width="170">
|
||||
<template #default="scope">
|
||||
{{ scope.row.checkInDate || "-" }} ~ {{ scope.row.checkOutDate || "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总间数" width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ formatRoomCount(scope.row.count) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总晚数" width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNightCount(scope.row.checkInDate, scope.row.checkOutDate) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sellAmount" label="金额" width="90" align="right">
|
||||
<template #default="scope">
|
||||
{{ formatAmount(scope.row.sellAmount) }}
|
||||
@@ -254,6 +269,9 @@
|
||||
</div>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="酒店名称" :span="2">{{ detailHotel.hotelName || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="归属部门" :span="2">
|
||||
{{ detailHotel.deptName || (detailHotel.deptId != null ? detailHotel.deptId : "-") }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="酒店编码">{{ detailHotel.hotelCode || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="集团编码">{{ detailHotel.groupCode || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数据来源">
|
||||
@@ -600,6 +618,22 @@ const dataSourceText = (ds?: string) => {
|
||||
return v
|
||||
}
|
||||
|
||||
/** 订单总间数(count) */
|
||||
const formatRoomCount = (count?: number | string | null) => {
|
||||
const n = Number(count)
|
||||
if (!Number.isFinite(n) || n < 1) return 1
|
||||
return Math.floor(n)
|
||||
}
|
||||
|
||||
/** 总晚数 = 离店日 − 入住日(半开区间) */
|
||||
const formatNightCount = (checkIn?: string | null, checkOut?: string | null) => {
|
||||
if (!checkIn || !checkOut) return "-"
|
||||
const inMs = Date.parse(String(checkIn).replace(/-/g, "/"))
|
||||
const outMs = Date.parse(String(checkOut).replace(/-/g, "/"))
|
||||
if (!Number.isFinite(inMs) || !Number.isFinite(outMs) || outMs <= inMs) return "-"
|
||||
return Math.round((outMs - inMs) / 86400000)
|
||||
}
|
||||
|
||||
const upstreamActionText = (action?: string) => {
|
||||
const map: Record<string, string> = {
|
||||
CREATE: "上游下单",
|
||||
|
||||
Reference in new issue
Block a user