订单相关代码提交
This commit is contained in:
parent
f254838154
commit
c0517b4c2e
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
//查询 库存预警 报表
|
//查询 库存预警 报表
|
||||||
export function stockInventoryWarningPageApi(data) {
|
export function stockInventoryWarningPageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -25,7 +25,7 @@ export function stockExpireWarningPageApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//出入库流水
|
//出入库流水
|
||||||
export function stockInoutFlowingPageApi(data) {
|
export function stockInoutFlowingPageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/ims_report_inventory_base/out_into/flowing/page',
|
url: '/smart-canteen/ims_report_inventory_base/out_into/flowing/page',
|
||||||
|
|
@ -36,7 +36,9 @@ export function stockInoutFlowingPageApi(data) {
|
||||||
params:data
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//出入库统计
|
|
||||||
|
|
||||||
|
//出入库统计
|
||||||
export function stockInoutStatisticsPageApi(data) {
|
export function stockInoutStatisticsPageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/ims_report_inventory_base/out_into/statistics/page',
|
url: '/smart-canteen/ims_report_inventory_base/out_into/statistics/page',
|
||||||
|
|
@ -46,4 +48,4 @@ export function stockInoutStatisticsPageApi(data) {
|
||||||
},
|
},
|
||||||
params:data
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@
|
||||||
<!-- 下载模板区域 -->
|
<!-- 下载模板区域 -->
|
||||||
<div style="margin-bottom: 30px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 8px; text-align: center;">
|
<div style="margin-bottom: 30px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 8px; text-align: center;">
|
||||||
<i class="el-icon-download" style="font-size: 48px; color: #fff; margin-bottom: 10px;"></i>
|
<i class="el-icon-download" style="font-size: 48px; color: #fff; margin-bottom: 10px;"></i>
|
||||||
<div style="color: #fff; font-size: 16px; margin-bottom: 15px;">下载补贴充值导入模板</div>
|
<div style="color: #fff; font-size: 16px; margin-bottom: 15px;">下载采购订单导入模板</div>
|
||||||
<el-button type="primary" size="mini" @click="downloadTemplate" style="background: #fff; color: #667eea; border: none;">
|
<el-button type="primary" size="mini" @click="downloadTemplate" style="background: #fff; color: #667eea; border: none;">
|
||||||
<i class="el-icon-download"></i> 下载模板
|
<i class="el-icon-download"></i> 下载模板
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -267,8 +267,8 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- 补贴充值预览对话框 -->
|
<!-- 补贴充值预览对话框 -->
|
||||||
<el-dialog title="补贴充值预览" :visible.sync="openImportPreview" width="1200px" append-to-body>
|
<el-dialog title="订单导入预览" :visible.sync="openImportPreview" width="1200px" append-to-body>
|
||||||
<div style="margin-bottom: 10px; text-align: center;" v-if="importPreviewData.errMsg !=null && importPreviewData.errMsg !=''">
|
<div style="margin-bottom: 10px; text-align: center;color: red" v-if="importPreviewData.errMsg !=null && importPreviewData.errMsg !=''">
|
||||||
表头错误日志:{{ importPreviewData.errMsg || '无' }}
|
表头错误日志:{{ importPreviewData.errMsg || '无' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px; text-align: center;">
|
<div style="margin-bottom: 10px; text-align: center;">
|
||||||
|
|
|
||||||
|
|
@ -16,24 +16,25 @@
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="货品名称" prop="materialName">
|
<el-form-item label="货品名称" prop="materialName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.materialName"
|
v-model="queryParams.materialName"
|
||||||
placeholder="请输入货品名称"
|
placeholder="请输入货品名称"
|
||||||
clearable maxlength="30"
|
clearable maxlength="30"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="exportQuery">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="tableListData">
|
<el-table v-loading="loading" :data="tableListData">
|
||||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
|
|
@ -48,11 +49,11 @@
|
||||||
<span v-if="scope.row.salesMode==2">称重</span>
|
<span v-if="scope.row.salesMode==2">称重</span>
|
||||||
<span v-if="!scope.row.salesMode">/</span>
|
<span v-if="!scope.row.salesMode">/</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="发生时间" align="center" prop="outDate" :show-overflow-tooltip="true" />
|
<el-table-column label="发生时间" align="center" prop="outDate" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="发生人员" align="center" prop="fetchUserName" :show-overflow-tooltip="true" />
|
<el-table-column label="发生人员" align="center" prop="fetchUserName" :show-overflow-tooltip="true" />
|
||||||
<!-- <el-table-column label="数据来源" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
<!-- <el-table-column label="数据来源" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column label="出入库类型" align="center" prop="outType" :show-overflow-tooltip="true">
|
<el-table-column label="出入库类型" align="center" prop="outType" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -63,18 +64,18 @@
|
||||||
<span v-if="scope.row.recordType==2&&scope.row.outType==1">领取出库</span>
|
<span v-if="scope.row.recordType==2&&scope.row.outType==1">领取出库</span>
|
||||||
<span v-if="scope.row.recordType==2&&scope.row.outType==2">报损出库</span>
|
<span v-if="scope.row.recordType==2&&scope.row.outType==2">报损出库</span>
|
||||||
<span v-if="scope.row.recordType==2&&scope.row.outType==3">退货出库</span>
|
<span v-if="scope.row.recordType==2&&scope.row.outType==3">退货出库</span>
|
||||||
<span v-if="scope.row.recordType==2&&scope.row.outType==4">调拨出库</span>
|
<span v-if="scope.row.recordType==2&&scope.row.outType==4">调拨出库</span>
|
||||||
<span v-if="scope.row.recordType==2&&scope.row.outType==5">即入即出</span>
|
<span v-if="scope.row.recordType==2&&scope.row.outType==5">即入即出</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="业务单据" align="center" prop="recordId" :show-overflow-tooltip="true" width="180"/>
|
<el-table-column label="业务单据" align="center" prop="recordId" :show-overflow-tooltip="true" width="180"/>
|
||||||
<el-table-column label="出入库数量" align="center" prop="outNum" :show-overflow-tooltip="true"/>
|
<el-table-column label="出入库数量" align="center" prop="outNum" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="出入库金额(元)" align="center" prop="outAmount" width="130" :show-overflow-tooltip="true" >
|
<el-table-column label="出入库金额(元)" align="center" prop="outAmount" width="130" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
|
|
@ -84,11 +85,11 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="出入库统计" name="statistics">
|
<el-tab-pane label="出入库统计" name="statistics">
|
||||||
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams2.areaId"
|
<el-cascader v-model="queryParams2.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
|
|
@ -102,24 +103,24 @@
|
||||||
:label="item.warehouseName"
|
:label="item.warehouseName"
|
||||||
:value="item.warehouseId"
|
:value="item.warehouseId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="货品名称" prop="materialName">
|
<el-form-item label="货品名称" prop="materialName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams2.materialName"
|
v-model="queryParams2.materialName"
|
||||||
placeholder="请输入货品名称"
|
placeholder="请输入货品名称"
|
||||||
clearable maxlength="30"
|
clearable maxlength="30"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList2"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList2"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="tableListData2">
|
<el-table v-loading="loading" :data="tableListData2">
|
||||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -135,20 +136,20 @@
|
||||||
<span v-if="scope.row.salesMode==2">称重</span>
|
<span v-if="scope.row.salesMode==2">称重</span>
|
||||||
<span v-if="!scope.row.salesMode">/</span>
|
<span v-if="!scope.row.salesMode">/</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="当前库存数量" align="center" prop="balanceCount" :show-overflow-tooltip="true" />
|
<el-table-column label="当前库存数量" align="center" prop="balanceCount" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="当前库存总额" align="center" prop="balanceAmount" :show-overflow-tooltip="true">
|
<el-table-column label="当前库存总额" align="center" prop="balanceAmount" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.balanceAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.balanceAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总入库数量" align="center" prop="intoNum" :show-overflow-tooltip="true">
|
<el-table-column label="总入库数量" align="center" prop="intoNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.intoNum||'0' }}</span>
|
<span>{{ scope.row.intoNum||'0' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库总额" align="center" prop="intoAmount" :show-overflow-tooltip="true">
|
<el-table-column label="入库总额" align="center" prop="intoAmount" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.intoAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.intoAmount/100).toFixed(2) }}</span>
|
||||||
|
|
@ -156,15 +157,15 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总出库数量" align="center" prop="outNum" :show-overflow-tooltip="true">
|
<el-table-column label="总出库数量" align="center" prop="outNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.outNum||'0' }}</span>
|
<span>{{ scope.row.outNum||'0' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出库总额" align="center" prop="outAmount" :show-overflow-tooltip="true">
|
<el-table-column label="出库总额" align="center" prop="outAmount" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.outAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total2>0"
|
v-show="total2>0"
|
||||||
:total="total2"
|
:total="total2"
|
||||||
|
|
@ -172,15 +173,19 @@
|
||||||
:limit.sync="queryParams2.pageSize"
|
:limit.sync="queryParams2.pageSize"
|
||||||
@pagination="getList2"
|
@pagination="getList2"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
||||||
import { stockInoutFlowingPageApi,stockInoutStatisticsPageApi } from "@/api/foodManage/stockReport";
|
import {
|
||||||
|
stockInoutFlowingPageApi,
|
||||||
|
stockInoutFlowingPageApiExport,
|
||||||
|
stockInoutStatisticsPageApi
|
||||||
|
} from "@/api/foodManage/stockReport";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -197,19 +202,19 @@ export default {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
treeAreaOptions:[],//类别树
|
treeAreaOptions:[],//类别树
|
||||||
wareHouseOptions:[],//供应商下拉
|
wareHouseOptions:[],//供应商下拉
|
||||||
activeName:'stream',
|
activeName:'stream',
|
||||||
//-----出入库流水------
|
//-----出入库流水------
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
//表格数据
|
//表格数据
|
||||||
tableListData: [],
|
tableListData: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
materialName: undefined,
|
materialName: undefined,
|
||||||
},
|
},
|
||||||
dateRange:this.defaultDateRange(),//区域树
|
dateRange:this.defaultDateRange(),//区域树
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
|
|
@ -238,50 +243,50 @@ export default {
|
||||||
picker.$emit('pick', [start, end]);
|
picker.$emit('pick', [start, end]);
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
//-----出入库统计------
|
//-----出入库统计------
|
||||||
// 总条数
|
// 总条数
|
||||||
total2: 0,
|
total2: 0,
|
||||||
//表格数据
|
//表格数据
|
||||||
tableListData2: [],
|
tableListData2: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams2: {
|
queryParams2: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
areaId: undefined,
|
areaId: undefined,
|
||||||
warehouseId: undefined,
|
warehouseId: undefined,
|
||||||
materialName: undefined,
|
materialName: undefined,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();
|
this.getAreaTreeData();
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//区域树
|
//区域树
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
systemAreaTreeApi({}).then((response) => {
|
systemAreaTreeApi({}).then((response) => {
|
||||||
this.treeAreaOptions = response.data;
|
this.treeAreaOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAreaChange(e){
|
handleAreaChange(e){
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
},
|
},
|
||||||
/** 查询货品下拉结构 */
|
/** 查询货品下拉结构 */
|
||||||
getWareHouseData() {
|
getWareHouseData() {
|
||||||
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
this.$set(this.queryParams,'warehouseId',null)
|
this.$set(this.queryParams,'warehouseId',null)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleTabClick(){
|
handleTabClick(){
|
||||||
if(this.activeName=='stream'){
|
if(this.activeName=='stream'){
|
||||||
this.queryParams={
|
this.queryParams={
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
materialName: undefined,
|
materialName: undefined,
|
||||||
}
|
}
|
||||||
this.dateRange = this.defaultDateRange()
|
this.dateRange = this.defaultDateRange()
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
|
|
@ -290,15 +295,15 @@ export default {
|
||||||
if(this.activeName=='statistics'){
|
if(this.activeName=='statistics'){
|
||||||
this.queryParams2={
|
this.queryParams2={
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
areaId: undefined,
|
areaId: undefined,
|
||||||
warehouseId: undefined,
|
warehouseId: undefined,
|
||||||
materialName: undefined,
|
materialName: undefined,
|
||||||
}
|
}
|
||||||
this.resetForm("queryForm2");
|
this.resetForm("queryForm2");
|
||||||
this.handleQuery2()
|
this.handleQuery2()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//-----出入库流水------
|
//-----出入库流水------
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -306,8 +311,11 @@ export default {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
exportQuery() {
|
||||||
|
this.getListExport();
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = this.defaultDateRange()
|
this.dateRange = this.defaultDateRange()
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -315,14 +323,14 @@ export default {
|
||||||
}
|
}
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"materialName": this.queryParams.materialName,
|
"materialName": this.queryParams.materialName,
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDate=this.formatDateTime(this.dateRange[0])
|
param.startDate=this.formatDateTime(this.dateRange[0])
|
||||||
|
|
@ -330,21 +338,37 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
param.startDate=undefined;
|
param.startDate=undefined;
|
||||||
param.endDate=undefined;
|
param.endDate=undefined;
|
||||||
}
|
}
|
||||||
stockInoutFlowingPageApi(param).then(response => {
|
stockInoutFlowingPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//-----出入库统计------
|
getListExport() {
|
||||||
|
// this.loading = true;
|
||||||
|
let param = {
|
||||||
|
"materialName": this.queryParams.materialName,
|
||||||
|
}
|
||||||
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
|
param.startDate=this.formatDateTime(this.dateRange[0])
|
||||||
|
param.endDate=this.formatDateTime(this.dateRange[1])
|
||||||
|
}else{
|
||||||
|
param.startDate=undefined;
|
||||||
|
param.endDate=undefined;
|
||||||
|
}
|
||||||
|
this.download('/smart-canteen/ims_report_inventory_base/out_into/flowing/page/exprot', {
|
||||||
|
...this.data
|
||||||
|
}, `出入库流水_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
//-----出入库统计------
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery2() {
|
handleQuery2() {
|
||||||
this.queryParams2.pageNum = 1;
|
this.queryParams2.pageNum = 1;
|
||||||
this.getList2();
|
this.getList2();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery2() {
|
resetQuery2() {
|
||||||
this.queryParams2 = {
|
this.queryParams2 = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -356,10 +380,10 @@ export default {
|
||||||
getList2() {
|
getList2() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams2.pageNum,
|
"pageNum": this.queryParams2.pageNum,
|
||||||
"pageSize": this.queryParams2.pageSize,
|
"pageSize": this.queryParams2.pageSize,
|
||||||
"areaIdList": [this.queryParams2.areaId],
|
"areaIdList": [this.queryParams2.areaId],
|
||||||
"warehouseIdList": [this.queryParams2.warehouseId],
|
"warehouseIdList": [this.queryParams2.warehouseId],
|
||||||
"materialName": this.queryParams2.materialName
|
"materialName": this.queryParams2.materialName
|
||||||
}
|
}
|
||||||
stockInoutStatisticsPageApi(param).then(response => {
|
stockInoutStatisticsPageApi(param).then(response => {
|
||||||
|
|
@ -367,16 +391,16 @@ export default {
|
||||||
this.total2 = Number(response.total);
|
this.total2 = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
||||||
const start = new Date((new Date().toLocaleDateString()));
|
const start = new Date((new Date().toLocaleDateString()));
|
||||||
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
||||||
this.start = parseInt(start.getTime() / 1000)
|
this.start = parseInt(start.getTime() / 1000)
|
||||||
this.end = parseInt(end.getTime() / 1000)
|
this.end = parseInt(end.getTime() / 1000)
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
@ -397,7 +421,7 @@ export default {
|
||||||
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue