[积分商城]商品管理-优化
This commit is contained in:
@@ -4,12 +4,14 @@ export default {
|
||||
description: 'description',
|
||||
remark: 'remark',
|
||||
score: 'score',
|
||||
'类型': '类型',
|
||||
'类型 1': '类型 1',
|
||||
'类型 2': '类型 2',
|
||||
'类型 3': '类型 3',
|
||||
type: 'type',
|
||||
'type 1': 'type 1',
|
||||
'type 2': 'type 2',
|
||||
'type 3': 'type 3',
|
||||
admin_id: 'admin_id',
|
||||
admin__username: 'username',
|
||||
image: 'show image',
|
||||
stock: 'stock',
|
||||
sort: 'sort',
|
||||
create_time: 'create_time',
|
||||
update_time: 'update_time',
|
||||
|
||||
@@ -4,13 +4,18 @@ export default {
|
||||
description: '描述',
|
||||
remark: '备注',
|
||||
score: '兑换积分',
|
||||
'类型': '类型',
|
||||
'类型 1': '奖励',
|
||||
'类型 2': '充值',
|
||||
'类型 3': '实物',
|
||||
type: '类型',
|
||||
'type 1': '奖励',
|
||||
'type 2': '充值',
|
||||
'type 3': '实物',
|
||||
admin_id: '创建管理员',
|
||||
admin__username: '用户名',
|
||||
admin__username: '创建管理员',
|
||||
image: '展示图',
|
||||
stock: '库存',
|
||||
sort: '排序',
|
||||
status: '状态',
|
||||
'status 0': '禁用',
|
||||
'status 1': '启用',
|
||||
create_time: '创建时间',
|
||||
update_time: '修改时间',
|
||||
'quick Search Fields': 'ID',
|
||||
|
||||
@@ -48,20 +48,69 @@ const baTable = new baTableClass(
|
||||
{ type: 'selection', align: 'center', operator: false },
|
||||
{ label: t('mall.item.id'), prop: 'id', align: 'center', width: 70, operator: 'RANGE', sortable: 'custom' },
|
||||
{ label: t('mall.item.title'), prop: 'title', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' },
|
||||
{ label: t('mall.item.score'), prop: 'score', align: 'center', sortable: false, operator: 'RANGE' },
|
||||
{
|
||||
label: t('mall.item.类型'),
|
||||
prop: '类型',
|
||||
label: t('mall.item.description'),
|
||||
prop: 'description',
|
||||
align: 'center',
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
sortable: false,
|
||||
operator: 'LIKE',
|
||||
},
|
||||
{
|
||||
label: t('mall.item.score'),
|
||||
prop: 'score',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
operator: 'RANGE',
|
||||
},
|
||||
{
|
||||
label: t('mall.item.type'),
|
||||
prop: 'type',
|
||||
align: 'center',
|
||||
effect: 'dark',
|
||||
custom: { 1: 'success', 2: 'primary', 3: 'info' },
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'tag',
|
||||
replaceValue: { '1': t('mall.item.类型 1'), '2': t('mall.item.类型 2'), '3': t('mall.item.类型 3') },
|
||||
replaceValue: { '1': t('mall.item.type 1'), '2': t('mall.item.type 2'), '3': t('mall.item.type 3') },
|
||||
},
|
||||
{
|
||||
label: t('mall.item.status'),
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
operator: 'eq',
|
||||
sortable: false,
|
||||
render: 'switch',
|
||||
replaceValue: { '0': t('mall.item.status 0'), '1': t('mall.item.status 1') },
|
||||
},
|
||||
{
|
||||
label: t('mall.item.remark'),
|
||||
prop: 'remark',
|
||||
align: 'center',
|
||||
showOverflowTooltip: true,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
sortable: false,
|
||||
operator: 'LIKE',
|
||||
},
|
||||
{
|
||||
label: t('mall.item.image'),
|
||||
prop: 'image',
|
||||
align: 'center',
|
||||
render: 'image',
|
||||
operator: false,
|
||||
},
|
||||
{
|
||||
label: t('mall.item.stock'),
|
||||
prop: 'stock',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
operator: 'RANGE',
|
||||
},
|
||||
{
|
||||
label: t('mall.item.admin__username'),
|
||||
prop: 'admin.username',
|
||||
align: 'center',
|
||||
minWidth: 100,
|
||||
operatorPlaceholder: t('Fuzzy query'),
|
||||
render: 'tags',
|
||||
operator: 'LIKE',
|
||||
@@ -92,10 +141,13 @@ const baTable = new baTableClass(
|
||||
},
|
||||
{ label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false },
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
dblClickNotEditColumn: [undefined, 'status'],
|
||||
},
|
||||
{
|
||||
defaultItems: {},
|
||||
defaultItems: {
|
||||
stock: 0,
|
||||
sort: 100,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -72,13 +72,14 @@
|
||||
:input-attr="{ content: { '1': t('mall.item.type 1'), '2': t('mall.item.type 2'), '3': t('mall.item.type 3') } }"
|
||||
:placeholder="t('Please select field', { field: t('mall.item.type') })"
|
||||
/>
|
||||
<FormItem :label="t('mall.item.image')" type="image" v-model="baTable.form.items!.image" />
|
||||
<FormItem
|
||||
:label="t('mall.item.admin_id')"
|
||||
type="remoteSelect"
|
||||
v-model="baTable.form.items!.admin_id"
|
||||
prop="admin_id"
|
||||
:input-attr="{ pk: 'admin.id', field: 'username', remoteUrl: '/admin/auth.Admin/index' }"
|
||||
:placeholder="t('Please select field', { field: t('mall.item.admin_id') })"
|
||||
:label="t('mall.item.stock')"
|
||||
type="number"
|
||||
v-model="baTable.form.items!.stock"
|
||||
prop="stock"
|
||||
:input-attr="{ step: 1 }"
|
||||
:placeholder="t('Please input field', { field: t('mall.item.stock') })"
|
||||
/>
|
||||
<FormItem
|
||||
:label="t('mall.item.sort')"
|
||||
@@ -88,6 +89,13 @@
|
||||
:input-attr="{ step: 1 }"
|
||||
:placeholder="t('Please input field', { field: t('mall.item.sort') })"
|
||||
/>
|
||||
<FormItem
|
||||
:label="t('mall.item.status')"
|
||||
type="switch"
|
||||
v-model="baTable.form.items!.status"
|
||||
prop="status"
|
||||
:input-attr="{ content: { '0': t('mall.item.status 0'), '1': t('mall.item.status 1') } }"
|
||||
/>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
|
||||
Reference in New Issue
Block a user