2023-12-11
This commit is contained in:
@@ -34,5 +34,27 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
// 获取配货列表
|
||||
distributionList: function(data) {
|
||||
return request({
|
||||
url: '/lpksreservoorder/orderListByStore',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 导出报表
|
||||
distributionExportExcel: function(data) {
|
||||
return request({
|
||||
url: '/lpksreservoorder/exportExcelByStore',
|
||||
method: 'post',
|
||||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -69,7 +69,7 @@
|
||||
name: "/marketingCard/index",
|
||||
path: "/marketingCard/index",
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "pickupCardSet",
|
||||
@@ -132,83 +132,117 @@
|
||||
name: "/commodity/index",
|
||||
path: "/commodity/index"
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "order",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "订单信息",
|
||||
},
|
||||
name: "/order/index",
|
||||
path: "/order/index"
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "print",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "打印电子卡",
|
||||
},
|
||||
name: "/print/index",
|
||||
path: "/print/index"
|
||||
}
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "network",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "网点管理",
|
||||
// },
|
||||
// name: "/network/index",
|
||||
// path: "/network/index"
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "statisticalReport",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "统计报表",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "index",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货卡汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "collectionSummary",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/collectionSummary",
|
||||
// path: "/statisticalReport/collectionSummary",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "deliveryDetails",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "客户提货明细",
|
||||
// },
|
||||
// name: "/statisticalReport/deliveryDetails",
|
||||
// path: "/statisticalReport/deliveryDetails",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
{alwaysShow: true,
|
||||
component: "order",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "订单管理",
|
||||
},
|
||||
name: "/order",
|
||||
path: "/order",
|
||||
children: [
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "index",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "订单统计",
|
||||
},
|
||||
name: "/order/index",
|
||||
path: "/order/index",
|
||||
},
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "distributionCount",
|
||||
meta: {
|
||||
icon: "el-icon-help",
|
||||
title: "配货统计",
|
||||
},
|
||||
name: "/order/distributionCount",
|
||||
path: "/order/distributionCount",
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "order",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "订单信息",
|
||||
// },
|
||||
// name: "/order/index",
|
||||
// path: "/order/index"
|
||||
// },
|
||||
{
|
||||
alwaysShow: true,
|
||||
component: "print",
|
||||
meta: {
|
||||
icon: "el-icon-menu",
|
||||
title: "打印电子卡",
|
||||
},
|
||||
name: "/print/index",
|
||||
path: "/print/index"
|
||||
}
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "network",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "网点管理",
|
||||
// },
|
||||
// name: "/network/index",
|
||||
// path: "/network/index"
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "statisticalReport",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "统计报表",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// children: [
|
||||
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "index",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货卡汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/index",
|
||||
// path: "/statisticalReport/index",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "collectionSummary",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货汇总",
|
||||
// },
|
||||
// name: "/statisticalReport/collectionSummary",
|
||||
// path: "/statisticalReport/collectionSummary",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "deliveryDetails",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "客户提货明细",
|
||||
// },
|
||||
// name: "/statisticalReport/deliveryDetails",
|
||||
// path: "/statisticalReport/deliveryDetails",
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["sidebar"]),
|
||||
// routes() {
|
||||
// f4d2e507-c4ed-451c-b364-04c08f962045
|
||||
|
||||
@@ -149,15 +149,23 @@ export const constantRoutes = [
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
component: Layout,
|
||||
redirect: '/order/index',
|
||||
component: Layout,
|
||||
redirect: '/order/index',
|
||||
children: [{
|
||||
path: '/order/index',
|
||||
component: () =>
|
||||
import('@/views/order/index.vue'),
|
||||
name: 'index',
|
||||
meta: {
|
||||
title: '订单列表'
|
||||
title: '订单统计'
|
||||
}
|
||||
},{
|
||||
path: '/order/distributionCount',
|
||||
component: () =>
|
||||
import('@/views/order/distributionCount.vue'),
|
||||
name: 'distributionCount',
|
||||
meta: {
|
||||
title: '配货统计'
|
||||
}
|
||||
},]
|
||||
},{
|
||||
|
||||
276
src/views/order/distributionCount.vue
Normal file
276
src/views/order/distributionCount.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="配货统计" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="预约开始日期">
|
||||
<el-date-picker v-model="page.params.startDate" @change="selectTime1" type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||
style="width: 200px;">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="预约结束日期">
|
||||
<el-date-picker v-model="page.params.endDate" @change="selectTime2" type="date"
|
||||
placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
||||
style="width: 200px;">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="提货门店">
|
||||
<el-select v-model="page.params.store" filterable class="item_input" clearable
|
||||
placeholder="请选择" style="width:100%" @change="giftPackSelect">
|
||||
<el-option v-for="item in giftPackList" :key="item.text" :label="item.text"
|
||||
:value="item.text">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">配货列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">明细</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="reserveDate" label="预约日期" align="center" />
|
||||
<el-table-column prop="store" label="提货门店" align="center" />
|
||||
<el-table-column prop="goodsInfo" label="商品明细" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="page.total" :page.sync="page.current"
|
||||
:limit.sync="page.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End 查询和其列表部分 -->
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/order/order.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './indexInfo.vue'
|
||||
import {
|
||||
getBeforeDate
|
||||
} from '@/utils/index'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [{
|
||||
type: 'success',
|
||||
size: 'small',
|
||||
icon: 'export',
|
||||
btnKey: 'build',
|
||||
btnLabel: '导出'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
page: {
|
||||
total: 0, // 默认数据总数
|
||||
current: 1, // 默认开始页面
|
||||
size: 10, // 每页的数据条数
|
||||
params: {
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
store: ""
|
||||
},
|
||||
},
|
||||
giftPackList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.getAllStore()
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'build': // 导出
|
||||
this.doBuild()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
selectTime1(val) {
|
||||
|
||||
console.log('selectTime1:', val)
|
||||
this.page.params.startDate = val
|
||||
|
||||
},
|
||||
selectTime2(val) {
|
||||
|
||||
console.log('selectTime2:', val)
|
||||
this.page.params.endDate = val
|
||||
|
||||
},
|
||||
|
||||
giftPackSelect(val) {
|
||||
console.log('>>>>>>>>>giftPackSelect', val)
|
||||
this.page.params.store = val
|
||||
},
|
||||
|
||||
getAllStore() {
|
||||
req.getAllStore().then((resp) => {
|
||||
if (resp.success) {
|
||||
this.giftPackList = resp.data
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.distributionList(this.page).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.page.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.page.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.page.current - 1) * this.page.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.page.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.page = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
store: ""
|
||||
},
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
// 导出
|
||||
doBuild() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
|
||||
req.distributionExportExcel(this.page.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
const fileName = '配货明细_' + this.page.params.startDate + '.xls'
|
||||
const elink = document.createElement('a')
|
||||
elink.download = fileName
|
||||
elink.style.display = 'nonde'
|
||||
elink.href = URL.createObjectURL(blob)
|
||||
document.body.appendChild(elink)
|
||||
elink.click()
|
||||
URL.revokeObjectURL(elink.href)
|
||||
document.body.removeChild(elink)
|
||||
}).catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -252,7 +252,7 @@
|
||||
})
|
||||
|
||||
|
||||
req.exportExcel(this.page).then((resp) => {
|
||||
req.exportExcel(this.page.params).then((resp) => {
|
||||
loading.close()
|
||||
const blob = new Blob([resp], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
|
||||
Reference in New Issue
Block a user