Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-pc-cloud
This commit is contained in:
commit
39cce615b3
8 files changed
+485
-854
No files matched your search
@@ -4,15 +4,11 @@
|
||||
<!-- 树 -->
|
||||
<div v-loading="state.loading" class="h-full flex flex-col m-1">
|
||||
<!-- 头部区域 -->
|
||||
<div class="flex items-center pb-2 shadow-gray-400 z-10" style="box-shadow: 0 8px 8px -8px rgba(0, 0, 0, 0.1)">
|
||||
<div class="flex items-center pb-2 shadow-gray-400 z-10"
|
||||
style="box-shadow: 0 8px 8px -8px rgba(0, 0, 0, 0.1)">
|
||||
<div class="w-4/5">
|
||||
<el-input
|
||||
v-model="state.searchName"
|
||||
suffix-icon="search"
|
||||
:placeholder="placeholder"
|
||||
clearable
|
||||
@change="handleSearchInputChange"
|
||||
/>
|
||||
<el-input v-model="state.searchName" suffix-icon="search" :placeholder="placeholder" clearable
|
||||
@change="handleSearchInputChange" />
|
||||
</div>
|
||||
<div class="flex-1 ml-[5%] leading-none" v-if="showExpand">
|
||||
<el-dropdown :hide-on-click="false">
|
||||
@@ -24,10 +20,8 @@
|
||||
<el-dropdown-item>
|
||||
<el-button
|
||||
class="!h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
|
||||
link
|
||||
:icon="state.isExpand ? 'expand' : 'fold'"
|
||||
@click="toggleRowExpansionAll(state.isExpand ? false : true)"
|
||||
>
|
||||
link :icon="state.isExpand ? 'expand' : 'fold'"
|
||||
@click="toggleRowExpansionAll(state.isExpand ? false : true)">
|
||||
{{ state.isExpand ? "折叠" : "展开" }}
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
@@ -39,20 +33,12 @@
|
||||
|
||||
<!-- 树形结构 -->
|
||||
<div class="flex-1 overflow-hidden hover:overflow-auto">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:props="props.props"
|
||||
:data="state.treeDataList"
|
||||
:expand-on-click-node="false"
|
||||
node-key="id"
|
||||
:highlight-current="nodeClickable ? true : false"
|
||||
default-expand-all
|
||||
show-checkbox
|
||||
@node-click="handleNodeClick"
|
||||
@check="handleCheck"
|
||||
>
|
||||
<el-tree ref="treeRef" :props="props.props" :data="state.treeDataList" :expand-on-click-node="false"
|
||||
node-key="id" :highlight-current="nodeClickable ? true : false" default-expand-all show-checkbox
|
||||
@node-click="handleNodeClick" @check="handleCheck">
|
||||
<template #default="{ node, data }">
|
||||
<el-tooltip v-if="data.isLock" effect="dark" :content="$t('sysuser.noDataScopeTip')" placement="right">
|
||||
<el-tooltip v-if="data.isLock" effect="dark" :content="$t('sysuser.noDataScopeTip')"
|
||||
placement="right">
|
||||
<span>
|
||||
{{ node.label }}
|
||||
<SvgIcon name="ele-Lock" />
|
||||
@@ -63,27 +49,19 @@
|
||||
</div>
|
||||
|
||||
<!-- 底部区域 -->
|
||||
<div
|
||||
class="flex justify-center items-center pt-2 z-50 sticky bottom-0 overflow-hidden"
|
||||
style="box-shadow: 0 -8px 8px -8px rgba(0, 0, 0, 0.1)"
|
||||
>
|
||||
<el-switch
|
||||
v-model="state.switch"
|
||||
@change="handleSwitchChange"
|
||||
:inactive-text="switchInactiveText"
|
||||
<div class="flex justify-center items-center pt-2 z-50 sticky bottom-0 overflow-hidden"
|
||||
style="box-shadow: 0 -8px 8px -8px rgba(0, 0, 0, 0.1)">
|
||||
<el-switch v-model="state.switch" @change="handleSwitchChange" :inactive-text="switchInactiveText"
|
||||
:active-text="switchActiveText"
|
||||
:disabled="nodeClickable && state.checkedTreeNodes.length > 0"
|
||||
/>
|
||||
:disabled="nodeClickable && state.checkedTreeNodes.length > 0" />
|
||||
</div>
|
||||
</div>
|
||||
</pane>
|
||||
|
||||
<pane :size="100 - state.treeWidth" class="pl-1 relative">
|
||||
<!-- 折叠按钮 -->
|
||||
<div
|
||||
class="w-[12px] h-[56px] bg-gray-200 absolute left-0 top-[44vh] translate-y-[-50%] transition-all cursor-pointer rounded-tr-2xl rounded-br-2xl"
|
||||
@click="handleClickTreeFold()"
|
||||
>
|
||||
<div class="w-[12px] h-[56px] bg-gray-200 absolute left-0 top-[44vh] translate-y-[-50%] transition-all cursor-pointer rounded-tr-2xl rounded-br-2xl"
|
||||
@click="handleClickTreeFold()">
|
||||
<i class="text-gray-400 inline-block text-center leading-[62px] hover:opacity-50">
|
||||
<el-icon>
|
||||
<ArrowLeftBold v-if="state.treeWidth > 0" />
|
||||
@@ -236,17 +214,19 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.splitpanes--vertical > .splitpanes__splitter {
|
||||
.splitpanes--vertical>.splitpanes__splitter {
|
||||
background: var(--el-color-primary);
|
||||
/* min-width: 2px; */
|
||||
width: 2px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.splitpanes--vertical > .splitpanes__splitter:active {
|
||||
|
||||
.splitpanes--vertical>.splitpanes__splitter:active {
|
||||
background: var(--el-color-primary);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.splitpanes--vertical > .splitpanes__splitter:hover {
|
||||
|
||||
.splitpanes--vertical>.splitpanes__splitter:hover {
|
||||
background: var(--el-color-primary);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
<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"
|
||||
>
|
||||
<DraggableDepTree ref="draggableDepTreeRef" placeholder="请输入部门名称" :show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode" switch-inactive-text="包含" switch-active-text="不包含"
|
||||
:defaultTreeWidth="20" :nodeClickable="false">
|
||||
<template #default>
|
||||
<el-row v-show="showSearch">
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
@@ -31,27 +24,12 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'userFace_sysUserFace_del'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
@click="handleDelete(selectIds)"
|
||||
>
|
||||
<el-button plain v-auth="'userFace_sysUserFace_del'" :disabled="multiple" class="ml10"
|
||||
icon="Delete" type="primary" @click="handleDelete(selectIds)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
v-auth="'sys_user_del'"
|
||||
v-if="activeName == '1'"
|
||||
:disabled="multiple"
|
||||
class="ml10"
|
||||
icon="VideoPlay"
|
||||
type="primary"
|
||||
@click="doBatchDeal"
|
||||
>
|
||||
<el-button plain v-auth="'sys_user_del'" v-if="activeName == '1'" :disabled="multiple"
|
||||
class="ml10" icon="VideoPlay" type="primary" @click="doBatchDeal">
|
||||
审批
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -59,15 +37,9 @@
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
:data="state.dataList"
|
||||
row-key="userId"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
>
|
||||
<el-table v-loading="state.loading" :data="state.dataList" row-key="userId"
|
||||
@selection-change="handleSelectionChange" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle">
|
||||
<el-table-column :selectable="handleSelectable" type="selection" width="40" />
|
||||
<el-table-column label="#" type="index" width="60" fixed="left" />
|
||||
<el-table-column label="姓名" prop="username" fixed="left" show-overflow-tooltip />
|
||||
@@ -87,21 +59,17 @@
|
||||
<el-table-column label="审核时间" prop="processTime" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column label="操作" min-width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="row.isCheckUser && row.processStatus != '2'"
|
||||
size="small"
|
||||
link
|
||||
icon="VideoPlay"
|
||||
@click="deal(row)"
|
||||
>
|
||||
<el-button type="primary" v-if="row.isCheckUser && row.processStatus != '2'"
|
||||
size="small" link icon="VideoPlay" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" icon="Delete" @click="delFace(row)">删除</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" icon="Delete"
|
||||
@click="delFace(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle" @size-change="sizeChangeHandle" />
|
||||
<pagination v-bind="state.pagination" @current-change="currentChangeHandle"
|
||||
@size-change="sizeChangeHandle" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
|
||||
+311
-252
@@ -1,228 +1,288 @@
|
||||
<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="merchantType">
|
||||
<dict-select v-model="state.queryForm.merchantType" dict-code="merchant_type" />
|
||||
</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: 300px" label="用户部门" prop="deptId">
|
||||
<select-dept v-model="state.queryForm.deptId" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="用餐时间段" prop="hourType">
|
||||
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="订单状态" prop="orderStatus">
|
||||
<dict-select v-model="state.queryForm.orderStatus" dict-code="hard_order_status" />
|
||||
</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>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-if="tabList && tabList.length" v-model="activeName" @tab-click="handleClick">
|
||||
<div v-for="v in tabList" :key="v.value">
|
||||
<el-tab-pane :label="v.label" :name="v.value">
|
||||
<div></div>
|
||||
</el-tab-pane>
|
||||
<DraggableDepTree
|
||||
ref="draggableDepTreeRef"
|
||||
placeholder="请输入部门名称"
|
||||
:show-expand="true"
|
||||
@getSelectNode="handleGetSelectNode"
|
||||
switch-inactive-text="包含"
|
||||
switch-active-text="不包含"
|
||||
:defaultTreeWidth="20"
|
||||
:nodeClickable="false"
|
||||
>
|
||||
<template #default>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row>
|
||||
<el-form-item style="width: 300px" label="用户" prop="userIds">
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="商户类型" prop="merchantType">
|
||||
<dict-select v-model="state.queryForm.merchantType" dict-code="merchant_type" />
|
||||
</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: 300px" label="用户部门" prop="deptId">
|
||||
<select-dept v-model="state.queryForm.deptId" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="用餐时间段" prop="hourType">
|
||||
<dict-select v-model="state.queryForm.hourType" dict-code="daily_menu" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="订单状态" prop="orderStatus">
|
||||
<dict-select v-model="state.queryForm.orderStatus" dict-code="hard_order_status" />
|
||||
</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>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-if="tabList && tabList.length" v-model="activeName" @tab-click="handleClick">
|
||||
<div v-for="v in tabList" :key="v.value">
|
||||
<el-tab-pane :label="v.label" :name="v.value">
|
||||
<div></div>
|
||||
</el-tab-pane>
|
||||
</div>
|
||||
</el-tabs>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'sys_audit_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10"
|
||||
style="float: right; margin-right: 20px"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</el-tabs>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'sys_audit_export'" @exportExcel="exportExcel"
|
||||
class="ml10" style="float: right; margin-right: 20px" @queryTable="getDataList" />
|
||||
</div>
|
||||
<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 v-if="row.userId && row.userId != -1" 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>
|
||||
<div v-else>
|
||||
<span>未知用户</span>
|
||||
</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="200">
|
||||
<template #default="{ row }">
|
||||
<div class="grid grid-cols-2 justify-evenly">
|
||||
<el-button v-if="row.orderType !== '5'" icon="Printer" text type="primary"
|
||||
@click="print(row)" v-auth="'hard_hardInvoice_admin_print'">
|
||||
打印发票
|
||||
</el-button>
|
||||
<el-button v-if="row.orderType !== '5'" icon="ShoppingCartFull" text type="primary"
|
||||
@click="shopCarDialogRef.openDialog(row.id)">
|
||||
购物车
|
||||
</el-button>
|
||||
<el-button icon="Money" link type="primary" v-if="row.userId && row.userId != '-1'"
|
||||
@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 v-if="false" icon="edit-pen" text type="primary"
|
||||
v-auth="'hard_hardwareOrder_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.payRefundId && row.orderType !== '5' && !['5', '6', '8'].includes(row.payType)"
|
||||
icon="stamp" text type="primary" v-auth="'hard_hardAfterSale_adminRefund'"
|
||||
@click="adminRefundDailogRef.openDialog(row.id)">
|
||||
退款
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'hard_hardwareOrder_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" />
|
||||
<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 v-if="row.userId && row.userId != -1" 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>
|
||||
<div v-else>
|
||||
<span>未知用户</span>
|
||||
</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="200">
|
||||
<template #default="{ row }">
|
||||
<div class="grid grid-cols-2 justify-evenly">
|
||||
<el-button
|
||||
v-if="row.orderType !== '5'"
|
||||
icon="Printer"
|
||||
text
|
||||
type="primary"
|
||||
@click="print(row)"
|
||||
v-auth="'hard_hardInvoice_admin_print'"
|
||||
>
|
||||
打印发票
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.orderType !== '5'"
|
||||
icon="ShoppingCartFull"
|
||||
text
|
||||
type="primary"
|
||||
@click="shopCarDialogRef.openDialog(row.id)"
|
||||
>
|
||||
购物车
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="Money"
|
||||
link
|
||||
type="primary"
|
||||
v-if="row.userId && row.userId != '-1'"
|
||||
@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
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardwareOrder_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.payRefundId && row.orderType !== '5' && !['5', '6', '8'].includes(row.payType)"
|
||||
icon="stamp"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardAfterSale_adminRefund'"
|
||||
@click="adminRefundDailogRef.openDialog(row.id)"
|
||||
>
|
||||
退款
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardwareOrder_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" />
|
||||
</template>
|
||||
</DraggableDepTree>
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
@@ -326,11 +386,10 @@ const print = async (row: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 树节点选择时
|
||||
const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => {
|
||||
state.queryForm.deptId = curClickedNode.id
|
||||
state.queryForm.deptIds = checkedTreeNodes.map((item: any) => item.id)
|
||||
state.queryForm.isDeepDept = isDeepTree
|
||||
state.queryForm.isInclude = !isDeepTree
|
||||
getDataList()
|
||||
}
|
||||
|
||||
@@ -378,36 +437,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] = ""
|
||||
|
||||
@@ -1,255 +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="14" class="mb20">
|
||||
<el-form-item label="商户" prop="merchantId">
|
||||
<select-mch v-model="form.merchantId" :apiParams="{ types: '3' }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="14" class="mb20">
|
||||
<el-form-item label="库存商品" prop="erpSpuId">
|
||||
<el-input
|
||||
v-model="form.erpSpuId"
|
||||
placeholder="请选择库存商品"
|
||||
:value="form.erpSpuName"
|
||||
readonly
|
||||
:suffix-icon="Search"
|
||||
@click="handleClickSelectSpu"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品轮播图" prop="sliderPicUrls">
|
||||
<upload-imgs v-model="form.sliderPicUrls" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number :min="0" :max="1000" :precision="0" v-model="form.sort" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="item.value" v-for="(item, index) in spu_status" border :key="index">{{ item.label }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12" class="mb20">-->
|
||||
<!-- <el-form-item label="赠送积分" prop="giveIntegral">-->
|
||||
<!-- <el-input-number :min="0" :max="1000" v-model="form.giveIntegral" placeholder="请输入赠送积分"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品详情" prop="description">
|
||||
<editor v-if="visible" v-model:get-html="form.description" placeholder="请输入商品详情"></editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-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>
|
||||
|
||||
<!-- 库存商品选择对话框 -->
|
||||
<el-dialog v-model="spuSelectDialogVisible" title="选择商品" width="60%" :close-on-click-modal="false" draggable @close="">
|
||||
<el-row>
|
||||
<el-form :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
<el-input placeholder="请输入商品名称" v-model="state.queryForm.productName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="state.loading" :data="state.dataList" @row-click="handleRowClick" :row-style="{ cursor: 'pointer' }">
|
||||
<el-table-column type="index" label="#" width="50" align="center" />
|
||||
<el-table-column prop="productName" label="商品名称" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="productCode" label="货号" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="barcode" label="商品条码" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="brandId" label="商品品牌" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="categoryId" label="商品分类" width="100px" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-tag>{{ categoryOptions.find((item: any) => item.id == row.categoryId)?.name }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="picUrl" label="商品图" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<preview-image @click.stop :src="scope.row.picUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productNature" label="商品性质" align="center" show-overflow-tooltip width="150">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="supermarket_nature" :value="scope.row.productNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="上架状态" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="spu_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="supplierId" label="供货商" width="100px" align="center" show-overflow-tooltip /> -->
|
||||
<!-- <el-table-column prop="sort" label="排序字段" align="center" show-overflow-tooltip /> -->
|
||||
<!-- <el-table-column prop="price" label="商品价格" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ displayPrice(scope.row.price) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="marketPrice" label="市场价" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ displayPrice(scope.row.marketPrice) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="costPrice" label="成本价" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="stock" label="库存" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="salesCount" label="商品销量" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="createTime" label="创建时间" align="center" show-overflow-tooltip /> -->
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="spuSelectDialogVisible = false">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="SmSpuDialog">
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj, getOnlineSpuPage } from "/@/api/supermarket/smSpu"
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { Search } from "@element-plus/icons-vue"
|
||||
import { getSupermarketCategory } from "/@/api/supermarketerp/supermarketSpu"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref()
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
const { supermarket_nature, spu_status } = useDict("supermarket_nature", "spu_status")
|
||||
const spuSelectDialogVisible = ref<boolean>(false)
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
merchantId: "",
|
||||
id: "",
|
||||
erpSpuId: "",
|
||||
description: "<p></p>",
|
||||
sliderPicUrls: "",
|
||||
sort: "",
|
||||
status: "0",
|
||||
giveIntegral: 0,
|
||||
deptId: "",
|
||||
salesCount: "",
|
||||
erpSpuName: "",
|
||||
})
|
||||
const categoryOptions = ref<any>([])
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
merchantId: [{ required: true, message: "请选择商户", trigger: "blur" }],
|
||||
erpSpuId: [{ required: true, message: "请选择库存商品", trigger: "change" }],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
dataFormRef.value?.resetFields()
|
||||
form.erpSpuName = ""
|
||||
|
||||
// 获取smSpu信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getsmSpuData(id)
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
console.log(form)
|
||||
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 getsmSpuData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id)
|
||||
.then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: getOnlineSpuPage,
|
||||
})
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle } = useTable(state)
|
||||
|
||||
const resetQuery = () => {
|
||||
state.queryForm.productName = ""
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击选择库存商品
|
||||
const handleClickSelectSpu = async () => {
|
||||
loading.value = true
|
||||
state.queryForm.productName = ""
|
||||
spuSelectDialogVisible.value = true
|
||||
try {
|
||||
getDataList()
|
||||
const res = await getSupermarketCategory()
|
||||
categoryOptions.value = res.data
|
||||
} catch (error) {
|
||||
state.dataList = []
|
||||
categoryOptions.value = []
|
||||
loading.value = false
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
// 线上商品列表表格行点击
|
||||
const handleRowClick = (row: any) => {
|
||||
spuSelectDialogVisible.value = false
|
||||
form.erpSpuId = row.id
|
||||
form.erpSpuName = row.productName
|
||||
}
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
@@ -1,157 +0,0 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row v-show="showSearch">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="商品名称" prop="productName">
|
||||
<el-input v-model="state.queryForm.productName" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="search" type="primary" @click="getDataList">查询</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'supermarket_smSpu_add'">
|
||||
新 增
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'supermarket_smSpu_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删 除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'supermarket_smSpu_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="productName" label="商品名称" show-overflow-tooltip />
|
||||
<el-table-column prop="productCode" label="货号" show-overflow-tooltip />
|
||||
<el-table-column prop="categoryName" label="商品分类" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="picUrl" label="商品封面图" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<preview-image @click.stop :src="scope.row.picUrl" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="商品状态" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="spu_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="barcode" label="商品条码" width="100px" align="center" show-overflow-tooltip />-->
|
||||
<el-table-column prop="sort" label="排序" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="giveIntegral" label="赠送积分" show-overflow-tooltip />-->
|
||||
<el-table-column prop="salesCount" label="销量" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'supermarket_smSpu_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'supermarket_smSpu_del'" @click="handleDelete([scope.row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemSmSpu">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs } from "/@/api/supermarket/smSpu"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
|
||||
const { spu_status } = useDict("spu_status")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList,
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
// 清空多选
|
||||
selectObjs.value = []
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/supermarket/smSpu/export", Object.assign(state.queryForm, { ids: selectObjs }), "线上超市商品.xlsx")
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
await useMessageBox().confirm("此操作将永久删除")
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await delObjs(ids)
|
||||
getDataList()
|
||||
useMessage().success("删除成功")
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,10 +15,6 @@
|
||||
<span class="font-bold">经办人:</span>
|
||||
<span>{{ baseDataForm.handlerUserId }}</span>
|
||||
</div>
|
||||
<div style="width: 33.33%; height: 28px; line-height: 28px">
|
||||
<span class="font-bold">关联补货申请:</span>
|
||||
<span>{{ baseDataForm.linkCode }}</span>
|
||||
</div>
|
||||
<div style="width: 33.33%; height: 28px; line-height: 28px">
|
||||
<span class="font-bold">货商:</span>
|
||||
<span>{{ baseDataForm.supplierId }}</span>
|
||||
@@ -37,17 +33,6 @@
|
||||
<el-form-item label="单据日期" prop="inventoryDate">
|
||||
<el-input v-model.trim="baseDataForm.inventoryDate" readonly style="width: 200px" :disabled="disabled" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关联采购订单" prop="linkCode">
|
||||
<el-input
|
||||
v-model="baseDataForm.linkCode"
|
||||
:suffix-icon="Search"
|
||||
@click="handleClickLinkCode"
|
||||
readonly
|
||||
placeholder="请选择采购订单"
|
||||
style="width: 200px"
|
||||
:disabled="disabled"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="经办人" prop="handlerUserId">
|
||||
<SelectHandlerUser
|
||||
v-model.trim="baseDataForm.handlerUserId"
|
||||
@@ -135,12 +120,12 @@
|
||||
<el-input v-model="row.quantity" />
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="unitPrice" title="进价">
|
||||
<vxe-column field="unitPrice" title="零售价">
|
||||
<template #default="{ row }">
|
||||
{{
|
||||
row.purchasePrice
|
||||
? displayPrice(row.purchasePrice)
|
||||
: displayPrice(row.erpUnitVos?.find((item: any) => item.id == row.unitId)?.purchasePrice)
|
||||
row.retailPrice
|
||||
? displayPrice(row.retailPrice)
|
||||
: displayPrice(row.erpUnitVos?.find((item: any) => item.id == row.unitId)?.retailPrice)
|
||||
}}
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -197,13 +182,6 @@
|
||||
|
||||
<!-- 商品选择对话框 -->
|
||||
<select-dialog ref="erpSpuSelectDialogRef" :selectedRows="state.editableTableData" @getSelectedRows="getSelectedRows" />
|
||||
|
||||
<link-code-dialog
|
||||
ref="linkCodeDialogRef"
|
||||
title="关联采购订单"
|
||||
:getTableData="getCgddPage"
|
||||
@getSelectedLinkCode="getSelectedLinkCode"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -211,11 +189,9 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onMounted } from "vue"
|
||||
import { getObj, addObj, putObj } from "/@/api/supermarketerp/smErpInventoryRecords"
|
||||
import { getPlanCode, getErpSpuSimpleAll, getCgddPage } from "/@/api/supermarketerp/common"
|
||||
import { getPlanCode, getErpSpuSimpleAll } from "/@/api/supermarketerp/common"
|
||||
import { VxeTableEvents, VxeTablePropTypes, type VxeTableInstance } from "vxe-table"
|
||||
import { formatDate } from "/@/utils/formatTime"
|
||||
import { Search } from "@element-plus/icons-vue"
|
||||
import LinkCodeDialog from "/@/views/supermarketerp/components/link-code-dialog.vue"
|
||||
import { displayPrice, storePrice } from "/@/utils/formatMoney"
|
||||
import { tablePrint } from "../../supermarketUtils"
|
||||
import { useSmProcessFormAction } from "/@/hooks/smProcessFormAction"
|
||||
@@ -237,7 +213,6 @@ const emit = defineEmits(["close"])
|
||||
const loading = ref(false) // 采购计划加载
|
||||
const disabled = ref(false)
|
||||
const erpSpuSelectDialogRef = ref() // 商品选择对话框ref
|
||||
const linkCodeDialogRef = ref() // 关联采购申请单对话框ref
|
||||
const baseDataFormRef = ref() // 基本数据表单ref
|
||||
const editableTableRef = ref<VxeTableInstance<any>>() // 可编辑表格ref
|
||||
const baseDataInfoRef = ref() // 基本信息ref
|
||||
@@ -278,7 +253,6 @@ const receiveAmountForm = reactive<{ receiveAmount: number }>({
|
||||
const dataRules = ref({
|
||||
inventoryCode: [{ required: true, message: "出入库记录表编号不能为空", trigger: "blur" }],
|
||||
inventoryDate: [{ required: true, message: "出入库记录表单据日期不能为空", trigger: "blur" }],
|
||||
// handlerUserId: [{ required: true, message: "经办人不能为空", trigger: "blur" }],
|
||||
supplierId: [{ required: true, message: "货商不能为空", trigger: "blur" }],
|
||||
})
|
||||
|
||||
@@ -330,18 +304,6 @@ const getInitData = async () => {
|
||||
erpSpuSimpleAll && erpSpuSimpleAll.code === 0 && (state.erpSpuSimpleAll = erpSpuSimpleAll.data)
|
||||
}
|
||||
|
||||
// 点击关联采购申请编号
|
||||
const handleClickLinkCode = () => linkCodeDialogRef.value.openLinkCodeDialog(2)
|
||||
|
||||
// 获取选择的采购申请
|
||||
const getSelectedLinkCode = (selectionRows: any) => {
|
||||
console.log("被选择的关联数据", selectionRows)
|
||||
|
||||
baseDataForm.linkCode = selectionRows.code
|
||||
state.editableTableData = selectionRows.items
|
||||
state.erpSpuItemsMemo = selectionRows.items
|
||||
}
|
||||
|
||||
// 删除选中的行
|
||||
const removeSelectRowEvent = () => {
|
||||
const $table = editableTableRef.value
|
||||
@@ -408,7 +370,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: unit?.purchasePrice ? Number(unit?.purchasePrice) : 0,
|
||||
unitPrice: unit?.retailPrice ? Number(unit?.retailPrice) : 0,
|
||||
totalAmount: unit?.purchasePrice && item.quantity ? Number(unit.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
@@ -419,7 +381,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
unitPrice: item.retailPrice ? Number(item.retailPrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible" width="30%" :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-col :span="24" class="mb20">
|
||||
<el-form-item label="充值时间" prop="importTime">
|
||||
<el-date-picker v-model="form.importTime" type="month" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择充值时间" />
|
||||
<el-date-picker v-model="form.importTime" type="month" value-format="YYYY-MM-DD" placeholder="请选择充值时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="充值类型" prop="bizType">
|
||||
<!-- :hide-ids="[(roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund'])) ? '' : '3', auths(['wallet_walletRechargeApply_select_jz']) ? '' : '2', '1']" -->
|
||||
<dict-select v-model="form.bizType" :disabled="form.invoiceId" dict-code="wallet_biz_recharge"
|
||||
:hide-ids="[(roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund'])) ? '' : '3', auths(['wallet_walletRechargeApply_select_jz']) ? '' : '2', form.bizType == '1' ? '' : '1']"
|
||||
placeholder="请选择饭卡类型" />
|
||||
<dict-select
|
||||
v-model="form.bizType"
|
||||
:disabled="form.invoiceId"
|
||||
dict-code="wallet_biz_recharge"
|
||||
:hide-ids="[
|
||||
roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund']) ? '' : '3',
|
||||
auths(['wallet_walletRechargeApply_select_jz']) ? '' : '2',
|
||||
form.bizType == '1' || auths(['wallet_walletRechargeApply_unbind']) ? '' : '1',
|
||||
]"
|
||||
placeholder="请选择饭卡类型"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -23,15 +29,16 @@
|
||||
<el-form-item label="钱包" prop="walletTypeId">
|
||||
<!-- <select-wallet-type v-model="form.walletTypeId" placeholder="请选择钱包" :disabled="false" /> -->
|
||||
<el-select v-model="form.walletTypeId" :disabled="walletTypeIdDisabled">
|
||||
<el-option v-for="item in walletTypeOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id" />
|
||||
<el-option v-for="item in walletTypeOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
v-if="(roleCodes.includes('RETURN_CANTEEN') || auths(['wallet_walletRechargeApply_refund'])) && form.bizType == 3"
|
||||
:span="24" class="mb20">
|
||||
:span="24"
|
||||
class="mb20"
|
||||
>
|
||||
<el-form-item prop="isAuthorization">
|
||||
<template #label>
|
||||
<span>授权</span>
|
||||
@@ -47,8 +54,7 @@
|
||||
|
||||
<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>
|
||||
@@ -150,7 +156,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
|
||||
if (form.bizType == 3 && form.isAuthorization != 1) {
|
||||
useMessage().error("请同意授权协议")
|
||||
@@ -185,7 +191,7 @@ const getwalletRechargeApplyData = async (id: string) => {
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
console.error(err)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-form v-show="showSearch" ref="queryRef" :inline="true" :model="state.queryForm"
|
||||
@keyup.enter="getDataList">
|
||||
<el-form v-show="showSearch" 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" placeholder="用户" />
|
||||
@@ -11,47 +10,69 @@
|
||||
<select-wallet-type v-model="state.queryForm.walletTypeId" placeholder="饭卡类型" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 200px" label="充值类型" prop="bizType">
|
||||
<dict-select v-model="state.queryForm.bizType" dict-code="wallet_biz_recharge"
|
||||
placeholder="充值类型" />
|
||||
<dict-select v-model="state.queryForm.bizType" dict-code="wallet_biz_recharge" 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" />
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="审核时间" prop="processTimeList">
|
||||
<el-date-picker v-model="state.queryForm.processTimeList" value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange" />
|
||||
<el-date-picker v-model="state.queryForm.processTimeList" 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>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="uploadExcelRef.show()"
|
||||
v-auth="'wallet_walletRechargeApply_add'">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="uploadExcelRef.show()" v-auth="'wallet_walletRechargeApply_add'">
|
||||
导 入
|
||||
</el-button>
|
||||
<el-button v-if="false" plain :disabled="multiple" icon="Delete" type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_del'" @click="handleDelete(selectObjs)">
|
||||
<el-button
|
||||
icon="folder-add"
|
||||
type="primary"
|
||||
class="ml10"
|
||||
@click="uploadExcelUnbindRef.show()"
|
||||
v-auth="'wallet_walletRechargeApply_unbind'"
|
||||
>
|
||||
导 入(不绑定发票)
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
<right-toolbar v-model:showSearch="showSearch" :export="'wallet_walletRechargeApply_export'"
|
||||
@exportExcel="exportExcel" class="ml10 mr20" style="float: right"
|
||||
@queryTable="getDataList" />
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_walletRechargeApply_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</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="username" label="申请人" />
|
||||
@@ -103,48 +124,93 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" v-auths="[
|
||||
'wallet_walletRechargeApply_view',
|
||||
'wallet_walletRechargeApply_apply',
|
||||
'wallet_walletRechargeApply_edit',
|
||||
'wallet_walletRechargeApply_del',
|
||||
'wallet_walletRechargeApply_check',
|
||||
]" width="300" fixed="right">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
v-auths="[
|
||||
'wallet_walletRechargeApply_view',
|
||||
'wallet_walletRechargeApply_apply',
|
||||
'wallet_walletRechargeApply_edit',
|
||||
'wallet_walletRechargeApply_del',
|
||||
'wallet_walletRechargeApply_check',
|
||||
]"
|
||||
width="300"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.importTime" icon="Document" text type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_view'" @click="doInfo(row)">
|
||||
<el-button
|
||||
v-if="row.importTime"
|
||||
icon="Document"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_view'"
|
||||
@click="doInfo(row)"
|
||||
>
|
||||
数据
|
||||
</el-button>
|
||||
<el-button v-if="row.importTime && !row.processId" icon="Connection" text type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_apply'" @click="doApply(row)">
|
||||
<el-button
|
||||
v-if="row.importTime && !row.processId"
|
||||
icon="Connection"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_apply'"
|
||||
@click="doApply(row)"
|
||||
>
|
||||
申请
|
||||
</el-button>
|
||||
<el-button v-if="!row.processId" icon="edit-pen" text type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
<el-button
|
||||
v-if="!row.processId"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="row.isCheckUser && row.processStatus == '1'" type="primary" size="small" link
|
||||
icon="VideoPlay" @click="deal(row)" v-auth="'wallet_walletRechargeApply_check'">
|
||||
<el-button
|
||||
v-if="row.isCheckUser && row.processStatus == '1'"
|
||||
type="primary"
|
||||
size="small"
|
||||
link
|
||||
icon="VideoPlay"
|
||||
@click="deal(row)"
|
||||
v-auth="'wallet_walletRechargeApply_check'"
|
||||
>
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.userId == userInfos?.user?.userId && [null, '1'].includes(row.processStatus)"
|
||||
icon="delete" text type="primary" v-auth="'wallet_walletRechargeApply_del'"
|
||||
@click="handleDelete([row.id])">
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_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>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
<upload-excel ref="uploadExcelRef" title="充值导入" url="/wallet/wallet-recharge-apply/read-excel"
|
||||
temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx" @refreshDataList="getDataList(false)" />
|
||||
<upload-excel
|
||||
ref="uploadExcelRef"
|
||||
title="充值导入"
|
||||
url="/wallet/wallet-recharge-apply/read-excel"
|
||||
temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx"
|
||||
@refreshDataList="getDataList(false)"
|
||||
/>
|
||||
<upload-excel-unbind
|
||||
ref="uploadExcelUnbindRef"
|
||||
title="充值导入"
|
||||
url="/wallet/wallet-recharge-apply/read-excel"
|
||||
temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx"
|
||||
@refreshDataList="getDataList(false)"
|
||||
/>
|
||||
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
@@ -167,6 +233,7 @@ const { push } = useRouter()
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
const UploadExcel = defineAsyncComponent(() => import("./upload-excel.vue"))
|
||||
const UploadExcelUnbind = defineAsyncComponent(() => import("/@/components/Upload/Excel.vue"))
|
||||
// 定义查询字典
|
||||
const { wallet_biz_recharge, wallet_type, check_status } = useDict("wallet_biz_recharge", "wallet_type", "check_status")
|
||||
// store
|
||||
@@ -176,6 +243,7 @@ const { userInfos } = storeToRefs(stores)
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const uploadExcelRef = ref()
|
||||
const uploadExcelUnbindRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
|
||||
Reference in new issue
Block a user