|
|
|
@ -137,11 +137,20 @@
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center"/>
|
|
|
|
|
<el-table-column prop="vehicleId" label="车号" align="center" width="130">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- <popupSelect v-model="scope.row.vehicleId"-->
|
|
|
|
|
<!-- placeholder="请选择" clearable :field="'vehicleId'+scope.$index"-->
|
|
|
|
|
<!-- interfaceId="391151974030035653" 398732963950472005-->
|
|
|
|
|
<!-- :bissId="dataForm.contractId"-->
|
|
|
|
|
<!-- :columnOptions="salesorder_item0vehicleIdcolumnOptions" propsValue="vehicle_id"-->
|
|
|
|
|
<!-- relationField="ticketno"-->
|
|
|
|
|
<!-- popupType="dialog" :excludeFields="excludeFields"-->
|
|
|
|
|
<!-- popupWidth="800px" @change="poundInfoSelect" disabled>-->
|
|
|
|
|
<!-- </popupSelect>-->
|
|
|
|
|
<popupSelect v-model="scope.row.vehicleId"
|
|
|
|
|
placeholder="请选择" clearable :field="'vehicleId'+scope.$index"
|
|
|
|
|
interfaceId="391151974030035653"
|
|
|
|
|
interfaceId="398732963950472005"
|
|
|
|
|
:bissId="dataForm.contractId"
|
|
|
|
|
:columnOptions="salesorder_item0vehicleIdcolumnOptions" propsValue="vehicle_id"
|
|
|
|
|
:columnOptions="salesorder_item0vehicleIdcolumnOptions" propsValue="id"
|
|
|
|
|
relationField="ticketno"
|
|
|
|
|
popupType="dialog" :excludeFields="excludeFields"
|
|
|
|
|
popupWidth="800px" @change="poundInfoSelect" disabled>
|
|
|
|
@ -655,6 +664,7 @@
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
|
|
|
|
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
|
|
|
|
import jnpf from '@/utils/jnpf'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
@ -785,15 +795,12 @@
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
editUnitPrice(row) {
|
|
|
|
|
debugger
|
|
|
|
|
var advanceAmount = 0;
|
|
|
|
|
var price = 0;
|
|
|
|
|
var notPrice = 0;
|
|
|
|
|
this.dataForm.salesorder_item0List.forEach((item, index) => {
|
|
|
|
|
if (row.vehicleId == item.vehicleId) {
|
|
|
|
|
debugger
|
|
|
|
|
if (item.remark == null || item.remark === "") {
|
|
|
|
|
debugger
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '请在备注说明修改单价原因',
|
|
|
|
@ -801,10 +808,11 @@
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
item.price = parseFloat(item.settlement) * parseFloat(item.unitPrice);//子表金额
|
|
|
|
|
item.price = this.jnpf.floatMul(item.unitPrice,item.settlement);//子表金额
|
|
|
|
|
debugger
|
|
|
|
|
this.taxRateOptions.forEach((item2) => {
|
|
|
|
|
if (item2.id == row.rate) {
|
|
|
|
|
item.noPrice = item.price * (100 - item2.fullName) / 100;//子表不含税金额
|
|
|
|
|
item.noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(item.price,(this.jnpf.floatSub(100,item2.fullName))), 100);//子表不含税金额
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// let params = {}
|
|
|
|
@ -823,24 +831,23 @@
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
if (item.advance == '1') {//垫资
|
|
|
|
|
advanceAmount = advanceAmount + parseFloat(item.price);//垫资金额
|
|
|
|
|
advanceAmount = this.jnpf.floatAdd(advanceAmount,item.price);//垫资金额
|
|
|
|
|
}
|
|
|
|
|
price = price + parseFloat(item.price);//主表金额
|
|
|
|
|
notPrice = notPrice + parseFloat(item.noPrice);//主表不含税金额
|
|
|
|
|
price = this.jnpf.floatAdd(price,item.price);//主表金额
|
|
|
|
|
notPrice = this.jnpf.floatAdd(notPrice,item.noPrice);//主表不含税金额
|
|
|
|
|
});
|
|
|
|
|
this.dataForm.advanceAmount = advanceAmount;
|
|
|
|
|
this.dataForm.price = price;
|
|
|
|
|
this.dataForm.notPrice = notPrice;
|
|
|
|
|
this.dataForm.rate = price - notPrice;
|
|
|
|
|
debugger
|
|
|
|
|
this.dataForm.rate = this.jnpf.floatSub(price,notPrice);
|
|
|
|
|
},
|
|
|
|
|
computeNoPrice() {
|
|
|
|
|
let notPrice = 0;
|
|
|
|
|
for (let i = 0; i < this.dataForm.salesorder_item0List.length; i++) {
|
|
|
|
|
this.rateOptions.find((item) => {
|
|
|
|
|
if (this.dataForm.salesorder_item0List[i].rate == item.id) {
|
|
|
|
|
this.dataForm.salesorder_item0List[i].noPrice = this.dataForm.salesorder_item0List[i].price * (100 - item.fullName) / 100
|
|
|
|
|
notPrice = notPrice + this.dataForm.salesorder_item0List[i].noPrice
|
|
|
|
|
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.salesorder_item0List[i].price,(this.jnpf.floatSub(100, item.fullName))),100)
|
|
|
|
|
notPrice =this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.dataForm.notPrice = notPrice;
|
|
|
|
@ -859,7 +866,7 @@
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
|
return prev + curr;
|
|
|
|
|
return this.jnpf.floatAdd(prev, curr);
|
|
|
|
|
} else {
|
|
|
|
|
return prev;
|
|
|
|
|
}
|
|
|
|
@ -879,6 +886,7 @@
|
|
|
|
|
excludeFields.push(this.dataForm.salesorder_item0List[i].vehicleId)
|
|
|
|
|
debugger
|
|
|
|
|
if (a == this.dataForm.salesorder_item0List[i].vehicleId) {
|
|
|
|
|
debugger
|
|
|
|
|
this.dataForm.salesorder_item0List[i].poundlistId = b.id
|
|
|
|
|
this.dataForm.salesorder_item0List[i].materialId = b.material_id
|
|
|
|
|
this.dataForm.salesorder_item0List[i].settlement = b.settlement
|
|
|
|
@ -890,10 +898,10 @@
|
|
|
|
|
this.dataForm.salesorder_item0List[i].vehiclePictures = b.vehicle_pictures
|
|
|
|
|
this.dataForm.salesorder_item0List[i].poundType = b.pound_type
|
|
|
|
|
this.dataForm.salesorder_item0List[i].unitPrice = b.sales_price
|
|
|
|
|
this.dataForm.salesorder_item0List[i].price = b.sales_price * b.settlement
|
|
|
|
|
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(b.sales_price, b.settlement)
|
|
|
|
|
}
|
|
|
|
|
if (this.dataForm.salesorder_item0List[i].advance == 1) {
|
|
|
|
|
advanceAmountSum = advanceAmountSum + this.dataForm.salesorder_item0List[i].price
|
|
|
|
|
advanceAmountSum = this.jnpf.floatAdd(advanceAmountSum, this.dataForm.salesorder_item0List[i].price)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.advanceAmount = advanceAmountSum
|
|
|
|
@ -1056,6 +1064,7 @@
|
|
|
|
|
},
|
|
|
|
|
delsalesorder_item0List(index) {
|
|
|
|
|
this.dataForm.salesorder_item0List.splice(index, 1);
|
|
|
|
|
this.computeNoPrice();
|
|
|
|
|
},
|
|
|
|
|
addreceiptoutsoitemList() {
|
|
|
|
|
let item = {
|
|
|
|
|