From f19edc96af3261347f48cb8f66f1f5b2feb6071e Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期五, 17 十一月 2023 16:43:54 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/zs-mes-before

---
 src/views/plan/masterproductionschedule/index.vue |   88 +++++++++++++++++++++++++------------------
 1 files changed, 51 insertions(+), 37 deletions(-)

diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue
index e32674e..4affbcb 100644
--- a/src/views/plan/masterproductionschedule/index.vue
+++ b/src/views/plan/masterproductionschedule/index.vue
@@ -9,7 +9,7 @@
               杞﹂棿璁㈠崟<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :key="item" :command="item.command" v-for="item in orderTypeArr" :disabled="item.disabled">{{
+              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in orderTypeArr" :disabled="item.disabled">{{
                 item.label }}</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
@@ -20,7 +20,7 @@
               鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :key="item" :command="item.command" v-for="item in stateTagArr" :disabled="item.disabled">{{
+              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in stateTagArr" :disabled="item.disabled">{{
                 item.label }}</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
@@ -31,7 +31,7 @@
               宸ヨ壓鏂囦欢<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :key="item" :command="item.command" v-for="item in documentTagArr" :disabled="item.disabled">
+              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in documentTagArr" :disabled="item.disabled">
                 {{ item.label }}
               </el-dropdown-item>
             </el-dropdown-menu>
@@ -43,12 +43,12 @@
               瀹℃牳鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :key="item" :command="item.command" v-for="item in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item>
+              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" type="primary"
+          <!-- <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" type="primary"
             style="margin-left:10px;" :loading="loadingOa">鎻愪氦OA
-          </el-button>
+          </el-button> -->
           <!-- <el-button
             v-if="permissions.masterproductionschedule_sync_scm"
             @click="syncScm()"
@@ -62,12 +62,13 @@
             type="primary"
             style="margin-left:10px;"
             >SCM鐘舵�佸彉鏇�
-          </el-button>
+          </el-button> -->
           <el-button
             type="primary"
             style="margin-left:10px;"
+            @click="addPlanProcure"
             >鏂板閲囪喘璁″垝
-          </el-button> -->
+          </el-button>
         </template>
       </ttable>
 
@@ -120,7 +121,8 @@
 import {
   delObj,
   fetchList,
-  loadOrderHandle
+  loadOrderHandle,
+  addPlanPurchasing
 } from '@/api/plan/masterproductionschedule'
 import ttable from '@/views/common/ztt-table.vue'
 import stockDialog from '@/views/common/stock'
@@ -486,36 +488,36 @@
             isSearch: true,
             searchInfoType: 'text'
           },
+          // {
+          //   minWidth: '140',
+          //   prop: 'outerColor',
+          //   label: '澶栨姢棰滆壊',
+          //   sort: true,
+          //   isTrue: true,
+          //   isSearch: true,
+          //   searchInfoType: 'text'
+          // },
+          // {
+          //   minWidth: '140',
+          //   prop: 'lengthRequirement',
+          //   label: '鐩橀暱瑕佹眰',
+          //   sort: true,
+          //   isTrue: true,
+          //   isSearch: true,
+          //   searchInfoType: 'text'
+          // },
+          // {
+          //   minWidth: '140',
+          //   prop: 'printRequirement',
+          //   label: '鍗板瓧瑕佹眰',
+          //   sort: true,
+          //   isTrue: true,
+          //   isSearch: true,
+          //   searchInfoType: 'text'
+          // },
           {
             minWidth: '140',
-            prop: 'outerColor',
-            label: '澶栨姢棰滆壊',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          },
-          {
-            minWidth: '140',
-            prop: 'lengthRequirement',
-            label: '鐩橀暱瑕佹眰',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          },
-          {
-            minWidth: '140',
-            prop: 'printRequirement',
-            label: '鍗板瓧瑕佹眰',
-            sort: true,
-            isTrue: true,
-            isSearch: true,
-            searchInfoType: 'text'
-          },
-          {
-            minWidth: '140',
-            prop: 'orderRemark',
+            prop: 'remark',
             label: '閿�鍞鍗曞娉�',
             sort: true,
             isTrue: true,
@@ -647,6 +649,18 @@
     this.getSysParam(sysParam.IS_REPORT_OPERATION)
   },
   methods: {
+    addPlanProcure(){
+      let val=this.masterPlanSelection.filter(item=>{
+        return item.technologyDocumentId==null||item.technologyDocumentId==''||item.docNumber==''||item.docNumber==null
+      })
+      if(val.length>0){
+        this.$message.warning("褰撳墠鎵�閫夋嫨鐨勮鍒掞紝鍚湁鏈粦瀹氬伐鑹烘枃浠讹紒")
+        return
+      }
+      addPlanPurchasing(this.masterPlanSelection).then(res=>{
+        console.log(res);
+      })
+    },
     deleteMainPlan(row){
       console.log(row);
     },

--
Gitblit v1.9.3