Browse Source

2024-1-3 plm报价工艺

master
zelian_wu 2 years ago
parent
commit
6e3a6af9f7
  1. 64
      src/views/modules/quotation/sellForQuotation/quotationDetail.vue

64
src/views/modules/quotation/sellForQuotation/quotationDetail.vue

@ -314,7 +314,8 @@
<el-table-column label="单位产出量" header-align="center" align="right" width="120" prop="unitOutputQuantity" show-overflow-tooltip/>
<el-table-column label="产出单位" header-align="center" align="left" width="120" prop="outputUnit" show-overflow-tooltip/>
<el-table-column label="效率%" header-align="center" align="right" width="120" prop="routingEfficiency" show-overflow-tooltip/>
<el-table-column label="操作工人数" header-align="center" align="right" width="120" prop="operatorsNumber" show-overflow-tooltip/>
<el-table-column label="调机员工人数" header-align="center" align="right" width="120" prop="tuneInNumber" show-overflow-tooltip/>
<el-table-column label="操作员工人数" header-align="center" align="right" width="120" prop="operatorsNumber" show-overflow-tooltip/>
<el-table-column label="单位机器成本" header-align="center" align="right" width="120" prop="unitMachineryCost" show-overflow-tooltip/>
<el-table-column label="单位人工成本" header-align="center" align="right" width="120" prop="unitLaborCost" show-overflow-tooltip/>
<el-table-column label="单位制造费用" header-align="center" align="right" width="120" prop="unitManufacturingCost" show-overflow-tooltip/>
@ -778,7 +779,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="调机人员等级" prop="tuneInLevel">
<el-select v-model="quotationRouting.tuneInLevel" style="width: 100%" filterable placeholder="请选择">
<el-select v-model="quotationRouting.tuneInLevel" @change="changeRoutingCost" style="width: 100%" filterable placeholder="请选择">
<el-option
v-for="item in personnelLevelList"
:key="item.levelId"
@ -831,7 +832,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="操作人员等级" prop="operatorsLevel">
<el-select v-model="quotationRouting.operatorsLevel" style="width: 100%" filterable placeholder="请选择">
<el-select v-model="quotationRouting.operatorsLevel" @change="changeRoutingCost" style="width: 100%" filterable placeholder="请选择">
<el-option
v-for="item in personnelLevelList"
:key="item.levelId"
@ -1131,7 +1132,8 @@
<el-table-column label="单位产出量" width="120" prop="unitOutputQuantity" show-overflow-tooltip/>
<el-table-column label="产出单位" width="120" prop="outputUnit" show-overflow-tooltip/>
<el-table-column label="效率%" width="120" prop="routingEfficiency" show-overflow-tooltip/>
<el-table-column label="操作工人数" width="120" prop="operatorsNumber" show-overflow-tooltip/>
<el-table-column label="调机员工人数" width="120" prop="tuneInNumber" show-overflow-tooltip/>
<el-table-column label="操作员工人数" width="120" prop="operatorsNumber" show-overflow-tooltip/>
<el-table-column label="单位机器成本" width="120" prop="unitMachineryCost" show-overflow-tooltip/>
<el-table-column label="单位人工成本" width="120" prop="unitLaborCost" show-overflow-tooltip/>
<el-table-column label="单位制造费用" width="120" prop="unitManufacturingCost" show-overflow-tooltip/>
@ -3569,10 +3571,6 @@ export default {
//
computeUnitMachine(){
let unitMachineryCost = this.quotationRouting.machineryCenterCost;
if (!unitMachineryCost){
this.quotationRouting.unitMachineryCost = 0;
return
}
let total = new Decimal(0);
// *
if (!this.quotationRouting.machiningSetupTime || this.quotationRouting.machiningSetupTime < 0){
@ -3601,10 +3599,6 @@ export default {
//
computeManufacturingCenterCost(){
let manufacturingCenterCost = this.quotationRouting.manufacturingCenterCost;
if (!manufacturingCenterCost){
this.quotationRouting.manufacturingCenterCost = 0;
return
}
let total = new Decimal(0);
// *
if (!this.quotationRouting.machiningSetupTime || this.quotationRouting.machiningSetupTime < 0){
@ -3631,14 +3625,8 @@ export default {
this.quotationRouting.unitManufacturingCost = new Decimal(total.toFixed(16,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber();
},
computeLaborCenterCost(){
let laborCenterCost = this.quotationRouting.laborCenterCost;
if (!laborCenterCost){
this.quotationRouting.laborCenterCost = 0;
return
}
if (!this.quotationRouting.machiningSetupTime || this.quotationRouting.machiningSetupTime < 0){
this.quotationRouting.machiningSetupTime = 0;
}
let operatorsCost = this.personnelLevelList.find(item=>item.levelId == this.quotationRouting.operatorsLevel).levelCost;
let tuneInCost = this.personnelLevelList.find(item=>item.levelId == this.quotationRouting.tuneInLevel).levelCost;
// /
let total = new Decimal(this.quotationRouting.machiningSetupTime).div(new Decimal(this.quotationDetailData.quotationDetailQuantity));
//
@ -3655,24 +3643,38 @@ export default {
LaborUnitTime = LaborUnitTime.add(new Decimal(0));
}
//
total = total.add(LaborUnitTime.mul(new Decimal(this.quotationRouting.operatorsNumber)).mul(efficiency)).mul(new Decimal(laborCenterCost));
total = total.add(LaborUnitTime.mul(new Decimal(this.quotationRouting.operatorsNumber)).mul(efficiency)).mul(new Decimal(operatorsCost));
total = total.add(new Decimal(this.quotationRouting.tuneInNumber).mul(new Decimal(tuneInCost)).mul(new Decimal(this.quotationRouting.machiningSetupTime)))
this.quotationRouting.unitLaborCost = new Decimal(total.toFixed(16,Decimal.ROUND_HALF_UP)).toSignificantDigits().toNumber();
},
//
changeRoutingCost(){
this.quotationRouting.unitQuotedCost = new Decimal(0);
if (this.quotationRouting.machineryCenterCost && this.quotationRouting.machineryCenterCost > 0){
this.computeUnitMachine();//
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitMachineryCost));
}
if (this.quotationRouting.laborCenterCost && this.quotationRouting.laborCenterCost > 0){
this.computeLaborCenterCost();
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitLaborCost));
//
if (!this.quotationRouting.machineryCenterCost || this.quotationRouting.machineryCenterCost < 0){
this.quotationRouting.machineryCenterCost = 0;
}
if (this.quotationRouting.manufacturingCenterCost && this.quotationRouting.manufacturingCenterCost > 0){
this.computeManufacturingCenterCost();//
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitManufacturingCost));
//
if (!this.quotationRouting.manufacturingCenterCost || this.quotationRouting.manufacturingCenterCost < 0){
this.quotationRouting.manufacturingCenterCost = 0;
}
//
if (!this.quotationRouting.tuneInNumber || this.quotationRouting.tuneInNumber < 0){
this.quotationRouting.tuneInNumber = 0;
}
//
if (!this.quotationRouting.operatorsNumber || this.quotationRouting.operatorsNumber < 0){
this.quotationRouting.operatorsNumber = 0;
}
//
this.computeUnitMachine();
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitMachineryCost));
//
this.computeLaborCenterCost();
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitLaborCost));
//
this.computeManufacturingCenterCost();
this.quotationRouting.unitQuotedCost = this.quotationRouting.unitQuotedCost.add(new Decimal(this.quotationRouting.unitManufacturingCost));
this.quotationRouting.unitQuotedCost = new Decimal(this.quotationRouting.unitQuotedCost).toSignificantDigits().toNumber();
},
// ======================================================================================================

Loading…
Cancel
Save