From 4ba726492b0a81b5c9db460bec7d25fbe489cb23 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 22 十二月 2023 16:43:54 +0800
Subject: [PATCH] 	modified:   src/api/plan/productionschedul.js 	modified:   src/views/plan/productionschedul/index.vue 	modified:   src/views/quality/rawMaterial/rawMaterial-form.vue 	modified:   vue.config.js

---
 src/views/plan/productionschedul/index.vue         |   25 +++++++++++++++++++++----
 src/views/quality/rawMaterial/rawMaterial-form.vue |   22 ++++++++++++----------
 vue.config.js                                      |    4 ++--
 src/api/plan/productionschedul.js                  |    2 +-
 4 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/src/api/plan/productionschedul.js b/src/api/plan/productionschedul.js
index bf84050..7b43570 100644
--- a/src/api/plan/productionschedul.js
+++ b/src/api/plan/productionschedul.js
@@ -10,7 +10,7 @@
 
 export function fetchScheduleById(id) {
   return request({
-    url: '/mes/productionSchedul/'+id,
+    url: '/mes/productionSchedul/selTime/'+id,
     method: 'get',
   })
 }
diff --git a/src/views/plan/productionschedul/index.vue b/src/views/plan/productionschedul/index.vue
index 2b4de6c..ecf9c7a 100644
--- a/src/views/plan/productionschedul/index.vue
+++ b/src/views/plan/productionschedul/index.vue
@@ -7,8 +7,11 @@
             <el-col :span="24">
               <div style="height:40vh;padding: 0px 10px;">
                 <span style="position: relative;top:40px;">鏈畬鎴�</span>
-                <span style="position: relative;top:30px;left:73%;z-index: 11">
+                <span style="position: relative;top:30px;left:60%;z-index: 11">
                   <el-button @click="tagFinished" size="mini" round type="primary">鏍囪宸插畬鎴�</el-button>
+                  <el-button size="mini" round type="primary"
+                  v-if="permissions.plan_productionschedul_edit_line" 
+                  @click="openEditDialog">缂栬緫鏃堕棿绾�</el-button>
                 </span>
                 <avue-crud 
                 :data="tableData" 
@@ -42,7 +45,7 @@
           <el-row>
             <el-col :span="24">
               <div style="height:40vh;padding: 0px 10px;">
-                <span style="position: relative;top:40px;">宸插畬鎴�</span>
+                <span style="position: relative;top:40px">宸插畬鎴�</span>
                 <avue-crud 
                 :data="finishedTableData" 
                 ref="finished" 
@@ -52,7 +55,7 @@
                 @current-change="handleCurrentChange"
                 @size-change="handleSizeChange"
                 :page="finishedPage" 
-                @selection-change="selectionRow">
+                @selection-change="selectionFinishedRow">
                 <!-- <template #menu="{ row, index }">
                   <el-button 
                   v-if="permissions.plan_productionschedul_del" 
@@ -71,7 +74,6 @@
             <el-card>
               <div slot="header" class="clearfix">
                 <span>璋冨害鏃堕棿绾�</span>
-                <el-button v-if="permissions.plan_productionschedul_edit_line && scheduleList.length>0" @click="openEditDialog" style="float: right; padding: 3px 0" type="text">缂栬緫</el-button>
               </div>
               <div style="height:70vh;overflow-y: scroll;">
                 <el-timeline>
@@ -541,6 +543,10 @@
       }
     },
     openEditDialog(){
+      if(this.multipleSelection.length<1){
+        this.$message.error("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�")
+        return
+      }
       this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList))
       this.dialogVisible = true
     },
@@ -642,6 +648,17 @@
       this.multipleSelection = val
       // this.getScheduleById(val[0].id)
     },
+    selectionFinishedRow(val){
+      console.log(val);
+      if (val.length > 1) {
+        const preVal = val.shift();
+        this.$refs.finished.toggleRowSelection(preVal, false);
+      }
+      else{
+        this.scheduleList=[]
+      }
+      this.getScheduleById(val[0].mid)
+    },
     formatDate(row, cellValue){
       if (cellValue) {
         const dutyDateList = /\d{4}-\d{1,2}-\d{1,2}/g.exec(cellValue)
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index 811d792..7e74ee7 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -106,20 +106,17 @@
             </el-row>
         </el-form>
       </div>
-
-
-
       <div class="rawMaterial-detail">
         <el-row style="width:100%;z-index: 10;height:50px;">
-            <el-col :span="18">妫�楠岄」鐩�</el-col>
-            <el-col :span="2">
-              <el-button style="width:90%" v-if="dataForm.id==null" size="small" @click="clickAddLine()">娣诲姞妫�楠岄」鐩�</el-button>
+            <el-col :xs="12" :lg="15">妫�楠岄」鐩�</el-col>
+            <el-col :xs="4" :lg="3" style="text-align: right;">
+              <el-button v-if="dataForm.id==null" size="small" @click="clickAddLine()">娣诲姞妫�楠岄」鐩�</el-button>
             </el-col>
-            <el-col :span="2">
-              <el-button style="width:90%" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">娣诲姞妫�娴嬪�煎垪</el-button>
+            <el-col :xs="4" :lg="3" style="text-align: right;">
+              <el-button class="pad-addcol-btn" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">娣诲姞妫�娴嬪�煎垪</el-button>
             </el-col>
-            <el-col :span="2">
-              <el-button style="width:90%" v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">鍒犻櫎妫�娴嬪�煎垪</el-button>
+            <el-col :xs="4" :lg="3" style="text-align: right;">
+              <el-button v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">鍒犻櫎妫�娴嬪�煎垪</el-button>
             </el-col>
         </el-row>
         <el-row style="width:100%;">
@@ -1006,4 +1003,9 @@
   border: 1px solid #e4e7ed;
   border-bottom: none;
 }
+@media (max-width: 767px) {
+  .pad-addcol-btn{
+    font-size:12px;
+  }
+}
 </style>
diff --git a/vue.config.js b/vue.config.js
index ae3e477..3cac4fe 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,10 +4,10 @@
  */
 
 
-const url = 'http://192.168.2.7:9999'
+// const url = 'http://192.168.2.7:9999'
 // const url = 'http://192.168.32.45:9999'
 
-// const url = 'http://localhost:9999'
+const url = 'http://localhost:9999'
 
 
 const localUrl = 'http://localhost:8089'

--
Gitblit v1.9.3