Merge remote-tracking branch 'origin/master'

This commit is contained in:
zjf committed 2025-06-18 12:21:43 +08:00
commit 8161325be4
9 files changed
+209 -188

No files matched your search

+4 -4
View File
@@ -8,19 +8,19 @@ VITE_OPEN = true
ENV = 'development'
# ADMIN 服务地址
VITE_ADMIN_PROXY_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_ADMIN_PROXY_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
# VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
# VITE_ADMIN_PROXY_PATH = http://192.168.101.139:9999/ # 邓-本地
VITE_ADMIN_PROXY_PATH = http://192.168.101.139:9999/ # 邓-本地
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
# 图片访问基础地址
VITE_IMAGE_BASE_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_IMAGE_BASE_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc
# VITE_IMAGE_BASE_PATH = http://localhost:9999
# VITE_IMAGE_BASE_PATH = http://192.168.101.139:9999 # 邓-本地
VITE_IMAGE_BASE_PATH = http://192.168.101.139:9999 # 邓-本地
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
# 代码生成服务地址
+20 -9
View File
@@ -1,12 +1,7 @@
<template>
<el-select
style="width: 100%"
v-model="state.selectId"
:placeholder="props.placeholder"
clearable
@visible-change="(e: boolean) => e && getDictOptions()"
>
<el-option v-for="v in state.dictList" :key="v.code" :label="v.label" :value="v.value" />
<el-select style="width: 100%" v-model="state.selectId" :placeholder="props.placeholder" clearable
@visible-change="(e: boolean) => e && getDictOptions()">
<el-option v-for="v in filterDictList" :key="v.code" :label="v.label" :value="v.value" />
</el-select>
</template>
@@ -20,6 +15,7 @@ const selectId = defineModel()
export type Props = {
dictCode: string
placeholder?: string
hideIds?: string | Array<string>
}
const props = withDefaults(defineProps<Props>(), {
placeholder: "请选择",
@@ -40,6 +36,21 @@ watch(
{ immediate: true },
)
const filterDictList = computed(() => {
const hideKeys = props.hideIds
// 排序
const list = state.dictList?.sort((pren: any, next: any) => {
return pren.sortOrder - next.sortOrder
})
if (!hideKeys) return list
if (typeof hideKeys == "string") {
return list.filter((p: any) => p.value != hideKeys)
}
if (Array.isArray(hideKeys)) {
return list.filter((p: any) => !hideKeys.includes(p.value))
}
})
async function getDictOptions() {
if (!props.dictCode) return []
const dicts = dict().getDict(props.dictCode)
@@ -60,7 +71,7 @@ async function getDictOptions() {
</script>
<style scoped>
.el-tag + .el-tag {
.el-tag+.el-tag {
margin-left: 10px;
}
</style>
+18
View File
@@ -48,6 +48,22 @@
displayPrice(row.walletReducePrice) }}</div>
</template>
</el-table-column>
<!-- start 批量退换食堂 start -->
<el-table-column prop="walletReturnCanteenCount" label="批量退还各自食堂次数" align="center"
min-width="170">
<template #default="{ row }">
<div :class="{ 'color-success': row.walletReturnCanteenCount != 0 }">{{
row.walletReturnCanteenCount }}次</div>
</template>
</el-table-column>
<el-table-column prop="walletReturnCanteenPrice" label="批量退还各自食堂金额" align="center"
min-width="170">
<template #default="{ row }">
<div :class="{ 'color-success': row.walletReturnCanteenPrice != 0 }">{{
displayPrice(row.walletReturnCanteenPrice) }}</div>
</template>
</el-table-column>
<!-- end 批量退换食堂 end -->
<el-table-column prop="walletReduceCount" label="批量扣减次数" align="center" min-width="110">
<template #default="{ row }">
<div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount
@@ -171,6 +187,8 @@ const getSummaries = (param: any) => {
"walletOnceReduceCount",
"orderProfitPrice",
"orderProfitCont",
"walletReturnCanteenCount",
"walletReturnCanteenPrice"
]
const totalRow = Array.from({ length: columns.length })
columns.forEach((i: any, index: number) => {
@@ -10,6 +10,7 @@
border
show-overflow
max-height="380"
:edit-rules="validRules"
:column-config="{ resizable: true }"
:row-config="{ isHover: true }"
:resizable-config="{ dragMode: 'fixed' }"
@@ -47,9 +48,6 @@
<template #edit="{ row }">
<el-input v-model.trim="row.barCode" />
</template>
<!-- <template #default="{ row }">
{{ computedSmErpUnitEntityList?.find((item) => item.id == row.unitId)?.barCode }}
</template> -->
</vxe-column>
</vxe-table>
</div>
@@ -90,10 +88,10 @@ const props = withDefaults(
const editableTableRef = ref()
// const validRules = {
// unit: [{ required: true, message: "包装单位不能为空", trigger: "blur" }],
// barCode: [{ required: true, message: "条码不能为空", trigger: "blur" }],
// }
const validRules = {
// unit: [{ required: true, message: "包装单位不能为空", trigger: "blur" }],
// barCode: [{ required: true, message: "条码不能为空", trigger: "blur" }],
}
// 底部表格行新增
const pushEvent = () => {
@@ -32,13 +32,13 @@
<el-col :span="12" class="mb20">
<el-form-item label="商品性质" prop="productNature">
<el-select v-model="form.productNature" placeholder="请选择商品性质">
<el-option :value="item.value" :label="item.label" v-for="(item, index) in supermarket_nature" :key="index"></el-option>
<el-option :value="item.value" :label="item.label" v-for="(item, index) in supermarket_nature" :key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="商品封面图" prop="picUrl">
<upload-img v-model:imageUrl="form.picUrl"></upload-img>
<upload-img v-model:imageUrl="form.picUrl" />
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
@@ -54,7 +54,7 @@
<el-input v-model.trim="row.spec" />
</template>
</vxe-column>
<vxe-column field="unit" title="单位" :edit-render="{ autoFocus: 'input', placeholder: '请输入' }">
<vxe-column field="unit" title="单位名称" :edit-render="{ autoFocus: 'input', placeholder: '请输入' }">
<template #edit="{ row }">
<el-input v-model.trim="row.unit" />
</template>
@@ -118,7 +118,7 @@ export interface rowVU {
packageNum: number
purchasePrice: number
retailPrice: number
promotionPrice: number | null
promotionPrice: number
costPrice: number
isNew?: boolean
isBase?: boolean | null
@@ -133,11 +133,11 @@ const packageUnitList = defineModel<rowVU[]>("modelValue", {
barCode: "",
spec: "",
unit: "",
status: "",
status: "0",
packageNum: 1,
purchasePrice: 0,
retailPrice: 0.01,
promotionPrice: null,
promotionPrice: 0,
costPrice: 0,
},
],
@@ -166,11 +166,11 @@ const pushEvent = (row?: rowVU | undefined) => {
barCode: "",
spec: "",
unit: "",
status: "",
status: "0",
packageNum: 1,
purchasePrice: 0,
retailPrice: 0.01,
promotionPrice: null,
promotionPrice: 0,
costPrice: 0,
isNew: true,
}
@@ -197,7 +197,7 @@ const removeSelectRowEvent = () => {
}
// 获取单选的行
const getRadioEvent = () => {
const getRadioRow = () => {
const $table = editableTableRef.value
if ($table) {
const currRadioRow = $table.getRadioRecord()
@@ -231,7 +231,7 @@ const editableTableValidate = async () => {
defineExpose({
editableTableValidate,
getRadioEvent,
getRadioRow,
setRadioRow,
pushEvent,
})
@@ -1,34 +1,31 @@
<template>
<el-dialog width="80%" :title="form.id ? '编辑' : '新增'" v-model="visible" :close-on-click-modal="false" draggable>
<el-form ref="dataFormRef" :model="form" :rules="dataRules" label-width="150px" v-loading="loading">
<el-form ref="formRef" :model="form" :rules="dataRules" label-width="150px" v-loading="loading">
<el-tabs class="el-tabs" v-model="tabPaneActiveName" @tab-change="handleTabChange" type="border-card">
<el-tab-pane class="el-tab-pane" label="基础信息" name="基础信息" :disabled="true">
<el-tab-pane class="el-tab-pane" label="基础信息" name="基础信息">
<base-info v-model="form" />
</el-tab-pane>
<el-tab-pane class="el-tab-pane" label="包装单位" name="包装单位" :disabled="true">
<el-tab-pane class="el-tab-pane" label="包装单位" name="包装单位">
<package-unit ref="packageUnitRef" v-model="form.smErpUnitEntityList" />
</el-tab-pane>
<el-tab-pane class="el-tab-pane" label="库存" name="库存" :disabled="true">
<el-tab-pane class="el-tab-pane" label="库存" name="库存">
<product-inventory
v-model:stock="form.stock"
v-model:inventoryUpperLimit="form.inventoryUpperLimit"
v-model:inventoryLowerLimit="form.inventoryLowerLimit"
/>
</el-tab-pane>
<el-tab-pane class="el-tab-pane" label="辅助条码" name="辅助条码" :disabled="true">
<el-tab-pane class="el-tab-pane" label="辅助条码" name="辅助条码">
<auxiliary-code :smErpUnitEntityList="form.smErpUnitEntityList" v-model="form.smErpAuxiliaryCodeEntityList" />
</el-tab-pane>
</el-tabs>
</el-form>
<template #footer>
<!-- <el-button @click="visible = false">取消</el-button> -->
<el-button v-if="currentTabPaneIndex != 0" type="primary" @click="currentTabPaneIndex--" :disabled="loading">上一步</el-button>
<el-button v-if="currentTabPaneIndex == 0" type="primary" @click="addPackageUnitNextStep">下一步</el-button>
<el-button v-if="currentTabPaneIndex == 1 || currentTabPaneIndex == 2" type="primary" @click="currentTabPaneIndex++">
下一步
</el-button>
<el-button v-if="currentTabPaneIndex == 3" type="primary" @click="onSubmit" :loading="loading">提 交</el-button>
<el-button v-if="currentTabPaneIndex != tabPaneEnum.length - 1" type="primary" @click="nextStep">下一步</el-button>
<el-button v-if="currentTabPaneIndex == tabPaneEnum.length - 1" type="primary" @click="onSubmit" :loading="loading">提 交</el-button>
<el-button @click="visible = false">取消</el-button>
</template>
</el-dialog>
</template>
@@ -46,7 +43,7 @@ import { nanoid } from "nanoid"
const emit = defineEmits(["refresh"])
const dataFormRef = ref()
const formRef = ref()
const packageUnitRef = ref()
const visible = ref(false)
const loading = ref(false)
@@ -87,8 +84,8 @@ const form = reactive<any>({
costPrice: 0,
})
// 表单金额转为单位分
const formatedMoney = computed(() => {
// 基本信息的金额转为单位分
const formatedBaseFormMoney = computed(() => {
return {
grossMargin: storePrice(form.grossMargin),
purchasePrice: storePrice(form.purchasePrice),
@@ -176,51 +173,63 @@ const getsupermarketSpuData = async (id: string) => {
// 重置表单数据
const resetForm = () => {
dataFormRef.value?.resetFields()
formRef.value?.resetFields()
form.smErpUnitEntityList = []
form.smErpAuxiliaryCodeEntityList = []
}
// 第一步的下一步
const addPackageUnitNextStep = () => {
currentTabPaneIndex.value++
// tab栏切换
const handleTabChange = (name: TabPaneName) => {
currentTabPaneIndex.value = tabPaneEnum.findIndex((item) => item === name)
if (form.id) return
const row = {
id: nanoid(5),
barCode: form.barCode,
spec: form.spec,
unit: form.unit,
status: form.unitStatus,
packageNum: form.packageNum,
purchasePrice: form.purchasePrice,
retailPrice: form.retailPrice,
promotionPrice: form.promotionPrice,
costPrice: form.costPrice,
isNew: true,
flag: "addPackageUnitNextStep",
}
const isFlagRowExist = form.smErpUnitEntityList.some((item: rowVU) => item.flag === "addPackageUnitNextStep")
if (isFlagRowExist) return
packageUnitRef.value.pushEvent(row)
packageUnitRef.value.setRadioRow(0) // 设置基础包装单位的单选行
setDefaultPackageUnit()
}
// tab栏切换
const handleTabChange = (name: TabPaneName) => (currentTabPaneIndex.value = tabPaneEnum.findIndex((item) => item === name))
// 下一步
const nextStep = () => {
currentTabPaneIndex.value++
if (form.id) return
setDefaultPackageUnit()
}
// 计算包装单位列表
const usePackageUnitList = () => {
const curRadioRowUnit = packageUnitRef.value.getRadioEvent()
// 默认设置一行基础包装单位
const setDefaultPackageUnit = () => {
if (currentTabPaneIndex.value == 1) {
const isFlagRowExist = form.smErpUnitEntityList.some((item: rowVU) => item.flag === "defaultAddedPackageUnit")
if (isFlagRowExist) return
const row = {
id: nanoid(5),
barCode: form.barCode,
spec: form.spec,
unit: form.unit,
status: form.unitStatus,
packageNum: form.packageNum,
purchasePrice: form.purchasePrice,
retailPrice: form.retailPrice,
promotionPrice: form.promotionPrice,
costPrice: form.costPrice,
isNew: true,
flag: "defaultAddedPackageUnit",
}
packageUnitRef.value.pushEvent(row)
packageUnitRef.value.setRadioRow(0) // 自动设置基础包装单位的radio单选行
}
}
// 整理包装单位列表
const settlePackageUnitList = () => {
const curRadioRowUnit = packageUnitRef.value.getRadioRow()
const smErpUnitEntityList = JSON.parse(JSON.stringify(form.smErpUnitEntityList))
return smErpUnitEntityList.map((item: rowVU) => {
// 设置基础包装单位标识(isBase)
if (item.id === curRadioRowUnit.id) {
item.isBase = true
} else {
item.isBase = false
}
// 转换金额单位
item.costPrice = storePrice(item.costPrice)
item.promotionPrice = item.promotionPrice ? storePrice(item.promotionPrice) : null
item.promotionPrice = storePrice(item.promotionPrice)
item.purchasePrice = storePrice(item.purchasePrice)
item.retailPrice = storePrice(item.retailPrice)
if (item.isNew) {
@@ -231,14 +240,13 @@ const usePackageUnitList = () => {
})
}
// 计算辅助条码列表
const useAuxiliaryCode = () => {
// 整理辅助条码列表
const settleAuxiliaryCode = () => {
const smErpAuxiliaryCodeEntityList = [...form.smErpAuxiliaryCodeEntityList]
return smErpAuxiliaryCodeEntityList
.filter((item: rowVC) => item.unitId)
.map((item: rowVC) => {
const curPackageUnitItem = form.smErpUnitEntityList.find((unitItem: any) => unitItem.id == item.unitId)
console.log(form.smErpUnitEntityList)
if (item.isNew) {
item.id = ""
@@ -251,26 +259,25 @@ const useAuxiliaryCode = () => {
// 提交
const onSubmit = async () => {
const valid = await dataFormRef.value.validate().catch(() => {})
if (!valid) return useMessage().warning("基础信息和库存必填项未填写完整")
const valid = await formRef.value.validate().catch(() => {})
if (!valid) return useMessage().warning("基础信息或库存必填项未填写完整")
if (!form.smErpUnitEntityList || form.smErpUnitEntityList.length <= 0) return useMessage().warning("请添加包装单位")
if (!(await packageUnitRef.value.editableTableValidate())) return useMessage().warning("包装单位必填项未填写完整")
if (!packageUnitRef.value.getRadioEvent()) return useMessage().warning("请选择基础包装单位")
if (!packageUnitRef.value.getRadioRow()) return useMessage().warning("请选择基础包装单位")
// if (!form.stock || !form.inventoryUpperLimit || !form.inventoryLowerLimit) return useMessage().warning("库存必填项未填写完整")
// if (!form.smErpAuxiliaryCodeEntityList || form.smErpAuxiliaryCodeEntityList.length <= 0) return useMessage().warning("请添加辅助条码")
// if (!(await auxiliaryCodeRef.value.editableTableValidate())) return useMessage().warning("辅助条码必填项未填写完整")
console.log(form.smErpUnitEntityList)
console.log("未整理-包装单位", form.smErpUnitEntityList)
console.log("未整理-辅助条码", form.smErpAuxiliaryCodeEntityList)
const smErpAuxiliaryCodeEntityList = useAuxiliaryCode()
const smErpUnitEntityList = usePackageUnitList()
const smErpAuxiliaryCodeEntityList = settleAuxiliaryCode()
const smErpUnitEntityList = settlePackageUnitList()
try {
loading.value = true
const _pa = {
...form,
...formatedMoney.value,
grossMargin: storePrice(form.grossMargin),
...formatedBaseFormMoney.value,
smErpAuxiliaryCodeEntityList,
smErpUnitEntityList,
}
+43 -10
View File
@@ -1,16 +1,19 @@
<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">
<dict-select v-model="form.bizType" dict-code="wallet_biz_recharge" placeholder="请选择饭卡类型" />
<dict-select v-model="form.bizType" dict-code="wallet_biz_recharge"
:hide-ids="[roleCodes.includes('RETURN_CANTEEN') ? '' : '3']" placeholder="请选择饭卡类型" />
</el-form-item>
</el-col>
@@ -18,14 +21,26 @@
<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') && form.bizType == 3" :span="24" class="mb20">
<el-form-item label="授权" prop="isAuthorization">
<el-radio-group v-model="form.isAuthorization">
<el-radio v-for="v in yes_no_type" :key="v.value" :label="v.value" border>
{{ v.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</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>
@@ -40,11 +55,16 @@
</template>
<script setup lang="ts" name="WalletRechargeApplyDialog">
import { useDict } from "/@/hooks/dict"
import { useMessage } from "/@/hooks/message"
import { getObj, addObj, putObj } from "/@/api/wallet/wallet-recharge-apply"
const emit = defineEmits(["refresh"])
import { getWalletTypeSimple } from "/@/api/wallet/wallet-type"
import { useUserInfo } from "/@/stores/userInfo"
import { formatDate } from "/@/utils/formatTime"
// 定义查询字典
const { yes_no_type } = useDict("yes_no_type")
const {
userInfos: { roleCodes },
@@ -56,15 +76,17 @@ const loading = ref(false)
// 定义字典
// 提交表单数据
const form = reactive({
const defaultForm = {
id: "",
userId: "",
bizType: "",
walletTypeId: "",
deptId: "",
importTime: "",
importTime: formatDate(new Date(), "YYYY-mm"),
remark: "",
})
isAuthorization: "1",
}
const form = reactive<any>({ ...defaultForm })
const walletTypeOptions = ref()
const walletTypeIdDisabled = ref(true)
watch(
@@ -93,6 +115,7 @@ const dataRules = ref({
importTime: [{ required: true, message: "导入时间(手动选择)不能为空", trigger: "change" }],
bizType: [{ required: true, message: "请选择充值类型", trigger: "change" }],
walletTypeId: [{ required: true, message: "请选择钱包类型", trigger: "change" }],
isAuthorization: [{ required: true, message: "请选择是否授权", trigger: "change" }],
})
// 打开弹窗
@@ -118,9 +141,12 @@ 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("请同意授权协议")
return
}
try {
loading.value = true
form.id ? await putObj(form) : await addObj(form)
@@ -142,8 +168,15 @@ const getwalletRechargeApplyData = async (id: string) => {
const res = await getObj(id)
if (res.code == 0) {
Object.assign(form, res.data)
if (!form.importTime) {
form.importTime = formatDate(new Date(), "YYYY-mm-dd")
}
if (!form.isAuthorization) {
form.isAuthorization = "1"
}
}
} catch (err: any) {
console.error(err);
} finally {
loading.value = false
}
@@ -1,7 +1,8 @@
<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="用户" />
@@ -10,34 +11,32 @@
<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 v-if="false" plain :disabled="multiple" icon="Delete" type="primary"
v-auth="'wallet_walletRechargeApply_del'" @click="handleDelete(selectObjs)">
删除
</el-button>
@@ -45,30 +44,19 @@
<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="申请人" />
<el-table-column prop="bizType" width="100" label="充值类型">
<el-table-column prop="bizType" width="120" label="充值类型">
<template #default="{ row }">
<dict-tag :options="wallet_biz_recharge" :value="row.bizType" />
</template>
@@ -97,96 +85,62 @@
<el-table-column prop="remark" width="300" label="备注" />
<el-table-column width="250" label="时间">
<template #default="{ row }">
<div class="status">
<div v-if="false" class="status">
<span>创建时间</span>
<span>{{ row.createTime }} </span>
</div>
<div class="status">
<span>申请时间</span>
<span>{{ row.applyTime ?? "--" }} </span>
</div>
<div class="status">
<span>审批时间</span>
<span>{{ row.processTime ?? "--" }} </span>
</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)" />
<!-- 审批抽屉 -->
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />