Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-pc-cloud
This commit is contained in:
commit
9969dc2b41
24 files changed
+1399
-79
No files matched your search
+1
-1
@@ -17,4 +17,4 @@ VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
|
||||
|
||||
# 代码生成服务地址
|
||||
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
|
||||
VITE_GEN_PROXY_PATH = http://127.0.0.1:5003
|
||||
+4
-4
@@ -8,18 +8,18 @@ VITE_OPEN = true
|
||||
ENV = 'development'
|
||||
|
||||
# ADMIN 服务地址
|
||||
VITE_ADMIN_PROXY_PATH = http://47.96.250.9:8089/api/ # 测试线上
|
||||
# VITE_ADMIN_PROXY_PATH = http://47.96.250.9:8089/api/ # 测试线上
|
||||
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
|
||||
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
|
||||
# VITE_ADMIN_PROXY_PATH = http://192.168.101.64:9999/ # 邓-本地
|
||||
VITE_ADMIN_PROXY_PATH = http://192.168.101.64:9999/ # 邓-本地
|
||||
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
|
||||
|
||||
# 图片访问基础地址
|
||||
# VITE_IMAGE_BASE_PATH = http://47.96.250.9:8089/api # 测试线上
|
||||
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
|
||||
# VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
# VITE_IMAGE_BASE_PATH = http://192.168.101.64:9999 # 邓-本地
|
||||
VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
||||
VITE_IMAGE_BASE_PATH = http://192.168.101.64:9999 # 邓-本地
|
||||
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
||||
|
||||
# 代码生成服务地址
|
||||
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
|
||||
@@ -20,6 +20,18 @@ export function pageListSb(query?: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pagePayType(query?: any) {
|
||||
return request({
|
||||
url: "/hard/hard-total/page-list-payType",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageListCs(query?: any) {
|
||||
return request({
|
||||
url: "/hard/hard-total/page-list-cs",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/integrated/lostAndFound/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/integrated/lostAndFound',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/integrated/lostAndFound/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/integrated/lostAndFound',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/integrated/lostAndFound',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/integrated/maintenanceOrder/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/integrated/maintenanceOrder',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/integrated/maintenanceOrder/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/integrated/maintenanceOrder',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/integrated/maintenanceOrder',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
// 刷新商户二维码
|
||||
export function refreshQrcode(query?: Object) {
|
||||
return request({
|
||||
url: "/wallet/mch-manage/refresh-qrcode",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function select(query?: Object) {
|
||||
return request({
|
||||
url: "/wallet/mch-manage/select",
|
||||
|
||||
@@ -12,6 +12,18 @@ export function pageCz(query?: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pageJz(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-jz",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function pageXf(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-xf",
|
||||
|
||||
@@ -57,16 +57,13 @@
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="boxesId" label="包厢Id" show-overflow-tooltip />
|
||||
<el-table-column prop="bookingId" label="预约id" show-overflow-tooltip />
|
||||
<el-table-column prop="status" label="状态 0空闲 1已使用" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="booking_status" :value="scope.row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户id" show-overflow-tooltip />
|
||||
<el-table-column prop="bxDate" label="格式为 YYYY-MM-DD" show-overflow-tooltip />
|
||||
<el-table-column prop="hour" label="时间" show-overflow-tooltip />
|
||||
<el-table-column prop="hourIndex" label="时间索引(0-24)" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="包厢Id" prop="boxesId">
|
||||
<el-form-item label="包厢" prop="boxesId">
|
||||
<el-input v-model="form.boxesId" placeholder="请输入包厢Id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="包厢Id" prop="boxesId">
|
||||
<el-select v-model="state.queryForm.boxesId" placeholder="请选择包厢Id">
|
||||
<el-option label="??" :value="0" />
|
||||
<el-option label="??" :value="1" />
|
||||
</el-select>
|
||||
<el-form-item label="包厢" prop="boxesName">
|
||||
<el-input placeholder="请输入包厢" v-model="state.queryForm.boxesName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input placeholder="请输入用户id" v-model="state.queryForm.userId" />
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<el-input placeholder="请输入用户" v-model="state.queryForm.userName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||
@@ -19,29 +16,29 @@
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'canteen_boxesBooking_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'canteen_boxesBooking_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删 除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'canteen_boxesBooking_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
<!-- <div class="mb8" style="width: 100%">-->
|
||||
<!-- <el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'canteen_boxesBooking_add'">-->
|
||||
<!-- 新 增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- plain-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- icon="Delete"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- v-auth="'canteen_boxesBooking_del'"-->
|
||||
<!-- @click="handleDelete(selectObjs)"-->
|
||||
<!-- >-->
|
||||
<!-- 删 除-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <right-toolbar-->
|
||||
<!-- v-model:showSearch="showSearch"-->
|
||||
<!-- :export="'canteen_boxesBooking_export'"-->
|
||||
<!-- @exportExcel="exportExcel"-->
|
||||
<!-- class="ml10 mr20"-->
|
||||
<!-- style="float: right"-->
|
||||
<!-- @queryTable="getDataList"-->
|
||||
<!-- ></right-toolbar>-->
|
||||
<!-- </div>-->
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
@@ -54,22 +51,16 @@
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="boxesId" label="包厢Id" show-overflow-tooltip />
|
||||
<el-table-column prop="boxesName" label="包厢名称" show-overflow-tooltip />
|
||||
<el-table-column prop="startTime" label="开始时间" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column prop="endTime" label="结束时间" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column prop="checkUserId" label="审核人id" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="checkStatus" label="1审核中 2通过 3驳回 4" show-overflow-tooltip min-width="160">
|
||||
<el-table-column prop="checkStatus" label="审核状态" show-overflow-tooltip min-width="160">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="check_status" :value="scope.row.checkStatus"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creator" label="创建人" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="updater" label="更新人" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="deleted" label="是否删除" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="bookingDate" label="预约日期" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column prop="userId" label="用户id" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="status" label="预约状态(0 预约成功,1预约失败 2取消预约 )" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column prop="totalPrice" label="总价/单位分" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="userName" label="用户" show-overflow-tooltip min-width="100" />
|
||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
|
||||
@@ -139,7 +139,7 @@ onMounted(() => {
|
||||
store.step1.remark = data.remark
|
||||
store.step1.groupId = data.groupId
|
||||
store.step1.businessKey = data.businessKey
|
||||
|
||||
// store.step1.formDetail = data.formDetail
|
||||
store.setStep2(JSON.parse(data.formItems))
|
||||
step3NodeConfig = JSON.parse(data.process)
|
||||
})
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
import type { FormRule, DragRule } from './types';
|
||||
import other, {generateUUID} from "/@/utils/other";
|
||||
|
||||
// Create a map of rule creators
|
||||
const ruleCreators: Record<string, () => DragRule> = {
|
||||
selectUser: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-table-form2',
|
||||
label: '人员',
|
||||
name: 'SelectUser',
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'OrgSelector',
|
||||
field: 'SelectUser' + other.getNonDuplicateID(),
|
||||
title: '人员',
|
||||
$required: true,
|
||||
props: {
|
||||
type: 'user',
|
||||
},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'switch',
|
||||
title: '多选',
|
||||
field: 'multiple',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '禁用',
|
||||
field: 'disabled',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '选择自己',
|
||||
field: 'selectSelf',
|
||||
value: true,
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
selectDept: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-group',
|
||||
label: '部门',
|
||||
name: 'selectDept',
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'OrgSelector',
|
||||
field: 'selectDept' + other.getNonDuplicateID(),
|
||||
title: '部门',
|
||||
$required: true,
|
||||
props: {
|
||||
type: 'dept',
|
||||
},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'switch',
|
||||
title: '多选',
|
||||
field: 'multiple',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '禁用',
|
||||
field: 'disabled',
|
||||
value: false,
|
||||
}
|
||||
];
|
||||
},
|
||||
}),
|
||||
uploadFile: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-folder',
|
||||
label: '上传',
|
||||
name: 'UploadFile'+ other.getNonDuplicateID(),
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'UploadFile',
|
||||
field: 'UploadFile',
|
||||
title: '文件上传',
|
||||
$required: true,
|
||||
props: {},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'input',
|
||||
title: '上传地址',
|
||||
field: 'uploadFileUrl',
|
||||
value: '/admin/sys-file/upload',
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
title: '数量限制',
|
||||
field: 'limit',
|
||||
value: 5,
|
||||
props: {
|
||||
min: 1,
|
||||
max: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
title: '大小限制(MB)',
|
||||
field: 'fileSize',
|
||||
value: 5,
|
||||
props: {
|
||||
min: 1,
|
||||
max: 500,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
title: '上传类型',
|
||||
field: 'type',
|
||||
value: 'default',
|
||||
options: [
|
||||
{ label: '默认', value: 'default' },
|
||||
{ label: '简单', value: 'simple' },
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
title: '上传目录',
|
||||
field: 'dir',
|
||||
value: '',
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '自动上传',
|
||||
field: 'autoUpload',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '显示提示',
|
||||
field: 'isShowTip',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '禁用',
|
||||
field: 'disabled',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
title: '文件类型',
|
||||
field: 'fileType',
|
||||
value: ['png', 'jpg', 'jpeg', 'doc', 'xls', 'ppt', 'txt', 'pdf', 'docx', 'xlsx', 'pptx'],
|
||||
props: {
|
||||
multiple: true,
|
||||
},
|
||||
options: [
|
||||
{ label: 'PNG', value: 'png' },
|
||||
{ label: 'JPG', value: 'jpg' },
|
||||
{ label: 'JPEG', value: 'jpeg' },
|
||||
{ label: 'DOC', value: 'doc' },
|
||||
{ label: 'DOCX', value: 'docx' },
|
||||
{ label: 'XLS', value: 'xls' },
|
||||
{ label: 'XLSX', value: 'xlsx' },
|
||||
{ label: 'PPT', value: 'ppt' },
|
||||
{ label: 'PPTX', value: 'pptx' },
|
||||
{ label: 'PDF', value: 'pdf' },
|
||||
{ label: 'TXT', value: 'txt' },
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
chinaArea: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-subform',
|
||||
label: '地区选择',
|
||||
name: 'ChinaArea',
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'ChinaArea',
|
||||
field: 'ChinaArea' + other.getNonDuplicateID(),
|
||||
title: '地区选择',
|
||||
$required: true,
|
||||
props: {},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'number',
|
||||
title: '层级',
|
||||
field: 'type',
|
||||
value: 4,
|
||||
props: {
|
||||
min: 1,
|
||||
max: 4,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '禁用',
|
||||
field: 'disabled',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '子级必选',
|
||||
field: 'plus',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '懒加载',
|
||||
field: 'lazy',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
sign: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-edit',
|
||||
label: '签名',
|
||||
name: 'Sign',
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'Sign',
|
||||
field: 'Sign'+ other.getNonDuplicateID(),
|
||||
title: '签名',
|
||||
$required: true,
|
||||
props: {},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'number',
|
||||
title: '宽度',
|
||||
field: 'width',
|
||||
value: 300,
|
||||
props: {
|
||||
min: 100,
|
||||
max: 1000,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
title: '高度',
|
||||
field: 'height',
|
||||
value: 150,
|
||||
props: {
|
||||
min: 50,
|
||||
max: 500,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'number',
|
||||
title: '线宽',
|
||||
field: 'lineWidth',
|
||||
value: 4,
|
||||
props: {
|
||||
min: 1,
|
||||
max: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'colorPicker',
|
||||
title: '线条颜色',
|
||||
field: 'lineColor',
|
||||
value: '#000000',
|
||||
},
|
||||
{
|
||||
type: 'colorPicker',
|
||||
title: '背景颜色',
|
||||
field: 'bgColor',
|
||||
value: '',
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '裁剪空白',
|
||||
field: 'isCrop',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '清除背景',
|
||||
field: 'isClearBgColor',
|
||||
value: true,
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
dictSelect: () => ({
|
||||
menu: 'biz',
|
||||
icon: 'icon-select',
|
||||
label: '字典选择',
|
||||
name: 'DictSelect' + other.getNonDuplicateID(),
|
||||
mask: true,
|
||||
rule() {
|
||||
return {
|
||||
type: 'DictSelect',
|
||||
field: 'DictSelect',
|
||||
title: '字典',
|
||||
$required: true,
|
||||
props: {},
|
||||
};
|
||||
},
|
||||
props() {
|
||||
return [
|
||||
{
|
||||
type: 'input',
|
||||
title: '字典类型',
|
||||
field: 'dictType',
|
||||
value: '',
|
||||
props: {
|
||||
placeholder: '请输入字典类型',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '多选',
|
||||
field: 'multiple',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '可清除',
|
||||
field: 'clearable',
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
type: 'switch',
|
||||
title: '禁用',
|
||||
field: 'disabled',
|
||||
value: false,
|
||||
},
|
||||
];
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
// Export all rules as an array
|
||||
export const rules: FormRule[] = Object.values(ruleCreators).map((creator) => creator());
|
||||
@@ -19,6 +19,9 @@
|
||||
<el-form-item :label="$t('flow.businessKey')" prop="businessKey">
|
||||
<el-input v-model="form.businessKey" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('flow.formDetail')" prop="formDetail">-->
|
||||
<!-- <el-input v-model="form.formDetail" :placeholder="$t('flow.formDetailTips')" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('flow.remark')" prop="remark">
|
||||
<el-input v-model="form.remark" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -51,6 +51,11 @@
|
||||
{{ row.businessKey }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="formDetail" :label="$t('flow.formDetail')" show-overflow-tooltip>-->
|
||||
<!-- <template #default="{ row }">-->
|
||||
<!-- {{ row.formDetail }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="createTime" :label="$t('flow.createTime')" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="rangeShow" :label="$t('flow.scopeOfUse')" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
|
||||
@@ -43,6 +43,8 @@ export default {
|
||||
defaultTip: '默认',
|
||||
servicePrefix: '服务前缀',
|
||||
servicePrefixTips: '请输入服务前缀',
|
||||
businessKey:'业务key'
|
||||
businessKey:'业务key',
|
||||
formDetail:'表单详情路由',
|
||||
formDetailTips:'请输入表单详情路由,例如 /admin/system/user/detail.vue'
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<formCreate
|
||||
:rule="rule"
|
||||
:option="options"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="emit('update:modelValue', $event)"
|
||||
:api="api"
|
||||
@update:api="emit('update:api', $event)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Api, Rule } from '@form-create/element-ui';
|
||||
|
||||
interface Props {
|
||||
rule: Rule;
|
||||
modelValue: any;
|
||||
api?: Api;
|
||||
submitBtn?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
rule: () => [],
|
||||
modelValue: () => ({}),
|
||||
api: undefined,
|
||||
submitBtn: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'update:api']);
|
||||
|
||||
// Default options
|
||||
const options = computed(() => ({
|
||||
submitBtn: props.submitBtn,
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.fc-form-row) {
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
|
||||
:deep(.el-col.el-col-24.fc-form-col) {
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,50 @@
|
||||
type FormItem = {
|
||||
field: string;
|
||||
props?: Record<string, any>;
|
||||
children?: FormItem[];
|
||||
hidden?: boolean;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export function applyPermissionsToItem(item: FormItem, formPerms: Record<string, string>): FormItem {
|
||||
// 如果权限为空,默认设置为只读 'R'
|
||||
const permission = formPerms?.[item.field] || 'E';
|
||||
|
||||
// 检查字段权限
|
||||
if (permission === 'R') {
|
||||
return {
|
||||
...item,
|
||||
props: {
|
||||
...(item.props || {}),
|
||||
disabled: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
if (permission === 'H') {
|
||||
return {
|
||||
...item,
|
||||
hidden: true,
|
||||
};
|
||||
}
|
||||
|
||||
// 如果是 'E' 或其他情况,返回原始item
|
||||
return item;
|
||||
}
|
||||
|
||||
export function processFormItemsWithPerms(items: FormItem[], formPerms: Record<string, string>): FormItem[] {
|
||||
return items.map((item) => {
|
||||
// 处理当前项的权限
|
||||
const processedItem = applyPermissionsToItem(item, formPerms);
|
||||
|
||||
// 如果有子项,递归处理子项的权限
|
||||
if (Array.isArray(item.children)) {
|
||||
return {
|
||||
...processedItem,
|
||||
children: processFormItemsWithPerms(item.children, formPerms),
|
||||
};
|
||||
}
|
||||
|
||||
return processedItem;
|
||||
});
|
||||
}
|
||||
@@ -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"
|
||||
@@ -52,15 +52,11 @@
|
||||
>
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column label="设备" align="center">
|
||||
<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="merchantName" />
|
||||
<el-table-column label="流水金额" align="center" prop="totalPayPrice">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
@@ -71,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>
|
||||
@@ -85,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>
|
||||
@@ -99,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>
|
||||
@@ -126,12 +122,12 @@ 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,
|
||||
queryForm: {},
|
||||
pageList: hardTotalApi.pageListSb,
|
||||
pageList: hardTotalApi.pagePayType,
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -139,7 +135,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, do
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/hard/hard-total/export-sb", Object.assign(state.queryForm), "设备交易记录.xlsx")
|
||||
downBlobFile("/hard/hard-total/export-payType", Object.assign(state.queryForm), "设备交易记录.xlsx")
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="发现地点" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入发现地点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="发现日期" prop="dateFound">
|
||||
<el-date-picker type="date" placeholder="请选择发现日期" v-model="form.dateFound" :value-format="dateStr"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="图片" prop="picUrl">
|
||||
<upload-img v-model="form.picUrl"></upload-img>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12" class="mb20">-->
|
||||
<!-- <el-form-item label="状态" prop="status">-->
|
||||
<!-- <el-input v-model="form.status" placeholder="请输入状态"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="描述" prop="description">
|
||||
<editor v-if="visible" v-model:get-html="form.description" placeholder="请输入描述"></editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="LostAndFoundDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '/@/api/integrated/lostAndFound'
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref();
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
const { lost_and_found_status } = useDict('lost_and_found_status')
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id:'',
|
||||
title: '',
|
||||
picUrl: '',
|
||||
sort: '',
|
||||
description: '',
|
||||
status: '',
|
||||
dateFound: '',
|
||||
location: '',
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
title: [{required: true, message: '标题不能为空', trigger: 'blur'}],
|
||||
sort: [{ validator: rule.number, trigger: 'blur' }],
|
||||
location: [{required: true, message: '发现地点不能为空', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ''
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
|
||||
// 获取lostAndFound信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getlostAndFoundData(id)
|
||||
}
|
||||
};
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||
if (!valid) return false;
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 初始化表单数据
|
||||
const getlostAndFoundData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id).then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
};
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="标题" prop="title" >
|
||||
<el-input placeholder="请输入标题" v-model="state.queryForm.title" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="state.queryForm.status" placeholder="请选择状态">
|
||||
<el-option :label="item.label" :value="item.value" v-for="(item, index) in lost_and_found_status" :key="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'integrated_lostAndFound_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||
v-auth="'integrated_lostAndFound_del'" @click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'integrated_lostAndFound_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip/>
|
||||
<el-table-column prop="picUrl" label="图片" show-overflow-tooltip/>
|
||||
<el-table-column prop="sort" label="排序" show-overflow-tooltip/>
|
||||
<el-table-column prop="status" label="状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="lost_and_found_status" :value="scope.row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dateFound" label="发现日期" show-overflow-tooltip/>
|
||||
<el-table-column prop="location" label="发现地点" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'integrated_lostAndFound_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'integrated_lostAndFound_del'" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemLostAndFound">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObjs } from "/@/api/integrated/lostAndFound";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
const { lost_and_found_status } = useDict('lost_and_found_status')
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList
|
||||
})
|
||||
|
||||
// table hook
|
||||
const {
|
||||
getDataList,
|
||||
currentChangeHandle,
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/integrated/lostAndFound/export', Object.assign(state.queryForm, { ids: selectObjs }), 'lostAndFound.xlsx')
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm('此操作将永久删除');
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await delObjs(ids);
|
||||
getDataList();
|
||||
useMessage().success('删除成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="工单紧急层度" prop="urgency">
|
||||
<el-select v-model="form.urgency" placeholder="请选择工单紧急层度">
|
||||
<el-option :value="item.value" :label="item.label" v-for="(item, index) in maintenance_urgency" :key="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="图片" prop="picUrl">
|
||||
<upload-img v-model="form.picUrl"></upload-img>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="描述" prop="description">
|
||||
<editor v-if="visible" v-model:get-html="form.description" placeholder="请输入描述"></editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="发现日期" prop="dateFound">
|
||||
<el-date-picker type="date" placeholder="请选择发现日期" v-model="form.dateFound" :value-format="dateStr"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="发现地点" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入发现地点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择状态">
|
||||
<el-option :value="item.value" :label="item.label" v-for="(item, index) in maintenance_status" :key="index"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="MaintenanceOrderDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '/@/api/integrated/maintenanceOrder'
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref();
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
const { maintenance_urgency,maintenance_status } = useDict('maintenance_urgency','maintenance_status')
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id:'',
|
||||
title: '',
|
||||
picUrl: '',
|
||||
sort: '',
|
||||
description: '',
|
||||
status: '',
|
||||
dateFound: '',
|
||||
deptId: '',
|
||||
location: '',
|
||||
urgency: '',
|
||||
userId: '',
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
title: [{required: true, message: '标题不能为空', trigger: 'blur'}],
|
||||
sort: [{ validator: rule.number, trigger: 'blur' }],
|
||||
urgency: [{required: true, message: '工单紧急层度不能为空', trigger: 'blur'}],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ''
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
|
||||
// 获取maintenanceOrder信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getmaintenanceOrderData(id)
|
||||
}
|
||||
};
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||
if (!valid) return false;
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 初始化表单数据
|
||||
const getmaintenanceOrderData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id).then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
};
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="标题" prop="title" >
|
||||
<el-input placeholder="请输入标题" v-model="state.queryForm.title" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'integrated_maintenanceOrder_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary"
|
||||
v-auth="'integrated_maintenanceOrder_del'" @click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'integrated_maintenanceOrder_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right;"
|
||||
@queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="title" label="标题" show-overflow-tooltip/>
|
||||
<el-table-column prop="sort" label="排序" show-overflow-tooltip/>
|
||||
<el-table-column prop="status" label="状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="maintenance_status" :value="scope.row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dateFound" label="发现日期" show-overflow-tooltip/>
|
||||
<el-table-column prop="location" label="发现地点" show-overflow-tooltip/>
|
||||
<el-table-column prop="urgency" label="工单紧急层度" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="maintenance_urgency" :value="scope.row.urgency"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="上报人" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'integrated_maintenanceOrder_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'integrated_maintenanceOrder_del'" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemMaintenanceOrder">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObjs } from "/@/api/integrated/maintenanceOrder";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
const { maintenance_urgency,maintenance_status } = useDict('maintenance_urgency','maintenance_status')
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList
|
||||
})
|
||||
|
||||
// table hook
|
||||
const {
|
||||
getDataList,
|
||||
currentChangeHandle,
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/integrated/maintenanceOrder/export', Object.assign(state.queryForm, { ids: selectObjs }), 'maintenanceOrder.xlsx')
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm('此操作将永久删除');
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await delObjs(ids);
|
||||
getDataList();
|
||||
useMessage().success('删除成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -77,23 +77,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip :min-width="160" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="setting"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_mchManage_setting'"
|
||||
@click="settingDialogRef.openDialog(scope.row.id)"
|
||||
>
|
||||
<el-table-column label="操作" min-width="300">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="RefreshRight" text type="primary" v-auth="'wallet_mchManage_refresh_qrcode'" @click="refreshQrcode(row)">
|
||||
刷新二维码
|
||||
</el-button>
|
||||
<el-button icon="setting" text type="primary" v-auth="'wallet_mchManage_setting'" @click="settingDialogRef.openDialog(row.id)">
|
||||
配置
|
||||
</el-button>
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_mchManage_edit'" @click="formDialogRef.openDialog(scope.row.id)">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_mchManage_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_mchManage_del'" @click="handleDelete([scope.row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_mchManage_del'" @click="handleDelete([row.id])"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -110,7 +105,7 @@
|
||||
|
||||
<script setup lang="ts" name="MchManage">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { pageJoin, delObjs } from "/@/api/wallet/mch-manage"
|
||||
import * as mchManangeApi from "/@/api/wallet/mch-manage"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import FormDialog from "./form.vue"
|
||||
@@ -129,7 +124,7 @@ const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: pageJoin,
|
||||
pageList: mchManangeApi.pageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -144,6 +139,22 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 重新生成正元二位啊吗
|
||||
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("生成失败")
|
||||
}
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/canteen/merchantInfo/export", Object.assign(state.queryForm, { ids: selectObjs }), "商户管理.xlsx")
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<DraggableDepTree
|
||||
ref="draggableDepTreeRef"
|
||||
placeholder="请输入部门名称"
|
||||
:show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode"
|
||||
switch-inactive-text="包含"
|
||||
switch-active-text="不包含"
|
||||
:defaultTreeWidth="20"
|
||||
:nodeClickable="false"
|
||||
>
|
||||
<template #default>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 300px" label="用户" prop="userId">
|
||||
<select-user v-model="state.queryForm.userId" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 200px" label="充值方式" prop="bizType">
|
||||
<dict-select v-model="state.queryForm.bizType" dict-code="wallet_biz" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="消费时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t("common.queryBtn") }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
{{ $t("common.resetBtn") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar
|
||||
:search="false"
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_walletTransaction_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="用户" show-overflow-tooltip />
|
||||
<el-table-column prop="userAvatar" label="头像" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" show-overflow-tooltip />
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="饭卡类型">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center justify-center">
|
||||
<div class="color-primary">{{ row.walletTypeName }}</div>
|
||||
<div class="flex items-center just ml5">
|
||||
<dict-tag :options="wallet_type" :value="row.walletTypeUniqueCode" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="wallet_biz" width="200" label="交易类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="wallet_biz" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" align="center" width="200" label="记账扣款金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-danger">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="记账扣款时间" />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemWalletRecharge">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { pageJz } from "/@/api/wallet/wallet-transaction"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 定义查询字典
|
||||
const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz")
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
const draggableDepTreeRef = ref()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: pageJz,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
state.queryForm.deptId = ""
|
||||
state.queryForm.deptIds = []
|
||||
draggableDepTreeRef.value.resetData()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-transaction/export-jz",
|
||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
||||
"消费记录.xlsx",
|
||||
)
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["price"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
.filter((v: any) => v[i.property] != null)
|
||||
.map((v: any) => v[i.property])
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = displayPrice(total)
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
// 树节点选择时
|
||||
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => {
|
||||
state.queryForm.deptId = curClickedNode.id
|
||||
state.queryForm.deptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||
state.queryForm.isInclude = !isDeepTree
|
||||
getDataList()
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user