完善商品多属性的页面
This commit is contained in:
@@ -3,6 +3,37 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="24">
|
<a-col :md="24">
|
||||||
<a-card :style="cardStyle" :bordered="false">
|
<a-card :style="cardStyle" :bordered="false">
|
||||||
|
<!-- 查询区域 -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<!-- 搜索区域 -->
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item label="属性名" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
|
<a-input placeholder="请输入属性名查询" v-model="queryParam.attributeName"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
<a-col :md="6" :sm="24">
|
||||||
|
<a-button type="primary" @click="searchQuery">查询</a-button>
|
||||||
|
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
|
||||||
|
</a-col>
|
||||||
|
</span>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<div class="table-operator" style="margin-top: 5px">
|
||||||
|
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
|
<a-dropdown>
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
<a-button>
|
||||||
|
批量操作 <a-icon type="down" />
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<a-table
|
||||||
@@ -14,9 +45,14 @@
|
|||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
<a-divider v-if="btnEnableList.indexOf(1)>-1" type="vertical" />
|
||||||
|
<a-popconfirm v-if="btnEnableList.indexOf(1)>-1" title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||||
|
<a>删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,7 +84,7 @@
|
|||||||
offset: 1
|
offset: 1
|
||||||
},
|
},
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {attributeField:''},
|
queryParam: {attributeName:''},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -61,8 +97,8 @@
|
|||||||
return parseInt(index)+1;
|
return parseInt(index)+1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{title: '属性名', dataIndex: 'attributeName', width: 100},
|
{title: '属性名', dataIndex: 'attributeName', width: 200},
|
||||||
{title: '属性值(用竖线隔开)', dataIndex: 'attributeValue', width: 400},
|
{title: '属性值(用竖线隔开)', dataIndex: 'attributeValue', width: 500},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
@@ -82,7 +118,14 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleEdit: function (record) {
|
||||||
|
this.$refs.modalForm.edit(record);
|
||||||
|
this.$refs.modalForm.title = "编辑";
|
||||||
|
this.$refs.modalForm.disableSubmit = false;
|
||||||
|
if(this.btnEnableList.indexOf(1)===-1) {
|
||||||
|
this.$refs.modalForm.isReadOnly = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="margin-top: 5px">
|
<div class="table-operator" style="margin-top: 5px">
|
||||||
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button v-if="btnEnableList.indexOf(1)>-1" @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload v-if="btnEnableList.indexOf(1)>-1" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-popover title="表格模板">
|
<a-popover title="表格模板">
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<p><a target="_blank" href="/doc/goods_template.xls"><b>商品Excel模板下载</b></a></p>
|
<p><a target="_blank" href="/doc/goods_template.xls"><b>商品Excel模板下载</b></a></p>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<a-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="1300"
|
:width="1300"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
@@ -116,7 +116,8 @@
|
|||||||
<a-col :md="6" :sm="24" v-if="!model.id">
|
<a-col :md="6" :sm="24" v-if="!model.id">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="多属性" data-step="11" data-title="多属性"
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="多属性" data-step="11" data-title="多属性"
|
||||||
data-intro="多属性是针对的sku商品(比如服装、鞋帽行业),此处开关如果启用就可以在下方进行多sku的配置,配置具体的颜色、尺码之类的组合">
|
data-intro="多属性是针对的sku商品(比如服装、鞋帽行业),此处开关如果启用就可以在下方进行多sku的配置,配置具体的颜色、尺码之类的组合">
|
||||||
<a-select mode="multiple" v-decorator="[ 'manySku' ]" showSearch optionFilterProp="children" @change="onManySkuChange">
|
<a-select mode="multiple" v-decorator="[ 'manySku' ]" showSearch optionFilterProp="children"
|
||||||
|
placeholder="请选择多属性(可多选)" @change="onManySkuChange">
|
||||||
<a-select-option v-for="(item,index) in materialAttributeList" :key="index" :value="item.value" :disabled="item.disabled">
|
<a-select-option v-for="(item,index) in materialAttributeList" :key="index" :value="item.value" :disabled="item.disabled">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@@ -246,7 +247,7 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<unit-modal ref="unitModalForm" @ok="unitModalFormOk"></unit-modal>
|
<unit-modal ref="unitModalForm" @ok="unitModalFormOk"></unit-modal>
|
||||||
</j-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
|
|||||||
Reference in New Issue
Block a user