From 8ba602b2f08724c1b92ef1e90f89a6fa33861577 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 30 八月 2025 11:52:31 +0800
Subject: [PATCH] 锁定加上锁定原因

---
 src/views/flowmgr/taskassigntemp.vue |   43 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/src/views/flowmgr/taskassigntemp.vue b/src/views/flowmgr/taskassigntemp.vue
index 65ec0c8..ccbf89b 100644
--- a/src/views/flowmgr/taskassigntemp.vue
+++ b/src/views/flowmgr/taskassigntemp.vue
@@ -33,7 +33,7 @@
     'attachForm.processEdition': function (val) {
       if(val && this.attachForm.drawingNo && this.attachForm.processNo ) {
         //this.attachForm.title = `${val}-${this.attachForm.processNo}-鏁版帶绋嬪簭缂栧埗`;
-		    this.attachForm.title = `${this.attachForm.drawingNo}-${this.attachForm.processNo}-${val}-鏁版帶绋嬪簭缂栧埗琛ュ厖`;
+		    this.attachForm.title = `${this.attachForm.drawingNo}-${this.attachForm.processNo}-${val}-鏁版帶绋嬪簭琛ュ厖`;
       }
     },
   },
@@ -55,7 +55,11 @@
             type: 'input',
             span: 24,
             dataType: 'string',
+            disabled:true,
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '闆剁粍浠跺彿',
@@ -64,6 +68,9 @@
             span: 12,
             dataType: 'string',
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '鍥惧彿鐗堟',
@@ -72,6 +79,9 @@
             span: 12,
             dataType: 'string',
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '浜у搧鍨嬪彿',
@@ -80,6 +90,9 @@
             span: 12,
             dataType: 'string',
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '宸ュ簭鍙�',
@@ -91,6 +104,9 @@
             dataType: 'string',
             max: 999,
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '宸ュ簭鍚嶇О',
@@ -99,6 +115,9 @@
             span: 12,
             dataType: 'string',
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '宸ュ簭鐗堟',
@@ -107,16 +126,21 @@
             span: 12,
             dataType: 'string',
             rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
-            label: '宸ヨ壓鐗堟',
+            label: '鎵规鍙�',
             prop: 'craftEdition',
             placeholder:'濡�"A"',
             type: 'input',
             span: 12,
             dataType: 'string',
-            maxlength: 2,
-            rules: [{ required: true, message: '蹇呭~', trigger: 'blur' }],
+            maxlength: 10,
+            blur: (col) => {
+              this.handleTrim(col)
+            },
           },
           {
             label: '鍔犲伐鏈哄簥',
@@ -170,6 +194,17 @@
     };
   },
   methods: {
+    handleTrim(col){
+      //console.log(col)
+      let value = this.attachForm[col.column.prop];
+      if (typeof value === 'string') {
+            const trimmedValue = value.trim();
+            // 鍙湁褰撳�肩‘瀹炲彂鐢熷彉鍖栨椂鎵嶆洿鏂�
+            if (trimmedValue !== value) {
+                this.attachForm[col.column.prop] = trimmedValue;
+            }
+        }
+    },
     formSubmit(form, done) {
       var form = { ...form };
       this.machineCodeList.forEach(item => {

--
Gitblit v1.9.3