|
@@ -1598,18 +1598,26 @@ export default {
|
|
}
|
|
}
|
|
// 计算毛利额
|
|
// 计算毛利额
|
|
this.$set(this.form, 'grossProfit', 0)
|
|
this.$set(this.form, 'grossProfit', 0)
|
|
|
|
+ this.$set(this.form, 'orderAmount', 0)
|
|
this.contactsData.forEach(item => {
|
|
this.contactsData.forEach(item => {
|
|
this.form.grossProfit += Number(item.amount)
|
|
this.form.grossProfit += Number(item.amount)
|
|
|
|
+ this.form.orderAmount += Number(item.amount)
|
|
})
|
|
})
|
|
|
|
+ if (this.form.orderAmount && this.form.overPayment) {
|
|
|
|
+ this.form.debitAmount = Number(this.form.orderAmount) - Number(this.form.overPayment)
|
|
|
|
+ }
|
|
|
|
+ if (this.form.orderAmount && this.form.settlmentAmount) {
|
|
|
|
+ this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
|
|
|
|
+ }
|
|
// 计算毛利率
|
|
// 计算毛利率
|
|
// if (this.form.orderAmount) {
|
|
// if (this.form.orderAmount) {
|
|
// this.form.grossProfitRate = ((Number(this.form.grossProfit) / Number(this.form.orderAmount)) * 100).toFixed(2)
|
|
// this.form.grossProfitRate = ((Number(this.form.grossProfit) / Number(this.form.orderAmount)) * 100).toFixed(2)
|
|
// }
|
|
// }
|
|
// 计算应收账款
|
|
// 计算应收账款
|
|
- this.$set(this.form, 'debitAmount', 0)
|
|
|
|
- this.contactsData.forEach(item => {
|
|
|
|
- this.form.debitAmount += Number(item.amount)
|
|
|
|
- })
|
|
|
|
|
|
+ // this.$set(this.form, 'debitAmount', 0)
|
|
|
|
+ // this.contactsData.forEach(item => {
|
|
|
|
+ // this.form.debitAmount += Number(item.amount)
|
|
|
|
+ // })
|
|
//商品信息
|
|
//商品信息
|
|
this.form.orderItemsList = this.contactsData
|
|
this.form.orderItemsList = this.contactsData
|
|
this.form.orderFeesList = this.advantageProjectData
|
|
this.form.orderFeesList = this.advantageProjectData
|
|
@@ -1636,17 +1644,17 @@ export default {
|
|
},
|
|
},
|
|
// 计算应收未收款
|
|
// 计算应收未收款
|
|
computedCost() {
|
|
computedCost() {
|
|
- // 应收预付款
|
|
|
|
- let advancePayment = 0;
|
|
|
|
|
|
+ // 销售金额
|
|
|
|
+ let orderAmount = 0;
|
|
// 已收款
|
|
// 已收款
|
|
let settlmentAmount = 0;
|
|
let settlmentAmount = 0;
|
|
- if (this.form.advancePayment) {
|
|
|
|
- advancePayment = this.form.advancePayment
|
|
|
|
|
|
+ if (this.form.orderAmount) {
|
|
|
|
+ orderAmount = this.form.orderAmount
|
|
}
|
|
}
|
|
if (this.form.settlmentAmount) {
|
|
if (this.form.settlmentAmount) {
|
|
settlmentAmount = this.form.settlmentAmount
|
|
settlmentAmount = this.form.settlmentAmount
|
|
}
|
|
}
|
|
- this.$set(this.form, "accountsReceivable", Number(advancePayment) - Number(settlmentAmount)).toFixed(2);
|
|
|
|
|
|
+ this.$set(this.form, "balanceAmount", (Number(orderAmount) - Number(settlmentAmount)).toFixed(2));
|
|
},
|
|
},
|
|
quantityChange(row) {
|
|
quantityChange(row) {
|
|
if (!row.orderQuantity) {
|
|
if (!row.orderQuantity) {
|