|
@@ -302,8 +302,28 @@ export default {
|
|
|
scopedSlots: { customRender: 'accidentNum' }
|
|
|
},
|
|
|
{ title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
|
|
|
- { title: '美元金额', width: 120, dataIndex: 'amount', className: 'replacecolor' },
|
|
|
- { title: '人民币金额', width: 120, dataIndex: 'amountrmb', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '美元金额',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'amount',
|
|
|
+ className: 'replacecolor' ,
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '人民币金额',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'amountrmb',
|
|
|
+ className: 'replacecolor' ,
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(4)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
{ title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
|
|
|
{ title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
|
|
|
// { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
|
|
@@ -316,10 +336,48 @@ export default {
|
|
|
{ title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
|
|
|
{ title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
|
|
|
{ title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
|
|
|
- { title: '美元', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
|
|
|
- { title: '人民币(不含税)', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
|
|
|
- { title: '人民币(税额)', dataIndex: 'shuiemoney', width: 120, className: 'replacecolor' },
|
|
|
- { title: '人民币(价税合计)', dataIndex: 'totalTaxIncrease', width: 120, className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '美元',
|
|
|
+ dataIndex: 'disbursedOriginalmoney',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor' ,
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '人民币(不含税)',
|
|
|
+ dataIndex: 'disbursedLocalmoney',
|
|
|
+ width: 120, className: 'replacecolor',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '人民币(税额)',
|
|
|
+ dataIndex: 'shuiemoney',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '人民币(价税合计)',
|
|
|
+ dataIndex: 'totalTaxIncrease',
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ if(text!==''&&text){
|
|
|
+ return Number(text).toFixed(2)
|
|
|
+ }
|
|
|
+ }, },
|
|
|
{ title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
|
|
|
{ title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
|
|
|
],
|
|
@@ -352,7 +410,8 @@ export default {
|
|
|
this.PrintButton = false
|
|
|
this.loading = false
|
|
|
this.detailsPlanNum = res.result //所有详情
|
|
|
- this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''&&! this.detailsPlanNum.outdata)?'':moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
|
|
|
+ //调整表头格式
|
|
|
+ this.adjustingHeader()
|
|
|
this.accidentListData = res.result.syCostAllocationAccidentList //事故单
|
|
|
this.accidentCalculation(this.accidentListData)
|
|
|
// var accidentNum = 0
|
|
@@ -391,7 +450,7 @@ export default {
|
|
|
s+=Number(item.transferCost)
|
|
|
})
|
|
|
// this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
|
|
|
- this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(this.detailsPlanNum.fabriccostIncludestax).toFixed(2):'' //合计中的面料总额
|
|
|
+ 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.13).toFixed(2)//合计中的不含税面料总额
|
|
|
// this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
|
|
|
// this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
|
|
@@ -423,7 +482,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
|
|
|
- this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(0)//出货数量合计
|
|
|
+ this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(4)//出货数量合计
|
|
|
this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
|
|
|
this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
|
|
|
this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//
|
|
@@ -442,6 +501,26 @@ 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(4)//计划数量
|
|
|
+ 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(4)//实际出库数量
|
|
|
+ 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)//销售订单原币金额
|
|
|
+ },
|
|
|
+
|
|
|
//计算短出货值
|
|
|
calculation(val){
|
|
|
var average = 0
|
|
@@ -485,13 +564,13 @@ export default {
|
|
|
}
|
|
|
if(this.$refs.unitTabs.shipData.length!==0 ){this.$refs.unitTabs.shipData.push(allObj)}
|
|
|
this.$refs.unitTabs.shipData.map(item=>{
|
|
|
- item.shipQuantity = Number(item.shipQuantity).toFixed(0)
|
|
|
- item.exportUnitPrice = Number(item.exportUnitPrice).toFixed(4)
|
|
|
- item.exportPrice = Number(item.exportPrice).toFixed(2)
|
|
|
- item.rmbAmount = Number(item.rmbAmount).toFixed(2)
|
|
|
- item.procesUnitPricermb = Number(item.procesUnitPricermb).toFixed(4)
|
|
|
- item.procesUnitPriceusd = Number(item.procesUnitPriceusd).toFixed(4)
|
|
|
- item.processCost = Number(item.processCost).toFixed(4)
|
|
|
+ item.shipQuantity = Number(item.shipQuantity)
|
|
|
+ item.exportUnitPrice = Number(item.exportUnitPrice)
|
|
|
+ item.exportPrice = Number(item.exportPrice)
|
|
|
+ item.rmbAmount = Number(item.rmbAmount)
|
|
|
+ item.procesUnitPricermb = Number(item.procesUnitPricermb)
|
|
|
+ item.procesUnitPriceusd = Number(item.procesUnitPriceusd)
|
|
|
+ item.processCost = Number(item.processCost)
|
|
|
})
|
|
|
},
|
|
|
//辅料中的合计行
|
|
@@ -522,16 +601,16 @@ export default {
|
|
|
})
|
|
|
var allObj ={
|
|
|
goodsName:'合计',
|
|
|
- ingredientsTransferQuantity:ingredientsTransferQuantityALll.toFixed(3),
|
|
|
- transferCost:transferCostAll.toFixed(3),
|
|
|
- usageQuantity:usageQuantityAll.toFixed(3),
|
|
|
- purchaseQuantity:purchaseQuantityAll.toFixed(3),
|
|
|
- ingredientsRemainingQuantity:ingredientsRemainingQuantityAll.toFixed(3),
|
|
|
- loss:lossAll.toFixed(3),
|
|
|
- rmbAmount:rmbAmountAll.toFixed(3),
|
|
|
- usdAmount:usdAmountAll.toFixed(3),
|
|
|
- priceExcludingtax:priceExcludingtaxAll.toFixed(3),
|
|
|
- dosage:dosageAll.toFixed(3)
|
|
|
+ ingredientsTransferQuantity:ingredientsTransferQuantityALll,
|
|
|
+ transferCost:transferCostAll,
|
|
|
+ usageQuantity:usageQuantityAll,
|
|
|
+ purchaseQuantity:purchaseQuantityAll,
|
|
|
+ ingredientsRemainingQuantity:ingredientsRemainingQuantityAll,
|
|
|
+ loss:lossAll,
|
|
|
+ rmbAmount:rmbAmountAll,
|
|
|
+ usdAmount:usdAmountAll,
|
|
|
+ priceExcludingtax:priceExcludingtaxAll,
|
|
|
+ dosage:dosageAll
|
|
|
}
|
|
|
if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
|
|
|
if(this.$refs.unitTabs.ingData.length!==0 ){ this.$refs.unitTabs.ingData.push(allObj)}
|
|
@@ -550,11 +629,12 @@ export default {
|
|
|
})
|
|
|
var obj={
|
|
|
setNo:'合计',
|
|
|
- disbursedLocalmoney:disbursedLocalmoneyALL.toFixed(3),
|
|
|
- disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3),
|
|
|
+ disbursedLocalmoney:disbursedLocalmoneyALL,
|
|
|
+ disbursedOriginalmoney:disbursedOriginalmoneyALL,
|
|
|
shuiemoney:shuiemoneyAll.toFixed(3),
|
|
|
- totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll).toFixed(3)
|
|
|
+ totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll)
|
|
|
}
|
|
|
+ console.log(this.costPayData[this.costPayData.length-1])
|
|
|
if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
|
|
|
if(this.costPayData.length!==0){ this.costPayData.push(obj)}
|
|
|
},
|