做了两个组件

This commit is contained in:
砂糖
2025-07-28 18:25:02 +08:00
parent 8397300197
commit 8eee5448fa
7 changed files with 166 additions and 3 deletions

View File

@@ -142,6 +142,8 @@ export default {
}
this.$store.dispatch("Login", this.loginForm).then(() => {
this.$store.dispatch('category/getCategoryList');
this.$store.dispatch('category/getProductMap');
this.$store.dispatch('category/getRawMaterialMap');
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;

View File

@@ -80,7 +80,13 @@
<dict-tag :options="dict.type.stock_item_type" :value="scope.row.itemType" />
</template>
</el-table-column>
<el-table-column label="物品ID" align="center" prop="itemId" />
<el-table-column label="物品信息" align="center" prop="itemId">
<template slot-scope="scope">
<raw-material-info v-if="scope.row.itemType === ITEM_TYPE.RAW_MATERIAL" :material-id="scope.row.itemId" />
<product-info v-else-if="scope.row.itemType === ITEM_TYPE.PRODUCT" :product-id="scope.row.itemId" />
<span v-else>{{ scope.row.itemId }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="quantity" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="批次号" align="center" prop="batchNo" />
@@ -229,13 +235,16 @@ import WarehouseSelect from '@/components/WarehouseSelect';
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
import ProductSelect from '@/components/KLPService/ProductSelect';
import { ITEM_TYPE } from '@/utils/enums';
import {RawMaterialInfo, ProductInfo} from "@/components/KLPService";
export default {
name: "StockIoDetailPanel",
components: {
WarehouseSelect,
RawMaterialSelect,
ProductSelect
ProductSelect,
RawMaterialInfo,
ProductInfo
},
dicts: ['stock_item_type'],
props: {