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