edit
This commit is contained in:
parent
e34a8dd8da
commit
a08a4f4fa4
|
@ -37,6 +37,12 @@ export function storeCategoryStatusApi(id, status) {
|
||||||
export function exportReplytApi(data) {
|
export function exportReplytApi(data) {
|
||||||
return request.get(`store/reply/export`, data)
|
return request.get(`store/reply/export`, data)
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 导出订单列表
|
||||||
|
*/
|
||||||
|
export function exportProductApi(data) {
|
||||||
|
return request.get(`store/product/export`, data)
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description 属性规则 -- 列表
|
* @description 属性规则 -- 列表
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
<el-button size="small">导入批量发货</el-button>
|
<el-button size="small">导入批量发货</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button size="small" @click="getDeliveryList">批量发货记录</el-button>
|
<el-button size="small" @click="getDeliveryList">批量发货记录</el-button>
|
||||||
<el-button size="small" @click="downloadLogistics">导出全部物流公司</el-button>
|
<!-- <el-button size="small" @click="downloadLogistics">导出全部物流公司</el-button> -->
|
||||||
<!-- <el-button size="small" @click="batchSend">批量发送货</el-button> -->
|
<!-- <el-button size="small" @click="batchSend">批量发送货</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading="listLoading" :data="tableData.data" size="small" class="table mt20" highlight-current-row :cell-class-name="addTdClass">
|
<el-table v-loading="listLoading" :data="tableData.data" size="small" class="table mt20" highlight-current-row :cell-class-name="addTdClass">
|
||||||
|
|
|
@ -133,6 +133,7 @@
|
||||||
<router-link :to="{ path:`${roterPre}` + '/product/list/addProduct' }" class="mr10">
|
<router-link :to="{ path:`${roterPre}` + '/product/list/addProduct' }" class="mr10">
|
||||||
<el-button size="small" type="primary">添加商品</el-button>
|
<el-button size="small" type="primary">添加商品</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<el-button size="small" type="primary" @click="exports">导出列表</el-button>
|
||||||
<!-- <el-button size="small" type="success" @click="onCopy">商品采集</el-button> -->
|
<!-- <el-button size="small" type="success" @click="onCopy">商品采集</el-button> -->
|
||||||
<el-button size="small" :disabled="checkedIds.length == 0 && !allCheck" type="default" @click="openBatch">批量设置</el-button>
|
<el-button size="small" :disabled="checkedIds.length == 0 && !allCheck" type="default" @click="openBatch">批量设置</el-button>
|
||||||
<el-button size="small" :disabled="tableFrom.type != 1 || checkedIds.length == 0 && !allCheck" @click="batchOff">批量下架</el-button>
|
<el-button size="small" :disabled="tableFrom.type != 1 || checkedIds.length == 0 && !allCheck" @click="batchOff">批量下架</el-button>
|
||||||
|
@ -568,9 +569,11 @@ import {
|
||||||
productBathSvipApi,
|
productBathSvipApi,
|
||||||
associatedFormList,
|
associatedFormList,
|
||||||
associatedFormInfo,
|
associatedFormInfo,
|
||||||
batchSetProduct
|
batchSetProduct,
|
||||||
|
exportProductApi
|
||||||
} from '@/api/product'
|
} from '@/api/product'
|
||||||
import { roterPre } from '@/settings'
|
import { roterPre } from '@/settings'
|
||||||
|
import createWorkBook from '@/utils/newToExcel.js'
|
||||||
import taoBao from './taoBao'
|
import taoBao from './taoBao'
|
||||||
import editAttr from './editAttr'
|
import editAttr from './editAttr'
|
||||||
import proDetail from './proDetails.vue'
|
import proDetail from './proDetails.vue'
|
||||||
|
@ -685,6 +688,32 @@ export default {
|
||||||
this.productCon()
|
this.productCon()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 到处列表
|
||||||
|
async exports() {
|
||||||
|
const excelData = JSON.parse(JSON.stringify(this.tableFrom)); let data = []
|
||||||
|
excelData.page = 1
|
||||||
|
excelData.ids = this.checkedIds.toString()
|
||||||
|
let pageCount = 1
|
||||||
|
let lebData = {}
|
||||||
|
for (let i = 0; i < pageCount; i++) {
|
||||||
|
lebData = await this.downOrderData(excelData)
|
||||||
|
pageCount = Math.ceil(lebData.count / excelData.limit)
|
||||||
|
if (lebData.export.length) {
|
||||||
|
data = data.concat(lebData.export)
|
||||||
|
excelData.page++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename)
|
||||||
|
return
|
||||||
|
},
|
||||||
|
/** 订单 */
|
||||||
|
downOrderData(excelData) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
exportProductApi(excelData).then((res) => {
|
||||||
|
return resolve(res.data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 具体日期
|
// 具体日期
|
||||||
onchangeTime(e) {
|
onchangeTime(e) {
|
||||||
this.timeVal = e
|
this.timeVal = e
|
||||||
|
|
Loading…
Reference in New Issue