浏览代码

'改自定义规则'

魏志佳 4 年之前
父节点
当前提交
d1e1ad99b5

+ 37 - 24
src/views/modules/autoRules/newBlankRule.vue

@@ -604,7 +604,7 @@ export default {
     watch:{
     watch:{
        'form.applyAccount'(n,o){
        'form.applyAccount'(n,o){
            this.campaignList=[];
            this.campaignList=[];
-           this.form.campaignid=''
+           this.form.campaignId=''
            if(n){
            if(n){
                this.spinning=true;
                this.spinning=true;
                if(this.form.eventRuleLevel=='CAMPAIGN'){
                if(this.form.eventRuleLevel=='CAMPAIGN'){
@@ -870,36 +870,42 @@ export default {
                         ...this.form
                         ...this.form
                     }
                     }
                     console.log(params)
                     console.log(params)
-                    if(this.currentRuleId){
-                        postAction('/alarm/alarmEventRule/edit',params).then(res=>{
-                        console.log(res);
-                        this.saveLoading=false;
-                        if(res.success){
+                    if(params.appStatus||params.rel.length>0){
+                        if(this.currentRuleId){
+                            postAction('/alarm/alarmEventRule/edit',params).then(res=>{
+                            console.log(res);
+                            this.saveLoading=false;
+                            if(res.success){
+                                
+                                this.$router.push('/autoRules')
+                                this.$bus.$emit('remove', '/newBlankRule')
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                                
                             
                             
-                            this.$router.push('/autoRules')
-                            this.$bus.$emit('remove', '/newBlankRule')
+                            })
                         }else{
                         }else{
-                            this.$message.error(res.message)
-                        }
+                            postAction('/alarm/alarmEventRule/add',params).then(res=>{
+                            console.log(res);
+                            this.saveLoading=false;
+                            if(res.success){
+                                
+                                this.$router.push('/autoRules')
+                                this.$bus.$emit('remove', '/newBlankRule')
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                                
                             
                             
-                        
-                        })
+                            })
+                        }
                     }else{
                     }else{
-                        postAction('/alarm/alarmEventRule/add',params).then(res=>{
-                        console.log(res);
                         this.saveLoading=false;
                         this.saveLoading=false;
-                        if(res.success){
-                            
-                            this.$router.push('/autoRules')
-                            this.$bus.$emit('remove', '/newBlankRule')
-                        }else{
-                            this.$message.error(res.message)
-                        }
-                            
-                        
-                        })
+                        this.$message.error('指定情况下必须选择具体计划或者组')
                     }
                     }
                     
                     
+                    
                 } else {
                 } else {
                     console.log('error submit!!');
                     console.log('error submit!!');
                     this.$message.error('请按提示填写必填项目!')
                     this.$message.error('请按提示填写必填项目!')
@@ -1070,6 +1076,13 @@ export default {
                         this.form.applyRange='ACCORDINGTO_STATUS'
                         this.form.applyRange='ACCORDINGTO_STATUS'
                     }
                     }
                     console.log(this.form)
                     console.log(this.form)
+                    if(this.form.eventRuleLevel=='ACCOUNT'){
+                        this.rulesFieldList=this.accountFieldList
+                    }else if(this.form.eventRuleLevel=='CAMPAIGN'){
+                        this.rulesFieldList=this.campaignFieldList
+                    }else if(this.form.eventRuleLevel=='UNIT'){
+                        this.rulesFieldList=this.unitFieldList
+                    }  
                 }
                 }
                 
                 
             })
             })

+ 53 - 9
src/views/modules/workBench/index.vue

@@ -40,11 +40,11 @@
                                 </div>
                                 </div>
                                 </router-link>
                                 </router-link>
                             </div>
                             </div>
-                            <div class="item" v-if="isDesignLeader()">
+                            <div class="item" v-if="isOperator()">
                                 <router-link to="/workBench/orderList?status=2">
                                 <router-link to="/workBench/orderList?status=2">
                                 <div class="title">
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
-                                    <span>待确定的订单</span>
+                                    <span>待审核的物料</span>
                                 </div>
                                 </div>
                                 <div class="itemBody">
                                 <div class="itemBody">
                                     <p class="count">60 <span>个</span></p>
                                     <p class="count">60 <span>个</span></p>
@@ -55,6 +55,17 @@
                                 <router-link to="/workBench/orderList?status=3">
                                 <router-link to="/workBench/orderList?status=3">
                                 <div class="title">
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>待确定的订单</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">60 <span>个</span></p>
+                                </div>
+                                </router-link>
+                            </div>
+                            <div class="item" v-if="isDesignLeader()">
+                                <router-link to="/workBench/orderList?status=4">
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
                                     <span>待指派的订单</span>
                                     <span>待指派的订单</span>
                                 </div>
                                 </div>
                                 <div class="itemBody">
                                 <div class="itemBody">
@@ -63,18 +74,40 @@
                                 </router-link>
                                 </router-link>
                             </div>
                             </div>
                             
                             
-                            <div class="item">
+                            <div class="item" v-if="isDesignLeader()">
                                 <router-link to="/workBench/orderList">
                                 <router-link to="/workBench/orderList">
                                 <div class="title">
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
-                                    <span>我参与的订单</span>
+                                    <span>我参与的物料</span>
                                 </div>
                                 </div>
                                 <div class="itemBody">
                                 <div class="itemBody">
                                     <p class="count">60 <span>个</span></p>
                                     <p class="count">60 <span>个</span></p>
                                 </div>
                                 </div>
                                 </router-link>
                                 </router-link>
                             </div>
                             </div>
-                            <div class="item">
+                            <div class="item" v-if="isDesign()">
+                                <router-link to="/workBench/orderList">
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>指派给我的物料</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">60 <span>个</span></p>
+                                </div>
+                                </router-link>
+                            </div>
+                            <div class="item" v-if="isDesign()">
+                                <router-link to="/workBench/orderList">
+                                <div class="title">
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>被驳回的物料</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">60 <span>个</span></p>
+                                </div>
+                                </router-link>
+                            </div>
+                            <div class="item" v-if="isOperator() || isDesignLeader()">
                                 <router-link to="/workBench/orderList">
                                 <router-link to="/workBench/orderList">
                                 <div class="title">                                   
                                 <div class="title">                                   
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
@@ -85,6 +118,17 @@
                                 </div>
                                 </div>
                                 </router-link>
                                 </router-link>
                             </div>
                             </div>
+                            <div class="item" v-if="isOperator()">
+                                <router-link to="/workBench/orderList">
+                                <div class="title">                                   
+                                    <img src="@/assets/work.png" alt="" class="iconImg">
+                                    <span>被驳回的订单</span>
+                                </div>
+                                <div class="itemBody">
+                                    <p class="count">60 <span>个</span></p>
+                                </div>
+                                </router-link>
+                            </div>
                             <div class="item">
                             <div class="item">
                                 <router-link to="/workBench/orderList">
                                 <router-link to="/workBench/orderList">
                                 <div class="title">
                                 <div class="title">
@@ -96,11 +140,11 @@
                                 </div>
                                 </div>
                                 </router-link>
                                 </router-link>
                             </div>
                             </div>
-                            <!-- <div class="item">
+                            <div class="item">
                                 <router-link to="/workBench/orderList">
                                 <router-link to="/workBench/orderList">
                                 <div class="title">
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
-                                    <span>我发起的</span>
+                                    <span>已完成的物料</span>
                                 </div>
                                 </div>
                                 <div class="itemBody">
                                 <div class="itemBody">
                                     <p class="count">60 <span>个</span></p>
                                     <p class="count">60 <span>个</span></p>
@@ -111,13 +155,13 @@
                                 <router-link to="/workBench/orderList">
                                 <router-link to="/workBench/orderList">
                                 <div class="title">
                                 <div class="title">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
                                     <img src="@/assets/work.png" alt="" class="iconImg">
-                                    <span>我发起的</span>
+                                    <span>全部物料</span>
                                 </div>
                                 </div>
                                 <div class="itemBody">
                                 <div class="itemBody">
                                     <p class="count" >60 <span>个</span></p>
                                     <p class="count" >60 <span>个</span></p>
                                 </div>
                                 </div>
                                 </router-link>
                                 </router-link>
-                            </div> -->
+                            </div>
                         </div>  
                         </div>  
                     </div>
                     </div>
                     <div class="leftBottom">
                     <div class="leftBottom">

+ 3 - 1
src/views/modules/workBench/orderList.vue

@@ -692,7 +692,9 @@ export default {
         },
         },
 
 
         handlerParams(type){
         handlerParams(type){
-            
+            if(type==1){
+                
+            }
         }
         }
     },
     },
     mounted(){
     mounted(){