This commit is contained in:
weipengfei 2024-05-10 16:27:10 +08:00
commit beafe9528b
14 changed files with 4233 additions and 4787 deletions

View File

@ -62,4 +62,13 @@ watch(
.el-select.w-\[280px\] {
width: 280px;
}
.el-table th.el-table__cell>.cell {
text-align: center;
}
.el-table td.el-table__cell div {
text-align: center;
}
</style>

View File

@ -4,15 +4,8 @@
<!-- 触发弹窗 -->
<slot name="trigger"></slot>
</div>
<el-dialog
v-model="visible"
:custom-class="customClass"
:center="center"
:append-to-body="true"
:width="width"
:close-on-click-modal="clickModalClose"
@closed="close"
>
<el-dialog v-model="visible" :custom-class="customClass" :center="center" :append-to-body="true" :width="width"
:close-on-click-modal="clickModalClose" @closed="close">
<!-- 弹窗内容 -->
<template v-if="title" #header>{{ title }}</template>
@ -24,11 +17,7 @@
<el-button v-if="cancelButtonText" @click="handleEvent('cancel')">
{{ cancelButtonText }}
</el-button>
<el-button
v-if="confirmButtonText"
type="primary"
@click="handleEvent('confirm')"
>
<el-button v-if="confirmButtonText" type="primary" @click="handleEvent('confirm')">
{{ confirmButtonText }}
</el-button>
</div>
@ -78,7 +67,7 @@ export default defineComponent({
clickModalClose: {
//
type: Boolean,
default: false
default: true
},
center: {
//

View File

@ -1,124 +1,152 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="商户分类" prop="category_id">
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择商户分类">
<el-option
v-for="(item, index) in dictData.mer_category_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select>
</el-form-item>
<el-form-item label="店铺类型" prop="type_id">
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
<el-option
v-for="(item, index) in dictData.merchat_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select>
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="160px" :rules="formRules">
<el-row>
<el-col :span="24">
<el-form-item label="商户头像" prop="mer_avatar">
<material-picker v-model="formData.mer_avatar" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户名称" prop="mer_name">
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户分类" prop="category_id">
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择商户分类">
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="店铺类型" prop="type_id">
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否支持先货后款" prop="credit_buy">
<el-radio-group v-model="formData.credit_buy" placeholder="请选择是否支持先货后款">
<el-radio
v-for="(item, index) in dictData.show_status"
:key="index"
:label="parseInt(item.value)"
>
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="结算周期,单位天" prop="settle_cycle">
</el-col>
<el-col :span="8">
<el-form-item label="结算周期(天)" prop="settle_cycle">
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="利率" prop="interest_rate">
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" />
</el-form-item>
<el-form-item label="城市code" prop="city_id">
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" />
</el-col>
<el-col :span="8">
<el-form-item label="城市" prop="city_id">
<el-input v-model="formData.city_id" clearable placeholder="请输入城市" />
</el-form-item>
<el-form-item label="区县code" prop="area_id">
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" />
</el-col>
<el-col :span="8">
<el-form-item label="区县" prop="area_id">
<el-input v-model="formData.area_id" clearable placeholder="请输入区县" />
</el-form-item>
<el-form-item label="镇街表code" prop="street_id">
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" />
</el-col>
<el-col :span="8">
<el-form-item label="镇街" prop="street_id">
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街" />
</el-form-item>
<el-form-item label="村主键code" prop="village_id">
<el-input v-model="formData.village_id" clearable placeholder="请输入村主键code" />
</el-col>
<el-col :span="8">
<el-form-item label="村" prop="village_id">
<el-input v-model="formData.village_id" clearable placeholder="请输入村" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户地址" prop="mer_address">
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" />
</el-form-item>
<el-form-item label="商户头像" prop="mer_avatar">
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" />
</el-form-item>
<el-form-item label="商户备注" prop="mark">
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" />
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="" prop="sort">
<el-input v-model="formData.sort" clearable placeholder="请输入" />
</el-form-item>
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常">
<el-radio
v-for="(item, index) in dictData.off_status"
:key="index"
:label="parseInt(item.value)"
>
</el-col> -->
<el-col :span="8">
<el-form-item label="商户是否禁用" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用">
<el-radio v-for="(item, index) in dictData.off_status" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="提成比例" prop="commission_rate">
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户手续费单独设置" prop="commission_switch">
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置">
<el-radio
v-for="(item, index) in dictData.off_status"
:key="index"
:label="parseInt(item.value)"
>
<el-radio v-for="(item, index) in dictData.off_status" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经度" prop="long">
<el-input v-model="formData.long" clearable placeholder="请输入经度" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="纬度" prop="lat">
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="店铺电话" prop="service_phone">
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户余额" prop="mer_money">
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户备注" prop="mark">
<el-input v-model="formData.mark" type="textarea" clearable placeholder="请输入商户备注" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="银行卡转账信息" prop="financial_bank">
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="微信转账信息" prop="financial_wechat">
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="支付宝转账信息" prop="financial_alipay">
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</popup>
</div>

View File

@ -1,84 +1,95 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form class="mb-[-16px]" :model="queryParams" label-width="160px">
<el-row>
<el-col :span="6">
<el-form-item label="商户分类" prop="category_id">
<el-select class="w-[280px]"
v-model="queryParams.category_id" clearable placeholder="请选择商户分类">
<el-select class="w-[280px]" v-model="queryParams.category_id" clearable placeholder="请选择商户分类">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.mer_category_type"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
:label="item.name" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="店铺类型" prop="type_id">
<el-select class="w-[280px]"
v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
<el-select class="w-[280px]" v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.merchat_type"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="商户名称" prop="mer_name">
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否支持先货后款" prop="credit_buy">
<el-select class="w-[280px]"
v-model="queryParams.credit_buy" clearable placeholder="请选择是否支持先货后款">
<el-select class="w-[280px]" v-model="queryParams.credit_buy" clearable
placeholder="请选择是否支持先货后款">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.show_status"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.show_status" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
<el-select class="w-[280px]"
v-model="queryParams.status" clearable placeholder="请选择商户是否禁用0锁定,1正常">
</el-col>
<el-col :span="6">
<el-form-item label="商户是否禁用" prop="status">
<el-select class="w-[280px]" v-model="queryParams.status" clearable placeholder="请选择商户是否禁用">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.off_status"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.off_status" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="提成比例" prop="commission_rate">
<el-input class="w-[280px]" v-model="queryParams.commission_rate" clearable placeholder="请输入提成比例" />
<el-input class="w-[280px]" v-model="queryParams.commission_rate" clearable
placeholder="请输入提成比例" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="店铺电话" prop="service_phone">
<el-input class="w-[280px]" v-model="queryParams.service_phone" clearable placeholder="请输入店铺电话" />
<el-input class="w-[280px]" v-model="queryParams.service_phone" clearable
placeholder="请输入店铺电话" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="商户余额" prop="mer_money">
<el-input class="w-[280px]" v-model="queryParams.mer_money" clearable placeholder="请输入商户余额" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="银行卡转账信息" prop="financial_bank">
<el-input class="w-[280px]" v-model="queryParams.financial_bank" clearable placeholder="请输入银行卡转账信息" />
<el-input class="w-[280px]" v-model="queryParams.financial_bank" clearable
placeholder="请输入银行卡转账信息" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="微信转账信息" prop="financial_wechat">
<el-input class="w-[280px]" v-model="queryParams.financial_wechat" clearable placeholder="请输入微信转账信息" />
<el-input class="w-[280px]" v-model="queryParams.financial_wechat" clearable
placeholder="请输入微信转账信息" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="支付宝转账信息" prop="financial_alipay">
<el-input class="w-[280px]" v-model="queryParams.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
<el-input class="w-[280px]" v-model="queryParams.financial_alipay" clearable
placeholder="请输入支付宝转账信息" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
@ -88,11 +99,8 @@
</template>
新增
</el-button>
<el-button
v-perms="['merchat.merchant/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['merchat.merchant/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -115,12 +123,12 @@
<dict-value :options="dictData.show_status" :value="row.credit_buy" />
</template>
</el-table-column>
<el-table-column label="结算周期,单位天" prop="settle_cycle" show-overflow-tooltip />
<el-table-column label="结算周期(天)" prop="settle_cycle" show-overflow-tooltip />
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
<el-table-column label="城市code" prop="city_id" show-overflow-tooltip />
<el-table-column label="区县code" prop="area_id" show-overflow-tooltip />
<el-table-column label="镇街表code" prop="street_id" show-overflow-tooltip />
<el-table-column label="村主键code" prop="village_id" show-overflow-tooltip />
<el-table-column label="城市" prop="city_id" show-overflow-tooltip />
<el-table-column label="区县" prop="area_id" show-overflow-tooltip />
<el-table-column label="镇街表" prop="street_id" show-overflow-tooltip />
<el-table-column label="村主键" prop="village_id" show-overflow-tooltip />
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
<el-table-column label="商户头像" prop="mer_avatar" show-overflow-tooltip />
<el-table-column label="商户备注" prop="mark" show-overflow-tooltip />
@ -132,20 +140,11 @@
<el-table-column label="支付宝转账信息" prop="financial_alipay" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['merchat.merchant/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['merchat.merchant/edit']" type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['merchat.merchant/delete']"
type="danger"
link
@click="handleDelete(row.mer_id)"
>
<el-button v-perms="['merchat.merchant/delete']" type="danger" link
@click="handleDelete(row.mer_id)">
删除
</el-button>
</template>

View File

@ -1,13 +1,6 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
title="详情"
:async="true"
width="550px"
:cancelButtonText="false"
:confirmButtonText="false"
>
<popup ref="popupRef" title="详情" :async="true" width="550px" :cancelButtonText="false" :confirmButtonText="false">
<el-form ref="formRef" :model="formData" label-width="90px">
<el-form-item label="商户分类 id" prop="category_id">
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="true" />
@ -19,7 +12,7 @@
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="true" />
</el-form-item>
<el-form-item label="结算周期,单位天" prop="settle_cycle">
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" :readonly="true"/>
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期(天)" :readonly="true" />
</el-form-item>
<el-form-item label="利率" prop="interest_rate">
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="true" />
@ -49,12 +42,8 @@
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="true" />
</el-form-item>
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常" :disabled="true">
<el-radio
v-for="(item, index) in dictData.show_status"
:key="index"
:label="parseInt(item.value)"
>
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用" :disabled="true">
<el-radio v-for="(item, index) in dictData.show_status" :key="index" :label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
@ -63,12 +52,9 @@
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="true" />
</el-form-item>
<el-form-item label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启" :disabled="true">
<el-radio
v-for="(item, index) in dictData.show_status"
:key="index"
:label="parseInt(item.value)"
>
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启"
:disabled="true">
<el-radio v-for="(item, index) in dictData.show_status" :key="index" :label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>

View File

@ -1,102 +1,156 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="商户分类 id" prop="category_id">
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="false"/>
</el-form-item>
<el-form-item label="店铺类型 id" prop="type_id">
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="false"/>
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row>
<el-col :span="24">
<el-form-item label="商户头像" prop="mer_avatar">
<material-picker v-model="formData.mer_avatar" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户名称" prop="mer_name">
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="false" />
</el-form-item>
<el-form-item label="结算周期,单位天" prop="settle_cycle">
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" :readonly="false"/>
</el-col>
<el-col :span="8">
<el-form-item label="商户分类" prop="category_id">
<el-select class="flex-1" v-model="formData.category_id" clearable placeholder="请选择店铺类型">
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="店铺类型" prop="type_id">
<el-select class="flex-1" v-model="formData.type_id" clearable placeholder="请选择店铺类型">
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结算周期(天)" prop="settle_cycle">
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="利率" prop="interest_rate">
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="标签" prop="sys_labels">
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="false" />
</el-form-item>
<el-form-item label="城市code" prop="city_id">
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="false"/>
</el-col>
<el-col :span="8">
<el-form-item label="城市" prop="city_id">
<el-input v-model="formData.city_id" clearable placeholder="请输入城市" :readonly="false" />
</el-form-item>
<el-form-item label="区县code" prop="area_id">
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="false"/>
</el-col>
<el-col :span="8">
<el-form-item label="区县" prop="area_id">
<el-input v-model="formData.area_id" clearable placeholder="请输入区县" :readonly="false" />
</el-form-item>
<el-form-item label="镇街表code" prop="street_id">
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="false"/>
</el-col>
<el-col :span="8">
<el-form-item label="镇街" prop="street_id">
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表" :readonly="false" />
</el-form-item>
<el-form-item label="村code" prop="village_id">
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="false"/>
</el-col>
<el-col :span="8">
<el-form-item label="村" prop="village_id">
<el-input v-model="formData.village_id" clearable placeholder="请输入村" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户地址" prop="mer_address">
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="false" />
</el-form-item>
<el-form-item label="商户头像" prop="mer_avatar">
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="false"/>
</el-form-item>
<el-form-item label="商户备注" prop="mark">
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="false"/>
</el-form-item>
<el-form-item label="商户是否禁用0锁定,1正常" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用0锁定,1正常" :disabled="false">
<el-radio
v-for="(item, index) in dictData.show_status"
:key="index"
:label="parseInt(item.value)"
>
</el-col>
<el-col :span="8">
<el-form-item label="商户是否禁用" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用" :disabled="false">
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="提成比例" prop="commission_rate">
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="false"/>
<el-input v-model="formData.commission_rate" type="number" clearable placeholder="请输入提成比例"
:readonly="false" />
</el-form-item>
<el-form-item label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置 0 关闭 1 开启" :disabled="false">
<el-radio
v-for="(item, index) in dictData.show_status"
:key="index"
:label="parseInt(item.value)"
>
</el-col>
<el-col :span="8">
<el-form-item label="商户手续费单独设置" prop="commission_switch" label-width="180px">
<el-radio-group v-model="formData.commission_switch" placeholder="请选择商户手续费单独设置"
:disabled="false">
<el-radio v-for="(item, index) in dictData.show_status" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经度" prop="long">
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="纬度" prop="lat">
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="店铺电话" prop="service_phone">
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户余额" prop="mer_money">
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户备注" prop="mark">
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" type="textarea"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="银行卡转账信息" prop="financial_bank">
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="false"/>
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="微信转账信息" prop="financial_wechat">
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="false"/>
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="支付宝转账信息" prop="financial_alipay">
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="false"/>
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="默认使用类型" prop="financial_type">
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="false"/>
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型"
:readonly="false" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</popup>
</div>
@ -106,7 +160,6 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiSupplierAdd, apiSupplierEdit, apiSupplierDetail } from '@/api/supplier'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
dictData: {
@ -249,6 +302,16 @@ const handleClose = () => {
//
const address = reactive({
cityList: [],
areaList: [],
townList: [],
villlageList: []
})
defineExpose({
open,
setFormData,

View File

@ -1,24 +1,38 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="商户分类 id" prop="category_id">
<el-input class="w-[280px]" v-model="queryParams.category_id" clearable placeholder="请输入商户分类 id" />
<el-form class="mb-[-16px]" :model="queryParams" label-width="120px">
<el-row>
<el-col :span="6">
<el-form-item label="商户分类" prop="category_id">
<el-select v-model="queryParams.category_id" clearable placeholder="请选择店铺类型">
<el-option v-for="(item, index) in dictData.mer_category_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</el-form-item>
<el-form-item label="店铺类型 id" prop="type_id">
<el-input class="w-[280px]" v-model="queryParams.type_id" clearable placeholder="请输入店铺类型 id" />
</el-col>
<el-col :span="6">
<el-form-item label="店铺类型" prop="type_id">
<el-select v-model="queryParams.type_id" clearable placeholder="请选择店铺类型">
<el-option v-for="(item, index) in dictData.merchat_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="商户名称" prop="mer_name">
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
<el-input v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
@ -28,51 +42,48 @@
</template>
新增
</el-button>
<el-button
v-perms="['supplier.supplier/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['supplier.supplier/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="商户分类 id" prop="category_id" show-overflow-tooltip />
<el-table-column label="店铺类型 id" prop="type_id" show-overflow-tooltip />
<el-table-column label="商户分类" prop="category_id" show-overflow-tooltip>
<template #default="{ row }">
<dict-value :options="dictData.mer_category_type" :value="row.category_id" />
</template>
</el-table-column>
<el-table-column label="店铺类型" prop="type_id" show-overflow-tooltip>
<template #default="{ row }">
<dict-value :options="dictData.merchat_type" :value="row.type_id" />
</template>
</el-table-column>
<el-table-column label="商户名称" prop="mer_name" show-overflow-tooltip />
<el-table-column label="结算周期,单位天" prop="settle_cycle" show-overflow-tooltip />
<el-table-column label="结算周期(天)" prop="settle_cycle" show-overflow-tooltip />
<el-table-column label="利率" prop="interest_rate" show-overflow-tooltip />
<el-table-column label="标签" prop="sys_labels" show-overflow-tooltip />
<el-table-column label="商户地址" prop="mer_address" show-overflow-tooltip />
<el-table-column label="商户是否禁用0锁定,1正常" prop="status">
<el-table-column label="商户是否禁用" prop="status">
<template #default="{ row }">
<dict-value :options="dictData.show_status" :value="row.status" />
</template>
</el-table-column>
<el-table-column label="提成比例" prop="commission_rate" show-overflow-tooltip />
<el-table-column label="商户手续费单独设置 0 关闭 1 开启" prop="commission_switch">
<el-table-column label="商户手续费单独设置" width="200" prop="commission_switch">
<template #default="{ row }">
<dict-value :options="dictData.show_status" :value="row.commission_switch" />
<!-- <dict-value :options="dictData.show_status" :value="row.commission_switch" /> -->
{{ row.commission_switch ? "开启" : "关闭" }}
</template>
</el-table-column>
<el-table-column label="商户余额" prop="mer_money" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['supplier.supplier/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['supplier.supplier/edit']" type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['supplier.supplier/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['supplier.supplier/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
</template>
@ -116,7 +127,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('show_status')
const { dictData } = useDictData('show_status,mer_category_type,merchat_type')
//
const { pager, getLists, resetParams, resetPage } = usePaging({

View File

@ -1,16 +1,10 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="头像" prop="avatar">
<el-input v-model="formData.avatar" clearable placeholder="请输入头像" :readonly="false"/>
<material-picker v-model="formData.avatar" />
<!-- <avaterUpload :formData="formData" value="avatar"></avaterUpload> -->
</el-form-item>
<el-form-item label="真实姓名" prop="real_name">
<el-input v-model="formData.real_name" clearable placeholder="请输入真实姓名" :readonly="false" />
@ -29,22 +23,15 @@
</el-form-item>
<el-form-item label="用户性别" prop="sex">
<el-radio-group v-model="formData.sex" placeholder="请选择用户性别" :disabled="false">
<el-radio
v-for="(item, index) in dictData.sex_type"
:key="index"
:label="parseInt(item.value)"
>
<el-radio v-for="(item, index) in dictData.sex_type" :key="index" :label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否禁用" prop="is_disable">
<el-radio-group v-model="formData.is_disable" placeholder="请选择是否禁用" :disabled="false">
<el-radio
v-for="(item, index) in dictData.system_disable"
:key="index"
:label="parseInt(item.value)"
>
<el-radio v-for="(item, index) in dictData.system_disable" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>

View File

@ -1,11 +1,7 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="用户昵称" prop="nickname">
<el-input class="w-[280px]" v-model="queryParams.nickname" clearable placeholder="请输入用户昵称" />
</el-form-item>
@ -16,15 +12,10 @@
<el-input class="w-[280px]" v-model="queryParams.mobile" clearable placeholder="请输入用户电话" />
</el-form-item>
<el-form-item label="是否禁用" prop="is_disable">
<el-select class="w-[280px]"
v-model="queryParams.is_disable" clearable placeholder="请选择是否禁用">
<el-select class="w-[280px]" v-model="queryParams.is_disable" clearable placeholder="请选择是否禁用">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.system_disable"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.system_disable" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item>
@ -40,11 +31,7 @@
</template>
新增
</el-button>
<el-button
v-perms="['user.user/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['user.user/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -67,20 +54,10 @@
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['user.user/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['user.user/edit']" type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['user.user/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['user.user/delete']" type="danger" link @click="handleDelete(row.id)">
删除
</el-button>
</template>

View File

@ -1,13 +1,6 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
title="详情"
:async="true"
width="550px"
:cancelButtonText="false"
:confirmButtonText="false"
>
<popup ref="popupRef" title="详情" :async="true" width="550px" :cancelButtonText="false" :confirmButtonText="false">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="所属商户" prop="merchant">
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="true" />
@ -37,13 +30,10 @@
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="true" />
</el-form-item>
<el-form-item label="支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" prop="pay_type">
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="true">
<el-option
v-for="(item, index) in dictData.pay_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
<el-select class="flex-1" v-model="formData.pay_type" clearable
placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="true">
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
<el-form-item label="备注信息" prop="data">
@ -51,11 +41,8 @@
</el-form-item>
<el-form-item label="审核状态[0:未审核|1:已审核]" prop="type">
<el-radio-group v-model="formData.type" placeholder="请选择审核状态[0:未审核|1:已审核]" :disabled="true">
<el-radio
v-for="(item, index) in dictData.auditing_type"
:key="index"
:label="parseInt(item.value)"
>
<el-radio v-for="(item, index) in dictData.auditing_type" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
@ -64,14 +51,8 @@
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="true" />
</el-form-item>
<el-form-item label="审核时间" prop="auditingtime">
<el-date-picker
:readonly="true"
class="flex-1 !flex"
v-model="formData.auditingtime"
clearable
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择审核时间">
<el-date-picker :readonly="true" class="flex-1 !flex" v-model="formData.auditingtime" clearable
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择审核时间">
</el-date-picker>
</el-form-item>

View File

@ -1,83 +1,110 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="所属商户" prop="merchant">
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归属门店" prop="store_id">
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户ID" prop="customer">
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单据时间" prop="time">
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="false"/>
<!-- <el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="false" /> -->
<el-date-picker :readonly="false" class="flex-1 !flex" v-model="formData.time" clearable
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择单据时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单据编号" prop="number">
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单据金额" prop="total">
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="false"/>
<el-input v-model="formData.total" type="number" clearable placeholder="请输入单据金额"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="抵扣金额" prop="deduction_price">
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="false"/>
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际金额" prop="actual">
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="false"/>
<el-input v-model="formData.actual" type="number" clearable placeholder="请输入实际金额"
:readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实收金额" prop="money">
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="false"/>
<el-input v-model="formData.money" type="number" clearable placeholder="请输入实收金额"
:readonly="false" />
</el-form-item>
<el-form-item label="支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" prop="pay_type">
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账" :disabled="false">
<el-option
v-for="(item, index) in dictData.pay_type"
:key="index"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-col>
<el-col :span="8">
<el-form-item label="支付方式 " prop="pay_type">
<el-select class="flex-1" v-model="formData.pay_type" clearable placeholder="请选择支付方式"
:disabled="false">
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注信息" prop="data">
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="false"/>
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" type="textarea"
:readonly="false" />
</el-form-item>
<el-form-item label="审核状态[0:未审核|1:已审核]" prop="type">
<el-radio-group v-model="formData.type" placeholder="请选择审核状态[0:未审核|1:已审核]" :disabled="false">
<el-radio
v-for="(item, index) in dictData.auditing_type"
:key="index"
:label="parseInt(item.value)"
>
</el-col>
<el-col :span="8">
<el-form-item label="审核状态" prop="type">
<el-radio-group v-model="formData.type" placeholder="请选择审核状态" :disabled="false">
<el-radio v-for="(item, index) in dictData.auditing_type" :key="index"
:label="parseInt(item.value)">
{{ item.name }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核人" prop="auditinguser">
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核时间" prop="auditingtime">
<el-date-picker
:readonly="false"
class="flex-1 !flex"
v-model="formData.auditingtime"
clearable
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择审核时间">
<el-date-picker :readonly="false" class="flex-1 !flex" v-model="formData.auditingtime" clearable
type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择审核时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="扩展信息" prop="more">
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="false"/>
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" type="textarea"
:readonly="false" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</popup>
</div>

View File

@ -1,11 +1,7 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="所属商户" prop="merchant">
<el-input class="w-[280px]" v-model="queryParams.merchant" clearable placeholder="请输入所属商户" />
</el-form-item>
@ -25,27 +21,17 @@
<el-input class="w-[280px]" v-model="queryParams.user" clearable placeholder="请输入制单人" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type" tips=" 0余额 1微信 2小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码 8先货后款 10对公转账">
<el-select class="w-[280px]"
v-model="queryParams.pay_type" clearable placeholder="请选择支付方式">
<el-select class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请选择支付方式">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.pay_type"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.pay_type" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="审核状态" prop="type">
<el-select class="w-[280px]"
v-model="queryParams.type" clearable placeholder="请选择审核状态">
<el-select class="w-[280px]" v-model="queryParams.type" clearable placeholder="请选择审核状态">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in dictData.auditing_type"
:key="index"
:label="item.name"
:value="item.value"
/>
<el-option v-for="(item, index) in dictData.auditing_type" :key="index" :label="item.name"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="审核人" prop="auditinguser">
@ -64,11 +50,8 @@
</template>
新增
</el-button>
<el-button
v-perms="['retail.cashierclass/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['retail.cashierclass/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -101,24 +84,19 @@
<span>{{ row.auditingtime ? timeFormat(row.auditingtime, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['retail.cashierclass/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['retail.cashierclass/edit']" type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['retail.cashierclass/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['retail.cashierclass/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['retail.cashierclass/edit']" type="primary" link
@click="handleDetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -128,6 +106,8 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detail-popup v-if="showDetail" ref="detailRef" :dict-data="dictData" @success="getLists"
@close="showDetail = false" />
</div>
</template>
@ -138,10 +118,13 @@ import { apiCashierclassLists, apiCashierclassDelete } from '@/api/cashierclass'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import DetailPopup from './details.vue'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDetail = ref(false)
//
@ -189,6 +172,14 @@ const handleEdit = async (data: any) => {
editRef.value?.setFormData(data)
}
//
const handleDetail = async (data: any) => {
showDetail.value = true
await nextTick()
detailRef.value?.open('edit')
detailRef.value?.setFormData(data)
}
//
const handleDelete = async (id: number | any[]) => {
await feedback.confirm('确定要删除?')

View File

@ -14,7 +14,8 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
export default ({ mode }) => defineConfig({
base: '/admin/',
server: {
host: '0.0.0.0'
host: '0.0.0.0',
open:true
},
plugins: [
vue(),

7655
yarn.lock

File diff suppressed because it is too large Load Diff