This commit is contained in:
DL
2024-01-26 19:18:21 +08:00
parent a1d7a55976
commit 4f4297b628

View File

@@ -234,7 +234,7 @@
</el-table-column>
<el-table-column prop="type" label="计价类型">
<template slot-scope="scope">
{{ scope.row.type == 1 ? '金额计价' : '工时计价' }}
{{ scope.row.type == 1 ? '金额计价' : scope.row.type == 2 ? '工时计价' : '快速开单' }}
</template>
</el-table-column>
<el-table-column prop="workingHour" label="工时数量"> </el-table-column>
@@ -927,21 +927,38 @@ export default {
// this.createAndBilltwoVisible = false;
if (this.createAndBillFormTwo.isPackage == 0 && this.createAndBillFormTwo.type == 1) {
this.projectList.push(this.createAndBillFormTwo);
console.log(this.projectList, '自定义金额');
} else if (this.createAndBillFormTwo.isPackage == 0 && this.createAndBillFormTwo.type == 2) {
this.createAndBillFormTwo_two.isPackage = this.createAndBillFormTwo.isPackage;
this.createAndBillFormTwo_two.type = this.createAndBillFormTwo.type;
// 显示的是材料的总额
this.createAndBillFormTwo_two.price = this.createAndBillFormTwo_two.accessoryList[0].price;
// this.createAndBillFormTwo_two.price = this.createAndBillFormTwo_two.accessoryList.reduce((sum, ele) => {
// return sum + ele.price;
// }, 0);
// 总价
this.createAndBillFormTwo_two.workingTotalPrice = (
this.createAndBillFormTwo_two.workingPrice * this.createAndBillFormTwo_two.workingHour
).toFixed(2);
this.projectList.push(this.createAndBillFormTwo_two);
console.log(this.projectList, '自定义工时');
} else if (this.createAndBillFormTwo.isPackage == 1) {
this.createAndBillFormTwo_two.isPackage = this.createAndBillFormTwo.isPackage;
this.createAndBillFormTwo_two.workingTotalPrice = (
this.createAndBillFormTwo_two.workingPrice * this.createAndBillFormTwo_two.workingHour
).toFixed(2);
this.createAndBillFormTwo_two.packageItemRequestList.push(this.taocanData);
this.createAndBillFormTwo_two.name = this.taocanData.itemName;
this.createAndBillFormTwo_two.price = this.taocanData.accessoryList[0].price;
// this.createAndBillFormTwo_two.price = this.taocanData.accessoryList.reduce((sum, ele) => {
// return sum + ele.price;
// }, 0);
this.createAndBillFormTwo_two.workingHour = this.taocanData.workingHour;
this.createAndBillFormTwo_two.workingTotalPrice = (
this.taocanData.workingHour * this.taocanData.workingPrice
).toFixed(2);
this.projectList.push(this.createAndBillFormTwo_two);
console.log(this.projectList, '1111111111111111');
console.log(this.projectList, '套餐');
}
this.removeBtnTwo();
},