|
@@ -507,6 +507,7 @@ export default {
|
|
|
isDisabled: false, //按钮禁止
|
|
|
billstatus: '', // 单据状态
|
|
|
color1:0,
|
|
|
+ fabricCost:'',//保存表头面料成本(¥)
|
|
|
color2:0,
|
|
|
fileList:[],
|
|
|
url: {
|
|
@@ -534,10 +535,12 @@ export default {
|
|
|
onSearch(data) {
|
|
|
this.$nextTick(() => {
|
|
|
// TODO:接口完善后,type 应改为 add(暂时为了回显数据)
|
|
|
+ this.fabricCost = ''
|
|
|
this.loading = true
|
|
|
this.$refs.unitTabs.mList = []
|
|
|
this.$refs.unitTabs.fList = []
|
|
|
- var Staging = '',
|
|
|
+ this.StagingList = [] //更新时重新计算面料成本(¥)使用
|
|
|
+ var Staging = '',
|
|
|
StagingLast = '',
|
|
|
file = ''
|
|
|
if(data=='queryNew'){
|
|
@@ -546,6 +549,7 @@ export default {
|
|
|
file = this.fileList
|
|
|
this.$refs.unitTabs.mList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList
|
|
|
this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList
|
|
|
+ this.StagingList = this.$refs.unitTabs.fabData
|
|
|
}
|
|
|
seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
|
|
|
if (res.success) {
|
|
@@ -590,6 +594,17 @@ export default {
|
|
|
// 页面打开加载的数据
|
|
|
var oneData = this.$refs.unitTabs.tabsAllData[0]
|
|
|
this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
|
|
|
+ if(data=='queryNew'){
|
|
|
+ var all = 0
|
|
|
+ this.StagingList.map(item=>{
|
|
|
+ if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
|
|
|
+ item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
|
|
|
+ }
|
|
|
+ if(item.transferCost&&item.transferCost!==''){
|
|
|
+ all+=Number(item.transferCost)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
var all = 0
|
|
|
this.$refs.unitTabs.fabData.map(item=>{
|
|
|
if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
|
|
@@ -599,11 +614,12 @@ export default {
|
|
|
all+=Number(item.transferCost)
|
|
|
}
|
|
|
})
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.fabricCost = this.detailsPlanNum.fabriccostIncludestax
|
|
|
+ this.detailsPlanNum.fabriccostIncludestax = all+Number(this.detailsPlanNum.fabriccostIncludestax) // 表头面料成本(¥)
|
|
|
this.detailsPlanNum.fabriccostIncludestaxUsd = Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate//表头面料成本($)
|
|
|
- // //表头面料成本(¥),面料成本($),合计信息-面料金额合计
|
|
|
- // if(!this.detailsPlanNum.fabriccostIncludestax|| this.detailsPlanNum.fabriccostIncludestax=='0'|| this.detailsPlanNum.fabriccostIncludestax==''){
|
|
|
- // this.detailsPlanNum.fabriccostIncludestax = all
|
|
|
- // }
|
|
|
this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
|
|
|
this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
|
|
|
this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
|
|
@@ -638,7 +654,7 @@ export default {
|
|
|
v =0,
|
|
|
t=0
|
|
|
oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
- s+=Number(item.priceExcludingtax),
|
|
|
+ s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
|
|
|
v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
t+=item.transferCost?Number(item.transferCost):0
|
|
|
})
|
|
@@ -1059,11 +1075,14 @@ export default {
|
|
|
// this.detailsPlanNum.excipiencostNotincludestax = data2
|
|
|
},
|
|
|
FabInQua(data){
|
|
|
- if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
|
|
|
- this.detailsPlanNum.fabriccostIncludestax=data.toFixed(2)//面料含税成本
|
|
|
+ // if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
|
|
|
+ this.detailsPlanNum.fabriccostIncludestax=(Number(data)+Number(this.fabricCost)).toFixed(2)//面料含税成本
|
|
|
|
|
|
// this.detailsPlanNum.fabriccostIncludestax=(Number(this.copyFabriccostIncludestax)+data).toFixed(2)//面料含税成本
|
|
|
- }
|
|
|
+ // }
|
|
|
+ this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
|
|
|
+ this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
|
|
|
+ this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
|
|
|
|
|
|
},
|
|
|
|