Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2d7676df84
25 files changed
+6659
-287
No files matched your search
Generated
+5057
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
// 用户在/非编人员统计
|
||||
export function staffingTotal(data: any) {
|
||||
return request({
|
||||
url: "/admin/user/total/staffing-total",
|
||||
method: "post",
|
||||
data,
|
||||
})
|
||||
}
|
||||
@@ -23,6 +23,18 @@ export function pageJoin(query: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function noRecogPageJoin(query: any) {
|
||||
return request({
|
||||
url: "/hard/hard-order/no-recog/page-join",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-order/page",
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function refreshOrder(params: any) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order/refresh",
|
||||
method: "get",
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
export function payOrder(data: any) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order/admin-pay",
|
||||
method: "post",
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order/page",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order",
|
||||
method: "post",
|
||||
data: obj,
|
||||
})
|
||||
}
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order/" + id,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order",
|
||||
method: "delete",
|
||||
data: ids,
|
||||
})
|
||||
}
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-third-mi-order",
|
||||
method: "put",
|
||||
data: obj,
|
||||
})
|
||||
}
|
||||
@@ -35,6 +35,30 @@ export function pageCz(query?: any) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pageCzTotal(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-cz-total",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function listDeptCzTotal(query?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/page-cz-dept-total",
|
||||
method: "post",
|
||||
params: {
|
||||
current: query.current,
|
||||
size: query.size,
|
||||
},
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function czTotal(data?: any) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/cz-total",
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-dialog title="菜品统计" width="70%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="state.queryForm.name" placeholder="请输入姓名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label=" 手机号" prop="phone">
|
||||
<el-input v-model="state.queryForm.phone" placeholder="请输入手机号" clearable />
|
||||
</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-table height="450px" :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
:summary-method="getSummaries" :show-summary="true" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column label="用户名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="手机号" prop="phone" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="编制" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="user_staffing_type" :value="row.staffingType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="staffing-total-table">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
import * as userApi from "/@/api/admin/user"
|
||||
|
||||
// 定义查询字典
|
||||
const { user_staffing_type } = useDict("user_staffing_type")
|
||||
// 定义变量内容
|
||||
const visible = ref(false)
|
||||
const queryRef = ref()
|
||||
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
createdIsNeed: false,
|
||||
queryForm: {
|
||||
deptId: null
|
||||
},
|
||||
pageList: userApi.pageList,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
|
||||
const openDialog = (row: any, query: any) => {
|
||||
console.log("row:", row);
|
||||
console.log("query:", query);
|
||||
state.queryForm.deptId = null
|
||||
|
||||
if (row && row.deptId) {
|
||||
state.queryForm.deptId = row.deptId
|
||||
}
|
||||
|
||||
getDataList()
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["count", "totalPrice"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
.filter((v: any) => v[i.property] != null)
|
||||
.map((v: any) => Number(v[i.property]))
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
if (i.property.includes("Price")) {
|
||||
totalRow[index] = displayPrice(total)
|
||||
} else {
|
||||
totalRow[index] = total
|
||||
}
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,169 @@
|
||||
<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">
|
||||
<el-row>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-form-item>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar @queryTable="getDataList" class="ml10" style="float: right" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table height="70vh" :data="state.dataList" v-loading="state.loading" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
:summary-method="getSummaries" :show-summary="true" row-class-name="success-row"
|
||||
@selection-change="selectionChangHandle" @sort-change="sortChangeHandle"
|
||||
@expand-change="tableExpandChange">
|
||||
<el-table-column type="index" label="#" width="60" align="center" />
|
||||
<el-table-column prop="deptName" align="center" label="部门" width="300" />
|
||||
<el-table-column prop="deptTotalPerson" align="center" label="部门总人数" width="200">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.deptTotalPerson }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="staffingPerson" align="center" label="在编人数" width="200">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">{{ row.staffingPerson }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="noneStaffingPerson" align="center" label="非编人数" width="200">
|
||||
<template #default="{ row }">
|
||||
<span class="color-danger">{{ row.noneStaffingPerson }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalPerson" align="center" label="填写在/非编人数" width="200">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">{{ row.totalPerson }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fillInPerson" align="center" label="未写在/非编人数" width="200">
|
||||
<template #default="{ row }">
|
||||
<span class="color-danger">{{ row.fillInPerson }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Tickets" text type="primary" @click="doOpenDialog(row)">
|
||||
具体人员
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</DraggableDepTree>
|
||||
<StaffingTotalTable ref="staffingTotalTableRef" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
import * as userTotalApi from "/@/api/admin/userTotal"
|
||||
|
||||
const StaffingTotalTable = defineAsyncComponent(() => import("./cmp/staffing-total-table.vue"))
|
||||
|
||||
const staffingTotalTableRef = ref()
|
||||
const draggableDepTreeRef = ref()
|
||||
const queryRef = ref()
|
||||
|
||||
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive({
|
||||
queryForm: {},
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
})
|
||||
|
||||
const doOpenDialog = (row: any) => {
|
||||
staffingTotalTableRef.value.openDialog(row, state.queryForm)
|
||||
}
|
||||
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
state.loading = true
|
||||
const { data } = await userTotalApi.staffingTotal(state.queryForm)
|
||||
if (data && data.length) {
|
||||
state.dataList = data
|
||||
} else {
|
||||
state.dataList = []
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
state.loading = false
|
||||
}
|
||||
}
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
state.queryForm.deptId = ""
|
||||
state.queryForm.deptIds = []
|
||||
draggableDepTreeRef.value.resetData()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 树节点选择时
|
||||
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: boolean) => {
|
||||
state.queryForm.deptId = curClickedNode.id
|
||||
state.queryForm.deptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||
state.queryForm.isInclude = !isDeepTree
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击table展开行
|
||||
const tableExpandChange = async (e: any) => {
|
||||
try {
|
||||
console.log(e);
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
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 = ["deptTotalPerson", "staffingPerson", "noneStaffingPerson", "totalPerson", "fillInPerson"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
.filter((v: any) => v[i.property] != null)
|
||||
.map((v: any) => Number(v[i.property]))
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = `${total}人`
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
</style>
|
||||
@@ -70,11 +70,17 @@
|
||||
<el-input clearable placeholder="请输入昵称" v-model="dataForm.nickname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="编制" prop="staffingType">
|
||||
<dict-select :disabled="!auth('user_sysUser_editStaffingType')"
|
||||
v-model="dataForm.staffingType" dict-code="user_staffing_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item :label="$t('sysuser.lockFlag')" prop="lockFlag">
|
||||
<el-radio-group v-model="dataForm.lockFlag">
|
||||
<el-radio :key="index" :label="item.value" border v-for="(item, index) in lock_flag">{{
|
||||
item.label }}
|
||||
<el-radio :key="index" :label="item.value" border v-for="(item, index) in lock_flag">
|
||||
{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@@ -145,6 +151,7 @@ const dataForm = reactive({
|
||||
nickname: "",
|
||||
name: "",
|
||||
email: "",
|
||||
staffingType: "2",
|
||||
post: [] as string[],
|
||||
role: [] as string[],
|
||||
})
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
<el-form-item style="width: 250px" label="角色" prop="role">
|
||||
<select-role v-model="state.queryForm.role" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="编制情况" prop="staffingType">
|
||||
<dict-select v-model="state.queryForm.staffingType" dict-code="user_staffing_type" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -64,12 +67,6 @@
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="手机号" prop="phone" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="部门" prop="deptName" show-overflow-tooltip min-width="150" />
|
||||
<el-table-column label="角色" show-overflow-tooltip min-width="150">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.roleList" :key="index">{{ item.roleName
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用" show-overflow-tooltip min-width="150">
|
||||
<template #default="{ row }">
|
||||
<el-switch :disabled="!auth('sys_user_edit') || row.processStatus != '2'"
|
||||
@@ -77,6 +74,17 @@
|
||||
inactive-value="9"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编制" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="user_staffing_type" :value="row.staffingType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="角色" show-overflow-tooltip min-width="150">
|
||||
<template #default="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.roleList" :key="index">
|
||||
{{ item.roleName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人脸">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.faceImgs" />
|
||||
@@ -158,6 +166,7 @@ import { useI18n } from "vue-i18n"
|
||||
import { auth } from "/@/utils/authFunction"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
const UserForm = defineAsyncComponent(() => import("./form.vue"))
|
||||
const FaceManage = defineAsyncComponent(() => import("./face-manage.vue"))
|
||||
@@ -197,6 +206,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
const { user_staffing_type } = useDict("user_staffing_type")
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
|
||||
@@ -283,7 +283,7 @@ const submitData = async () => {
|
||||
|
||||
// 点击继续添加
|
||||
const onContinueAdd = async () => {
|
||||
;(await baseFormValidate()) && (await itemTableFormValidate()) && (await submitData()) && clearData() && emit("refresh")
|
||||
(await baseFormValidate()) && (await itemTableFormValidate()) && (await submitData()) && clearData() && emit("refresh")
|
||||
}
|
||||
|
||||
// 点击保存
|
||||
|
||||
@@ -115,7 +115,7 @@ onMounted(() => {
|
||||
watch(
|
||||
() => props.groupId,
|
||||
(val) => {
|
||||
if (!!val) {
|
||||
if (val) {
|
||||
form.value.groupId = parseInt(val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,56 +5,76 @@
|
||||
<el-timeline>
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">用户授权</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.createTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">用户授权</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.createTime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flow_coll">
|
||||
<span>授权用户:</span>
|
||||
<span>{{ detail.username }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.requestOpenTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜申请开门</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.requestOpenTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜申请开门</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.requestOpenTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.openCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜开门响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.openCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜开门响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.openCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.videoCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">智能柜视频回调</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.videoCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">智能柜视频回调</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.videoCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.skuSubmitTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">商品提交识别</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuSubmitTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">商品提交识别</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuSubmitTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.skuCallbackTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">商品识别响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuCallbackTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">商品识别响应</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.skuCallbackTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<el-timeline v-if="detail.payTime">
|
||||
<el-timeline-item placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="info" style="width: 120px">订单结算</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.payTime }}</span>
|
||||
<div>
|
||||
<el-tag type="info" style="width: 120px">订单结算</el-tag>
|
||||
<span class="color-primary ml-2">{{ detail.payTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
@@ -63,7 +83,8 @@
|
||||
<div class="el-timeline-right-content">
|
||||
<el-tag type="danger" style="width: 120px">错误</el-tag>
|
||||
<span class="color-danger ml-2">{{ detail.errorDesc }}</span>
|
||||
<el-button v-if="!detail?.hardAuth?.manualChangeUserId" class="ml-2" link @click="visibleErrorChangeDiaog = true">
|
||||
<el-button v-if="!detail?.hardAuth?.manualChangeUserId" class="ml-2" link
|
||||
@click="visibleErrorChangeDiaog = true">
|
||||
处理
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -84,15 +105,10 @@
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-dialog
|
||||
title="手动处理智能柜订单"
|
||||
width="30%"
|
||||
@close="dialogClose"
|
||||
v-model="visibleErrorChangeDiaog"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
>
|
||||
<el-form ref="formRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="formLoading">
|
||||
<el-dialog title="手动处理智能柜订单" width="30%" @close="dialogClose" v-model="visibleErrorChangeDiaog"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-form ref="formRef" :model="form" :rules="dataRules" formDialogRef label-width="90px"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="设备名" prop="image">
|
||||
@@ -101,7 +117,8 @@
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="处理原因" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入处理原因" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
<el-input v-model="form.remark" placeholder="请输入处理原因" type="textarea"
|
||||
:autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -171,7 +188,7 @@ const dialogClose = async () => {
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
const valid = await formRef.value.validate().catch(() => {})
|
||||
const valid = await formRef.value.validate().catch(() => { })
|
||||
if (!valid) return false
|
||||
try {
|
||||
formLoading.value = true
|
||||
@@ -189,7 +206,32 @@ onMounted(() => {
|
||||
getFlow()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.flow_coll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
// 时间线样式调整
|
||||
:deep(.el-timeline) {
|
||||
margin: 10px 0 0 160px;
|
||||
@@ -207,16 +249,17 @@ onMounted(() => {
|
||||
|
||||
.el-timeline-right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
min-height: 30px;
|
||||
padding: 10px;
|
||||
background-color: #409eff;
|
||||
background-color: #b0d8ff;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 13px;
|
||||
border-color: transparent #409eff transparent transparent;
|
||||
border-color: transparent #b0d8ff transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 8px;
|
||||
content: "";
|
||||
@@ -232,7 +275,7 @@ onMounted(() => {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
background: #409eff;
|
||||
background: #b0d8ff;
|
||||
border-radius: 50%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -48,7 +48,7 @@ const openDialog = async (id: string) => {
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
const valid = await dataFormRef.value.validate().catch(() => { })
|
||||
if (!valid) return false
|
||||
try {
|
||||
loading.value = true
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn")
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -52,7 +52,7 @@
|
||||
<el-table-column label="开门流程">
|
||||
<el-table-column prop="requestOpenDto" label="请求开门参数" width="180">
|
||||
<template #default="{ row }">
|
||||
:json="row.requestOpenDto" />
|
||||
<preview-json :json="row.requestOpenDto" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requestOpenVo" label="请求开门返回" width="180">
|
||||
|
||||
@@ -21,8 +21,10 @@
|
||||
<el-descriptions-item label="设备名称:">{{ state.deviceDetail.hardName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="设备IMEI卡号:">{{ state.deviceDetail.imei }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货柜数量:">{{ state.deviceDetail.cabinetNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单个货柜摄像头数量:">{{ state.deviceDetail.cabinetCameraNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单个货柜称重单元数量:">{{ state.deviceDetail.cabinetWeightUnitNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单个货柜摄像头数量:">{{ state.deviceDetail.cabinetCameraNum
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单个货柜称重单元数量:">{{ state.deviceDetail.cabinetWeightUnitNum
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="SIM卡号:">{{ state.deviceDetail.simSn }}</el-descriptions-item>
|
||||
<el-descriptions-item label="柜子层数:">{{ state.deviceDetail.doorCount }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -52,13 +54,15 @@
|
||||
<el-descriptions-item>
|
||||
{{ state.deviceDetail.signalIntensity }}
|
||||
<template #label>
|
||||
SIM信号强度<tip content="大于 -95 表示信号强度好;-95 到 -105 表示信号强度中等;小于 -105 表示信号差" />:
|
||||
SIM信号强度
|
||||
<tip content="大于 -95 表示信号强度好;-95 到 -105 表示信号强度中等;小于 -105 表示信号差" />:
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
{{ state.deviceDetail.signalRatio }}
|
||||
<template #label>
|
||||
信噪比<tip content="用于体现信道传输质量的参数。大于 15 表示质量好;15 到 0 表示质量中等;小于等于 0 表示质量差" />:
|
||||
信噪比
|
||||
<tip content="用于体现信道传输质量的参数。大于 15 表示质量好;15 到 0 表示质量中等;小于等于 0 表示质量差" />:
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="SIM信号值更新时间:">{{ state.deviceDetail.signalTime }}</el-descriptions-item>
|
||||
@@ -69,28 +73,21 @@
|
||||
<template v-if="state.deviceDetail" #extra>
|
||||
<el-space>
|
||||
<el-button icon="RefreshRight" type="primary" @click="refreshCabinetQrCode">刷新货柜二维码</el-button>
|
||||
<el-button icon="CircleCheck" type="primary" @click="checkOpenAccess" :disabled="checkCloseLoading" :loading="checkOpenLoading">
|
||||
<el-button icon="CircleCheck" type="primary" @click="checkOpenAccess"
|
||||
:disabled="checkCloseLoading" :loading="checkOpenLoading">
|
||||
检修开门
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="CircleClose"
|
||||
type="primary"
|
||||
@click="checkCloseAccess"
|
||||
:disabled="checkOpenLoading"
|
||||
:loading="checkCloseLoading"
|
||||
>
|
||||
<el-button icon="CircleClose" type="primary" @click="checkCloseAccess"
|
||||
:disabled="checkOpenLoading" :loading="checkCloseLoading">
|
||||
检修关门
|
||||
</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<el-tabs v-if="state.deviceDetail" type="border-card" @tab-click="doorTabClick">
|
||||
<el-tab-pane
|
||||
v-if="state.deviceDetail.cabinetList?.length"
|
||||
<el-tab-pane v-if="state.deviceDetail.cabinetList?.length"
|
||||
:label="state.deviceDetail.deviceCode + '-' + item.cabinetNo"
|
||||
v-for="(item, index) in state.deviceDetail.cabinetList"
|
||||
:key="index"
|
||||
>
|
||||
v-for="(item, index) in state.deviceDetail.cabinetList" :key="index">
|
||||
<el-descriptions :column="3" title="" border>
|
||||
<el-descriptions-item label="货柜号:">{{ item.cabinetNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="锁在线:">
|
||||
@@ -111,20 +108,26 @@
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="收款二维码:">
|
||||
<div class="flex justify-start">
|
||||
<preview-image
|
||||
:src="item.qrCode"
|
||||
download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} 二维码`"
|
||||
/>
|
||||
<preview-image :src="item.qrCode" download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} 二维码`" />
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="收款二维码(url):">
|
||||
<div class="flex justify-start">
|
||||
<preview-image
|
||||
:src="item.urlQrCode"
|
||||
download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} url二维码`"
|
||||
/>
|
||||
<preview-image :src="item.urlQrCode" download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} url二维码`" />
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付宝收款二维码(url):">
|
||||
<div class="flex justify-start">
|
||||
<preview-image :src="item.urlAlipayQrCode" download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} url二维码`" />
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="微信收款二维码(url):">
|
||||
<div class="flex justify-start">
|
||||
<preview-image :src="item.urlWechatQrCode" download
|
||||
:downloadName="`货柜 ${state.deviceDetail.deviceCode}-${item.cabinetNo} url二维码`" />
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@@ -139,32 +142,31 @@
|
||||
</el-descriptions>
|
||||
|
||||
<el-tabs v-if="state.deviceDetail" type="border-card" @tab-click="tabClick">
|
||||
<el-tab-pane
|
||||
v-if="state.deviceDetail.cabinetList?.length"
|
||||
<el-tab-pane v-if="state.deviceDetail.cabinetList?.length"
|
||||
:label="state.deviceDetail.deviceCode + '-' + item.cabinetNo"
|
||||
v-for="(item, index) in state.deviceDetail.cabinetList"
|
||||
:key="index"
|
||||
>
|
||||
v-for="(item, index) in state.deviceDetail.cabinetList" :key="index">
|
||||
<div v-for="(floorItem, floorIndex) in state.cabinetData" :key="floorIndex">
|
||||
<el-divider />
|
||||
<div class="text-black flex items-center">
|
||||
<div class="text-center w-24 text-lg font-bold">第 {{ floorIndex + 1 }} 层:</div>
|
||||
<div class="flex flex-wrap">
|
||||
<div class="flex flex-col items-center justify-start" v-for="(v, indexNo) in floorItem[floorIndex + 1]" :key="indexNo">
|
||||
<div v-if="v.spuId && v.spuDetail" class="w-24 mx-4 my-1 flex flex-col items-center">
|
||||
<div class="flex flex-col items-center justify-start"
|
||||
v-for="(v, indexNo) in floorItem[floorIndex + 1]" :key="indexNo">
|
||||
<div v-if="v.spuId && v.spuDetail"
|
||||
class="w-24 mx-4 my-1 flex flex-col items-center">
|
||||
<div class="relative">
|
||||
<el-icon @click.stop="deleteGoods(v)" class="absolute right-[-8px] top-[-8px] text-xl text-blue-600 z-50">
|
||||
<el-icon @click.stop="deleteGoods(v)"
|
||||
class="absolute right-[-8px] top-[-8px] text-xl text-blue-600 z-50">
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<preview-image width="96px" height="86px" :src="v.spuDetail.pic" @click.stop />
|
||||
<preview-image width="96px" height="86px" :src="v.spuDetail.pic"
|
||||
@click.stop />
|
||||
</div>
|
||||
<el-tooltip effect="dark" :content="v.spuDetail?.name">
|
||||
<div class="line-clamp-1">{{ v.spuDetail?.name }}</div>
|
||||
</el-tooltip>
|
||||
<div
|
||||
class="color-primary w-full flex items-center"
|
||||
:class="v.spuDetail.specsCapacity ? 'justify-between' : 'justify-center'"
|
||||
>
|
||||
<div class="color-primary w-full flex items-center"
|
||||
:class="v.spuDetail.specsCapacity ? 'justify-between' : 'justify-center'">
|
||||
<span>{{ displayPrice(v.spuDetail.price) }}</span>
|
||||
<span>{{ v.spuDetail.specsCapacity }}</span>
|
||||
</div>
|
||||
@@ -178,11 +180,9 @@
|
||||
<span>已售:{{ v.spuDetail.salesCount || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
<div v-else
|
||||
class="bg-blue-50 w-24 h-20 border border-black mx-4 my-1 flex items-center justify-center cursor-pointer rounded-lg"
|
||||
@click="clickPutaway(v.id)"
|
||||
>
|
||||
@click="clickPutaway(v.id)">
|
||||
点击上架
|
||||
</div>
|
||||
</div>
|
||||
@@ -433,6 +433,7 @@ const deleteGoods = async (v: any) => {
|
||||
.el-descriptions__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
width: 3px;
|
||||
@@ -445,14 +446,17 @@ const deleteGoods = async (v: any) => {
|
||||
|
||||
.el-descriptions-item__container {
|
||||
margin: 0 10px;
|
||||
|
||||
.no-colon {
|
||||
margin: 0;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-timeline-right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -470,6 +474,7 @@ const deleteGoods = async (v: any) => {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
// 时间线样式调整
|
||||
:deep(.el-timeline) {
|
||||
margin: 10px 0 0 160px;
|
||||
|
||||
@@ -19,10 +19,13 @@
|
||||
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
<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-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<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>
|
||||
@@ -31,34 +34,22 @@
|
||||
<el-row>
|
||||
<!-- :export="'sys_audit_export'" -->
|
||||
<div class="mb8" style="width: 100%">
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@exportExcel="exportExcel"
|
||||
@queryTable="getDataList"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
/>
|
||||
<right-toolbar v-model:showSearch="showSearch" @exportExcel="exportExcel" @queryTable="getDataList"
|
||||
class="ml10 mr20" style="float: right" />
|
||||
</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"
|
||||
:show-summary="false"
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
<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" :show-summary="false" :summary-method="getSummaries">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column width="200" label="用户">
|
||||
<template #default="{ row }">
|
||||
<div class="flex flex-row items-center justify-center">
|
||||
<preview-image width="50px" height="50px" :src="row.userAvatar" />
|
||||
<div class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||
<div
|
||||
class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||
<span> {{ row.username }}</span>
|
||||
<span> {{ row.userMobile }}</span>
|
||||
</div>
|
||||
@@ -185,20 +176,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.orderStatus == 2"
|
||||
icon="VideoPlay"
|
||||
v-auth="'hard_hardwareOrder_offlinePay'"
|
||||
text
|
||||
@click="submitPay(row)"
|
||||
type="primary"
|
||||
>
|
||||
<el-button v-if="row.orderStatus == 2" icon="VideoPlay" v-auth="'hard_hardwareOrder_offlinePay'"
|
||||
text @click="submitPay(row)" type="primary">
|
||||
确认支付
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
</template>
|
||||
@@ -206,12 +192,11 @@
|
||||
<script setup lang="ts" name="systemHardwareOrder">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as hardOrder from "/@/api/hard/hard-order"
|
||||
import * as hardInvoice from "/@/api/hard/hard-invoice"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import { ElLoading, TableColumnCtx } from "element-plus"
|
||||
import { TableColumnCtx } from "element-plus"
|
||||
import { VNode } from "vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
@@ -334,36 +319,36 @@ const getSummaries = (param: SummaryMethodProps) => {
|
||||
}
|
||||
if (column.property === "paymentInformation") {
|
||||
const priceVNode: VNode[] & string[] = []
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||
} else {
|
||||
sums[index] = ""
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 300px" label="用户" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="商户" prop="mchIds">
|
||||
<select-mch v-model="state.queryForm.mchIds" :apiParams="{ parentIsNull: false }" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="设备类型" prop="hardTypeCode">
|
||||
<dict-select v-model="state.queryForm.hardTypeCode" dict-code="hard_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
||||
<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-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 v-model:showSearch="showSearch" @exportExcel="exportExcel" @queryTable="getDataList"
|
||||
class="ml10 mr20" style="float: right" />
|
||||
</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" :show-summary="false" :summary-method="getSummaries">
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column width="200" label="用户">
|
||||
<template #default="{ row }">
|
||||
<div class="flex flex-row items-center justify-center">
|
||||
<preview-image width="50px" height="50px" :src="row.userAvatar" />
|
||||
<div
|
||||
class="flex flex-col ml-2 items-start cursor-pointer hover:underline hover:text-blue-500">
|
||||
<span> {{ row.username }}</span>
|
||||
<span> {{ row.userMobile }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200px" label="商品">
|
||||
<template #default="{ row }">
|
||||
<div class="desc">
|
||||
<span>商品</span>
|
||||
<el-tooltip :content="row.productDesc" placement="top-start">
|
||||
<span class="text-line">{{ row.productDesc }}</span>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="status" v-if="row.hourType">
|
||||
<span>用餐时间段</span>
|
||||
<span>
|
||||
<dict-tag :options="daily_menu" :value="row.hourType" />
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="250px" label="设备信息">
|
||||
<template #default="{ row }">
|
||||
<div class="status">
|
||||
<span>商户</span>
|
||||
<span>
|
||||
{{ row.merchantName }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>设备名</span>
|
||||
<span>
|
||||
{{ row.hardName }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>设备类型</span>
|
||||
<span>
|
||||
<dict-tag :options="hard_type" :value="row.hardType" />
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="250px" label="订单信息">
|
||||
<template #default="{ row }">
|
||||
<div class="status">
|
||||
<span>订单类型</span>
|
||||
<span>
|
||||
<dict-tag :options="hard_order_type" :value="row.orderType" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>支付方式</span>
|
||||
<span>
|
||||
<dict-tag :options="hard_pay_type" :value="row.payType" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>订单状态</span>
|
||||
<span>
|
||||
<dict-tag :options="hard_order_status" :value="row.orderStatus" />
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200px" prop="paymentInformation" label="付款信息">
|
||||
<template #default="{ row }">
|
||||
<div class="status">
|
||||
<span>商品总价</span>
|
||||
<span class="color-success">
|
||||
{{ displayPrice(row.totalPrice, "元", 2) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>额外支付</span>
|
||||
<span class="color-danger">
|
||||
{{ displayPrice(row.extraPrice, "元", 2) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>实际支付</span>
|
||||
<span class="color-primary">
|
||||
{{ displayPrice(row.payPrice, "元", 2) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="270px" label="退款信息">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.payRefundId">
|
||||
<div class="status">
|
||||
<span>退款金额</span>
|
||||
<span class="color-success">
|
||||
{{ displayPrice(row.refundPrice, "元", 2) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>退款状态</span>
|
||||
<span class="color-success">
|
||||
<dict-tag :options="hard_refund_status" :value="row.refundStatus" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>退款时间</span>
|
||||
<span>
|
||||
{{ row.refundTime }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="250px">
|
||||
<template #default="{ row }">
|
||||
<div class="status">
|
||||
<span>创建时间</span>
|
||||
<span>{{ row.createTime }} </span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>支付时间</span>
|
||||
<span>{{ row.payTime }} </span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="InfoFilled" link type="primary" @click="doRefund(row)">
|
||||
订单详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="hard-recog">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as hardOrder from "/@/api/hard/hard-order"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import { VNode } from "vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 定义查询字典
|
||||
const { hard_pay_type, hard_order_type, hard_order_status, hard_type, hard_refund_status, daily_menu } = useDict(
|
||||
"hard_pay_type",
|
||||
"hard_order_type",
|
||||
"hard_order_status",
|
||||
"hard_type",
|
||||
"hard_refund_status",
|
||||
"daily_menu",
|
||||
)
|
||||
|
||||
// 定义变量内容
|
||||
const tabList = ref<any>([{}])
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {
|
||||
},
|
||||
pageList: hardOrder.noRecogPageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await getDicts("hard_order_type")
|
||||
data.unshift({ label: "全部", value: null })
|
||||
tabList.value = data
|
||||
})
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
state.queryForm.deptId = ""
|
||||
state.queryForm.deptIds = []
|
||||
// draggableDepTreeRef.value.resetData()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/hard/hard-order/export", Object.assign(state.queryForm, { ids: selectObjs }), "订单记录.xlsx")
|
||||
}
|
||||
|
||||
const doRefund = (row: any) => {
|
||||
push({ path: "/hard/hard-after-sale/order-refund", query: { id: row.id, type: "view" } })
|
||||
}
|
||||
|
||||
// 表格行尾合计
|
||||
const getSummaries = (param: SummaryMethodProps) => {
|
||||
const { columns, data } = param
|
||||
const sums: (string | VNode | number)[] = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = "合计"
|
||||
return
|
||||
}
|
||||
if (column.property === "paymentInformation") {
|
||||
const priceVNode: VNode[] & string[] = []
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
"元",
|
||||
2,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||
} else {
|
||||
sums[index] = ""
|
||||
}
|
||||
})
|
||||
|
||||
return sums
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.text-line {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -40,7 +40,7 @@
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="单价" prop="price">
|
||||
<el-input-number :precision="2" :min="0" :step="1" v-model="form.price" placeholder="" />
|
||||
<el-input-number :precision="2" :min="0" :step="0.1" v-model="form.price" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
@@ -174,7 +174,7 @@ const gethardSpuData = (id: string) => {
|
||||
hardSpu
|
||||
.getObj(id)
|
||||
.then((res: any) => {
|
||||
Object.assign(form, res.data, { price: Number(displayPrice(res.data.price, "", 0)) })
|
||||
Object.assign(form, res.data, { price: displayPrice(res.data.price, "") })
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
|
||||
@@ -13,39 +13,32 @@
|
||||
<select-hard-spu-category v-model="state.queryForm.spuCategoryId" placeholder="请输入商品分类" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn") }}</el-button>
|
||||
<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%">
|
||||
<el-button icon="Refresh" type="primary" class="ml10" @click="syncAll" v-auth="'hard_hardSpu_add'"> 拉取商品 </el-button>
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'hard_hardSpu_add'">
|
||||
<el-button icon="Refresh" type="primary" class="ml10" @click="syncAll" v-auth="'hard_hardSpu_add'">
|
||||
拉取商品 </el-button>
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'hard_hardSpu_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'hard_hardSpu_del'" @click="handleDelete(selectObjs)">
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'hard_hardSpu_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'hard_hardSpu_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'hard_hardSpu_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 :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="80" />
|
||||
<el-table-column prop="name" width="120" label="商品名" />
|
||||
@@ -107,34 +100,24 @@
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<template #default="{ row }">
|
||||
<div class="flex">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardSpu_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardSpu_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.skuType != '0'"
|
||||
icon="CircleCheck"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardSpu_edit'"
|
||||
@click="checkProgRessRef.openDialog(row.id)"
|
||||
>
|
||||
<el-button v-if="row.skuType != '0'" icon="CircleCheck" text type="primary"
|
||||
v-auth="'hard_hardSpu_edit'" @click="checkProgRessRef.openDialog(row.id)">
|
||||
审核进度
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.skuType != '0'"
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardSpu_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>
|
||||
<el-button v-if="row.skuType != '0'" icon="delete" text type="primary"
|
||||
v-auth="'hard_hardSpu_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
@@ -194,12 +177,13 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
|
||||
// 同步全部
|
||||
const syncAll = async () => {
|
||||
const spuName = state.queryForm.name
|
||||
try {
|
||||
await useMessageBox().confirm("是否同步全部商品")
|
||||
await useMessageBox().confirm(`是否同步${spuName ? `关键字为[${spuName}]的` : "全部"}商品`)
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
hardSpu.asyncAll()
|
||||
hardSpu.asyncAll({ name: spuName })
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<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="bizType">
|
||||
<el-input v-model="form.bizType" placeholder="请输入上架类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="授权id" prop="authId">
|
||||
<el-input v-model="form.authId" placeholder="请输入授权id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="流程id" prop="flowId">
|
||||
<el-input v-model="form.flowId" placeholder="请输入流程id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="外部订单号" prop="outOrderNo">
|
||||
<el-input v-model="form.outOrderNo" placeholder="请输入外部订单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="第三方订单号" prop="thirdOrderNo">
|
||||
<el-input v-model="form.thirdOrderNo" placeholder="请输入第三方订单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="创建订单时间" prop="createOrderTime">
|
||||
<el-input v-model="form.createOrderTime" placeholder="请输入创建订单时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="支付时间" prop="payOrderTime">
|
||||
<el-input v-model="form.payOrderTime" placeholder="请输入支付时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="退款时间" prop="refundOrderTime">
|
||||
<el-input v-model="form.refundOrderTime" placeholder="请输入退款时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input v-model="form.orderStatus" placeholder="请输入订单状态" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="原始json数据" prop="orgJson">
|
||||
<el-input v-model="form.orgJson" placeholder="请输入原始json数据" />
|
||||
</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="HardThirdMiOrderDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import * as thirdMiOrderApi from '/@/api/hard/hard-third-mi-order'
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref();
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
bizType: '',
|
||||
userId: '',
|
||||
authId: '',
|
||||
flowId: '',
|
||||
orderId: '',
|
||||
outOrderNo: '',
|
||||
thirdOrderNo: '',
|
||||
createOrderTime: '',
|
||||
payOrderTime: '',
|
||||
refundOrderTime: '',
|
||||
orderStatus: '',
|
||||
orgJson: '',
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ''
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
|
||||
// 获取hardThirdMiOrder信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
gethardThirdMiOrderData(id)
|
||||
}
|
||||
};
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => { });
|
||||
if (!valid) return false;
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await thirdMiOrderApi.putObj(form) : await thirdMiOrderApi.addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 初始化表单数据
|
||||
const gethardThirdMiOrderData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
thirdMiOrderApi.getObj(id).then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
};
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'thirdmi_hardThirdMiOrder_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'thirdmi_hardThirdMiOrder_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'thirdmi_hardThirdMiOrder_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 label="上架类型" width="150">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="mi_type" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户id" show-overflow-tooltip />
|
||||
<el-table-column prop="authId" label="授权id" show-overflow-tooltip />
|
||||
<el-table-column prop="flowId" label="流程id" show-overflow-tooltip />
|
||||
<el-table-column prop="orderId" label="订单id" show-overflow-tooltip />
|
||||
<el-table-column prop="outOrderNo" label="外部订单号" show-overflow-tooltip />
|
||||
<el-table-column prop="thirdOrderNo" label="第三方订单号" show-overflow-tooltip />
|
||||
<el-table-column label="时间" width="250">
|
||||
<template #default="{ row }">
|
||||
<div class="status">
|
||||
<span>创建时间:</span>
|
||||
<span>{{ row.createOrderTime }} </span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>支付时间:</span>
|
||||
<span v-if="row.payOrderTime">{{ row.payOrderTime }} </span>
|
||||
<span v-else>未支付</span>
|
||||
</div>
|
||||
<div class="status">
|
||||
<span>退款时间:</span>
|
||||
<span v-if="row.refundOrderTime">{{ row.refundOrderTime }} </span>
|
||||
<span v-else>未退款</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="订单状态" show-overflow-tooltip />
|
||||
<el-table-column prop="orgJson" label="原始json数据" show-overflow-tooltip />
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Refresh" text type="primary" @click="refreshOrder(row)">
|
||||
同步
|
||||
</el-button>
|
||||
<el-button icon="Refresh" text type="primary" @click="payOrder(row)">
|
||||
支付
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" @click="handleDelete([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="systemHardThirdMiOrder">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import * as thirdMiOrderApi from '/@/api/hard/hard-third-mi-order'
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
// 定义查询字典
|
||||
const { mi_type } = useDict("mi_type")
|
||||
// 定义变量内容
|
||||
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: thirdMiOrderApi.fetchList
|
||||
})
|
||||
|
||||
// table hook
|
||||
const {
|
||||
getDataList,
|
||||
currentChangeHandle,
|
||||
sizeChangeHandle,
|
||||
sortChangeHandle,
|
||||
downBlobFile,
|
||||
tableStyle
|
||||
} = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/thirdmi/hardThirdMiOrder/export', Object.assign(state.queryForm, { ids: selectObjs }), 'hardThirdMiOrder.xlsx')
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
multiple.value = !objs.length;
|
||||
};
|
||||
|
||||
// 同步订单
|
||||
const refreshOrder = async (row: any) => {
|
||||
try {
|
||||
await thirdMiOrderApi.refreshOrder({ id: row.id });
|
||||
getDataList();
|
||||
useMessage().success('同步成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
}
|
||||
|
||||
// 支付
|
||||
const payOrder = async (row: any) => {
|
||||
try {
|
||||
await thirdMiOrderApi.payOrder({ id: row.id });
|
||||
getDataList();
|
||||
useMessage().success('支付成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm('此操作将永久删除');
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await thirdMiOrderApi.delObjs(ids);
|
||||
getDataList();
|
||||
useMessage().success('删除成功');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -20,38 +20,22 @@
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="RefreshLeft" type="primary" class="ml10" @click="syncAll"> 同步全部 </el-button>
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'wallet_mchDeptUser_add'">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'wallet_mchDeptUser_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'wallet_mchDeptUser_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_mchDeptUser_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_mchDeptUser_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'wallet_mchDeptUser_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 :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="80" />
|
||||
<el-table-column label="商户">
|
||||
@@ -64,21 +48,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_mchDeptUser_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_mchDeptUser_del'" @click="handleDelete([scope.row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_mchDeptUser_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_mchDeptUser_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" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form v-if="showSearch" ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-form v-if="showSearch" ref="queryRef" :inline="true" :model="state.queryForm"
|
||||
@keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 250px" label="商户名" prop="name">
|
||||
<el-input v-model="state.queryForm.name" placeholder="商户名" />
|
||||
@@ -28,41 +29,22 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'wallet_mchManage_add'">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
v-auth="'wallet_mchManage_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'wallet_mchManage_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_mchManage_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删 除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_mchManage_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'wallet_mchManage_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right" @queryTable="getDataList" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
:row-class-name="tableRowClassName"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
:default-expand-all="false"
|
||||
:indent="30"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" :header-cell-style="tableStyle.headerCellStyle"
|
||||
:row-class-name="tableRowClassName" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
:default-expand-all="false" :indent="30" row-key="id">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" align="center" />
|
||||
<el-table-column prop="name" label="商户名" align="left" min-width="160" />
|
||||
@@ -81,7 +63,8 @@
|
||||
<el-table-column prop="collectionUrlCode" width="150" align="center" label="商户url收款码">
|
||||
<template #default="{ row }">
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<preview-image :src="row.collectionUrlCode" download :downloadName="`${row.name} 商户url收款码`" />
|
||||
<preview-image :src="row.collectionUrlCode" download
|
||||
:downloadName="`${row.name} 商户url收款码`" />
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -99,24 +82,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="isSyncZy" label="是否同步正元" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
:disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
v-model="row.isSyncZy"
|
||||
@change="isSyncZyChange(row)"
|
||||
/>
|
||||
<el-switch :disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
active-value="1" inactive-value="0" v-model="row.isSyncZy" @change="isSyncZyChange(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否在移动端展示" min-width="150" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
:disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
v-model="row.visibleMobile"
|
||||
@change="visibleMobileChange(row)"
|
||||
/>
|
||||
<el-switch :disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
active-value="1" inactive-value="0" v-model="row.visibleMobile"
|
||||
@change="visibleMobileChange(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="200" label="支付默认钱包" align="center">
|
||||
@@ -150,28 +124,29 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="addressDes" label="地址" :min-width="160" align="center" />
|
||||
<el-table-column prop="createTime" label="创建时间" :min-width="160" align="center" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
<el-table-column label="操作" fixed="right"
|
||||
v-auths="['wallet_mchManage_refresh_qrcode', 'wallet_mchManage_setting', 'wallet_mchManage_edit', 'wallet_mchManage_del']"
|
||||
min-width="300"
|
||||
align="center"
|
||||
>
|
||||
min-width="300" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="RefreshRight" text type="primary" v-auth="'wallet_mchManage_refresh_qrcode'" @click="refreshQrcode(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 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(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([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>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
@@ -265,7 +240,7 @@ const visibleMobileChange = async (row: any) => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/canteen/merchantInfo/export", Object.assign(state.queryForm, { ids: selectObjs }), "商户管理.xlsx")
|
||||
downBlobFile("/wallet/mch-manage/export", Object.assign(state.queryForm, { ids: selectObjs }), "商户管理.xlsx")
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
<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">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 300px" label="充值金额(元)" prop="priceList">
|
||||
<el-input v-if="false" v-model="state.queryForm.price" placeholder="请输入充值金额(元)" />
|
||||
<el-select v-model="state.queryForm.priceList" multiple filterable allow-create
|
||||
default-first-option :reserve-keyword="false" placeholder="请输入充值金额(元)"
|
||||
style="width: 240px">
|
||||
<el-option v-for="item in state.queryForm.priceList" :key="item" :label="item"
|
||||
:value="item" />
|
||||
</el-select>
|
||||
</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 v-if="false" style="width: 200px" label="充值类型" prop="type">
|
||||
<dict-select v-model="state.queryForm.type" dict-code="wallet_biz_recharge" />
|
||||
</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 :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" :summary-method="getSummaries" :show-summary="true"
|
||||
row-class-name="success-row" @selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle" @expand-change="tableExpandChange">
|
||||
<el-table-column type="expand" width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="ml-[60px] my-2">
|
||||
<el-table :data="getTableChildrenMap(row.mchId)" border
|
||||
:cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle"
|
||||
row-class-name="warning-row">
|
||||
<el-table-column type="index" label="#" width="60" />
|
||||
<el-table-column label="部门" align="center" width="250" prop="deptName" />
|
||||
<el-table-column label="充值金额" align="center" width="250" prop="price">
|
||||
<template #default="{ row }">
|
||||
<span>{{ displayPrice(row.price) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值人数" align="center" width="250" prop="personCount">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">{{ row.personCount || 0 }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值次数" align="center" prop="timeCount">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">{{ row.timeCount || 0 }}次</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="#" width="60" />
|
||||
<el-table-column label="所属食堂" align="center" width="250" prop="mchName" />
|
||||
<el-table-column label="充值金额" align="center" width="250" prop="price">
|
||||
<template #default="{ row }">
|
||||
<span>{{ displayPrice(row.price) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值人数" align="center" width="250" prop="personCount">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">{{ row.personCount || 0 }}人</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="充值次数" align="center" prop="timeCount">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">{{ row.timeCount || 0 }}次</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemWalletRecharge">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as walletTransactionApi from "/@/api/wallet/wallet-transaction"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
isPage: false,
|
||||
queryForm: {},
|
||||
pageList: walletTransactionApi.pageCzTotal,
|
||||
})
|
||||
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
const draggableDepTreeRef = ref()
|
||||
|
||||
const tableChildrenMap = ref(new Map<string, any>())
|
||||
|
||||
// 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()
|
||||
}
|
||||
|
||||
// 点击table展开行
|
||||
const tableExpandChange = async (e: any) => {
|
||||
try {
|
||||
const { data } = await walletTransactionApi.listDeptCzTotal({
|
||||
mchId: e.mchId,
|
||||
...state.queryForm
|
||||
})
|
||||
if (data && data.length) {
|
||||
tableChildrenMap.value.set(e.mchId, data)
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
const getTableChildrenMap = (key: string) => {
|
||||
return tableChildrenMap.value.get(key)
|
||||
}
|
||||
|
||||
// 树节点选择时
|
||||
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()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-transaction/export-cz-total-person",
|
||||
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", "personCount", "timeCount"]
|
||||
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) => Number(pren) + Number(next), 0)
|
||||
if (i.property === "price") {
|
||||
totalRow[index] = displayPrice(total)
|
||||
} else {
|
||||
totalRow[index] = total
|
||||
}
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
</style>
|
||||
@@ -14,6 +14,9 @@
|
||||
<dict-select v-model="state.queryForm.bizType" dict-code="wallet_biz_recharge"
|
||||
placeholder="充值类型" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="发票号" prop="invoiceCode">
|
||||
<el-input v-model="state.queryForm.invoiceCode" placeholder="发票号" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="创建时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange" />
|
||||
@@ -24,7 +27,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t("common.queryBtn")
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -64,6 +67,12 @@
|
||||
<dict-tag :options="wallet_biz_recharge" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceCode" width="120" label="发票号">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.invoiceCode">{{ row.invoiceCode }}</span>
|
||||
<span class="color-danger" v-else>无发票</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeId" width="200" label="饭卡类型">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center justify-center">
|
||||
|
||||
Reference in new issue
Block a user