zhangyuewww 2 jaren geleden
bovenliggende
commit
7c1fc7564d

+ 27 - 5
src/views/outboundManagement/weighingManagementNew.vue

@@ -863,6 +863,9 @@
                 if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
                   this.dialogData.customer = this.dialogData.contractManagement.buyer
                 }
+                  if(this.dialogData.contractManagement.agreementType=='代储合同'){
+                this.dialogData.customer = this.dialogData.contractManagement.seller
+              }
                 console.log(111,this.dialogData)
                 this.dialogDataList.push(this.dialogData)
                 this.printBig('', this.radio)
@@ -1842,26 +1845,45 @@
                       )
                           if(this.weighingList.contractManagement){
                             let cang = {}
-                            cang.value = this.weighingList.contractManagement.seller
+                            if(this.weighingList.contractManagement.agreementType=='代储合同'){
+                            cang.value = this.weighingList.contractManagement.buyer
+                            cang.label = this.weighingList.contractManagement.buyer
+                            if(this.warehouseName=='佳屹农仓储库'){
+                              if (this.check(this.weighingList.contractManagement.buyer, 3)) {
+                                this.companyNameOptions.push(cang)
+                                
+                              }this.companyName=this.weighingList.contractManagement.buyer
+                            }else{
+                              if (this.check(this.weighingList.contractManagement.buyer, 1)) {
+                                this.ewCustomerOptions.push(cang)
+                              }
+                            }
+                            }else{
+                              cang.value = this.weighingList.contractManagement.seller
                             cang.label = this.weighingList.contractManagement.seller
                             if(this.warehouseName=='佳屹农仓储库'){
                               if (this.check(this.weighingList.contractManagement.seller, 3)) {
                                 this.companyNameOptions.push(cang)
-                                this.companyName=this.weighingList.contractManagement.seller
-                              }
+                                
+                              }this.companyName=this.weighingList.contractManagement.seller
                             }else{
                               if (this.check(this.weighingList.contractManagement.seller, 1)) {
                                 this.ewCustomerOptions.push(cang)
                               }
                             }
-                            
+                            }
                               let cang1 = {}
                               cang1.value = this.weighingList.contractManagement.buyer
                               cang1.label = this.weighingList.contractManagement.buyer
                               if (this.check(this.weighingList.contractManagement.buyer, 2)) {
                                 this.companyNameEWOptions.push(cang1)
                               }
-                              this.myCompanyCustomer = this.weighingList.contractManagement.buyer
+                              if(this.weighingList.contractManagement.agreementType=='代储合同'){
+                                  this.myCompanyCustomer = this.weighingList.contractManagement.seller
+                              }
+                              else{
+                                  this.myCompanyCustomer = this.weighingList.contractManagement.buyer
+                              }
                           }
                           
                           this.isShowPrintType = true

+ 28 - 7
src/views/outboundManagement/weighingManagementrecord.vue

@@ -570,8 +570,12 @@
                 this.printBig(1, this.radio)
               } else {
                 this.dialogData.compName = this.companyName
+                //代储合同出库收货方是卖方
+                if(this.dialogData.contractManagement.agreementType=='代储合同'){
+                    this.dialogData.customer = this.dialogData.contractManagement.seller
+                  }
                 if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
-                  this.dialogData.customer = this.dialogData.contractManagement.buyer
+                    this.dialogData.customer = this.dialogData.contractManagement.buyer
                 }
                 this.dialogDataList.push(this.dialogData)
                 this.printBig('', this.radio)
@@ -646,13 +650,27 @@
           if (row.serviceManagementType == '2' && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库'|| this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库')) {
             if (row.seller && row.buyer) {
               let cang = {}
-              cang.value = row.seller
-              cang.label = row.seller
-              if(this.warehouseName=='佳屹农仓储库'){
-                if (this.check(row.seller, 3)) {
-                this.companyNameOptions.push(cang)
-                this.companyName=row.seller
+               if(row.contractManagement.agreementType=='代储合同'){
+                cang.value = row.buyer
+                cang.label = row.buyer
+              }
+              else{
+                cang.value = row.seller
+                cang.label = row.seller
               }
+              if(this.warehouseName=='佳屹农仓储库'){
+                if(row.contractManagement.agreementType=='代储合同'){
+                  if (this.check(row.buyer, 3)) {
+                    this.companyNameOptions.push(cang)
+                  }
+                  this.companyName=row.buyer
+                }
+                else{
+                  if (this.check(row.seller, 3)) {
+                    this.companyNameOptions.push(cang)  
+                  }
+                  this.companyName=row.seller
+                }
               }else{
                 if (this.check(row.seller, 1)) {
                   this.ewCustomerOptions.push(cang)
@@ -666,6 +684,9 @@
                 this.companyNameEWOptions.push(cang1)
               }
               this.myCompanyCustomer = row.buyer
+              if(row.contractManagement.agreementType=='代储合同'){
+                this.myCompanyCustomer = row.seller
+              }
             }
           }
           this.idPrint = row.id