查询统计

This commit is contained in:
猫猫guowen
2026-01-09 17:08:24 +08:00
parent f5f4d1007a
commit 572c27be13
40 changed files with 5876 additions and 8354 deletions

View File

@@ -1,129 +1,62 @@
<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="订单号" prop="orderId">
<el-form-item label="库存id" prop="stockId">
<el-input
v-model="queryParams.orderId"
placeholder="请输入订单号"
v-model="queryParams.stockId"
placeholder="请输入库存id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品号" prop="productId">
<el-form-item label="项目号" prop="spare4">
<el-input
v-model="queryParams.spare4"
placeholder="请输入项目号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="productId">
<el-input
v-model="queryParams.productId"
placeholder="请输入品号"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品名" prop="productName">
<el-form-item label="物料名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入品名"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="序列号" prop="trayCode">
<el-input
v-model="queryParams.trayCode"
placeholder="请输入序列号"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="是否满盘" prop="model">
<el-select v-model="queryParams.model" placeholder="请选择是否满盘" clearable>
<el-option label="否" value="0"></el-option>
<el-option label="是" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="巷道" prop="roadwayId">
<el-input
v-model="queryParams.roadwayId"
placeholder="请输入巷道"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="货位-排" prop="thePlatoon">
<el-input
v-model="queryParams.thePlatoon"
placeholder="请输入货位-排"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- 列 -->
<el-form-item label="货位-列" prop="theColumn">
<el-input
v-model="queryParams.theColumn"
placeholder="请输入货位-列"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- 层 -->
<el-form-item label="货位-层" prop="theFloor">
<el-input
v-model="queryParams.theFloor"
placeholder="请输入货位-层"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="开始时间" prop="startTime"> <!-- 开始时间 -->
<el-date-picker clearable
v-model="queryParams.startTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始时间" style="width: 206px">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="finishTime"> <!-- 结束时间 -->
<el-date-picker clearable
v-model="queryParams.finishTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间" style="width: 206px">
</el-date-picker>
<el-form-item label="货位状态" prop="cargoSpaceStatus">
<el-select v-model="queryParams.cargoSpaceStatus" placeholder="请选择货位状态" clearable>
<el-option
v-for="dict in dict.type.cargo_space_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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 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-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['search:ViewStockDetail:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@@ -137,110 +70,68 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ViewStockDetailList" @selection-change="handleSelectionChange" max-height="650">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="right" prop="onlyIdentity" width="80"/> -->
<el-table-column label="库存ID" align="left" prop="stockId" width="160"/>
<el-table-column label="订单号" align="left" prop="orderId" width="160"/>
<el-table-column label="品号" align="left" prop="productId" width="160"/>
<el-table-column label="品名" align="left" prop="productName" width="160"/>
<el-table-column label="巷道号" align="left" prop="roadwayId" width="160"/>
<el-table-column label="货位名称" align="left" prop="cargoSpaceName" width="160"/>
<!-- <el-table-column label="货位ID" align="left" prop="cargoSpaceId" width="120"/>-->
<el-table-column label="序列号" align="left" prop="trayCode" width="160"/>
<!-- <el-table-column label="数量" align="right" prop="quantity" width="120"/>-->
<el-table-column label="作业ID" align="left" prop="jobId" width="160"/>
<el-table-column label="批号" align="left" prop="lotNo" width="120"/>
<el-table-column label="入库子单ID" align="left" prop="stockinDetailId" width="160"/>
<el-table-column label="入库时间" align="left" prop="inDate" width="160"/>
<!-- <el-table-column label="仓库ID" align="left" prop="warehouseId" width="120"/>-->
<!-- <el-table-column label="仓库名称" align="left" prop="warehouseName" width="120"/>-->
<!-- <el-table-column label="垛型ID" align="left" prop="stackingId" width="120"/>-->
<el-table-column label="货位状态" align="left" prop="cargoSpaceStatus" width="160">
<el-table v-loading="loading" :data="ViewStockDetailList" >
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="${comment}" align="center" prop="onlyIdentity" />-->
<el-table-column width="180" label="库存id" align="left" prop="stockId" />
<el-table-column width="180" label="物料编码" align="left" prop="productId" />
<el-table-column width="180" label="物料名称" align="left" prop="productName" />
<el-table-column width="80" label="库存数量" align="left" prop="quantity" />
<el-table-column width="180" label="托盘条码" align="left" prop="trayCode" />
<el-table-column width="80" label="是否满盘" align="left" prop="model"
:formatter="(row, column, cellValue) => cellValue == '1' ? '是' : '否'"
/>
<el-table-column width="80" label="盘点记录" align="left" prop="spare7"
:formatter="(row, column, cellValue) => cellValue == '1' ? '已盘点' : '未盘点'"
/>
<el-table-column width="180" label="项目号" align="left" prop="spare4" />
<el-table-column width="180" label="批号" align="left" prop="lotNo" />
<el-table-column width="80" label="层级关系" align="left" prop="spare1" />
<el-table-column width="180" label="上层物料" align="left" prop="spare2" />
<el-table-column width="180" label="顶层物料" align="left" prop="spare3" />
<el-table-column width="180" label="合同号" align="left" prop="spare5" />
<el-table-column width="180" label="销售订单号" align="left" prop="spare6" />
<el-table-column width="180" label="供应商编码" align="left" prop="voltage" />
<el-table-column width="180" label="供应商名称" align="left" prop="stackingId" />
<el-table-column width="180" label="规格型号" align="left" prop="power" />
<el-table-column width="180" label="计量单位" align="left" prop="phase" />
<el-table-column width="180" label="货位名称" align="left" prop="cargoSpaceName" />
<el-table-column width="180" label="货位状态" align="left" prop="cargoSpaceStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.cargoSpaceStatus"/>
</template>
</el-table-column>
<el-table-column label="库存状态" align="left" prop="stockStatus" width="160">
<template slot-scope="scope">
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
</template>
</el-table-column>
<el-table-column label="物料状态" align="left" prop="productStatus" width="160">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
</template>
</el-table-column>
<el-table-column label="是否锁定" align="left" prop="locked" width="160">
<el-table-column width="80" label="货位锁" align="left" prop="locked">
<template slot-scope="scope">
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
</template>
</el-table-column>
<!-- <el-table-column label="物料GUID" align="left" prop="productGuid" width="180"/> -->
<el-table-column label="规格" align="left" prop="spec" width="160"/>
<!-- <el-table-column label="单位" align="left" prop="unit" width="100"/> -->
<el-table-column label="价格" align="right" prop="price" width="160"/>
<el-table-column label="产品分类" align="left" prop="parentId" width="160"/>
<el-table-column label="品号描述" align="left" prop="cargoNo" width="160"/>
<el-table-column label="英文名称" align="left" prop="spare1" width="160"/>
<!-- <el-table-column label="单件净重" align="right" prop="spare2" width="120"/> -->
<!-- <el-table-column label="颜色" align="left" prop="spare3" width="120"/> -->
<!-- <el-table-column label="序列号" align="left" prop="spare4" width="120"/> -->
<!-- <el-table-column label="电压" align="left" prop="spare5" width="120"/> -->
<!-- <el-table-column label="功率" align="left" prop="spare6" width="120"/> -->
<!-- <el-table-column label="相位" align="left" prop="spare7" width="120"/> -->
<!-- <el-table-column label="毛重" align="right" prop="spare8" width="120"/> -->
<el-table-column label="NC号" align="left" prop="spare9" width="160"/>
<el-table-column label="电源线" align="left" prop="spare10" width="160"/>
<el-table-column label="插头" align="left" prop="spare11" width="160"/>
<el-table-column label="接嘴" align="left" prop="spare12" width="160"/>
<el-table-column label="快捷码" align="left" prop="spare13" width="160"/>
<el-table-column label="库存单位编号" align="left" prop="spare14" width="160"/>
<el-table-column label="库存单位名称" align="left" prop="spare15" width="160"/>
<el-table-column label="品号群组" align="left" prop="spare16" width="160"/>
<el-table-column label="归类品" align="left" prop="spare17" width="160"/>
<el-table-column label="计量体系" align="left" prop="spare18" width="160"/>
<el-table-column label="群组名称" align="left" prop="spare19" width="160"/>
<el-table-column label="批号管理" align="left" prop="spare20" width="160"/>
<el-table-column label="状态" align="left" prop="spare21" width="160"/>
<el-table-column label="产品大类" align="left" prop="spare22" width="160"/>
<el-table-column label="产品二类" align="left" prop="spare23" width="160"/>
<el-table-column label="产品线/产品系列" align="left" prop="spare24" width="160"/>
<el-table-column label="BOM状态" align="left" prop="spare25" width="160"/>
<el-table-column label="产品定位" align="left" prop="spare26" width="160"/>
<el-table-column label="电脑板型号" align="left" prop="spare27" width="160"/>
<el-table-column label="非标要求" align="left" prop="spare28" width="160"/>
<el-table-column label="品牌" align="left" prop="spare29" width="160"/>
<el-table-column label="非标颜色" align="left" prop="spare30" width="160"/>
<el-table-column label="主颜色" align="left" prop="spare31" width="160"/>
<el-table-column label="辅助颜色" align="left" prop="spare32" width="160"/>
<el-table-column label="是否标准款" align="left" prop="spare33" width="160"/>
<el-table-column label="包装方式" align="left" prop="spare34" width="160"/>
<el-table-column label="主要包装方式" align="left" prop="spare35" width="160"/>
<el-table-column label="长" align="right" prop="spare36" width="160"/>
<el-table-column label="宽" align="right" prop="spare37" width="160"/>
<el-table-column label="高" align="right" prop="spare38" width="160"/>
<el-table-column label="包装材积" align="right" prop="spare39" width="160"/>
<el-table-column label="描述" align="left" prop="remark" width="160"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['search:ViewStockDetail:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['search:ViewStockDetail:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column width="80" label="库存状态" align="left" prop="stockStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
</template>
</el-table-column>
<el-table-column width="80" label="物料状态" align="left" prop="productStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.product_status" :value="scope.row.productStatus"/>
</template>
</el-table-column>
<!-- <el-table-column label="货位id" align="center" prop="cargoSpaceId" />-->
<el-table-column width="180" label="入库时间" align="left" prop="inDate" />
<!-- <el-table-column width="180" label="回流时间" align="center" prop="backDate" />-->
<!-- <el-table-column label="物料GUID" align="center" prop="productGuid" />-->
<el-table-column width="180" label="作业ID" align="left" prop="jobId" />
<el-table-column width="80" label="出库数量" align="left" prop="outQuantity" />
<el-table-column width="180" label="入库子单id" align="left" prop="stockinDetailId" />
<el-table-column width="180" label="入库主单" align="left" prop="stockinId" />
<el-table-column width="80" label="入库类型" align="left" prop="inType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.in_bill_type" :value="scope.row.inType"/>
</template>
</el-table-column>
<!-- <el-table-column label="入库班组ID" align="center" prop="inClassId" />-->
<!-- <el-table-column label="仓库" align="center" prop="warehouseId" />-->
</el-table>
<pagination
@@ -251,88 +142,21 @@
@pagination="getList"
/>
<!-- 添加或修改库存明细查询对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="唯一标识" prop="onlyIdentity">
<el-input v-model="form.onlyIdentity" placeholder="请输入唯一标识" />
</el-form-item>
<el-form-item label="库存ID" prop="stockId">
<el-input v-model="form.stockId" placeholder="请输入库存ID" />
</el-form-item>
<el-form-item label="货位ID" prop="cargoSpaceId">
<el-input v-model="form.cargoSpaceId" placeholder="请输入货位ID" />
</el-form-item>
<el-form-item label="托盘号" prop="trayCode">
<el-input v-model="form.trayCode" placeholder="请输入托盘号" />
</el-form-item>
<el-form-item label="数量" prop="quantity">
<el-input v-model="form.quantity" placeholder="请输入数量" />
</el-form-item>
<el-form-item label="作业ID" prop="jobId">
<el-input v-model="form.jobId" placeholder="请输入作业ID" />
</el-form-item>
<el-form-item label="批号" prop="lotNo">
<el-input v-model="form.lotNo" placeholder="请输入批号" />
</el-form-item>
<el-form-item label="入库子单ID" prop="stockinDetailId">
<el-input v-model="form.stockinDetailId" placeholder="请输入入库子单ID" />
</el-form-item>
<el-form-item label="入库时间" prop="inDate">
<el-input v-model="form.inDate" placeholder="请输入入库时间" />
</el-form-item>
<el-form-item label="仓库" prop="warehouseId">
<el-input v-model="form.warehouseId" placeholder="请输入仓库" />
</el-form-item>
<el-form-item label="剁型ID" prop="stackingId">
<el-input v-model="form.stackingId" placeholder="请输入剁型ID" />
</el-form-item>
<el-form-item label="货位名称" prop="cargoSpaceName">
<el-input v-model="form.cargoSpaceName" placeholder="请输入货位名称" />
</el-form-item>
<el-form-item label="巷道ID" prop="roadwayId">
<el-input v-model="form.roadwayId" placeholder="请输入巷道ID" />
</el-form-item>
<el-form-item label="是否锁定" prop="locked">
<el-input v-model="form.locked" placeholder="请输入是否锁定" />
</el-form-item>
<el-form-item label="物料ID" prop="productId">
<el-input v-model="form.productId" placeholder="请输入物料ID" />
</el-form-item>
<el-form-item label="品名" prop="productName">
<el-input v-model="form.productName" placeholder="请输入品名" />
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input v-model="form.spec" placeholder="请输入规格" />
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单位" />
</el-form-item>
<el-form-item label="价格" prop="price">
<el-input v-model="form.price" placeholder="请输入价格" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listViewStockDetail, getViewStockDetail, delViewStockDetail, addViewStockDetail, updateViewStockDetail } from "@/api/search/ViewStockDetail"
import { listWarehouse } from "@/api/bas/warehouse"
export default {
name: "ViewStockDetail",
dicts: ['product_status', 'stock_status','cargo_space_status','cargo_space_lock_status'],
dicts: ['product_status', 'cargo_space_status', 'cargo_space_lock_status', 'stock_status','in_bill_type'],
data() {
return {
// 遮罩层
loading: true,
// 仓库选项
warehouseOptions: [],
// 选中数组
ids: [],
// 非单个禁用
@@ -356,101 +180,58 @@ export default {
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,
lotNo: null,
inDate: null,
backDate: null,
productGuid: null,
productId: null,
productName: null,
spec: null,
unit: null,
price: null,
parentId: null,
cargoNo: null,
quantity: null,
jobId: null,
trayCode: null,
outQuantity: null,
stockinDetailId: null,
stockinId: null,
inType: null,
inClassId: null,
warehouseId: null,
stackingId: null,
spare1: null,
spare2: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
productId: null,
productName: null,
voltage: null,
power: null,
phase: null,
netWeight: null,
grossWeight: null,
distribution: null,
model: null,
orderId: 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,
thePlatoon: null,
theColumn: null,
theFloor: null,
startTime: null,
finishTime: null
cargoSpaceName: null,
cargoSpaceStatus: null,
locked: null
},
// 表单参数
form: {},
// 表单校验
rules: {
stockId: [
{ required: true, message: "库存ID不能为空", trigger: "blur" }
{ required: true, message: "库存id不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
this.getWarehouseList()
},
methods: {
/** 查询仓库列表 */
getWarehouseList() {
var quaryParam = {
pageNum:1,
pageSize:99
}
listWarehouse(quaryParam).then(response => {
this.warehouseOptions = response.rows;
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
/** 查询库存明细查询列表 */
getList() {
this.loading = true
@@ -471,23 +252,43 @@ export default {
onlyIdentity: null,
stockId: null,
cargoSpaceId: null,
trayCode: null,
stockStatus: null,
productStatus: null,
lotNo: null,
inDate: null,
backDate: null,
productGuid: null,
quantity: null,
jobId: null,
lotNo: null,
trayCode: null,
outQuantity: null,
stockinDetailId: null,
inDate: null,
stockinId: null,
inType: null,
inClassId: null,
warehouseId: null,
stackingId: null,
cargoSpaceName: null,
roadwayId: null,
cargoSpaceStatus: null,
locked: null,
spare1: null,
spare2: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
productId: null,
productName: null,
spec: null,
unit: null,
price: null
voltage: null,
power: null,
phase: null,
netWeight: null,
grossWeight: null,
distribution: null,
model: null,
orderId: null,
spare7: null,
spare8: null,
cargoSpaceName: null,
cargoSpaceStatus: null,
locked: null
}
this.resetForm("form")
},
@@ -511,7 +312,7 @@ export default {
handleAdd() {
this.reset()
this.open = true
this.title = "新增库存详情"
this.title = "添加库存明细查询"
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -520,7 +321,7 @@ export default {
getViewStockDetail(onlyIdentity).then(response => {
this.form = response.data
this.open = true
this.title = "修改库存详情"
this.title = "修改库存明细查询"
})
},
/** 提交按钮 */
@@ -546,7 +347,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const onlyIdentitys = row.onlyIdentity || this.ids
this.$modal.confirm("是否确认删除库存详情编号为" + onlyIdentitys + "的数据项?").then(function() {
this.$modal.confirm('是否确认删除库存明细查询编号为"' + onlyIdentitys + '"的数据项?').then(function() {
return delViewStockDetail(onlyIdentitys)
}).then(() => {
this.getList()
@@ -557,18 +358,8 @@ export default {
handleExport() {
this.download('search/ViewStockDetail/export', {
...this.queryParams
}, `库存明细_${new Date().getTime()}.xlsx`)
}, `ViewStockDetail_${new Date().getTime()}.xlsx`)
}
}
}
</script>
<style scoped>
.el-table >>> .current-row {
background-color: #f0f9eb;
}
.el-form-item >>> .el-form-item__label {
white-space: nowrap;
width: auto;
min-width: fit-content;
}
</style>