修改库存管理 联查 查询条件 字典相关问题

This commit is contained in:
liuhanqing
2025-06-09 17:10:26 +08:00
parent 0eea66120f
commit 6e3e559ac0
14 changed files with 634 additions and 388 deletions

View File

@@ -41,14 +41,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('stockRecord.printDate')" prop="printDate"> <!-- 生产日期 -->
<!-- <el-form-item :label="$t('stockRecord.printDate')" prop="printDate"> &lt;!&ndash; 生产日期 &ndash;&gt;
<el-input
v-model="queryParams.printDate"
:placeholder="$t('stockRecord.inputPrintDate')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item :label="$t('stockRecord.lotNo')" prop="lotNo"> <!-- 批号 -->
<el-input
v-model="queryParams.lotNo"
@@ -85,12 +85,14 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('stockRecord.warehouseId')" prop="warehouseId"> <!-- 仓库 -->
<el-input
v-model="queryParams.warehouseId"
:placeholder="$t('stockRecord.inputWarehouseId')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.warehouseId" :placeholder="$t('stockRecord.warehouseId')">
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="库存字表id" prop="stockDetailId">
<el-input
@@ -188,10 +190,11 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('stockRecord.stockId')" align="center" prop="stockId" /> <!-- 库存编码 -->
<el-table-column :label="$t('stockRecord.cargoSpaceId')" align="center" prop="cargoSpaceId" /> <!-- 货位编码 -->
<el-table-column :label="$t('stockRecord.cargoSpaceName')" align="center" prop="cargoSpaceName" /> <!-- 货位编码 -->
<el-table-column :label="$t('stockRecord.trayCode')" align="center" prop="trayCode" /> <!-- 托盘条码 -->
<el-table-column :label="$t('stockRecord.productId')" align="center" prop="productId" /> <!-- 物品编码 -->
<el-table-column :label="$t('stockRecord.productName')" align="center" prop="productName" /> <!-- 物品名称 -->
<el-table-column :label="$t('stockRecord.printDate')" align="center" prop="printDate" /> <!-- 生产日期 -->
<!-- <el-table-column :label="$t('stockRecord.printDate')" align="center" prop="printDate" /> &lt;!&ndash; 生产日期 &ndash;&gt;-->
<el-table-column :label="$t('stockRecord.lotNo')" align="center" prop="lotNo" /> <!-- 批号 -->
<el-table-column :label="$t('stockRecord.oldQuantity')" align="center" prop="oldQuantity" /> <!-- 初始数量 -->
<el-table-column :label="$t('stockRecord.quantity')" align="center" prop="quantity" /> <!-- 操作后数量 -->
@@ -200,12 +203,13 @@
<dict-tag :options="dict.type.stock_maintain_method" :value="scope.row.method"/>
</template>
</el-table-column>
<el-table-column :label="$t('stockRecord.warehouseId')" align="center" prop="warehouseId" /> <!-- 仓库 -->
<el-table-column :label="$t('stockRecord.stockDetailId')" align="center" prop="stockDetailId" /> <!-- 库存字表id -->
<el-table-column :label="$t('stockRecord.operatingTarget')" align="center" prop="operatingTarget" /> <!-- 操作目标 -->
<el-table-column :label="$t('stockRecord.barCodeOldQuantity')" align="center" prop="barCodeOldQuantity" /> <!-- 条码数量 -->
<el-table-column :label="$t('stockRecord.barCodeQuantity')" align="center" prop="barCodeQuantity" /> <!-- 条码数量 -->
<el-table-column :label="$t('stockRecord.productGuid')" align="center" prop="productGuid" /> <!-- 物料guid -->
<el-table-column :label="$t('stockRecord.warehouseId')" align="center" prop="warehouseName" /> <!-- 仓库 -->
<el-table-column :label="$t('stockRecord.createTime')" align="center" prop="createTime" /> <!-- 创建时间 -->
<!-- <el-table-column :label="$t('stockRecord.stockDetailId')" align="center" prop="stockDetailId" /> &lt;!&ndash; 库存字表id &ndash;&gt;-->
<!-- <el-table-column :label="$t('stockRecord.operatingTarget')" align="center" prop="operatingTarget" /> &lt;!&ndash; 操作目标 &ndash;&gt;-->
<!-- <el-table-column :label="$t('stockRecord.barCodeOldQuantity')" align="center" prop="barCodeOldQuantity" /> &lt;!&ndash; 条码数量 &ndash;&gt;-->
<!-- <el-table-column :label="$t('stockRecord.barCodeQuantity')" align="center" prop="barCodeQuantity" /> &lt;!&ndash; 条码数量 &ndash;&gt;-->
<!-- <el-table-column :label="$t('stockRecord.productGuid')" align="center" prop="productGuid" /> &lt;!&ndash; 物料guid &ndash;&gt;-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@@ -303,6 +307,7 @@
<script>
import { listRecord, getRecord, delRecord, addRecord, updateRecord, exportRecord } from "@/api/stock/record";
import {listWarehouse} from "@/api/bas/warehouse"
export default {
name: "Record",
@@ -323,6 +328,7 @@ export default {
total: 0,
// 库存操作记录表格数据
recordList: [],
warehouseOptions:[],
// 弹出层标题
title: "",
// 是否显示弹出层
@@ -404,9 +410,16 @@ export default {
};
},
created() {
this.getList();
this.getList()
this.getWarehouseList();
},
methods: {
/** 获取仓库列表 */
getWarehouseList() {
listWarehouse().then(response => {
this.warehouseOptions = response.rows;
});
},
/** 查询库存操作记录列表 */
getList() {
this.loading = true;