Merge branch 'main' of https://gitea.lihaink.cn/weipengfei/ERP-admin
This commit is contained in:
commit
beafe9528b
11
src/App.vue
11
src/App.vue
|
@ -59,7 +59,16 @@ watch(
|
|||
/* .el-select__wrapper{
|
||||
width: 280px;
|
||||
} */
|
||||
.el-select.w-\[280px\]{
|
||||
.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>
|
||||
|
|
|
@ -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: {
|
||||
// 是否居中布局
|
||||
|
|
|
@ -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>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="mer_name">
|
||||
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" />
|
||||
</el-form-item>
|
||||
<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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算周期,单位天" prop="settle_cycle">
|
||||
<el-input v-model="formData.settle_cycle" clearable placeholder="请输入结算周期,单位天" />
|
||||
</el-form-item>
|
||||
<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-form-item>
|
||||
<el-form-item label="区县code" prop="area_id">
|
||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="镇街表code" prop="street_id">
|
||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="村主键code" prop="village_id">
|
||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村主键code" />
|
||||
</el-form-item>
|
||||
<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-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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成比例" prop="commission_rate">
|
||||
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" />
|
||||
</el-form-item>
|
||||
<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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" prop="long">
|
||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" prop="lat">
|
||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺电话" prop="service_phone">
|
||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户余额" prop="mer_money">
|
||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
|
||||
</el-form-item>
|
||||
<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)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</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="请输入结算周期,单位天" />
|
||||
</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-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-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-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-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-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="" prop="sort">
|
||||
<el-input v-model="formData.sort" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</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)">
|
||||
{{ 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>
|
||||
|
@ -245,8 +273,8 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -260,9 +288,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiMerchantEdit(data)
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiMerchantEdit(data)
|
||||
: await apiMerchantAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
|
|
|
@ -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-item label="商户分类" prop="category_id">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺类型" prop="type_id">
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="mer_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否支持先货后款" prop="credit_buy">
|
||||
<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-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-option label="全部" value=""></el-option>
|
||||
<el-option
|
||||
v-for="(item, index) in dictData.off_status"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成比例" prop="commission_rate">
|
||||
<el-input class="w-[280px]" v-model="queryParams.commission_rate" clearable placeholder="请输入提成比例" />
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺电话" prop="service_phone">
|
||||
<el-input class="w-[280px]" v-model="queryParams.service_phone" clearable placeholder="请输入店铺电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户余额" prop="mer_money">
|
||||
<el-input class="w-[280px]" v-model="queryParams.mer_money" clearable placeholder="请输入商户余额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||
<el-input class="w-[280px]" v-model="queryParams.financial_bank" clearable placeholder="请输入银行卡转账信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||
<el-input class="w-[280px]" v-model="queryParams.financial_wechat" clearable placeholder="请输入微信转账信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||
<el-input class="w-[280px]" v-model="queryParams.financial_alipay" clearable placeholder="请输入支付宝转账信息" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
<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-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-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-option label="全部" value=""></el-option>
|
||||
<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-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.show_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="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-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-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-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-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-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-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>
|
||||
|
|
|
@ -1,101 +1,87 @@
|
|||
<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"/>
|
||||
<el-input v-model="formData.category_id" clearable placeholder="请输入商户分类 id" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺类型 id" prop="type_id">
|
||||
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="true"/>
|
||||
<el-input v-model="formData.type_id" clearable placeholder="请输入店铺类型 id" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="mer_name">
|
||||
<el-input v-model="formData.mer_name" clearable placeholder="请输入商户名称" :readonly="true"/>
|
||||
<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"/>
|
||||
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标签" prop="sys_labels">
|
||||
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="true"/>
|
||||
<el-input v-model="formData.sys_labels" clearable placeholder="请输入标签" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="城市code" prop="city_id">
|
||||
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="true"/>
|
||||
<el-input v-model="formData.city_id" clearable placeholder="请输入城市code" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区县code" prop="area_id">
|
||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="true"/>
|
||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="镇街表code" prop="street_id">
|
||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="true"/>
|
||||
<el-input v-model="formData.street_id" clearable placeholder="请输入镇街表code" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="村code" prop="village_id">
|
||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="true"/>
|
||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户地址" prop="mer_address">
|
||||
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="true"/>
|
||||
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户头像" prop="mer_avatar">
|
||||
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="true"/>
|
||||
<el-input v-model="formData.mer_avatar" clearable placeholder="请输入商户头像" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户备注" prop="mark">
|
||||
<el-input v-model="formData.mark" clearable placeholder="请输入商户备注" :readonly="true"/>
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成比例" prop="commission_rate">
|
||||
<el-input v-model="formData.commission_rate" clearable placeholder="请输入提成比例" :readonly="true"/>
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" prop="long">
|
||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="true"/>
|
||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" prop="lat">
|
||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="true"/>
|
||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺电话" prop="service_phone">
|
||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="true"/>
|
||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户余额" prop="mer_money">
|
||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="true"/>
|
||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="true"/>
|
||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="true"/>
|
||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="true"/>
|
||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="默认使用类型" prop="financial_type">
|
||||
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="true"/>
|
||||
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
@ -160,8 +146,8 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
|
|
@ -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"/>
|
||||
</el-form-item>
|
||||
<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-form-item>
|
||||
<el-form-item label="利率" prop="interest_rate">
|
||||
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<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-form-item>
|
||||
<el-form-item label="区县code" prop="area_id">
|
||||
<el-input v-model="formData.area_id" clearable placeholder="请输入区县code" :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-form-item>
|
||||
<el-form-item label="村code" prop="village_id">
|
||||
<el-input v-model="formData.village_id" clearable placeholder="请输入村code" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="提成比例" prop="commission_rate">
|
||||
<el-input v-model="formData.commission_rate" 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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" prop="long">
|
||||
<el-input v-model="formData.long" clearable placeholder="请输入经度" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" prop="lat">
|
||||
<el-input v-model="formData.lat" clearable placeholder="请输入纬度" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺电话" prop="service_phone">
|
||||
<el-input v-model="formData.service_phone" clearable placeholder="请输入店铺电话" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商户余额" prop="mer_money">
|
||||
<el-input v-model="formData.mer_money" clearable placeholder="请输入商户余额" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡转账信息" prop="financial_bank">
|
||||
<el-input v-model="formData.financial_bank" clearable placeholder="请输入银行卡转账信息" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="微信转账信息" prop="financial_wechat">
|
||||
<el-input v-model="formData.financial_wechat" clearable placeholder="请输入微信转账信息" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付宝转账信息" prop="financial_alipay">
|
||||
<el-input v-model="formData.financial_alipay" clearable placeholder="请输入支付宝转账信息" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="默认使用类型" prop="financial_type">
|
||||
<el-input v-model="formData.financial_type" clearable placeholder="请输入默认使用类型" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<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-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-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-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-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-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-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" type="number" clearable placeholder="请输入提成比例"
|
||||
:readonly="false" />
|
||||
</el-form-item>
|
||||
</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-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-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-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-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: {
|
||||
|
@ -213,8 +266,8 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -228,9 +281,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupplierEdit(data)
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiSupplierEdit(data)
|
||||
: await apiSupplierAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
|
@ -249,6 +302,16 @@ const handleClose = () => {
|
|||
|
||||
|
||||
|
||||
// 地址
|
||||
const address = reactive({
|
||||
cityList: [],
|
||||
areaList: [],
|
||||
townList: [],
|
||||
villlageList: []
|
||||
})
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
|
|
|
@ -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-item>
|
||||
<el-form-item label="店铺类型 id" prop="type_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type_id" clearable placeholder="请输入店铺类型 id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商户名称" prop="mer_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.mer_name" clearable placeholder="请输入商户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
<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-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 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({
|
||||
|
|
|
@ -1,56 +1,43 @@
|
|||
<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"/>
|
||||
<el-input v-model="formData.real_name" clearable placeholder="请输入真实姓名" :readonly="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户昵称" prop="nickname">
|
||||
<el-input v-model="formData.nickname" clearable placeholder="请输入用户昵称" :readonly="false"/>
|
||||
<el-input v-model="formData.nickname" clearable placeholder="请输入用户昵称" :readonly="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户账号" prop="account">
|
||||
<el-input v-model="formData.account" clearable placeholder="请输入用户账号" :readonly="false"/>
|
||||
<el-input v-model="formData.account" clearable placeholder="请输入用户账号" :readonly="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户密码" prop="password">
|
||||
<el-input v-model="formData.password" clearable placeholder="请输入用户密码" :readonly="false"/>
|
||||
<el-input v-model="formData.password" clearable placeholder="请输入用户密码" :readonly="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户电话" prop="mobile">
|
||||
<el-input v-model="formData.mobile" clearable placeholder="请输入用户电话" :readonly="false"/>
|
||||
<el-input v-model="formData.mobile" clearable placeholder="请输入用户电话" :readonly="false" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户余额" prop="user_money">
|
||||
<el-input v-model="formData.user_money" clearable placeholder="请输入用户余额" :readonly="false"/>
|
||||
<el-input v-model="formData.user_money" clearable placeholder="请输入用户余额" :readonly="false" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
@ -133,8 +120,8 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -148,9 +135,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiUserEdit(data)
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiUserEdit(data)
|
||||
: await apiUserAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
|
|
|
@ -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,20 +31,16 @@
|
|||
</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">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="主键" prop="id" show-overflow-tooltip />
|
||||
<el-table-column label="头像" prop="avatar" show-overflow-tooltip >
|
||||
<el-table-column label="头像" prop="avatar" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-image :src="row.avatar" style="width: 50px;height: 50px"/>
|
||||
<el-image :src="row.avatar" style="width: 50px;height: 50px" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="真实姓名" prop="real_name" show-overflow-tooltip />
|
||||
|
@ -62,25 +49,15 @@
|
|||
<el-table-column label="用户电话" prop="mobile" show-overflow-tooltip />
|
||||
<el-table-column label="用户性别" prop="sex">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.sex==1?'男':'女' }}</span>
|
||||
<span>{{ row.sex == 1 ? '男' : '女' }}</span>
|
||||
</template>
|
||||
</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>
|
||||
|
|
|
@ -1,82 +1,63 @@
|
|||
<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"/>
|
||||
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="归属门店" prop="store_id">
|
||||
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="true"/>
|
||||
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户ID" prop="customer">
|
||||
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="true"/>
|
||||
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据时间" prop="time">
|
||||
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="true"/>
|
||||
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号" prop="number">
|
||||
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="true"/>
|
||||
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据金额" prop="total">
|
||||
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="true"/>
|
||||
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抵扣金额" prop="deduction_price">
|
||||
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="true"/>
|
||||
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际金额" prop="actual">
|
||||
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="true"/>
|
||||
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实收金额" prop="money">
|
||||
<el-input v-model="formData.money" clearable placeholder="请输入实收金额" :readonly="true"/>
|
||||
<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">
|
||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="true"/>
|
||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :readonly="true" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人" prop="auditinguser">
|
||||
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="true"/>
|
||||
<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>
|
||||
|
||||
|
||||
<el-form-item label="扩展信息" prop="more">
|
||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="true"/>
|
||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
@ -132,9 +113,9 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//@ts-ignore
|
||||
formData.auditingtime = timeFormat(formData.auditingtime,'yyyy-mm-dd hh:MM:ss')
|
||||
formData.auditingtime = timeFormat(formData.auditingtime, 'yyyy-mm-dd hh:MM:ss')
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
|
|
@ -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-form-item label="所属商户" prop="merchant">
|
||||
<el-input v-model="formData.merchant" clearable placeholder="请输入所属商户" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="归属门店" prop="store_id">
|
||||
<el-input v-model="formData.store_id" clearable placeholder="请输入归属门店" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户ID" prop="customer">
|
||||
<el-input v-model="formData.customer" clearable placeholder="请输入客户ID" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据时间" prop="time">
|
||||
<el-input v-model="formData.time" clearable placeholder="请输入单据时间" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据编号" prop="number">
|
||||
<el-input v-model="formData.number" clearable placeholder="请输入单据编号" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据金额" prop="total">
|
||||
<el-input v-model="formData.total" clearable placeholder="请输入单据金额" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抵扣金额" prop="deduction_price">
|
||||
<el-input v-model="formData.deduction_price" clearable placeholder="请输入抵扣金额" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际金额" prop="actual">
|
||||
<el-input v-model="formData.actual" clearable placeholder="请输入实际金额" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实收金额" prop="money">
|
||||
<el-input v-model="formData.money" 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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" prop="data">
|
||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" :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)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人" prop="auditinguser">
|
||||
<el-input v-model="formData.auditinguser" clearable placeholder="请输入审核人" :readonly="false"/>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="扩展信息" prop="more">
|
||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" :readonly="false"/>
|
||||
</el-form-item>
|
||||
|
||||
<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-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" 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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际金额" prop="actual">
|
||||
<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" type="number" clearable placeholder="请输入实收金额"
|
||||
:readonly="false" />
|
||||
</el-form-item>
|
||||
</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="请输入备注信息" type="textarea"
|
||||
:readonly="false" />
|
||||
</el-form-item>
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="扩展信息" prop="more">
|
||||
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" type="textarea"
|
||||
:readonly="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
|
@ -180,9 +207,9 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//@ts-ignore
|
||||
formData.auditingtime = timeFormat(formData.auditingtime,'yyyy-mm-dd hh:MM:ss')
|
||||
formData.auditingtime = timeFormat(formData.auditingtime, 'yyyy-mm-dd hh:MM:ss')
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -196,9 +223,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCashierclassEdit(data)
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCashierclassEdit(data)
|
||||
: await apiCashierclassAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
|
|
|
@ -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">
|
||||
|
@ -98,27 +81,22 @@
|
|||
<el-table-column label="审核人" prop="auditinguser" show-overflow-tooltip />
|
||||
<el-table-column label="审核时间" prop="auditingtime">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.auditingtime ? timeFormat(row.auditingtime, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||
<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('确定要删除?')
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue