forked from angelo/web-retail-admin
feat(productSaleStatistics): 产品销售统计代码迁移
This commit is contained in:
parent
8902ec847a
commit
e6f63aee5f
|
@ -18,6 +18,7 @@
|
||||||
"@riophae/vue-treeselect": "^0.4.0",
|
"@riophae/vue-treeselect": "^0.4.0",
|
||||||
"axios": "0.18.1",
|
"axios": "0.18.1",
|
||||||
"core-js": "3.6.5",
|
"core-js": "3.6.5",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
"echarts": "^5.4.2",
|
"echarts": "^5.4.2",
|
||||||
"element-ui": "2.13.2",
|
"element-ui": "2.13.2",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
|
|
|
@ -2,76 +2,73 @@ import request from '@/utils/request'
|
||||||
|
|
||||||
// 商品订单列表接口
|
// 商品订单列表接口
|
||||||
export function getOrderLists(params) {
|
export function getOrderLists(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order/order-invoicing-list',
|
url: '/sale/manage/order/order-invoicing-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getOrderList(params) {
|
export function getOrderList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order/query-order-list',
|
url: '/sale/manage/order/query-order-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查看商品订单列表接口
|
// 查看商品订单列表接口
|
||||||
export function getFindOrderList(params) {
|
export function getFindOrderList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order/get-order-list',
|
url: '/sale/manage/order/get-order-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//订单类型枚举
|
// 订单类型枚举
|
||||||
export function getOrderType(params) {
|
export function getOrderType(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/order-type',
|
url: '/system/pub/enums/order-type',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//撤单类型枚举
|
// 撤单类型枚举
|
||||||
export function getCancleType(params) {
|
export function getCancleType(params) {
|
||||||
return request({
|
return request({
|
||||||
url: 'system/pub/enums/cancel-the-order',
|
url: 'system/pub/enums/cancel-the-order',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//出货明细汇总统计订单类型下拉选
|
// 产品销售统计订单类型下拉选
|
||||||
export function getOrderTypeRepurchaseAll(params) {
|
export function getOrderTypeRepurchaseAll(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/order-business',
|
url: '/system/pub/enums/order-shipment',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 伞下直推新增业绩-订单类型下拉选
|
||||||
|
|
||||||
//伞下直推新增业绩-订单类型下拉选
|
|
||||||
export function getUnderAddOrderType(params) {
|
export function getUnderAddOrderType(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/order-business',
|
url: '/system/pub/enums/order-business',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//伞下直推新增业绩(新)订单类型下拉选
|
// 伞下直推新增业绩(新)订单类型下拉选
|
||||||
export function getUnderAddOrderTypeNew(params) {
|
export function getUnderAddOrderTypeNew(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/orderUp-business',
|
url: '/system/pub/enums/orderUp-business',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 收益类型
|
||||||
//收益类型
|
|
||||||
export function getYieldType(params) {
|
export function getYieldType(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/manage/bd-bonus-items/list',
|
url: '/system/manage/bd-bonus-items/list',
|
||||||
|
@ -79,7 +76,7 @@ export function getYieldType(params) {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//收益状态
|
// 收益状态
|
||||||
export function getYieldStatus(params) {
|
export function getYieldStatus(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/bonus-income-status',
|
url: '/system/pub/enums/bonus-income-status',
|
||||||
|
@ -88,87 +85,83 @@ export function getYieldStatus(params) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//发货方式
|
// 发货方式
|
||||||
export function getDeliveryList(params) {
|
export function getDeliveryList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/delivery-list',
|
url: '/system/pub/enums/delivery-list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 支付方式
|
||||||
|
|
||||||
//支付方式
|
|
||||||
export function getOrderPayType(params) {
|
export function getOrderPayType(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/pub/enums/order-pay-type',
|
url: '/system/pub/enums/order-pay-type',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询自提清单
|
// 查询自提清单
|
||||||
export function getOrderSelfList(data) {
|
export function getOrderSelfList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order-business/self-list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
|
url: '/sale/manage/order-business/self-list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//自提清单-同意1/驳回3
|
// 自提清单-同意1/驳回3
|
||||||
export function selfApprove(data) {
|
export function selfApprove(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order-business/self-approve',
|
url: '/sale/manage/order-business/self-approve',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询修改地址列表
|
||||||
//查询修改地址列表
|
|
||||||
export function getModifyAddress(params) {
|
export function getModifyAddress(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/manage/self-modify-address/list',
|
url: '/member/manage/self-modify-address/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//自提清单-申请自提
|
// 自提清单-申请自提
|
||||||
export function saveSelfOrder(data) {
|
export function saveSelfOrder(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order-business/self-order',
|
url: '/sale/manage/order-business/self-order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//修改地址查询详情
|
// 修改地址查询详情
|
||||||
export function queryPass(data) {
|
export function queryPass(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/manage/self-modify-address/queryPass',
|
url: '/member/manage/self-modify-address/queryPass',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//修改地址驳回
|
// 修改地址驳回
|
||||||
export function rejectAddress(data) {
|
export function rejectAddress(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/member/manage/self-modify-address/reject',
|
url: '/member/manage/self-modify-address/reject',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//订单添加开票备注
|
// 订单添加开票备注
|
||||||
export function updateOrderRemarks(data) {
|
export function updateOrderRemarks(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/sale/manage/order/update-order-remarks',
|
url: '/sale/manage/order/update-order-remarks',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2791,6 +2791,19 @@ export const constantRoutes = [
|
||||||
component: () => import('@/views/statistics/underDirectpush'),
|
component: () => import('@/views/statistics/underDirectpush'),
|
||||||
meta: { title: '伞下直推' }
|
meta: { title: '伞下直推' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'productSaleStatistics',
|
||||||
|
name: 'ProductSaleStatistics',
|
||||||
|
component: () => import('@/views/statistics/productSaleStatistics'),
|
||||||
|
meta: { title: '产品销售统计' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'productSaleStatisticsDetail',
|
||||||
|
name: 'ProductSaleStatisticsDetail',
|
||||||
|
component: () => import('@/views/statistics/productSaleStatisticsDetail'),
|
||||||
|
meta: { title: '产品销售统计详情' },
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'rePurchaseStatisitics',
|
path: 'rePurchaseStatisitics',
|
||||||
name: 'RePurchaseStatisitics',
|
name: 'RePurchaseStatisitics',
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
|
||||||
|
export function getBeforeDays(n = 1) {
|
||||||
|
return dayjs().subtract(n, 'day').format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取本月第一天
|
||||||
|
export function getMonthFirstDay() {
|
||||||
|
return dayjs().startOf('month').format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取本月最后一天
|
||||||
|
export function getMonthLastDay() {
|
||||||
|
return dayjs().endOf('month').format('YYYY-MM-DD')
|
||||||
|
}
|
|
@ -0,0 +1,336 @@
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<topBar
|
||||||
|
v-if="topList.length > 0"
|
||||||
|
:top-list="topList"
|
||||||
|
:moren="moren"
|
||||||
|
/>
|
||||||
|
<div class="thetopbox">
|
||||||
|
<el-form label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="仓储编号" prop="productName">
|
||||||
|
<el-input v-model="select.wmsCode" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="产品编号" prop="productName">
|
||||||
|
<el-input v-model="select.productCode" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="产品名称" prop="productName">
|
||||||
|
<el-input v-model="select.productName" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="时间范围" prop="timeRange">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeRange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
:clearable="false"
|
||||||
|
:range-separator="'至'"
|
||||||
|
:start-placeholder="'开始日期'"
|
||||||
|
:end-placeholder="'结束日期'"
|
||||||
|
@change="changeTime"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="searchbox">
|
||||||
|
<el-button
|
||||||
|
class="my_search"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
getSearch();
|
||||||
|
getCzNum();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ '搜索' }}</el-button>
|
||||||
|
<el-button class="my_reset" @click="resetHandle">
|
||||||
|
{{ '重置' }}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div class="main">
|
||||||
|
<div class="maintop">
|
||||||
|
<div class="mainbtn">
|
||||||
|
<el-button v-hasButtons="['ProductSaleStatisticsExport']" size="small" class="thebtn1" @click="handleExport">
|
||||||
|
导出</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="maintable">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
height="700px"
|
||||||
|
style="width: 100%"
|
||||||
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column prop="colsele" type="selection" width="55" />
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="wmsCode"
|
||||||
|
label="仓储编号"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="productCode"
|
||||||
|
label="产品编号"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="productName"
|
||||||
|
label="产品名称"
|
||||||
|
min-width="180px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="quantity"
|
||||||
|
label="销量"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="colsele"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="color: #48b2fd; padding: 0"
|
||||||
|
@click.native.prevent="goDetail(scope.row)"
|
||||||
|
>
|
||||||
|
查看详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getSearch"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import topBar from '@/components/topBar'
|
||||||
|
import * as sta from '@/api/statistics'
|
||||||
|
import * as log from '@/api/logistics.js'
|
||||||
|
import { isLocals, isLocalSymbol } from '@/utils/numberToCurrency'
|
||||||
|
import { getMonthFirstDay, getMonthLastDay } from '@/utils/date'
|
||||||
|
const initSearch = {
|
||||||
|
productCode: '',
|
||||||
|
productName: '',
|
||||||
|
wmsCode: ''
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'ProductSaleStatistics',
|
||||||
|
components: {
|
||||||
|
topBar
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
numFilter(value) {
|
||||||
|
// 截取当前数据到小数点后两位
|
||||||
|
const realVal = parseFloat(value).toFixed(2)
|
||||||
|
return realVal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
moren: 'productSaleStatistics',
|
||||||
|
topList: [
|
||||||
|
{
|
||||||
|
name: '产品销售统计',
|
||||||
|
path: 'productSaleStatistics'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50
|
||||||
|
},
|
||||||
|
timeRange: [
|
||||||
|
getMonthFirstDay(),
|
||||||
|
getMonthLastDay()
|
||||||
|
],
|
||||||
|
select: {
|
||||||
|
...initSearch,
|
||||||
|
startTime: getMonthFirstDay(),
|
||||||
|
endTime: getMonthLastDay()
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
multipleSelection: [],
|
||||||
|
orderTypeList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getSearch()
|
||||||
|
this.getOthers()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
isLocalSymbol,
|
||||||
|
isLocals,
|
||||||
|
goDetail(val) {
|
||||||
|
this.$router.push({
|
||||||
|
path: 'productSaleStatisticsDetail',
|
||||||
|
query: {
|
||||||
|
params: JSON.stringify({
|
||||||
|
...this.select,
|
||||||
|
wmsCode: val.wmsCode,
|
||||||
|
startTime: this.timeRange[0],
|
||||||
|
endTime: this.timeRange[1]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
this.select.startTime = val ? val[0] : null
|
||||||
|
this.select.endTime = val ? val[1] : null
|
||||||
|
},
|
||||||
|
getOthers() {
|
||||||
|
// 获取订单类型
|
||||||
|
log.getOrderTypeRepurchaseAll().then((res) => {
|
||||||
|
this.orderTypeList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then((_) => {
|
||||||
|
this.download(
|
||||||
|
'/report/manager/member-report/product-shipping-export',
|
||||||
|
Object.assign({}, this.queryParams, this.select),
|
||||||
|
`${'产品销售统计'}${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val
|
||||||
|
},
|
||||||
|
resetHandle() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
this.timeRange = [
|
||||||
|
getMonthFirstDay(),
|
||||||
|
getMonthLastDay()
|
||||||
|
]
|
||||||
|
this.select = {
|
||||||
|
...initSearch,
|
||||||
|
startTime: this.timeRange[0],
|
||||||
|
endTime: this.timeRange[1]
|
||||||
|
}
|
||||||
|
this.getSearch()
|
||||||
|
},
|
||||||
|
getSearch() {
|
||||||
|
this.loading = true
|
||||||
|
const params = {
|
||||||
|
...this.queryParams,
|
||||||
|
...this.select,
|
||||||
|
startTime: this.timeRange[0],
|
||||||
|
endTime: this.timeRange[1]
|
||||||
|
}
|
||||||
|
sta.getShippingSummary(params).then((res) => {
|
||||||
|
this.loading = false
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCzNum() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-image-viewer__close {
|
||||||
|
right: 500px;
|
||||||
|
}
|
||||||
|
::v-deep .dizhi .el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-range-editor.el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
::v-deep .el-table .warning-row {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
padding: 10px 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
font-size: 14px;
|
||||||
|
.thetopbox {
|
||||||
|
padding: 15px 20px 15px 0;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
.searchbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
.searchtitle {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.searchbtn {
|
||||||
|
background: #08143f;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
//margin-top: 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
//border-radius: 8px;
|
||||||
|
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||||
|
|
||||||
|
.maintop {
|
||||||
|
display: flex;
|
||||||
|
// padding: 10px 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.mainbtn {
|
||||||
|
.thebtn1 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #ffad41;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.thebtn2 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #009b58;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.thebtn3 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #c8161d;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,217 @@
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<topBar
|
||||||
|
v-if="topList.length > 0"
|
||||||
|
:top-list="topList"
|
||||||
|
:moren="moren"
|
||||||
|
/>
|
||||||
|
<div class="main">
|
||||||
|
<div class="maintop">
|
||||||
|
<div class="mainbtn">
|
||||||
|
<el-button v-hasButtons="['ProductSaleStatisticsDetailExport']" size="small" class="thebtn1" @click="handleExport">
|
||||||
|
{{ '导出' }}</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="maintable">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
height="700px"
|
||||||
|
style="width: 100%"
|
||||||
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="wmsCode"
|
||||||
|
:label="'仓储编号'"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="specialAreaVal"
|
||||||
|
label="所属专区"
|
||||||
|
min-width="180px"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="isMakerGiftVal"
|
||||||
|
label="商品类型"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="quantity"
|
||||||
|
label="销量"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getSearch"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import topBar from '@/components/topBar'
|
||||||
|
import * as sta from '@/api/statistics'
|
||||||
|
export default {
|
||||||
|
name: 'ProductSaleStatisticsDetail',
|
||||||
|
components: {
|
||||||
|
topBar
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
numFilter(value) {
|
||||||
|
// 截取当前数据到小数点后两位
|
||||||
|
const realVal = parseFloat(value).toFixed(2)
|
||||||
|
return realVal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
moren: 'productSaleStatisticsDetail',
|
||||||
|
topList: [
|
||||||
|
{
|
||||||
|
name: '产品销售统计',
|
||||||
|
path: 'productSaleStatisticsDetail'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
pkProduct: '',
|
||||||
|
orderType: ''
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
pkProduct: '',
|
||||||
|
multipleSelection: [],
|
||||||
|
classifyAllList: [],
|
||||||
|
awardsList: [],
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.pkProduct = this.$route.query.pkProduct
|
||||||
|
this.queryParams.orderType = this.$route.query.orderType
|
||||||
|
this.params = JSON.parse(this.$route.query.params)
|
||||||
|
delete this.params.orderType
|
||||||
|
this.getSearch()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 导出
|
||||||
|
handleExport() {
|
||||||
|
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then((_) => {
|
||||||
|
this.download(
|
||||||
|
'/report/manager/member-report/product-shipping-details-export',
|
||||||
|
{ ...this.queryParams, ...this.params },
|
||||||
|
`${'产品销售统计'}${new Date().getTime()}.xlsx`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
reChongzhi() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
pkProduct: ''
|
||||||
|
}
|
||||||
|
this.getSearch()
|
||||||
|
},
|
||||||
|
getSearch() {
|
||||||
|
this.loading = true
|
||||||
|
this.queryParams.pkProduct = this.pkProduct
|
||||||
|
sta.getShippingSummaryDetail(Object.assign({}, this.queryParams, this.params)).then((res) => {
|
||||||
|
this.loading = false
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.tableData = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getCzNum() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-image-viewer__close {
|
||||||
|
right: 500px;
|
||||||
|
}
|
||||||
|
::v-deep .dizhi .el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-range-editor.el-input__inner {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::v-deep .el-table thead {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
::v-deep .el-table .warning-row {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
.page {
|
||||||
|
padding: 10px 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
font-size: 14px;
|
||||||
|
.thetopbox {
|
||||||
|
padding: 15px 20px 15px 0;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 8px;
|
||||||
|
.searchbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
.searchtitle {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.searchbtn {
|
||||||
|
background: #08143f;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
//margin-top: 20px;
|
||||||
|
background: #f9f9f9;
|
||||||
|
//border-radius: 8px;
|
||||||
|
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
||||||
|
|
||||||
|
.maintop {
|
||||||
|
display: flex;
|
||||||
|
// padding: 10px 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.mainbtn {
|
||||||
|
.thebtn1 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #ffad41;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.thebtn2 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #009b58;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
.thebtn3 {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #c8161d;
|
||||||
|
width: 68px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue