zhangli 3 éve
szülő
commit
79853b01d4
1 módosított fájl, 26 hozzáadás és 8 törlés
  1. 26 8
      src/views/plan/plan.vue

+ 26 - 8
src/views/plan/plan.vue

@@ -125,7 +125,7 @@
               </el-select>
         </el-form-item>
         <el-form-item label="区域" label-width="140px" prop="value" class="trBox">
-            <el-select v-model="planFormAreas"
+            <el-select v-model="planForm.areaId"
                        placeholder="请选择"
                        size="small"
                        clearable
@@ -328,6 +328,7 @@
             "pieces": "",
             "planFinishTime": "",
             "produceNum": "",
+            "areaId":"",
             "producelineNo": "",
             "productName": "",
             "runTime": "",
@@ -364,7 +365,7 @@
       },
       //切换区域添加
       changeAdd() {
-        getStationByDeptId({'id':this.planFormAreas}).then(res=> {
+        getStationByDeptId({'id':this.planForm.areaId}).then(res=> {
           this.stationAdd = res.data
         })
       },
@@ -401,10 +402,10 @@
           });  
           return false;
         }
-        if(this.planFormAreas==""){
+        if(this.planForm.areaId==""){
           this.$message({
               type: 'info',
-              message: '请区域'
+              message: '请选择区域'
           });  
           return false;
         }
@@ -472,6 +473,7 @@
             hour:hour,
             minute:minute
           }
+          this.changeAdd()
         })
         //this.$router.push({ path: '/addplan', query:{ id:index.row.id, kind: 3,type: this.planData[index.$index].type}})
       },
@@ -485,10 +487,18 @@
             }).then(() => {
               var postData={
                 "id": data.row.id,
-              	"num": 0
+                "num": 0,
+                "producelineNo":data.row.producelineNo
               }
               productPlanSet(postData).then(res=> {
-                that.get_plan_list()
+                if(res.status==50000){
+                  this.$message({
+                      type: 'info',
+                      message: res.message
+                  });  
+                }else{
+                  that.get_plan_list()
+                }
               })
             }).catch(() => {
                 this.$message({
@@ -507,10 +517,18 @@
             }).then(() => {
               var postData={
                 "id": data.row.id,
-              	"num": 1
+              	"num": 1,
+                "producelineNo":data.row.producelineNo
               }
               productPlanSet(postData).then(res=> {
-                that.get_plan_list()
+                if(res.status==50000){
+                  this.$message({
+                      type: 'info',
+                      message: res.message
+                  });  
+                }else{
+                  that.get_plan_list()
+                }
               })
             }).catch(() => {
                 this.$message({