|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<!--报表 成本分配表 (保存后数据到单证的成本分配汇总内)-->
|
|
|
<div id="costAllocationTable">
|
|
|
+ <a-spin :spinning="loading">
|
|
|
<a-card :bordered="false">
|
|
|
<!-- 主表信息 点击搜索后 回显--->
|
|
|
<a-row :gutter="24">
|
|
@@ -107,8 +108,8 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="不含税运杂费(¥)" prop="rmbExpense" >
|
|
|
- {{detailsPlanNum.rmbExpense }}
|
|
|
+ <a-form-model-item label="不含税运杂费(¥)" prop="rmbNorTaxExpense" >
|
|
|
+ {{detailsPlanNum.rmbNorTaxExpense }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -138,7 +139,7 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="面料成本($)" prop="UsdfabriccostIncludestax" >
|
|
|
+ <a-form-model-item label="面料成本($)" prop="fabriccostIncludestaxUsd" >
|
|
|
{{ detailsPlanNum.fabriccostIncludestaxUsd }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -148,8 +149,9 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="辅料成本($)" prop="UsdexcipiencostIncludestax">
|
|
|
- {{ detailsPlanNum.excipiencostIncludestaxUsd }}
|
|
|
+ <a-form-model-item label="辅料成本($)" prop="excipiencostIncludestaxUsd">
|
|
|
+ {{ detailsPlanNum.excipiencostIncludestaxUsd}}
|
|
|
+ <!-- {{ detailsPlanNum.excipiencostIncludestaxUsd }} -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -173,8 +175,8 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="运费税额" prop="salesrrdersOriginaltotal">
|
|
|
- {{detailsPlanNum.shuiemoney }}
|
|
|
+ <a-form-model-item label="运费税额" prop="shuiemoney">
|
|
|
+ {{detailsPlanNum.shuiemoney}}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -228,7 +230,7 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col> -->
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="备注" prop="UsdfabriccostNotincludestax" >
|
|
|
+ <a-form-model-item label="备注" prop="memo" >
|
|
|
<a-input style="width:100%" type="text" v-model="detailsPlanNum.memo" @blur="changeContainerNumber" v-show='showSelect==0'/>
|
|
|
<span v-show='showSelect==1'>{{ detailsPlanNum.memo }}</span>
|
|
|
</a-form-model-item>
|
|
@@ -249,15 +251,15 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col> -->
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="制单人" prop="maker">
|
|
|
+ <a-form-model-item label="制单人" prop="preparedBy">
|
|
|
{{ detailsPlanNum.preparedBy }}
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
+ <!-- <a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="查询人" prop="queryBy">
|
|
|
{{ detailsPlanNum.queryBy }}
|
|
|
</a-form-model-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="查询时间" prop="queryTime">
|
|
|
{{ detailsPlanNum.queryTime }}
|
|
@@ -299,7 +301,7 @@
|
|
|
|
|
|
<!--tabs 组件引入 -->
|
|
|
<a-card :bordered="false" style=" marginTop:10px;">
|
|
|
- <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" /></div>
|
|
|
+ <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" :planNum="this.detailsPlanNum.planNum" @FabInQua="FabInQua"/></div>
|
|
|
</a-card>
|
|
|
|
|
|
<!-- 事故单 -->
|
|
@@ -308,7 +310,6 @@
|
|
|
<h6 class="table-title">事故单</h6>
|
|
|
<a-table
|
|
|
rowKey="id"
|
|
|
- :loading="loading"
|
|
|
:columns="accidentListColumns"
|
|
|
:data-source="accidentListData"
|
|
|
bordered
|
|
@@ -327,7 +328,6 @@
|
|
|
<h6 class="table-title" >费用支出</h6>
|
|
|
<a-table
|
|
|
rowKey="id"
|
|
|
- :loading="loading"
|
|
|
:columns="costPayColumns"
|
|
|
:data-source="costPayData"
|
|
|
bordered
|
|
@@ -371,6 +371,7 @@
|
|
|
<!-- 事故单 -->
|
|
|
<accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
|
|
|
</div>
|
|
|
+ </a-spin>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -408,6 +409,7 @@ export default {
|
|
|
planNum: ''
|
|
|
}, // 详情所有数据
|
|
|
remarks: '', // 备注
|
|
|
+ copyFabriccostIncludestax:'',//保存查询获取得面料成本(¥)
|
|
|
|
|
|
// 事故单 表头
|
|
|
accidentListColumns: [
|
|
@@ -513,7 +515,9 @@ export default {
|
|
|
// dateFormat: 'YYYY-MM-DD',
|
|
|
}
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ document.title = '成本分配表'+ ' · ' + '森语'
|
|
|
+ },
|
|
|
filters: {
|
|
|
//文字数超出时,超出部分使用...
|
|
|
ellipsis(value) {
|
|
@@ -530,11 +534,24 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
// TODO:接口完善后,type 应改为 add(暂时为了回显数据)
|
|
|
this.loading = true
|
|
|
+ this.$refs.unitTabs.mList = []
|
|
|
+ this.$refs.unitTabs.fList = []
|
|
|
+ var Staging = '',
|
|
|
+ StagingLast = '',
|
|
|
+ file = ''
|
|
|
+ if(data=='queryNew'){
|
|
|
+ Staging =this.detailsPlanNum.memo
|
|
|
+ StagingLast = this.detailsPlanNum.remarks
|
|
|
+ file = this.fileList
|
|
|
+ this.$refs.unitTabs.mList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList
|
|
|
+ this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList
|
|
|
+ }
|
|
|
seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.PrintButton = false
|
|
|
this.loading = false
|
|
|
this.detailsPlanNum = res.result //所有详情
|
|
|
+ this.copyFabriccostIncludestax = res.result.fabriccostIncludestax
|
|
|
if(Number(this.detailsPlanNum.shortseveral)<0){
|
|
|
this.detailsPlanNum.shortseveral = 0
|
|
|
this.detailsPlanNum.shortvalue = 0
|
|
@@ -551,8 +568,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
- //调整表头格式
|
|
|
- this.adjustingHeader()
|
|
|
this.accidentListData = res.result.syCostAllocationAccidentList //事故单
|
|
|
this.accidentCalculation(this.accidentListData)
|
|
|
// var accidentNum = 0
|
|
@@ -568,20 +583,35 @@ export default {
|
|
|
})
|
|
|
// tabs 名称集合
|
|
|
this.$refs.unitTabs.tabNameList = res.result.processUnit.split(',')
|
|
|
-
|
|
|
//所有tabs数据
|
|
|
this.$refs.unitTabs.tabsAllData = res.result.processUnitList
|
|
|
|
|
|
// 页面打开加载的数据
|
|
|
var oneData = this.$refs.unitTabs.tabsAllData[0]
|
|
|
this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
|
|
|
+ var all = 0
|
|
|
this.$refs.unitTabs.fabData.map(item=>{
|
|
|
if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
|
|
|
item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
|
|
|
}
|
|
|
+ if(item.transferCost&&item.transferCost!==''){
|
|
|
+ all+=Number(item.transferCost)
|
|
|
+ }
|
|
|
})
|
|
|
+ // this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax||this.detailsPlanNum.fabriccostIncludestax=='0')?all.toFixed(2):Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
|
|
|
this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
|
|
|
this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
|
|
|
+ this.detailsPlanNum.outdata = oneData.syCostAllocationShipdetail.length!==0?oneData.syCostAllocationShipdetail[0].outdata:''
|
|
|
+ // this.$refs.unitTabs.shipData.map(item=>{
|
|
|
+ // if(item.procesUnitPriceusd==0||item.procesUnitPriceusd==item.procesUnitPricermb||item.procesUnitPriceusd==''||!item.procesUnitPriceusd){
|
|
|
+ // item.procesUnitPricermb = item.procesUnitPricermb!==''&&item.procesUnitPricermb?Number(item.procesUnitPricermb).toFixed(4):0
|
|
|
+ // item.processCost = Number(item.procesUnitPricermb)*Number(item.shipQuantity)
|
|
|
+ // }else{
|
|
|
+ // item.procesUnitPriceusd = item.procesUnitPriceusd!==''&&item.procesUnitPriceusd?Number(item.procesUnitPriceusd).toFixed(4):0
|
|
|
+ // item.shipQuantity = item.shipQuantity!==''&&item.shipQuantity?Number(item.shipQuantity).toFixed(4):0
|
|
|
+ // item.processCost = Number(item.procesUnitPriceusd)*Number(item.shipQuantity)*Number(item.exchangeRate)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.addAmountIng(oneData.syCostAllocationIngredientList)
|
|
|
this.addAmountCostPay(this.costPayData)
|
|
|
this.addAccident(this.accidentListData)
|
|
@@ -593,20 +623,25 @@ export default {
|
|
|
})
|
|
|
// this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
|
|
|
this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
|
|
|
- this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//合计中的不含税面料总额
|
|
|
- this.detailsPlanNum.fabriccostNotincludestax = this.$refs.unitTabs.sumInfo.fabricExcludTax
|
|
|
+ this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
|
|
|
+ // this.detailsPlanNum.fabriccostNotincludestax = this.$refs.unitTabs.sumInfo.fabricExcludTax
|
|
|
// this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
|
|
|
// this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
|
|
|
//合计中辅料相关金额
|
|
|
var s = 0,
|
|
|
- v =0
|
|
|
+ v =0,
|
|
|
+ t=0
|
|
|
oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
s+=Number(item.priceExcludingtax),
|
|
|
v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
+ t+=item.transferCost?Number(item.transferCost):0
|
|
|
})
|
|
|
- this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
|
|
|
- this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//辅料不含税金额合计
|
|
|
- this.detailsPlanNum.excipiencostNotincludestax = this.$refs.unitTabs.sumInfo.ingExcludAmount
|
|
|
+ // this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
|
|
|
+ this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
|
|
|
+ // this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).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.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
|
|
|
//合计中出运明细相关金额
|
|
|
var s =0,
|
|
|
v = 0,
|
|
@@ -631,14 +666,50 @@ export default {
|
|
|
this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
|
|
|
this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
|
|
|
this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
|
|
|
- this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//
|
|
|
+ //调整表头格式
|
|
|
+ this.adjustingHeader()
|
|
|
+ this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//出运不含税加工费
|
|
|
+ this.detailsPlanNum.rmbProcesscost=(e==''|| !e)?'':Number(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.fabricExcludTax)+Number(this.$refs.unitTabs.sumInfo.ingExcludAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).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.pagination = {
|
|
|
total: res.result.total,
|
|
|
current: res.result.current,
|
|
|
pageSize: res.result.size
|
|
|
}
|
|
|
+ if(data=='queryNew'){
|
|
|
+ this.detailsPlanNum.memo = Staging
|
|
|
+ this.detailsPlanNum.remarks = StagingLast
|
|
|
+ this.fileList = file
|
|
|
+ oneData.syCostAllocationFabricList.map(item=>{
|
|
|
+ this.$refs.unitTabs.mList.map(event=>{
|
|
|
+ if(item.goodsName==event.goodsName){
|
|
|
+ item.transferCost = event.transferCost
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
+ this.$refs.unitTabs.fList.map(event=>{
|
|
|
+ if(item.goodsName==event.goodsName){
|
|
|
+ item.transferCost = event.transferCost
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ //重新计算辅料相关数值
|
|
|
+ var s = 0,
|
|
|
+ v=0,
|
|
|
+ t=0
|
|
|
+ oneData.syCostAllocationIngredientList.map(item=>{
|
|
|
+ s+=Number(item.priceExcludingtax),
|
|
|
+ v+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
+ t+=item.transferCost?Number(item.transferCost):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.$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)//表头辅料成本(¥)
|
|
|
+ }
|
|
|
}else {
|
|
|
this.loading = false
|
|
|
this.$message.error(res.message);
|
|
@@ -679,28 +750,33 @@ export default {
|
|
|
},
|
|
|
//调整表头格式
|
|
|
adjustingHeader(){
|
|
|
- this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''||!this.detailsPlanNum.outdata)?'':moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
|
|
|
- this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?'':Number( this.detailsPlanNum.planQuantity).toFixed(0)//计划数量
|
|
|
- this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?'':Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
|
|
|
- this.detailsPlanNum.rmbExpense=( this.detailsPlanNum.rmbExpense==''|| !this.detailsPlanNum.rmbExpense)?'':Number( this.detailsPlanNum.rmbExpense).toFixed(2)//人民币费用支出
|
|
|
- this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?'':Number( this.detailsPlanNum.actualShipquantity).toFixed(0)//实际出库数量
|
|
|
- this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?'':Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
|
|
|
- this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?'':Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
|
|
|
- // this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
|
|
|
- this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?'':Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
|
|
|
- this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?'':Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
|
|
|
- this.detailsPlanNum.excipiencostIncludestax=( this.detailsPlanNum.excipiencostIncludestax==''|| !this.detailsPlanNum.excipiencostIncludestax)?'':Number( this.detailsPlanNum.excipiencostIncludestax).toFixed(2)//辅料含税成本
|
|
|
- this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?'':Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
|
|
|
- this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?'':Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额
|
|
|
- this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?'':Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本
|
|
|
- this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?'':Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本
|
|
|
- this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?'':Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额
|
|
|
+ // this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''||!this.detailsPlanNum.outdata)?0:moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
|
|
|
+ this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?0:Number( this.detailsPlanNum.planQuantity).toFixed(0)//计划数量
|
|
|
+ this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?0:Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
|
|
|
+ // this.detailsPlanNum.rmbExpense=( this.detailsPlanNum.rmbExpense==''|| !this.detailsPlanNum.rmbExpense)?0:Number( this.detailsPlanNum.rmbExpense).toFixed(2)//人民币费用支出
|
|
|
+ this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?0:Number( this.detailsPlanNum.actualShipquantity).toFixed(0)//实际出库数量
|
|
|
+ this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?0:Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
|
|
|
+ this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?0:Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
|
|
|
+ this.detailsPlanNum.usdProcesscost=( this.detailsPlanNum.usdProcesscost==''|| !this.detailsPlanNum.usdProcesscost)?'':Number( this.detailsPlanNum.usdProcesscost).toFixed(2)//加工费(人民币)
|
|
|
+ this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?0:Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
|
|
|
+ // this.detailsPlanNum.excipiencostIncludestax=( this.detailsPlanNum.excipiencostIncludestax==''|| !this.detailsPlanNum.excipiencostIncludestax)?0:Number( this.detailsPlanNum.excipiencostIncludestax).toFixed(2)//辅料含税成本
|
|
|
+ this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?0:Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
|
|
|
+ this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?0:Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额
|
|
|
+ this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?0:Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本
|
|
|
+ // this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?0:Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本
|
|
|
+ this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?0:Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额
|
|
|
+ this.detailsPlanNum.excipiencostIncludestaxUsd=( this.detailsPlanNum.excipiencostIncludestaxUsd==''|| !this.detailsPlanNum.excipiencostIncludestaxUsd)?0: this.detailsPlanNum.excipiencostIncludestaxUsd//辅料成本($)
|
|
|
+ this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
|
|
|
+ this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?0:Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
|
|
|
this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
|
|
|
this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
|
|
|
this.color2 = this.color2>0?this.color2:-this.color2
|
|
|
- if(this.detailsPlanNum.pkOrg=='103'){
|
|
|
- this.detailsPlanNum.rmbProcesscost = (Number(this.detailsPlanNum.rmbProcesscost)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
|
|
|
- }
|
|
|
+
|
|
|
+ // if(this.detailsPlanNum.pkOrg=='103'){
|
|
|
+ // this.detailsPlanNum.rmbProcesscost = (Number(this.detailsPlanNum.rmbProcesscost)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
|
|
|
+ // }else{
|
|
|
+ // this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
//计算出运明细合计行
|
|
@@ -740,7 +816,7 @@ export default {
|
|
|
// procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
|
|
|
processCost:processCostAll.toFixed(3)
|
|
|
}
|
|
|
- this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
|
|
|
+ // this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
|
|
|
//发运明细-合计行
|
|
|
if(this.$refs.unitTabs.shipData.length!==0 ){
|
|
|
if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
|
|
@@ -767,10 +843,10 @@ export default {
|
|
|
priceExcludingtaxAll = 0
|
|
|
val.map(item=>{
|
|
|
if(item.goodsName!=='合计'){
|
|
|
- transferCostAll+=Number(item.transferCost)
|
|
|
- rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
- usdAmountAll+=item.usdAmount?Number(item.usdAmount):0
|
|
|
- priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
|
|
|
+ if(item.rmbAmount !== item.usdAmount){ usdAmountAll+=item.usdAmount?Number(item.usdAmount):0 }
|
|
|
+ transferCostAll+=Number(item.transferCost)
|
|
|
+ rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
|
|
|
+ priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
|
|
|
}
|
|
|
})
|
|
|
var allObj ={
|
|
@@ -782,10 +858,16 @@ export default {
|
|
|
ingredientsTransferQuantity:'',
|
|
|
ingredientsRemainingQuantity:''
|
|
|
}
|
|
|
+ // this.detailsPlanNum.excipiencostNotincludestax = allObj.priceExcludingtax
|
|
|
if(this.$refs.unitTabs.ingData.length!==0 ){
|
|
|
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)
|
|
|
+ }
|
|
|
},
|
|
|
//事故单合计行
|
|
|
addAccident(val){
|
|
@@ -830,6 +912,9 @@ export default {
|
|
|
if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
|
|
|
this.costPayData.push(obj)
|
|
|
}
|
|
|
+ this.detailsPlanNum.shuiemoney = shuiemoneyAll.toFixed(3)
|
|
|
+ this.detailsPlanNum.rmbNorTaxExpense = obj.disbursedLocalmoney.toFixed(2)
|
|
|
+ this.detailsPlanNum.rmbExpense = obj.iNatMoney.toFixed(2)
|
|
|
},
|
|
|
daYin(){
|
|
|
this.showSelect = 1
|
|
@@ -906,8 +991,10 @@ export default {
|
|
|
// var planNum = this.detailsPlanNum.planNum,
|
|
|
var json = this.detailsPlanNum
|
|
|
json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
|
|
|
+ this.loading=true
|
|
|
addHalfInfo(json).then(res => {
|
|
|
- this.isDisabled = false
|
|
|
+ this.isDisabled = false
|
|
|
+ this.loading=false
|
|
|
if (res.success) {
|
|
|
console.log('保存的部分信息', halfInfo)
|
|
|
this.$message.success('保存成功')
|
|
@@ -957,7 +1044,13 @@ export default {
|
|
|
},
|
|
|
number(data1,data2){
|
|
|
this.detailsPlanNum.fabriccostNotincludestax = data1
|
|
|
- this.detailsPlanNum.excipiencostNotincludestax = data2
|
|
|
+ // this.detailsPlanNum.excipiencostNotincludestax = data2
|
|
|
+ },
|
|
|
+ FabInQua(data){
|
|
|
+ if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
|
|
|
+ this.detailsPlanNum.fabriccostIncludestax=data.toFixed(2)//面料含税成本
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
// father 方法
|