|
|
@ -1,22 +1,14 @@ |
|
|
<template> |
|
|
<template> |
|
|
<section> |
|
|
|
|
|
<el-row class="app-container"> |
|
|
|
|
|
|
|
|
<section class="page-container page-full-height border"> |
|
|
|
|
|
<el-row class="page-main page-main-height"> |
|
|
<!--新增界面 XmProjectPhase xm_project_phase--> |
|
|
<!--新增界面 XmProjectPhase xm_project_phase--> |
|
|
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm"> |
|
|
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm"> |
|
|
<el-form-item v-if="parentProjectPhase" label="上级" prop="phaseName"> |
|
|
|
|
|
{{parentProjectPhase.seqNo}} {{parentProjectPhase.phaseName}} |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item v-else label="上级" prop="phaseName"> |
|
|
|
|
|
无上级 |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-row class="border padding"> |
|
|
<el-form-item label="阶段名称" prop="phaseName"> |
|
|
<el-form-item label="阶段名称" prop="phaseName"> |
|
|
<el-input v-model="addForm.phaseName" placeholder="阶段名称" ></el-input> |
|
|
<el-input v-model="addForm.phaseName" placeholder="阶段名称" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="序号" prop="seqNo"> |
|
|
<el-form-item label="序号" prop="seqNo"> |
|
|
<el-input v-model="addForm.seqNo" placeholder="排序序号,值越小越靠前,如1.0,2.0等"></el-input> <span v-if="parentProjectPhase" style="color:red;">建议:{{parentProjectPhase.seqNo}}.1</span> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
|
|
<el-input v-model="addForm.remark" placeholder="备注" ></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="addForm.seqNo" placeholder="排序序号,值越小越靠前,如1.0,2.0等"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="计划类型" prop="planType"> |
|
|
<el-form-item label="计划类型" prop="planType"> |
|
|
<el-select v-model="addForm.planType"> |
|
|
<el-select v-model="addForm.planType"> |
|
|
@ -28,13 +20,21 @@ |
|
|
<el-option v-for="i in this.options.taskType" :label="i.optionName" :key="i.optionValue" :value="i.optionValue"></el-option> |
|
|
<el-option v-for="i in this.options.taskType" :label="i.optionName" :key="i.optionValue" :value="i.optionValue"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="计划成本预估" > |
|
|
|
|
|
<el-tabs v-model="activeName"> |
|
|
|
|
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
|
|
<el-input type="textarea" rows="4" v-model="addForm.remark" placeholder="备注" ></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-tabs v-model="activeName" class="border padding"> |
|
|
<el-tab-pane label="工作量及人力成本" name="phaseBudgetWorkload"> |
|
|
<el-tab-pane label="工作量及人力成本" name="phaseBudgetWorkload"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-date-picker |
|
|
|
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
|
|
|
<el-row class="padding">工作量计算方式:<font style="color:red">总工时 = 工作日天数 * 每日工时数 * 人数 </font> </el-row> |
|
|
|
|
|
<el-row class="padding">金额计算方式: <font style="color:red">总金额 = 总工时 * 工时单价 </font></el-row> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
|
|
|
预计时间:<el-date-picker |
|
|
v-model="dateRanger" |
|
|
v-model="dateRanger" |
|
|
class="hidden-sm-and-down" |
|
|
|
|
|
type="daterange" |
|
|
type="daterange" |
|
|
align="right" |
|
|
align="right" |
|
|
unlink-panels |
|
|
unlink-panels |
|
|
@ -45,69 +45,56 @@ |
|
|
:default-time="['00:00:00','23:59:59']" |
|
|
:default-time="['00:00:00','23:59:59']" |
|
|
:picker-options="pickerOptions" |
|
|
:picker-options="pickerOptions" |
|
|
></el-date-picker> |
|
|
></el-date-picker> |
|
|
<el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetHours" :precision="2" :step="8" :min="0" placeholder="预计工时"></el-input><el-tag>参考工时{{autoParams.phaseBudgetHours}}小时,工作日{{autoParams.weekday}}天</el-tag> <el-button @click.native="fillphaseBudgetHoursToField" type="success">填充工时</el-button> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
预估工期:<el-input style="width:100px;" type="number" v-model="addForm.phaseBudgetHours" :precision="2" :step="8" :min="0" placeholder="预计工时"></el-input>小时 |
|
|
|
|
|
<div class="tips"><font>工时{{autoParams.phaseBudgetHours}}小时,工作日{{autoParams.weekday}}天</font></div> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-divider></el-divider> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
<el-col :span="4">人员类型</el-col> |
|
|
<el-col :span="4">人员类型</el-col> |
|
|
<el-col :span="4">人数</el-col> |
|
|
<el-col :span="4">人数</el-col> |
|
|
<el-col :span="4">工作量</el-col> |
|
|
|
|
|
<el-col :span="4">单价</el-col> |
|
|
|
|
|
<el-col :span="8">总价</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="4">工作量(人时)</el-col> |
|
|
|
|
|
<el-col :span="4">单价(元/人时)</el-col> |
|
|
|
|
|
<el-col :span="8">总价(元)</el-col> |
|
|
|
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-divider></el-divider> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
<el-col :span="4">内购</el-col> |
|
|
<el-col :span="4">内购</el-col> |
|
|
<el-col :span="4"><el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetInnerUserCnt" :precision="0" :step="1" :min="0" placeholder="内购人数"></el-input> |
|
|
|
|
|
|
|
|
<el-col :span="4"><el-input style="width:100px;" type="number" v-model="addForm.phaseBudgetInnerUserCnt" :precision="0" :step="1" :min="0" placeholder="内购人数"></el-input> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetInnerUserWorkload}}人时</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetInnerUserWorkload}}人时</el-col> |
|
|
<el-col :span="4"><el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetInnerUserPrice" :precision="0" :step="1" :min="0" placeholder="预计内部人时单价"></el-input> </el-col> |
|
|
|
|
|
|
|
|
<el-col :span="4"><el-input style="width:100px;" type="number" v-model="addForm.phaseBudgetInnerUserPrice" :precision="0" :step="1" :min="0" placeholder="预计内部人时单价"></el-input> </el-col> |
|
|
<el-col :span="8">{{this.toFixed(autoParams.phaseBudgetInnerUserAt)}}元,{{this.toFixed(autoParams.phaseBudgetInnerUserAt/10000)}} 万元</el-col> |
|
|
<el-col :span="8">{{this.toFixed(autoParams.phaseBudgetInnerUserAt)}}元,{{this.toFixed(autoParams.phaseBudgetInnerUserAt/10000)}} 万元</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-divider></el-divider> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
<el-col :span="4">外购</el-col> |
|
|
<el-col :span="4">外购</el-col> |
|
|
<el-col :span="4"><el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetOutUserCnt" :precision="0" :step="1" :min="0" placeholder="外购人数"></el-input> |
|
|
|
|
|
|
|
|
<el-col :span="4"><el-input style="width:100px;" type="number" v-model="addForm.phaseBudgetOutUserCnt" :precision="0" :step="1" :min="0" placeholder="外购人数"></el-input> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserWorkload}}人时</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserWorkload}}人时</el-col> |
|
|
<el-col :span="4"><el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetOutUserPrice" :precision="0" :step="1" :min="0" placeholder="预计外购人时单价"></el-input> </el-col> |
|
|
|
|
|
|
|
|
<el-col :span="4"><el-input style="width:100px;" type="number" v-model="addForm.phaseBudgetOutUserPrice" :precision="0" :step="1" :min="0" placeholder="预计外购人时单价"></el-input> </el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserAt }} 元 {{autoParams.phaseBudgetOutUserAt/10000 }}万元</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserAt }} 元 {{autoParams.phaseBudgetOutUserAt/10000 }}万元</el-col> |
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-divider></el-divider> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
|
|
|
</el-row > |
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
<el-col :span="4">合计</el-col> |
|
|
<el-col :span="4">合计</el-col> |
|
|
<el-col :span="4"> {{autoParams.phaseBudgetOutUserCnt+autoParams.phaseBudgetInnerUserCnt}} |
|
|
<el-col :span="4"> {{autoParams.phaseBudgetOutUserCnt+autoParams.phaseBudgetInnerUserCnt}} |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserWorkload+autoParams.phaseBudgetInnerUserWorkload }}人时,{{ (autoParams.phaseBudgetOutUserWorkload+autoParams.phaseBudgetInnerUserWorkload)/8/20 }}人月 </el-col> |
|
|
<el-col :span="4">{{autoParams.phaseBudgetOutUserWorkload+autoParams.phaseBudgetInnerUserWorkload }}人时,{{ (autoParams.phaseBudgetOutUserWorkload+autoParams.phaseBudgetInnerUserWorkload)/8/20 }}人月 </el-col> |
|
|
<el-col :span="4">平均:{{ (parseFloat2(autoParams.phaseBudgetOutUserPrice) + parseFloat2(autoParams.phaseBudgetInnerUserPrice))/2}}元/人时</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="4">{{ (parseFloat2(autoParams.phaseBudgetOutUserPrice) + parseFloat2(autoParams.phaseBudgetInnerUserPrice))/2}}元/人时</el-col> |
|
|
<el-col :span="8">{{autoParams.phaseBudgetTotalCost}} 元,{{(autoParams.phaseBudgetTotalCost)/10000}} 万元</el-col> |
|
|
<el-col :span="8">{{autoParams.phaseBudgetTotalCost}} 元,{{(autoParams.phaseBudgetTotalCost)/10000}} 万元</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
<el-row class="padding-20 border"> |
|
|
|
|
|
总计: {{parseFloat2(addForm.phaseBudgetInnerUserAt)+parseFloat2(addForm.phaseBudgetOutUserAt)+parseFloat2(addForm.phaseBudgetNouserAt)}}元 <el-tag>{{this.toFixed(autoParams.phaseBudgetTotalCost/10000)}}万元</el-tag> |
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
|
内购: <el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetInnerUserAt" :precision="2" :step="1000" :min="0" placeholder="内部人力成本总预算"></el-input> <el-tag>参考{{this.toFixed(autoParams.phaseBudgetInnerUserAt)}}元,{{this.toFixed(autoParams.phaseBudgetInnerUserAt/10000)}}万元</el-tag> |
|
|
|
|
|
外购: <el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetOutUserAt" :precision="2" :step="1000" :min="0" placeholder="外购人力成本总预算"></el-input> <el-tag>参考{{this.toFixed(autoParams.phaseBudgetOutUserAt)}}元,{{this.toFixed(autoParams.phaseBudgetOutUserAt/10000)}}万元</el-tag> |
|
|
|
|
|
非人力:<el-input style="width:150px;" type="number" v-model="addForm.phaseBudgetNouserAt" :precision="2" :step="1000" :min="0" placeholder="人力成本总预算"></el-input> 元 |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-divider></el-divider> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
总计: {{parseFloat2(addForm.phaseBudgetInnerUserAt)+parseFloat2(addForm.phaseBudgetOutUserAt)+parseFloat2(addForm.phaseBudgetNouserAt)}}元 <el-tag>参考{{this.toFixed(autoParams.phaseBudgetTotalCost)}}元,{{this.toFixed(autoParams.phaseBudgetTotalCost/10000)}}万元</el-tag> |
|
|
|
|
|
<el-button @click.native="fillphaseBudgetCostAtToField" type="success">使用参考值自动填充</el-button> |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane v-if="activeName=='phaseBudgetWorkload'" label="收起" name=""> |
|
|
<el-tab-pane v-if="activeName=='phaseBudgetWorkload'" label="收起" name=""> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-col :span="24" :offset="8"> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row class="page-bottom"> |
|
|
<el-button @click.native="handleCancel">取消</el-button> |
|
|
<el-button @click.native="handleCancel">取消</el-button> |
|
|
<el-button v-loading="load.add" type="primary" @click.native="addSubmit" :disabled="load.add==true">提交</el-button> |
|
|
<el-button v-loading="load.add" type="primary" @click.native="addSubmit" :disabled="load.add==true">提交</el-button> |
|
|
</el-col> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
</section> |
|
|
</section> |
|
|
</template> |
|
|
</template> |
|
|
@ -159,9 +146,7 @@ |
|
|
var weekday=1; |
|
|
var weekday=1; |
|
|
if(this.dateRanger!=null && this.dateRanger.length>=2 ){ |
|
|
if(this.dateRanger!=null && this.dateRanger.length>=2 ){ |
|
|
weekday=this.getWeekday(new Date(this.dateRanger[0]),new Date(this.dateRanger[1])); |
|
|
weekday=this.getWeekday(new Date(this.dateRanger[0]),new Date(this.dateRanger[1])); |
|
|
if(this.addForm.phaseBudgetHours==null || this.addForm.phaseBudgetHours=='' || this.addForm.phaseBudgetHours<=0){ |
|
|
|
|
|
phaseBudgetHours=weekday * 8 |
|
|
phaseBudgetHours=weekday * 8 |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
autoParams.weekday=weekday |
|
|
autoParams.weekday=weekday |
|
|
@ -198,6 +183,10 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
autoParams:function(autoParams){ |
|
|
|
|
|
this.fillphaseBudgetHoursToField() |
|
|
|
|
|
this.fillphaseBudgetCostAtToField() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
const beginDate = new Date(); |
|
|
const beginDate = new Date(); |
|
|
@ -223,7 +212,6 @@ |
|
|
{ required: true, message: '序号不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '序号不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
oldAddForm:{}, |
|
|
|
|
|
//新增界面数据 xm_project_phase |
|
|
//新增界面数据 xm_project_phase |
|
|
addForm: { |
|
|
addForm: { |
|
|
id:'',phaseName:'',remark:'',parentPhaseId:'',branchId:'',taskType:'kf',planType:'m1',projectId:'',beginDate:'',endDate:'',phaseBudgetHours:'',phaseBudgetStaffNu:'',ctime:'',phaseBudgetNouserAt:'',phaseBudgetInnerUserAt:'',phaseBudgetOutUserAt:'',projectBaselineId:'',bizProcInstId:'',bizFlowState:'',phaseBudgetWorkload:'',totalActWorkload:'',totalActNouserAt:'',totalActInerUserAt:'',totalActOutUserAt:'',planType:'',taskType:'',seqNo:'1',phaseBudgetInnerUserCnt:'',phaseBudgetOutUserCnt:'',phaseBudgetInnerUserPrice:80,phaseBudgetOutUserPrice:100,phaseBudgetInnerUserWorkload:0,phaseBudgetOutUserWorkload:0 |
|
|
id:'',phaseName:'',remark:'',parentPhaseId:'',branchId:'',taskType:'kf',planType:'m1',projectId:'',beginDate:'',endDate:'',phaseBudgetHours:'',phaseBudgetStaffNu:'',ctime:'',phaseBudgetNouserAt:'',phaseBudgetInnerUserAt:'',phaseBudgetOutUserAt:'',projectBaselineId:'',bizProcInstId:'',bizFlowState:'',phaseBudgetWorkload:'',totalActWorkload:'',totalActNouserAt:'',totalActInerUserAt:'',totalActOutUserAt:'',planType:'',taskType:'',seqNo:'1',phaseBudgetInnerUserCnt:'',phaseBudgetOutUserCnt:'',phaseBudgetInnerUserPrice:80,phaseBudgetOutUserPrice:100,phaseBudgetInnerUserWorkload:0,phaseBudgetOutUserWorkload:0 |
|
|
@ -235,6 +223,7 @@ |
|
|
/**begin 在下面加自定义属性,记得补上面的一个逗号**/ |
|
|
/**begin 在下面加自定义属性,记得补上面的一个逗号**/ |
|
|
pickerOptions: util.pickerOptions('datarange'), |
|
|
pickerOptions: util.pickerOptions('datarange'), |
|
|
activeName:'', |
|
|
activeName:'', |
|
|
|
|
|
costVisible:false, |
|
|
/**end 在上面加自定义属性**/ |
|
|
/**end 在上面加自定义属性**/ |
|
|
}//end return |
|
|
}//end return |
|
|
},//end data |
|
|
},//end data |
|
|
@ -244,7 +233,7 @@ |
|
|
//this.$refs['addForm'].resetFields(); |
|
|
//this.$refs['addForm'].resetFields(); |
|
|
this.$emit('cancel'); |
|
|
this.$emit('cancel'); |
|
|
}, |
|
|
}, |
|
|
//新增提交XmProjectPhase xm_project_phase 父组件监听@submit="afterAddSubmit" |
|
|
|
|
|
|
|
|
//新增提交XmProjectPhase xm_project_phase 父组件监听@submit="afteraddSubmit" |
|
|
addSubmit: function () { |
|
|
addSubmit: function () { |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
@ -312,7 +301,7 @@ |
|
|
var tips=res.data.tips; |
|
|
var tips=res.data.tips; |
|
|
if(tips.isOk){ |
|
|
if(tips.isOk){ |
|
|
//this.$refs['addForm'].resetFields(); |
|
|
//this.$refs['addForm'].resetFields(); |
|
|
this.$emit('submit');// @submit="afterAddSubmit" |
|
|
|
|
|
|
|
|
this.$emit('submit');// @submit="afteraddSubmit" |
|
|
} |
|
|
} |
|
|
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); |
|
|
this.$message({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); |
|
|
}).catch( err => this.load.add=false); |
|
|
}).catch( err => this.load.add=false); |
|
|
@ -371,7 +360,7 @@ |
|
|
|
|
|
|
|
|
},//end method |
|
|
},//end method |
|
|
components: { |
|
|
components: { |
|
|
//在下面添加其它组件 'xm-project-phase-edit':XmProjectPhaseEdit |
|
|
|
|
|
|
|
|
//在下面添加其它组件 'xm-project-phase-add':XmProjectPhaseEdit |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.addForm=Object.assign(this.addForm, this.xmProjectPhase); |
|
|
this.addForm=Object.assign(this.addForm, this.xmProjectPhase); |
|
|
@ -394,5 +383,10 @@ |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|
|
|
|
|
|
|
|
|
.padding-20{ |
|
|
|
|
|
padding-left: 10px; |
|
|
|
|
|
padding-right: 10px; |
|
|
|
|
|
padding-top: 20px; |
|
|
|
|
|
padding-bottom: 20px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |