caojunjie 4 лет назад
Родитель
Сommit
16ec277f90

+ 0 - 1
src/combination/listComponent.vue

@@ -222,7 +222,6 @@ export default {
           }
         })
       }
-      console.log(sums)
       return sums
     },
     initData(){

+ 36 - 37
src/views/purchaseIssue/index.vue

@@ -1068,7 +1068,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data, list, add) {
+    getRow(data, list, add,i) {
       select(data).then((res) => {
         if (data.tableName === '销售出库详情') {
           if (res.data.length != 0) {
@@ -1172,12 +1172,28 @@ export default {
             }
           }
         }
+        if (i == 1) this.submitAnd()
       })
     },
+    submitAnd(){
+      this.$refs.avatar.form.fId = ''
+      this.$refs.avatar.form.fBillno = ''
+      this.contentList.forEach(item=>item.fId = '')
+      this.contentOption.forEach(item => {
+        if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+          item.disabled = true
+        } else {
+          item.disabled = false
+        }
+      })
+      this.purchaseList.columnList.forEach(item => item.disabled = false)
+      this.contentButton.forEach(item => item.disabled = false)
+      this.contentStyle.forEach(item => item.disabled = false)
+    },
     returnToForm(row) {
     },
     //查看
-    viewMethod(scope,res) {
+    viewMethod(scope,res,i) {
       this.form = this.$refs.avatar.form
       if(res){
         this.contentButton.forEach(item => {
@@ -1207,7 +1223,7 @@ export default {
             warehouseBills: res.data.warehouseBills,
             tWarehousebillsfees: res.data.tWarehousebillsfees
           }
-          this.getRow(data, list)
+          this.getRow(data,list,'',i)
         }
       })
     },
@@ -1301,24 +1317,19 @@ export default {
             }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
-              let datae = {
-                fId:this.$refs.avatar.form.fId,
-                fBilltype:'XS'
-              }
-              copyNew(datae).then(res=> {
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose: true
-                });
-                let scope = {
-                  row: {
-                    fId: res.data
-                  }
+              this.$refs.avatar.form.fId = ''
+              this.$refs.avatar.form.fBillno = ''
+              this.contentList.forEach(item=>item.fId = '')
+              this.contentOption.forEach(item => {
+                if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+                  item.disabled = true
+                } else {
+                  item.disabled = false
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
               })
+              this.purchaseList.columnList.forEach(item => item.disabled = false)
+              this.contentButton.forEach(item => item.disabled = false)
+              this.contentStyle.forEach(item => item.disabled = false)
             }else{
               this.$message.success('保存成功')
             }
@@ -1454,27 +1465,15 @@ export default {
         case '复制新单':
           if (row.nameTwo === '详情页'){
             this.$refs.avatar.submitForm('submit',3)
-            console.log(this.$refs.avatar.form)
           }else {
             if (this.selection.length > 0){
-              let datae = {
-                fId:this.selection[0].fId,
-                fBilltype:'XS'
-              }
-              copyNew(datae).then(res=>{
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose:true
-                });
-                let scope = {
-                  row:{
-                    fId:res.data
-                  }
+              let scope = {
+                row:{
+                  fId:this.selection[0].fId
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
-              })
+              }
+              this.query(this.formDataList)
+              this.viewMethod(scope,'',1)
             }else {
               this.$message.warning('未选择列表,请选择后再点击');
             }

+ 37 - 38
src/views/purchaseRequest/index.vue

@@ -1014,7 +1014,7 @@ export default {
       })
     },
     //查询列数据
-    getRow(data,list,add) {
+    getRow(data,list,add,i) {
       console.log(data,list,add)
       select(data).then((res) => {
         if (data.tableName === '采购申请详情') {
@@ -1111,13 +1111,14 @@ export default {
             }
           })
         }
+        if (i == 1) this.submitAnd()
       })
     },
     returnToForm(row) {
       console.log(row, 111)
     },
-    //查看
-    viewMethod(scope,res) {
+    //查看-列表
+    viewMethod(scope,res,i) {
       if(res){
         this.contentButton.forEach(item => {
           item.disabled = false
@@ -1146,10 +1147,25 @@ export default {
             tWarehousebillsfees:res.data.tWarehousebillsfees
           }
           // this.$refs.avatar.form = {}
-          this.getRow(data,list)
+          this.getRow(data,list,'',i)
         }
       })
     },
+    submitAnd(){
+      this.$refs.avatar.form.fId = ''
+      this.$refs.avatar.form.fBillno = ''
+      this.contentList.forEach(item=>item.fId = '')
+      this.contentOption.forEach(item => {
+        if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+          item.disabled = true
+        } else {
+          item.disabled = false
+        }
+      })
+      this.purchaseList.columnList.forEach(item => item.disabled = false)
+      this.contentButton.forEach(item => item.disabled = false)
+      this.contentStyle.forEach(item => item.disabled = false)
+    },
     //修改
     modification(scope) {
       console.log(scope)
@@ -1211,24 +1227,19 @@ export default {
             }
             this.contentList = res.data.tWarehousebillsCntrs
             if (item === 3){
-              let datae = {
-                fId:this.$refs.avatar.form.fId,
-                fBilltype:'SQ'
-              }
-              copyNew(datae).then(res=> {
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose: true
-                });
-                let scope = {
-                  row: {
-                    fId: res.data
-                  }
+              this.$refs.avatar.form.fId = ''
+              this.$refs.avatar.form.fBillno = ''
+              this.contentList.forEach(item=>item.fId = '')
+              this.contentOption.forEach(item => {
+                if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
+                  item.disabled = true
+                } else {
+                  item.disabled = false
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope,res)
               })
+              this.purchaseList.columnList.forEach(item => item.disabled = false)
+              this.contentButton.forEach(item => item.disabled = false)
+              this.contentStyle.forEach(item => item.disabled = false)
             }else{
               this.$message.success('保存成功')
             }
@@ -1482,29 +1493,17 @@ export default {
           })
           break
         case '复制新单':
-
           if (row.nameTwo === '详情页'){
             this.$refs.avatar.submitForm('submit',3)
           }else {
             if (this.selection.length > 0){
-              let datae = {
-                fId:this.selection[0].fId,
-                fBilltype:'SQ'
-              }
-              copyNew(datae).then(res=>{
-                this.$message({
-                  message: '复制新单成功',
-                  type: 'success',
-                  showClose:true
-                });
-                let scope = {
-                  row:{
-                    fId:res.data
-                  }
+              let scope = {
+                row:{
+                  fId:this.selection[0].fId
                 }
-                this.query(this.formDataList)
-                this.viewMethod(scope)
-              })
+              }
+              this.query(this.formDataList)
+              this.viewMethod(scope,'',1)
             }else {
               this.$message.warning('未选择列表,请选择后再点击');
             }