|
|
<template>
|
|
|
<div class="batch-page">
|
|
|
批量功能
|
|
|
<Row class-name="row-space">
|
|
|
<h3>导出</h3>
|
|
|
</Row>
|
|
|
<Row :gutter="24" class-name="row-space">
|
|
|
<Col :span="6">
|
|
|
<Row>
|
|
|
<Col span="6">
|
|
|
<span class="field-label">文件类型:</span>
|
|
|
</Col>
|
|
|
<Col span="18">
|
|
|
<Select v-model="fileType.model">
|
|
|
<Option v-for="item in fileType.list" :value="item.id" :key="item">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row class-name="row-space">
|
|
|
<Category :field-sort="sort" @on-change="sortChange">
|
|
|
<Button type="primary" @click="exportFile">导出</Button>
|
|
|
</Category>
|
|
|
</Row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import _ from 'lodash';
|
|
|
import service from 'product-service';
|
|
|
import {SizeEdit} from 'product/size-edit';
|
|
|
import {Brand, Category} from 'product/filter-select';
|
|
|
import {filterFields, initialFields, tableCols, tableData, pageData} from './store';
|
|
|
import {Category} from 'product/filter-select';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
fileType: {
|
|
|
model: 0,
|
|
|
list: [
|
|
|
{
|
|
|
id: 0,
|
|
|
label: '我的商品表'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
sort: {
|
|
|
first: {
|
|
|
label: '选择类目',
|
|
|
holder: '选择一级类目',
|
|
|
labelSpan: 6,
|
|
|
fieldSpan: 18,
|
|
|
model: ''
|
|
|
},
|
|
|
second: {
|
|
|
label: '二级类目',
|
|
|
holder: '选择二级类目',
|
|
|
fieldSpan: 18,
|
|
|
model: ''
|
|
|
},
|
|
|
third: {
|
|
|
label: '三级类目',
|
|
|
holder: '选择三级类目',
|
|
|
fieldSpan: 18,
|
|
|
model: ''
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
},
|
|
|
methods: {
|
|
|
exportFile() {
|
|
|
const params = {
|
|
|
maxSortId: this.sort.first.model,
|
|
|
middleSortId: this.sort.second.model,
|
|
|
smallSortId: this.sort.third.model
|
|
|
};
|
|
|
|
|
|
service.exportProductFile(params)
|
|
|
.then(res => {
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
sortChange(val) {
|
|
|
this.sort.first.model = val.first;
|
|
|
this.sort.second.model = val.second;
|
|
|
this.sort.third.model = val.third;
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
Category
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.filter-row {
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
.field-label {
|
|
|
line-height: 32px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.hr {
|
|
|
border-top: 1px solid #eee;
|
|
|
.row-space {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
.batch-row {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
.list-page {
|
|
|
float: right;
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
.prd-img {
|
|
|
max-height: 200px;
|
|
|
}
|
|
|
|
|
|
.action-btn-row {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|