查询统计与KPI仓库权限添加,库存汇总修改

This commit is contained in:
猫猫guowen
2025-06-19 15:57:55 +08:00
parent e738779974
commit 7bab82f217
27 changed files with 477 additions and 140 deletions

View File

@@ -16,7 +16,7 @@ public class StockSummary extends BaseEntity
private static final long serialVersionUID = 1L;
/** 序号 */
@Excel(name = "序号")
// @Excel(name = "序号")
private Long onlyIdentity;
/** 物料编码 */

View File

@@ -2,6 +2,8 @@ package com.ruoyi.search.ViewFlatWarehouseInFlow.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -114,7 +116,7 @@ public class ViewFlatWarehouseInFlowController extends BaseController
@GetMapping("/warehouseList")
public TableDataInfo warehouseList()
{
startPage();
// startPage();
BasWarehouse basWarehouse = new BasWarehouse();
basWarehouse.setWarehouseType("3");
List<BasWarehouse> list = basWarehouseService.selectBasWarehouseList(basWarehouse);

View File

@@ -20,6 +20,10 @@ public class ViewStockoutHistory extends BaseEntity
@Excel(name = "出库单号")
private String stockoutId;
/** 仓库ID */
@Excel(name = "仓库ID")
private String warehouseId;
/** 出库类型 */
@Excel(name = "出库类型")
private String outType;
@@ -124,6 +128,14 @@ public class ViewStockoutHistory extends BaseEntity
@Excel(name = "备注")
private String remark;
public String getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(String warehouseId) {
this.warehouseId = warehouseId;
}
public String getPrice() {
return price;
}
@@ -384,6 +396,7 @@ public class ViewStockoutHistory extends BaseEntity
public String toString() {
return "ViewStockoutHistory{" +
"stockoutId='" + stockoutId + '\'' +
", warehouseId='" + warehouseId + '\'' +
", outType='" + outType + '\'' +
", createDate='" + createDate + '\'' +
", createManId='" + createManId + '\'' +

View File

@@ -44,7 +44,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupByRoadwayId != null and groupByRoadwayId">s.cargo_space_id as roadway_id,</if>
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_guid = p.product_guid
LEFT JOIN bas_product p ON s.product_id = p.product_id
<where>
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="remark != null and remark != ''"> AND p.spare7 like concat('%', #{remark}, '%')}</if>
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> AND s.cargo_space_id like concat('%', #{roadwayId}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
GROUP BY
<trim prefixOverrides=",">
<if test="groupByProductId != null and groupByProductId">,p.product_id</if>
@@ -52,12 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupBySpec != null and groupBySpec">,p.spec</if>
<if test="groupByUnit != null and groupByUnit">,p.unit</if>
<if test="groupByPrice != null and groupByPrice">,p.price</if>
<if test="groupBySpare1 != null and groupBySpare1">p.spare1,</if>
<if test="groupBySpare2 != null and groupBySpare2">p.spare2,</if>
<if test="groupBySpare5 != null and groupBySpare5">p.spare5,</if>
<if test="groupBySpare6 != null and groupBySpare6">p.spare6,</if>
<if test="groupBySpare8 != null and groupBySpare8">p.spare8,</if>
<if test="groupBySpare7 != null and groupBySpare7">p.spare7,</if>
<if test="groupBySpare1 != null and groupBySpare1">,p.spare1</if>
<if test="groupBySpare2 != null and groupBySpare2">,p.spare2</if>
<if test="groupBySpare5 != null and groupBySpare5">,p.spare5</if>
<if test="groupBySpare6 != null and groupBySpare6">,p.spare6</if>
<if test="groupBySpare8 != null and groupBySpare8">,p.spare8</if>
<if test="groupBySpare7 != null and groupBySpare7">,p.spare7</if>
<if test="groupByLotNo != null and groupByLotNo">,s.lot_no</if>
<if test="groupByWarehouseId != null and groupByWarehouseId">,s.warehouse_id</if>
<if test="groupByRoadwayId != null and groupByRoadwayId">,s.cargo_space_id</if>
@@ -67,30 +87,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
1 as group_all,
SUM(CAST(s.quantity AS DECIMAL(18,2))) as quantity
FROM bas_stock s
LEFT JOIN bas_product p ON s.product_guid = p.product_guid
LEFT JOIN bas_product p ON s.product_id = p.product_id
<where>
<if test="productId != null and productId != ''"> AND p.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec like concat('%', #{spec}, '%')</if>
<if test="unit != null and unit != ''"> AND p.unit like concat('%', #{unit}, '%')</if>
<if test="price != null and price != ''"> AND p.price like concat('%', #{price}, '%')</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 like concat('%', #{spare7}, '%')</if>
<if test="remark != null and remark != ''"> AND p.spare7 like concat('%', #{remark}, '%')}</if>
<if test="lotNo != null and lotNo != ''"> AND s.lot_no like concat('%', #{lotNo}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> AND s.cargo_space_id like concat('%', #{roadwayId}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</otherwise>
</choose>
</sql>
<select id="selectStockSummaryList" parameterType="StockSummary" resultMap="StockSummaryResult">
<include refid="selectStockSummaryVo"/>
<where>
<if test="productId != null and productId != ''"> AND p.product_id = #{productId}</if>
<if test="productName != null and productName != ''"> AND p.product_name like concat('%', #{productName}, '%')</if>
<if test="spec != null and spec != ''"> AND p.spec = #{spec}</if>
<if test="unit != null and unit != ''"> AND p.unit = #{unit}</if>
<if test="price != null and price != ''"> AND p.price = #{price}</if>
<if test="spare1 != null and spare1 != ''"> AND p.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> AND p.spare2 = #{spare2}</if>
<if test="spare5 != null and spare5 != ''"> AND p.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> AND p.spare6 = #{spare6}</if>
<if test="spare8 != null and spare8 != ''"> AND p.spare8 = #{spare8}</if>
<if test="spare7 != null and spare7 != ''"> AND p.spare7 = #{spare7}</if>
<if test="remark != null and remark != ''"> AND p.spare7 = #{remark}</if>
<if test="lotNo != null and lotNo != ''"> AND s.lot_no = #{lotNo}</if>
<if test="warehouseId != null and warehouseId != ''"> AND s.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> AND s.cargo_space_id = #{roadwayId}</if>
</where>
</select>
<select id="selectStockSummaryByOnlyIdentity" parameterType="Long" resultMap="StockSummaryResult">

View File

@@ -65,6 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -65,6 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -87,6 +87,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -91,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -67,6 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -118,6 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area like concat('%', #{thisCargoArea}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -118,6 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="thisCargoArea != null and thisCargoArea != ''"> and this_cargo_area like concat('%', #{thisCargoArea}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -100,6 +100,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="ViewStockoutHistory" id="ViewStockoutHistoryResult">
<result property="stockoutId" column="stockout_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="outType" column="out_type" />
<result property="createDate" column="create_date" />
<result property="createManId" column="create_man_id" />
@@ -35,13 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectViewStockoutHistoryVo">
select stockout_id, out_type, create_date, create_man_id, status, stockout_source, exit_id, stockout_detail_id, product_id, product_name, lot_no, quantity, allot_quantity, assign_num, erp_stockout_id, entryid, customer_name, spec, unit, price, remark,spare1,spare2,spare5,spare6,spare7,spare8 from view_stockout_history
select stockout_id,warehouse_id, out_type, create_date, create_man_id, status, stockout_source, exit_id, stockout_detail_id, product_id, product_name, lot_no, quantity, allot_quantity, assign_num, erp_stockout_id, entryid, customer_name, spec, unit, price, remark,spare1,spare2,spare5,spare6,spare7,spare8 from view_stockout_history
</sql>
<select id="selectViewStockoutHistoryList" parameterType="ViewStockoutHistory" resultMap="ViewStockoutHistoryResult">
<include refid="selectViewStockoutHistoryVo"/>
<where>
<where>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id like concat('%', #{stockoutId}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
@@ -67,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>

View File

@@ -1,5 +1,11 @@
import request from '@/utils/request'
// 查询仓库列表
export function warehouseList() {
return request({
url: '/bas/warehouse/list',
method: 'get'
})
}
// 查询入库作业流水列表
export function listViewInJobFlow(query) {
return request({

View File

@@ -84,7 +84,11 @@ export default {
/** 查询仓库列表 */
getWarehouseList() {
// TODO: 调用获取仓库列表接口
listWarehouse().then(response => {
var quaryParam = {
pageNum:1,
pageSize:99
}
listWarehouse(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];

View File

@@ -84,7 +84,11 @@ export default {
/** 查询仓库列表 */
getWarehouseList() {
// TODO: 调用获取仓库列表接口
listWarehouse().then(response => {
var quaryParam = {
pageNum:1,
pageSize:99
}
listWarehouse(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];

View File

@@ -97,7 +97,11 @@ export default {
/** 查询仓库列表 */
getWarehouseList() {
// TODO: 调用获取仓库列表接口
listWarehouse().then(response => {
var quaryParam = {
pageNum:1,
pageSize:99
}
listWarehouse(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];

View File

@@ -72,7 +72,11 @@ export default {
/** 查询仓库列表 */
getWarehouseList() {
// TODO: 调用获取仓库列表接口
listWarehouse().then(response => {
var quaryParam = {
pageNum:1,
pageSize:99
}
listWarehouse(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];

View File

@@ -1,6 +1,35 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="分组选项">
<el-checkbox-group v-model="queryParams.groupFields" @change="handleQuery">
<el-checkbox label="productId">物料编码</el-checkbox>
<el-checkbox label="productName">物料名称</el-checkbox>
<el-checkbox label="spec">规格</el-checkbox>
<el-checkbox label="unit">单位</el-checkbox>
<el-checkbox label="lotNo">批号</el-checkbox>
<el-checkbox label="warehouseId">仓库</el-checkbox>
<el-checkbox label="roadwayId">巷道</el-checkbox>
<el-checkbox label="price">价格</el-checkbox>
<el-checkbox label="spare1">英文名称</el-checkbox>
<el-checkbox label="spare2">单件净重</el-checkbox>
<el-checkbox label="spare5">长度</el-checkbox>
<el-checkbox label="spare6">宽度</el-checkbox>
<el-checkbox label="spare7">高度</el-checkbox>
<el-checkbox label="spare8">体积</el-checkbox>
</el-checkbox-group>
</el-form-item>
<br>
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('searchStockSummary.productId')" prop="productId"> <!-- 物料编码 -->
<el-input
v-model="queryParams.productId"
@@ -33,14 +62,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('searchStockSummary.warehouseId')" prop="warehouseId"> <!-- 仓库 -->
<el-input
v-model="queryParams.warehouseId"
:placeholder="$t('searchStockSummary.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('searchStockSummary.roadwayId')" prop="roadwayId"> <!-- 巷道 -->
<el-input
v-model="queryParams.roadwayId"
@@ -75,21 +96,21 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('searchStockSummary.productId')" align="center" prop="productId" /> <!-- 物料编码 -->
<el-table-column :label="$t('searchStockSummary.productName')" align="center" prop="productName" /> <!-- 物料名称 -->
<el-table-column :label="$t('searchStockSummary.spec')" align="center" prop="spec" /> <!-- 规格 -->
<el-table-column :label="$t('searchStockSummary.unit')" align="center" prop="unit" /> <!-- 单位 -->
<el-table-column :label="$t('searchStockSummary.lotNo')" align="center" prop="lotNo" /> <!-- 批号 -->
<el-table-column :label="$t('searchStockSummary.warehouseId')" align="center" prop="warehouseId" /> <!-- 仓库 -->
<el-table-column :label="$t('searchStockSummary.roadwayId')" align="center" prop="roadwayId" /> <!-- 巷道 -->
<el-table-column :label="$t('searchStockSummary.productId')" align="center" prop="productId" v-if="queryParams.groupFields.includes('productId')" /> <!-- 物料编码 -->
<el-table-column :label="$t('searchStockSummary.productName')" align="center" prop="productName" v-if="queryParams.groupFields.includes('productName')" /> <!-- 物料名称 -->
<el-table-column :label="$t('searchStockSummary.spec')" align="center" prop="spec" v-if="queryParams.groupFields.includes('spec')" /> <!-- 规格 -->
<el-table-column :label="$t('searchStockSummary.unit')" align="center" prop="unit" v-if="queryParams.groupFields.includes('unit')" /> <!-- 单位 -->
<el-table-column :label="$t('searchStockSummary.lotNo')" align="center" prop="lotNo" v-if="queryParams.groupFields.includes('lotNo')" /> <!-- 批号 -->
<el-table-column :label="$t('searchStockSummary.warehouseId')" align="center" prop="warehouseId" v-if="queryParams.groupFields.includes('warehouseId')" /> <!-- 仓库 -->
<el-table-column :label="$t('searchStockSummary.roadwayId')" align="center" prop="roadwayId" v-if="queryParams.groupFields.includes('roadwayId')" /> <!-- 巷道 -->
<el-table-column :label="$t('searchStockSummary.quantity')" align="center" prop="quantity" /> <!-- 库存数量 -->
<el-table-column :label="$t('basproduct1.englishName')" align="center" prop="spare1" /><!-- 英文名称 -->
<el-table-column :label="$t('basproduct1.netWeightPerUnit')" align="center" prop="spare2" /><!-- 单件净重 -->
<el-table-column :label="$t('basproduct1.long')" align="center" prop="spare5" /><!-- 长MM -->
<el-table-column :label="$t('basproduct1.wide')" align="center" prop="spare6" /><!-- 宽MM -->
<el-table-column :label="$t('basproduct1.tall')" align="center" prop="spare7" /><!-- 高MM -->
<el-table-column :label="$t('basproduct1.volume')" align="center" prop="spare8" /><!-- 体积m³ -->
<el-table-column :label="$t('basproduct1.price')" align="center" prop="price" /> <!-- 价格 -->
<el-table-column :label="$t('basproduct1.englishName')" align="center" prop="spare1" v-if="queryParams.groupFields.includes('spare1')" /><!-- 英文名称 -->
<el-table-column :label="$t('basproduct1.netWeightPerUnit')" align="center" prop="spare2" v-if="queryParams.groupFields.includes('spare2')" /><!-- 单件净重 -->
<el-table-column :label="$t('basproduct1.long')" align="center" prop="spare5" v-if="queryParams.groupFields.includes('spare5')" /><!-- 长MM -->
<el-table-column :label="$t('basproduct1.wide')" align="center" prop="spare6" v-if="queryParams.groupFields.includes('spare6')" /><!-- 宽MM -->
<el-table-column :label="$t('basproduct1.tall')" align="center" prop="spare7" v-if="queryParams.groupFields.includes('spare7')" /><!-- 高MM -->
<el-table-column :label="$t('basproduct1.volume')" align="center" prop="spare8" v-if="queryParams.groupFields.includes('spare8')" /><!-- 体积m³ -->
<el-table-column :label="$t('basproduct1.price')" align="center" prop="price" v-if="queryParams.groupFields.includes('price')" /> <!-- 价格 -->
<el-table-column :label="$t('basproduct1.notes')" align="center" prop="remark" /> <!-- 描述 -->
</el-table>
@@ -104,28 +125,31 @@
</template>
<script>
import { listStockSummary, getStockSummary } from "@/api/search/StockSummary";
import { listStockSummary, getStockSummary } from "@/api/search/StockSummary";
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "StockSummary",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 库存汇总表格数据
stockSummaryList: [],
// 查询参数
queryParams: {
export default {
name: "StockSummary",
data() {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 库存汇总表格数据
stockSummaryList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
productId: null,
@@ -137,45 +161,90 @@
roadwayId: null,
quantity: null,
//分组字段
groupFields: ['productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'roadwayId']
groupFields: []
}
};
};
},
created() {
// 初始化时全选分组选项
this.queryParams.groupFields = [
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'roadwayId',
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
];
this.getList();
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
},
created() {
/** 查询库存汇总列表 */
getList() {
this.loading = true;
// 将选中的分组字段转换为后端需要的格式
const params = {};
// 先设置查询条件
Object.keys(this.queryParams).forEach(key => {
if (key !== 'groupFields' && this.queryParams[key] !== null) {
params[key] = this.queryParams[key];
}
});
// 再设置分组字段
this.queryParams.groupFields.forEach(field => {
params[`groupBy${field.charAt(0).toUpperCase() + field.slice(1)}`] = true;
});
listStockSummary(params).then(response => {
this.stockSummaryList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
methods: {
/** 查询库存汇总列表 */
getList() {
this.loading = true;
listStockSummary(this.queryParams).then(response => {
this.stockSummaryList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
this.download('search/StockSummary/export', {
...this.queryParams
}, `库存汇总_${new Date().getTime()}.xlsx`)
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.onlyIdentity)
this.single = selection.length!==1
this.multiple = !selection.length
}
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
// 重置时恢复全选状态
this.queryParams.groupFields = [
'productId', 'productName', 'spec', 'unit', 'lotNo', 'warehouseId', 'roadwayId',
'price', 'spare1', 'spare2', 'spare5', 'spare6', 'spare7', 'spare8'
];
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
// 将选中的分组字段转换为后端需要的格式
const params = {};
// 先设置查询条件
Object.keys(this.queryParams).forEach(key => {
if (key !== 'groupFields' && this.queryParams[key] !== null) {
params[key] = this.queryParams[key];
}
});
// 再设置分组字段
this.queryParams.groupFields.forEach(field => {
params[`groupBy${field.charAt(0).toUpperCase() + field.slice(1)}`] = true;
});
this.download('search/StockSummary/export', params, `库存汇总_${new Date().getTime()}.xlsx`)
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.onlyIdentity)
this.single = selection.length!==1
this.multiple = !selection.length
}
};
}
};
</script>

View File

@@ -382,7 +382,11 @@ export default {
methods: {
/** 查询仓库列表 */
getWarehouseList() {
warehouseList().then(response => {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="作业ID" prop="jobId">-->
<!-- <el-input-->
<!-- v-model="queryParams.jobId"-->
@@ -200,14 +210,14 @@
<!-- placeholder="请选择创建时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item :label="$t('searchViewInJobFlow.warehouseId')" prop="warehouseId"> <!-- 仓库ID -->
<el-input
v-model="queryParams.warehouseId"
:placeholder="$t('searchViewInJobFlow.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item :label="$t('searchViewInJobFlow.warehouseId')" prop="warehouseId"> &lt;!&ndash; 仓库ID &ndash;&gt;-->
<!-- <el-input-->
<!-- v-model="queryParams.warehouseId"-->
<!-- :placeholder="$t('searchViewInJobFlow.inputWarehouseId')"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item :label="$t('searchViewInJobFlow.startTime')" prop="startTime"> <!-- 开始时间 -->
<el-date-picker clearable
v-model="queryParams.startTime"
@@ -526,7 +536,7 @@
</template>
<script>
import { listViewInJobFlow, getViewInJobFlow, delViewInJobFlow, addViewInJobFlow, updateViewInJobFlow } from "@/api/search/ViewInJobFlow"
import { listViewInJobFlow, getViewInJobFlow, delViewInJobFlow, addViewInJobFlow, updateViewInJobFlow ,warehouseList} from "@/api/search/ViewInJobFlow"
export default {
name: "ViewInJobFlow",
@@ -551,6 +561,8 @@ export default {
title: "",
// 是否显示弹出层
open: false,
// 仓库选项
warehouseOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -598,8 +610,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询入库作业流水列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('searchViewOutJobFlow.jobId')" prop="jobId"> <!-- 作业ID -->
<el-input
v-model="queryParams.jobId"
@@ -543,6 +553,7 @@ import {
addViewOutJobFlow,
updateViewOutJobFlow
} from "@/api/search/ViewOutJobFlow"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewOutJobFlow",
@@ -551,6 +562,8 @@ export default {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -618,8 +631,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询出库做业务流水列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="id" prop="onlyIdentity">-->
<!-- <el-input-->
<!-- v-model="queryParams.onlyIdentity"-->
@@ -73,14 +83,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('searchViewStockDetail.warehouseId')" prop="warehouseId"> <!-- 仓库 -->
<el-input
v-model="queryParams.warehouseId"
:placeholder="$t('searchViewStockDetail.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item :label="$t('searchViewStockDetail.warehouseId')" prop="warehouseId"> &lt;!&ndash; 仓库 &ndash;&gt;-->
<!-- <el-input-->
<!-- v-model="queryParams.warehouseId"-->
<!-- :placeholder="$t('searchViewStockDetail.inputWarehouseId')"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item :label="$t('searchViewStockDetail.stackingId')" prop="stackingId"> <!-- 剁型ID -->
<el-input
v-model="queryParams.stackingId"
@@ -333,6 +343,7 @@
<script>
import { listViewStockDetail, getViewStockDetail, delViewStockDetail, addViewStockDetail, updateViewStockDetail } from "@/api/search/ViewStockDetail"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewStockDetail",
@@ -340,6 +351,8 @@ export default {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -393,8 +406,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询库存明细查询列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('searchViewStockSecure.stockId')" prop="stockId"> <!-- 库存ID -->
<el-input
v-model="queryParams.stockId"
@@ -293,6 +303,7 @@
<script>
import { listViewStockSecure, getViewStockSecure, delViewStockSecure, addViewStockSecure, updateViewStockSecure } from "@/api/search/ViewStockSecure"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewStockSecure",
@@ -307,6 +318,8 @@ export default {
single: true,
// 非多个禁用
multiple: true,
// 仓库选项
warehouseOptions: [],
// 显示搜索条件
showSearch: true,
// 总条数
@@ -386,8 +399,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询安全库存查询列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('searchViewStockWarning.stockId')" prop="stockId"> <!-- 库存ID -->
<el-input
v-model="queryParams.stockId"
@@ -273,6 +283,7 @@
<script>
import { listViewStockWarning, getViewStockWarning, delViewStockWarning, addViewStockWarning, updateViewStockWarning } from "@/api/search/ViewStockWarning"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewStockWarning",
@@ -281,6 +292,8 @@ export default {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -366,8 +379,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询预警库存查询列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="入库单guid" prop="stockinGuid">-->
<!-- <el-input-->
<!-- v-model="queryParams.stockinGuid"-->
@@ -63,14 +73,14 @@
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="$t('searchViewStockinHistory.warehouseId')" prop="warehouseId"> <!-- 仓库ID -->
<el-input
v-model="queryParams.warehouseId"
:placeholder="$t('searchViewStockinHistory.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item :label="$t('searchViewStockinHistory.warehouseId')" prop="warehouseId"> &lt;!&ndash; 仓库ID &ndash;&gt;-->
<!-- <el-input-->
<!-- v-model="queryParams.warehouseId"-->
<!-- :placeholder="$t('searchViewStockinHistory.inputWarehouseId')"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item :label="$t('searchViewStockinHistory.erpBill')" prop="erpBill" style="white-space: nowrap"> <!-- ERP单号 -->
<el-input
@@ -512,6 +522,7 @@
<script>
import { listViewStockinHistory, getViewStockinHistory, delViewStockinHistory, addViewStockinHistory, updateViewStockinHistory } from "@/api/search/ViewStockinHistory"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewStockinHistory",
@@ -520,6 +531,8 @@ export default {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -591,8 +604,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询入库单据历史列表 */
getList() {
this.loading = true

View File

@@ -1,6 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('searchViewFlatWarehouseOutFlow.warehouse')" prop="warehouseId"> <!-- 仓库 -->
<el-select v-model="queryParams.warehouseId" :placeholder="$t('searchViewFlatWarehouseOutFlow.selectWarehouse')" clearable>
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
:label="dict.warehouseName"
:value="dict.warehouseId"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('searchViewStockoutHistory.stockoutId')" prop="stockoutId"> <!-- 出库单号 -->
<el-input
v-model="queryParams.stockoutId"
@@ -219,7 +229,8 @@
<el-table v-loading="loading" :data="ViewStockoutHistoryList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="出库单号" align="center" prop="stockoutId" :label="$t('searchViewStockoutHistory.stockoutId')" /> <!-- 出库单号 -->
<el-table-column align="center" prop="stockoutId" :label="$t('searchViewStockoutHistory.stockoutId')" /> <!-- 出库单号 -->
<el-table-column label="warehouseId" align="center" prop="warehouseId" /> <!-- 出库单号 -->
<el-table-column :label="$t('searchViewStockoutHistory.outType')" align="center" prop="outType"> <!-- 出库类型 -->
<template slot-scope="scope">
<dict-tag :options="dict.type.out_bill_type" :value="scope.row.outType"/>
@@ -379,6 +390,7 @@
<script>
import { listViewStockoutHistory, getViewStockoutHistory, delViewStockoutHistory, addViewStockoutHistory, updateViewStockoutHistory } from "@/api/search/ViewStockoutHistory"
import {warehouseList} from "@/api/search/ViewInJobFlow";
export default {
name: "ViewStockoutHistory",
@@ -387,6 +399,8 @@ export default {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -440,8 +454,20 @@ export default {
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
warehouseList(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询出库单据历史列表 */
getList() {
this.loading = true