gjy 2 years ago
parent
commit
ca07ca958b

+ 5 - 6
public/static/aduitprint.html

@@ -89,11 +89,10 @@
     .sfcard-content .image {
         background-repeat: no-repeat;
         background-size:contain;
-        width:120vw;
+        width:100vw;
         height:100vh;
-        
-        transform-origin: top top;
-        transform: rotate(90deg);
+        /* transform-origin: center center;
+        transform: rotate(180deg); */
     }
     @media print {
     .image{ page-break-inside:avoid;}
@@ -166,7 +165,7 @@
                     <td colspan="2" class="col">{{ item.addressUrlArrayImage.length }}张图片(
                       <template v-if="item.expensesType==2">
                         <template v-for="(item1,index) in item.aduitInfo">
-                          {{item1.fileUrls.length}} <span v-if="index!=item.aduitInfo.length-1">+</span>
+                          {{item1.fileUrls?item1.fileUrls.length:0}} <span v-if="index!=item.aduitInfo.length-1">+</span>
                         </template>
                       </template>
                         ),{{item.addressUrlArrayFilelen}}个文档</td>
@@ -804,7 +803,7 @@
               </tr>
             </tbody>
           </table>
-          <div  v-if="item.printType==1||item.printType==5||item.printType==6||item.printType==7||item.printType==9" class="sfcard" >
+          <div  v-if="item.printType==1&&item.addressUrlArrayImage.length>0||item.printType==5&&item.addressUrlArrayImage.length>0||item.printType==6&&item.addressUrlArrayImage.length>0||item.printType==7&&item.addressUrlArrayImage.length>0||item.printType==9&&item.addressUrlArrayImage.length>0" class="sfcard" >
             <div v-for="item1 in item.addressUrlArrayImage" class="sfcard-content">
                 <div class="sfcard-title">
                     <!-- {{ printData.customerName}}{{ printData.identityAuthenticationInfo.customerNumberCard}} -->

+ 22 - 10
public/static/printdry.html

@@ -173,20 +173,28 @@
                       <td class="col col-bgc">类型</td>
                       <td class="col">干粮</td>
                       <td class="col col-bgc">{{printData.goodsName != '大豆' ? '容重(克/升)' : '蛋白'}}</td>
-                      <td class="col">
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col">
+                      </td>
+                      <td v-else class="col">
+                        685
                       </td>
                       <td class="col col-bgc">不完善粒(%)</td>
-                      <td class="col">
-                          
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col">   
+                      </td>
+                      <td v-else class="col">
+                        6
                       </td>
                   </tr>
                   <tr class="row">
                       <td class="col col-bgc">等级</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">二等</td>
                       <td class="col col-bgc">水分(%)</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">14.5</td>
                       <td class="col col-bgc">热损伤(%)</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">0</td>
                       <td class="col col-bgc">检斤时间</td>
                       <td class="col">
                           {{printData.updateDate}}
@@ -194,13 +202,17 @@
                   </tr>
                   <tr class="row">
                       <td class="col col-bgc">杂质(%)</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">1</td>
                       <td class="col col-bgc">霉变粒(%)</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">1</td>
                       <td class="col col-bgc">扣杂</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">0</td>
                       <td class="col col-bgc">仓位号</td>
-                      <td class="col"></td>
+                      <td v-if="print_company_name!='白城市鹏羽粮食贸易有限公司'" class="col"></td>
+                      <td v-else class="col">5</td>
                   </tr>
                   <tr class="row">
                       <td class="col col-bgc">毛重(公斤)</td>

+ 181 - 6
src/views/universalityAudit/auditprint.vue

@@ -21,7 +21,7 @@
           
         </el-col>
         <el-col style="text-align:right;" :span="10">
-          <el-button style="margin-right:10px" @click="addlist" type="primary">批量打印</el-button>
+          <el-button style="margin-right:10px" @click="printlist" type="primary">批量打印</el-button>
         </el-col>
       </el-row>
       <div class="fromdata">
@@ -149,6 +149,181 @@ export default {
     this.getList()
   },
   methods: {
+    async printlist(){
+      for (let m = 0; m <  this.multipleSelection.length; m++) {
+        if(this.multipleSelection[m].type=='费用审核'||this.multipleSelection[m].type=='运费结算'){
+            this.deptBudgetList[m]=await lookexenseinfo({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].currectstatus=this.multipleSelection[m].status
+            if(this.deptBudgetList[m].addressUrl){
+                var arr1=await printgetfile({appendixIds:this.deptBudgetList[m].addressUrl}).toPromise()
+                this.deptBudgetList[m].addressUrlArray=this.imagefilter(arr1)
+                this.deptBudgetList[m].addressUrlArrayImage=this.imagefilter(arr1)
+                this.deptBudgetList[m].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[m].addressUrlArrayImage.length
+            }else{
+                this.deptBudgetList[m].addressUrlArray=[]
+                this.deptBudgetList[m].addressUrlArrayImage=[]
+                this.deptBudgetList[m].addressUrlArrayFilelen=0
+            }
+            if(this.deptBudgetList[m].expensesType!=1){
+                if(this.multipleSelection[m].type=='费用审核'){
+                  this.deptBudgetList[m].printType=1
+                }else if(this.multipleSelection[m].type=='运费结算'){
+                  this.deptBudgetList[m].printType=7
+                  if (this.deptBudgetList[m].tranTaskInfoList.length > 0) {
+                    var num = 0
+                    for (var i = 0; i < this.deptBudgetList[m].tranTaskInfoList.length; i++) {
+                      if (this.deptBudgetList[m].tranTaskInfoList[i].tranSettlementReportList) {
+                        var data = this.deptBudgetList[m].tranTaskInfoList[i].tranSettlementReportList
+                        for (var q = 0; q < data.length; q++) {
+                          if (data[q].totalPayable) {
+                            this.num += data[q].totalPayable
+                          }
+                        }
+                      }
+                    }
+                  }
+                  this.deptBudgetList[m].num=num.toFixed(2)
+                }
+                var workflow=await printworkflow({businessCode:this.multipleSelection[m].businessCode,tmpCompId:localStorage.getItem('ws-pf_compId')}).toPromise()
+                this.deptBudgetList[0].aduitInfo=await printgethis({workflowId:workflow[0].id,businessKey:this.multipleSelection[m].id,branch:this.deptBudgetList[m].jointVentureParties?this.deptBudgetList[m].jointVentureParties:'zt'}).toPromise()
+                for (let i = 0; i < this.deptBudgetList[m].aduitInfo.length; i++) {
+                    var arr=this.deptBudgetList[m].aduitInfo[i]
+                    if(arr.workflowHistoricTasks&&arr.workflowHistoricTasks.length>0){
+                      console.log(arr.workflowHistoricTasks)
+                        var len =arr.workflowHistoricTasks.length-1
+                        if(arr.workflowHistoricTasks[len].approved){
+                            this.$set(arr,'status','success')
+                        }else{
+                            this.$set(arr,'status','error')
+                        }
+                        arr.operatorName=arr.workflowHistoricTasks[len].operatorName
+                        arr.updateDate=arr.workflowHistoricTasks[len].claimTime
+                        if (arr.workflowHistoricTasks[len].auditMind && arr.workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
+                            arr.auditMind = arr.workflowHistoricTasks[len].auditMind.split("##")[0]
+                            arr.fileUrls = arr.workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
+                            for (let q = 0; q < arr.fileUrls.length; q++) {
+                              this.deptBudgetList[m].addressUrlArrayImage.push({appendixPath:arr.fileUrls[q]})
+                            }
+                        }else{
+                            arr.auditMind = arr.workflowHistoricTasks[len].auditMind
+                        }
+                    }else{
+                        this.$set(arr,'status','question')
+                        arr.operatorName=arr.desc
+                        arr.updateDate=arr.updateDate
+                        arr.auditMind =''
+                    }
+                }
+                this.deptBudgetList[m].aduitInfo.unshift({
+                operatorName:this.multipleSelection[m].creater,
+                updateDate:this.multipleSelection[m].createDate,
+                auditMind:'',
+                desc:'发起',
+                workflowHistoricTasks:[],
+                status:'success'
+                })
+            }else{
+                this.deptBudgetList[m].printType=2 
+                this.deptBudgetList[m].aduitInfo=await getAuditRecord({id:this.multipleSelection[m].id}).toPromise()
+            }
+        }else if(this.multipleSelection[m].type=='入库单请款'||this.multipleSelection[m].type=='运价审核'||this.multipleSelection[m].type=='通用审核'||this.multipleSelection[m].type=='合同审核'||this.multipleSelection[m].type=='仓库设置'||this.multipleSelection[m].type=='出入库任务'){
+          if(this.multipleSelection[m].type=='入库单请款'){
+            this.deptBudgetList[m]=await printgetdata({batchId:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].printType=3
+          }else if(this.multipleSelection[m].type=='运价审核'){
+            this.deptBudgetList[m]=await seeCat({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].printType=4
+          }else if(this.multipleSelection[m].type=='通用审核'){
+            this.deptBudgetList[m]=await getaduitinfo({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].printType=5
+          }else if(this.multipleSelection[m].type=='合同审核'){
+            this.deptBudgetList[m]=await examineList({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].printType=6
+          }else if(this.multipleSelection[m].type=='仓库设置'){
+            this.deptBudgetList[m]=await purchasePriceLook({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m].printType=8
+          }else if(this.multipleSelection[m].type=='出入库任务'){
+            var relevance=await printgetout({id:this.multipleSelection[m].id}).toPromise()
+            this.deptBudgetList[m]={data:await outexamine({relevanceId:relevance.relevanceId}).toPromise()}
+            for (let i = 0; i < this.deptBudgetList[m].data.length; i++) {
+                this.deptBudgetList[m].inOutTypeKey=this.deptBudgetList[m].data[i].inOutTypeKey
+							if (this.deptBudgetList[m].data[i].inOutType == "移库出库" || 
+              this.deptBudgetList[m].data[i].inOutType == "贸易服务出库" || 
+              this.deptBudgetList[m].data[i].inOutType == "销售出库" ||
+              this.deptBudgetList[m].data[i].inOutType == "暂存出库") {
+                this.deptBudgetList[m].OutList = this.deptBudgetList[m].data[i]
+							} else if (this.deptBudgetList[m].data[i].inOutType == "移库入库" || 
+              this.deptBudgetList[m].data[i].inOutType == "暂存入库" || 
+              this.deptBudgetList[m].data[i].inOutType == "采购入库" || 
+              this.deptBudgetList[m].data[i].inOutType =="贸易服务入库"|| 
+              this.deptBudgetList[m].data[i].inOutType =="收购入库") {
+                this.deptBudgetList[m].EnterList = this.deptBudgetList[m].data[i]
+							} else if (this.deptBudgetList[m].data[i].inOutType == "退库") {
+								this.deptBudgetList[m].retreatList = this.deptBudgetList[m].data[i]
+							}
+            }
+            this.deptBudgetList[m].printType=9
+          }
+          if(this.deptBudgetList[m].addressUrl){
+            var arr1=await printgetfile({appendixIds:this.deptBudgetList[m].addressUrl}).toPromise()
+            this.deptBudgetList[m].addressUrlArray=this.imagefilter(arr1)
+            this.deptBudgetList[m].addressUrlArrayImage=this.imagefilter(arr1)
+            this.deptBudgetList[m].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[m].addressUrlArrayImage.length
+          }else{
+            this.deptBudgetList[m].addressUrlArray=[]
+            this.deptBudgetList[m].addressUrlArrayImage=[]
+            this.deptBudgetList[m].addressUrlArrayFilelen=0
+          }
+          this.deptBudgetList[m].currectstatus=this.deptBudgetList[m].status
+          var workflow=await printworkflow({businessCode:this.multipleSelection[m].businessCode,tmpCompId:localStorage.getItem('ws-pf_compId')}).toPromise()
+          if(this.deptBudgetList[m].type=='通用审核') {
+            this.deptBudgetList[m].aduitInfo=await printgethis({workflowId:workflow[0].id,businessKey:this.multipleSelection[m].id,branch:this.deptBudgetList[m].businessType?this.deptBudgetList[m].businessType:'zt'}).toPromise()
+          }else{
+            this.deptBudgetList[m].aduitInfo=await printgethis({workflowId:workflow[0].id,businessKey:this.multipleSelection[m].id,branch:this.deptBudgetList[m].jointVentureParties?this.deptBudgetList[m].jointVentureParties:'zt'}).toPromise()
+          }
+                for (let i = 0; i < this.deptBudgetList[m].aduitInfo.length; i++) {
+                    var arr=this.deptBudgetList[m].aduitInfo[i]
+                    if(arr.workflowHistoricTasks&&arr.workflowHistoricTasks.length>0){
+                        var len =arr.workflowHistoricTasks.length-1
+                        if(arr.workflowHistoricTasks[len].approved){
+                            this.$set(arr,'status','success')
+                        }else{
+                            this.$set(arr,'status','error')
+                        }
+                        arr.operatorName=arr.workflowHistoricTasks[len].operatorName
+                        arr.updateDate=arr.workflowHistoricTasks[len].claimTime
+                        if (arr.workflowHistoricTasks[len].auditMind && arr.workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
+                            arr.auditMind = arr.workflowHistoricTasks[len].auditMind.split("##")[0]
+                            arr.fileUrls = arr.workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
+                            for (let q = 0; q < arr.fileUrls.length; q++) {
+                              this.deptBudgetList[m].addressUrlArrayImage.push({appendixPath:arr.fileUrls[q]})
+                            }
+                        }else{
+                            arr.auditMind = arr.workflowHistoricTasks[len].auditMind
+                        }
+                    }else{
+                        this.$set(arr,'status','question')
+                        arr.operatorName=arr.desc
+                        arr.updateDate=arr.updateDate
+                        arr.auditMind =''
+                    }
+                }
+                this.deptBudgetList[m].aduitInfo.unshift({
+                operatorName:this.multipleSelection[m].creater,
+                updateDate:this.multipleSelection[m].createDate,
+                auditMind:'',
+                desc:'发起',
+                workflowHistoricTasks:[],
+                status:'success'
+                })
+                
+        }
+        
+        
+      }
+      localStorage.setItem('aduitprintdata',JSON.stringify(this.deptBudgetList))
+        window.open('../../../static/aduitprint.html')
+    },
     async printItem(row){
         if(row.type=='费用审核'||row.type=='运费结算'){
             this.deptBudgetList=[await lookexenseinfo({id:row.id}).toPromise()]
@@ -157,11 +332,11 @@ export default {
                 var arr1=await printgetfile({appendixIds:this.deptBudgetList[0].addressUrl}).toPromise()
                 this.deptBudgetList[0].addressUrlArray=this.imagefilter(arr1)
                 this.deptBudgetList[0].addressUrlArrayImage=this.imagefilter(arr1)
-                this.deptBudgetList[0].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[0].addressUrlArray.length
+                this.deptBudgetList[0].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[0].addressUrlArrayImage.length
             }else{
                 this.deptBudgetList[0].addressUrlArray=[]
                 this.deptBudgetList[0].addressUrlArrayImage=[]
-                this.deptBudgetList[0].addressUrlArrayFilelen==0
+                this.deptBudgetList[0].addressUrlArrayFilelen=0
             }
             if(this.deptBudgetList[0].expensesType!=1){
                 if(row.type=='费用审核'){
@@ -267,11 +442,11 @@ export default {
             var arr1=await printgetfile({appendixIds:this.deptBudgetList[0].addressUrl}).toPromise()
             this.deptBudgetList[0].addressUrlArray=this.imagefilter(arr1)
             this.deptBudgetList[0].addressUrlArrayImage=this.imagefilter(arr1)
-            this.deptBudgetList[0].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[0].addressUrlArray.length
+            this.deptBudgetList[0].addressUrlArrayFilelen=arr1.length-this.deptBudgetList[0].addressUrlArrayImage.length
           }else{
             this.deptBudgetList[0].addressUrlArray=[]
             this.deptBudgetList[0].addressUrlArrayImage=[]
-            this.deptBudgetList[0].addressUrlArrayFilelen==0
+            this.deptBudgetList[0].addressUrlArrayFilelen=0
           }
           this.deptBudgetList[0].currectstatus=row.status
           var workflow=await printworkflow({businessCode:row.businessCode,tmpCompId:localStorage.getItem('ws-pf_compId')}).toPromise()
@@ -325,7 +500,7 @@ export default {
         for (let i = 0; i < arr.length; i++) {
             if(arr[i].appendixName.indexOf('jpg')!=-1||arr[i].appendixName.indexOf('jpeg')!=-1||arr[i].appendixName.indexOf('png')!=-1){
                     arr1.push(arr[i])
-            }       
+            }
         }
         return arr1
     },

+ 8 - 1
src/views/warehousenew/warehousingOrder.vue

@@ -384,7 +384,7 @@
             </el-select>
           </el-form-item>
           <el-form-item label="折干后重量(吨)">
-            <el-input @input="afterWeightchange" v-model="fieldrationsList.afterWeight" disabled></el-input>
+            <el-input v-model="fieldrationsList.afterWeight"></el-input>
           </el-form-item>
           <!-- <el-form-item label="折干后成本(元/吨)">
               <el-input disabled  placeholder="自动计算,不可编辑" v-model="fieldrationsList.afterCost"></el-input>
@@ -1686,6 +1686,13 @@ export default {
         });
         return
       }
+      if (this.fieldrationsList.afterWeight >this.fieldrationsList.beforeWeight) {
+        this.$message({
+          message: '折干后重量输入错误',
+          type: 'warning'
+        });
+        return
+      }
       if (!this.fieldrationsList.afterBinNo) {
         this.$message({
           message: '折干后仓位不能为空',