|
|
@ -1,114 +1,121 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<button-bar ref="btnbar" view-title="销售汇总日报表" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|
|
|
<el-row style="margin-left: 20px;margin-right: 20px;"> |
|
|
|
<el-col> |
|
|
|
<el-tabs v-model="tabActiveName" @tab-click="handleOrder"> |
|
|
|
<el-tab-pane label="门店销售明细表" name="uplog"> |
|
|
|
<div> |
|
|
|
<el-date-picker v-model="jmdListQuery.date" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" |
|
|
|
size="small" /> |
|
|
|
<el-button style="margin-left: 20px;" size="small" type="primary" @click="loadJmdList">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<el-table v-loading="tableLoading1" :data="logList" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="salesVolume" label="销售额(元)" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<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 ref="queryParams" :model="jmdListQuery" :inline="true" class="tab-header"> |
|
|
|
<el-form-item label="日期"> |
|
|
|
<el-date-picker v-model="jmdListQuery.date" type="date" clearable value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期" /> |
|
|
|
</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> |
|
|
|
<el-row> |
|
|
|
<el-col> |
|
|
|
<el-tabs v-model="tabActiveName" @tab-click="handleOrder"> |
|
|
|
<el-tab-pane label="门店销售明细表" name="uplog"> |
|
|
|
<div> |
|
|
|
<span style="display: flex;width: 100%; margin-bottom: 10px; padding-right: 20px; color: #D9251C;justify-content: end;" |
|
|
|
v-show="logList.length==500"> |
|
|
|
当前数据量过大,只展示前500条数据。详细数据请点击右上角‘导出’</span> |
|
|
|
<el-table v-loading="tableLoading1" :data="logList" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="salesVolume" label="销售额(元)" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- <div class="pages"> --> |
|
|
|
<!-- 翻页 --> |
|
|
|
<!-- <pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current" |
|
|
|
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" /> |
|
|
|
</div> --> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店商品销售明细表" name="k112"> |
|
|
|
<div> |
|
|
|
<span style="display: flex;width: 100%; margin-bottom: 10px; padding-right: 20px; color: #D9251C;justify-content: end;" |
|
|
|
v-show="in112List.length==500"> |
|
|
|
当前数据量过大,只展示前500条数据。详细数据请点击右上角‘导出’</span> |
|
|
|
<el-table v-loading="tableLoading2" :data="in112List" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod2" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="orderType" label="类型" width="100" align="center" /> |
|
|
|
<el-table-column prop="orderNo" label="销售订单号" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodCode" label="商品编码" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodName" label="商品名称" align="center" /> |
|
|
|
<el-table-column prop="saleNum" label="数量" width="100" align="center" /> |
|
|
|
<el-table-column prop="salePrice" label="价格" width="100" align="center" /> |
|
|
|
<el-table-column prop="total" label="小计" width="100" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- <div class="pages"> --> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current" |
|
|
|
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" /> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店商品销售明细表" name="k112"> |
|
|
|
<div> |
|
|
|
<el-date-picker v-model="jmdListQuery.date" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" |
|
|
|
size="small" /> |
|
|
|
<el-button style="margin-left: 20px;" size="small" type="primary" @click="loadJmdList">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<el-table v-loading="tableLoading2" :data="in112List" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod2" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="orderType" label="类型" width="100" align="center" /> |
|
|
|
<el-table-column prop="orderNo" label="销售订单号" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodCode" label="商品编码" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodName" label="商品名称" align="center" /> |
|
|
|
<el-table-column prop="saleNum" label="数量" width="100" align="center" /> |
|
|
|
<el-table-column prop="salePrice" label="价格" width="100" align="center" /> |
|
|
|
<el-table-column prop="total" label="小计" width="100" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current" |
|
|
|
<!-- <pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current" |
|
|
|
:limit.sync="in112ListQuery.size" class="pagination" @pagination="loadIn112List" /> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店销售明细表(烟草)" name="all"> |
|
|
|
<div> |
|
|
|
<el-date-picker v-model="jmdListQuery.date" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" |
|
|
|
size="small" /> |
|
|
|
<el-button style="margin-left: 20px;" size="small" type="primary" @click="loadJmdList">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<el-table v-loading="tableLoading3" :data="inallList" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod3" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="salesVolume" label="销售额(元)" align="center" :show-overflow-tooltip="true" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="inallListTotal > 0" :total="inallListTotal" :page.sync="inallListQuery.current" |
|
|
|
:limit.sync="inallListQuery.size" class="pagination" @pagination="loadInallList" /> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店商品销售明细表(烟草)" name="hz"> |
|
|
|
<div> |
|
|
|
<el-date-picker v-model="jmdListQuery.date" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" |
|
|
|
size="small" /> |
|
|
|
<el-button style="margin-left: 20px;" size="small" type="primary" @click="loadJmdList">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px;"> |
|
|
|
<el-table v-loading="tableLoading4" :data="inall4List" height="350" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod2" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="orderType" label="类型" width="100" align="center" /> |
|
|
|
<el-table-column prop="orderNo" label="销售订单号" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodCode" label="商品编码" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodName" label="商品名称" align="center" /> |
|
|
|
<el-table-column prop="saleNum" label="数量" width="100" align="center" /> |
|
|
|
<el-table-column prop="salePrice" label="价格" width="100" align="center" /> |
|
|
|
<el-table-column prop="total" label="小计" width="100" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<!-- 翻页 --> |
|
|
|
<pagination v-show="inall4ListTotal > 0" :total="inall4ListTotal" :page.sync="inall4List.current" |
|
|
|
:limit.sync="inall4List.size" class="pagination" @pagination="inall4List" /> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> --> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店销售明细表(烟草)" name="all"> |
|
|
|
<div> |
|
|
|
<span style="display: flex;width: 100%; margin-bottom: 10px; padding-right: 20px; color: #D9251C;justify-content: end;" |
|
|
|
v-show="inallList.length==500"> |
|
|
|
当前数据量过大,只展示前500条数据。详细数据请点击右上角‘导出’</span> |
|
|
|
<el-table v-loading="tableLoading3" :data="inallList" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod3" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="salesVolume" label="销售额(元)" align="center" :show-overflow-tooltip="true" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- <div class="pages"> --> |
|
|
|
<!-- 翻页 --> |
|
|
|
<!-- <pagination v-show="inallListTotal > 0" :total="inallListTotal" :page.sync="inallListQuery.current" |
|
|
|
:limit.sync="inallListQuery.size" class="pagination" @pagination="loadInallList" /> |
|
|
|
</div> --> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="门店商品销售明细表(烟草)" name="hz"> |
|
|
|
<div> |
|
|
|
<span style="display: flex;width: 100%; margin-bottom: 10px; padding-right: 20px; color: #D9251C;justify-content: end;" |
|
|
|
v-show="inall4List.length==500"> |
|
|
|
当前数据量过大,只展示前500条数据。详细数据请点击右上角‘导出’</span> |
|
|
|
<el-table v-loading="tableLoading4" :data="inall4List" height="350" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod2" align="center" /> |
|
|
|
<el-table-column prop="storeName" label="销售渠道" align="center" /> |
|
|
|
<el-table-column prop="orderType" label="类型" width="100" align="center" /> |
|
|
|
<el-table-column prop="orderNo" label="销售订单号" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodCode" label="商品编码" width="200" align="center" /> |
|
|
|
<el-table-column prop="prodName" label="商品名称" align="center" /> |
|
|
|
<el-table-column prop="saleNum" label="数量" width="100" align="center" /> |
|
|
|
<el-table-column prop="salePrice" label="价格" width="100" align="center" /> |
|
|
|
<el-table-column prop="total" label="小计" width="100" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- <div class="pages"> --> |
|
|
|
<!-- 翻页 --> |
|
|
|
<!-- <pagination v-show="inall4ListTotal > 0" :total="inall4ListTotal" :page.sync="inall4List.current" |
|
|
|
:limit.sync="inall4List.size" class="pagination" @pagination="inall4List" /> |
|
|
|
</div> --> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
recount, |
|
|
|
countinfo, |
|
|
|
exportExcel, |
|
|
|
in112PagerList, |
|
|
|
inallPagerList, |
|
|
|
inall4PagerList, |
|
|
|
logPagerList, |
|
|
|
jmdRkmxList, |
|
|
|
jmdRkmxListDownload, |
|
|
|
ztsjZhengli, |
|
|
|
buildExcelZaiTu |
|
|
|
} from '@/api/supervise/salesSummary' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import { |
|
|
@ -123,6 +130,9 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
index: "0", |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
btndisabled: false, |
|
|
|
tableLoading1: false, |
|
|
|
tableLoading2: false, |
|
|
@ -181,7 +191,7 @@ |
|
|
|
countInfoMessage: '无汇总信息', |
|
|
|
jmdList: [], |
|
|
|
jmdListQuery: { |
|
|
|
ate: parseTime(new Date(), '{y}-{m}-{d}') |
|
|
|
date: parseTime(new Date(), '{y}-{m}-{d}') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -194,6 +204,37 @@ |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
dosearch() { |
|
|
|
this.jmdListQuery = { |
|
|
|
date: parseTime(new Date(), '{y}-{m}-{d}') |
|
|
|
} |
|
|
|
if (this.index == "0") { |
|
|
|
this.loadLogList() |
|
|
|
} else if (this.index == "1") { |
|
|
|
this.loadInallList() |
|
|
|
} else if (this.index == "2") { |
|
|
|
this.loadIn112List() |
|
|
|
} else if (this.index == "3") { |
|
|
|
this.loadInall4List() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
resetQuery() { |
|
|
|
this.jmdListQuery = { |
|
|
|
date: parseTime(new Date(), '{y}-{m}-{d}') |
|
|
|
} |
|
|
|
}, |
|
|
|
// 右上角点击事件 |
|
|
|
btnHandle(btnKey) { |
|
|
|
switch (btnKey) { |
|
|
@ -209,11 +250,6 @@ |
|
|
|
}, |
|
|
|
init() { |
|
|
|
this.loadLogList() |
|
|
|
// this.loadIn112List() |
|
|
|
// this.loadInallList() |
|
|
|
// this.loadInall4List() |
|
|
|
// this.loadCountInfo() |
|
|
|
// this.loadJmdList() |
|
|
|
}, |
|
|
|
handleOrder(tab, event) { |
|
|
|
console.log("tab", tab) |
|
|
@ -221,22 +257,29 @@ |
|
|
|
// this.getList(); |
|
|
|
// this.orderDatas(tab.name); |
|
|
|
|
|
|
|
this.index = tab.index |
|
|
|
|
|
|
|
switch (tab.index) { |
|
|
|
// 门店销售明细表 |
|
|
|
case "0": |
|
|
|
this.loadLogList() |
|
|
|
if (this.logList.length == 0) |
|
|
|
this.loadLogList() |
|
|
|
|
|
|
|
break; |
|
|
|
// 门店商品销售明细表 |
|
|
|
case "1": |
|
|
|
this.loadIn112List() |
|
|
|
if (this.in112List.length == 0) |
|
|
|
this.loadIn112List() |
|
|
|
break; |
|
|
|
// 门店销售明细表(烟草) |
|
|
|
case "2": |
|
|
|
this.loadInallList() |
|
|
|
if (this.inallList.length == 0) |
|
|
|
this.loadInallList() |
|
|
|
break; |
|
|
|
// 门店商品销售明细表(烟草) |
|
|
|
case "3": |
|
|
|
this.loadInall4List() |
|
|
|
if (this.inall4List.length === 0) |
|
|
|
this.loadInall4List() |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
@ -254,14 +297,14 @@ |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.tableLoading1 = false |
|
|
|
if (response.code === '200' && response.data && response.data.total > 0) { |
|
|
|
this.logList = response.data.records |
|
|
|
this.logListTotal = response.data.total |
|
|
|
this.logListQuery.current = response.data.current |
|
|
|
this.logListQuery.size = response.data.size |
|
|
|
if (response.code === '200' && response.data ) { |
|
|
|
this.logList = response.data |
|
|
|
// this.logListTotal = response.data.total |
|
|
|
// this.logListQuery.current = response.data.current |
|
|
|
// this.logListQuery.size = response.data.size |
|
|
|
} else { |
|
|
|
this.logList = [] |
|
|
|
this.logListTotal = 0 |
|
|
|
// this.logListTotal = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -281,14 +324,17 @@ |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.tableLoading2 = false |
|
|
|
if (response.code === '200' && response.data && response.data.total > 0) { |
|
|
|
this.in112List = response.data.records |
|
|
|
this.in112ListTotal = response.data.total |
|
|
|
this.in112ListQuery.current = response.data.current |
|
|
|
this.in112ListQuery.size = response.data.size |
|
|
|
|
|
|
|
console.log("data>>>>", response) |
|
|
|
|
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.in112List = response.data |
|
|
|
// this.in112ListTotal = response.data.total |
|
|
|
// this.in112ListQuery.current = response.data.current |
|
|
|
// this.in112ListQuery.size = response.data.size |
|
|
|
} else { |
|
|
|
this.in112List = [] |
|
|
|
this.in112ListTotal = 0 |
|
|
|
// this.in112ListTotal = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -308,14 +354,14 @@ |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
this.tableLoading3 = false |
|
|
|
if (response.code === '200' && response.data && response.data.total > 0) { |
|
|
|
this.inallList = response.data.records |
|
|
|
this.inallListTotal = response.data.total |
|
|
|
this.inallListQuery.current = response.data.current |
|
|
|
this.inallListQuery.size = response.data.size |
|
|
|
if (response.code === '200' && response.data ) { |
|
|
|
this.inallList = response.data |
|
|
|
// this.inallListTotal = response.data.total |
|
|
|
// this.inallListQuery.current = response.data.current |
|
|
|
// this.inallListQuery.size = response.data.size |
|
|
|
} else { |
|
|
|
this.inallList = [] |
|
|
|
this.inallListTotal = 0 |
|
|
|
// this.inallListTotal = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -326,6 +372,7 @@ |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
loadInall4List() { |
|
|
|
this.tableLoading4 = true |
|
|
|
inall4PagerList({ |
|
|
|
current: this.inall4ListQuery.current, |
|
|
|
size: this.inall4ListQuery.size, |
|
|
@ -333,14 +380,15 @@ |
|
|
|
date: "2023-01-07" |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if (response.code === '200' && response.data && response.data.total > 0) { |
|
|
|
this.inall4List = response.data.records |
|
|
|
this.inall4ListTotal = response.data.total |
|
|
|
this.inall4ListQuery.current = response.data.current |
|
|
|
this.inall4ListQuery.size = response.data.size |
|
|
|
this.tableLoading4 = false |
|
|
|
if (response.code === '200' && response.data ) { |
|
|
|
this.inall4List = response.data |
|
|
|
// this.inall4ListTotal = response.data.total |
|
|
|
// this.inall4ListQuery.current = response.data.current |
|
|
|
// this.inall4ListQuery.size = response.data.size |
|
|
|
} else { |
|
|
|
this.inall4List = [] |
|
|
|
this.inall4ListTotal = 0 |
|
|
|
// this.inall4ListTotal = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
@ -350,109 +398,85 @@ |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
loadCountInfo() { |
|
|
|
countinfo() |
|
|
|
.then(res => { |
|
|
|
if (res.msg === '没有统计入库明细!') { |
|
|
|
this.countInfoMessage = res.msg |
|
|
|
} else { |
|
|
|
this.countInfo = res.data |
|
|
|
this.countInfoMessage = '最新统计时间:' + res.data.countLog.createTime + ', 统计用时:' + res.data.countLog |
|
|
|
.durations + ' 毫秒!' |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
console.log(e) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
loadJmdList() { |
|
|
|
jmdRkmxList(this.jmdListQuery) |
|
|
|
.then(res => { |
|
|
|
this.jmdList = res.data |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
console.log(e) |
|
|
|
}) |
|
|
|
}, |
|
|
|
downJmdList() { |
|
|
|
jmdRkmxListDownload(this.jmdListQuery) |
|
|
|
.then(res => { |
|
|
|
console.log('mmmm', res) |
|
|
|
if (res.msg == '数据为空') { |
|
|
|
this.$message({ |
|
|
|
message: '无数据,不能导出!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
window.open(res.data, '_blank') |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
console.log(e) |
|
|
|
}) |
|
|
|
}, |
|
|
|
recountRk() { |
|
|
|
recount() |
|
|
|
.then(res => { |
|
|
|
this.$message({ |
|
|
|
message: '入库信息已经重新汇总完成!', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
this.loadCountInfo() |
|
|
|
this.tabActiveName = 'hz' |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
console.log(e) |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitUpload() { |
|
|
|
this.$refs.upload.submit() |
|
|
|
}, |
|
|
|
handleProgress(event, file, fileList) { |
|
|
|
const _this = this |
|
|
|
this.fullscreenloading = this.$loading({ |
|
|
|
// 导出文件 |
|
|
|
doBuild() { |
|
|
|
|
|
|
|
// var url = "" |
|
|
|
// var fileName = "" |
|
|
|
|
|
|
|
// if (this.index == "0") { |
|
|
|
// url = "" |
|
|
|
// fileName = "" + '.xls' |
|
|
|
// if (this.logList.length == 0) { |
|
|
|
// this.$message({ |
|
|
|
// message: '暂无数据可导出!', |
|
|
|
// type: 'warning', |
|
|
|
// duration: 1000 |
|
|
|
// }); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } else if (this.index == "1") { |
|
|
|
// url = "" |
|
|
|
// fileName = "" + '.xls' |
|
|
|
// if (this.in112List.length == 0) { |
|
|
|
// this.$message({ |
|
|
|
// message: '暂无数据可导出!', |
|
|
|
// type: 'warning', |
|
|
|
// duration: 1000 |
|
|
|
// }); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } else if (this.index == "2") { |
|
|
|
// url = "" |
|
|
|
// fileName = "" + '.xls' |
|
|
|
// if (this.inallList.length == 0) { |
|
|
|
// this.$message({ |
|
|
|
// message: '暂无数据可导出!', |
|
|
|
// type: 'warning', |
|
|
|
// duration: 1000 |
|
|
|
// }); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } else if (this.index == "3") { |
|
|
|
// url = "" |
|
|
|
// fileName = "" + '.xls' |
|
|
|
// if (this.inall4List.length == 0) { |
|
|
|
// this.$message({ |
|
|
|
// message: '暂无数据可导出!', |
|
|
|
// type: 'warning', |
|
|
|
// duration: 1000 |
|
|
|
// }); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: '文件正在上传', |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
if (event.percent >= 100) { |
|
|
|
_this.fullscreenloading.text = '上传完成,正在导入数据库' |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSuccess(resp, file, fileList) { |
|
|
|
console.log('222', resp) |
|
|
|
if (this.fullscreenloading) this.fullscreenloading.close() |
|
|
|
this.fullscreenloading = null |
|
|
|
if (resp.success) { |
|
|
|
const rdata = resp.data |
|
|
|
this.uploadResultMesssage = '共导入数据:' + rdata.allNum + ' 条,【112】仓库记录数:' + rdata.validNum + ' 条;用时:' + rdata |
|
|
|
.durations + ' 毫秒。' |
|
|
|
|
|
|
|
this.loadLogList() |
|
|
|
this.tabActiveName = 'uplog' |
|
|
|
} else { |
|
|
|
this.uploadResultMesssage = resp.msg |
|
|
|
} |
|
|
|
}, |
|
|
|
downloadZtsj() { |
|
|
|
ztsjZhengli() |
|
|
|
.then(res => { |
|
|
|
console.log('2222', res) |
|
|
|
buildExcelZaiTu() |
|
|
|
.then(resp => { |
|
|
|
console.log('3333', resp) |
|
|
|
window.open(resp.data, '_blank') |
|
|
|
}) |
|
|
|
.catch(ee => { |
|
|
|
console.log(ee) |
|
|
|
}) |
|
|
|
exportExcel(this.jmdListQuery).then((resp) => { |
|
|
|
loading.close() |
|
|
|
const blob = new Blob([resp], { |
|
|
|
type: 'application/vnd.ms-excel;charset=UTF-8' |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
console.log(e) |
|
|
|
}) |
|
|
|
} |
|
|
|
const fileName = '库存明细列表' + '.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> |
|
|
|