Commit e8679775 by wangzhihui

商品导出

1 parent b5daf7ed
......@@ -312,6 +312,24 @@ const exportUseRecordList = params => {
data: params
})
}
/**导出订单 */
const exportOrderList = params => {
params.method = 'scrm.api.shopmall.platform.order.export'
return http({
url,
data: params,
sign: true
})
}
/**导出售后订单 */
const exportSaleOrderList=params => {
params.method = 'scrm.api.shopmall.platform.after.sales.order.export'
return http({
url,
data: params,
sign: true
})
}
export default {
getCategoryListApi,
getGoodsListApi,
......
<!-- 秒杀活动 -->
<template>
<div class="ctnr">
<GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData">
</GLCombiForm>
<GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData"></GLCombiForm>
<div class="main-wrap">
<div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" :class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">{{ item.name }}</span>
<div class="flex">
<div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" :class="['title', { curTitleCla: orderFormObj.requestType == item.id }]" @click="changeTable(item.id)">{{ item.name }}</span>
</div>
<div class="batch-wrap">
<el-button size="small" @click="handleExport">导出</el-button>
</div>
</div>
<div class="table-wrap">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt="">
<img :src="scope.scope.goodsImageUrl" alt="" />
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }}{{ scope.scope.goodsSkuName }}</span>
</el-tooltip>
......@@ -41,7 +46,7 @@
import { utils } from 'glsx-common'
import util from '@/util/util'
import SelectDialog from '../pointProducts/components/SelectDialog'
import { exportFn } from '@/common/constant'
const titleList = [
{
id: 0,
......@@ -70,7 +75,7 @@ const titleList = [
{
id: 5,
name: '已关闭'
},
}
]
export default {
name: 'goodsOrderIndex',
......@@ -154,20 +159,23 @@ export default {
{
id: '',
value: '全部'
}, {
},
{
id: '0',
value: '普通订单'
},
{
id: '1',
value: 'B端积分订单'
}, {
},
{
id: '2',
value: 'C端积分订单'
}],
}
],
optionId: 'id',
optionLabel: 'value'
},
}
],
getListApi: this.$apis.platformGoods.getOrderList,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
......@@ -189,7 +197,7 @@ export default {
prop: 'salePrice',
align: 'right',
formatter: cell => {
return cell.goodsSource ? cell.redeemPoints + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元')
return cell.goodsSource ? cell.redeemPoints + '积分' : cell.businessType == 1 || cell.businessType == 2 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元'
}
},
{
......@@ -204,7 +212,7 @@ export default {
formatter: cell => {
let price = 0
if (cell.payStatus == 1002) {
price = cell.goodsSource ? (cell.redeemPoints * cell.sellQty).toFixed(0) + '积分' : (cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元')
price = cell.goodsSource ? (cell.redeemPoints * cell.sellQty).toFixed(0) + '积分' : cell.businessType == 1 || cell.businessType == 2 ? cell.redeemPoints * cell.sellQty + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
}
return price
// return cell.businessType == 1 || cell.businessType == 2 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
......@@ -289,6 +297,12 @@ export default {
methods: {
transfStatus: util.transfStatus,
handleExport() {
const params = this.getParams()
this.$apis.platformGoods.exportOrderList(params).then(res => {
exportFn(res)
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
......@@ -382,7 +396,12 @@ export default {
.main-wrap {
background-color: #fff;
margin-top: 16px;
.flex {
display: flex;
align-items: center;
justify-content: space-between;
margin-right: 20px;
}
.table-wrap {
padding: 20px;
......
......@@ -4,9 +4,14 @@
<GLCombiForm class="search-wrap" rowNumber="2" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData">
</GLCombiForm>
<div class="main-wrap">
<div class="flex">
<div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" :class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">{{ item.name }}</span>
</div>
<div class="batch-wrap">
<el-button size="small" @click="handleExport">导出</el-button>
</div>
</div>
<div class="table-wrap">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
......@@ -47,7 +52,7 @@
import { utils } from 'glsx-common'
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import { exportFn } from '@/common/constant'
const titleList = [
{
id: 0,
......@@ -377,6 +382,12 @@ export default {
mounted() { },
methods: {
handleExport() {
const params = this.getParams()
this.$apis.platformGoods.exportSaleOrderList(params).then(res => {
exportFn(res)
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
......@@ -517,7 +528,12 @@ export default {
.main-wrap {
background-color: #fff;
margin-top: 16px;
.flex {
display: flex;
align-items: center;
justify-content: space-between;
margin-right: 20px;
}
.table-wrap {
padding: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!