From 1f5009ddcc87f7a7db792d40206bdcf5462089ee Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期五, 17 十一月 2023 16:43:43 +0800
Subject: [PATCH] 	modified:   src/api/plan/masterproductionschedule.js 	modified:   src/views/plan/customerorder/index.vue 	modified:   src/views/plan/customerorder/sample-customerorder-form.vue 	modified:   src/views/plan/customerorder/schedule-table.vue 	modified:   src/views/plan/masterproductionschedule/index.vue

---
 src/api/plan/masterproductionschedule.js                   |    7 +++
 src/views/plan/masterproductionschedule/index.vue          |   22 +++++++++--
 src/views/plan/customerorder/index.vue                     |   13 ++++++
 src/views/plan/customerorder/sample-customerorder-form.vue |    2 
 src/views/plan/customerorder/schedule-table.vue            |   19 +++++++--
 5 files changed, 52 insertions(+), 11 deletions(-)

diff --git a/src/api/plan/masterproductionschedule.js b/src/api/plan/masterproductionschedule.js
index 1a5d438..ecdb2ee 100644
--- a/src/api/plan/masterproductionschedule.js
+++ b/src/api/plan/masterproductionschedule.js
@@ -33,6 +33,13 @@
   })
 }
 
+export function addPlanPurchasing(obj) {
+  return request({
+    url: '/mes/masterProductionSchedule/addPlanPurchasing',
+    method: 'post',
+    data: obj
+  })
+}
 export function getObj(id) {
   return request({
     url: '/mes/masterProductionSchedule/' + id,
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 1c1af1d..09782db 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -658,7 +658,18 @@
             minWidth: '140',
             width: '120',
             prop: 'deliveryDate',
-            label: '浜よ揣鏃堕棿',
+            label: '璁″垝浜よ揣鏃堕棿',
+            sort: true,
+            isTrue: true,
+            isSearch: true,
+            searchInfoType: 'datetimerange',
+            formatter: this.formatDutyDate
+          },
+          {
+            minWidth: '140',
+            width: '120',
+            prop: 'wantedDeliveryDate',
+            label: '瀹㈡埛鏈熸湜浜よ揣鏃堕棿',
             sort: true,
             isTrue: true,
             isSearch: true,
diff --git a/src/views/plan/customerorder/sample-customerorder-form.vue b/src/views/plan/customerorder/sample-customerorder-form.vue
index f409eae..9e5873c 100644
--- a/src/views/plan/customerorder/sample-customerorder-form.vue
+++ b/src/views/plan/customerorder/sample-customerorder-form.vue
@@ -552,9 +552,9 @@
       this.showPart = true
     },
     selectPart(part) {
-      console.log(part);
       const index = this.currentSelectRow
       if (part) {
+        this.tableData[index].partId=part.id
         this.tableData[index].partNo = part.partNo
         this.tableData[index].customerPartSpec = part.specs
         this.tableData[index].productName = part.partName
diff --git a/src/views/plan/customerorder/schedule-table.vue b/src/views/plan/customerorder/schedule-table.vue
index 0f60dab..c3f4331 100644
--- a/src/views/plan/customerorder/schedule-table.vue
+++ b/src/views/plan/customerorder/schedule-table.vue
@@ -84,16 +84,16 @@
             label="鏈璁″垝鏁伴噺"
           >
             <template scope="scope">
-              <el-form-item>{{ scope.row.qtyPlaned }}</el-form-item>
-              <!-- <el-form-item
+              <!-- <el-form-item>{{ scope.row.qtyPlaned }}</el-form-item> -->
+           <el-form-item
                 :prop="'customer.' + scope.$index"
                 :rules="rules.qtyPlaned"
               >
                 <el-input
                   v-model="scope.row.qtyPlaned"
                   placeholder="璇疯緭鍏ユ湰娆¤鍒掓暟閲�"
-                ></el-input> -->
-              <!-- </el-form-item> -->
+                ></el-input>
+              </el-form-item>
             </template>
           </el-table-column>
           <el-table-column
@@ -132,7 +132,7 @@
           <el-table-column
             header-align="center"
             align="center"
-            label="闇�姹傛棩鏈�"
+            label="璁″垝鏃ユ湡"
           >
             <template slot-scope="scope">
               <el-form-item>{{ scope.row.deliveryDate }}</el-form-item>
@@ -141,6 +141,15 @@
           <el-table-column
             header-align="center"
             align="center"
+            label="瀹㈡埛闇�姹傛棩鏈�"
+          >
+            <template slot-scope="scope">
+              <el-form-item>{{ scope.row.wantedDeliveryDate }}</el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column
+            header-align="center"
+            align="center"
             show-overflow-tooltip
             label="澶囨敞"
             min-width="140"
diff --git a/src/views/plan/masterproductionschedule/index.vue b/src/views/plan/masterproductionschedule/index.vue
index a738b08..1d87c52 100644
--- a/src/views/plan/masterproductionschedule/index.vue
+++ b/src/views/plan/masterproductionschedule/index.vue
@@ -46,9 +46,9 @@
               <el-dropdown-item :key="item" :command="item.command" v-for="item 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()"
@@ -66,6 +66,7 @@
           <el-button
             type="primary"
             style="margin-left:10px;"
+            @click="addPlanProcure"
             >鏂板閲囪喘璁″垝
           </el-button>
         </template>
@@ -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'
@@ -515,7 +517,7 @@
           // },
           {
             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