diff --git a/src/views/wms/inStockBill/index.vue b/src/views/wms/inStockBill/index.vue
index 416f223..83a6c43 100644
--- a/src/views/wms/inStockBill/index.vue
+++ b/src/views/wms/inStockBill/index.vue
@@ -99,17 +99,21 @@
-
+
+
+ {{ getProjectName(scope.row.projectId) }}
+
+
-
-
-
-
-
+
+
+
+
+
@@ -310,13 +314,6 @@ import { getErpProjectInfoList } from '@/api/oa/erp/projectInfo'; // 添加展
import ProductSelect from '@/components/WmsProductSelect/index.vue';
import { parseTime } from '@/utils/ruoyi';
-const projectInfoList = ref([]); // 项目列表
-
-/** 获取项目列表 */
-const getProjectInfoList = async () => {
- const res = await getErpProjectInfoList({});
- projectInfoList.value = res.data || [];
-};
// 添加展开行处理函数
const handleExpandChange = async (row, expandedRows) => {
if (expandedRows.length && !row.data) {
@@ -332,18 +329,30 @@ const handleExpandChange = async (row, expandedRows) => {
// 物料选择
const productSelectRef = ref();
-
// 定义选中的物料列表
const selectedProducts = ref([]);
-
+// 项目列表
+const projectInfoList = ref([]);
+/** 获取项目列表 */
+const getProjectInfoList = async () => {
+ const res = await getErpProjectInfoList({});
+ projectInfoList.value = res.data || [];
+};
// 打开物料选择弹窗的方法
const openProductSelect = () => {
productSelectRef.value.open();
};
+/** 根据项目ID获取项目名称 */
+const getProjectName = (projectId) => {
+ const project = projectInfoList.value.find((item) => item.projectId === projectId);
+ return project ? project.projectCode : projectId;
+};
// 处理物料选择回调
const handleProductSelect = (products) => {
- selectedProducts.value = products;
+ // 重置所有的物料
+ // selectedProducts.value = products;
+
// 为每个物料添加批次号
const timestamp = parseTime(new Date(), '{y}{m}{d}');
products.forEach((material) => {
@@ -357,6 +366,7 @@ const handleProductSelect = (products) => {
material.inStockAmount = 1; // 默认数量为1
material.totalPrice = (material.unitPrice * material.inStockAmount).toFixed(2);
});
+ selectedProducts.value.push(...products);
};
// 存储选中的物料信息
@@ -433,11 +443,11 @@ const columns = ref([
{ key: 1, label: `租户编号`, visible: false },
{ key: 2, label: `入库单号`, visible: true },
{ key: 3, label: `入库单类型`, visible: true },
- { key: 4, label: `项目ID`, visible: true },
+ { key: 4, label: `所属项目`, visible: true },
{ key: 5, label: `关联单号`, visible: true },
{ key: 6, label: `供应商`, visible: true },
- { key: 7, label: `联系人`, visible: true },
- { key: 8, label: `联系电话`, visible: true },
+ { key: 7, label: `联系人`, visible: false },
+ { key: 8, label: `联系电话`, visible: false },
{ key: 9, label: `入库说明`, visible: true },
{ key: 10, label: `入库单状态`, visible: true },
{ key: 11, label: `流程状态`, visible: true },
@@ -448,7 +458,7 @@ const columns = ref([
{ key: 16, label: `创建人`, visible: false },
{ key: 17, label: `创建时间`, visible: true },
{ key: 18, label: `更新人`, visible: false },
- { key: 19, label: `更新时间`, visible: true }
+ { key: 19, label: `更新时间`, visible: false }
]);
const initFormData: InStockBillForm = {