|
|
|
@ -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(); |
|
|
|
}, |
|
|
|
// ==================================================校验工具类==================================================== |
|
|
|
|