From 1752dc60cced88ff7fc1b1e652769161ac54fa3c Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 11 九月 2025 11:04:16 +0800
Subject: [PATCH] 修复替换流程bug

---
 src/views/flowmgr/taskassign.vue |   56 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/src/views/flowmgr/taskassign.vue b/src/views/flowmgr/taskassign.vue
index 66c4599..4f743eb 100644
--- a/src/views/flowmgr/taskassign.vue
+++ b/src/views/flowmgr/taskassign.vue
@@ -22,7 +22,7 @@
           >
         </el-autocomplete>
       </template>
-
+      <!--
       <template #programmer="{}">
         <el-autocomplete ref="autoProgrammer" :disabled="drawingNoMatch"  v-model="attachForm.programmer"
         :fetch-suggestions="queryProgrammerAsync"
@@ -30,16 +30,12 @@
           >
         </el-autocomplete>
       </template>
-
+-->
     </avue-form>
   </basic-container>
 </template>
 
 <script>
-import {
-  getQueryString,
-} from '@/utils/util';
-
 export default {
   watch: {
     'attachForm.drawingNo': function (val) {
@@ -75,7 +71,7 @@
         isLeaf: (data) => !data.hasChildren
       },
       timeout:0, //闆朵欢鍙峰姞杞界殑timeout
-      drawingNoMatch:true,//闆朵欢鍙锋槸鍚﹀尮閰嶅垎宸ヨ〃
+      //drawingNoMatch:true,//闆朵欢鍙锋槸鍚﹀尮閰嶅垎宸ヨ〃
       attachOption: {
         labelWidth: 160,
         submitBtn: true,
@@ -216,12 +212,30 @@
           },
           {
             label: '涓荤宸ヨ壓',
-            prop: 'programmer',
-            type: 'input',//column 12
-            disabled:true,
+            prop: 'producePlanId',
+            type: 'select',//column 12
+            remote: true,
+            placeholder:'鏃犳硶鍖归厤浜哄憳鑱岃矗琛ㄦ椂璇烽�夋嫨涓荤宸ヨ壓',
+            dicUrl: `/blade-mdm/producedivision/select-programmer?programmer={{key}}`,
+            dicFormatter:(res)=>{
+              return res.data.map(obj => {
+                let item = new Object();
+                item.value = obj.id;
+                item.label = obj.programmerName;
+                item.desc = `涓撲笟缁勯暱锛�${obj.teamLeaderName},鏍″锛�${obj.checkerName},瀹℃牳锛�${obj.checkerName}`
+                return item;
+              }); ;
+            },
             span: 12,
             dataType: 'string',
           },
+          /*{
+            label: '涓荤宸ヨ壓',
+            prop: 'programmer',
+            type: 'input',//column 12
+            span: 12,
+            dataType: 'string',
+          },*/
         ],
       },
       attachForm: {planLockDays:7,planStartTime: this.$dayjs().format('YYYY-MM-DD')},//榛樿7澶�
@@ -305,7 +319,7 @@
     handleSelect(item) {
       this.attachForm.productModel = item.cph;
     },
-
+    /*
     queryProgrammerAsync(query, cb) {//涓荤宸ヨ壓鎼滅储寤鸿
       axios({
         url: '/blade-mdm/producedivision/select-programmer',
@@ -332,12 +346,14 @@
       );
       
     },
+    */
+    /*
     handleProgrammerSelect(item){
       this.attachForm.producePlanId = item.id;
       this.attachForm.planDrawingNo = this.attachForm.drawingNo;//璁板綍姝ゆ椂鐨勯浂缁勪欢鍙�
       console.log('productid',this.attachForm )
 
-    },
+    },*/
     handleTrim(col){
       //console.log(col)
       let value = this.attachForm[col.column.prop];
@@ -352,8 +368,8 @@
     },
     formSubmit(form, done) {
       var form = { ...form };
-      console.log('submit',form);
-      if(this.attachForm.planDrawingNo == this.attachForm.drawingNo && this.attachForm.producePlanId){
+     
+      if(this.attachForm.producePlanId){
         //鎵嬪姩鎸囧畾浜嗕汉鍛樿亴璐h〃id锛屼笉鐢ㄧ户缁粠鏈嶅姟绔獙璇�
          this.startDispatch(form,done);
       }else{
@@ -365,19 +381,15 @@
           res => {
             
             if(res.data.code == 200){
-              this.$message({
-                type: 'success',
-                message: '鎿嶄綔鎴愬姛!',
-              });
             
               this.attachForm.producePlanId = res.data.data.id;
-              this.drawingNoMatch = true;
+              //this.drawingNoMatch = true;
               console.log('planid',this.attachForm.productPlanId)
               this.startDispatch(form,done);
             }else{
-              this.drawingNoMatch = false;
+              //this.drawingNoMatch = false;
              
-              this.$alert(res.data.msg+".鎴栬�呮墜鍔ㄩ�夋嫨涓荤宸ヨ壓銆�", '鍙戣捣浠诲姟澶辫触',{type:'error',confirmButtonText:'鍏抽棴'});
+              this.$alert(res.data.msg+".閲嶆柊杈撳叆鎴栬�呮墜鍔ㄩ�夋嫨涓荤宸ヨ壓銆�", '鍙戣捣浠诲姟澶辫触',{type:'error',confirmButtonText:'鍏抽棴'});
             }
             done();
           },
@@ -405,7 +417,7 @@
             });
             this.$refs.form.resetForm();
             this.attachForm = this.defaultForm;
-            this.drawingNoMatch = true;
+            //this.drawingNoMatch = true;
           }else{
             this.$alert(res.data.msg, '鍙戣捣浠诲姟澶辫触',{type:'error',confirmButtonText:'鍏抽棴'});
           }

--
Gitblit v1.9.3