master
fanfan 4 months ago
parent 6e6a78e24d
commit ba34b3a170
  1. 37
      src/views/store/describe.vue
  2. 20
      src/views/store/modules/describeAdd.vue
  3. 69
      src/views/store/modules/describeEdit.vue

@ -6,10 +6,14 @@
<a-row class="row-item-search">
<a-form class="search-form" :form="searchForm" layout="inline" @submit="handleSearch">
<a-form-item label="功能名称">
<a-input v-decorator="['feature']" placeholder="请输入功能名称" />
<a-input v-decorator="['search']" v-model="queryParam.search" placeholder="请输入功能名称" />
</a-form-item>
<a-form-item label="板块名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select style="width:240px" v-decorator="['plate_id', { initialValue: 0 }]">
<a-select
style="width: 240px"
v-model="queryParam.plate_id"
v-decorator="['plate_id', { initialValue: 0 }]"
>
<a-select-option :value="0">全部</a-select-option>
<a-select-option :value="1">商品</a-select-option>
<a-select-option :value="2">数据</a-select-option>
@ -26,6 +30,20 @@
<a-select-option :value="13">其他功能</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="商城类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select style="width: 240px" v-model="queryParam.type" placeholder="请选择商城类型">
<a-select-option
v-for="(item, index) in [
{ retail_type: '', name: '全部' },
{ retail_type: 10, name: '零售商城' },
{ retail_type: 20, name: '批发商城' },
]"
:key="index"
:value="item.retail_type"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-item>
<a-form-item class="search-btn">
<a-button type="primary" icon="search" html-type="submit">搜索</a-button>
</a-form-item>
@ -47,6 +65,8 @@
<span slot="air" slot-scope="text"> {{ text == '10' ? '√' : text == '20' ? '×' : text }}</span>
<span slot="pro" slot-scope="text"> {{ text == '10' ? '√' : text == '20' ? '×' : text }}</span>
<span slot="H5" slot-scope="text"> {{ text == '10' ? '√' : text == '20' ? '×' : text }}</span>
<span slot="type" slot-scope="text"> {{ text == 10 ? '零售商城' : '批发商城' }}</span>
<p slot="function_description" style="white-space: pre-wrap; max-width: 350px" slot-scope="text">{{ text }}</p>
<span slot="action" slot-scope="text, item">
<template>
<a v-action:edit style="margin-right: 8px" @click="handleEdit(item)">编辑</a>
@ -76,8 +96,9 @@ export default {
//
//
queryParam: {
feature:'',
plate_id:''
search: '',
plate_id: '',
type: '',
},
searchForm: this.$form.createForm(this),
columns: [
@ -105,9 +126,15 @@ export default {
dataIndex: 'H5',
scopedSlots: { customRender: 'H5' },
},
{
title: '商城类型',
dataIndex: 'type',
scopedSlots: { customRender: 'type' },
},
{
title: '功能说明',
dataIndex: 'function_description',
scopedSlots: { customRender: 'function_description' },
},
{
title: '添加时间',
@ -122,7 +149,7 @@ export default {
],
// Promise
loadData: (param) => {
return Api.list(param).then((response) => {
return Api.list({ ...param, ...this.queryParam }).then((response) => {
return response.data.list
})
},

@ -11,6 +11,13 @@
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="售卖类型" :labelCol="labelCol" :wrapperCol="wrapperCol" required>
<a-radio-group v-decorator="['type', { initialValue: 10, rules: [{ required: true }] }]"
>
<a-radio :value="10">零售商城</a-radio>
<a-radio :value="20">批发商城</a-radio>
</a-radio-group>
</a-form-item >
<a-form-item label="板块名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-decorator="['plate_id', { initialValue: 1 }]">
<a-select-option :value="1">商品</a-select-option>
@ -43,13 +50,24 @@
<a-input v-decorator="['H5', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" />
</a-form-item>
<a-form-item label="功能描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
<a-textarea
v-decorator="[
'function_description',
{ rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },
]"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
</a-form-item>
<a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" required>
<a-radio-group v-decorator="['description_status', { initialValue: 10, rules: [{ required: true }] }]">
<a-radio :value="10">展示</a-radio>
<a-radio :value="20">隐藏</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前">
<a-input-number :min="0" v-decorator="['sort', { initialValue: 100, rules: [{ required: true }] }]" />
</a-form-item>
</a-form>
</a-spin>
</a-modal>

@ -11,39 +11,61 @@
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="售卖类型" :labelCol="labelCol" :wrapperCol="wrapperCol" required>
<a-radio-group v-decorator="['type', { initialValue: 10, rules: [{ required: true }] }]">
<a-radio :value="10">零售商城</a-radio>
<a-radio :value="20">批发商城</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="板块名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-decorator="['plate_id', { initialValue: 1 }]">
<a-select-option :value="1">商品</a-select-option>
<a-select-option :value="2">数据</a-select-option>
<a-select-option :value="3">商品订单</a-select-option>
<a-select-option :value="4">服务订单</a-select-option>
<a-select-option :value="5">回收订单</a-select-option>
<a-select-option :value="6">支付</a-select-option>
<a-select-option :value="7">财务</a-select-option>
<a-select-option :value="8">店铺展示</a-select-option>
<a-select-option :value="9">角色</a-select-option>
<a-select-option :value="10">营销</a-select-option>
<a-select-option :value="11">多商户</a-select-option>
<a-select-option :value="12">内容管理</a-select-option>
<a-select-option :value="13">其他功能</a-select-option>
</a-select>
</a-form-item>
<a-select v-decorator="['plate_id', { initialValue: 1 }]">
<a-select-option :value="1">商品</a-select-option>
<a-select-option :value="2">数据</a-select-option>
<a-select-option :value="3">商品订单</a-select-option>
<a-select-option :value="4">服务订单</a-select-option>
<a-select-option :value="5">回收订单</a-select-option>
<a-select-option :value="6">支付</a-select-option>
<a-select-option :value="7">财务</a-select-option>
<a-select-option :value="8">店铺展示</a-select-option>
<a-select-option :value="9">角色</a-select-option>
<a-select-option :value="10">营销</a-select-option>
<a-select-option :value="11">多商户</a-select-option>
<a-select-option :value="12">内容管理</a-select-option>
<a-select-option :value="13">其他功能</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="功能名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['feature', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" />
</a-form-item>
<a-form-item label="air" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item label="air" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
v-decorator="['air', { rules: [{ required: true, min: 2, max: 10, message: '请输入2-10个字符' }] }]"
/>
</a-form-item>
<a-form-item label="pro" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item label="pro" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['pro', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" />
</a-form-item>
<a-form-item label="H5" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item label="H5" extra="需在展示‘√’输入10,‘×’输入20" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['H5', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" />
</a-form-item>
<a-form-item label="功能描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['function_description', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]" />
<a-textarea
v-decorator="[
'function_description',
{ rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] },
]"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
</a-form-item>
<a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" required>
<a-radio-group v-decorator="['description_status', { initialValue: 10, rules: [{ required: true }] }]">
<a-radio :value="10">展示</a-radio>
<a-radio :value="20">隐藏</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前">
<a-input-number :min="0" v-decorator="['sort', { initialValue: 100, rules: [{ required: true }] }]" />
</a-form-item>
</a-form>
</a-spin>
@ -108,8 +130,11 @@ export default {
'feature',
'air',
'pro',
'H5',
'function_description',
'H5',
'function_description',
'type',
'sort',
'description_status',
])
)
})

Loading…
Cancel
Save