From 6cab291522bb3a9aba535d3e86fddea9b9de272c Mon Sep 17 00:00:00 2001
From: Teo <2642673902@qq.com>
Date: Tue, 19 Aug 2025 22:50:28 +0800
Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E9=9C=80=E6=B1=82=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/materials/batchPlan/index.vue | 38 +++++++++++++++++--------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/src/views/materials/batchPlan/index.vue b/src/views/materials/batchPlan/index.vue
index bdb95a6..b9ef3fc 100644
--- a/src/views/materials/batchPlan/index.vue
+++ b/src/views/materials/batchPlan/index.vue
@@ -82,7 +82,7 @@
-
+
@@ -123,25 +123,25 @@
-
-
+
+ selectName(val, scope.row)">
-
+
-
+
-
+
-
+
@@ -156,7 +156,7 @@
-
+
@@ -232,7 +232,7 @@ const initFormData: any = {
name: undefined,
specification: undefined,
unit: undefined,
- demandQuantity: undefined,
+ quantity: undefined,
qs: undefined,
arrivalTime: undefined,
remark: undefined
@@ -282,6 +282,19 @@ const getList = async (type?: string) => {
getMainList();
};
+const selectName = (val: any, row: any) => {
+ const selected = nameList.value.find((item) => item.id === val);
+ if (selected) {
+ row.name = selected.name;
+ row.specification = selected.specification;
+ row.unit = selected.unit;
+ row.qs = selected.qs;
+ row.quantity = selected.quantity;
+ row.remark = selected.remark;
+ row.arrivalTime = selected.arrivalTime;
+ }
+};
+
/** 节点单击事件 */
const handleNodeClick = (data: any) => {
queryParams.value.mainData.mrpBaseId = data.id;
@@ -315,7 +328,7 @@ const addRow = () => {
name: undefined,
specification: undefined,
unit: undefined,
- demandQuantity: undefined,
+ quantity: undefined,
qs: undefined,
arrivalTime: undefined,
remark: undefined
@@ -339,7 +352,7 @@ const reset = () => {
name: undefined,
specification: undefined,
unit: undefined,
- demandQuantity: undefined,
+ quantity: undefined,
qs: undefined,
arrivalTime: undefined,
remark: undefined
@@ -394,6 +407,7 @@ const handleUpdata = () => {
/** 提交数据 */
const submitTransferForm = async () => {
const result = validateAndClean(form.value.planList);
+ console.log('🚀 ~ submitTransferForm ~ form.value.planList:', form.value.planList);
if (!result.valid) {
proxy?.$modal.msgError('验证失败,主要信息存在部分字段缺失的数据项');
return;
@@ -460,7 +474,7 @@ const handleAudit = async () => {
};
const getNameList = () => {
- getDictList({ projectId: currentProject.value?.id, suppliespriceId: '123' }).then((res) => {
+ getDictList({ projectId: currentProject.value?.id }).then((res) => {
nameList.value = res.data;
});
};