魏志佳 4 gadi atpakaļ
vecāks
revīzija
9bd13ee3fd

+ 55 - 11
src/views/modules/autoRules/newBlankRule.vue

@@ -20,8 +20,8 @@
                              <a-form-model-item ref="eventRuleLevel"  prop="eventRuleLevel">
                                 <a-radio-group v-model="form.eventRuleLevel" @change="applyObjChange">
                                     <a-radio-button value="ACCOUNT">账户</a-radio-button>
-                                    <a-radio-button value="CAMPAIGN">计划</a-radio-button>
-                                    <a-radio-button value="UNIT">组</a-radio-button>
+                                    <!-- <a-radio-button value="CAMPAIGN">计划</a-radio-button>
+                                    <a-radio-button value="UNIT">组</a-radio-button> -->
                                     <!-- <a-radio-button value="CREATE">创意</a-radio-button> -->
                                 </a-radio-group>
                             </a-form-model-item>
@@ -594,7 +594,11 @@ export default {
                     // specificMoneyMin:undefined,
                     // specificMoneyMax:undefined,
                 }
-            ]
+            ],
+
+            accountFieldList:[],
+            campaignFieldList:[],
+            unitFieldList:[],
         }
     },
     watch:{
@@ -792,7 +796,13 @@ export default {
             this.indeterminate=false;
             if(e.target.value=='ACCOUNT'){
                 this.form.processMethod='SEND'
-            }   
+                this.rulesFieldList=this.accountFieldList
+            }else if(e.target.value=='CAMPAIGN'){
+                this.rulesFieldList=this.campaignFieldList
+            }else if(e.target.value=='UNIT'){
+                this.rulesFieldList=this.unitFieldList
+            } 
+            
             if(this.form.applyAccount){
                 if(e.target.value=='CAMPAIGN'){
                     this.spinning=true;
@@ -869,7 +879,7 @@ export default {
                             this.$router.push('/autoRules')
                             this.$bus.$emit('remove', '/newBlankRule')
                         }else{
-                            this.$message.error('修改失败')
+                            this.$message.error(res.message)
                         }
                             
                         
@@ -883,7 +893,7 @@ export default {
                             this.$router.push('/autoRules')
                             this.$bus.$emit('remove', '/newBlankRule')
                         }else{
-                            this.$message.error('创建失败')
+                            this.$message.error(res.message)
                         }
                             
                         
@@ -975,14 +985,48 @@ export default {
     },
 
     mounted(){
-        getAction('/alarm/alarmMetricValue/queryParentChildList',{}).then(res=>{
+        getAction('/alarm/alarmMetricValue/queryParentChildList',{
+        }).then(res=>{
             console.log(res);
             if(res.success){
-                this.rulesFieldList=res.result;
-                
-            }
-            
+               
+                this.rulesFieldList=res.result
+ 
+            }            
         })
+        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
+        //     metricValueLevel:1
+        // }).then(res=>{
+        //     console.log(res);
+        //     if(res.success){
+        //         this.accountFieldList=res.result;
+        //         if(this.form.eventRuleLevel=='ACCOUNT'){
+        //             this.rulesFieldList=this.accountFieldList
+        //         }   
+        //     }            
+        // })
+        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
+        //     metricValueLevel:2
+        // }).then(res=>{
+        //     console.log(res);
+        //     if(res.success){
+        //         this.campaignFieldList=res.result;
+        //         if(this.form.eventRuleLevel=='CAMPAIGN'){
+        //             this.rulesFieldList=this.campaignFieldList
+        //         }   
+        //     }            
+        // })
+        // getAction('/alarm/alarmMetricValue/queryParentChildList',{
+        //     metricValueLevel:3
+        // }).then(res=>{
+        //     console.log(res);
+        //     if(res.success){
+        //         this.unitFieldList=res.result;
+        //         if(this.form.eventRuleLevel=='UNIT'){
+        //             this.rulesFieldList=this.unitFieldList
+        //         }   
+        //     }            
+        // })
 
         // console.log(this.$route.query);
         this.currentRuleId=this.$route.query.id

+ 1 - 2
src/views/modules/workBench/index.vue

@@ -7,7 +7,7 @@
                     <img src="@/assets/touxiang.png"  alt="">
                 </div>  
                 <div class='tip'>
-                    <p class="greet">早安,吴永前,祝你开心每一天!</p>
+                    <p class="greet">早安,{{userInfo.username}},祝你开心每一天!</p>
                     <p class="descPosition">
                         <span>运营经理</span>
                         <a-divider type="vertical" />
@@ -284,7 +284,6 @@ export default {
             }
             .tip{
                 .greet{
-                    width: 300px;
                     height: 28px;
                     font-size: 20px;
                     font-family: PingFangSC-Medium, PingFang SC;

+ 74 - 29
src/views/modules/workBench/placeOrder.vue

@@ -124,7 +124,7 @@
                     transform: translateY(-50%);
                 }
                 .row-item .input-item {
-                    min-width: 480px;
+                    min-width: 500px;
                     position: relative;
                     // height: 35px;
                     .tip {
@@ -215,9 +215,9 @@
                         </div>
                         <div class="input-item"> 
                              <a-form-model-item ref="design"  prop="design">
-                               <a-select  style="width: 300px" v-model="form.design" mode="multiple" placeholder="请选择设计组长">
-                                    <a-select-option v-for="item in designLeaderList" :key="item.id" :value='item.value'>
-                                        {{item.title}}
+                               <a-select  style="width: 500px" v-model="form.design" show-search  option-filter-prop="children" placeholder="请选择设计组长" :filter-option="filterOption">
+                                    <a-select-option v-for="item in designLeaderList" :key="item.userId" :value='item.userId'>
+                                        {{item.realname}}
                                     </a-select-option>
                                 </a-select>
                             </a-form-model-item>
@@ -231,9 +231,9 @@
                         </div>
                         <div class="input-item"> 
                              <a-form-model-item ref="project"  prop="project">
-                               <a-select  style="width: 300px" v-model="form.project" mode="multiple" placeholder="请选择关联项目">
-                                    <a-select-option v-for="item in projectList" :key="item.id" :value='item.value'>
-                                        {{item.title}}
+                               <a-select  style="width: 500px" v-model="form.project" show-search  option-filter-prop="children" placeholder="请选择关联项目">
+                                    <a-select-option v-for="item in projectList" :key="item.projectId" :value='item.projectId'>
+                                        {{item.projectName+'_'+ (item.mediaId==1?'头条':'快手')+'_'+ item.userName}}
                                     </a-select-option>
                                 </a-select>
                             </a-form-model-item>
@@ -265,11 +265,7 @@
                             <a-form-model-item ref="sysPackage"  prop="sysPackage">
                                 <a-input
                                     v-model="form.sysPackage"
-                                    @blur="
-                                    () => {
-                                        $refs.sysPackage.onFieldBlur();
-                                    }
-                                    "
+                                    
                                 />
                             </a-form-model-item>
                         </div>
@@ -282,7 +278,7 @@
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="dataValue"  prop="dataValue">
-                                <a-range-picker v-model="form.dataValue" />
+                                <a-range-picker v-model="form.dataValue" :disabled-date="disabledDate" />
                             </a-form-model-item>
                         </div>
                     </div>
@@ -306,7 +302,7 @@
                         </div>
                         <div class="input-item"> 
                             <a-form-model-item ref="materialAmountDay"  prop="materialAmountDay">
-                                <a-input-number :min="1" :max="500"  @change="materialAmountDayChange" v-model="form.materialAmountDay" />
+                                <a-input-number :min="1" :max="500"  @change="materialAmountDayChange" v-model="form.materialAmountDay"  />
                             </a-form-model-item>
                         </div>
                     </div>
@@ -319,16 +315,15 @@
                         <div class="input-item"> 
                             <a-form-model-item ref="materialType"  prop="materialType">
                                 <a-radio-group v-model="form.materialType" @change="materialTypeChange">
-                                    <a-radio-button value="NONE">不限</a-radio-button>
-                                    <a-radio-button value="REALPEOPLE">真人</a-radio-button>
-                                    <a-radio-button value="CLIP">剪辑</a-radio-button>
-                                    <a-radio-button value="COMBINATION">组合</a-radio-button>
+                                    <a-radio-button :value="1">真人</a-radio-button>
+                                    <a-radio-button :value="2">剪辑</a-radio-button>
+                                    <a-radio-button :value="3">组合</a-radio-button>
                                                                       
                                 </a-radio-group>
                             </a-form-model-item>
                         </div>
                     </div>
-                    <div class="row-item" v-if="form.materialType=='COMBINATION'">
+                    <div class="row-item" v-if="form.materialType==3">
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">真人数量</div>
@@ -340,7 +335,7 @@
                             </a-form-model-item>
                         </div>
                     </div>
-                    <div class="row-item" v-if="form.materialType=='COMBINATION'">
+                    <div class="row-item" v-if="form.materialType==3">
                         <div class="hint-item"></div>
                         <div class="label-item">
                             <div class="text-item">剪辑数量</div>
@@ -390,7 +385,7 @@
                     <!-- <div class="moduler-title">计划名称</div> -->
                     <div class="opt">
                         <a-button type="default" style="margin-right:15px" @click="goBack">取消</a-button>
-                        <a-button type="primary"  style="margin-right:15px" @click="saveHandler" :loading="saveLoading">保存</a-button>
+                        <a-button type="primary"  style="margin-right:15px" @click="saveHandler" :loading="saveLoading">下单</a-button>
                     </div>
                 </div>   
                 </a-form-model>
@@ -417,7 +412,7 @@ export default {
                 dataValue:[],
                 materialAmount:undefined,
                 materialAmountDay:undefined,
-                materialType:'NONE',
+                materialType:1,
                 realAmount:undefined,
                 cutAmount:undefined,
                 orderRemark:'',
@@ -433,9 +428,10 @@ export default {
                     { min: 2, message: '长度不得小于2', trigger: 'blur' },
                 ],
                 dataValue: [{ required: true, message: '请选择订单周期', trigger: 'change' }],
-                applyRange: [{ required: true, message: '请选择具体应用范围', trigger: 'change' }],
-                applyAccount: [{required: true, message: '请选择具体应用范围', trigger: 'change' }],
-                specificMoment: [{required: true, message: '请选择具体时刻', trigger: 'change' }],
+                materialAmount: [{ required: true, message: '素材总数必须大于1', trigger: 'change' }],
+                materialAmountDay: [{required: true, message: '日均产量必须填写', trigger: 'change' }],
+                project: [{required: true, message: '必须选择关联项目', trigger: 'change' }],
+                design: [{required: true, message: '必须选择设计组长', trigger: 'change' }],
                
             },
             // 操作记录
@@ -448,10 +444,19 @@ export default {
             // 分页参数
             totalPage:0,
             currentPage:1,
-
+            userInfo:{},
+            roleCode:''
         }
     },
     methods: {
+        disabledDate(current) {
+            return current && current < moment().subtract(1,'days')
+        },
+        filterOption(input, option) {
+            return (
+                option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            );
+        },
         // 附件上传的方法
         handleChange({ file, fileList }) {
         if (file.status !== 'uploading') {
@@ -481,14 +486,18 @@ export default {
             this.form.sysPackage='';
         },
         materialAmountChange(e){
-            console.log(e.target.value)
+            console.log(e)
         },
-        materialAmountDayChange(){
+        materialAmountDayChange(e){
 
         },
         materialTypeChange(val){
 
         },
+        realAmountChange(e){
+            console.log(e);
+            this.form.cutAmount=this.form.materialAmount-this.form.realAmount
+        },
         goBack() {
             this.$router.replace('/autoRules')
             this.$bus.$emit('remove', '/newBlankRule')
@@ -498,8 +507,25 @@ export default {
         saveHandler(){
              this.$refs.ruleForm.validate(valid=> {
                 if (valid) {
-                    this.form.rulesList=this.rulesList;
+                    
                     console.log(valid,this.form);
+                    let params={
+                        ...this.form,
+                        createBy:this.userInfo.id,
+                        startDate:this.form.dataValue[0].format('YYYY-MM-DD'),
+                        endDate:this.form.dataValue[1].format('YYYY-MM-DD'),
+                    };
+
+                    
+                    postAction('/platform/operator/payout',params).then(res=>{
+                        console.log(res);
+                        if(res.success){
+                             this.$router.push('/workBench')
+                            this.$bus.$emit('remove', '/workBench/placeOrder')
+                        }else{
+                            this.$message.error(res.success)
+                        }
+                    })
 
                 } else {
                     console.log('error submit!!');
@@ -508,6 +534,25 @@ export default {
             });
         },
     },
+
+    mounted(){
+        let userInfo=localStorage.getItem('pro__Login_Userinfo');
+        if(userInfo){
+            this.userInfo=JSON.parse(userInfo).value
+        }
+        this.roleCode=localStorage.getItem('roleCode')
+        getAction('/platform/query/designLeader',{}).then(res=>{
+            console.log(res);
+            this.designLeaderList=res.result
+        })
+
+        getAction('/ctop/projectMember/participateList',{
+            userId:this.userInfo.id,
+        }).then(res=>{
+            console.log(res);
+            this.projectList=res.result
+        })
+    },
 }
 </script>
 

+ 2 - 2
vue.config.js

@@ -73,7 +73,7 @@ module.exports = {
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
 
-        target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
 
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
@@ -82,7 +82,7 @@ module.exports = {
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
 
 
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目