|
|
@ -272,7 +272,7 @@ |
|
|
return this.addForm.totalReceivables |
|
|
return this.addForm.totalReceivables |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props:['visible'], |
|
|
|
|
|
|
|
|
props:['visible','xmProduct'], |
|
|
watch: { |
|
|
watch: { |
|
|
'visible':function(visible) { |
|
|
'visible':function(visible) { |
|
|
if(visible==true){ |
|
|
if(visible==true){ |
|
|
@ -373,10 +373,6 @@ |
|
|
}, |
|
|
}, |
|
|
//编辑提交XmProject xm_project父组件监听@submit="afterEditSubmit" |
|
|
//编辑提交XmProject xm_project父组件监听@submit="afterEditSubmit" |
|
|
addSubmit: function () { |
|
|
addSubmit: function () { |
|
|
if(!this.roles.some(i=>i.roleid=='projectAdmin')){ |
|
|
|
|
|
this.$notify({showClose: true, message: "只有项目经理可以建立项目", type: 'error' }); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if ( |
|
|
if ( |
|
|
this.dateRanger != null && |
|
|
this.dateRanger != null && |
|
|
this.dateRanger.length == 2 |
|
|
this.dateRanger.length == 2 |
|
|
@ -392,16 +388,17 @@ |
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => { |
|
|
this.load.add=true |
|
|
this.load.add=true |
|
|
let params = Object.assign({}, this.addForm); |
|
|
let params = Object.assign({}, this.addForm); |
|
|
params.groups=this.xmGroups; |
|
|
|
|
|
|
|
|
if(this.xmProduct && this.xmProduct.id){ |
|
|
|
|
|
params.links=[{productId:this.xmProduct.id}] |
|
|
|
|
|
} |
|
|
params.planIuserWorkload=this.autoParams.planIuserWorkload |
|
|
params.planIuserWorkload=this.autoParams.planIuserWorkload |
|
|
|
|
|
|
|
|
params.planOuserWorkload=this.autoParams.planOuserWorkload |
|
|
params.planOuserWorkload=this.autoParams.planOuserWorkload |
|
|
params.planWorkload=this.autoParams.planWorkload |
|
|
params.planWorkload=this.autoParams.planWorkload |
|
|
addXmProject(params).then((res) => { |
|
|
addXmProject(params).then((res) => { |
|
|
this.load.add=false; |
|
|
this.load.add=false; |
|
|
var tips=res.data.tips; |
|
|
var tips=res.data.tips; |
|
|
if(tips.isOk){ |
|
|
if(tips.isOk){ |
|
|
this.$emit('submit',params);// @submit="afterEditSubmit" |
|
|
|
|
|
|
|
|
this.$emit('submit',res.data.data);// @submit="afterEditSubmit" |
|
|
} |
|
|
} |
|
|
this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); |
|
|
this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); |
|
|
}).catch( err =>this.load.add=false); |
|
|
}).catch( err =>this.load.add=false); |
|
|
|