商户管理新增字段和搜索

master
wangdong 6 months ago
parent 077c2e3e84
commit 666bc28630
  1. 58
      src/views/shop/Index.vue
  2. 23
      src/views/shop/modules/Add.vue
  3. 29
      src/views/shop/modules/Edit.vue

@ -1,6 +1,29 @@
<template>
<a-card :bordered="false">
<div class="card-title">{{ $route.meta.title }}</div>
<div class="table-operator">
<!-- 搜索板块 -->
<a-row class="row-item-search">
<a-form class="search-form" layout="inline">
<a-form-item label="商户名称">
<a-input v-model="queryParam.shop_name" placeholder="请输入商户名称" />
</a-form-item>
<a-form-item label="商户标签">
<a-input v-model="queryParam.shop_label" placeholder="请输入商户标签" />
</a-form-item>
<a-form-item label="评分">
<a-select v-model="queryParam.score" placeholder="请选择评分">
<a-select-option v-for="(item, index) in [5, 4, 3, 2, 1, 0]" :key="index" :value="item">{{
item
}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item class="search-btn">
<a-button type="primary" icon="search" @click="handleSearch">搜索</a-button>
</a-form-item>
</a-form>
</a-row>
</div>
<div class="table-operator">
<a-button v-action:add type="primary" icon="plus" @click="handleAdd">新增</a-button>
</div>
@ -19,6 +42,9 @@
<span slot="is_select_mechant" slot-scope="text, item">
{{ item.is_select_mechant ? '是' : '否' }}
</span>
<span slot="is_show_license" slot-scope="text, item">
{{ item.is_show_license ? '是' : '否' }}
</span>
<span slot="action" slot-scope="text, item">
<template>
<a v-action:edit style="margin-right: 8px" @click="handleEdit(item)">编辑</a>
@ -45,13 +71,18 @@ export default {
},
data() {
return {
queryParam: {},
loadData: (param) => {
return Api.shopList({ ...param }).then((response) => {
return Api.shopList({ ...param, ...this.queryParam }).then((response) => {
return response.data
})
},
//
columns: [
{
title: 'id',
dataIndex: 'merchant_id'
},
{
title: '商户logo',
dataIndex: 'logoImage',
@ -74,6 +105,27 @@ export default {
dataIndex: 'is_select_mechant',
scopedSlots: { customRender: 'is_select_mechant' }
},
{
title: '评分',
dataIndex: 'score'
},
{
title: '公司名称',
dataIndex: 'company_name'
},
{
title: '法人名字',
dataIndex: 'legal_person'
},
{
title: '手机号',
dataIndex: 'phone'
},
{
title: '是否展示营业执照',
dataIndex: 'is_show_license',
scopedSlots: { customRender: 'is_show_license' }
},
{
title: '累计金额',
dataIndex: 'total_amount'
@ -112,6 +164,10 @@ export default {
//
this.$refs.table.refresh(bool)
},
//
handleSearch (e) {
this.handleRefresh(true)
},
//
handleDelete(record) {
const self = this

@ -24,6 +24,21 @@
v-decorator="['shop_label', { rules: [{ required: true, min: 2, max: 10, message: '请输入2-10个字符' }] }]"
/>
</a-form-item>
<a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['company_name', { rules: [{ required: true, message: '请输入公司名称' }] }]"
/>
</a-form-item>
<a-form-item label="法人名字" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['legal_person', { rules: [{ required: true, message: '请输入法人名字' }] }]"
/>
</a-form-item>
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['phone', { rules: [{ required: true, message: '请输入手机号' }] }]"
/>
</a-form-item>
<a-form-item
label="营业执照"
:labelCol="labelCol"
@ -34,6 +49,14 @@
v-decorator="['license_img_id', { rules: [{ required: true, message: '请上传营业执照' }]}]"
/>
</a-form-item>
<a-form-item label="是否展示营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group
v-decorator="['is_show_license', { rules: [{ required: true, message: '请选择是否展示营业执照' }] }]"
>
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
label="店铺评分"
:labelCol="labelCol"

@ -26,6 +26,21 @@
v-decorator="['shop_label', { rules: [{ required: true, min: 2, max: 10, message: '请输入2-10个字符' }] }]"
/>
</a-form-item>
<a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['company_name', { rules: [{ required: true, message: '请输入公司名称' }] }]"
/>
</a-form-item>
<a-form-item label="法人名字" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['legal_person', { rules: [{ required: true, message: '请输入法人名字' }] }]"
/>
</a-form-item>
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['phone', { rules: [{ required: true, message: '请输入手机号' }] }]"
/>
</a-form-item>
<a-form-item
label="营业执照"
:labelCol="labelCol"
@ -37,6 +52,14 @@
v-decorator="['license_img_id', { rules: [{ required: true, message: '请上传营业执照' }]}]"
/>
</a-form-item>
<a-form-item label="是否展示营业执照" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group
v-decorator="['is_show_license', { rules: [{ required: true, message: '请选择是否展示营业执照' }] }]"
>
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
label="店铺评分"
:labelCol="labelCol"
@ -161,7 +184,11 @@ export default {
'score',
'user_name',
'commission_ratio',
'is_select_mechant'
'is_select_mechant',
'company_name',
'legal_person',
'phone',
'is_show_license'
])
)
})

Loading…
Cancel
Save