From f3b97d08e13224c6bc1d4f267bdb1a4e0b3690c3 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 13 三月 2026 17:41:33 +0800
Subject: [PATCH] 参数配置页面开发(未接接口)
---
src/views/productionPlan/productionPlan/index.vue | 37 ++++++++++++++++++++++++++++++++++---
1 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index b7e0ff8..9e4c098 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -362,7 +362,15 @@
label: "鏁版嵁鏉ユ簮",
width: "100px",
prop: "dataSourceType",
- formatData: cell => (cell == 1 ? "鍚屾" : "鎵嬪姩"),
+ dataType: "tag",
+ formatType: params => {
+ const typeMap = {
+ 2: "warning",
+ 1: "primary",
+ };
+ return typeMap[params] || "info";
+ },
+ formatData: cell => (cell == 1 ? "閽夐拤鍚屾" : "鎵嬪姩鏂板"),
},
{
label: "鐢宠鍗曠紪鍙�",
@@ -377,10 +385,15 @@
{
label: "浜у搧鍚嶇О",
prop: "productName",
- width: "100px",
+ width: "200px",
dataType: "tag",
formatType: params => {
- return "primary";
+ // const typeMap = {
+ // 鏉挎潗: "primary",
+ // 鐮屽潡: "warning",
+ // };
+ // return typeMap[params] || "info";
+ return "primary";
},
},
{
@@ -411,6 +424,15 @@
prop: "status",
width: "150px",
className: "status-cell",
+ dataType: "tag",
+ formatType: params => {
+ const typeMap = {
+ 0: "warning",
+ 1: "primary",
+ 2: "info",
+ };
+ return typeMap[params] || "info";
+ },
formatData: cell => {
const statusMap = {
0: "寰呬笅鍙�",
@@ -631,6 +653,7 @@
productMaterialSkuId: [
{ required: true, message: "璇烽�夋嫨浜у搧瑙勬牸", trigger: "change" },
],
+ volume: [{ required: true, message: "璇疯緭鍏ユ柟鏁�", trigger: "blur" }],
productMaterialId: [
{ required: true, message: "璇烽�夋嫨浜у搧", trigger: "change" },
],
@@ -1138,8 +1161,16 @@
const handleSubmit = () => {
formRef.value.validate(valid => {
if (valid) {
+ if (form.volume === 0) {
+ proxy.$modal.msgError("鏂规暟涓嶈兘涓�0");
+ return;
+ }
+ if (form.v === "add") {
+ payload.id = null;
+ }
const payload = { ...form };
if (operationType.value === "add") {
+ payload.id = null;
productionPlanAdd(payload)
.then(() => {
proxy.$modal.msgSuccess(
--
Gitblit v1.9.3