Merge remote-tracking branch 'origin/master'

This commit is contained in:
zjf committed 2025-03-21 17:50:35 +08:00
commit d020ea2da5
8 files changed
+59 -20

No files matched your search

+2
View File
@@ -30,3 +30,5 @@ pnpm-debug.log*
package-lock.json
yarn.lock
pnpm-lock.yaml
.env.development
+10 -3
View File
@@ -1,6 +1,6 @@
<template>
<el-dialog :title="dataForm.deptId ? $t('common.editBtn') : $t('common.addBtn')" v-model="visible" width="600">
<el-form ref="deptDialogFormRef" :model="dataForm" label-width="90px" :rules="dataRules" v-loading="loading">
<el-form ref="deptDialogFormRef" :model="dataForm" label-width="110px" :rules="dataRules" v-loading="loading">
<el-form-item :label="$t('sysdept.parentId')" prop="parentId">
<el-tree-select
v-model="dataForm.parentId"
@@ -21,6 +21,9 @@
<select-hard-group v-model="dataForm.hardGroupId" />
</el-form-item>
</el-col>
<el-form-item v-if="useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')" label="是否同步到正元" prop="isSyncZy">
<el-switch v-model="dataForm.isSyncZy" />
</el-form-item>
<el-form-item :label="$t('sysdept.sortOrder')" prop="sortOrder">
<el-input-number v-model="dataForm.sortOrder" :placeholder="$t('sysdept.inputsortOrderTip')" clearable />
</el-form-item>
@@ -39,6 +42,7 @@ import { useI18n } from "vue-i18n"
import { getObj, deptTree, addObj, putObj } from "/@/api/admin/dept"
import { useMessage } from "/@/hooks/message"
import { rule } from "/@/utils/validate"
import { useUserInfo } from "/@/stores/userInfo"
// 定义子组件向父组件传值/事件
const emit = defineEmits(["refresh"])
@@ -49,6 +53,7 @@ const dataForm = reactive({
parentId: "",
deptId: "",
name: "",
isSyncZy: false,
sortOrder: 9999,
hardGroupId: "",
})
@@ -78,7 +83,7 @@ const openDialog = (type: string, id: string) => {
if (type === "edit") {
getObj(id)
.then((res) => {
Object.assign(dataForm, res.data)
Object.assign(dataForm, res.data, { isSyncZy: res.data.isSyncZy == "1" ? true : false })
})
.catch((err) => {
useMessage().error(err.msg)
@@ -95,7 +100,9 @@ const onSubmit = async () => {
try {
loading.value = true
dataForm.deptId ? await putObj(dataForm) : await addObj(dataForm)
dataForm.deptId
? await putObj({ ...dataForm, isSyncZy: dataForm.isSyncZy ? "1" : "0" })
: await addObj({ ...dataForm, isSyncZy: dataForm.isSyncZy ? "1" : "0" })
useMessage().success(t(dataForm.deptId ? "common.editSuccessText" : "common.addSuccessText"))
visible.value = false
emit("refresh")
+8 -1
View File
@@ -148,7 +148,14 @@
>
人脸管理
</el-button>
<el-button type="primary" size="small" v-if="row.isCheckUser" link icon="VideoPlay" @click="deal(row)">
<el-button
type="primary"
size="small"
v-if="row.isCheckUser && row.processStatus != '2'"
link
icon="VideoPlay"
@click="deal(row)"
>
开始处理
</el-button>
<!-- 删除用户 -->
@@ -58,7 +58,15 @@
<el-table-column label="审核时间" prop="processTime" show-overflow-tooltip min-width="160" />
<el-table-column label="操作" min-width="160" fixed="right">
<template #default="{ row }">
<el-button type="primary" v-if="row.isCheckUser" size="small" link icon="VideoPlay" @click="deal(row)">开始处理</el-button>
<el-button
type="primary"
v-if="row.isCheckUser && row.processStatus != '2'"
size="small"
link
icon="VideoPlay"
@click="deal(row)"
>开始处理</el-button
>
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" icon="Delete" @click="delFace(row)">删除</el-button>
</template>
</el-table-column>
+2 -3
View File
@@ -74,7 +74,7 @@
class="group relative flex flex-col overflow-hidden rounded-xl border border-[#4a88ff]/10 bg-[#1d2b45]/60 transition-all duration-500 hover:scale-[1.02] hover:-translate-y-1 hover:bg-[#1d2b45]/80 hover:shadow-[0_0_20px_rgba(74,136,255,0.1)]"
>
<div class="relative h-32 overflow-hidden">
<div class="absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-[#1d2b45]/90"></div>
<div class="absolute inset-0 bg-gradient-to-b from-transparent"></div>
<img
:src="imageBaseUrl + dish.picUrl"
:alt="dish.name"
@@ -117,7 +117,7 @@
class="group relative flex flex-col overflow-hidden rounded-xl border border-[#4a88ff]/10 bg-[#1d2b45]/60 transition-all duration-500 hover:scale-[1.02] hover:-translate-y-1 hover:bg-[#1d2b45]/80 hover:shadow-[0_0_20px_rgba(74,136,255,0.1)]"
>
<div class="relative h-32 overflow-hidden">
<div class="absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-[#1d2b45]/90"></div>
<div class="absolute inset-0 bg-gradient-to-b from-transparent"></div>
<img
:src="imageBaseUrl + dish.picUrl"
:alt="dish.name"
@@ -174,7 +174,6 @@ import { selectTimeFoodApi } from "/@/api/canteen/canteenDailyMenu"
import { getAllSimple as getCanteenCategory } from "/@/api/canteen/canteenCategory"
import { useDict } from "/@/hooks/dict"
import { displayPrice } from "/@/utils/formatMoney"
import { VideoPause, VideoPlay } from "@element-plus/icons-vue"
const { daily_menu } = useDict("daily_menu")
const containerRef = ref<HTMLElement | null>(null)
+7 -10
View File
@@ -14,7 +14,7 @@
<template #default>
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
<el-row>
<el-form-item style="width: 200px" label="用餐时间段" prop="hourType">
<el-form-item style="width: 200px" label="用餐时间段" prop="hourType" v-if="false">
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
</el-form-item>
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
@@ -31,7 +31,7 @@
<right-toolbar
:search="false"
v-model:showSearch="showSearch"
:export="'hard_hardTotal_export_sb'"
:export="'hard_hardTotal_export_payType'"
@exportExcel="exportExcel"
class="ml10 mr20"
style="float: right"
@@ -54,10 +54,7 @@
<el-table-column type="index" label="#" width="50" />
<el-table-column label="支付方式" align="center">
<template #default="{ row }">
<div class="flex flex-row items-center justify-center">
<div class="mr-2">{{ row.hardName }}</div>
<dict-tag :options="hard_type" :value="row.hardType" />
</div>
<dict-tag :options="hard_pay_type" :value="row.payType" />
</template>
</el-table-column>
<el-table-column label="流水金额" align="center" prop="totalPayPrice">
@@ -70,7 +67,7 @@
<el-table-column label="流水次数" align="center" prop="totalPayCount">
<template #default="{ row }">
<span class="color-primary">
{{ row.totalPayCount }}
{{ row.totalPayCount || 0 }}
</span>
</template>
</el-table-column>
@@ -84,7 +81,7 @@
<el-table-column label="退款次数" align="center" prop="totalRefundCount">
<template #default="{ row }">
<span class="color-danger">
{{ row.totalRefundCount }}
{{ row.totalRefundCount || 0 }}
</span>
</template>
</el-table-column>
@@ -98,7 +95,7 @@
<el-table-column label="实际消费次数" align="center" prop="totalProfitCount">
<template #default="{ row }">
<span class="color-success">
{{ row.totalProfitCount }}
{{ row.totalProfitCount || 0 }}
</span>
</template>
</el-table-column>
@@ -125,7 +122,7 @@ const multiple = ref(true)
const draggableDepTreeRef = ref() // 树组件ref引用
// 定义查询字典
const { hard_type } = useDict("hard_type")
const { hard_pay_type } = useDict("hard_pay_type")
const state: BasicTableProps = reactive<BasicTableProps>({
isPage: false,
+11 -1
View File
@@ -1,6 +1,6 @@
<template>
<el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable>
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="90px" v-loading="loading">
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="110px" v-loading="loading">
<el-row :gutter="24">
<el-col :span="24" class="mb20">
<el-form-item label="商户名" prop="name">
@@ -31,6 +31,12 @@
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
<el-form-item v-if="useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')" label="是否同步到正元" prop="isSyncZy">
<el-switch v-model="form.isSyncZy" />
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="商户logo" prop="logoPic">
<upload-img v-model:imageUrl="form.logoPic" />
@@ -108,6 +114,7 @@ import { useDict } from "/@/hooks/dict"
import { useMessage } from "/@/hooks/message"
import { getObj, addObj, putObj } from "/@/api/wallet/mch-manage"
const emit = defineEmits(["refresh"])
import { useUserInfo } from "/@/stores/userInfo"
// 定义变量内容
const dataFormRef = ref()
@@ -126,6 +133,7 @@ const form = reactive({
logoPic: "",
collectMoneyCode: "",
swiperPic: "",
isSyncZy: false,
phone: "",
businessTime: "",
address: "",
@@ -175,6 +183,7 @@ const onSubmit = async () => {
if (!valid) return false
const _pa = {
...form,
isSyncZy: form.isSyncZy ? "1" : "0",
types: form.merchantType,
jobTime: (jobTime.morning?.join("-") || "") + "," + (jobTime.noon?.join("-") || "") + "," + (jobTime.evening?.join("-") || ""),
}
@@ -201,6 +210,7 @@ const getmerchantInfoData = async (id: string) => {
const resJobTime = res.data.jobTime && regex.test(res.data.jobTime) ? res.data.jobTime.split(",") : []
Object.assign(form, res.data, {
merchantType: res.data.types,
isSyncZy: res.data.isSyncZy == "1" ? true : false,
})
jobTime.morning = resJobTime[0]?.split("-") ?? []
jobTime.noon = resJobTime[1]?.split("-") ?? []
+10 -1
View File
@@ -57,6 +57,12 @@
</div>
</template>
</el-table-column>
<el-table-column prop="isSyncZy" label="同步正元" min-width="90">
<template #default="{ row }">
<el-tag v-if="row.isSyncZy == '1'" type="primary">是</el-tag>
<el-tag v-if="row.isSyncZy == '0'" type="info">否</el-tag>
</template>
</el-table-column>
<el-table-column prop="walletTypeUniqueCode" width="200" label="支付默认钱包">
<template #default="{ row }">
<div class="flex items-center justify-center">
@@ -143,12 +149,15 @@ const resetQuery = () => {
const refreshQrcode = async (row: any) => {
try {
await useMessageBox().confirm("是否重新生成正元二维码")
} catch (e) {
return
}
try {
await mchManangeApi.refreshQrcode({ mchId: row.id })
getDataList()
useMessage().success("生成成功")
} catch (e) {
useMessage().error("生成失败")
return
}
}