diff --git a/src/views/xm/core/xmProject/XmProjectEdit.vue b/src/views/xm/core/xmProject/XmProjectEdit.vue
index 54bd77c2..6a39a09b 100644
--- a/src/views/xm/core/xmProject/XmProjectEdit.vue
+++ b/src/views/xm/core/xmProject/XmProjectEdit.vue
@@ -121,37 +121,38 @@
:picker-options="pickerOptions"
>
小时 参考工时{{autoParams.weekday*8}}小时,工作日{{autoParams.weekday}}天
-
+
+ 工期变化自动更新预估成本/合同金额/预估工时等关联数据
- 人员类型
+ 类型
人数
- 工作量
- 单价
+ 工作量
+ 单价
总价
- 内购
-
+ 内购
+
- {{autoParams.planIuserWorkload}}人时
-
+ {{autoParams.planIuserWorkload}}人时
+
{{this.toFixed(autoParams.planIuserAt)}}元,{{this.toFixed(autoParams.planIuserAt/10000)}} 万元
- 外购
-
+ 外购
+
- {{autoParams.planOuserWorkload}}人时
-
- {{autoParams.planOuserAt }} 元 {{autoParams.planOuserAt/10000 }}万元
+ {{autoParams.planOuserWorkload}}人时
+
+ {{autoParams.planOuserAt }} 元 {{autoParams.planOuserAt/10000 }}万元
@@ -173,7 +174,7 @@
合计: {{this.toFixed(autoParams.planTotalCost/10000)}}万元
-
+
@@ -194,7 +195,7 @@
提交
-
+
基本信息修改申请
延期申请
立项申请
@@ -261,14 +262,14 @@
planNouserAt=0.0
}
if(budgetMarginRate==null || budgetMarginRate==''){
- budgetMarginRate=0.4
+ budgetMarginRate=13
}
if(planWorkingHours==null || planWorkingHours==''){
planWorkingHours=0.0
}
if(taxRate==null || taxRate==''){
- taxRate=0.03
+ taxRate=6
}
var autoParams={
@@ -296,13 +297,13 @@
autoParams.planNouserAt= planNouserAt
autoParams.budgetMarginRate=budgetMarginRate
autoParams.planTotalCost= autoParams.planOuserAt + autoParams.planIuserAt + autoParams.planNouserAt
- autoParams.totalReceivables=autoParams.planTotalCost/(1-budgetMarginRate)/ (1-taxRate)
+ autoParams.totalReceivables=autoParams.planTotalCost/(100-budgetMarginRate)*100/ (100-taxRate)*100
autoParams.contractAmt =autoParams.totalReceivables
var totalReceivables=this.editForm.totalReceivables
if(totalReceivables==null || totalReceivables=='' || isNaN(totalReceivables)){
autoParams.currentBudgetMarginRate=-99
}else{
- autoParams.currentBudgetMarginRate= this.toFixed(1-this.editForm.planTotalCost/(this.editForm.totalReceivables* (1-taxRate)),4)
+ autoParams.currentBudgetMarginRate= this.toFixed(1-this.editForm.planTotalCost/(this.editForm.totalReceivables* (100-taxRate)),4)
}
// 1.毛利率=(销售收入-销售成本)/销售收入×100%=(不含税售价-不含税进价)/不含税售价×100%
@@ -358,10 +359,13 @@
//this.editForm.budgetMarginRate=this.toFixed((this.editForm.totalReceivables-this.editForm.planTotalCost)/this.editForm.totalReceivables,4)
},
autoParams(){
- this.fillPlanWorkingHoursToField()
- this.fillPlanCostAtToField();
- this.fillTotalReceivablesToField();
- this.fillBudgetMarginRateToField()
+ if(this.autoSet){
+ this.fillPlanWorkingHoursToField()
+ this.fillPlanCostAtToField();
+ this.fillTotalReceivablesToField();
+ this.fillBudgetMarginRateToField()
+ }
+
},
editForm:{
@@ -374,27 +378,27 @@
if(this.selProject.planWorkingHours!=this.editForm.planWorkingHours){
var distance=this.selProject.planWorkingHours-this.editForm.planWorkingHours
var operType=distance>0?"-":"+";
- this.changeTips.push("预计总工期: "+ this.selProject.planWorkingHours+" > " +this.editForm.planWorkingHours+" "+operType+Math.abs(distance).toFixed(2)+"小时");
+ this.changeTips.push("预计总工期: "+ this.selProject.planWorkingHours+" ==> " +this.editForm.planWorkingHours+" "+operType+Math.abs(distance).toFixed(2)+"小时");
}
if(this.selProject.planTotalCost!=this.editForm.planTotalCost){
var distance=this.selProject.planTotalCost-this.editForm.planTotalCost
var operType=distance>0?"-":"+";
- this.changeTips.push("预计总成本: "+ this.selProject.planTotalCost+" > " +this.editForm.planTotalCost+" "+operType+Math.abs(distance).toFixed(2)+"元");
+ this.changeTips.push("预计总成本: "+ this.selProject.planTotalCost+" ==> " +this.editForm.planTotalCost+" "+operType+Math.abs(distance).toFixed(2)+"元");
}
if(this.selProject.budgetMarginRate!=this.editForm.budgetMarginRate){
var distance=this.selProject.budgetMarginRate-this.editForm.budgetMarginRate
var operType=distance>0?"-":"+";
- this.changeTips.push("毛利率: "+ this.selProject.budgetMarginRate+" > " +this.editForm.budgetMarginRate+" "+operType+Math.abs(distance).toFixed(2)+"%");
+ this.changeTips.push("毛利率: "+ this.selProject.budgetMarginRate+" ==> " +this.editForm.budgetMarginRate+" "+operType+Math.abs(distance).toFixed(2)+"%");
}
if(this.selProject.totalReceivables!=this.editForm.totalReceivables){
var distance=this.selProject.totalReceivables-this.editForm.totalReceivables
var operType=distance>0?"-":"+";
- this.changeTips.push("预计总收款: "+ this.selProject.totalReceivables+" > " +this.editForm.totalReceivables+" "+operType+Math.abs(distance).toFixed(2)+"元");
+ this.changeTips.push("预计总收款: "+ this.selProject.totalReceivables+" ==> " +this.editForm.totalReceivables+" "+operType+Math.abs(distance).toFixed(2)+"元");
}
if(this.selProject.contractAmt!=this.editForm.contractAmt){
var distance=this.selProject.contractAmt-this.editForm.contractAmt
var operType=distance>0?"-":"+";
- this.changeTips.push("合同金额: "+ this.selProject.contractAmt+" > " +this.editForm.contractAmt+" "+operType+Math.abs(distance).toFixed(2)+"元");
+ this.changeTips.push("合同金额: "+ this.selProject.contractAmt+" ==> " +this.editForm.contractAmt+" "+operType+Math.abs(distance).toFixed(2)+"元");
}
if(this.changeTips.length==0){
@@ -461,6 +465,7 @@
changeTips:[],//变化日志列表
maxTableHeight:300,
currUserType:'',
+ autoSet:false,
/**end 在上面加自定义属性**/
}//end return
},//end data
@@ -810,8 +815,10 @@
this.editForm.budgetCtrl=this.editForm.budgetCtrl||"0";
this.editForm.taxRate=this.editForm.taxRate||6
this.editForm.budgetMarginRate=this.editForm.budgetMarginRate||13
+ this.autoSet=true;
}else{
this.dateRanger=[this.editForm.startTime,this.editForm.endTime]
+ this.autoSet=false;
}
}
/**end 在上面加自定义方法**/