Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4e265c69db
15 files changed
+408
-523
No files matched your search
@@ -0,0 +1,26 @@
|
|||||||
|
# port 端口号
|
||||||
|
VITE_PORT = 8888
|
||||||
|
|
||||||
|
#浏览器自动打开
|
||||||
|
VITE_OPEN = true
|
||||||
|
|
||||||
|
# 本地环境
|
||||||
|
ENV = 'development'
|
||||||
|
|
||||||
|
# ADMIN 服务地址
|
||||||
|
# VITE_ADMIN_PROXY_PATH = http://123.156.230.15: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.50:9999/ # 邓-本地
|
||||||
|
|
||||||
|
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境
|
||||||
|
|
||||||
|
# 图片访问基础地址
|
||||||
|
# VITE_IMAGE_BASE_PATH = http://123.156.230.15: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.50:9999 # 邓-本地
|
||||||
|
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境
|
||||||
|
|
||||||
|
# 代码生成服务地址
|
||||||
|
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
|
||||||
@@ -59,6 +59,7 @@ async function getOptions() {
|
|||||||
try {
|
try {
|
||||||
state.loading = true
|
state.loading = true
|
||||||
const _pa = {
|
const _pa = {
|
||||||
|
userId: selectId.value,
|
||||||
...queryForm,
|
...queryForm,
|
||||||
}
|
}
|
||||||
const { data } = await userApi.pageList(_pa)
|
const { data } = await userApi.pageList(_pa)
|
||||||
|
|||||||
@@ -57,14 +57,6 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
|||||||
isHide: true,
|
isHide: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/createCgPlan",
|
|
||||||
name: "创建采购计划",
|
|
||||||
component: () => import("/@/views/supermarketerp/smErpCgPlan/createCgPlan.vue"),
|
|
||||||
meta: {
|
|
||||||
isHide: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+169
-156
@@ -1,202 +1,215 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<!-- 顶部折线图-->
|
<!-- 顶部折线图-->
|
||||||
<log-line-chart/>
|
<log-line-chart />
|
||||||
|
|
||||||
<el-row class="mt-4 ml10" v-show="showSearch">
|
<el-row class="mt-4 ml10" v-show="showSearch">
|
||||||
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
<el-form :inline="true" :model="state.queryForm" @keyup.enter="getDataList" ref="queryRef">
|
||||||
<el-form-item :label="$t('syslog.logType')" prop="logType">
|
<el-form-item :label="$t('syslog.logType')" prop="logType">
|
||||||
<el-select :placeholder="$t('syslog.inputLogTypeTip')" clearable
|
<el-select :placeholder="$t('syslog.inputLogTypeTip')" clearable v-model="state.queryForm.logType">
|
||||||
v-model="state.queryForm.logType">
|
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in log_type" />
|
||||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in log_type"/>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item :label="$t('syslog.createTime')" prop="createTime">
|
||||||
<el-form-item :label="$t('syslog.createTime')" prop="createTime">
|
<el-date-picker
|
||||||
<el-date-picker
|
:end-placeholder="$t('syslog.inputEndPlaceholderTip')"
|
||||||
:end-placeholder="$t('syslog.inputEndPlaceholderTip')"
|
:start-placeholder="$t('syslog.inputStartPlaceholderTip')"
|
||||||
:start-placeholder="$t('syslog.inputStartPlaceholderTip')"
|
range-separator="To"
|
||||||
range-separator="To"
|
type="datetimerange"
|
||||||
type="datetimerange"
|
v-model="state.queryForm.createTime"
|
||||||
v-model="state.queryForm.createTime"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
/>
|
||||||
/>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item>
|
||||||
<el-form-item>
|
<el-button @click="getDataList" icon="Search" type="primary">{{ $t("common.queryBtn") }}</el-button>
|
||||||
<el-button @click="getDataList" icon="Search" type="primary">{{ $t('common.queryBtn') }}</el-button>
|
<el-button @click="resetQuery" icon="Refresh">{{ $t("common.resetBtn") }}</el-button>
|
||||||
<el-button @click="resetQuery" icon="Refresh">{{ $t('common.resetBtn') }}</el-button>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-form>
|
||||||
</el-form>
|
</el-row>
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb-2" style="width: 100%">
|
<div class="mb-2" style="width: 100%">
|
||||||
<el-button :disabled="multiple" v-auth="'sys_log_del'" @click="handleDelete(selectObjs)" class="ml10"
|
<el-button
|
||||||
icon="Delete" type="primary">
|
:disabled="multiple"
|
||||||
{{ $t('common.delBtn') }}
|
v-auth="'sys_log_del'"
|
||||||
</el-button>
|
@click="handleDelete(selectObjs)"
|
||||||
<right-toolbar
|
class="ml10"
|
||||||
:export="'sys_log_export'"
|
icon="Delete"
|
||||||
@exportExcel="exportExcel"
|
type="primary"
|
||||||
@queryTable="getDataList"
|
>
|
||||||
class="ml10"
|
{{ $t("common.delBtn") }}
|
||||||
style="float: right; margin-right: 20px"
|
</el-button>
|
||||||
v-model:showSearch="showSearch"
|
<right-toolbar
|
||||||
></right-toolbar>
|
:export="'sys_log_export'"
|
||||||
</div>
|
@exportExcel="exportExcel"
|
||||||
</el-row>
|
@queryTable="getDataList"
|
||||||
<el-table
|
class="ml10"
|
||||||
ref="tableRef"
|
style="float: right; margin-right: 20px"
|
||||||
:data="state.dataList"
|
v-model:showSearch="showSearch"
|
||||||
@selection-change="handleSelectionChange"
|
></right-toolbar>
|
||||||
@sort-change="sortChangeHandle"
|
</div>
|
||||||
v-loading="state.loading"
|
</el-row>
|
||||||
border
|
<el-table
|
||||||
:cell-style="tableStyle.cellStyle"
|
ref="tableRef"
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
:data="state.dataList"
|
||||||
>
|
@selection-change="handleSelectionChange"
|
||||||
<el-table-column align="center" type="selection" width="40"/>
|
@sort-change="sortChangeHandle"
|
||||||
<el-table-column :label="$t('syslog.index')" type="index" width="60"/>
|
v-loading="state.loading"
|
||||||
<el-table-column :label="$t('syslog.logType')" show-overflow-tooltip>
|
border
|
||||||
<template #default="scope">
|
:cell-style="tableStyle.cellStyle"
|
||||||
<dict-tag :options="log_type" :value="scope.row.logType"></dict-tag>
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
<el-table-column align="center" type="selection" width="40" />
|
||||||
<el-table-column :label="$t('syslog.title')" prop="title" show-overflow-tooltip></el-table-column>
|
<el-table-column :label="$t('syslog.index')" type="index" width="60" />
|
||||||
<el-table-column :label="$t('syslog.remoteAddr')" prop="remoteAddr" show-overflow-tooltip></el-table-column>
|
<el-table-column :label="$t('syslog.logType')" show-overflow-tooltip>
|
||||||
<el-table-column :label="$t('syslog.method')" prop="method" show-overflow-tooltip></el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column :label="$t('syslog.time')" prop="time" show-overflow-tooltip>
|
<dict-tag :options="log_type" :value="scope.row.logType"></dict-tag>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<span v-if="scope.row.time">{{ scope.row.time }}/ms</span>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column :label="$t('syslog.title')" prop="title" show-overflow-tooltip></el-table-column>
|
||||||
</el-table-column>
|
<el-table-column :label="$t('syslog.remoteAddr')" prop="remoteAddr" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column :label="$t('syslog.createTime')" prop="createTime" show-overflow-tooltip sortable="custom"
|
<el-table-column :label="$t('syslog.method')" prop="method" show-overflow-tooltip></el-table-column>
|
||||||
width="200"></el-table-column>
|
<el-table-column :label="$t('syslog.time')" prop="time" show-overflow-tooltip>
|
||||||
<el-table-column :label="$t('syslog.createBy')" prop="createBy" show-overflow-tooltip sortable="custom"
|
<template #default="scope">
|
||||||
width="200"></el-table-column>
|
<span v-if="scope.row.time">{{ scope.row.time }}/ms</span>
|
||||||
<el-table-column :label="$t('common.action')" width="150">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-button icon="view" @click="LogDetailRef.openDialog(scope.row)" size="small" text type="primary">
|
<el-table-column
|
||||||
{{ $t('common.detailBtn') }}
|
:label="$t('syslog.createTime')"
|
||||||
</el-button>
|
prop="createTime"
|
||||||
<el-button v-auth="'sys_log_del'" icon="delete" @click="handleDelete([scope.row.id])" size="small" text
|
show-overflow-tooltip
|
||||||
type="primary">
|
sortable="custom"
|
||||||
{{ $t('common.delBtn') }}
|
width="200"
|
||||||
</el-button>
|
></el-table-column>
|
||||||
</template>
|
<el-table-column
|
||||||
</el-table-column>
|
:label="$t('syslog.createBy')"
|
||||||
</el-table>
|
prop="createBy"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
width="200"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column :label="$t('common.action')" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button icon="view" @click="LogDetailRef.openDialog(scope.row)" size="small" text type="primary">
|
||||||
|
{{ $t("common.detailBtn") }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-auth="'sys_log_del'" icon="delete" @click="handleDelete([scope.row.id])" size="small" text type="primary">
|
||||||
|
{{ $t("common.delBtn") }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle"
|
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
|
||||||
v-bind="state.pagination"></pagination>
|
<log-detail ref="LogDetailRef"></log-detail>
|
||||||
<log-detail ref="LogDetailRef"></log-detail>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {BasicTableProps, useTable} from '/@/hooks/table';
|
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||||
import {delObj, pageList} from '/@/api/admin/log';
|
import { delObj, pageList } from "/@/api/admin/log"
|
||||||
import {useI18n} from 'vue-i18n';
|
import { useI18n } from "vue-i18n"
|
||||||
import {useMessage, useMessageBox} from '/@/hooks/message';
|
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||||
import {useDict} from '/@/hooks/dict';
|
import { useDict } from "/@/hooks/dict"
|
||||||
|
|
||||||
const LogDetail = defineAsyncComponent(() => import('./detail.vue'));
|
const LogDetail = defineAsyncComponent(() => import("./detail.vue"))
|
||||||
const LogLineChart = defineAsyncComponent(() => import('./line-chart.vue'));
|
const LogLineChart = defineAsyncComponent(() => import("./line-chart.vue"))
|
||||||
|
|
||||||
const LogDetailRef = ref();
|
const LogDetailRef = ref()
|
||||||
|
|
||||||
const {log_type} = useDict('log_type');
|
const { log_type } = useDict("log_type")
|
||||||
|
|
||||||
const {t} = useI18n();
|
const { t } = useI18n()
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const queryRef = ref();
|
const queryRef = ref()
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true)
|
||||||
|
|
||||||
// 多选rows
|
// 多选rows
|
||||||
const selectObjs = ref([]) as any;
|
const selectObjs = ref([]) as any
|
||||||
// 是否可以多选
|
// 是否可以多选
|
||||||
const multiple = ref(true);
|
const multiple = ref(true)
|
||||||
let tableRef = ref(null);
|
let tableRef = ref(null)
|
||||||
|
|
||||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
queryForm: {
|
queryForm: {
|
||||||
logType: '',
|
logType: "",
|
||||||
createTime: '',
|
createTime: "",
|
||||||
serviceId: '',
|
serviceId: "",
|
||||||
},
|
},
|
||||||
selectObjs: [],
|
selectObjs: [],
|
||||||
pageList: pageList,
|
pageList: pageList,
|
||||||
descs: ['create_time'],
|
descs: ["create_time"],
|
||||||
createdIsNeed: false,
|
createdIsNeed: false,
|
||||||
});
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const {
|
const {
|
||||||
downBlobFile,
|
downBlobFile,
|
||||||
getDataList,
|
getDataList,
|
||||||
currentChangeHandle: baseCurrentChangeHandle,
|
currentChangeHandle: baseCurrentChangeHandle,
|
||||||
sortChangeHandle,
|
sortChangeHandle,
|
||||||
sizeChangeHandle,
|
sizeChangeHandle,
|
||||||
tableStyle
|
tableStyle,
|
||||||
} = useTable(state);
|
} = useTable(state)
|
||||||
|
|
||||||
// 分页事件
|
// 分页事件
|
||||||
const currentChangeHandle = (page: number) => {
|
const currentChangeHandle = (page: number) => {
|
||||||
// Reset table scroll position to top
|
// Reset table scroll position to top
|
||||||
tableRef.value?.setScrollTop(0);
|
tableRef.value?.setScrollTop(0)
|
||||||
// Call the original handler
|
// Call the original handler
|
||||||
baseCurrentChangeHandle(page);
|
baseCurrentChangeHandle(page)
|
||||||
};
|
}
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
queryRef.value?.resetFields();
|
queryRef.value?.resetFields()
|
||||||
getDataList();
|
getDataList()
|
||||||
};
|
}
|
||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile('/admin/log/export', state.queryForm, 'log.xlsx');
|
downBlobFile("/admin/log/export", state.queryForm, "log.xlsx")
|
||||||
};
|
}
|
||||||
|
|
||||||
// 多选事件
|
// 多选事件
|
||||||
const handleSelectionChange = (objs: { id: string }[]) => {
|
const handleSelectionChange = (objs: { id: string }[]) => {
|
||||||
selectObjs.value = objs.map(({id}) => id);
|
selectObjs.value = objs.map(({ id }) => id)
|
||||||
multiple.value = !objs.length;
|
multiple.value = !objs.length
|
||||||
};
|
}
|
||||||
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
const handleDelete = async (ids: string[]) => {
|
const handleDelete = async (ids: string[]) => {
|
||||||
try {
|
try {
|
||||||
await useMessageBox().confirm(t('common.delConfirmText'));
|
await useMessageBox().confirm(t("common.delConfirmText"))
|
||||||
} catch {
|
} catch {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await delObj(ids);
|
await delObj(ids)
|
||||||
getDataList();
|
getDataList()
|
||||||
useMessage().success(t('common.delSuccessText'));
|
useMessage().success(t("common.delSuccessText"))
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
useMessage().error(err.msg);
|
useMessage().error(err.msg)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// onMounted 通过路由参数给 serviceId 赋值
|
// onMounted 通过路由参数给 serviceId 赋值
|
||||||
const route = useRoute();
|
const route = useRoute()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const {serviceId} = route.query;
|
const { serviceId } = route.query
|
||||||
if (serviceId) {
|
if (serviceId) {
|
||||||
state.queryForm.serviceId = serviceId;
|
state.queryForm.serviceId = serviceId
|
||||||
}
|
}
|
||||||
getDataList();
|
getDataList()
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
pre code.hljs {
|
pre code.hljs {
|
||||||
width: 65%;
|
width: 65%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -184,19 +184,9 @@
|
|||||||
<el-button icon="Printer" text type="primary" @click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
<el-button icon="Printer" text type="primary" @click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
||||||
打印发票
|
打印发票
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="ShoppingCartFull" text type="primary" @click="shopCarDialogRef.openDialog(row.id)">
|
<el-button icon="ShoppingCartFull" text type="primary" @click="shopCarDialogRef.openDialog(row.id)"> 购物车 </el-button>
|
||||||
购物车
|
<el-button icon="Money" link type="primary" @click="transactionListRef.openDialog(row.walletId)"> 钱包明细 </el-button>
|
||||||
</el-button>
|
<el-button icon="InfoFilled" link type="primary" v-auth="'wallet_walletTransaction_update_balance'" @click="doRefund(row)">
|
||||||
<el-button icon="Money" link type="primary" @click="transactionListRef.openDialog(row.walletId)">
|
|
||||||
钱包明细
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
icon="InfoFilled"
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_walletTransaction_update_balance'"
|
|
||||||
@click="doRefund(row)"
|
|
||||||
>
|
|
||||||
订单详情
|
订单详情
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -219,13 +209,7 @@
|
|||||||
>
|
>
|
||||||
退款
|
退款
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-if="false" icon="delete" text type="primary" v-auth="'hard_hardwareOrder_del'" @click="handleDelete([row.id])"
|
||||||
v-if="false"
|
|
||||||
icon="delete"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'hard_hardwareOrder_del'"
|
|
||||||
@click="handleDelete([row.id])"
|
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -288,8 +272,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const { data } = await getDicts("hard_order_type")
|
const { data } = await getDicts("hard_order_type")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -92,8 +92,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -80,8 +80,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
|
|||||||
+9
-1
@@ -334,7 +334,15 @@ const getInitData = async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
getObj(id)
|
getObj(id)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
Object.assign(baseDataForm, res.data)
|
Object.assign(baseDataForm, {
|
||||||
|
planCode: res.data.planCode,
|
||||||
|
orderNumber: res.data.orderNumber,
|
||||||
|
planDate: res.data.planDate,
|
||||||
|
supplierId: res.data.supplierId,
|
||||||
|
handlerUserId: res.data.handlerUserId,
|
||||||
|
remark: res.data.remark,
|
||||||
|
})
|
||||||
|
state.editableTableData = res.data.items
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
<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="12" class="mb20">
|
|
||||||
<el-form-item label="采购计划编号" prop="planCode">
|
|
||||||
<el-input v-model="form.planCode" placeholder="请输入采购计划编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="采购计划单据日期" prop="planDate">
|
|
||||||
<el-input v-model="form.planDate" placeholder="请输入采购计划单据日期" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="仓库id" prop="warehouseId">
|
|
||||||
<el-input v-model="form.warehouseId" placeholder="请输入仓库id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="经办人id" prop="handlerUserId">
|
|
||||||
<el-input v-model="form.handlerUserId" placeholder="请输入经办人id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="审批状态" prop="checkStatus">
|
|
||||||
<el-input v-model="form.checkStatus" placeholder="请输入审批状态" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="审批人id" prop="checkUserId">
|
|
||||||
<el-input v-model="form.checkUserId" placeholder="请输入审批人id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="审核日期" prop="checkTime">
|
|
||||||
<el-input v-model="form.checkTime" placeholder="请输入审核日期" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="商户编号" prop="merchantId">
|
|
||||||
<el-input v-model="form.merchantId" placeholder="请输入商户编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="部门id" prop="deptId">
|
|
||||||
<el-input v-model="form.deptId" placeholder="请输入部门id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="出入库数量" prop="quantity">
|
|
||||||
<el-input v-model="form.quantity" placeholder="请输入出入库数量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="累计进货数量" prop="totalNumber">
|
|
||||||
<el-input v-model="form.totalNumber" placeholder="请输入累计进货数量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="累计总金额" prop="totalAmount">
|
|
||||||
<el-input v-model="form.totalAmount" placeholder="请输入累计总金额" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="货商" prop="supplierId">
|
|
||||||
<el-input v-model="form.supplierId" placeholder="请输入货商" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="mb20">
|
|
||||||
<el-form-item label="订单编号" prop="orderNumber">
|
|
||||||
<el-input v-model="form.orderNumber" placeholder="请输入订单编号" />
|
|
||||||
</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="SmErpCgPlanDialog">
|
|
||||||
import { useDict } from "/@/hooks/dict"
|
|
||||||
import { useMessage } from "/@/hooks/message"
|
|
||||||
import { getObj, addObj, putObj } from "/@/api/supermarketerp/smErpCgPlan"
|
|
||||||
import { rule } from "/@/utils/validate"
|
|
||||||
const emit = defineEmits(["refresh"])
|
|
||||||
|
|
||||||
// 定义变量内容
|
|
||||||
const dataFormRef = ref()
|
|
||||||
const visible = ref(false)
|
|
||||||
const loading = ref(false)
|
|
||||||
// 定义字典
|
|
||||||
|
|
||||||
// 提交表单数据
|
|
||||||
const form = reactive({
|
|
||||||
id: "",
|
|
||||||
planCode: "",
|
|
||||||
planDate: "",
|
|
||||||
warehouseId: "",
|
|
||||||
handlerUserId: "",
|
|
||||||
checkStatus: "",
|
|
||||||
checkUserId: "",
|
|
||||||
checkTime: "",
|
|
||||||
merchantId: "",
|
|
||||||
deptId: "",
|
|
||||||
quantity: "",
|
|
||||||
totalNumber: "",
|
|
||||||
totalAmount: "",
|
|
||||||
supplierId: "",
|
|
||||||
remark: "",
|
|
||||||
orderNumber: "",
|
|
||||||
})
|
|
||||||
|
|
||||||
// 定义校验规则
|
|
||||||
const dataRules = ref({
|
|
||||||
planCode: [{ required: true, message: "采购计划编号不能为空", trigger: "blur" }],
|
|
||||||
planDate: [{ required: true, message: "采购计划单据日期不能为空", trigger: "blur" }],
|
|
||||||
})
|
|
||||||
|
|
||||||
// 打开弹窗
|
|
||||||
const openDialog = (id: string) => {
|
|
||||||
visible.value = true
|
|
||||||
form.id = ""
|
|
||||||
|
|
||||||
// 重置表单数据
|
|
||||||
nextTick(() => {
|
|
||||||
dataFormRef.value?.resetFields()
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取smErpCgPlan信息
|
|
||||||
if (id) {
|
|
||||||
form.id = id
|
|
||||||
getsmErpCgPlanData(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 getsmErpCgPlanData = (id: string) => {
|
|
||||||
// 获取数据
|
|
||||||
loading.value = true
|
|
||||||
getObj(id)
|
|
||||||
.then((res: any) => {
|
|
||||||
Object.assign(form, res.data)
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
loading.value = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 暴露变量
|
|
||||||
defineExpose({
|
|
||||||
openDialog,
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
@@ -142,9 +142,9 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 点击创建采购清单
|
// 点击创建采购清单
|
||||||
const handleClickCreateCgPlan = () => router.push({ path: "/createCgPlan" })
|
const handleClickCreateCgPlan = () => router.push({ path: "/supermarketerp/smErpCgPlan/cgPlanOption" })
|
||||||
// 点击编辑采购清单
|
// 点击编辑采购清单
|
||||||
const handleClickEditCgPlan = (id: string) => router.push({ path: "/createCgPlan", query: { id } })
|
const handleClickEditCgPlan = (id: string) => router.push({ path: "/supermarketerp/smErpCgPlan/cgPlanOption", query: { id } })
|
||||||
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
const handleDelete = async (ids: string[]) => {
|
const handleDelete = async (ids: string[]) => {
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="绑定用户" width="30%" 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="userId">
|
||||||
|
<select-user v-model="form.userId" />
|
||||||
|
</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="WalletActiveDialog">
|
||||||
|
import { useDict } from "/@/hooks/dict"
|
||||||
|
import { useMessage } from "/@/hooks/message"
|
||||||
|
import * as walletActiveApi from "/@/api/wallet/wallet-active"
|
||||||
|
import { rule } from "/@/utils/validate"
|
||||||
|
const emit = defineEmits(["refresh"])
|
||||||
|
|
||||||
|
// 定义变量内容
|
||||||
|
const dataFormRef = ref()
|
||||||
|
const visible = ref(false)
|
||||||
|
const loading = ref(false)
|
||||||
|
// 定义字典
|
||||||
|
|
||||||
|
// 提交表单数据
|
||||||
|
const form = reactive({
|
||||||
|
id: "",
|
||||||
|
userId: "",
|
||||||
|
})
|
||||||
|
|
||||||
|
// 定义校验规则
|
||||||
|
const dataRules = ref({
|
||||||
|
userId: [{ required: true, message: "请选择用户", trigger: "change" }],
|
||||||
|
})
|
||||||
|
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = (id: string) => {
|
||||||
|
visible.value = true
|
||||||
|
form.id = ""
|
||||||
|
|
||||||
|
// 重置表单数据
|
||||||
|
nextTick(() => {
|
||||||
|
dataFormRef.value?.resetFields()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取walletActive信息
|
||||||
|
if (id) {
|
||||||
|
form.id = id
|
||||||
|
getwalletActiveData(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const onSubmit = async () => {
|
||||||
|
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||||
|
if (!valid) return false
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
// fastCreateCard(form)
|
||||||
|
useMessage().success("绑定成功")
|
||||||
|
visible.value = false
|
||||||
|
emit("refresh")
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化表单数据
|
||||||
|
const getwalletActiveData = (id: string) => {
|
||||||
|
// 获取数据
|
||||||
|
loading.value = true
|
||||||
|
walletActiveApi
|
||||||
|
.getObj(id)
|
||||||
|
.then((res: any) => {
|
||||||
|
Object.assign(form, res.data)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 暴露变量
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,107 +1,112 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="开卡" width="30%" v-model="visible" :close-on-click-modal="false" draggable>
|
<el-dialog title="开卡" width="30%" 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-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="24" class="mb20">
|
||||||
|
<el-form-item label="商户" prop="merchantId">
|
||||||
|
<select-mch v-model="form.merchantId" placeholder="请选择商户" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24" class="mb20">
|
<el-col :span="24" class="mb20">
|
||||||
<el-form-item label="商户" prop="merchantId">
|
<el-form-item label="生成数量" prop="count">
|
||||||
<select-mch v-model="form.merchantId" placeholder="请选择商户" />
|
<el-input-number
|
||||||
</el-form-item>
|
style="width: 100%"
|
||||||
</el-col>
|
v-model="form.count"
|
||||||
|
:max="200"
|
||||||
<el-col :span="24" class="mb20">
|
placeholder="请输入生成数量"
|
||||||
<el-form-item label="生成数量" prop="count">
|
:min="0"
|
||||||
<el-input-number style="width: 100%" v-model="form.count" :max="200" placeholder="请输入生成数量" :min="0"
|
controls-position="right"
|
||||||
controls-position="right" />
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-row>
|
</el-form>
|
||||||
</el-form>
|
<template #footer>
|
||||||
<template #footer>
|
<span class="dialog-footer">
|
||||||
<span class="dialog-footer">
|
<el-button @click="visible = false">取消</el-button>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
</span>
|
||||||
</span>
|
</template>
|
||||||
</template>
|
</el-dialog>
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="WalletActiveDialog">
|
<script setup lang="ts" name="WalletActiveDialog">
|
||||||
import { useDict } from '/@/hooks/dict';
|
import { useDict } from "/@/hooks/dict"
|
||||||
import { useMessage } from "/@/hooks/message";
|
import { useMessage } from "/@/hooks/message"
|
||||||
import { getObj, addObj, putObj, fastCreateCard } from '/@/api/wallet/wallet-active'
|
import { getObj, addObj, putObj, fastCreateCard } from "/@/api/wallet/wallet-active"
|
||||||
import { rule } from '/@/utils/validate';
|
import { rule } from "/@/utils/validate"
|
||||||
const emit = defineEmits(['refresh']);
|
const emit = defineEmits(["refresh"])
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const dataFormRef = ref();
|
const dataFormRef = ref()
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
// 定义字典
|
// 定义字典
|
||||||
|
|
||||||
// 提交表单数据
|
// 提交表单数据
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
id: '',
|
id: "",
|
||||||
merchantId: '',
|
merchantId: "",
|
||||||
count: '',
|
count: "",
|
||||||
});
|
})
|
||||||
|
|
||||||
// 定义校验规则
|
// 定义校验规则
|
||||||
const dataRules = ref({
|
const dataRules = ref({
|
||||||
merchantId: [{ required: true, message: '请选择商户', trigger: 'change' }],
|
merchantId: [{ required: true, message: "请选择商户", trigger: "change" }],
|
||||||
count: [{ required: true, message: '生成数量不能为空', trigger: 'blur' }],
|
count: [{ required: true, message: "生成数量不能为空", trigger: "blur" }],
|
||||||
})
|
})
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
const openDialog = (id: string) => {
|
const openDialog = (id: string) => {
|
||||||
visible.value = true
|
visible.value = true
|
||||||
form.id = ''
|
form.id = ""
|
||||||
|
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dataFormRef.value?.resetFields();
|
dataFormRef.value?.resetFields()
|
||||||
});
|
})
|
||||||
|
|
||||||
// 获取walletActive信息
|
// 获取walletActive信息
|
||||||
if (id) {
|
if (id) {
|
||||||
form.id = id
|
form.id = id
|
||||||
getwalletActiveData(id)
|
getwalletActiveData(id)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const valid = await dataFormRef.value.validate().catch(() => { });
|
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||||
if (!valid) return false;
|
if (!valid) return false
|
||||||
|
|
||||||
try {
|
|
||||||
loading.value = true;
|
|
||||||
fastCreateCard(form)
|
|
||||||
useMessage().success("开卡成功");
|
|
||||||
visible.value = false;
|
|
||||||
emit('refresh');
|
|
||||||
} catch (err: any) {
|
|
||||||
useMessage().error(err.msg);
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
fastCreateCard(form)
|
||||||
|
useMessage().success("开卡成功")
|
||||||
|
visible.value = false
|
||||||
|
emit("refresh")
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化表单数据
|
// 初始化表单数据
|
||||||
const getwalletActiveData = (id: string) => {
|
const getwalletActiveData = (id: string) => {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getObj(id).then((res: any) => {
|
getObj(id)
|
||||||
Object.assign(form, res.data)
|
.then((res: any) => {
|
||||||
}).finally(() => {
|
Object.assign(form, res.data)
|
||||||
loading.value = false
|
})
|
||||||
})
|
.finally(() => {
|
||||||
};
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 暴露变量
|
// 暴露变量
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog
|
openDialog,
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -29,13 +29,7 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8" style="width: 100%">
|
||||||
<el-button
|
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'wallet_walletActive_add'">
|
||||||
icon="folder-add"
|
|
||||||
type="primary"
|
|
||||||
class="ml10"
|
|
||||||
@click="formDialogRef.openDialog()"
|
|
||||||
v-auth="'wallet_walletActive_add'"
|
|
||||||
>
|
|
||||||
开 卡
|
开 卡
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -80,14 +74,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200">
|
<el-table-column label="操作" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-if="row.isActiveHardware == 1" icon="Postcard" text type="primary" @click="doRefreshAvatar(row)"
|
||||||
v-if="row.isActiveHardware == 1"
|
|
||||||
icon="Postcard"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
@click="doRefreshAvatar(row)"
|
|
||||||
>重新激活</el-button
|
>重新激活</el-button
|
||||||
>
|
>
|
||||||
|
<el-button icon="Postcard" text type="primary" @click="bindUserFormDialogRef.openDialog(row.id)">绑定用户</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false"
|
v-if="false"
|
||||||
icon="edit-pen"
|
icon="edit-pen"
|
||||||
@@ -97,22 +87,15 @@
|
|||||||
@click="formDialogRef.openDialog(row.id)"
|
@click="formDialogRef.openDialog(row.id)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button icon="delete" text type="primary" v-auth="'wallet_walletActive_del'" @click="handleDelete([row.id])">删除</el-button>
|
||||||
icon="delete"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_walletActive_del'"
|
|
||||||
@click="handleDelete([row.id])"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 编辑、新增 -->
|
|
||||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
<bind-user-form-dialog ref="bindUserFormDialogRef" @refresh="getDataList(false)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -125,10 +108,12 @@ import { ElLoading } from "element-plus"
|
|||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
|
const BindUserFormDialog = defineAsyncComponent(() => import("./bind-user-form.vue"))
|
||||||
// 定义查询字典
|
// 定义查询字典
|
||||||
const { wallet_type, yes_no_type } = useDict("wallet_type", "yes_no_type")
|
const { wallet_type, yes_no_type } = useDict("wallet_type", "yes_no_type")
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
|
const bindUserFormDialogRef = ref()
|
||||||
// 搜索变量
|
// 搜索变量
|
||||||
const queryRef = ref()
|
const queryRef = ref()
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
@@ -142,8 +127,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
|
|||||||
@@ -25,11 +25,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="w100" label="审核时间" prop="processTimeList">
|
<el-form-item class="w100" label="审核时间" prop="processTimeList">
|
||||||
<el-date-picker
|
<el-date-picker v-model="state.queryForm.processTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||||
v-model="state.queryForm.processTimeList"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
type="datetimerange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -111,12 +107,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-auths="['wallet_walletRechargeImport_recover']" label="操作" width="200">
|
<el-table-column v-auths="['wallet_walletRechargeImport_recover']" label="操作" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-auth="'wallet_walletRechargeImport_recover'" icon="RefreshRight" text type="primary" @click="handleRecover(row.id)"
|
||||||
v-auth="'wallet_walletRechargeImport_recover'"
|
|
||||||
icon="RefreshRight"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
@click="handleRecover(row.id)"
|
|
||||||
>恢复</el-button
|
>恢复</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -133,12 +124,7 @@ import { useDict } from "/@/hooks/dict"
|
|||||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||||
import * as walletRechargeImportApi from "/@/api/wallet/wallet-recharge-import"
|
import * as walletRechargeImportApi from "/@/api/wallet/wallet-recharge-import"
|
||||||
|
|
||||||
const { wallet_biz_recharge, wallet_type, check_status } = useDict(
|
const { wallet_biz_recharge, wallet_type, check_status } = useDict("wallet_biz_recharge", "wallet_type", "check_status", "check_status")
|
||||||
"wallet_biz_recharge",
|
|
||||||
"wallet_type",
|
|
||||||
"check_status",
|
|
||||||
"check_status",
|
|
||||||
)
|
|
||||||
// 搜索变量
|
// 搜索变量
|
||||||
const queryRef = ref()
|
const queryRef = ref()
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
@@ -155,8 +141,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
// 恢复操作
|
// 恢复操作
|
||||||
const handleRecover = async (id: string) => {
|
const handleRecover = async (id: string) => {
|
||||||
@@ -188,11 +173,7 @@ const getSummaries = (param: any) => {
|
|||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
downBlobFile(
|
downBlobFile("/wallet/walletRechargeApply/export", Object.assign(state.queryForm, { ids: selectObjs }), "walletRechargeApply.xlsx")
|
||||||
"/wallet/walletRechargeApply/export",
|
|
||||||
Object.assign(state.queryForm, { ids: selectObjs }),
|
|
||||||
"walletRechargeApply.xlsx",
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选事件
|
// 多选事件
|
||||||
|
|||||||
@@ -89,13 +89,7 @@
|
|||||||
@click="formDialogRef.openDialog(row.id)"
|
@click="formDialogRef.openDialog(row.id)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'" @click="handleDelete([row.id])"
|
||||||
v-if="false"
|
|
||||||
icon="delete"
|
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_walletRecharge_del'"
|
|
||||||
@click="handleDelete([row.id])"
|
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -137,8 +131,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
// table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
useTable(state)
|
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
|
|||||||
Reference in new issue
Block a user