+
{{addForm.preTaskname}}
选前置任务
@@ -94,48 +90,30 @@
:default-time="['00:00:00','23:59:59']"
:picker-options="pickerOptions"
>
-
-
-
-
-
-
-
-
-
+
- 人时,{{this.toFixed(addForm.budgetWorkload/8/20)}}人月
-
-
+ 人时,{{this.toFixed(addForm.budgetWorkload/8/20)}}人月
+
是否为众包任务
- 元
-
-
- 由后台自动计算,无需填写
-
-
- 由后台自动计算,无需填写
-
+
+
+
+
+ 工时单价 元/人时
+
+
+ 工时单价 元/人时
+
+
+ 预估金额 元
+
+
-
+
是否需要结算
@@ -146,11 +124,8 @@
-
- 外包任务
- 发布到互联网任务大厅
-
-
+
+ 发布到互联网任务大厅
@@ -168,13 +143,9 @@
取消
提交
-
-
-
+
-
+
@@ -238,26 +209,7 @@
'visible':function(visible) {
this.fileVisible = visible;
if(visible==true){
- if(this.parentTask){
- this.addForm=Object.assign(this.addForm, this.parentTask);
- this.addForm.parentTaskid=this.parentTask.id
- this.addForm.parentTaskname=this.parentTask.name;
- } else{
- this.addForm.taskType=this.projectPhase.taskType
- }
- this.addForm.projectId=this.xmProject.id
- this.addForm.projectName=this.xmProject.name
- this.addForm.projectPhaseId=this.projectPhase.id
- this.addForm.projectPhaseName=this.projectPhase.phaseName
- if(this.parentTask ){
- if(this.parentTask.children){
- this.addForm.sortLevel=this.parentTask.sortLevel+"."+(this.parentTask.children.length+1)
- }else{
- this.addForm.sortLevel=this.parentTask.sortLevel+"."+1
- }
- }
- this.addForm.id = sn();
- //从新打开页面时某些数据需要重新加载,可以在这里添加
+ this.initData();
}
},
},
@@ -276,22 +228,22 @@
load:{ list: false, edit: false, del: false, add: false },//查询中...
addFormRules: {
name: [
- { required: true, message: '任务名称不能为空', trigger: 'blur' }
+ { required: true, message: '任务名称不能为空', trigger: 'change' }
],
taskState: [
- { required: true, message: '请选择任务状态', trigger: 'blur' }
+ { required: true, message: '请选择任务状态', trigger: 'change' }
],
taskType: [
- { required: true, message: '请选择任务类型', trigger: 'blur' }
+ { required: true, message: '请选择任务类型', trigger: 'change' }
],
taskClass: [
- { required: true, message: '请选择是否结算', trigger: 'blur' }
+ { required: true, message: '请选择是否结算', trigger: 'change' }
],
toTaskCenter: [
- { required: true, message: '请选择是否发布', trigger: 'blur' }
+ { required: true, message: '请选择是否发布', trigger: 'change' }
],
sortLevel: [
- { required: true, message: '排序号不能为空', trigger: 'blur' }
+ { required: true, message: '排序号不能为空', trigger: 'change' }
],
// execuser:[{
// validator: validateExec, trigger: 'blur'
@@ -332,9 +284,7 @@
this.$refs.addForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
- let params = Object.assign({}, this.addForm);
- params.projectPhaseId=this.projectPhase.id
- params.projectPhaseName=this.projectPhase.phaseName
+ let params = Object.assign({}, this.addForm);
if(this.budgetDateRanger.length>=2){
params.startTime=this.budgetDateRanger[0]
params.endTime=this.budgetDateRanger[1]
@@ -346,13 +296,14 @@
addTask(params).then((res) => {
this.load.add=false
var tips=res.data.tips;
- if(tips.isOk){
- //this.$refs['addForm'].resetFields();
+ if(tips.isOk){
this.$emit('submit',res.data.data);// @submit="afterAddSubmit"
}
this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.add=false);
});
+ }else{
+ this.$notify({showClose: true, message:"表单检查不通过,请修改后提交", type: 'error' });
}
});
},
@@ -376,24 +327,15 @@
onTaskSkillsSelected(skills) {
let taskSkill = [];
skills.forEach(i=>{
- let obj = {
- taskId: this.addForm.id,
+ let obj = {
taskSkillId: i.skillId,
taskSkillName: i.skillName,
skillRemarks: '',
};
taskSkill.push(obj);
});
- this.taskSkills = taskSkill;
- batchAddSkill(taskSkill).then((res) => {
- this.load.add=false
- var tips=res.data.tips;
- if(tips.isOk){
- this.skillVisible = false;
- // this.getXmTasks();
- }
- this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
- }).catch( err => this.load.add=false);
+ this.taskSkills = taskSkill;
+ this.skillVisible=false;
},
getWeekday(first, last) {
@@ -439,20 +381,11 @@
this.addForm.budgetCost=this.addForm.budgetWorkload * price
},
onBudgetWorkloadChange(){
- var price=80;
- if(this.addForm.taskOut=='1'){
- if( this.projectPhase && this.projectPhase.phaseBudgetOutUserPrice){
- price=this.projectPhase.phaseBudgetOutUserPrice
- }else if( this.xmProject && this.xmProject.planOutUserPrice){
- price=this.xmProject.planOutUserPrice
- }
- }else{
- if( this.projectPhase && this.projectPhase.phaseBudgetInnerUserPrice){
- price=this.projectPhase.phaseBudgetInnerUserPrice
- }else if( this.xmProject && this.xmProject.planInnerUserPrice){
- price=this.xmProject.planInnerUserPrice
- }
- }
+
+ var price=this.addForm.uniInnerPrice?this.addForm.uniInnerPrice:80;
+ if(this.addForm.taskOut=='1'){
+ price=this.addForm.uniOutPrice? this.addForm.uniOutPrice:80;
+ }
this.addForm.budgetCost=this.addForm.budgetWorkload * price
},
onTaskOutChange(){
@@ -517,7 +450,37 @@
this.groupUserSelectVisible=false;
},
-
+ initData(){
+ if(this.parentTask){
+ this.addForm=Object.assign(this.addForm, this.parentTask);
+ this.addForm.parentTaskid=this.parentTask.id
+ this.addForm.parentTaskname=this.parentTask.name;
+ this.addForm.taskType=this.parentTask.taskType
+ this.addForm.planType=this.parentTask.planType
+ }
+ if(this.xmProject){
+ this.addForm.projectId=this.xmProject.id
+ this.addForm.projectName=this.xmProject.name
+ }
+
+ if(this.parentTask ){
+ if(this.parentTask.childrenCnt){
+ this.addForm.sortLevel=this.parentTask.sortLevel+"."+(this.parentTask.childrenCnt+1)
+ }else{
+ this.addForm.sortLevel=this.parentTask.sortLevel+"."+1
+ }
+ }
+ if(!this.addForm.uniInnerPrice){
+ this.addForm.uniInnerPrice=80
+ }
+ if(this.addForm.taskOut!='1'){
+ this.addForm.taskOut='0'
+ }
+ if(!this.addForm.uniOutPrice){
+ this.addForm.uniOutPrice=100
+ }
+ this.addForm.id=null;
+ },
toMenu(){
this.menuDetailVisible=true
},
@@ -527,37 +490,9 @@
skillMng,xmMenuSelect,XmTaskList,XmGroupSelect
//在下面添加其它组件 'xm-task-edit':XmTaskEdit
},
- mounted() {
- console.log("taskAdd_mount");
- if(this.parentTask){
- this.addForm=Object.assign(this.addForm, this.parentTask);
- this.addForm.parentTaskid=this.parentTask.id
- this.addForm.parentTaskname=this.parentTask.name;
- this.addForm.taskType=this.parentTask.taskType
- this.addForm.planType=this.parentTask.planType
- }else{
- if(this.projectPhase){
- this.addForm.taskType=this.projectPhase.taskType
- }
- }
- if(this.xmProject){
- this.addForm.projectId=this.xmProject.id
- this.addForm.projectName=this.xmProject.name
- }
- if(this.projectPhase){
- this.addForm.projectPhaseId=this.projectPhase.id
- this.addForm.projectPhaseName=this.projectPhase.phaseName
- }
-
- if(this.parentTask ){
- if(this.parentTask.childrenCnt){
- this.addForm.sortLevel=this.parentTask.sortLevel+"."+(this.parentTask.childrenCnt.length+1)
- }else{
- this.addForm.sortLevel=this.parentTask.sortLevel+"."+1
- }
- }
- this.addForm.id = sn();
- listOption([{categoryId:'all',itemCode:'planType'},{categoryId:'all',itemCode:'taskType'},{categoryId:'all',itemCode:'urgencyLevel'},{categoryId:'all',itemCode:'priority'},{categoryId:'all',itemCode:'xmTaskSettleSchemel'}]).then(res=>{
+ mounted() {
+ this.initData();
+ listOption([{categoryId:'all',itemCode:'planType'},{categoryId:'all',itemCode:'taskType'},{categoryId:'all',itemCode:'urgencyLevel'},{categoryId:'all',itemCode:'priority'},{categoryId:'all',itemCode:'xmTaskSettleSchemel'}]).then(res=>{
this.options=res.data.data;
})
/**在下面写其它函数***/
diff --git a/src/views/xm/core/xmTask/XmTaskEdit.vue b/src/views/xm/core/xmTask/XmTaskEdit.vue
index a1e5ab5f..8e5277bb 100644
--- a/src/views/xm/core/xmTask/XmTaskEdit.vue
+++ b/src/views/xm/core/xmTask/XmTaskEdit.vue
@@ -24,6 +24,10 @@
+
+ 计划项
+ 任务
+
@@ -34,7 +38,7 @@
-
+
如1.0或者1.2.3等
标记为里程碑
@@ -73,7 +77,7 @@
设置负责人
- {{editForm.exeUsernames}}
+ {{editForm.exeUsernames}}
候选人管理
我要加入
@@ -124,22 +128,29 @@
- 人时,{{this.toFixed(editForm.budgetWorkload/8/20)}}人月
- 人月单价:内购: {{projectPhase.phaseBudgetInnerUserPrice}} 外购: {{projectPhase.phaseBudgetOutUserPrice}}
+ 人时,{{this.toFixed(editForm.budgetWorkload/8/20)}}人月
+
+ 是否为众包任务
- 是否为众包任务
- 元
+
+ 工时单价 元/人时
+
+
+ 工时单价 元/人时
+
+
+ 预估金额 元
- 由后台自动计算,无需填写
+ 由后台自动计算,无需填写
- 由后台自动计算,无需填写
+ 由后台自动计算,无需填写
-
+
是否需要结算
@@ -150,9 +161,8 @@
-
- 外包任务
- 发布到互联网任务大厅
+
+ 发布到互联网任务大厅
@@ -178,7 +188,7 @@
-->
-
+
diff --git a/src/views/xm/core/xmTask/XmTaskMng.vue b/src/views/xm/core/xmTask/XmTaskMng.vue
index ad90d0ac..2cefc8ab 100644
--- a/src/views/xm/core/xmTask/XmTaskMng.vue
+++ b/src/views/xm/core/xmTask/XmTaskMng.vue
@@ -1,17 +1,8 @@
-
-
-
-
+
@@ -908,12 +899,12 @@
:size="650"
:close-on-click-modal="false"
>
-
+ >
-
+ >
-
+ >