You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

314 lines
10 KiB

<template>
<div class="app-container">
<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 ref="queryParams" :model="page" :inline="true" class="tab-header">
<el-form-item label="日期">
<el-date-picker v-model="page.orderDate" 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 style="margin-left: 20px;margin-right: 20px;">
<el-col>
<el-tabs v-model="tabActiveName" @tab-click="handleClick">
<el-tab-pane label="库存汇总日报表" name="uplog">
<div
style="display: flex;flex-direction: row;width: 100%;justify-content: space-between;margin-right: 50px; margin-bottom: 10px;">
<span>编号:{{logInfo.serialNumber}}</span>
<span>上报时间:{{logInfo.reportTime}}</span>
<span>货值合计:{{logInfo.countAmount}}</span>
</div>
<div>
<el-table :data="logList" border style="width: 100%">
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="storeType" align="center" label="仓库类型" />
<el-table-column prop="storeNumber" align="center" label="仓库数量" />
<el-table-column prop="productCountNumber" align="center" label="品种数量" />
<el-table-column prop="productAmount" align="center" label="货值" />
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="仓库库存明细表" name="k112">
<div
style="display: flex;flex-direction: row;width: 100%;justify-content: space-between;margin-right: 50px; margin-bottom: 10px;">
<span>商品数量合计:{{logInfo2.countProductNumber}}</span>
<span>商品货值合计:{{logInfo2.countAmount}}</span>
</div>
<div>
<el-table :data="logList2" border style="width: 100%">
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod2" align="center" />
<el-table-column prop="storeCodeName" align="center" label="仓库名称" />
<el-table-column prop="productCountNumber" align="center" label="商品数量" />
<el-table-column prop="productAmount" align="center" label="商品货值" />
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="烟草仓库库存明细表" name="hz">
<div
style="display: flex;flex-direction: row;width: 100%;justify-content: space-between;margin-right: 50px; margin-bottom: 10px;">
<span>商品数量合计:{{logInfo3.countProductNumber}}</span>
<span>商品货值合计:{{logInfo3.countAmount}}</span>
</div>
<div>
<el-table :data="logList3" border style="width: 100%">
<el-table-column fixed width="100" label="序号" type="index" :index="indexMethod3" align="center" />
<el-table-column prop="storeCodeName" align="center" label="仓库名称" />
<el-table-column prop="productCountNumber" align="center" label="品种数量" />
<el-table-column prop="productAmount" align="center" label="品种货值" />
</el-table>
</div>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import {
// recount,
// countinfo,
// in112PagerList,
// inallPagerList,
// logPagerList,
// jmdRkmxList,
// jmdRkmxListDownload,
// ztsjZhengli,
// buildExcelZaiTu
getReportInventoryDayGather,
getReportInventoryDayStore,
getReportInventoryDayToStore,
exportExcel,
} from '@/api/inventorySummary/inventorySummary'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'KucunRkmxIndex',
components: {
ButtonBar,
Pagination
},
data() {
return {
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
btnList: [ // 右上角按钮
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'build',
btnLabel: '导出'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
logInfo: {
serialNumber: "",
reportTime: "",
countAmount: "",
},
logList: [],
logInfo2: {
countProductNumber: "",
countAmount: "",
},
logList2: [],
logInfo3: {
countProductNumber: "",
countAmount: "",
},
logList3: [],
// orderDate: "2023-06-26"
page: {
orderDate: parseTime(new Date(), '{y}-{m}-{d}')
}
}
},
mounted() {
// 初始化按钮
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
// 初始化变量
this.init()
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
dosearch() {
if (this.index == "0") {
this.loadLogList1()
} else if (this.index == "1") {
this.loadLogList2()
} else if (this.index == "2") {
this.loadLogList3()
}
},
resetQuery() {
this.page.orderDate = ""
},
// 右上角点击事件
btnHandle(btnKey) {
switch (btnKey) {
case 'build': // 导出
this.doBuild()
break
case 'doClose': // 关闭
this.doClose()
break
default:
break
}
},
// 标签点击事件
handleClick(tab, event) {
console.log(tab, event);
this.index = tab.index
switch (tab.index) {
case "0":
// 库存汇总日报表
console.log("库存汇总日报表");
this.loadLogList1()
break;
case "1":
// 仓库库存明细表
console.log("仓库库存明细表");
this.loadLogList2()
break;
case "2":
// 烟草仓库库存明细表
console.log("烟草仓库库存明细表");
this.loadLogList3()
break;
default:
break;
}
},
init() {
this.loadLogList1()
this.loadLogList2()
this.loadLogList3()
},
loadLogList1() {
getReportInventoryDayGather(this.page.orderDate).then(response => {
if (response.code === '200' && response.data) {
this.logList = response.data.list
this.logInfo = {
serialNumber: response.data.serialNumber,
reportTime: response.data.reportTime,
countAmount: response.data.countAmount,
}
} else {
this.logList = []
}
})
},
// 序号
indexMethod(index) {
return index + 1
},
loadLogList2() {
getReportInventoryDayStore(this.page.orderDate).then(response => {
if (response.code === '200' && response.data) {
this.logList2 = response.data.list
this.logInfo2 = {
countProductNumber: response.data.countProductNumber,
countAmount: response.data.countAmount,
}
} else {
this.logList2 = []
}
})
},
// 序号
indexMethod2(index) {
return index + 1
},
loadLogList3() {
getReportInventoryDayToStore(this.page.orderDate).then(response => {
if (response.code === '200' && response.data) {
this.logList3 = response.data.list
this.logInfo3 = {
countProductNumber: response.data.countProductNumber,
countAmount: response.data.countAmount,
}
} else {
this.logList3 = []
}
})
},
// 序号
indexMethod3(index) {
return index + 1
},
// 导出文件
doBuild() {
exportExcel(this.page.orderDate).then((resp) => {
console.log(">>>>>11111111111111111", resp)
// console.log(">>>>>222222222", process.env.VUE_APP_BASE_API + resp.data.fullUrl)
window.location.href = resp.data
}).catch(() => {
// loading.close()
})
},
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>