查询统计-库存

This commit is contained in:
liuhanqing
2025-10-27 13:58:11 +08:00
parent 89c47306ce
commit be56b3be9d
5 changed files with 47 additions and 76 deletions

View File

@@ -36,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="stockStatus" column="stock_status" />
<result property="lotNo" column="lot_no" />
<result property="outQuantity" column="out_quantity" />
<result property="spare4" column="spare4" />
<result property="spare1" column="spare1" />
<result property="productType" column="productType" />
</resultMap>
<sql id="selectViewStockDetailVo">
@@ -48,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.quantity, -- 数量
bs.spare6, -- 金额
bp.price, --单价
bp.spare1, --产品状态
bp.spare1 as productType, --产品状态
bp.unit, -- 单位
bp.cargo_no, --图号
bs.order_id, --合同号
@@ -69,7 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.stock_id, --库存编码
bs.stock_status, --库存状态
bs.lot_no, --批次号
bs.out_quantity
bs.out_quantity,
bs.spare4, --来源
bs.spare1 --用途
from bas_stock bs
left join bas_product bp on bs.product_id = bp.product_id
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id

View File

@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="supplierName" column="supplier_name" />
<result property="supplierId" column="supplier_no" />
<result property="remark" column="remark" />
<result property="productType" column="productType" />
<!--<association property="extraField" javaType="ExtraField">
<result property="productId" column="product_id" />
</association>-->
@@ -69,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.quantity, -- 数量
bs.spare6, -- 金额
bp.price, --单价
bp.spare1, --产品状态
bp.spare1 as productType, --产品状态
bp.unit, -- 单位
bp.cargo_no, --图号
bs.order_id, --合同号
@@ -90,7 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bs.stock_id, --库存编码
bs.stock_status, --库存状态
bs.lot_no, --批次号
bs.out_quantity
bs.out_quantity,
bs.spare4, --来源
bs.spare1 --用途
from bas_stock bs
left join bas_product bp on bs.product_id = bp.product_id
left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id

View File

@@ -9,6 +9,14 @@ export function listManagement(query) {
})
}
export function stockManagementList(query) {
return request({
url: '/stock/management/list',
method: 'get',
params: query
})
}
// 查询库存信息详细
export function getManagement(stockId) {
return request({

View File

@@ -294,9 +294,9 @@
<el-table-column label="数量" align="center" prop="quantity"/>
<el-table-column label="单价" align="center" prop="price"/>
<el-table-column label="金额" align="center" prop="spare6"/>
<el-table-column label="产品状态" align="center" prop="spare1">
<el-table-column label="产品状态" align="center" prop="productType">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_type" :value="scope.row.spare1"/>
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unit"/>
@@ -324,6 +324,16 @@
</el-table-column>
<el-table-column label="盘点时间" align="center" prop="backDate" width="160"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="来源" align="center" prop="spare4">
<template slot-scope="scope">
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare4"/>
</template>
</el-table-column>
<el-table-column label="用途" align="center" prop="spare1">
<template slot-scope="scope">
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare1"/>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
@@ -454,72 +464,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
onlyIdentity: null,
stockId: null,
cargoSpaceId: null,
trayCode: null,
quantity: null,
jobId: null,
lotNo: null,
stockinDetailId: null,
inDate: null,
warehouseId: null,
warehouseName: null,
stackingId: null,
cargoSpaceName: null,
roadwayId: null,
cargoSpaceStatus: null,
stockStatus: null,
productStatus: null,
locked: null,
productGuid: null,
productId: null,
productName: null,
spec: null,
unit: null,
price: null,
parentId: null,
cargoNo: null,
spare1: null,
spare2: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
spare7: null,
spare8: null,
spare9: null,
spare10: null,
spare11: null,
spare12: null,
spare13: null,
spare14: null,
spare15: null,
spare16: null,
spare17: null,
spare18: null,
spare19: null,
spare20: null,
spare21: null,
spare22: null,
spare23: null,
spare24: null,
spare25: null,
spare26: null,
spare27: null,
spare28: null,
spare29: null,
spare30: null,
spare31: null,
spare32: null,
spare33: null,
spare34: null,
spare35: null,
spare36: null,
spare37: null,
spare38: null,
spare39: null,
remark: null
},
// 表单参数
form: {},

View File

@@ -285,9 +285,9 @@
<el-table-column label="数量" align="center" prop="quantity"/>
<el-table-column label="单价" align="center" prop="price"/>
<el-table-column label="金额" align="center" prop="spare6"/>
<el-table-column label="产品状态" align="center" prop="spare1">
<el-table-column label="产品状态" align="center" prop="productType">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_type" :value="scope.row.spare1"/>
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unit"/>
@@ -315,6 +315,16 @@
</el-table-column>
<el-table-column label="盘点时间" align="center" prop="backDate" width="160"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="来源" align="center" prop="spare4">
<template slot-scope="scope">
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare4"/>
</template>
</el-table-column>
<el-table-column label="用途" align="center" prop="spare1">
<template slot-scope="scope">
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare1"/>
</template>
</el-table-column>
<el-table-column width=120 label="操作" align="center" class-name="small-padding fixed-width"> <!-- 操作 -->
<template slot-scope="scope">
<el-button
@@ -526,7 +536,7 @@
</template>
<script>
import {addManagement, delManagement, getManagement, listManagement, updateManagement} from "@/api/stock/management"
import {addManagement, delManagement, getManagement, stockManagementList, updateManagement} from "@/api/stock/management"
import {listWarehouse} from "@/api/bas/warehouse"
import {listBasProduct} from "@/api/bas/BasProduct"
import {listCargoSpace} from "@/api/bas/cargoSpace"
@@ -641,7 +651,7 @@ export default {
/** 查询库存信息列表 */
getList() {
this.loading = true
listManagement(this.queryParams).then(response => {
stockManagementList(this.queryParams).then(response => {
this.managementList = response.rows
this.total = response.total
this.loading = false