[积分商城]商品管理-优化
This commit is contained in:
@@ -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