|
@@ -27,7 +27,7 @@
|
|
|
<el-table-column prop="productCode" label="产品编码" width="140" />
|
|
|
<el-table-column prop="productName" label="产品名称" min-width="220" />
|
|
|
<el-table-column prop="productSpec" label="规格型号" min-width="220" />
|
|
|
- <el-table-column prop="productUnit" label="单位" width="100" />
|
|
|
+ <el-table-column prop="productUnit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.productUnit, productUnit)" />
|
|
|
<el-table-column label="入库数量" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -67,6 +67,9 @@ import SelectGoods from "@/components/product/SelectGoods";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const warehouseList = ref([]);
|
|
|
+const productUnit = ref([]);
|
|
|
+
|
|
|
+
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
@@ -124,6 +127,9 @@ const config = computed(() => {
|
|
|
prop: "productUnit",
|
|
|
width: 120,
|
|
|
},
|
|
|
+ render(unit) {
|
|
|
+ return proxy.dictValueLabel(unit, productUnit.value);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
@@ -159,6 +165,12 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ proxy.getDictOne(['unit']).then((res) => {
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
};
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|