|
@@ -1,49 +1,106 @@
|
|
//收发存报表
|
|
//收发存报表
|
|
<template>
|
|
<template>
|
|
- <div class="steel_inbound">
|
|
|
|
- <div class="sache">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入内容"
|
|
|
|
- v-model="inputText"
|
|
|
|
- clearable>
|
|
|
|
- </el-input>
|
|
|
|
|
|
+ <div class="sendReceive">
|
|
|
|
+ <div class="frameCalculation">
|
|
|
|
+ <span>库存时间:</span>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="startTime"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ <!-- <span>至</span>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="endTime"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker> -->
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
<i class="el-icon-search"></i>查询
|
|
<i class="el-icon-search"></i>查询
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
|
|
|
|
+ <el-button type="primary" @click="refresh">
|
|
|
|
+ <i class="el-icon-refresh"></i>刷新
|
|
|
|
+ </el-button>
|
|
|
|
+ <!-- <span style="margin-left: 1rem;">合计昨日库存:</span>
|
|
|
|
+ <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input> -->
|
|
|
|
+ <span style="margin-left: 1rem;">合计今日库存:</span>
|
|
|
|
+ <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<div class="table">
|
|
- <dilTable v-bind.sync="options">
|
|
|
|
- </dilTable>
|
|
|
|
|
|
+ <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { sjTime } from '@/utils/sharedJsFile'
|
|
export default {
|
|
export default {
|
|
- data(){
|
|
|
|
- return{
|
|
|
|
- inputText:"",
|
|
|
|
- options:{
|
|
|
|
- // first请求数据的地址
|
|
|
|
- requestUrl: "/api/v1/wms/getSendReceive?apiId=97",
|
|
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ option: {
|
|
|
|
+ requestUrl: "/api/v1/wms/getSendReceive?apiId=97&startTime=null&endTime=null&i=" +new Date(),
|
|
},
|
|
},
|
|
- }
|
|
|
|
|
|
+ startTime: null,
|
|
|
|
+ endTime: null,
|
|
|
|
+ //合计今日库存
|
|
|
|
+ totalNumber: 0,
|
|
|
|
+ tableTitle:'收发存报表'
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- methods:{
|
|
|
|
- onclick(){
|
|
|
|
- console.log("点击事件");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ refresh(){
|
|
|
|
+ this.$router.go(0);
|
|
|
|
+ },
|
|
|
|
+ func(res){
|
|
|
|
+ console.log(res)
|
|
|
|
+ var lastDayTotal = 0
|
|
|
|
+ res.list.forEach(e => {
|
|
|
|
+ lastDayTotal = lastDayTotal+e.send_receive_thisday_inventory
|
|
|
|
+ });
|
|
|
|
+ this.totalNumber = lastDayTotal
|
|
|
|
+ //this.totalCapacity = res.total;
|
|
|
|
+ //获取总记录条数作为合计车数
|
|
|
|
+ // this.totalCapacity = res.total;
|
|
|
|
+ this.isKuang = false;
|
|
|
|
+ },
|
|
|
|
+ onclick() {
|
|
|
|
+ let startTime = null;
|
|
|
|
+ let endTime = null;
|
|
|
|
+ if(this.startTime){
|
|
|
|
+ startTime = sjTime(this.startTime);
|
|
|
|
+ }
|
|
|
|
+ if(this.endTime){
|
|
|
|
+ endTime = sjTime(this.endTime);
|
|
|
|
+ }
|
|
|
|
+ if(startTime && endTime){
|
|
|
|
+ if(startTime < endTime){
|
|
|
|
+ this.option.requestUrl = "/api/v1/wms/getSendReceive?apiId=97&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
|
|
|
|
+ }else{
|
|
|
|
+ this.startTime = null;
|
|
|
|
+ this.endTime = null;
|
|
|
|
+ this.$message.warning('开始时间要比结束时间早')
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.option.requestUrl = "/api/v1/wms/getSendReceive?apiId=97&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scode>
|
|
|
|
-.steel_inbound{
|
|
|
|
- .sache{
|
|
|
|
- height: 5rem;
|
|
|
|
|
|
+<style lang="scss">
|
|
|
|
+.sendReceive {
|
|
|
|
+ .frameCalculation {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100px;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- padding-left: 1.875rem;
|
|
|
|
|
|
+ padding-left: 50px;
|
|
|
|
+ .el-date-editor{
|
|
|
|
+ margin: 20px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|