|
@@ -302,8 +302,11 @@ export default {
|
|
|
scopedSlots: { customRender: 'accidentNum' }
|
|
|
},
|
|
|
{ title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
|
|
|
- { title: '金额', width: 120, dataIndex: 'amount', className: 'replacecolor' },
|
|
|
- { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
|
|
|
+ { title: '美元金额', width: 120, dataIndex: 'amount', className: 'replacecolor' },
|
|
|
+ { title: '人民币金额', width: 120, dataIndex: 'amountrmb', className: 'replacecolor' },
|
|
|
+ { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
|
|
|
+ { title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
|
|
|
+ // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
|
|
|
// { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
|
|
|
],
|
|
|
accidentListData: [],
|
|
@@ -313,8 +316,10 @@ 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: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
|
|
|
- { title: '支出原币金额', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '人民币(不含税)', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '美元', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '人民币(税额)', dataIndex: 'shuiemoney', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '人民币(加税合计)', dataIndex: 'totalTaxIncrease', width: 120, className: 'replacecolor' },
|
|
|
{ title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
|
|
|
{ title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
|
|
|
],
|
|
@@ -434,9 +439,11 @@ export default {
|
|
|
calculation(val){
|
|
|
var average = 0
|
|
|
val.map(item=>{
|
|
|
- average += item.exportUnitPrice
|
|
|
+ if(item.outdata !=='合计'){
|
|
|
+ average += (Number(item.exportUnitPrice)*Number(item.shipQuantity)*Number(item.exchangeRate))
|
|
|
+ }
|
|
|
})
|
|
|
- this.detailsPlanNum.shortvalue = Number(this.detailsPlanNum.shortseveral*average).toFixed(2)
|
|
|
+ this.detailsPlanNum.shortvalue = average.toFixed(2)
|
|
|
var shipQuantityAll =0,
|
|
|
exportUnitPriceALll = 0,
|
|
|
exportPriceAll =0,
|
|
@@ -445,6 +452,7 @@ export default {
|
|
|
procesUnitPriceusdAll = 0,
|
|
|
processCostAll = 0
|
|
|
val.map(item=>{
|
|
|
+ if(item.outdata !=='合计'){
|
|
|
shipQuantityAll+=Number(item.shipQuantity)
|
|
|
exportUnitPriceALll+=Number(item.exportUnitPrice)
|
|
|
exportPriceAll+=Number(item.exportPrice)
|
|
@@ -452,6 +460,7 @@ export default {
|
|
|
procesUnitPricermbAll+=Number(item.procesUnitPricermb)
|
|
|
procesUnitPriceusdAll+=Number(item.procesUnitPriceusd)
|
|
|
processCostAll+=Number(item.processCost)
|
|
|
+ }
|
|
|
})
|
|
|
var allObj ={
|
|
|
outdata:'合计',
|
|
@@ -464,7 +473,10 @@ export default {
|
|
|
processCost:processCostAll.toFixed(3)
|
|
|
}
|
|
|
//发运明细-合计行
|
|
|
- if(this.$refs.unitTabs.shipData.length!==0){this.$refs.unitTabs.shipData.push(allObj)}
|
|
|
+ if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
|
|
|
+ this.$refs.unitTabs.shipData.pop()
|
|
|
+ }
|
|
|
+ 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)
|
|
@@ -488,6 +500,7 @@ export default {
|
|
|
priceExcludingtaxAll = 0,
|
|
|
dosageAll = 0
|
|
|
val.map(item=>{
|
|
|
+ if(item.goodsName!=='合计'){
|
|
|
ingredientsTransferQuantityALll+=Number(item.ingredientsTransferQuantity)
|
|
|
transferCostAll+=Number(item.transferCost)
|
|
|
usageQuantityAll+=Number(item.usageQuantity)
|
|
@@ -498,6 +511,7 @@ export default {
|
|
|
usdAmountAll+=Number(item.usdAmount)
|
|
|
priceExcludingtaxAll+=Number(item.priceExcludingtax)
|
|
|
dosageAll+=Number(item.dosage)
|
|
|
+ }
|
|
|
})
|
|
|
var allObj ={
|
|
|
goodsName:'合计',
|
|
@@ -512,44 +526,32 @@ export default {
|
|
|
priceExcludingtax:priceExcludingtaxAll.toFixed(3),
|
|
|
dosage:dosageAll.toFixed(3)
|
|
|
}
|
|
|
- if(this.$refs.unitTabs.ingData.length!==0){ this.$refs.unitTabs.ingData.push(allObj)}
|
|
|
+ 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)}
|
|
|
},
|
|
|
//费用支出合计行
|
|
|
addAmountCostPay(val){
|
|
|
var disbursedLocalmoneyALL=0,
|
|
|
- disbursedOriginalmoneyALL=0
|
|
|
+ disbursedOriginalmoneyALL=0,
|
|
|
+ shuiemoneyAll = 0
|
|
|
val.map(item=>{
|
|
|
+ if(item.setNo!=='合计'){
|
|
|
disbursedLocalmoneyALL+=Number(item.disbursedLocalmoney)
|
|
|
disbursedOriginalmoneyALL+=Number(item.disbursedOriginalmoney)
|
|
|
+ shuiemoneyAll+=Number(item.shuiemoney)
|
|
|
+ }
|
|
|
})
|
|
|
var obj={
|
|
|
setNo:'合计',
|
|
|
disbursedLocalmoney:disbursedLocalmoneyALL.toFixed(3),
|
|
|
- disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3)
|
|
|
+ disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3),
|
|
|
+ shuiemoney:shuiemoneyAll.toFixed(3),
|
|
|
+ totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll).toFixed(3)
|
|
|
}
|
|
|
+ if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
|
|
|
if(this.costPayData.length!==0){ this.costPayData.push(obj)}
|
|
|
},
|
|
|
daYin(){
|
|
|
- // printJS({
|
|
|
- // printable:this.fabricLoss.fabricOMOrderList1,
|
|
|
- // properties:[
|
|
|
- // {field:'cvcname',displayName:'制造工艺',columnSize:1},
|
|
|
- // {field:'cvenAbbName',displayName:'工厂',columnSize:1},
|
|
|
- // {field:'iquantityOut',displayName:'材料出库数量',columnSize:1},
|
|
|
- // {field:'iquantity', displayName:'计划数量',columnSize:1},
|
|
|
- // {field:'iquantityIn', displayName:'采购入库数量',columnSize:1},
|
|
|
- // {field:'cinvCode', displayName:'物料编码',columnSize:1},
|
|
|
- // {field:'cinvName', displayName:'货物名称',columnSize:1},
|
|
|
- // {field:'ccolor', displayName:'颜色',columnSize:1},
|
|
|
- // {field:'cquantityLoss', displayName:'损耗',columnSize:1},
|
|
|
- // {field:'iquantityMoreLess', displayName:'多发少发',columnSize:1},
|
|
|
- // ],
|
|
|
- // type:'json',
|
|
|
- // header:'C001',
|
|
|
- //样式设置
|
|
|
- // gridStyle:'border:2px solid #3971A5;text-align: center',
|
|
|
- // gridHeaderStyle:'color:red; border:2px solid #3971A5;'
|
|
|
- // })
|
|
|
this.showSelect = 1
|
|
|
this.$nextTick(() => {
|
|
|
const html = window.document.getElementById('costAllocationTable').innerHTML
|
|
@@ -588,11 +590,16 @@ export default {
|
|
|
var usaMoney = 0,
|
|
|
rmbMoney = 0
|
|
|
val.map(item=>{
|
|
|
- usaMoney += item.amount,
|
|
|
- rmbMoney+=item.rmbAmount
|
|
|
+ if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'){
|
|
|
+ item.amount=Number(item.amount)*(-1)
|
|
|
+ }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'){
|
|
|
+ item.amountrmb = Number(item.amountrmb)*(-1)
|
|
|
+ }
|
|
|
+ usaMoney += Number(item.amount),
|
|
|
+ rmbMoney+=Number(item.amountrmb)
|
|
|
})
|
|
|
- this.detailsPlanNum.accidentUsdamount = usaMoney
|
|
|
- this.detailsPlanNum.accidentcnyAmount = usaMoney
|
|
|
+ this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
|
|
|
+ this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
|
|
|
},
|
|
|
|
|
|
// 页面 保存
|
|
@@ -614,6 +621,7 @@ export default {
|
|
|
// console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
|
|
|
// var planNum = this.detailsPlanNum.planNum,
|
|
|
var json = this.detailsPlanNum
|
|
|
+ json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
|
|
|
addHalfInfo(json).then(res => {
|
|
|
if (res.success) {
|
|
|
console.log('保存的部分信息', halfInfo)
|