Bläddra i källkod

'重新改上传'

魏志佳 4 år sedan
förälder
incheckning
c9885b1991

+ 11 - 16
src/views/modules/workBench/materialList.vue

@@ -573,7 +573,7 @@
                                 >
                                     
                                     <a-button key="back" @click="onChildrenDrawerClose" style="margin-right:15px">取消</a-button>
-                                    <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse">确定</a-button>
+                                    <a-button type="primary" :disabled="!confirmLoading" @click="onChildrenDrawerOk" :loading="loadingElse2">确定</a-button>
                                 
                                 </div>
                             </a-drawer>
@@ -904,6 +904,7 @@ export default {
             
         ]
         return {
+            loadingElse2:false,
              rules: {
                 
                 clip: [{ required: true, message: '剪辑人员必须指派', trigger: 'change' }],
@@ -1034,10 +1035,6 @@ export default {
             materialName:'',
             materialId:'',
             
-
-            
-
-
             sizeType:[],
             size: "4",
             role:"",
@@ -1057,15 +1054,13 @@ export default {
                 if (valid) {
                     this.loadingElse=true;
                     postAction(this.url.assgin,{
-                        id:this.currentMaterial.id,
+                        id:this.currentMaterial.materialId,
                         ...this.formPerson
                     }).then(res=>{
-                        if(res.success){
-                            this.loadingElse=false;
-                            this.assignVisible = false;
-                            this.$message.success(res.message);
-                            this.materialHttp(this.activeKey)
-                        }
+                        this.loadingElse=false;
+                        this.assignVisible = false;
+                        this.$message.success(res.message);
+                        this.materialHttp(this.activeKey)
                     })
                 } else {
                     console.log('error submit!!');
@@ -1388,7 +1383,7 @@ export default {
         },
         onChildrenDrawerClose() {
             this.childrenDrawer = false;
-            this.loadingElse=false
+            this.loadingElse2=false
             this.dataElse = []
             this.form.resetFields()
             this.urlList = {
@@ -1410,7 +1405,7 @@ export default {
             this.form.validateFieldsAndScroll((err, values) => {
                 if (!err) {
                     console.log(values)
-                    this.loadingElse = true
+                    this.loadingElse2 = true
                     var params = {
                         ...values,
                     }
@@ -1468,12 +1463,12 @@ export default {
                             }
                             }
                             this.$message.success('素材上传成功')
-                            this.loadingElse = false
+                            this.loadingElse2 = false
                             this.materialHttp(this.activeKey)
                             //   this.departValue = []
                         } else {
                             this.$message.error(res.message)
-                            this.loadingElse = false
+                            this.loadingElse2 = false
                             this.childrenDrawer = false
                             this.visible=false;
                         }

+ 3 - 4
src/views/modules/workBench/orderDetail.vue

@@ -1333,15 +1333,14 @@ export default {
                 if (valid) {
                     this.loadingElse=true;
                     postAction(this.url.assgin,{
-                        id:this.currentMaterial.id,
+                        id:this.currentMaterial.id ,
                         ...this.formPerson
-                    }).then(res=>{
-                        if(res.success){
+                    }).then(res=>{                       
                             this.loadingElse=false;
                             this.assignVisible = false;
                             this.$message.success(res.message);
                             this.materialHttp(this.activeKey)
-                        }
+                        
                     })
                 } else {
                     console.log('error submit!!');