Browse Source

Merge remote-tracking branch 'origin/master'

master
qiankanghui 1 month ago
parent
commit
05f1004a2a
  1. 55
      src/views/modules/production/generateReport.vue

55
src/views/modules/production/generateReport.vue

@ -908,17 +908,58 @@
}else {
this.saveHeaderData.moldQty=this.moQty
}
// ========== saveGenerateReportForSchedule- rqrq ==========
//
// (KG) this.KGApprove = × (qty3) +
// /(KG) this.KGReported = × (qty3)
// (KG) saveHeaderData.boxWeight
//
// sfdc_schedule 使
// approveWeight = = KGApprove -
// reportWeight = = +
// = (KGApprove - ) + KGReported
//
// KGApprove/KGReported @blur
// ×
// 1 0
let boxWeightKG = 0
if(this.saveHeaderData.boxWeight!=null&&this.saveHeaderData.boxWeight!=''){
boxWeightKG=this.saveHeaderData.boxWeight
if (this.saveHeaderData.boxWeight != null && this.saveHeaderData.boxWeight !== '') {
boxWeightKG = Number(this.saveHeaderData.boxWeight)
}
if(this.KGApprove!=null&&this.KGApprove!=''&&this.KGApprove>=0){
this.saveHeaderData.approveWeight=Number(this.KGApprove)-boxWeightKG
if(this.KGReported!=null&&this.KGReported!=''){
this.KGReported=0
// 2qty3 ERP weightFactor 0
if (this.qty3 && this.qty3 != 0 && this.qty3 !== 'erp未维护数据') {
// 2.1 KGApprove
let kgApprove = (this.KGApprove !== '' && this.KGApprove != null) ? Number(this.KGApprove) : NaN
if (isNaN(kgApprove)) {
// × +
kgApprove = Number(this.saveHeaderData.qtyApprove || 0) * Number(this.qty3) + boxWeightKG
}
this.saveHeaderData.reportWeight=Number(this.KGApprove)-boxWeightKG+Number(this.KGReported)
// 2.2 / KGReported
let kgReported = (this.KGReported !== '' && this.KGReported != null) ? Number(this.KGReported) : NaN
if (isNaN(kgReported)) {
// ×
kgReported = Number(this.saveHeaderData.qtyUnApprove || 0) * Number(this.qty3)
}
// 2.3 Number() + 50 + "5" = "505"
let kgApproveNum = Number(kgApprove)
let boxWeightNum = Number(boxWeightKG)
let kgReportedNum = Number(kgReported)
let approveNetWeight = kgApproveNum - boxWeightNum // = -
let reportTotalWeight = approveNetWeight + kgReportedNum // = +
// 2.4 1 approveWeight / reportWeight
this.saveHeaderData.approveWeight = Number(approveNetWeight.toFixed(1))
this.saveHeaderData.reportWeight = Number(reportTotalWeight.toFixed(1))
} else {
// ERP
this.saveHeaderData.approveWeight = 0
this.saveHeaderData.reportWeight = 0
}
// ========== - rqrq ==========
if(this.saveHeaderData.scrapQty==null||this.saveHeaderData.scrapQty==''){
this.saveHeaderData.scrapQty=0
}

Loading…
Cancel
Save