|
@@ -248,7 +248,7 @@
|
|
|
|
|
|
<!--tabs 组件引入 -->
|
|
|
<a-card :bordered="false" style=" marginTop:10px;">
|
|
|
- <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" :planNum="this.detailsPlanNum.planNum" @FabInQua="FabInQua"/></div>
|
|
|
+ <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" :planNum="this.detailsPlanNum.planNum" @FabInQua="FabInQua" @IngInQua="IngInQua"/></div>
|
|
|
</a-card>
|
|
|
|
|
|
<!-- 事故单 -->
|
|
@@ -558,15 +558,18 @@ export default {
|
|
|
//合计中辅料相关金额
|
|
|
var s = 0,
|
|
|
v =0,
|
|
|
- t=0
|
|
|
+ t=0,
|
|
|
+ u=0
|
|
|
oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
|
|
|
v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
t+=item.transferCost?Number(item.transferCost):0
|
|
|
+ u+=item.usdAmount?Number(item.usdAmount):0
|
|
|
})
|
|
|
this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
|
|
|
this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
|
|
|
this.detailsPlanNum.excipiencostNotincludestax = ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本
|
|
|
+ this.detailsPlanNum.excipiencostIncludestaxUsd = ((u/2)+(t/2)/1.13/(Number(this.detailsPlanNum.exchangeRate))).toFixed(2)
|
|
|
this.detailsPlanNum.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
|
|
|
//合计中出运明细相关金额
|
|
|
var s =0,
|
|
@@ -603,6 +606,7 @@ export default {
|
|
|
this.detailsPlanNum.usdProcesscost =e==0?(Number(this.detailsPlanNum.rmbProcesscost)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2):e.toFixed(2)//表头-加工费美元
|
|
|
f=Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number(this.$refs.unitTabs.sumInfo.shipProcesFees)
|
|
|
this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
|
|
|
+ // this.$set( this.$refs.unitTabs.sumInfo,'amountTotal',(Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2))
|
|
|
this.pagination = {
|
|
|
total: res.result.total,
|
|
|
current: res.result.current,
|
|
@@ -647,14 +651,17 @@ export default {
|
|
|
//重新计算辅料相关数值
|
|
|
var s = 0,
|
|
|
v=0,
|
|
|
- t=0
|
|
|
+ t=0,
|
|
|
+ u=0
|
|
|
oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
s+=Number(item.priceExcludingtax),
|
|
|
v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
t+=item.transferCost?Number(item.transferCost):0
|
|
|
+ u+=item.usdAmount?Number(item.usdAmount):0
|
|
|
})
|
|
|
this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
|
|
|
this.detailsPlanNum.excipiencostNotincludestax = ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本
|
|
|
+ this.detailsPlanNum.excipiencostIncludestaxUsd = ((u/2)+(t/2)/1.13/(Number(this.detailsPlanNum.exchangeRate))).toFixed(2)
|
|
|
this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
|
|
|
this.detailsPlanNum.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
|
|
|
}
|
|
@@ -731,7 +738,7 @@ export default {
|
|
|
this.detailsPlanNum.shortvalue=( this.detailsPlanNum.shortvalue==''|| !this.detailsPlanNum.shortvalue)?'': (this.detailsPlanNum.shortvalue).toFixed(2)//短出货值
|
|
|
this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
|
|
|
if(this.detailsPlanNum.usdTotalexportprice==0.00){
|
|
|
- this.color2 = 0
|
|
|
+ this.color2 = -1
|
|
|
}else{
|
|
|
this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
|
|
|
}
|
|
@@ -807,11 +814,11 @@ export default {
|
|
|
if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
|
|
|
this.$refs.unitTabs.ingData.push(allObj)
|
|
|
}
|
|
|
- if(rmbAmountAll == usdAmountAll){
|
|
|
- this.detailsPlanNum.excipiencostIncludestaxUsd = 0
|
|
|
- }else{
|
|
|
- this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
|
|
|
- }
|
|
|
+ // if(rmbAmountAll == usdAmountAll){
|
|
|
+ // this.detailsPlanNum.excipiencostIncludestaxUsd = 0
|
|
|
+ // }else{
|
|
|
+ // this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
|
|
|
+ // }
|
|
|
},
|
|
|
//事故单合计行
|
|
|
addAccident(val){
|
|
@@ -937,7 +944,7 @@ export default {
|
|
|
val.map(item=>{
|
|
|
if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'&&Number(item.amount)>0){
|
|
|
item.amount=Number(item.amount)*(-1)
|
|
|
- }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'&&Number(item.amount)>0){
|
|
|
+ }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'&&Number(item.amountrmb)>0){
|
|
|
item.amountrmb = Number(item.amountrmb)*(-1)
|
|
|
}
|
|
|
if(item.accidentUndertaker!=='合计'){
|
|
@@ -945,8 +952,8 @@ export default {
|
|
|
rmbMoney+=Number(item.amountrmb)
|
|
|
}
|
|
|
})
|
|
|
- this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
|
|
|
- this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
|
|
|
+ this.detailsPlanNum.accidentUsdamount = (usaMoney+rmbMoney/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
|
|
|
+ this.detailsPlanNum.accidentcnyAmount = (rmbMoney+usaMoney*Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
|
|
|
},
|
|
|
|
|
|
// 页面 保存
|
|
@@ -1022,7 +1029,25 @@ export default {
|
|
|
this.$refs.unitTabs.sumInfo.fabricAmount=this.detailsPlanNum.fabriccostIncludestax
|
|
|
this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
|
|
|
this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
|
|
|
-
|
|
|
+ },
|
|
|
+ IngInQua(dataArr){
|
|
|
+ var s = 0,
|
|
|
+ v =0,
|
|
|
+ t=0,
|
|
|
+ u=0
|
|
|
+ dataArr.map(item=>{
|
|
|
+ s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
|
|
|
+ v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
+ t+=item.transferCost?Number(item.transferCost):0
|
|
|
+ u+=item.usdAmount?Number(item.usdAmount):0
|
|
|
+ })
|
|
|
+ this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
|
|
|
+ this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
|
|
|
+ this.detailsPlanNum.excipiencostNotincludestax = ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本
|
|
|
+ this.detailsPlanNum.excipiencostIncludestaxUsd = ((u/2)+(t/2)/1.13/(Number(this.detailsPlanNum.exchangeRate))).toFixed(2)
|
|
|
+ this.detailsPlanNum.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
|
|
|
+ this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
|
|
|
+ this.addAmountIng()
|
|
|
},
|
|
|
|
|
|
// father 方法
|