Browse Source

'改下单制'

魏志佳 4 years ago
parent
commit
223978bd9a

+ 72 - 43
src/views/modules/workBench/operator/materialList.vue

@@ -833,6 +833,8 @@ export default {
                     })
                 }else{
                     this.acceptLoading=false;
+                    this.scriptVisible=false;
+                    this.tableHttp(this.$parent.materialStatus)
                     this.$message.error(res.message)
                 }
             })
@@ -841,34 +843,48 @@ export default {
         // 脚本驳回
         scriptReject(){
             this.loadingElse=true
-            if(this.scriptAdvise){
-                postAction(this.url.scriptReject,{
-                    id:this.currentMaterial.materialId,
-                    scriptAdvise:this.scriptAdvise,
-                    materialCode:this.currentMaterial.materialCode
-                }).then(res=>{
-                    console.log(res);
-                    this.scriptAdvise=''
-                    this.scriptVisible=false;
-                    this.loadingElse=false;
-                    this.scriptRejectVisiable=false
-                    if(res.success){
-                        this.$message.success(res.message);
-                        this.tableHttp(this.$parent.materialStatus)
+             getAction('/platform/material/verifyScript',{
+                materialCode:this.currentMaterial.materialCode,
+                scriptId:this.currentMaterial.scriptId,
+            }).then(res=>{
+                if(res.success){
+                    if(this.scriptAdvise){
+                        postAction(this.url.scriptReject,{
+                            id:this.currentMaterial.materialId,
+                            scriptAdvise:this.scriptAdvise,
+                            materialCode:this.currentMaterial.materialCode
+                        }).then(res=>{
+                            console.log(res);
+                            this.scriptAdvise=''
+                            this.scriptVisible=false;
+                            this.loadingElse=false;
+                            this.scriptRejectVisiable=false
+                            if(res.success){
+                                this.$message.success(res.message);
+                                this.tableHttp(this.$parent.materialStatus)
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                        })
                     }else{
-                        this.$message.error(res.message)
+                        this.loadingElse=false;
+                        this.$messgae.error('请填写驳回理由')
                     }
-                })
-            }else{
-                this.loadingElse=false;
-                this.$messgae.error('请填写驳回理由')
-            }
-            
+                }else{
+                    this.loadingElse=false;
+                    this.scriptVisible=false;
+                    this.tableHttp(this.$parent.materialStatus)
+                    this.$message.error(res.message)
+                }
+            })
         },
         // 视频通过审核
         approved(){
             this.acceptLoading=true;
-            getAction('',{}).then(res=>{
+            getAction('/platform/material/verifyVideo',{
+                materialCode:this.currentMaterial.materialCode,
+                videoId:this.currentMaterial.videoId,
+            }).then(res=>{
                 if(res.success){
                     postAction(this.url.videoAccept,{
                         id:this.currentMaterial.materialId,
@@ -889,6 +905,8 @@ export default {
                 }else{
                     this.$message.error(res.message)
                     this.acceptLoading=false
+                    this.visible=false;
+                    this.tableHttp(this.$parent.materialStatus)
                 }
             })
             
@@ -896,29 +914,40 @@ export default {
         // 视频驳回
         reject(){
             this.loadingElse=true
-            if(this.videoAdvise){
-                postAction(this.url.videoReject,{
-                    id:this.currentMaterial.materialId,
-                    videoAdvise:this.videoAdvise,
-                    materialCode:this.currentMaterial.materialCode
-                }).then(res=>{
-                    console.log(res);
-                    this.videoAdvise='';
-                    this.visible=false;
-                    this.loadingElse=false;
-                    this.videoRejectVisiable=false
-                    if(res.success){
-                        this.$message.success(res.message);
-                        this.tableHttp(this.$parent.materialStatus)
+            getAction('/platform/material/verifyVideo',{
+                materialCode:this.currentMaterial.materialCode,
+                videoId:this.currentMaterial.videoId,
+            }).then(res=>{
+                if(res.success){
+                    if(this.videoAdvise){
+                        postAction(this.url.videoReject,{
+                            id:this.currentMaterial.materialId,
+                            videoAdvise:this.videoAdvise,
+                            materialCode:this.currentMaterial.materialCode
+                        }).then(res=>{
+                            console.log(res);
+                            this.videoAdvise='';
+                            this.visible=false;
+                            this.loadingElse=false;
+                            this.videoRejectVisiable=false
+                            if(res.success){
+                                this.$message.success(res.message);
+                                this.tableHttp(this.$parent.materialStatus)
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                        })
                     }else{
-                        this.$message.error(res.message)
+                        this.loadingElse=false;
+                        this.$message.error('请填写驳回理由')
                     }
-                })
-            }else{
-                this.loadingElse=false;
-                this.$message.error('请填写驳回理由')
-            }
-            
+                }else{
+                    this.$message.error(res.message)
+                    this.loadingElse=false
+                    this.visible=false;
+                    this.tableHttp(this.$parent.materialStatus)
+                }
+            })
         },
         
         search(){

+ 1 - 1
src/views/modules/workBench/operator/platForm.vue

@@ -269,7 +269,7 @@ export default {
                        
                             let time='';
                             let startTime=moment(item.createTime)
-                            console.log(startTime) 
+                            // console.log(startTime) 
                             if(moment().diff(startTime,'hours')>24){
                                 time=item.createTime.split(/[ ]+/)[0]
                                 return {

+ 120 - 71
src/views/modules/workBench/orderDetail.vue

@@ -401,7 +401,7 @@
                             <p class="big">{{ currentOrderInfo.orderStatus | handlerOrderStatus}}</p>
                         </div>
                         <div>
-                            <p class="markName">订单度</p>
+                            <p class="markName">订单完成度</p>
                             <p class="big">{{Math.round((currentOrderInfo.materialFinishAmount/currentOrderInfo.materialAmount)*100)|| 0 }}%</p>
                         </div>
                     </div>
@@ -906,7 +906,7 @@
                             </div>
                                                        
                             <div class="scriptbottom-btn">
-                                <a-button type='primary' @click="scriptApproved" style="margin-right:20px" v-if="role=='operator'&&currentMaterial.materialStatus==2">通过审核</a-button>
+                                <a-button type='primary' @click="scriptApproved" style="margin-right:20px" :loading='acceptLoading' v-if="role=='operator'&&currentMaterial.materialStatus==2">通过审核</a-button>
                                 
                                 <a-button type='default' v-if="role=='operator'&&currentMaterial.materialStatus==2" @click="()=>{scriptRejectVisiable=true}"  style="margin-right:20px">驳回</a-button>
                                 <!-- <a-button type='primary' @click="dowmLoadScript" style="margin-right:20px">下载脚本</a-button> -->
@@ -939,13 +939,14 @@
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
                             </a-form-model-item>
-                            <a-form-model-item  label="拍摄"  ref="shot"  prop="shot">
-                                <a-select
-                                    
+                            <!-- {{currentMaterial.materialType==1?true:false}} -->
+                            <a-form-model-item  label="拍摄"  ref="shot"  prop="shot" :rules='[{ required: currentMaterial.materialType==1, message: "拍摄人员必须指派" ,trigger: "change" }]'>
+                                <a-select                                   
                                     v-model="formPerson.shot"
                                     showSearch
                                     optionFilterProp="children"
                                     :filterOption="filterOption"
+                                    
                                 >
                                 <a-select-option :value="item.userId" v-for="item of ascription" :key="item.userId">{{item.userName}}</a-select-option>
                                 </a-select>
@@ -1130,15 +1131,16 @@ export default {
     },
     data() {
         return {
+            acceptLoading:false,
             videoEchoInfo:{},
             videoUploadLoading:false,
             videoRejectType:'1',
             assignVisibleLoading:false,
             visibleLoading:false,
-             rules: {
+            rules: {
                 
                 clip: [{ required: true, message: '剪辑人员必须指派', trigger: 'change' }],
-                // shot: [{ required: true, message: '拍摄人员必须指派', trigger: 'change' }],
+                // shot: [],
                 plan: [{ required: true, message: '编导人员必须指派', trigger: 'change' }],
                 
             },
@@ -1631,68 +1633,104 @@ export default {
 
         // shipin通过审核
         approved(){
-            postAction(this.url.videoAccept,{
-                id:this.currentMaterial.id,
-                orderCode:this.currentMaterial.orderCode,
+            this.acceptLoading=true;
+            getAction('/platform/material/verifyVideo',{
                 materialCode:this.currentMaterial.materialCode,
-                videoId:this.currentVideo.videoId
+                videoId:this.currentMaterial.videoId,
             }).then(res=>{
-                console.log(res);
-
-                this.visible=false;
-                this.videoAdvise=''
                 if(res.success){
-                    this.$message.success(res.message);
-                    // this.tableHttp(this.$parent.materialStatus)
-                    this.materialHttp()
+                    postAction(this.url.videoAccept,{
+                        id:this.currentMaterial.id,
+                        orderCode:this.currentMaterial.orderCode,
+                        materialCode:this.currentMaterial.materialCode,
+                        videoId:this.currentVideo.videoId
+                    }).then(res=>{
+                        console.log(res);
+                        this.acceptLoading=false
+                        this.visible=false;
+                        this.videoAdvise=''
+                        if(res.success){
+                            this.$message.success(res.message);
+                            
+                            this.materialHttp()
+                        }else{
+                            this.$message.error(res.message)
+                        }
+                    })
                 }else{
                     this.$message.error(res.message)
+                    this.acceptLoading=false
+                    this.materialHttp()
                 }
             })
         },
         // 视频驳回
         reject(){   
             this.loadingElse=true;
-            if(this.videoAdvise){
-                postAction(this.url.videoReject,{
-                    id:this.currentMaterial.id,
-                    videoAdvise:this.videoAdvise,
-                    materialCode:this.currentMaterial.materialCode
-                    
-                }).then(res=>{
-                    console.log(res);
-                    this.videoAdvise=''
-                    this.visible=false;
-                    this.videoRejectVisiable=false;
-                    if(res.success){
-                        this.$message.success(res.message);
-                        this.materialHttp()
+            getAction('/platform/material/verifyVideo',{
+                materialCode:this.currentMaterial.materialCode,
+                videoId:this.currentMaterial.videoId,
+            }).then(res=>{
+                if(res.success){
+                    if(this.videoAdvise){
+                        postAction(this.url.videoReject,{
+                            id:this.currentMaterial.id,
+                            videoAdvise:this.videoAdvise,
+                            materialCode:this.currentMaterial.materialCode
+                            
+                        }).then(res=>{
+                            console.log(res);
+                            this.loadingElse=false
+                            this.videoAdvise=''
+                            this.visible=false;
+                            this.videoRejectVisiable=false;
+                            if(res.success){
+                                this.$message.success(res.message);
+                                this.materialHttp()
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                        })
                     }else{
-                        this.$message.error(res.message)
-                    }
-                })
-            }else{
-                this.loadingElse=false;
-                this.$message.error('请填写驳回理由')
-            }        
-            
+                        this.loadingElse=false;
+                        this.$message.error('请填写驳回理由')
+                    }        
+                }else{
+                    this.$message.error(res.message)
+                    this.loadingElse=false
+                    this.materialHttp()
+                }
+            })
 
         },
         // 脚本通过审核
         scriptApproved(){
-            console.log(this.currentMaterial)
-            postAction(this.url.scriptAccept,{
-                id:this.currentMaterial.id,
-                 orderCode:this.currentMaterial.orderCode,
-                 materialCode:this.currentMaterial.materialCode
+            // console.log(this.currentMaterial)
+            this.acceptLoading=true;
+            getAction('/platform/material/verifyScript',{
+                materialCode:this.currentMaterial.materialCode,
+                scriptId:this.currentMaterial.scriptId,
             }).then(res=>{
-                console.log(res);
-
-                this.scriptVisible=false;
                 if(res.success){
-                    this.$message.success(res.message);
-                    this.materialHttp()
+                    postAction(this.url.scriptAccept,{
+                        id:this.currentMaterial.id,
+                        orderCode:this.currentMaterial.orderCode,
+                        materialCode:this.currentMaterial.materialCode
+                    }).then(res=>{
+                        console.log(res);
+                        this.acceptLoading=false
+                        this.scriptVisible=false;
+                        if(res.success){
+                            this.$message.success(res.message);
+                            this.materialHttp()
+                        }else{
+                            this.$message.error(res.message)
+                        }
+                    })
                 }else{
+                    this.acceptLoading=false;
+                    this.scriptVisible=false;
+                    this.materialHttp()
                     this.$message.error(res.message)
                 }
             })
@@ -1700,30 +1738,41 @@ export default {
         // 脚本驳回
         scriptReject(){
             this.loadingElse=true;
-            if(this.scriptAdvise){
-                postAction(this.url.scriptReject,{
-                    id:this.currentMaterial.id,
-                    scriptAdvise:this.scriptAdvise,
-                    materialCode:this.currentMaterial.materialCode
-                }).then(res=>{
-                    console.log(res);
+            getAction('/platform/material/verifyScript',{
+                materialCode:this.currentMaterial.materialCode,
+                scriptId:this.currentMaterial.scriptId,
+            }).then(res=>{
+                if(res.success){
+                    if(this.scriptAdvise){
+                        postAction(this.url.scriptReject,{
+                            id:this.currentMaterial.id,
+                            scriptAdvise:this.scriptAdvise,
+                            materialCode:this.currentMaterial.materialCode
+                        }).then(res=>{
+                            console.log(res);
 
-                    this.scriptVisible=false;
-                    this.scriptAdvise=''
-                    this.scriptRejectVisiable=false;
-                    this.loadingElse=false;
-                    if(res.success){
-                        this.$message.success(res.message);
-                        this.materialHttp()
+                            this.scriptVisible=false;
+                            this.scriptAdvise=''
+                            this.scriptRejectVisiable=false;
+                            this.loadingElse=false;
+                            if(res.success){
+                                this.$message.success(res.message);
+                                this.materialHttp()
+                            }else{
+                                this.$message.error(res.message)
+                            }
+                        })
                     }else{
-                        this.$message.error(res.message)
+                        this.loadingElse=false;
+                        this.$messgae.error('请填写驳回理由')
                     }
-                })
-            }else{
-                this.loadingElse=false;
-                this.$messgae.error('请填写驳回理由')
-            }
-            
+                }else{
+                    this.loadingElse=false;
+                    this.scriptVisible=false;
+                    this.materialHttp()
+                    this.$message.error(res.message)
+                }
+            })
         },
         // 生成水印
         getWater() {